TheoremComplete

Möbius Inversion Formula

The Möbius inversion formula is one of the most powerful tools in elementary number theory, allowing us to invert summatory relations over divisors.

DefinitionMöbius Function

The Möbius function μ:N{1,0,1}\mu: \mathbb{N} \to \{-1, 0, 1\} is defined as:

μ(n)={1if n=1(1)kif n=p1p2pk (distinct primes)0if n has a squared prime factor\mu(n) = \begin{cases} 1 & \text{if } n = 1 \\ (-1)^k & \text{if } n = p_1 p_2 \cdots p_k \text{ (distinct primes)} \\ 0 & \text{if } n \text{ has a squared prime factor} \end{cases}
TheoremMöbius Inversion Formula

Let ff and gg be arithmetic functions. Then:

g(n)=dnf(d)for all n1g(n) = \sum_{d|n} f(d) \quad \text{for all } n \geq 1

if and only if:

f(n)=dnμ(n/d)g(d)=dnμ(d)g(n/d)f(n) = \sum_{d|n} \mu(n/d) g(d) = \sum_{d|n} \mu(d) g(n/d)

In terms of Dirichlet convolution: g=f1g = f * 1 if and only if f=gμf = g * \mu.

ExampleEuler's Totient Function

Since dnφ(d)=n\sum_{d|n} \varphi(d) = n, Möbius inversion gives:

φ(n)=dnμ(n/d)d=ndnμ(d)d\varphi(n) = \sum_{d|n} \mu(n/d) \cdot d = n \sum_{d|n} \frac{\mu(d)}{d}

For n=p1a1prarn = p_1^{a_1} \cdots p_r^{a_r}, this becomes:

φ(n)=npn(11p)\varphi(n) = n \prod_{p|n} \left(1 - \frac{1}{p}\right)
ExampleCounting Primitive Roots

Let f(n)f(n) count ordered pairs (a,b)(a,b) with gcd(a,b)=1\gcd(a,b) = 1 and a,bna, b \leq n. Then f(n)=dnφ(d)2f(n) = \sum_{d|n} \varphi(d)^2.

By Möbius inversion:

φ(n)2=dnμ(n/d)f(d)\varphi(n)^2 = \sum_{d|n} \mu(n/d) f(d)
Remark

The Möbius function satisfies the fundamental identity:

dnμ(d)={1if n=10if n>1\sum_{d|n} \mu(d) = \begin{cases} 1 & \text{if } n = 1 \\ 0 & \text{if } n > 1 \end{cases}

This is equivalent to μ1=δ\mu * 1 = \delta, showing μ\mu is the inverse of the constant function under Dirichlet convolution.

The Möbius inversion formula has numerous applications beyond number theory, appearing in combinatorics (inclusion-exclusion), lattice theory, and algebraic topology. It exemplifies how algebraic structure (the convolution ring of arithmetic functions) leads to concrete computational tools.