in reply to Re^6: Number functions.. primes (ugly code runs faster)
in thread Number functions I have lying around

Very nice. About 1.5x faster, better looking code, though 2x memory use.

Addendum: Can you put it on RosettaCode or let me know it's ok to put there? Everything there gets covered by the GNU FDL so I don't want to put there without some sort of permission. More code improvements are also welcome :)