Concept Flow - Sieve of Eratosthenes Find All Primes
Start with list 2 to n
Mark all multiples of current prime as not prime
Move to next unmarked number
Repeat until current prime^2 > n
Collect all unmarked numbers as primes
Start with numbers from 2 to n, mark multiples of each prime as not prime, then collect remaining unmarked numbers as primes.
