This version uses the Sieve of Eratosthenes algorithm, which is very fast for moderate upper bounds, but which may be slower than the other versions when the upper bound is very large (because of the overhead of the initial table population)
2007-10-02 (first published: 2002-06-20)
15,443 reads