Why can one stop in the sieve when ? The reason is simple and concerns every composite number.
Remark — Why it is enough to stop at
If were composite, then with . It follows that : the smaller factor is . So every composite number has a prime factor and has already been crossed out when the multiples of the primes up to were eliminated. The cost of the sieve is : for a few milliseconds are enough.
Links
Topics: Numbers and operations
Concepts: Sieve of Eratosthenes · Prime number
Skills: Prove