# Mertens function

In number theory, the **Mertens function** is defined for all positive integers *n* as

where μ(k) is the Möbius function. The function is named in honour of Franz Mertens. This definition can be extended to positive real numbers as follows:

Less formally, *M*(*x*) is the count of square-free integers up to *x* that have an even number of prime factors, minus the count of those that have an odd number.

The first 143 *M*(*n*) is: (sequence A002321 in the OEIS)

M(n) |
+0 | +1 | +2 | +3 | +4 | +5 | +6 | +7 | +8 | +9 | +10 | +11 |
---|---|---|---|---|---|---|---|---|---|---|---|---|

0+ | 1 | 0 | −1 | −1 | −2 | −1 | −2 | −2 | −2 | −1 | −2 | |

12+ | −2 | −3 | −2 | −1 | −1 | −2 | −2 | −3 | −3 | −2 | −1 | −2 |

24+ | −2 | −2 | −1 | −1 | −1 | −2 | −3 | −4 | −4 | −3 | −2 | −1 |

36+ | −1 | −2 | −1 | 0 | 0 | −1 | −2 | −3 | −3 | −3 | −2 | −3 |

48+ | −3 | −3 | −3 | −2 | −2 | −3 | −3 | −2 | −2 | −1 | 0 | −1 |

60+ | −1 | −2 | −1 | −1 | −1 | 0 | −1 | −2 | −2 | −1 | −2 | −3 |

72+ | −3 | −4 | −3 | −3 | −3 | −2 | −3 | −4 | −4 | −4 | −3 | −4 |

84+ | −4 | −3 | −2 | −1 | −1 | −2 | −2 | −1 | −1 | 0 | 1 | 2 |

96+ | 2 | 1 | 1 | 1 | 1 | 0 | −1 | −2 | −2 | −3 | −2 | −3 |

108+ | −3 | −4 | −5 | −4 | −4 | −5 | −6 | −5 | −5 | −5 | −4 | −3 |

120+ | −3 | −3 | −2 | −1 | −1 | −1 | −1 | −2 | −2 | −1 | −2 | −3 |

132+ | −3 | −2 | −1 | −1 | −1 | −2 | −3 | −4 | −4 | −3 | −2 | −1 |

The Mertens function slowly grows in positive and negative directions both on average and in peak value, oscillating in an apparently chaotic manner passing through zero when *n* has the values

- 2, 39, 40, 58, 65, 93, 101, 145, 149, 150, 159, 160, 163, 164, 166, 214, 231, 232, 235, 236, 238, 254, 329, 331, 332, 333, 353, 355, 356, 358, 362, 363, 364, 366, 393, 401, 403, 404, 405, 407, 408, 413, 414, 419, 420, 422, 423, 424, 425, 427, 428, ... (sequence A028442 in the OEIS).

Because the Möbius function only takes the values −1, 0, and +1, the Mertens function moves slowly and there is no *x* such that |*M*(*x*)| > *x*. The Mertens conjecture went further, stating that there would be no *x* where the absolute value of the Mertens function exceeds the square root of *x*. The Mertens conjecture was proven false in 1985 by Andrew Odlyzko and Herman te Riele. However, the Riemann hypothesis is equivalent to a weaker conjecture on the growth of *M*(*x*), namely *M*(*x*) = *O*(*x*^{1/2 + ε}). Since high values for *M*(*x*) grow at least as fast as the square root of *x*, this puts a rather tight bound on its rate of growth. Here, *O* refers to Big O notation.

The true rate of growth of *M*(*x*) is not known. An unpublished conjecture of Steve Gonek states that

Probabilistic evidence towards this conjecture is given by Nathan Ng.^{[1]}

## Representations

### As an integral

Using the Euler product one finds that

where is the Riemann zeta function and the product is taken over primes. Then, using this Dirichlet series with Perron's formula, one obtains:

where *c* > 1.

Conversely, one has the Mellin transform

which holds for .

A curious relation given by Mertens himself involving the second Chebyshev function is

Assuming that there are not multiple non-trivial roots of we have the "exact formula" by the residue theorem:

Weyl conjectured that the Mertens function satisfied the approximate functional-differential equation

where *H*(*x*) is the Heaviside step function, *B* are Bernoulli numbers and all derivatives with respect to *t* are evaluated at *t* = 0.

There is also a trace formula involving a sum over the Möbius function and zeros of Riemann Zeta in the form

where the first sum on the right-hand side is over the nontrivial zeros of the Riemann zeta function, and (*g*,*h*) are related by a Fourier transform, such that

### As a sum over Farey sequences

Another formula for the Mertens function is

- where is the Farey sequence of order
*n*.

This formula is used in the proof of the Franel–Landau theorem.^{[2]}

### As a determinant

*M*(*n*) is the determinant of the *n* × *n* Redheffer matrix, a (0,1) matrix in which
*a*_{ij} is 1 if either *j* is 1 or *i* divides *j*.

### As a sum of the number of points under n-dimensional hyperboloids

## Calculation

Neither of the methods mentioned previously leads to practical algorithms to calculate the Mertens function.
Using sieve methods similar to those used in prime counting, the Mertens function has been computed for all integers up to an increasing range of *x*.^{[3]}^{[4]}

Person | Year | Limit |

Mertens | 1897 | 10^{4} |

von Sterneck | 1897 | 1.5×10^{5} |

von Sterneck | 1901 | 5×10^{5} |

von Sterneck | 1912 | 5×10^{6} |

Neubauer | 1963 | 10^{8} |

Cohen and Dress | 1979 | 7.8×10^{9} |

Dress | 1993 | 10^{12} |

Lioen and van de Lune | 1994 | 10^{13} |

Kotnik and van de Lune | 2003 | 10^{14} |

Hurst | 2016 | 10^{16} |

The Mertens function for all integer values up to *x* may be computed in *O(x log log x)* time. Combinatorial based algorithms can compute isolated values of *M(x)* in *O(x ^{2/3}(log log x)^{1/3})* time, and faster non-combinatorial methods are also known.

See A084237 for values of *M*(*x*) at powers of 10.

## Notes

- ↑ Ng
- ↑ Edwards, Ch. 12.2
- ↑ Kontik, Tadej; van de Lune, Jan (November 2003). "Further systematic computations on the summatory function of the Möbius function".
*MAS-R0313*. - ↑ Hurst, Greg (2016). "Computations of the Mertens Function and Improved Bounds on the Mertens Conjecture". arXiv:1610.08551 [math.NT].

## See also

## References

- Edwards, Harold (1974).
*Riemann's Zeta Function*. Mineola, New York: Dover. ISBN 0-486-41740-9. - F. Mertens, "Über eine zahlentheoretische Funktion",
*Akademie Wissenschaftlicher Wien Mathematik-Naturlich*Kleine Sitzungsber, IIa**106**, (1897) 761–830. - A. M. Odlyzko and Herman te Riele, "Disproof of the Mertens Conjecture",
*Journal für die reine und angewandte Mathematik***357**, (1985) pp. 138–160. - Weisstein, Eric W. "Mertens function".
*MathWorld*.

- "Sloane's A002321 : Mertens's function".
*The On-Line Encyclopedia of Integer Sequences*. OEIS Foundation. - Deléglise, M. and Rivat, J. "Computing the Summation of the Möbius Function." Experiment. Math. 5, 291-295, 1996. https://projecteuclid.org/euclid.em/1047565447
- Hurst, Greg (2016). "Computations of the Mertens Function and Improved Bounds on the Mertens Conjecture". arXiv:1610.08551 [math.NT].
- Nathan Ng, "The distribution of the summatory function of the Möbius function", Proc. London Math. Soc. (3) 89 (2004) 361-389. http://www.cs.uleth.ca/~nathanng/RESEARCH/mobius2b.pdf