Visualize 100 Numbers processed by the Sieve of Eratosthenes

 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
 Prime Divisible by 2 Divisible by 3 Divisible by 5 Not a Prime
Hover over a non-prime to see its factors.

# Charting Prime Numbers using the Sieve of Eratosthenes

The Sieve of Eratosthenes is an ancient, yet efficient method of determining primes numbers in a given set of consecutive numbers (e.g. from 1 to 100).

The Sieve of Eratosthenes works starts at 2 (the first prime), which is marked as prime. Then, eliminate all multiples of 2 across the set (mark these as non-prime). Once complete, locate the next highest available number (3), which will be the next prime, and then again eliminate all multiples of 3. 4 has already been eliminated (because it was as marked prime when marking multiples of 2), so the next prime is 5. Mark off all multiples of 5, and continue this way until all numbers in the set have been processed.

By systematically working upwards through the set, all numbers which are not eliminated in this manner are prime.