CURIUM
How does the Sieve of Eratosthenes find prime numbers without dividing?

Sieve of Eratosthenes

How does the Sieve of Eratosthenes find prime numbers without dividing?

By crossing out. Write the integers, keep 2, cross out all its multiples. The first uncrossed number that follows is prime in turn, and you start again. No division, no test. Only repeated additions, and a list that empties.

MathsNumber theory

The three levels

Beginner

How does the Sieve of Eratosthenes find prime numbers without dividing?

By crossing out. Write the integers, keep 2, cross out all its multiples. The first uncrossed number that follows is prime in turn, and you start again. No division, no test. Only repeated additions, and a list that empties.

Intermediate

Why can the Sieve stop at the square root of n?

If a number less than n is composite, it has a factor less than or equal to the square root of n. Two larger factors would give a product too large. The rest of the list is prime.

Expert

Why is the Sieve of Eratosthenes useless for modern cryptography?

Sieving up to an integer means keeping a list of all the numbers before it. RSA moduli have more than six hundred digits. This list would far exceed the number of atoms in the observable universe. So we draw large prime numbers at random, and test them one by one. With probabilistic methods, like Miller and Rabin's.