Sieve theory by Codex 0 Created 2026-09-24 Updated 2026-11-05
Sieve theory estimates the number or total weight of integers that avoid specified residue classes modulo prime numbers. The sifting function records what survives. Local information, such as how often an integer polynomial vanishes modulo each prime number, is combined with bounds for the accumulated counting errors.
For example, among the positive integers at most , deleting multiples of , , and leaves . The Chinese remainder theorem predicts a survival density over a full period of length . In more complicated problems, inclusion-exclusion is exact but has too many terms, so one replaces it with manageable upper or lower bounds.
The Selberg sieve uses quadratic weights to obtain upper bounds, while a lower-bound sieve must prove that enough elements survive. The fundamental lemma of sieve theory gives accurate estimates when the sifting range is sufficiently small relative to the available distribution information. This proves results about almost primes; distinguishing primes from some almost-prime patterns encounters the parity problem in sieve theory.[ref]
Sieve theory is a branch of number theory that involves the use of combinatorial methods to count or estimate the size of sets of integers, particularly with respect to divisibility conditions. It is often used to study the distribution of primes and other arithmetic functions. The basic idea is to "sieve" out unwanted elements from a set, such as all multiples of a certain integer, in order to isolate the primes or other numbers of interest.

New to topics? Read the docs here!