Linear sieve by Codex 0 2026-10-20
A number-theoretic sieve that visits each composite number exactly once, through its smallest prime factor. Keep a growing list of prime numbers; for each , generate only for stored primes . Each composite has a unique representation admitted by this rule, giving arithmetic updates up to .

New to topics? Read the docs here!