Sieve of Eratosthenes

Eratosthenes, ~200 BC

O(n log log n)

Attributed to the Greek mathematician Eratosthenes around 200 BC, this sieve marks composite numbers by iterating through each prime and eliminating its multiples. The grid shows numbers 2 through 60: the current prime is highlighted in coral, its multiples are crossed out in a gold wave, confirmed primes glow teal, and eliminated composites fade away.