English

Practical Computations of the Mertens Function: $M(10^{24})$ and $M(10^{25})$

Number Theory 2026-07-08 v1

Abstract

The Mertens function is defined as M(x)=nxμ(n)M(x)=\sum_{n\leq x}\mu(n), where μ(n)\mu(n) is the M\"obius function. This paper describes a practical implementation of the classical O(x2/3+ε)O(x^{2/3+\varepsilon}) algorithm for computing M(x)M(x) at isolated values, together with the segmented M\"obius and Mertens sieve on which it relies. The implementation was used to compute M(1024)=7189337839M(10^{24}) = 7189337839 and M(1025)=258560632948M(10^{25}) = -258560632948, taking 7.07.0 days and 34.634.6 days, respectively. These computations extend the previous record of M(1023)M(10^{23}) by two orders of magnitude. Run standalone, the segmented sieve computed all Mertens values through 101610^{16} in approximately 7.47.4 days, compared with the 7.57.5-month runtime of the author's 2018 computation. In pursuit of the most practical isolated-value method, an optimized implementation of the asymptotically faster Helfgott-Thompson algorithm is also presented, running roughly four times faster than the original implementation. With both implementations optimized, the choice between methods depends on input size and hardware. The contribution is a reproducible computation and implementation study, rather than a new asymptotic algorithm.

Keywords

Cite

@article{arxiv.2607.07566,
  title  = {Practical Computations of the Mertens Function: $M(10^{24})$ and $M(10^{25})$},
  author = {Greg Hurst},
  journal= {arXiv preprint arXiv:2607.07566},
  year   = {2026}
}

Comments

31 pages, 3 figures; code available