The sieve of Eratosthenes is a fun way to find all the prime numbers up to a certain number, like finding the special numbers in a group of friends.
Imagine you have a big list of numbers from 1 to 100, and you want to pick out only the ones that are prime, which means they can only be divided by 1 and themselves. The sieve helps you do this step by step, like playing a game of hide-and-seek with the numbers.
How it works
Start by crossing out the number 1 because it’s not prime, it's too small to be special. Then take the first number that hasn’t been crossed out (which is 2), and cross out every multiple of 2, like 4, 6, 8, and so on.
Next, move to the next number that isn’t crossed out (that would be 3) and do the same, cross out all its multiples. Keep going until you’ve gone through all the numbers up to 100.
What’s left are all the prime numbers, like the superheroes of the number world who don’t get crossed out!
Examples
- Finding prime numbers up to 20 by crossing out multiples of each prime
- A classroom activity where students use the sieve to identify primes between 1 and 30
Ask a question
See also
- What are prime gaps?
- How do algorithms help people make decisions every day?
- What are recursive processes?
- What is Goldbach's Conjecture?
- What Is a Prime Number, Really?