Writing a Number as a Product of Its Primes (Power Rotation)