Fixed prime factor logic