Number

How evenly the fractions spread

List every fraction between nought and one with denominator at most n, in order. They spread across the interval almost evenly, and how fast the unevenness shrinks as n grows is — exactly, provably — the Riemann hypothesis. The link runs through a second fact: set the fractions round a circle and add them as arrows, and what is left is a whole number.

Worth reading first: Every fraction, exactly once · The function that sends fractions to binary.

Every fraction, exactly once built the rationals by mediants, and one of the things it produced along the way was the Farey sequence: every fraction between nought and one whose denominator is at most nn, reduced, in increasing order. For n=5n = 5 it is 15,14,13,25,12,35,23,34,45,11\tfrac15, \tfrac14, \tfrac13, \tfrac25, \tfrac12, \tfrac35, \tfrac23, \tfrac34, \tfrac45, \tfrac11. Neighbours in it have the property the Stern–Brocot tree is built on — bc−ad=1bc - ad = 1 for consecutive ab<cd\tfrac ab < \tfrac cd — and every later essay on the tree has used that property.

This essay asks a question the tree cannot see, because it is about all the fractions of one order at once: how evenly do they spread? There are NN of them in the interval, so if they were perfectly even the kk-th would sit at k/Nk/N. The figure below draws the forty-six fractions of order twelve beside forty-six evenly spaced points, and the bar under each is its misfit.

The 46 Farey fractions of order 12, and how far each strays from even spacing. Farey fractions of order 12 against 46 evenly spaced points, with the deviation of each drawn as a bar; largest deviation 0.0616.
Fig. 1 The Farey fractions of order twelve beside the same number of evenly spaced points, with a bar under each fraction for its misfit.

The fractions are nearly even. The misfits are largest near the ends, where fractions are sparse — the smallest is 112\tfrac1{12}, nowhere near 146\tfrac1{46} — and they change sign around the simple fractions in the middle. That picture has a remarkable property. How fast the total misfit shrinks as the order grows is not just related to the Riemann hypothesis, the most famous open problem in mathematics; it is equivalent to it. Jérôme Franel and Edmund Landau proved as much in 1924.

How many fractions there are

Before the unevenness, the count. A fraction a/ba/b with b≤nb \le n is in the Farey sequence exactly when it is in lowest terms, so the fractions with denominator bb number φ(b)\varphi(b) — the count of numerators below bb sharing no factor with it. The Farey sequence of order nn therefore has φ(1)+φ(2)+⋯+φ(n)\varphi(1) + \varphi(2) + \cdots + \varphi(n) terms.

How many Farey fractions there are, and π in the count. The number of Farey fractions of order n for n up to 400 against 3n²/π²; 48678 at n = 400.
Fig. 2 The number of Farey fractions of order n, for n up to 400, against the curve 3n2/π23n^2/\pi^2. At order 400 the count is within a fraction of a per cent of the curve: π appears because the chance that two whole numbers share no prime factor is 6/π26/\pi^2.

The count grows like 3n2/π23n^2/\pi^2, and π turns up for a reason with nothing circular about it. Of all pairs (a,b)(a, b) with b≤nb \le n, about half have a<ba < b, and a pair gives a reduced fraction when aa and bb share no prime factor. For each prime pp, the chance that both are divisible by pp is 1/p21/p^2, so the chance that they share none is the product over primes of 1−1/p21 - 1/p^2, which is 1/ζ(2)=6/π21/\zeta(2) = 6/\pi^2. Half of n2n^2 pairs, times 6/π26/\pi^2, is 3n2/π23n^2/\pi^2. The zeta function has entered the counting of fractions already, through its value at two; the Riemann hypothesis concerns where it vanishes, and the rest of this essay is about how that too is written into the fractions.

Franel’s sum

The total misfit is the sum of the bars’ lengths, ∑k∣fk−k/N∣\sum_k |f_k - k/N|, where fkf_k is the kk-th Farey fraction.

The Farey fractions' total misfit, growing like the square root of the order. Σ|fₖ − k/N| for Farey sequences of order 10, 20, 40, 80, 160, 320, 640, 1280: 0.519, 1.069, 1.345, 2.087, 2.625, 3.499, 4.213, 5.179; fitted log–log slope 0.447.
Fig. 3 The total misfit between the Farey fractions of order n and even spacing, for n from 10 to 1,280, on logarithmic scales. The points lie on a line of slope about one half: the total misfit grows like the square root of n.

At order five the sum can be done by hand. The ten fractions 15,14,13,25,12,35,23,34,45,11\tfrac15, \tfrac14, \tfrac13, \tfrac25, \tfrac12, \tfrac35, \tfrac23, \tfrac34, \tfrac45, \tfrac11 are compared with 0.1,0.2,…,1.00.1, 0.2, \ldots, 1.0, and the misfits are 0.10.1, 0.050.05, 0.0330.033, three noughts, then −0.033-0.033, −0.05-0.05, −0.1-0.1 and a final nought. They are symmetric — the Farey sequence is its own mirror image about one half — and they total 0.3670.367. Everything about the sum is visible already: large near the ends, nought in the middle stretch, and changing sign across the hole around 12\tfrac12.

As the order doubles, the number of fractions roughly quadruples and each misfit shrinks, and the total grows — at the rate of n\sqrt n, since the points on the log–log plot lie on a line of slope close to one half. Franel’s theorem says exactly what that slope is worth. The Riemann hypothesis is true if and only if the total misfit grows no faster than n1/2+εn^{1/2 + \varepsilon} for every ε>0\varepsilon > 0. A slope of one half, continued for ever, is the hypothesis; a slope that ever crept above one half, by any amount, at any scale, would refute it.

The figure shows the slope over orders up to 1,280, where the Farey sequence has about half a million terms. It says nothing about orders beyond that, and the hypothesis is a claim about all of them. But it shows the shape of the claim: an entirely elementary quantity, the unevenness of a list of fractions, measured with a ruler.

Landau’s sum

Landau gave a second version, with squares in place of absolute values.

Landau's sum of squared misfits, times the order, staying small. n·Σ(fₖ − k/N)² for Farey orders 10, 20, 40, 80, 160, 320, 640, 1280: 0.1931, 0.3722, 0.4171, 0.5285, 0.5672, 0.6125, 0.6172, 0.6312.
Fig. 4 The sum of the squared misfits, multiplied by the order n, for n from 10 to 1,280. The sum of squares shrinks about as fast as 1/n, so the product wanders but stays small; the Riemann hypothesis is equivalent to it growing more slowly than any power of n.

Squaring the misfits weights the large ones, near the ends and around the simple fractions, more heavily. The sum of squares shrinks roughly like 1/n1/n, and Landau’s form of the equivalence is that the Riemann hypothesis holds exactly when this sum is at most n−1+εn^{-1+\varepsilon} for every ε\varepsilon — when the product in the figure grows more slowly than any power of nn. It wanders, and stays below one throughout the range drawn.

The two forms say the same thing in different norms. What neither says is why unevenness of fractions should know about the zeros of a function of a complex variable. For that, a circle.

Holes around the simple fractions

The bars in the hero change sign around 12\tfrac12 and 13\tfrac13, and the reason is a gap that the Stern–Brocot tree explains exactly.

Next to 12\tfrac12 in the Farey sequence of order nn sit the fractions whose mediant construction reaches it first: k2k+1\tfrac{k}{2k+1} and k+12k+1\tfrac{k+1}{2k+1} with 2k+1≤n2k + 1 \le n. Their distance from 12\tfrac12 is 12(2k+1)\tfrac1{2(2k+1)}, about 12n\tfrac1{2n}. In general the nearest neighbours of a/ba/b are at distance about 1/(bn)1/(bn) — the neighbour property, bc−ad=1bc - ad = 1, fixes it — while the average gap between Farey fractions is 1/N1/N, about π2/(3n2)\pi^2/(3n^2). So around every fraction with a small denominator there is a hole about n/bn/b times wider than an average gap. The fractions with small denominators repel their neighbours, and the simplest fractions repel them most.

That is why the misfits change sign there. Approaching 12\tfrac12 from below, the fractions crowd up against the hole and fall behind even spacing; the hole itself is a jump, and past it the fractions are ahead. The largest holes of all are around 01\tfrac01 and 11\tfrac11, the simplest fractions there are, which is why the bars are longest at the ends. The same holes are where good approximations live: a number just inside the hole around a/ba/b is approximated by a/ba/b better than by any fraction with a denominator up to nn.

Proved without the hypothesis

Not everything about the evenness waits on the Riemann hypothesis. The Farey fractions do become evenly spread as the order grows — the total misfit, divided by the number of fractions, tends to nought — and that is a theorem.

The Mertens function gives the measure of how much is known. Edmund Landau showed in 1899 that M(x)/x→0M(x)/x \to 0 is equivalent to the prime number theorem, the statement that the primes up to xx number about x/log⁡xx/\log x. Through the circle identity, that is a statement that the Farey arrows cancel to a smaller and smaller fraction of their number. The prime number theorem was proved in 1896, so this much evenness is certain. The Riemann hypothesis is the claim that the cancellation is as good as a coin’s — to within the square root — and every improvement in what is known about the zeros of ζ\zeta has been reflected as a slightly better bound on M(x)M(x), none of them anywhere near x\sqrt x.

Even at one level, uneven at another

Minkowski’s question-mark function shows the opposite behaviour in the same fractions. The function that sends fractions to binary matches the Stern–Brocot tree’s fractions to the dyadic fractions level by level, and it turned out to be singular: its rise happens on a set of length nought, because the tree places its fractions very unevenly — the mediants of a level crowd toward the simple fractions of the level above.

That is not a contradiction. The Stern–Brocot tree lists fractions by how many mediant steps they take to reach, and the fractions reached in kk steps have denominators ranging from k+1k + 1 up to Fibonacci numbers — wildly different sizes, bunched unevenly. The Farey sequence lists them by the size of the denominator, and fractions of bounded denominator are nearly even. The same set of numbers is uneven when ordered by construction depth and even when ordered by size of denominator. Which evenness a question sees depends on which list it counts along, and the Riemann hypothesis is about the second.

Farey, Haros and Cauchy

John Farey was a geologist, and in 1816 he sent a short letter to the Philosophical Magazine observing that in these lists every fraction is the mediant of its neighbours. He did not prove it. Augustin-Louis Cauchy read the letter and proved it the same year, and the lists have carried Farey’s name since, although Charles Haros had published both the lists and the property in 1802, as a way of building tables of fractions for converting decimals.

The link with the zeta function came more than a century later. Franel’s and Landau’s papers appeared together in 1924, Franel’s giving the equivalence with the sum of absolute misfits and Landau’s, in the same issue, a sharper form with squares. Between Haros’s tables of fractions for practical arithmetic and the equivalence with the most famous open problem in mathematics, nothing about the lists changed. What changed was the question asked of them.

The fractions on a circle

Place each Farey fraction ff on the unit circle at angle 2πf2\pi f, and add the points as arrows from the centre. Forty-six arrows, spread nearly evenly round the circle, nearly cancel. What is left over is not small and irregular. It is a whole number.

The Farey fractions of order 12 on a circle, adding up to M(12). Farey fractions of order 12 drawn as points on the unit circle at angles 2πf; their vector sum equals the Mertens function M(12) = -2; checked at orders 12, 30, 60, 100, 200, 400.
Fig. 5 The forty-six Farey fractions of order twelve as points on a circle at angle 2πf2\pi f. Added as arrows they almost cancel, and what is left is exactly −2, the value of the Mertens function at twelve. The same identity holds at every order checked, up to 400.

The leftover is −2-2 at order twelve, and at every order the figure checks it is the value of the Mertens function, M(n)=μ(1)+μ(2)+⋯+μ(n)M(n) = \mu(1) + \mu(2) + \cdots + \mu(n), where μ(k)\mu(k) is +1+1 if kk is a product of an even number of distinct primes, −1-1 for an odd number, and 00 if a prime divides it twice.

The reason is short. The fractions with denominator exactly bb are the a/ba/b with aa coprime to bb, and their points on the circle are the primitive bb-th roots of unity. The sum of the primitive bb-th roots of unity is μ(b)\mu(b) — the sums of roots of unity that add to nothing do so unless bb has a special shape, and the exceptions are exactly what the Möbius function records. Adding over all denominators up to nn gives M(n)M(n).

That is the surprising connection this essay turns on. How evenly the Farey fractions spread round a circle is the same question as how evenly the Möbius function balances its values +1+1 and −1-1, and the second question is the Riemann hypothesis in its most arithmetical form.

The Mertens function

The Möbius function looks like a coin toss: square-free numbers with an even number of prime factors are about as common as those with an odd number, and they alternate with no evident pattern.

The Mertens function to 20,000, between ±√x. The Mertens function M(x) = Σμ(k) for x up to 20000, drawn between the curves ±√x; largest |M(x)|/√x is 0.832 at x = 13.
Fig. 6 The Mertens function M(x) to 20,000, drawn between the curves ±x\pm\sqrt x. It wanders like a random walk and stays inside the curves throughout; its largest excursion relative to x\sqrt x in this range is about half.

If the values were independent coin tosses, their running sum would wander about as far as x\sqrt x, like a random walk. The Mertens function does wander like that, as far as it has been computed. John Littlewood proved in 1912 that the Riemann hypothesis is equivalent to M(x)=O(x1/2+ε)M(x) = O(x^{1/2+\varepsilon}) for every ε\varepsilon — the Möbius function behaving, in the size of its running sum, like a fair coin.

In 1897 Franz Mertens conjectured more: that ∣M(x)∣<x|M(x)| < \sqrt x for every x>1x > 1, which is what the figure shows as far as it goes. That stronger statement is false. Andrew Odlyzko and Herman te Riele proved in 1985 that ∣M(x)∣/x|M(x)|/\sqrt x exceeds 1.061.06 for some xx, using the zeros of the zeta function; nobody knows any such xx explicitly, only that the first is below e1.59×1040e^{1.59 \times 10^{40}}, a number with more digits than there are particles in the observable universe. The picture of a function staying inside ±x\pm\sqrt x is true for every xx anyone could ever draw and false in the end — which is exactly why a figure cannot be evidence for the Riemann hypothesis, only an illustration of what it says.

Why a list of fractions knows about zeros

The chain from Franel’s sum to the zeros of ζ\zeta has three links, and each is a genuine theorem.

The first is the circle identity above, and its refinements: the Farey fractions’ misfits can be written, by Fourier analysis on the interval, as sums of exponentials e2πimfe^{2\pi i m f} over the fractions, and each such sum is a sum of Mertens-like functions with Möbius weights. So bounds on the Mertens function give bounds on the misfits, and a clever converse gives the reverse.

The second is that the Mertens function’s growth is controlled by the zeros of ζ\zeta: the Dirichlet series ∑μ(k)/ks\sum \mu(k)/k^s equals 1/ζ(s)1/\zeta(s), and the growth of the partial sums of its coefficients is governed by how far to the right the poles of 1/ζ1/\zeta — the zeros of ζ\zeta — can lie. If every non-trivial zero has real part one half, the sums grow like x1/2x^{1/2} up to small factors; a zero with real part σ>1/2\sigma > 1/2 would make them grow like xσx^\sigma.

The third is the Riemann hypothesis itself: that every non-trivial zero has real part exactly one half. So the list of fractions the tree builds, the counting function of the primes, and the random-looking signs of the Möbius function are three faces of one question.

What the measurements cannot say

Every quantity in these figures is computed exactly or to many digits: the Farey sequences by the next-term rule, checked neighbour by neighbour; the circle sums checked against the integer Mertens function; the Möbius function by a sieve. The measurements are sound. What they measure is the behaviour up to orders of a thousand or so and arguments of twenty thousand, and the equivalences are statements about behaviour for ever.

The Mertens conjecture is the warning. A bound that holds in every computed range and fails beyond it is not a hypothetical danger in this subject; it is the documented history of the Möbius function. A slope of one half on the Franel plot is consistent with the Riemann hypothesis; a slope of 0.50010.5001 that set in only at orders with a billion digits would refute it and look identical on any drawable scale.

Still open: the Riemann hypothesis, as an evenness

Whether the Farey fractions of order nn misfit even spacing by a total of at most n1/2+εn^{1/2+\varepsilon}, for every ε>0\varepsilon > 0 and every large nn, is not known, and by Franel’s theorem it is the Riemann hypothesis. It has been checked in the sense that the first ten trillion zeros of the zeta function have been computed and all have real part one half; it has not been proved.

The Mertens function has other disguises of the same kind. Ray Redheffer noticed in 1977 that the n×nn \times n matrix of noughts and ones with a one wherever the row number divides the column number, and a column of ones down the left, has determinant exactly M(n)M(n). So the Riemann hypothesis is also a statement about how large the determinant of a very simple matrix of zeros and ones can be — no larger than n1/2+εn^{1/2+\varepsilon} — and its eigenvalues have been studied for exactly that reason. None of these reformulations has made the problem easier; each has made it visible from somewhere new.

What makes this form of the question worth stating is how little it needs. No complex analysis, no analytic continuation, no infinite series: a list of fractions with bounded denominators, in order, compared with a list of evenly spaced points. Anyone who can reduce a fraction can compute every term of Franel’s sum. The difficulty is entirely in the “for every nn”.