X Tables
Maths History

Eratosthenes and prime numbers

Use the sieve method to find prime numbers.

Quick answer

Eratosthenes was an ancient Greek mathematician who invented a method to find prime numbers. His method is called the Sieve of Eratosthenes. You can use it to find all the prime numbers up to any number by crossing out multiples of each prime number, starting with 2.

Learning outcome

By the end of this page, you will know how to find prime numbers using the Sieve of Eratosthenes, and you will understand why prime numbers are special in maths. Success signs:
  • You can explain what a prime number is
  • You can use the Sieve of Eratosthenes to find primes up to 30
  • You can identify which numbers are prime and which are not
  • You can explain why prime numbers are important

Why this matters

Prime numbers are like the building blocks of all numbers. Every number can be made by multiplying prime numbers together. For example, 12 = 2 × 2 × 3, and 15 = 3 × 5. Understanding prime numbers helps you solve puzzles, understand how codes work, and even helps computers stay secure. The Sieve of Eratosthenes is a fun way to find these special numbers and helps you see patterns in maths.

How it works

The Sieve of Eratosthenes works like this:
  1. Write down all numbers from 2 up to the number you want to find primes up to.
  2. Start with the first number, which is 2. This is a prime number.
  3. Circle 2 as prime, then cross out all multiples of 2 (4, 6, 8, 10, etc.) because they are not prime.
  4. Move to the next number that is not crossed out. This is 3, and it's also prime.
  5. Circle 3, then cross out all multiples of 3 (6, 9, 12, 15, etc.).
  6. Keep going with the next uncrossed number, which is 5, then 7, and so on.
  7. When you have crossed out all multiples of primes up to the square root of your largest number, the remaining uncrossed numbers are all prime.

Examples you can see

Let’s find all prime numbers up to 30 using the Sieve of Eratosthenes.
  1. First, write all numbers from 2 to 30: 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30
  2. Circle 2 as prime and cross out all multiples of 2: 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30
  3. Next, circle 3 as prime and cross out multiples of 3: 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30
  4. Next, circle 5 as prime and cross out multiples of 5: 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30
  5. Next, circle 7 as prime and cross out multiples of 7: 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30
  6. The next number is 11, but we don’t need to go further because the square root of 30 is about 5.4, and we’ve already gone past that.
  7. So the prime numbers up to 30 are: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29.

Try it as a mini adventure

Adventure: The Prime Treasure Hunt You are a detective on a mission to find a hidden treasure. The treasure map says: “To find the treasure, you must collect the prime numbers from 1 to 30. The prime numbers are the secret keys to the treasure chest.” Your task is to use the Sieve of Eratosthenes to find all the prime numbers from 1 to 30. You must:
  1. Write down all numbers from 1 to 30
  2. Circle the prime numbers
  3. Cross out all multiples of 2, 3, 5, and 7
  4. Find the secret keys (the prime numbers)
When you finish, you’ll have found 10 prime numbers. These are your keys to unlock the treasure chest!

Common mistakes

  • Mistake: Thinking 1 is a prime number. Why it happens: Some people forget that prime numbers must be greater than 1. Fix: Remember, 1 is not a prime number because it only has one factor, which is itself.
  • Mistake: Forgetting to cross out multiples of 3, 5, 7, etc. Why it happens: It’s easy to skip numbers when you’re working quickly. Fix: Go slowly and check that you’ve crossed out all multiples of each prime number.
  • Mistake: Thinking that 2 is not a prime number. Why it happens: Some children think that even numbers can’t be prime. Fix: 2 is the only even prime number. It’s special!
  • Mistake: Not stopping when you reach the square root. Why it happens: It’s hard to remember when to stop. Fix: When you get to a number whose square is bigger than your largest number, you can stop crossing out multiples.

Parent and carer guide

To help your child with the Sieve of Eratosthenes:
  • Start by explaining that prime numbers are numbers that can only be divided by 1 and themselves (like 2, 3, 5, 7).
  • Use a number chart or a list from 1 to 30 to make it visual and easy to follow.
  • Let your child do the circling and crossing out themselves. This helps them learn by doing.
  • Encourage them to count the prime numbers they find to check if they’re getting the right amount.
  • Ask questions like: “Why is 1 not prime?” or “What do you notice about the even numbers?”
  • Be patient and celebrate small wins. Learning this method takes practice.

Practice questions

  1. What is the smallest prime number?
  2. Which of these numbers are prime: 11, 12, 13, 14, 15?
  3. Use the Sieve of Eratosthenes to find all prime numbers from 1 to 20.
  4. Why is 1 not a prime number?
  5. How many prime numbers are there between 1 and 30?
Answers:
  1. 2
  2. 11 and 13
  3. 2, 3, 5, 7, 11, 13, 17, 19
  4. Because it only has one factor (itself), and prime numbers must have exactly two factors: 1 and themselves.
  5. 10

FAQ

What is a prime number?

A prime number is a number greater than 1 that can only be divided evenly by 1 and itself. For example, 2, 3, 5, 7, and 11 are prime numbers.

Who was Eratosthenes?

Eratosthenes was an ancient Greek mathematician who lived about 2,200 years ago. He was famous for many things, including calculating the Earth's circumference and inventing the Sieve of Eratosthenes to find prime numbers.

Why do we need to know about prime numbers?

Prime numbers are important in maths and in real life. They help us understand how numbers work, and they are used in computer security, codes, and cryptography. They are also fun to discover!

Can you find prime numbers beyond 30?

Yes! You can use the same Sieve of Eratosthenes method to find prime numbers up to any number. Just keep going until you’ve crossed out all the multiples of primes up to the square root of your number.

Is 2 the only even prime number?

Yes! 2 is the only even prime number because all other even numbers can be divided by 2, so they have more than two factors.