The are several prime sieves, all of which are designed to find all of the prime numbers up to some finite limit $$n$$. The sieve of Eratosthenes is an ancient algorithm, and is the one used in this applet. Begin by arranging the numbers 1 through $$n$$ in a grid, with at least as many columns as rows. Starting with 2, cross off all multiples of each number $$i$$ in the top row except for the $$i$$ itself. The numbers that remain are all prime.