Concept Flow - Sieve of Eratosthenes Find All Primes
Create list of numbers 2 to n
Start with p = 2 (smallest prime)
Mark multiples of p as not prime
Find next number > p not marked
If next p <= sqrt(n), repeat marking
Collect all numbers not marked as primes
Start with a list of numbers, mark multiples of each prime as not prime, then collect remaining primes.
