Not Finding Your Answer?
Post It On KidzTalk Homework Help
Post It On KidzTalk Homework Help
Report a search problem
mobile version
Copyright 2005-2024 KidzSearch.com
The Sieve of Eratosthenes is a simple way to find all the prime numbers up to some number n:
When the algorithm is finished all the numbers that are left not crossed out are all the prime numbers from 2 up to n.
As an optimization we can start the counting in step 3 from p2, and stop in step 2 when p2 is greater than n.