1.1.6. The Möbius inversion formula

This section is based on [BUR11, Sec. 6.2].

All divisors considered in this section are assumed to be positive.

Definition 1.1.6.1.

The Möbius function is the number-theoretic function

μ⁢(n)≔{1n=1,0p2∣n⁢ for some prime ⁢p,(−1)kn=p1⁢⋯⁢pk⁢ with distinct primes ⁢p1,…,pk.\mu(n)\coloneqq\begin{cases}1&n=1,\\ 0&p^{2}\mid n\text{ for some prime }p,\\ (-1)^{k}&n=p_{1}\cdots p_{k}\text{ with distinct primes }p_{1},\dots,p_{k}.% \end{cases}

If μ⁢(n)≠0{\mu(n)\neq 0}, we say that nn is square-free.

Example 1.1.6.2.

We have

μ⁢(42)=μ⁢(2⋅3⋅7)=(−1)3=−1andμ⁢(12)=μ⁢(22⋅3)=0.\mu(42)=\mu(2\cdot 3\cdot 7)=(-1)^{3}=-1\qquad\text{and}\qquad\mu(12)=\mu(2^{2% }\cdot 3)=0.
Theorem 1.1.6.3.

The Möbius function μ\mu is multiplicative.

Proof.

We use Proposition 1.1.5.16. By definition, μ⁢(1)=1{\mu(1)=1}. Let n>1{n>1} have the prime factorisation n=p1a1⁢⋯⁢pkak{n=p_{1}^{a_{1}}\cdots p_{k}^{a_{k}}}. We distinguish two cases:

  • •
    ​

    There exists 1≤j≤k{1\leq j\leq k} such that aj≥2{a_{j}\geq 2}. Then μ⁢(n)=0{\mu(n)=0} and μ⁢(pjaj)=0{\mu(p_{j}^{a_{j}})=0}, and hence also

    μ⁢(n)=0=∏i=1kμ⁢(piai).\mu(n)=0=\prod_{i=1}^{k}\mu(p_{i}^{a_{i}}).
  • •
    ​

    We have a1=⋯=ak=1{a_{1}=\cdots=a_{k}=1}. Then μ⁢(pi)=−1{\mu(p_{i})=-1} for 1≤i≤k{1\leq i\leq k} and hence

    ∏i=1kμ⁢(pi)=∏i=1k(−1)=(−1)k=μ⁢(n).\prod_{i=1}^{k}\mu(p_{i})=\prod_{i=1}^{k}(-1)=(-1)^{k}=\mu(n).

This finishes the proof. ∎

Warning 1.1.6.4.

The Möbius function μ\mu is not completely multiplicative. Indeed, if pp is a prime,

μ⁢(p)2=(−1)2=1≠0=μ⁢(p2).\mu(p)^{2}=(-1)^{2}=1\neq 0=\mu(p^{2}).
Theorem 1.1.6.5.

Define the number-theoretic function

F:n⟼∑d∣nμ⁢(d).F\colon n\longmapsto\sum_{d\mid n}\mu(d).

Then F⁢(1)=1{F(1)=1} and F⁢(n)=0{F(n)=0} for n>1{n>1}.

Proof.

We have

F⁢(1)=∑d∣1μ⁢(d)=μ⁢(1)=1.F(1)=\sum_{d\mid 1}\mu(d)=\mu(1)=1.

By Theorem 1.1.5.19 and Theorem 1.1.6.3, the function FF is multiplicative. Therefore, to prove that F⁢(n)=0{F(n)=0} for n>1{n>1}, it is enough to consider the case n=pa{n=p^{a}} where pp is prime and aa is a positive integer. In that case, using Corollary 1.1.4.9,

F⁢(n)=F⁢(pa)=∑d∣paμ⁢(d)=∑k=0aμ⁢(pk)=μ⁢(1)+μ⁢(p)+∑k≥2aμ⁢(pk)⏟=0=1+(−1)=0F(n)=F(p^{a})=\sum_{d\mid p^{a}}\mu(d)=\sum_{k=0}^{a}\mu(p^{k})=\mu(1)+\mu(p)+% \sum_{k\geq 2}^{a}\underbrace{\mu(p^{k})}_{=0}=1+(-1)=0

because μ⁢(pk)=0{\mu(p^{k})=0} if k≥2{k\geq 2} by definition. ∎

Lemma 1.1.6.6.

Let n≥1{n\geq 1} be an integer. Then

{(d,e)∈ℤ+2:d⁢∣n⁢ and ⁢e∣⁢(n/d)}={(d,e)∈ℤ+2:e⁢∣n⁢ and ⁢d∣⁢(n/e)}.\{(d,e)\in\mathbb{Z}_{+}^{2}\colon{d\mid n\text{ and }e\mid(n/d)}\}=\{(d,e)\in% \mathbb{Z}_{+}^{2}\colon{e\mid n\text{ and }d\mid(n/e)}\}.
Proof.

Let (d,e)∈ℤ+2{(d,e)\in\mathbb{Z}_{+}^{2}} be such that d∣n{d\mid n} and e∣(n/d){e\mid(n/d)}. Since n=(nd)⁢d{n=(\tfrac{n}{d})d}, the integer nd\tfrac{n}{d} also divides nn. Hence, by Proposition 1.1.1.6(9), we have that e∣n{e\mid n}, so that n/en/e is an integer. Write (n/d)=k⁢e{(n/d)=ke} with k∈ℤ{k\in\mathbb{Z}}. Finally, (n/e)=k⁢d{(n/e)=kd} shows that dd divides n/en/e.

Conversely, let (d,e)∈ℤ+2{(d,e)\in\mathbb{Z}_{+}^{2}} be such that e∣n{e\mid n} and d∣(n/e){d\mid(n/e)}. The previous argument applied to the pair (e,d)(e,d) yields the result. ∎

Theorem 1.1.6.7 (Möbius inversion formula).

Let ff be a number-theoretic function (not assumed to be multiplicative). Consider the function

F:n⟼∑d∣nf⁢(d).F\colon n\longmapsto\sum_{d\mid n}f(d).

Then

f⁢(n)=∑d∣nμ⁢(d)⁢F⁢(nd)=∑d∣nμ⁢(nd)⁢F⁢(d).f(n)=\sum_{d\mid n}\mu(d)F(\tfrac{n}{d})=\sum_{d\mid n}\mu(\tfrac{n}{d})F(d).
Proof.

The equality

∑d∣nμ⁢(d)⁢F⁢(nd)=∑d∣nμ⁢(nd)⁢F⁢(d)\sum_{d\mid n}\mu(d)F(\tfrac{n}{d})=\sum_{d\mid n}\mu(\tfrac{n}{d})F(d)

follows from the fact that both sums are equal to the sum

∑(k,ℓ)∈ℤ+2n=k⁢ℓμ⁢(k)⁢F⁢(ℓ).\sum_{\begin{subarray}{c}(k,\ell)\in\mathbb{Z}_{+}^{2}\\ n=k\ell\end{subarray}}\mu(k)F(\ell).

We prove the first equality in the statement. We have

∑d∣nμ⁢(d)⁢F⁢(nd)\displaystyle\sum_{d\mid n}\mu(d)F(\tfrac{n}{d}) =∑d∣nμ⁢(d)⁢(∑e∣ndf⁢(e))\displaystyle=\sum_{d\mid n}\mu(d)\Big{(}\sum_{e\mid\tfrac{n}{d}}f(e)\Big{)}
=∑d∣n∑e∣ndμ⁢(d)⁢f⁢(e)\displaystyle=\sum_{d\mid n}\sum_{e\mid\tfrac{n}{d}}\mu(d)f(e)
=∑e∣n∑d∣nef⁢(e)⁢μ⁢(d)\displaystyle=\sum_{e\mid n}\sum_{d\mid\tfrac{n}{e}}f(e)\mu(d)
=∑e∣nf⁢(e)⁢(∑d∣neμ⁢(d))\displaystyle=\sum_{e\mid n}f(e)\Big{(}\sum_{d\mid\tfrac{n}{e}}\mu(d)\Big{)}
=f⁢(n).\displaystyle=f(n).

Here:

  • •
    ​

    The first equality uses the definition of FF.

  • •
    ​

    The second and fourth equalities use distributivity.

  • •
    ​

    The third equality uses the equality in Lemma 1.1.6.6.

  • •
    ​

    The last equality uses that

    ∑d∣neμ⁢(d)={1ne=1,0ne>1,\sum_{d\mid\tfrac{n}{e}}\mu(d)=\begin{cases}1&\tfrac{n}{e}=1,\\ 0&\tfrac{n}{e}>1,\end{cases}

    by Theorem 1.1.6.5. The first condition is equivalent to n=e{n=e} and the second condition is equivalent to n>e{n>e}. Therefore, the only summand that remains is the one indexed by e=n{e=n}, and it is given by f⁢(n)f(n).

This finishes the proof. ∎

Example 1.1.6.8.

For f:n↦1{f\colon n\mapsto 1}, we have

τ⁢(n)=∑d∣nf⁢(d)=∑d∣n1.\tau(n)=\sum_{d\mid n}f(d)=\sum_{d\mid n}1.

By the Möbius Inversion Formula (Theorem 1.1.6.7), for n≥1{n\geq 1},

1=f⁢(n)=∑d∣nμ⁢(d)⁢τ⁢(nd)=∑d∣nμ⁢(nd)⁢τ⁢(d).1=f(n)=\sum_{d\mid n}\mu(d)\tau(\tfrac{n}{d})=\sum_{d\mid n}\mu(\tfrac{n}{d})% \tau(d).

For example, for n=4{n=4},

∑d∣4μ⁢(d)⁢τ⁢(4d)\displaystyle\sum_{d\mid 4}\mu(d)\tau(\tfrac{4}{d}) =μ⁢(1)⁢τ⁢(41)+μ⁢(2)⁢τ⁢(42)+μ⁢(4)⁢τ⁢(44)\displaystyle=\mu(1)\tau(\tfrac{4}{1})+\mu(2)\tau(\tfrac{4}{2})+\mu(4)\tau(% \tfrac{4}{4})
=1⋅3+(−1)⋅2+0⋅1\displaystyle=1\cdot 3+(-1)\cdot 2+0\cdot 1
=3−2\displaystyle=3-2
=1.\displaystyle=1.
Example 1.1.6.9.

Not covered in the lectureFor f:n↦n{f\colon n\mapsto n}, we have

σ⁢(n)=∑d∣nd=∑d∣nf⁢(d).\sigma(n)=\sum_{d\mid n}d=\sum_{d\mid n}f(d).

By the Möbius Inversion Formula (Theorem 1.1.6.7), for n≥1{n\geq 1},

n=f⁢(n)=∑d∣nμ⁢(d)⁢σ⁢(nd)=∑d∣nμ⁢(nd)⁢σ⁢(d).n=f(n)=\sum_{d\mid n}\mu(d)\sigma(\tfrac{n}{d})=\sum_{d\mid n}\mu(\tfrac{n}{d}% )\sigma(d).

For example, for n=4{n=4},

∑d∣4μ⁢(d)⁢σ⁢(4d)\displaystyle\sum_{d\mid 4}\mu(d)\sigma(\tfrac{4}{d}) =μ⁢(1)⁢σ⁢(41)+μ⁢(2)⁢σ⁢(42)+μ⁢(4)⁢σ⁢(44)\displaystyle=\mu(1)\sigma(\tfrac{4}{1})+\mu(2)\sigma(\tfrac{4}{2})+\mu(4)% \sigma(\tfrac{4}{4})
=1⋅7+(−1)⋅3+0⋅1\displaystyle=1\cdot 7+(-1)\cdot 3+0\cdot 1
=7−3\displaystyle=7-3
=4.\displaystyle=4.

The Möbius Inversion Formula (Theorem 1.1.6.7) allows us to establish the converse to Theorem 1.1.5.19.

Theorem 1.1.6.10.

Let ff be a number-theoretic function. Define

F:n⟼∑d∣nf⁢(d).F\colon n\longmapsto\sum_{d\mid n}f(d).

The following are equivalent:

  1. (1)
    ​

    ff is multiplicative.

  2. (2)
    ​

    FF is multiplicative.

Proof.

(1)⇒{\Rightarrow}(2) This is Theorem 1.1.5.19.

(2)⇒{\Rightarrow}(1) Let m,n∈ℤ+{m,n\in\mathbb{Z}_{+}} with gcd⁡(m,n)=1{\gcd(m,n)=1}. We have

f⁢(m⁢n)\displaystyle f(mn) =∑d∣m⁢nμ⁢(d)⁢F⁢(m⁢nd)\displaystyle=\sum_{d\mid mn}\mu(d)F(\tfrac{mn}{d})
=∑d1∣md2∣nμ⁢(d1⁢d2)⁢F⁢(m⁢nd1⁢d2)\displaystyle=\sum_{\begin{subarray}{c}d_{1}\mid m\\ d_{2}\mid n\end{subarray}}\mu(d_{1}d_{2})F(\tfrac{mn}{d_{1}d_{2}})
=∑d1∣md2∣nμ⁢(d1)⁢μ⁢(d2)⁢F⁢(md1)⁢F⁢(nd2)\displaystyle=\sum_{\begin{subarray}{c}d_{1}\mid m\\ d_{2}\mid n\end{subarray}}\mu(d_{1})\mu(d_{2})F(\tfrac{m}{d_{1}})F(\tfrac{n}{d% _{2}})
=(∑d1∣mμ⁢(d1)⁢F⁢(md1))⁢(∑d2∣nμ⁢(d2)⁢F⁢(nd2))\displaystyle=\Big{(}\sum_{d_{1}\mid m}\mu(d_{1})F(\tfrac{m}{d_{1}})\Big{)}% \Big{(}\sum_{d_{2}\mid n}\mu(d_{2})F(\tfrac{n}{d_{2}})\Big{)}
=f⁢(m)⁢f⁢(n).\displaystyle=f(m)f(n).

Here:

  • •
    ​

    The first and last equalities follow from the Möbius Inversion Formula (Theorem 1.1.6.7).

  • •
    ​

    The second equality uses Corollary 1.1.4.12.

  • •
    ​

    The third equality uses that FF and μ\mu are multiplicative (Theorem 1.1.6.3).

  • •
    ​

    The fourth equality uses distributivity.

This finishes the proof. ∎

End of Lecture 5