🔮

Sieve of Eratosthenes

Hunt every prime by elimination

Tap the smallest active number — its multiples chain-collapse to gray. Whatever stays alight is prime. Four levels escalate from 1–30 up to a 1–100 speedrun where the optimal play is exactly four taps: 2, 3, 5, 7.

What this game shows · Sieve of Eratosthenes

The Sieve of Eratosthenes is the oldest known algorithm for finding every prime number up to N. This animated game lets you tap one prime at a time and watch its multiples fall together — so primality stops being a memorized list and becomes a chain reaction you can see.

Prime
a whole number ≥ 2 with exactly two divisors: 1 and itself.
Composite
a whole number ≥ 4 that is some smaller prime × something. Always has a factor ≤ √n.
√N shortcut
after sweeping every prime ≤ √N, all survivors are guaranteed prime.

Aligned with CCSS 4.OA.B.4 (factor pairs, prime/composite). Recommended for Grades 4–6.

Number theory · 4 mechanics

Sieve of Eratosthenes

Each level changes the verb. Execute, predict, decide, recognize — the same prime-hunting algorithm trains four different ways of thinking.

0 / 4 solved
L1 · Execute

Tap the smallest active number. It is prime. Its multiples are not — watch them fall.

Primes found0 / 100 sweeps
Start with 2. Then 3. Then 5. The smallest unmarked number is always prime.

Number theory explorer

Who this demo helps, and where to practice next

Sieve of Eratosthenes is built for students who need factors, primes, composites, GCF, and LCM as visible structure. It gives the page a clear search purpose: learn the model, manipulate it, then continue into the matching grade-level practice.

Sieve of Eratosthenes helps when a student can copy a procedure but cannot explain why it works. The demo slows the idea down into a visible model before sending the learner to guided missions.

Learning goals

  • Every prime sweeps an arithmetic progression: tap 2 once and 4, 6, 8, 10, 12, … all eliminate at once. Composites are never prime — they were already someone else's multiple.
  • After √100 = 10, no new composites can appear. So once you finish sweeping 7, every remaining cell is guaranteed prime — no more taps needed.
  • A composite n always has a factor ≤ √n. That is the entire reason the sieve is fast: from 1 to one million, you only need to sweep primes up to 1000.

How to play

  1. 1 Sort or eliminate numbers by factor structure.
  2. 2 Explain why a number belongs in the prime, composite, shared, or multiple group.
  3. 3 Use the related topic pages for CCSS-aligned factor and GCF practice.
FAQ

Sieve of Eratosthenes, answered.

01 What is the Sieve of Eratosthenes? Algorithm

A 2,200-year-old algorithm that finds every prime up to N. You start with 2, mark every multiple of 2 as composite, then move to the next unmarked number (3), repeat. Whatever survives is prime.

02 Why does the algorithm stop after √N? √N rule

Every composite n must have a factor ≤ √n. So once you have swept every prime up to √N, no composites can remain hidden — every survivor is prime. From 1 to 100, that means stopping after 7.

03 How many taps are optimal in the 1–100 level? 4 taps

Exactly four — 2, 3, 5, 7. Those primes sweep every composite in the range, and 11 > √100 = 10, so no further sweeps can change the outcome.

04 Which grade is this game for? Grades 4–6

Grades 4–6, aligned with CCSS 4.OA.B.4 (factor pairs, prime/composite). Older students still benefit from the visual proof of the √N stopping rule.

Related Fun Math games