Documentation
Number Theory
Elementary Number Theory
Mobius Function

Mobius Function

Definition

The mobius function μ\mu is defined as follows:

Definition

μ(1)=1\mu(1)=1

If n>1n > 1, write n=p1a1pkakn=p_1^{a_1} \cdots p_k^{a_k}. Then

μ(n)=(1)k if a1==ak=1\mu(n)=(-1)^k \text{ if } a_1=\cdots=a_k=1 μ(n)=0. otherwise\mu(n) = 0. \text{ otherwise}

Notice that μ(n)=0\mu(n) = 0 if and only if n has a square factor > 1.

Here is a short table of values of μ(n)\mu(n):

n:n:12345678910
μ(n):\mu(n):1-1-10-11-1001

Mobius Identity

Theorem

If n1n \ge 1 we have

dnμ(d)=1n={1: n=1.0: n>1.\sum_{d|n}\mu(d)= \left\lfloor \frac{1}{n} \right\rfloor = \left\{ \begin{array}{cl} 1 & : \ n = 1. \\ 0 & : \ n > 1. \end{array} \right.

Exercise

Prove that

d2nμ(d)=μ(n)2 \sum_{d^2|n} \mu(d) = \mu(n)^2

And more generally

dknμ(d)={0:if mkn for some m>11:otherwise \sum_{d^k|n} \mu(d) = \left\{ \begin{array}{cl} 0 & : \text{if }m^k|n \text{ for some } m>1 \\ 1& : \text{otherwise} \end{array} \right.