Nepedia
Back to Discover
Independent Reader
🔢

Sieve of Eratosthenes

math Maturity 7-9 Next article →

Prime numbers are very special. A prime number has only two factors. These are the number 1 and itself.

Animation Sieve of Eratosth
Animation Sieve of Eratosth

A Greek thinker named Eratosthenes found a smart way to find them. This method is called a sieve. A sieve is a tool used to strain things.

To use it, write a list of numbers. Start with 2. The number 2 is the smallest prime. Next, cross out all its multiples. You can do this by counting by twos. Then, find the next number not crossed out. This will be 3. Cross out all multiples of 3. Keep doing this for each new prime you find.

When you finish, the numbers left are primes. This way is very fast. It only uses addition to find the answers. You do not need to use division. Some people use a segmented sieve for big lists. This helps computers save memory. It breaks the big list into smaller parts. This makes it easier to work with large numbers.

164 words

Where will your curiosity go next?

Keep exploring at your chosen reading level.

🖼️ Images & Media (1)
File:Animation Sieve of Eratosth.gif
Animation Sieve of Eratosth.gif
More to explore

🔬 Go deeper

More advanced topics to explore

🪜 Step back

Simpler topics to build understanding

What is Nepedia?

A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.