Möbius Function Calculator
Compute μ(n), check squarefreeness, and explore the Mertens function
The Mertens function M(n) = Σ μ(k) for k=1 to n. It is conjectured (but unproven) that |M(n)| grows slower than √n.
First 50 squarefree numbers:
Definition of the Möbius Function
| n | Factorization | μ(n) | Reason |
|---|---|---|---|
| 1 | 1 | +1 | By definition |
| 2 | 2 | −1 | 1 distinct prime |
| 4 | 2² | 0 | Has squared factor 2² |
| 6 | 2 × 3 | +1 | 2 distinct primes |
| 30 | 2 × 3 × 5 | −1 | 3 distinct primes |
| 210 | 2×3×5×7 | +1 | 4 distinct primes |
Frequently Asked Questions
What is the Möbius function used for?
The Möbius function appears in the Möbius inversion formula, which lets you invert summatory functions in number theory. It also plays a key role in the inclusion-exclusion principle, the Riemann zeta function (via the Dirichlet series 1/ζ(s) = Σ μ(n)/n^s), and the distribution of primes.
What does "squarefree" mean?
A positive integer is squarefree if no perfect square other than 1 divides it. Equivalently, it has no repeated prime factors. For example: 6 = 2×3 is squarefree, but 12 = 2²×3 is not. Squarefree numbers are exactly those where μ(n) ≠ 0.
What is the Mertens function?
The Mertens function M(n) = Σ μ(k) for k from 1 to n. It oscillates around zero and grows very slowly. The famous Mertens conjecture (disproved in 1985) claimed |M(n)| ≤ √n for all n — it's actually false, but the bound holds for all tested values up to about 10^22.
Is the Möbius function multiplicative?
Yes! The Möbius function is completely multiplicative: if gcd(m, n) = 1, then μ(mn) = μ(m)·μ(n). This property makes it a powerful tool in multiplicative number theory and allows efficient computation using sieves.
What fraction of integers are squarefree?
Asymptotically, the density of squarefree integers is 6/π² ≈ 60.79%. This is derived from the probability that a random integer is not divisible by any perfect square p², using the Euler product formula.
What does μ(n) = 0 tell us?
μ(n) = 0 means n has at least one prime factor appearing twice or more (i.e., n is not squarefree). These numbers are "filtered out" by the Möbius function, which is why it works so well for inclusion-exclusion in number-theoretic sieves.
What is the Möbius inversion formula?
If f(n) = Σ g(d) for all divisors d of n, then g(n) = Σ μ(n/d)·f(d). This is the number-theoretic analog of the fundamental theorem of calculus, allowing "inversion" of summatory functions over divisors.
Who was August Möbius?
August Ferdinand Möbius (1790–1868) was a German mathematician and astronomer. He is famous for the Möbius strip (a one-sided surface), the Möbius function in number theory, and contributions to projective geometry. The function bearing his name was actually introduced in his 1832 paper on number theory.