Small Gaps: the GPY Method

The primes thin out as you climb: near a large number x they land, on average, about \log x apart. So near x = 10^{100} the typical gap between consecutive primes is roughly 230. The obvious question — and a maddeningly hard one — is whether the primes ever crowd together far more tightly than that average, infinitely often, no matter how high you go.

In 2005 Daniel Goldston, János Pintz and Cem Yıldırım answered yes, and dramatically: there are infinitely many consecutive primes whose gap is an arbitrarily small fraction of the average. Their method — universally called GPY — didn't stop there. It came within a hair's breadth of the legendary bounded gaps conjecture, and it handed the field the exact machine that Yitang Zhang would push over the line in 2013. This page is about that machine.

The headline result

Write p_n for the n-th prime. The normalised gap is the actual gap divided by the average gap \log p_n. The Prime Number Theorem guarantees that these normalised gaps average out to 1. GPY proved that infinitely many of them are essentially 0.

Read the first line carefully. It does not say the gaps are bounded — only that, relative to the slowly growing yardstick \log p_n, they become negligibly small infinitely often. Getting from "vanishingly small compared to \log p_n" to "bounded by a fixed constant" is the entire drama of the next decade, and it hinges on one number, \theta, that we'll meet shortly.

Admissible tuples: the shape you hunt in

You cannot ask primes to be exactly 1 apart forever — after 2,3 one of any two consecutive integers is even. So GPY hunts inside a fixed pattern of offsets \mathcal{H} = \{h_1, h_2, \dots, h_k\} and asks how many of n+h_1,\dots,n+h_k are simultaneously prime.

The pattern must be admissible: for every prime p, the offsets h_i must miss at least one residue class mod p — otherwise p divides one of the n+h_i every single time and the tuple can be all-prime only finitely often. For example \{0, 2, 6\} is admissible; \{0, 2, 4\} is not (one of three consecutive odd numbers is always a multiple of 3).

GPY's more modest goal: show that at least 2 of the k entries are prime infinitely often. Two primes inside a tuple of diameter H = h_k - h_1 means a prime gap of at most H — a bounded gap, if only the argument can be made to close.

The sieve idea: weigh, don't count

Here is the master stroke. Instead of trying to detect primes directly, attach a non-negative weight w(n) \ge 0 to each n — a weight that is large exactly when the tuple looks prime-rich — and compare two sums over a long range N < n \le 2N:

S_1 = \sum_{n} w(n), \qquad S_2 = \sum_{n} \left(\sum_{i=1}^{k}\mathbf{1}_{\,n+h_i\ \text{prime}}\right) w(n).

S_2 is a weighted count of primes appearing in the tuple; S_1 is just the total weight. Now the punchline: if we can prove

S_2 > \rho\, S_1 \quad\text{for some threshold } \rho,

then on average each weighted n carries more than \rho primes in its tuple. If \rho \ge 1, some n must have \ge 2 primes (you can't average above 1 with everything at 0 or 1) — and there is your bounded gap. If we can only reach \rho \to 0^+, we still force gaps far below \log p_n, which is exactly the "liminf = 0" result. Everything comes down to how large a ratio S_2/S_1 the weights can achieve.

Selberg-type weights on the tuple

What weight makes the tuple "look prime-rich"? Recall the Selberg sieve: to detect integers with few prime factors you take a squared linear form in divisors, \left(\sum_{d} \lambda_d\right)^2, which is automatically non-negative and whose \lambda_d you are free to optimise. GPY apply this to the product P(n) = (n+h_1)(n+h_2)\cdots(n+h_k):

w(n) = \left(\ \sum_{\substack{d \mid P(n) \\ d \le R}} \lambda_d\ \right)^{\!2}, \qquad \lambda_d = \mu(d)\,F\!\left(\frac{\log(R/d)}{\log R}\right).

The truncation level R caps the divisors — no d beyond R is allowed — and the smooth profile F turns the sharp cutoff into a graceful taper. GPY's inspired choice is a pure power,

\lambda_d = \mu(d)\,\frac{1}{(k+\ell)!}\left(\log\frac{R}{d}\right)^{k+\ell},

where \ell \ge 1 is an extra tuning parameter (the "GPY twist" — earlier sieves used \ell = 0). Larger \ell shifts weight toward divisor-poor n — precisely the prime-rich ones. Optimising over k and \ell is what squeezes the ratio S_2/S_1 upward.

Two reasons, and they are the whole reason Selberg's idea works. First, a square is never negative, so w(n)\ge 0 automatically and the sums S_1, S_2 are honest weighted counts — no cancellation to police. Second, the \lambda_d are completely free: unlike the rigid \pm1 of the Möbius/inclusion–exclusion sieve, you may choose them to maximise the ratio you care about, then read off the optimum from a calculus-of-variations problem. Freedom plus positivity is the entire trick.

Seeing the weight profile

The magnitude |\lambda_d| depends only on u = \log d / \log R, the "size" of the divisor on a logarithmic scale from 0 (tiny d) to 1 (d at the cutoff R). Since \log(R/d) = (1-u)\log R, the profile is proportional to (1-u)^{\,k+\ell}: a smooth bump that is full weight for small divisors and tapers gently to zero at the cutoff. Raising the exponent k+\ell pushes the emphasis ever harder toward the smallest divisors.

The key point is smoothness at the edge: a hard cutoff would inject error terms that swamp the main term, but this polynomial taper vanishes to high order at u=1, keeping the sieve's error under control. That control is what lets the delicate main-term calculation of S_2/S_1 go through at all.

The level of distribution θ — where it all lives or dies

Evaluating S_2 means counting primes in the tuple across arithmetic progressions to many moduli d \le R, and averaging the error. How large can we take R before those errors spoil everything? That ceiling is the level of distribution \theta: we may use moduli up to R = N^{\theta - \varepsilon} with acceptable error on average.

The GPY analysis shows the sieve forces two primes into the tuple whenever the level exceeds a threshold. Schematically, the optimised ratio behaves like

\frac{S_2}{S_1} \;\approx\; \frac{2\theta}{1}\cdot\big(1 - o(1)\big)\quad\text{(as } k\to\infty),

so the method delivers \ge 2 primes — a bounded gap — once 2\theta > 1, i.e. \theta > 1/2. And here is the heartbreak: Bombieri–Vinogradov gives exactly \theta = 1/2. GPY land precisely on the boundary 2\theta = 1 — enough to make the ratio tend to 1 and prove the normalised liminf is 0, but not to cross strictly above and clinch a fixed bound. Any \theta = 1/2 + \delta would instantly give bounded gaps — which is the conditional \le 16 under Elliott–Halberstam.

Worked example: how θ enters the threshold

Let's watch the threshold move. Take an admissible k-tuple and the optimised GPY weight. The expected number of primes per tuple, weighted, comes out (heuristically) as a ratio of two beta-type integrals whose net effect is

\rho(k,\theta) \;\approx\; 2\theta\left(1 - \frac{1}{k}\right)\cdot\frac{1}{1 + \tfrac{1}{2\ell+1}}\Big|_{\text{optimal }\ell} \;\longrightarrow\; 2\theta \quad (k,\ell\to\infty).

You don't need the exact constants — watch the mechanism:

So the entire bounded-gaps problem, after GPY, was reduced to one clean target: beat \theta = 1/2, even by a whisker, for primes in arithmetic progressions. Zhang's 2013 triumph was doing exactly that — establishing a Bombieri–Vinogradov-type estimate past 1/2 for smooth moduli — with the GPY sieve otherwise unchanged.

The single most common misreading: "GPY proved primes come within a fixed distance infinitely often." They did not. Unconditionally, GPY proved only the normalised statement \liminf (p_{n+1}-p_n)/\log p_n = 0 — the gaps are tiny compared to the growing average \log p_n, which itself tends to infinity. The actual gaps they exhibit still grow without bound; they are just a vanishing fraction of typical.

A genuine bounded gap (some fixed H with p_{n+1}-p_n \le H infinitely often) came out of GPY only conditionally, assuming Elliott–Halberstam gives level \theta > 1/2. The unconditional bounded-gaps theorem waited until 2013 and needed Zhang's extra input — a hard-won level of distribution past 1/2 — on top of the GPY machine. The lesson: with these weights, everything rides on \theta, and \theta = 1/2 sits exactly on the knife-edge.

Before GPY, the best unconditional result (Maier, 1988) shaved the constant only to about 0.2486\log p_n — small, but a fixed positive fraction. Dropping the fraction all the way to 0 had resisted everyone for decades. When Goldston, Pintz and Yıldırım announced it, the proof initially had a gap of its own; a corrected, streamlined argument followed. The final version was so clean that it fit in a short paper — and it laid out a machine so modular that, once Zhang supplied the missing \theta > 1/2 ingredient, the Polymath project and then Maynard and Tao could crank the bounded-gap constant down from Zhang's 70{,}000{,}000 to 246 in barely a year. Few results have been so quickly consequential.