Question: Weird problem with largest prime factorisation function

Hi,

I`m using this program to find the largest prime factor:



Problem: If I insert largest_prime(p^n), where p is prime, it returns n. Which I dont want! I want p to be returned.

Please help me!

Please Wait...