Sieve of Eratosthenes implementation and test