The Selberg upper-bound sieve replaces the indicator function of a sifted set by the square of a divisor sum. If the real Selberg sieve weights satisfy , then
When has no forbidden prime factors, the divisor sum is exactly one; otherwise its square is still nonnegative. Taking the weights to vanish for controls the error in summing this majorant. The main term is a positive quadratic form that can be diagonalized and minimized explicitly. This optimization, together with a bound for the remainder, is the central idea of the Selberg sieve.
For twin primes, take and let be the number of its roots modulo a squarefree integer . The Chinese remainder theorem makes a multiplicative arithmetic function, with and for odd primes. Thus the polynomial root density in a sieve is , and
Summing the majorant gives
where , with all indices squarefree. Here controls the error.
We carry out the Selberg sieve diagonalization. Put
For squarefree integers , multiplicativity gives
The identity behind the first equality is . Möbius inversion gives . The Cauchy-Schwarz inequality therefore implies
Define . Equality is attained at , giving . Inverting again, the optimizing Selberg sieve weights are
In particular . Since ,
The last inequality holds separately at , , and . Together with , this crude bound already makes the remainder , because .
We also need a lower bound for ; we prove it rather than presuppose a sieve asymptotic. For odd squarefree integers ,
where counts distinct prime factors. Put and . The total weight of odd pairs is . Exclude pairs for which has a square prime factor, has a square prime factor, or have a common prime factor. For each of these three categories the total weight is at most : for example, the weighted count of odd multiples of is , and the common-factor category uses for each variable. Moreover,
Hence the remaining odd coprime squarefree pairs have weight at least . Their products are squarefree, and counts all ordered coprime factorizations of . This proves the elementary lower bound for the twin-prime sieve denominator:
If and both are primes, survives the sieve. The at most smaller values are the only exceptions. Thus, with and , the twin-prime upper bound from a quadratic sieve becomes
Finally partial summation gives
The integral over is bounded by a constant times . The nonnegative partial sums are therefore bounded and increasing. Thus the reciprocal series over the smaller members of twin-prime pairs converges, a form of Brun's theorem. The upper bound does not assert that infinitely many twin primes exist.
The Selberg upper-bound sieve replaces an exact but long inclusion-exclusion expansion by a short nonnegative square, and then minimizes its main term. For an interval , the count of multiples of every integer is
Crucially the remainder bound is independent of .
Let and take real weights , supported on squarefree , with . If , the sum of these weights over divisors of is just one; for all other its square is nonnegative. Thus
Expanding and counting common multiples gives
This separates the local density from a uniform interval error. The weights will be chosen to minimize .
The Euler totient function identity yields the Selberg sieve diagonalization
Only squarefree occur. Inverting this finite triangular sum by Möbius inversion gives
Write . The Cauchy-Schwarz inequality gives , with equality at . The inverse formula then produces the optimal Selberg sieve weights
The constraints are satisfied, since the diagonal transformation is invertible and .
We need the leading constant, not just . Here is an elementary proof of the Selberg sieve denominator asymptotic. For define the multiplicative arithmetic function by
Checking the prime-local factors shows . Also : the local factors for absolute values differ from one by , and their logarithmic first moments sum . The signed local sums are all one, so absolute convergence gives . Using the harmonic number estimate,
For the last equality, is bounded and is bounded too.
The optimal Selberg weights have modulus at most one. To prove this here, for squarefree use . The product is the sum of over , , , with squarefree. All are distinct squarefree integers at most , and so these are a subset of the terms of . The displayed weight formula now gives . Consequently
Every prime in the interval exceeding survives the sieve; at most smaller primes must be restored. Choose . Then
and the uniform interval bound from optimal Selberg weights follows:
All constants are independent of . Given , make the absolute error in the coefficient smaller than by choosing large enough. Uniformly for every and ,
Let count pairs both prime with . The Selberg sieve replaces primality by the necessary condition that the polynomial have no small prime divisor. Its strength is a nonnegative quadratic majorant with optimizable divisor weights; its limitation is that a sifted integer need not be prime.
For a prime , let count the forbidden residues of modulo . We have , since the two roots coincide modulo two, and for every odd prime, where the roots are zero and . The Chinese remainder theorem makes multiplicative on squarefree integers. With ,
These local densities constitute the sieve distribution for the twin-prime problem. Since , it is a dimension-two sieve, which is why the expected upper bound has two logarithms in the denominator.
Let and choose real Selberg sieve weights supported on squarefree , with . If , the only supported divisor of is one. Hence
Expanding and using the distribution of the polynomial roots gives
Here denotes the least common multiple. The divisor-square support reaches , although each individual weight is supported only to ; keeping these two levels distinct is essential for estimating the remainder.
The Selberg sieve diagonalization solves the main-term minimization exactly. On squarefree integers put
Multiplicativity gives
Also, Möbius inversion gives . Therefore the Cauchy-Schwarz inequality proves
with equality at . Inverting the divisor sums gives the optimizing weights
In particular and .
These weights have , which supplies a simple rigorous remainder estimate. Indeed, multiply the inner sum by . The terms are for distinct squarefree integers with and , hence form a subset of the sum defining . Since and ,
Thus
For this sieve and for odd primes. Here is a direct proof that , sufficient for the upper bound. Put
The Mertens theorem for reciprocal primes implies , by taking logarithms and using the convergence of . Give each divisor probability . Its expected logarithm is
by the Mertens first theorem. With this is at most for large . The Markov inequality shows that at least two thirds of the total product weight has . These terms occur in , so . Conversely , proving the claim without treating an untruncated Euler product as a truncated divisor sum.
Choose, for example, . Any twin-prime pair with smaller member greater than survives this sieve; pairs with smaller member at most contribute at most . Consequently
The chosen level is deliberately enough to prove the correct logarithmic order; sharper level and remainder analyses improve the numerical upper-bound constant.
The local correction factor also explains the conjectured main-term constant. Relative to two independent primality conditions, the singular series is
The twin-prime constant is positive and convergent because its logarithm has an absolutely convergent tail. The factor two at records that only one parity is allowed, while each odd-prime factor records the two distinct forbidden residues. The Hardy–Littlewood twin-prime asymptotic conjecture predicts
This is a conjecture, not a consequence of the upper-bound calculation.
The parity problem in sieve theory is the obstruction to reversing the argument. The nonnegative square majorizes all survivors, including composites with sufficiently large prime factors; small-divisor information does not isolate the desired prime-factor parity or force both factors to be prime. Therefore the Selberg sieve establishes the correct upper-bound scale and the arithmetic local factors, but by itself does not prove a positive lower bound for twin primes, their infinitude, or the conjectured asymptotic.
The Selberg upper-bound sieve replaces a difficult coprimality indicator by a nonnegative square whose coefficients can be optimized. Let , and suppose a finite sequence has divisibility counts
where is multiplicative on squarefree integers and . Choose real Selberg sieve weights supported on with . If an entry has no prime factor in , its only weighted divisor is , so its indicator is bounded above by the square of the divisor sum. Summing gives
where . This is an upper bound regardless of the signs of the weights.
Here is the optimization. On the permitted squarefree integers put
The identity
can be checked one prime at a time: a prime in both and gives the factor . Thus
Finite Möbius inversion gives , and in particular the condition becomes . The Cauchy-Schwarz inequality now yields
Equality is attained by . Inverting again gives the explicit optimizing weights
They satisfy . To see this, multiply out . The numerator becomes the sum of over distinct permitted integers with and , a subset of the terms in . We therefore have a main term and a controllable remainder. This proves the basic Selberg sieve diagonalization and the useful bound on the weights, rather than merely asserting an optimized density.
Apply it to the polynomial for . If is the number of roots of modulo squarefree , the Chinese remainder theorem gives
Use , , and sieve the indices for which has no prime factor at most . The local weights are
We claim . The following truncated-product argument supplies the necessary lower bound. Put , and consider all squarefree integers on the primes at most , with total weight
Give such an integer probability . Prime inclusion is independent with probability , so
by the Mertens first theorem, absorbing the prime separately. For sufficiently large , this is at most . The Markov inequality shows that at least half of lies on , all of which are terms in .
Moreover, partial summation applied to the Mertens first theorem gives
Indeed it is , and the contribution of has a finite limiting constant with tail . Expanding the logarithm of now gives
The error is bounded since . Consequently , proving the claim. The exponent two reflects the two forbidden classes at almost every prime.
For the remainder use and the simple bound . Hence
The number of surviving indices is therefore
Every pair of primes with survives, since both its prime factors exceed . The exceptional pairs with number at most . With we obtain
This is the twin-prime upper bound from a quadratic sieve. The method constructs a majorant and bounds the sifted set; it does not give a positive lower bound for twin primes.
Let count primes for which is also prime. We prove using a quadratic Selberg sieve, then apply Abel summation.
For , each odd prime has exactly two roots modulo that prime. The Chinese remainder theorem gives the polynomial root density in a sieve
for odd squarefree integers . Put and choose the optimizing real Selberg sieve weights , supported on these , with . If are prime and , their weight is one. It is nonnegative for every other integer. Expanding the square therefore gives
The Selberg sieve diagonalization makes the main quadratic form , where
The optimal Selberg weights have modulus at most one. Since , the remainder is at most .
For completeness, the lower bound on is where the second logarithm enters. Restrict to primes and put . The full product is , since its logarithm is and the Mertens second theorem applies. Give the associated squarefree divisor probability . Prime inclusion probabilities are , so the Mertens first theorem gives
for large . The Markov inequality shows that at least half the weight has . This proves the truncated Euler-product lower bound . Consequently the twin-prime upper bound from a quadratic sieve is
Finally, Abel summation gives
The tail is dominated by . Thus reciprocal-sum convergence from a counting bound proves convergence of the first reciprocal sum. The second is smaller termwise. We have proved Brun's theorem:
Counting each twin prime just once changes at most a finite repetition and gives the same conclusion.
The remainders in the sieve distribution are defined by
Multiply the pointwise inequality from part (a) by and sum. Finite rearrangement gives
To identify the main quadratic form, put . For squarefree integers , multiplicativity gives
The second identity is also valid if or is not squarefree: both sides then vanish. Therefore the Selberg sieve diagonalization gives
This proves . Notice that the hypotheses do not force to vanish on non-squarefree integers; those coefficients simply make no contribution to this main quadratic form because .
Set , and restrict attention to the set of squarefree integers all of whose prime factors lie in . Coefficients indexed by non-squarefree integers do not affect , so they may be set to zero. Put
In particular, the normalizing sum runs to , as in the PDF; the converted TeX's is a transcription error. Define . The finite multiples version of Möbius inversion is
It follows by substituting the definition and using . Taking gives . Thus the Selberg sieve diagonalization and the Cauchy-Schwarz inequality give
Equality holds at , which satisfies the constraint. Inverting, and writing , yields
For set . The formula has and gives minimum .
To show these optimal Selberg weights have modulus at most one, fix . Each integer , with , and , is a distinct term of . The total weight of these terms is
It is at most , so the displayed formula gives . This proves the modulus bound without assuming that each factor is itself small.
For all interval origins , the number of multiples of any in is with an absolute error bound. The Selberg sieve diagonalization minimizes , subject to , at . The optimal Selberg weights have modulus at most one, so the total remainder is . Restoring the at most small primes gives . Take and use the Selberg sieve denominator asymptotic. The resulting is independent of .