🔮

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.
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