Sieve of Eratosthenes Screensaver
The Sieve of Eratosthenes screensaver runs the real, 2,200-year-old prime-finding algorithm live, crossing out multiples of each prime as it discovers them. It is free, runs in your browser, and ESC exits.
How the Sieve of Eratosthenes screensaver works
The saver lays out a real grid of numbers up to a set limit, then runs the true Sieve of Eratosthenes over it.
Starting from 2, every real multiple of the current prime is crossed out, and the next uncrossed number becomes the next real prime found.
The process repeats live, crossing out multiples of 3, then 5, then 7, and so on, exactly as the real ancient algorithm defines.
Once every number up to the limit is resolved as prime or composite, it holds briefly, then a fresh sieve begins with a new limit.
A worked example
Once 2 is found prime, every even number lights up as composite in one pass; then 3 clears most remaining multiples of three, and the sieve quickly narrows in on the real remaining primes.
Settings & tips
- Accent recolours the prime currently sieving.
- This is the real, unmodified ancient sieve algorithm, not an approximation.
- A fresh sieve begins automatically once every number is resolved.
Frequently asked questions
- Is this a real prime-finding algorithm?
- Yes — the real Sieve of Eratosthenes, a genuine algorithm dating back over two thousand years.
- Why cross out multiples instead of testing each number?
- It is real and provably faster: crossing out multiples finds every prime up to the limit without ever dividing.
- Is a key needed?
- No — it is a pure local computation.
- Is it free?
- Yes — free, no download, in your browser.