Ripetizioni di Analisi
EN

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 :

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
The sieve of Eratosthenes up to : the shaded cells contain the primes

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 →

Report a mistake

Where:

Ripetizioni di Analisi

Keep studying

With a free account, you can pick up where you left off and see your progress next time you visit.

Sign up for free

Already have an account? Sign in

Contents