Fixed prime generator solution