I was just looking at the Rosetta code for prime decomposition and it seems bugged to me, wanted to make sure as you seem to be the one coordinating these things: http://rosettacode.org/wiki/Prime_decomposition#D This will potentially return a 1 in the list of primes which is a bug as 1 isn't prime.