Brun's Sieve and the Twin-Prime Constant
The the Legendre sieve
is exact — it counts the numbers up to x with no small prime factor by a
full inclusion–exclusion — and that exactness is precisely its downfall. Legendre's identity has one
term for every squarefree product of the sieving primes: past a modest cut-off there are
exponentially many of them, and their tiny rounding errors, each of size O(1),
pile up into an error term that dwarfs the main term. The sieve is correct and useless at the same
time.
In 1915 Viggo Brun, a young Norwegian, found the way out — and with it opened
modern sieve theory. His idea is almost embarrassingly simple: don't run the whole
inclusion–exclusion. Stop early. If you truncate the alternating sum at the right place you no
longer get an equality, but you get a valid inequality — an upper bound if you stop after an
even layer, a lower bound after an odd one — while keeping only a controllable number of terms. Brun
turned an unusable identity into a pair of usable one-sided estimates, and used them to prove the
first great theorem about twin primes.
The insight: truncated inclusion–exclusion
Recall the shape of inclusion–exclusion. To count how many n \le x avoid a
set of "bad" events A_1, A_2, \dots, A_r (say, divisibility by each sieving
prime), you write
\Big|\,\overline{A_1}\cap\cdots\cap\overline{A_r}\,\Big| = |U| - \sum |A_i| + \sum_{i
The partial sums of this expression overshoot and undershoot the true answer alternately.
Stop after the +\sum|U|-\sum|A_i| layer and you have a lower bound; add
back the pairwise +\sum|A_i\cap A_j| layer and you have an upper bound; and
so on. These are the Bonferroni inequalities, and they hold for any events
whatsoever, with no arithmetic assumed.
- Truncating inclusion–exclusion after an even number of layers gives an upper bound for the count of surviving elements;
- truncating after an odd number of layers gives a lower bound;
- both bounds are valid unconditionally — they are combinatorial identities about finite sets, not facts about primes.
Brun's combinatorial sieve keeps only those terms
|A_{i_1}\cap\cdots\cap A_{i_b}| with b below a
chosen level b_0. If the sieving primes are all below
z, the number of surviving terms is roughly
O\!\big(\pi(z)^{b_0}\big) = O(z^{b_0}) — polynomial in
z, not exponential. Each term still carries an
O(1) rounding error, so the total error is a manageable
O(z^{b_0}). Choose b_0 and
z in balance and the error stays smaller than the main term. That
is the whole trick: sacrifice equality for a truncation you can afford to carry.
The headline result: twin primes are rare
Let \pi_2(x) count the twin primes up to
x — the primes p \le x with
p+2 also prime. Apply the truncated sieve to the sequence
n(n+2) (a twin pair survives exactly when neither n
nor n+2 has a small prime factor), and Brun's upper bound delivers:
- The number of twin primes up to x satisfies \pi_2(x) = O\!\left(\dfrac{x}{(\log x)^2}\right);
- this is the correct order of magnitude — it matches the Hardy–Littlewood prediction \pi_2(x)\sim 2\Pi_2\, x/(\log x)^2 up to the constant factor.
The single primes have density \sim 1/\log x; asking for two
primes at a fixed offset multiplies in a second, roughly independent, factor of
1/\log x, giving 1/(\log x)^2. Brun's sieve
makes that heuristic rigorous as an upper bound — a genuinely stronger statement than
\pi(x) = O(x/\log x), because the extra logarithm is exactly what pins
twins down as a thin subset of an already thin set.
Brun's theorem: the reciprocals converge
Now the jewel. Euler proved that the primes are, in a precise sense, "not too rare": the sum of their
reciprocals diverges,
\sum_{p\ \text{prime}} \frac1p = \frac12 + \frac13 + \frac15 + \frac17 + \frac1{11} + \cdots = \infty,
creeping to infinity like \log\log x. If the twin primes were "as common"
as the primes, their reciprocal sum would diverge too. Brun showed it does not.
- Summing over every twin-prime pair, the series of reciprocals converges:
- \displaystyle B_2 = \Big(\tfrac13+\tfrac15\Big) + \Big(\tfrac15+\tfrac17\Big) + \Big(\tfrac1{11}+\tfrac1{13}\Big) + \Big(\tfrac1{17}+\tfrac1{19}\Big) + \cdots < \infty;
- its value is Brun's constant B_2 \approx 1.902160\ldots
Convergence follows immediately from the counting bound. Because
\pi_2(t) = O\!\big(t/(\log t)^2\big), a partial-summation (Abel summation)
of \sum 1/p over twins compares to the integral
\int_2^\infty \frac{1}{t}\,\frac{dt}{(\log t)^2} = \left[\,-\frac{1}{\log t}\,\right]_2^\infty = \frac{1}{\log 2} < \infty,
which is finite — the extra power of \log t in the denominator is exactly
what turns a divergent sum into a convergent one. So the twin primes are, in Euler's sense,
sparse: there are few enough of them that even the sum of their reciprocals settles
to a finite number.
Worked example: divergence versus convergence, side by side
Nothing makes the contrast vivid like watching the two partial sums grow. First, all primes. The sum
\sum_{p\le N} 1/p grows without bound, but agonisingly slowly — like
\log\log N:
| N | \sum_{p\le N}\tfrac1p (all primes) |
| 10 | 1.176 |
| 100 | 1.803 |
| 10^3 | 2.198 |
| 10^6 | 2.887 |
| 10^9 | 3.293 |
| \to\infty | \to\infty (diverges) |
It is in no hurry, but it never stops climbing: pick any ceiling and the sum eventually passes it.
Now the twin primes. The partial sum B_2(N)=\sum_{p,\,p+2\ \text{twin},\ p\le N}(\tfrac1p+\tfrac1{p+2})
instead flattens out, hugging its limit ever more closely:
| N | B_2(N) (twin primes) |
| 10 | 1.238 |
| 100 | 1.518 |
| 10^3 | 1.618 |
| 10^6 | 1.710 |
| 10^{15} | 1.902\ldots |
| \to\infty | \to B_2 \approx 1.902 (converges) |
Same kind of series — reciprocals of primes — but a completely different fate. The all-primes sum
wanders off to infinity; the twin sum converges. The difference is entirely a matter of
density: primes thin out like 1/\log x, slowly enough to keep the
sum alive, while twins thin out like 1/(\log x)^2, just fast enough to kill
it. Brun's constant is the finite number the twin sum settles on.
Seeing it: the twin-prime counting function
Brun's sieve gives the order x/(\log x)^2; the Hardy–Littlewood
conjecture supplies the missing constant. Below, the exact twin-prime staircase
\pi_2(x) (sieve-computed) is shadowed by the smooth prediction
2\Pi_2\, x/(\log x)^2. The fit is already close for small
x and improves as you go — exactly what "correct order, correct constant"
looks like.
The staircase jumps by one at each twin prime p (the smaller of a pair)
and is flat between. Twins get scarcer as x grows — the steps spread out —
yet they never stop coming, at least as far as anyone has ever computed. Brun's theorem tells us they
thin fast enough for \sum 1/p over twins to converge; it says nothing about
whether the steps eventually stop.
The twin-prime constant 2\Pi_2
Where does the constant come from? The naive guess "1/\log x twice" would
give \pi_2(x)\approx x/(\log x)^2, but that treats "n
prime" and "n+2 prime" as independent events. They are not
independent: knowing n is odd already forces n+2
to be odd too, and similar correlations run through every prime. Hardy and Littlewood corrected the
heuristic prime-by-prime, and the corrections multiply into the
twin-prime constant:
2\Pi_2 = 2\prod_{p>2}\left(1 - \frac{1}{(p-1)^2}\right) \approx 1.32032\ldots
- The number of twin primes up to x is conjectured to satisfy \pi_2(x) \sim 2\Pi_2 \displaystyle\int_2^x \frac{dt}{(\log t)^2} \sim 2\Pi_2\,\dfrac{x}{(\log x)^2};
- the constant is 2\Pi_2 = 2\prod_{p>2}\big(1-(p-1)^{-2}\big) \approx 1.3203236;
- Brun's sieve proves the matching upper bound of this exact order; the asymptotic itself remains conjectural.
The factor 2 out front is the correction at the prime
2 (twins avoid one residue class mod 2 rather than the naive two), and each
factor 1-(p-1)^{-2} nudges for the odd prime p.
Because 2\Pi_2 \approx 1.32 > 1, twins are actually a little
more common than the crude independence guess — the correlations, on balance, help.
The single most tempting mis-reading of Brun's theorem is this: "the sum of twin-prime reciprocals is
finite, so there must be only finitely many twin primes." Wrong. A convergent series
can have infinitely many terms — \sum 1/n^2 = \pi^2/6 is finite with
infinitely many terms; so is \sum 1/2^n = 1. Convergence of
\sum(1/p + 1/(p+2)) is consistent with either a finite or an
infinite set of twins.
So Brun's constant being finite says nothing about whether the twins ever run out. It is a statement
about sparsity — twins are thin enough that their reciprocals sum to a finite value —
not about finiteness. The Twin Prime Conjecture (are there infinitely many?) is a completely
separate question, still open today. Zhang's 2013 bounded-gaps breakthrough and the descent to gap
246 chip at it from the other side; Brun's theorem, a century older, simply
does not address it.
Unlike \pi or e, Brun's constant
B_2 has no closed form and converges glacially: the tables above only reach
the first couple of digits even at N = 10^{15}, because the tail
\sum_{p>N} shrinks only like 1/\log N. Every
extra digit demands an astronomically larger twin search. Thomas Nicely's computations pushed the
estimate to B_2 \approx 1.90216058\ldots
And in 1994, while computing exactly this sum, Nicely's code kept disagreeing with theory at around
the tenth digit. The culprit was not mathematics but silicon: the infamous Pentium FDIV
bug, a flaw in Intel's floating-point divider. Brun's constant had accidentally uncovered a
hardware defect that cost Intel a $475 million recall — surely the most expensive bug ever caught by a
number theorist adding up reciprocals of twin primes.
Why Brun's sieve mattered
Brun's 1915–1919 work is the hinge between the ancient
sieve of Eratosthenes
(a device for listing primes) and sieve theory as a modern analytic tool (a device for
bounding how often patterns occur). The truncation idea — trade an exact identity you cannot
control for a truncated inequality you can — is the ancestor of every later sieve: the
Selberg sieve,
the large sieve, and the
GPY and Maynard sieves
that finally cracked bounded gaps between primes. Brun himself squeezed his method to prove that every
large even number is a sum of two integers each having at most nine prime factors — the first serious
assault on Goldbach's conjecture,
and the template for Chen's celebrated "prime plus almost-prime" theorem decades later.