The Riemann Zeta Gear-Wheel Machine
Cutting Brass Cams in Cambridge to Hunt Zeroes on the Critical Line
Spread across the carpet of Alan Turing's fellowship rooms at King's College, Cambridge in the summer of 1939 lay dozens of heavy, freshly milled bronze gear wheels and steel shafts. Visitors stepping around the metal parts assumed the mathematics don had taken up clockmaking or automobile repair. In fact, Turing was building an eighty-pound mechanical analog computer designed to test the deepest unsolved conjecture in pure mathematics. That conjecture was Bernhard Riemann's 1859 hypothesis on the distribution of prime numbers.
Riemann had shown that the density of prime numbers $2, 3, 5, 7, 11\dots$ is governed by the complex zeroes of the Riemann zeta function. For $\text{Re}(s) > 1$, the function is defined by the Dirichlet series $\zeta(s) = \sum_{n=1}^{\infty} n^{-s}$ and extended across the complex plane by analytic continuation. Riemann conjectured that every non-trivial zero of $\zeta(s)$ has real part equal to one-half, lying along the vertical critical line $s = \frac{1}{2} + it$. If even a single zero drifted off that line, the error term in the Prime Number Theorem would develop irregular oscillations.
At Cambridge and Oxford, G. H. Hardy, J. E. Littlewood, and E. C. Titchmarsh had spent decades studying the critical line. Using punched-card tabulating machines and Carl Ludwig Siegel's 1932 reconstruction of Riemann's unpublished notes, Titchmarsh had verified in 1935 and 1936 that the first 1,041 zeroes up to height $t = 1{,}468$ all sit strictly on the line $\text{Re}(s) = \frac{1}{2}$. Unlike Hardy, Turing suspected that the Riemann Hypothesis might actually be false once $t$ grew large enough. He wanted a fast machine to scan up to $t = 6{,}000$.
By rotating the phase of $\zeta(\frac{1}{2} + it)$ using the Riemann-Siegel theta function $\theta(t)$, one obtains the purely real-valued Hardy function $Z(t) = e^{i\theta(t)} \zeta(\frac{1}{2} + it)$. Sign changes of $Z(t)$ along the real axis pinpoint zeroes on the critical line. Under the Riemann-Siegel asymptotic expansion, evaluating $Z(t)$ reduces to summing a finite series of cosines:
$$Z(t) = 2 \sum_{n=1}^{m} \frac{\cos(\theta(t) - t \ln n)}{\sqrt{n}} + R(t)$$Here $m = \lfloor \sqrt{t / (2\pi)} \rfloor$ is the truncation cutoff and $R(t)$ is a small correction remainder. For $t$ up to $6{,}000$, the sum requires at most $m = 30$ trigonometric terms.
Summing thirty cosine waves of fixed frequencies $\ln n$ is mathematically identical to predicting ocean tides from lunar and solar harmonics. Recognizing that isomorphism, Turing modeled his calculator on Lord Kelvin's nineteenth-century tide-predicting machine housed at the Liverpool Tidal Institute. In March 1939, supported by Hardy and Titchmarsh, Turing won a forty-pound grant from the Royal Society. He teamed up with Cambridge engineering student Donald MacPhail to draft the mechanical blueprints.
Because the angular frequencies $\frac{\ln n}{2\pi}$ are irrational numbers, no pair of toothed gears can represent them exactly. Turing calculated optimal rational approximations using roughly eighty meshed bronze gear wheels arranged across thirty harmonic units so the axles rotated at rates matching $\ln 2, \ln 3, \dots, \ln 30$ to high precision. Each harmonic unit carried an eccentric pin weighted by $n^{-1/2}$ that pulled a continuous steel wire loop over pulleys, mechanically summing the thirty cosine displacements on a dial.
Before Turing could bolt the bronze gears into their steel frame, German troops invaded Poland in September 1939 and Turing reported to Bletchley Park. Eleven years later, in June 1950, he returned to the problem electronically on the Manchester Mark 1 computer, extending verification to the first 1,104 zeroes up to $t = 1{,}540$. To guarantee that numerical integration did not skip a closely spaced pair of zeroes, he derived the Turing method (published in 1953), which integrated the logarithmic shift across adjacent intervals to bound the exact total zero count $N(T)$. Although his thirty-unit brass calculator never turned a single shaft before war mobilization in September 1939, the analytic error bound Turing derived to certify zeroes across adjacent intervals remains the standard verification algorithm in computational number theory.