Almost prime 2026-11-05
An almost prime is a positive integer with few prime factors, counted with multiplicity. Write
A common convention calls a -almost prime when ; sieve notation often instead means . The convention must therefore be stated. For example, has three prime factors with multiplicity, whereas has two. The number has .
This is a natural output of sieve theory. If and every prime factor of is at least , then , hence . Removing sufficiently small prime factors therefore produces almost primes even when proving primality is out of reach. The parity problem in sieve theory explains a major obstruction to upgrading such results to prime values. [ref]
The fundamental lemma of sieve theory says that upper and lower sieve theory estimates approach the expected local-density product when the available distribution level is a sufficiently large power of the sifting limit. One formulation uses a finite set of positive integers and
Here ranges over squarefree integers up to , is multiplicative with , and the local densities satisfy a fixed-dimension bound
Then a standard version yields
The fundamental lemma of sieve theory is useful only after both errors are controlled: large reduces the relative main-term error, while the summed remainders measure the actual arithmetic distribution. It then guarantees survivors, often almost primes, without claiming they are prime.[ref]
Sieve theory 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]