The prime factors of 13195 are 5, 7, 13 and 29.

What is the largest prime factor of the number 600851475143 ?

素因数分解した。

p003 = last.pfac$600851475143
pfac 1 = []
pfac m = q:(pfac m')
where (q,m') = head [(n,div m n)|n<-[2..(floor.sqrt.fromIntegral$m)]++[m],mod m n==]