Prime Numbers

This page illustrates how the prime numbers from 2..50 can be found using the Sieve of Eratosthenes method. The 'sieve' represents the numbers 0..49 and whether they may be prime.

Initially, 0 and 1 are set as not prime, the rest as possibly prime.

Then the sieve is searched in order. When a number is found as possibly being prime then it is, and left as such, but all multiples are set as not being prime.

When the sieve has been searched, those left are the prime numbers.

Animate