Theorem · Divisibility
Sieve of Eratosthenes
Theorem from the chapter Multiples, divisors, prime numbers, GCD and LCM of Mathematics zero, with the exercises in which it is used.
Sieve of Eratosthenes
The sieve of Eratosthenes is a method for finding all the primes up to a given number. Write down the numbers starting at and repeat two steps:
- take the first number in the list that has not been crossed out. It is prime;
- cross out all its subsequent multiples.
For numbers up to , cross out the multiples of (that is, , , , …), then the multiples of (, , , …, since the even ones have already been crossed out), and then the multiples of and . After there is nothing left to cross out because the first multiple of that would still need to be crossed out is , which exceeds . The remaining numbers are the primes less than :
Read it in the chapter Multiples, divisors, prime numbers, GCD and LCM →
Exercises where this theorem is used
Worked examples
All the definitions and theorems of Mathematics zero → · All the theorems on the site →