The Seive of Eratosthenes is an ancient method of "sifting" out the prime numbers. Given a list of the first n positive integers, you choose a prime number p and then cross out all of its multiples that are greater than p. Doing this for each prime in the list {2,3,5,7,11,...,p} where p is the first prime less than or equal to sqrt n, will leave in the list {2,3,4,5,6,..., n} only prime numbers.