A Very Large Prime

On 12 October 2024, a retired NVIDIA engineer named Luke Durant announced that he had found the 52nd known Mersenne prime. The number is $2^{136{,}279{,}841} - 1$, and writing it out in decimal requires 41,024,320 digits. Durant had organised a cloud network of GPU servers spread across 17 countries — essentially repurposing the hardware that normally trains language models to instead do modular arithmetic on numbers with tens of millions of digits. The verification alone took about 51 days of computation.

This is the kind of thing that makes headlines, and it deserves them. Mersenne primes are rare and verifying them is genuinely hard. But if I am honest, the more interesting prime story of the last half-century is not about the record-breaking number. It is about a conversation over tea in Princeton in 1972, and the increasingly hard-to-dismiss suspicion that the prime numbers are, in a precise statistical sense, quantum energy levels.

When I say “quantum energy levels,” I mean it almost literally — not as a metaphor. Let me explain.

The Riemann Zeta Function Encodes the Primes

Start with the most famous function in number theory. For $\operatorname{Re}(s) > 1$, the Riemann zeta function is defined by the series

$$\zeta(s) = \sum_{n=1}^{\infty} \frac{1}{n^s}.$$

This converges nicely and defines an analytic function. But the real reason to care about it is Euler’s product formula:

$$\zeta(s) = \prod_{p \text{ prime}} \frac{1}{1 - p^{-s}}.$$

This is not obvious — it follows from unique prime factorisation, essentially — but its implications are enormous. The product runs over all primes, and each prime contributes a factor. The primes are encoded in the analytic structure of $\zeta$. If you know $\zeta$, you know the primes; if you understand the zeros of $\zeta$, you understand their distribution.

Riemann’s 1859 paper made this explicit (Riemann, 1859). He showed that $\zeta$ extends analytically to the whole complex plane (minus a simple pole at $s = 1$), and he wrote down an explicit formula connecting the prime-counting function

$$\pi(x) = \#\{p \leq x : p \text{ prime}\}$$

to the zeros of $\zeta$. The formula is

$$\pi(x) \approx \operatorname{Li}(x) - \sum_{\rho} \operatorname{Li}(x^{\rho}) + \text{(lower-order terms)},$$

where $\operatorname{Li}(x) = \int_2^x \frac{dt}{\ln t}$ is the logarithmic integral and the sum runs over the non-trivial zeros $\rho$ of $\zeta$.

What are the non-trivial zeros? The zeta function has trivial zeros at the negative even integers $-2, -4, -6, \ldots$ — boring, understood. The non-trivial zeros lie in the critical strip $0 < \operatorname{Re}(s) < 1$, and their imaginary parts are what drive the oscillatory corrections to $\pi(x)$. Each zero $\rho = \frac{1}{2} + it_n$ contributes a term that oscillates like $x^{1/2} \cos(t_n \ln x)$. The prime distribution is a superposition of these oscillations, one per zero.

The Riemann Hypothesis is the claim that all non-trivial zeros lie on the critical line $\operatorname{Re}(s) = \frac{1}{2}$. It has been verified numerically for the first $10^{13}$ zeros (Gourdon, 2004; building on earlier high-height computations by Odlyzko, 1987). It has not been proved. It remains, after 165 years, the most important unsolved problem in mathematics.

Tea with Dyson

In 1972, Hugh Montgomery was visiting the Institute for Advanced Study in Princeton. He was working on a specific question: if you take the imaginary parts of the non-trivial zeros of $\zeta$ and normalise them so that their mean spacing is 1, what is the distribution of spacings between them?

More precisely, he was computing the pair correlation function of the normalised zeros. If $\tilde{\gamma}_n$ are the normalised imaginary parts (ordered $\tilde{\gamma}_1 \leq \tilde{\gamma}_2 \leq \cdots$), the pair correlation function $R_2(r)$ measures the density of pairs $(\tilde{\gamma}_m, \tilde{\gamma}_n)$ with $\tilde{\gamma}_n - \tilde{\gamma}_m \approx r$.

Montgomery found — subject to certain assumptions about the behaviour of $\zeta$ — that

$$R_2(r) = 1 - \left(\frac{\sin \pi r}{\pi r}\right)^2.$$

(Montgomery, 1973)

He mentioned this to Freeman Dyson over tea. Dyson — who had spent years on quantum mechanics and random matrix theory — recognised the formula immediately. That expression, $1 - (\sin \pi r / \pi r)^2$, is exactly the pair correlation function of eigenvalues of random matrices drawn from the Gaussian Unitary Ensemble.

Montgomery had not been thinking about quantum mechanics. Dyson had not been thinking about primes. The formula matched.

The Gaussian Unitary Ensemble

Let me say a few words about where that formula comes from in physics, because it is not obvious.

The Gaussian Unitary Ensemble (GUE) is a probability distribution over $N \times N$ Hermitian matrices. Specifically, it is the distribution proportional to $e^{-\operatorname{tr}(H^2)}$ on the space of Hermitian matrices, which is invariant under conjugation $H \mapsto U H U^\dagger$ for any unitary $U$. The entries on the diagonal are real Gaussians; the off-diagonal entries are complex Gaussians with independent real and imaginary parts.

In the limit $N \to \infty$, the eigenvalues of a GUE matrix distribute globally according to Wigner’s semicircle law. But the local statistics — the fine-grained distribution of spacings between nearby eigenvalues — follow a universal law. The pair correlation function is

$$R_2^{\text{GUE}}(r) = 1 - \left(\frac{\sin \pi r}{\pi r}\right)^2.$$

This distribution has a crucial qualitative feature called level repulsion: as $r \to 0$, $R_2(r) \to 0$. Eigenvalues of random Hermitian matrices strongly avoid each other. A Poisson distribution — which is what you would get for eigenvalues that were statistically independent — would give $R_2(r) = 1$ everywhere, with no such repulsion. The GUE formula suppresses small gaps quadratically: $R_2(r) \sim \pi^2 r^2 / 3$ for small $r$.

Why does GUE statistics arise in physics? This is the content of the Bohigas-Giannoni-Schmit conjecture (1984), which by now has overwhelming numerical support: quantum systems whose classical limit is chaotic and which lack time-reversal symmetry have energy level statistics described by the GUE. Systems with time-reversal symmetry fall into the Gaussian Orthogonal Ensemble (GOE), which has a different but related formula. Nuclear energy levels, quantum billiards with the right shapes, molecular spectra — all of them, when appropriately normalised, show GUE or GOE statistics.

The universality is the point. It does not matter what the specific Hamiltonian is. If the system is sufficiently chaotic, the eigenvalue statistics are universal.

Odlyzko’s Computation

Montgomery’s result was conditional and covered only a limited range of $r$. The natural next step was numerical verification: actually compute a large number of Riemann zeros and measure their pair correlation.

Andrew Odlyzko did exactly this, in a series of computations beginning in the 1980s. The results were striking (Odlyzko, 1987). He computed millions of zeros with high precision and compared their empirical pair correlation to the GUE prediction. The agreement was not merely qualitative — it was quantitatively exact, to within the statistical error of the sample.

Odlyzko then pushed further. He computed zeros near the $10^{20}$-th zero, far out on the critical line. Same statistics. He computed zeros near the $10^{22}$-th zero. Same statistics. The agreement held regardless of how far up the critical line one went. This is not a small-sample artifact and it is not coincidence, or at least it would be an extraordinary coincidence of a kind that mathematics has never before encountered.

The plots from Odlyzko’s computations are, in my view, some of the most beautiful images in mathematics. You draw the GUE prediction — a smooth curve, starting at zero, rising to approach 1 — and you overlay the empirical histogram from the Riemann zeros. They are the same curve.

Berry, Keating, and the Missing Hamiltonian

If the zeros of $\zeta$ are energy levels, there should be a Hamiltonian $H$ — a self-adjoint operator — whose spectrum is exactly $\{t_n\}$, the imaginary parts of the non-trivial zeros (assuming the Riemann Hypothesis, so that all zeros are of the form $\frac{1}{2} + it_n$).

In 1999, Michael Berry and Jon Keating proposed a candidate (Berry & Keating, 1999). Their suggestion was the classical Hamiltonian

$$H_{\text{cl}} = xp,$$

where $x$ is position and $p$ is momentum, quantized with appropriate symmetrization:

$$\hat{H} = \frac{1}{2}(\hat{x}\hat{p} + \hat{p}\hat{x}).$$

Classically, $H = xp$ describes a system in which the phase-space trajectories are hyperbolas $xp = E = \text{const}$, and the motion is $x(t) = x_0 e^t$, $p(t) = p_0 e^{-t}$ — exponential expansion in position, contraction in momentum. This is essentially the dynamics of an unstable fixed point, and it is classically chaotic in the appropriate sense.

The semiclassical (WKB) approximation gives an eigenvalue counting function

$$N(E) \approx \frac{E}{2\pi} \ln \frac{E}{2\pi} - \frac{E}{2\pi} + \frac{7}{8} + \cdots,$$

which matches Riemann’s formula for the number of zeros of $\zeta$ with imaginary part up to $T$:

$$N(T) = \frac{T}{2\pi} \ln \frac{T}{2\pi} - \frac{T}{2\pi} + \frac{7}{8} + O\!\left(\frac{\ln T}{T}\right).$$

This is not a coincidence: the correspondence is exact at the level of the smooth counting function. The hard part is the oscillatory corrections — and those require the specific eigenvalues, which requires knowing the boundary conditions.

The problem is that $\hat{H} = \frac{1}{2}(\hat{x}\hat{p} + \hat{p}\hat{x})$ as an operator on $L^2(\mathbb{R})$ is not bounded below and has a continuous spectrum, not a discrete one. Turning it into an operator with a discrete spectrum matching the Riemann zeros requires boundary conditions that have not been found. This is the crux: Berry and Keating have the right classical system, but the quantum boundary conditions are missing.

What would be profound about finding $\hat{H}$? If $\hat{H}$ is self-adjoint and bounded below ($\hat{H} \geq 0$), its eigenvalues are all non-negative real numbers. If those eigenvalues are the imaginary parts of the zeros, then all zeros have real part exactly $\frac{1}{2}$ — which is the Riemann Hypothesis. A proof of the existence of such a Hamiltonian would, in one stroke, resolve the most important open problem in mathematics.

Primes as Periodic Orbits: The Gutzwiller Analogy

The quantum chaos connection goes deeper than pair correlations. In semiclassical quantum mechanics, the Gutzwiller trace formula relates the density of quantum energy levels to a sum over classical periodic orbits:

$$d(E) = \bar{d}(E) + \sum_{\gamma} A_\gamma \cos\!\left(\frac{S_\gamma}{\hbar} - \phi_\gamma\right),$$

where the sum runs over all classical periodic orbits $\gamma$, $S_\gamma$ is the classical action of the orbit, $A_\gamma$ is an amplitude, and $\phi_\gamma$ is a phase (Maslov index correction). The smooth part $\bar{d}(E)$ comes from the Thomas-Fermi approximation; the oscillatory part encodes quantum interference between orbits.

The direct analogue in number theory is the explicit formula for the prime-counting function. Written as a formula for the oscillatory part of the zero-counting function, it reads

$$\psi(x) = x - \sum_{\rho} \frac{x^\rho}{\rho} - \ln(2\pi) - \frac{1}{2}\ln(1 - x^{-2}),$$

where $\psi(x) = \sum_{p^k \leq x} \ln p$ is the Chebyshev function and the sum is over non-trivial zeros $\rho$.

Comparing these two formulas term by term: the zeros $\rho$ of $\zeta$ play the role of the quantum energy levels $E_n$; the primes $p$ — and their prime powers $p^k$ — play the role of the classical periodic orbits $\gamma$. The “action” of the orbit corresponding to $p^k$ is $k \ln p$. The primes are the primitive periodic orbits; $p^k$ is the $k$-th traversal of that orbit.

This is not a metaphor or a loose analogy. The Selberg trace formula — developed for the Laplacian on hyperbolic surfaces — makes this correspondence rigorous in a related setting: the periodic geodesics on a hyperbolic surface play the role of primes, and the eigenvalues of the Laplacian play the role of Riemann zeros (Rudnick & Sarnak, 1996). The Riemann zeta function is the limit of a family of such systems, in some sense that is still being made precise.

I find it remarkable that the logarithms of primes — the most elementary sequence in arithmetic — appear as lengths of orbits in what would be a quantum chaotic system. Each prime contributes an oscillation to $\psi(x)$ with “frequency” proportional to its logarithm. You are, in a sense, hearing the primes as quantum interference.

This connects to a theme that comes up elsewhere on this blog. The falling cat problem involves Berry phase and geometric holonomy — again a situation where deep structure emerges from symmetry and topology. The Schrödinger cat in quantum computing involves the spectacular fragility of quantum coherence. The Riemann zeros are, if the conjecture is right, a quantum system that has never decohered — a perfectly coherent spectrum hiding inside the most ancient problem in mathematics.

A Brief Detour: Maynard and Primes Without Digits

While we are talking about primes, I cannot resist a detour through two results of James Maynard, who received the Fields Medal in 2022.

The first concerns bounded gaps. Euclid proved that there are infinitely many primes. The Twin Prime Conjecture says there are infinitely many pairs of primes $(p, p+2)$. This remains open. But in 2013, Yitang Zhang proved something extraordinary: there are infinitely many pairs of primes differing by at most 70,000,000 (Zhang, 2014). The bound is large, but the qualitative statement — that gaps between primes are bounded infinitely often — was completely new. Shortly thereafter, Maynard independently proved a much stronger result using the Maynard-Tao sieve: infinitely many prime pairs with gap at most 600 (Maynard, 2015). A crowdsourced effort (Polymath8b) brought the bound down to 246. The Twin Prime Conjecture remains open, but 246 is a long way from 70,000,000.

The second result is stranger. Maynard proved in 2016 that for any decimal digit $d \in \{0, 1, \ldots, 9\}$, there are infinitely many primes whose decimal representation contains no instance of $d$. There are infinitely many primes with no $7$ in their decimal expansion. There are infinitely many primes with no $3$. The proof uses techniques from analytic number theory, specifically exponential sum estimates and sieve methods, and the result holds not just for base 10 but for any base.

This is one of those results that sounds impossible on first hearing. Surely removing an entire digit should make most large numbers unavailable, so the primes run out? Not so. The density of such “digitless” numbers thins out, but not fast enough to eliminate infinitely many primes.

The 52nd Mersenne Prime and What We Do Not Know

Return to $M_{136{,}279{,}841} = 2^{136{,}279{,}841} - 1$. Mersenne primes have the form $2^p - 1$ where $p$ is a prime (though not all such numbers are prime — $2^{11} - 1 = 2047 = 23 \times 89$). They are tested via the Lucas-Lehmer primality test: define the sequence

$$s_0 = 4, \qquad s_{n+1} = s_n^2 - 2.$$

Then $M_p = 2^p - 1$ is prime if and only if $s_{p-2} \equiv 0 \pmod{M_p}$.

The test requires $p - 2$ squarings modulo $M_p$. Each squaring involves numbers with roughly $p$ digits, and modular reduction modulo $M_p = 2^p - 1$ is cheap because it reduces to bit-shifts. This is why GPU parallelism helps enormously: each squaring can be broken into many parallel multiplications of sub-blocks of digits. Durant’s cloud network was, in effect, a massively distributed modular arithmetic engine.

We do not know if there are infinitely many Mersenne primes. The heuristic Lenstra-Pomerance-Wagstaff conjecture says yes: the expected number of Mersenne primes $2^p - 1$ with $p \leq x$ is approximately

$$e^\gamma \ln x / \ln 2 \approx 1.78 \cdot \log_2 x,$$

where $\gamma \approx 0.5772$ is the Euler-Mascheroni constant. This predicts roughly logarithmic growth in the count — consistent with the 52 known examples — but is nowhere near proved.

The known Mersenne primes do not form a sequence with obviously regular gaps. The exponents $p$ are: 2, 3, 5, 7, 13, 17, 19, 31, 61, 89, 107, 127, … and then larger, less predictable values. Whether their distribution has GUE-like statistics is not a standard research question (the sample is too small), but the question of whether the primes $p$ for which $2^p - 1$ is prime have any special structure is an active one. For now, the answer is: we do not know.

Why This Matters, and Why It Does Not Prove Anything

Let me be precise about what has and has not been established.

What has been established:

  • Montgomery proved (conditionally, assuming a form of the generalised Riemann Hypothesis) that the pair correlation of Riemann zeros, for a certain range of $r$, is given by $1 - (\sin \pi r / \pi r)^2$.
  • Odlyzko verified numerically — to extraordinary precision, over billions of zeros — that the full empirical pair correlation matches the GUE prediction.
  • The Gutzwiller/Selberg analogy between periodic orbits and primes is mathematically precise in related settings (hyperbolic surfaces, function fields over finite fields).
  • Rudnick and Sarnak proved that the $n$-point correlation functions of Riemann zeros match GUE for all $n$, subject to a plausible conjecture about $\zeta$ (Rudnick & Sarnak, 1996).

What has not been established:

  • There is no known Hamiltonian $\hat{H}$ whose spectrum is the set of Riemann zeros.
  • The Riemann Hypothesis remains open.
  • There is no proof that the Montgomery-Odlyzko connection is anything more than an extraordinary numerical coincidence.

The broader context is the Langlands program — a still-hypothetical grand unification of number theory, algebraic geometry, and representation theory, sometimes described as a “grand unified theory of mathematics.” The Langlands correspondence predicts deep connections between $L$-functions (generalisations of $\zeta$) and representations of algebraic groups. The spectral interpretation of Riemann zeros — if it could be made precise — would fit naturally into this framework. Some researchers believe that a proof of the Riemann Hypothesis will come from the Langlands side, not from analytic number theory or quantum mechanics. Others think the quantum chaos connection is the right road. Nobody knows.

What would it mean if the connection is real? It would mean that the prime numbers — discovered by Euclid, studied for two and a half millennia, used today in every TLS handshake and RSA key — are the eigenvalues of a physical Hamiltonian. The abstract number-theoretic structure and the physical quantum mechanical structure would be not merely analogous but identical. That is a claim of the same depth as the unexpected appearance of the same partial differential equations in heat flow, diffusion, and Brownian motion: a discovery that what seemed to be different phenomena are manifestations of the same underlying law.

Or it could be a very surprising coincidence. Mathematics has a long history of producing such coincidences — the same numbers appearing in unrelated contexts for reasons that, when understood, turned out not to be coincidences at all. I suspect this is not a coincidence. But suspicion is not proof.

A Closing Reflection

I started this post with the 52nd Mersenne prime because it is the news item that prompted me to write. GPU clusters finding 41-million-digit primes are genuinely impressive technology. But I keep returning to the image of Montgomery and Dyson at tea in 1972, and the formula $1 - (\sin \pi r / \pi r)^2$ connecting two conversations that had nothing to do with each other.

I have spent some time with random matrix theory, and separately with the zeta function, and the thing that still strikes me is how clean the connection is. This is not a numerical coincidence of the form “these two quantities agree to 3 decimal places.” Odlyzko’s plots show agreement across many orders of magnitude, for zeros computed billions of entries into the sequence. The GUE curve and the empirical histogram are, visually, the same curve.

As someone trained as a physicist, I find this both encouraging and slightly unsettling. Encouraging because it suggests that the primes are not random — they have a structure, one that matches the eigenvalue repulsion of quantum chaotic systems, and that structure might be the key to proving the Riemann Hypothesis. Unsettling because it means that the quantum mechanical formalism — which I always thought was a description of a physical world — seems to be reaching into pure arithmetic, where there is no wave function, no Hilbert space, no measurement. The primes do not know they are supposed to be energy levels. And yet, statistically, they are.

If you find a flaw in this picture, or know of a result I have missed, I am genuinely interested. Peer review is welcome — open an issue on GitHub.


References

  • Riemann, B. (1859). Über die Anzahl der Primzahlen unter einer gegebenen Grösse. Monatsberichte der Berliner Akademie.

  • Montgomery, H. L. (1973). The pair correlation of zeros of the zeta function. Analytic Number Theory, Proc. Symp. Pure Math., 24, 181–193.

  • Odlyzko, A. M. (1987). On the distribution of spacings between zeros of the zeta function. Mathematics of Computation, 48, 273–308. DOI: 10.2307/2007890

  • Berry, M. V., & Keating, J. P. (1999). The Riemann zeros and eigenvalue asymptotics. SIAM Review, 41(2), 236–266. DOI: 10.1137/S0036144598347497

  • Zhang, Y. (2014). Bounded gaps between primes. Annals of Mathematics, 179(3), 1121–1174. DOI: 10.4007/annals.2014.179.3.7

  • Maynard, J. (2015). Small gaps between primes. Annals of Mathematics, 181(1), 383–413. DOI: 10.4007/annals.2015.181.1.7

  • Rudnick, Z., & Sarnak, P. (1996). Zeros of principal L-functions and random matrix theory. Duke Mathematical Journal, 81(2), 269–322. DOI: 10.1215/S0012-7094-96-08115-6

  • GIMPS (2024). 2^136279841-1 is Prime! Great Internet Mersenne Prime Search. Retrieved from https://www.mersenne.org/primes/?press=M136279841


Changelog

  • 2026-02-17: Corrected the date of the Montgomery-Dyson meeting from 1973 to 1972 (the paper was published in the 1973 proceedings volume, but the meeting at the IAS took place in April 1972).