79 ... [5] (11) 13 17 19 23 29 31 37 41 43 47 53 59 61 67 71 73 79 ... [...] Here the example is shown starting from odds, after the first step of the algorithm. Thus, on the th step all the remaining multiples of the th prime are removed from the list, which will thereafter contain only numbers coprime with the first primes (cf. wheel factorization), so that the list will start with the next prime, and all the numbers in it below the square of its first element will be prime too. Thus, when generating a bounded sequence of primes, when the next identified prime exceeds the square root of the upper limit, all the remaining numbers in the list are prime. In the example given above that is achieved on identifying 11 as next prime, giving a list of all primes less than or equal to 80. Note that numbers that will be discarded by a step are still used while marking the multiples in that step, e.g., for the multiples of 3 it is , , , , ..., , ..., so care must be taken dealing with this. See also Sieve of Pritchard Sieve of Atkin Sieve of Sundaram Sieve theory References External links primesieve – Very fast highly optimized C/C++ segmented Sieve of Eratosthenes Eratosthenes, sieve of at Encyclopaedia of Mathematics Interactive JavaScript Page Sieve of Eratosthenes by George Beck, Wolfram Demonstrations Project. Sieve of Eratosthenes in Haskell Sieve of Eratosthenes algorithm illustrated and explained. Java and C++ implementations. A related sieve written in x86 assembly language Fast optimized highly parallel CUDA segmented Sieve of Eratosthenes in C SieveOfEratosthenesInManyProgrammingLanguages c2 wiki page The Art of Prime Sieving Sieve of Eratosthenes in C from 1998 with nice features and algorithmic tricks explained. Primality tests Articles with example pseudocode Algorithms