The Sieve of Eratosthenes can be used to compute prime numbers.
Click on any number below and all its multiples will be removed from
the array. Continue until no more numbers can be removed.
The remaining numbers are all the primes in the initial array.
Think about
- Does this really work? Why?
- What is a good order to choose numbers to click on?
- What is the smallest number of numbers whose multiples must be removed
so that only primes remain?
- What is the largest number whose multiples must be removed?
- How can you determine this number?
Does it work??
Comments are welcome !