Sieve of Eratosthenes
General · Mathematics
Study notes
Q: Find all primes ≤ 30 using the sieve. List 2..30. Keep 2, cross evens. Keep 3, cross multiples of 3. Keep 5, cross multiples of 5 (25). 7² = 49 > 30: stop! Remaining: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29 - 10 primes!