← Number theory

Lab · Analytic number theory

Prime races and arithmetic random walks

Chebyshev's bias, the Mertens function and the Liouville walk: running totals that look like coin tossing, behave almost like it, and hide the zeros of L-functions in their small deviations.

Run through the primes and keep score: $+1$ for each prime $\equiv 3 \pmod 4$, $-1$ for each prime $\equiv 1 \pmod 4$. Dirichlet's theorem says both teams get half the primes in the long run, so the score should wander around zero like a random walk. It does not: the $3 \bmod 4$ team is ahead almost all the time, and the $1 \bmod 4$ team first takes the lead at $x = 26861$. This is Chebyshev's bias, noticed in a letter of 1853. The applet also draws three classical walks built from the Möbius function $\mu$ and its cousin $\lambda(n) = (-1)^{\Omega(n)}$.

Why the race is biased

The explicit formula for primes in progressions (the same one as in the zeros of ζ lab, but for the $L$-function of the character $\chi_4$) gives, roughly, $$\frac{\log x}{\sqrt x}\Big(\pi(x; 4, 3) - \pi(x; 4, 1)\Big) \approx 1 - 2\sum_{\gamma > 0} \frac{\sin(\gamma \log x)}{\gamma},$$ summed over the zeros $\tfrac12 + i\gamma$ of $L(s, \chi_4)$, assuming the generalised Riemann hypothesis. The constant $1$ comes from squares of primes: every odd square is $1 \bmod 4$, so the prime powers that the explicit formula counts give the $1 \bmod 4$ side a head start that the primes themselves must pay back. The oscillating sum has mean zero and is usually smaller than $1$, so the $3 \bmod 4$ side usually leads. Rubinstein and Sarnak (1994) made this precise: assuming GRH and that the $\gamma$ are linearly independent over $\mathbb{Q}$, the set of $x$ where the $3 \bmod 4$ team leads has logarithmic density $0.9959\ldots$.

Möbius and Liouville walks

The Mertens function $M(x) = \sum_{n \le x} \mu(n)$ stays inside $\pm\sqrt x$ for as far as anyone has computed, and Mertens conjectured in 1897 that it always does. Odlyzko and te Riele disproved this in 1985 without exhibiting a counterexample; the first one is known to lie beyond $10^{16}$. What is true is that the Riemann hypothesis is equivalent to $M(x) = O(x^{1/2 + \varepsilon})$ for every $\varepsilon > 0$.

Pólya conjectured in 1919 that $L(x) = \sum_{n \le x} \lambda(n) \le 0$ for all $x \ge 2$, that is, at least half the numbers up to $x$ have an odd number of prime factors. It survives every computation within the applet's range, but fails first at $x = 906{,}150{,}257$ (Tanaka, 1980).

Chowla's conjecture says $\lambda(n)$ and $\lambda(n+1)$ are uncorrelated: $\sum_{n \le x} \lambda(n)\lambda(n+1) = o(x)$. The walk in the last panel should therefore grow more slowly than $x$. The conjecture is open, but Matomäki, Radziwiłł and Tao proved it on average over shifts, and Tao (2016) proved the version with logarithmic weights $1/n$. My own research is on the function-field analogue for a truncated Möbius function; see arXiv:2610.06471.

Full proof: the Möbius function sums to zero over divisors

The walks above are built from $\mu$, and everything about $\mu$ starts from one identity.

Lemma. $\sum_{d \mid n} \mu(d) = 1$ if $n = 1$ and $0$ if $n > 1$.

Proof. For $n = 1$ the sum is $\mu(1) = 1$. For $n > 1$ let $p_1, \dots, p_k$ ($k \ge 1$) be its distinct prime factors. Only squarefree divisors contribute, and a squarefree divisor is a product of a subset of $\{p_1, \dots, p_k\}$; a subset of size $j$ contributes $(-1)^j$. So the sum is $\sum_{j=0}^{k} \binom{k}{j}(-1)^j = (1 - 1)^k = 0$. $\square$

Summing the identity over $n \le x$ and swapping the order gives $\sum_{d \le x} \mu(d)\lfloor x/d \rfloor = 1$, which already shows $|M(x)| \le x$ is far from the truth: the large terms must cancel.

Further reading

  • A. Granville and G. Martin, Prime number races, American Mathematical Monthly 113 (2006).
  • M. Rubinstein and P. Sarnak, Chebyshev's bias, Experimental Mathematics 3 (1994).
  • A. M. Odlyzko and H. J. J. te Riele, Disproof of the Mertens conjecture, Journal für die reine und angewandte Mathematik 357 (1985).
  • T. Tao, The logarithmically averaged Chowla and Elliott conjectures for two-point correlations, Forum of Mathematics, Pi 4 (2016).