MathLabs

Combinatorics and discrete mathematics

The Green–Tao theorem

The primes contain arithmetic progressions of every finite length, proved in 2004.

IntuitionIntuition: structure inside a set that keeps thinning out

Primes get rarer and rarer: among the first NN integers only about N/log⁡NN/\log N are prime, a fraction that shrinks to 0 as NN grows. Szemerédi's theorem needs a positive fraction to guarantee arithmetic progressions, so it says nothing about the primes directly. Yet in 2004 Ben Green and Terence Tao proved that the primes contain arithmetic progressions of every finite length anyway — three primes evenly spaced, then a hundred, then any number you like. The trick is not to abandon Szemerédi's theorem but to find a bigger, well-behaved set in which the primes sit with positive relative density, and transfer the density argument to that setting.

A point on the unit circle at angle theta, illustrating the phase e(theta p) that circle-method arguments track to detect whether primes correlate with a linear pattern — major arcs (near rationals with small denominator) versus minor arcs
The exponential sum S(θ)=∑p≤Ne(θp)S(\theta) = \sum_{p \le N} e(\theta p) over primes, tracing a point on the unit circle as θ\theta varies

UndergraduateStatement and why density zero is the obstacle

∀ k≥3, ∃ a,r>0:{a,a+r,…,a+(k−1)r}⊆P\forall\, k \ge 3,\ \exists\, a, r > 0 : \{a, a+r, \dots, a+(k-1)r\} \subseteq \mathcal{P}

This is the theorem: writing P\mathcal{P} for the set of primes, for every length kk there exist aa and rr such that {a,a+r,…,a+(k−1)r}\{a, a+r, \dots, a+(k-1)r\} are all prime. In fact Green and Tao prove more — the primes contain a positive relative density of kk-term progressions among all progressions of that length, not just at least one.

π(N)∼Nlog⁡N\pi(N) \sim \frac{N}{\log N}

Here π(N)\pi(N) counts primes up to NN, and the prime number theorem says π(N)∼Nlog⁡N\pi(N) \sim \frac{N}{\log N} — so the density of primes among {1,…,N}\{1,\dots,N\} tends to 0. Szemerédi's theorem, which needs a fixed positive density, therefore cannot be applied to P\mathcal{P} directly: a genuinely new argument was needed.

Existence versus explicit computation
AspectWhat is knownSource / year
Existence for every length kkProved: P\mathcal{P} contains a kk-term progression for every kkGreen–Tao, 2004
Longest one explicitly found27 primes in arithmetic progression, found by distributed computer searchPrimeGrid, 2019

AdvancedProof idea: transference to a pseudorandom majorant

For every k≥3k \ge 3, the set P\mathcal{P} of primes contains a kk-term arithmetic progression; moreover P\mathcal{P} has positive relative density among such progressions, not merely a single example.

Why is it true?

The obstacle is density zero, so the theorem cannot follow from Szemerédi's theorem applied to P\mathcal{P} directly. Green and Tao's insight was that Szemerédi-type density arguments still work for a set of relative density inside a larger, sufficiently pseudorandom set — even if that set is itself sparse in Z\mathbb{Z} — as long as the ambient set behaves randomly enough for counting arguments to carry over.

Proof

Step 1 (the obstruction). The von Mangoldt function Λ(n)\Lambda(n) (equal to log⁡p\log p when n=pjn=p^j and 0 otherwise) is the natural weight for detecting primes, with average size E[Λ]≈1\mathbb{E}[\Lambda] \approx 1. But Λ\Lambda itself is not bounded, and P\mathcal{P} has density 0, so no classical density theorem applies to it directly.

Step 2 (a pseudorandom majorant). Using ideas from Goldston–Yıldırım-type sieve weights, Green and Tao construct a measure ν(n)≥0\nu(n) \ge 0 with E[ν]≈1\mathbb{E}[\nu] \approx 1 that dominates the primes, Λ(n)≤Kν(n)\Lambda(n) \le K\nu(n) for a constant KK, and that is pseudorandom: it satisfies precise linear-forms and correlation conditions modeled on what a genuinely random set of the same density would satisfy.

Step 3 (relative Szemerédi theorem). Green and Tao prove that any function 0≤f≤ν0 \le f \le \nu with positive relative density, E[f]≥δ\mathbb{E}[f] \ge \delta, still contains the expected density of kk-term progressions, provided ν\nu is pseudorandom. The proof decomposes ff into a bounded, structured part plus a part that is small in the Gowers uniformity norms relative to ν\nu; the uniform part contributes negligibly to the progression count by a generalized von Neumann theorem, so the structured part alone must already account for the expected progressions — exactly as in the classical hypergraph-regularity proof of Szemerédi's theorem, but relativized to ν\nu.

Step 4 (putting it together). Verifying that the Goldston–Yıldırım-type ν\nu really is pseudorandom (checking the linear-forms and correlation conditions using standard prime-counting estimates) lets Step 3 apply to f=Λ/Kf = \Lambda / K, which has positive relative density since E[Λ]≈1\mathbb{E}[\Lambda] \approx 1. This yields a positive relative density of kk-term progressions weighted by Λ\Lambda, and hence — after removing the negligible contribution from prime powers — an honest kk-term progression of primes, for every kk.

There are infinitely many 3-term arithmetic progressions of primes; in fact the number of such progressions with all terms ≤N\le N is asymptotically c N2/log⁡3Nc \, N^2/\log^3 N for an explicit constant c>0c>0.

Why is it true?

This special case predates Green–Tao by 65 years and was settled by van der Corput in 1939 using the Hardy–Littlewood circle method directly on the primes, with no need for the transference machinery required for general kk. It shows why k=3k=3 was long tractable by classical analytic number theory while longer progressions were completely open until 2004.

Proof

Step 1 (weighted count via exponential sums). Write S(θ)=∑n≤NΛ(n)e(θn)S(\theta) = \sum_{n \le N} \Lambda(n) e(\theta n). The weighted count of 3-term progressions p1+p3=2p2p_1 + p_3 = 2p_2 with all terms ≤N\le N equals ∫01S(θ)2S(−2θ) dθ\int_0^1 S(\theta)^2 S(-2\theta) \, d\theta by orthogonality of the exponential.

Step 2 (major arcs). Near rationals θ≈a/q\theta \approx a/q with qq small, S(θ)S(\theta) is well approximated using the prime number theorem in arithmetic progressions; summing these contributions gives the Hardy–Littlewood main term S(N) N2/log⁡3N\mathfrak{S}(N) \, N^2 / \log^3 N, where the singular series S(N)\mathfrak{S}(N) is a positive constant depending only on local (mod qq) densities of primes.

Step 3 (minor arcs). Away from rationals with small denominator, Vinogradov's estimates bound S(θ)S(\theta) by O(N(log⁡N)−A)O(N (\log N)^{-A}) for any fixed AA, using cancellation in the sum over primes; integrating this bound over the minor arcs shows their total contribution is o(N2/log⁡3N)o(N^2/\log^3 N) — negligible next to the major-arc main term.

Step 4 (conclusion). Since the major-arc main term S(N) N2/log⁡3N\mathfrak{S}(N)\,N^2/\log^3 N dominates the negligible minor-arc error, the weighted count of 3-term progressions grows like N2/log⁡3N→∞N^2/\log^3 N \to \infty, so there are infinitely many (and asymptotically many) 3-term arithmetic progressions of primes — a full 65 years before the general case was settled.

UndergraduateReal-World Applications and Worked Examples

The transference principle invented for this proof — moving a theorem from dense sets to sparse sets that sit inside a pseudorandom majorant — became a general tool used far beyond arithmetic progressions in primes: it underlies Tao and Ziegler's 2008 extension to polynomial progressions in the primes, informs the sieve-theoretic machinery behind the bounded-gaps-between-primes breakthroughs of Zhang and Maynard, and has analogues in theoretical computer science (dense-model theorems, pseudorandomness, and complexity-theoretic regularity). On the computational side, distributed search projects such as PrimeGrid use the primorial-divisibility constraint that comes out of the local factors in the theorem to narrow the search space by many orders of magnitude when hunting for record-length progressions.

Example: A 5-term arithmetic progression of primes, and why its difference is a multiple of 6

Verify that 5,11,17,23,295, 11, 17, 23, 29 is a 5-term arithmetic progression of primes, and explain why any 5-term progression of primes starting at a prime a>5a > 5 must have common difference rr divisible by 30=2⋅3⋅530 = 2 \cdot 3 \cdot 5.

Solution

Step 1: the consecutive differences of 5,11,17,23,295, 11, 17, 23, 29 are all 66, and each of the five numbers has no divisor up to its square root (≤5\le 5), so all five are prime — a genuine 5-term progression with a=5,r=6a=5, r=6.

Step 2: for any prime p≤5p \le 5 (so p∈{2,3,5}p \in \{2,3,5\}), if p∤rp \nmid r then as jj runs from 0 to 4 the five terms a+jra + jr run through at least pp distinct residues modulo pp, so one of them is divisible by pp.

Step 3: if a>5a > 5, all five terms are strictly greater than pp, so a term divisible by pp would be composite — impossible. Hence p∣rp \mid r for each p∈{2,3,5}p \in \{2,3,5\}, i.e. 30∣r30 \mid r. (In 5,11,17,23,295,11,17,23,29 the progression starts at a=5a=5 itself, which is allowed to be divisible by 5, so only 2⋅3=6∣r2 \cdot 3 = 6 \mid r is required there.)

Example: The record 27-term progression of primes and why 23# appears in its step size

The longest explicitly known arithmetic progression of primes has 27 terms, found by Rob Gahan and PrimeGrid in 2019: 224584605939537911+81292139⋅23#⋅n224584605939537911 + 81292139 \cdot 23\# \cdot n for n=0,1,…,26n = 0, 1, \dots, 26, where 23#=2⋅3⋅5⋯23=22309287023\# = 2 \cdot 3 \cdot 5 \cdots 23 = 223092870 is the primorial of 23. Explain why the common difference must be a multiple of 23#23\#.

Solution

Step 1: let p≤23p \le 23 be any prime, and suppose pp did not divide the common difference rr. Since 27≥p27 \ge p, the 27 terms a+nra + nr for n=0,…,26n=0,\dots,26 would run through all pp residue classes modulo pp, so at least one term would be divisible by pp.

Step 2: all 27 terms in this progression are 18-digit numbers, far larger than 23, so any term divisible by p≤23p \le 23 would be composite — impossible.

Step 3: therefore every prime p≤23p \le 23 must divide rr, which means the product of all primes up to 23 — the primorial 23#=22309287023\# = 223092870 — divides rr. Building 23#23\# into the step size from the start is how computer searches restrict to candidates that automatically pass every small-prime divisibility test.

What does the Green–Tao theorem prove about the set P\mathcal{P} of prime numbers?

Why couldn't Szemerédi's theorem be applied directly to the primes, and what replaces the missing density hypothesis in Green–Tao's proof?

If a,a+r,…,a+4ra, a+r, \dots, a+4r is a 5-term arithmetic progression of primes with a>5a > 5, what must divide the common difference rr?

As of 2026, what is the length of the longest explicitly known arithmetic progression of primes, and why haven't much longer ones been written down?

References

  1. Ben Green, Terence Tao (2008). The primes contain arbitrarily long arithmetic progressions · arXiv:math/0404188
  2. Terence Tao, Tamar Ziegler (2008). The primes contain arbitrarily long polynomial progressions · arXiv:math/0610050
  3. David Conlon, Jacob Fox, Yufei Zhao (2015). A relative Szemerédi theorem · arXiv:1305.5440