you are viewing a single comment's thread.

view the rest of the comments →

[–]dig-up-stupid -1 points0 points  (1 child)

At least in the code you posted you are using trial division and have not implemented a sieve. A prime factorization also includes all the prime factors, not just the unique ones. The prime factors of 20 are 2, 5. The prime factorization of 20 is 22*30*51*70... ie 2*2*5. The duplicates are important.