= Sieve theory
{wiki}
<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 $30$, deleting multiples of $2$, $3$, and $5$ leaves $1,7,11,13,17,19,23,29$. The <Chinese remainder theorem> predicts a survival density $(1-1/2)(1-1/3)(1-1/5)$ over a full period of length $30$. 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>.<Some sieve theory by Terence Tao (254A Notes 4)>[Opening sifting definitions and Corollary 19]{ref}
Back to article page