Exercise 1843Number theory › PrimesOlympiadAdded 3 Nov 2026
The sieve of Sundaram
#sieve#Sundaram#primes
Statement
Describe the sieve of Sundaram and generate primes up to .
Hint
Write numbers not of the form ; then are odd primes.
Show solutionHide solution
Solution
Sieve. For , remove numbers of the form with . The remaining give primes .
Compute up to . (so ). Removed numbers: : (within range –: ). Remaining in –: . Primes: , , , , , , , , .
Conclusion. Sieve gives odd primes up to .