Maths WorkshopMaths problems with full solutions
Exercise 552Number theory › PrimesHigh schoolAdded 3 Nov 2026

The sieve of Eratosthenes

#sieve#Eratosthenes#primes

Statement

Use the sieve of Eratosthenes to list all primes less than 3030.

Hint

Cross out multiples of each prime starting from 22, up to 30≈5.5\sqrt{30}\approx5.5.

Show solutionHide solution

Solution

Start. List 2,3,…,292,3,\ldots,29.

Cross out multiples of 2 (except 22): 4,6,8,10,12,14,16,18,20,22,24,26,284,6,8,10,12,14,16,18,20,22,24,26,28.

Cross out multiples of 3 (except 33): 9,15,21,279,15,21,27 (some already removed).

Cross out multiples of 5 (except 55): 2525.

Remaining primes. 2,3,5,7,11,13,17,19,23,292,3,5,7,11,13,17,19,23,29.

Conclusion. Ten primes less than 3030.