Mobius Function Calculator mu(n) and Mertens M(N)
Mobius function mu(n) calculator: +1, -1, 0 values, Mertens function M(N), Mobius inversion formula, 6/pi^2 squarefree density and number factorization.
Report a calculation error
Help us improve. Describe what is wrong with the calculation.
Result
| Voce | Valore |
|---|
Show full details
Share result
Disclaimer: this calculation is for informational purposes only. For important decisions, consult a qualified professional.
The Mobius function
The Mobius function mu(n), introduced by August Ferdinand Mobius in 1832, is one of the most important functions in arithmetic number theory. Defined for positive integers as:
- mu(1) = 1 (base case)
- mu(n) = 0 if n is divisible by a square p^2 (not squarefree)
- mu(n) = (-1)^k if n is product of k distinct primes (squarefree)
Values: mu(1)=1, mu(2)=-1, mu(3)=-1, mu(4)=0, mu(5)=-1, mu(6)=1, mu(7)=-1, mu(8)=0, mu(9)=0, mu(10)=1, mu(11)=-1, mu(12)=0, mu(30)=1 (30=2*3*5), mu(42)=-1 (42=2*3*7).
Multiplicative property
mu is multiplicative: if gcd(m, n) = 1, then mu(mn) = mu(m) * mu(n). Makes mu fundamental in analytic number theory. Also, for every n > 1:
sum_{d | n} mu(d) = 0
This relation, with convention sum_{d | 1} mu(d) = 1, is the basis of Mobius inversion.
Mobius inversion formula
If two arithmetic functions f, g satisfy:
g(n) = sum_{d | n} f(d) for every positive n
then:
f(n) = sum_{d | n} mu(d) * g(n/d)
Notable applications: (
- Euler's totient phi(n) = sum_{d | n} d * mu(n/d); (
- number of irreducible polynomials over F_p of degree n = (1/n) sum_{d | n} mu(d) * p^(n/d) (Gauss); (
- Dirichlet series and L-functions
Mertens function
Mertens function M(N) is the partial sum:
M(N) = sum_{k=1}^{N} mu(k)
Values: M(1)=1, M(2)=0, M(10)=-1, M(100)=1, M(1000)=2, M(10000)=-23, M(100000)=-48. Oscillates pseudorandomly around 0.
Mertens conjecture (1897)
Franz Mertens conjectured |M(N)| = sqrt(N). No explicit counterexample known, but first is between 10^16 and 10^40. RH implies only |M(N)| = O(N^(1/2+eps)) for every eps > 0.
Five calculator modes
- Single mu(n): value with factorization and classification.
- Sequence: list mu(1)..mu(N) with statistics.
- Mertens function: M(N) via sieve.
- Inversion: applied example to totient phi(n) = sum d mu(n/d).
- Squarefree density: Q(N) and convergence to 6/pi^2.
Squarefree number density
A number n is squarefree if no square p^2 > 1 divides it, equivalent to mu(n) != 0. Asymptotic density of squarefree in [1, N]:
lim_{N -> inf} Q(N) / N = 1 / zeta(2) = 6 / pi^2 ~ 0.6079271018540...
Proof: P(n squarefree) = Prod_{p prime} (1 - 1/p^2) = 1/zeta(2) = 6/pi^2. So about 60.79% of integers are squarefree.
Dirichlet series and zeta
Mu's Dirichlet series is strictly linked to zeta:
sum_{n=1}^{inf} mu(n) / n^s = 1 / zeta(s), for Re(s) > 1
Makes mu the 'multiplicative dual' of 1 (constant 1 has zeta(s) series). Basis for prime number theorem proof via L-functions and link between prime distribution and zeta zeros.
Applications
- Analytic number theory: prime number theorem proof, von Mangoldt explicit formulas.
- Combinatorics: counting objects with constraints (generalized inclusion-exclusion).
- Finite group theory: counting irreducible representations, subgroups by order.
- Cryptography: prime generation, probabilistic primality tests.
- Theoretical CS: sieve algorithms for factorization and primality.
- Statistical physics: Mobius inversion in lattice partitions and free energy calculations.
History of the Möbius function
The function is named after the German mathematician and astronomer August Ferdinand Möbius, who introduced it in 1832 while studying series and inversion problems. Möbius is famous above all for the Möbius strip, the one-sided surface that bears his name, but his contributions to number theory were equally profound. The function μ(n) arose from the need to invert relations between arithmetic functions: given the value of a sum over divisors, how do you recover the original function? The answer is the celebrated Möbius inversion formula. Although some ideas were already present in Euler and Gauss, it was Möbius who formalised the function and showed its power. Today it is a fundamental tool of analytic number theory, with deep links to the prime numbers and the zeta function.
The Möbius function and the Riemann hypothesis
One of the most fascinating aspects of the Möbius function is its direct link with the Riemann hypothesis, the most famous unsolved problem in mathematics. The Mertens function M(N), the cumulative sum of the values of μ(k), grows apparently chaotically, oscillating around zero. It can be shown that the Riemann hypothesis is equivalent to the statement that M(N) = O(N^(1/2+ε)) for every ε > 0: that is, the Mertens function never grows much faster than the square root of N. This connects an apparent arithmetical curiosity to the behaviour of the zeros of the Riemann zeta function. Mertens' original 1897 conjecture, |M(N)| < √N, stronger, was instead disproved in 1985 by Odlyzko and te Riele, without, however, exhibiting an explicit counterexample.
Updated July 2026
Comments (0)
Login to leave a comment.
No comments yet. Be the first!