For the long time readers of mine, you might recall what is called Euler’s Totient function. I recommend you take a look back at that previous article if you are not familar with some of ϕ\phi‘s properties:

Euler’s Totient Function: Let nn be a positive integer. Euler’s Totient Function ϕ\phi is defined as,

ϕ(n)=#{m:gcd(n,m)=1and0<mn}.\phi(n) =\#\{m \in \mathbb{Z}\;:\;\gcd{(n,m)} = 1\;and \;0\lt m \leq n\}.

Moreover, ϕ\phi safitied the following properties:

  1. \phi(p^k) = p^{k-1}(p-1) if p is prime and k is a positive integer,
  2. If \gcd{(n,m)}=1 then, \phi(nm) = \phi(n)\phi(m) .
  3. If n = p_a^{k_a}p_b^{k_b}\cdots p_m^{k_m}, then \phi(n) = n\left(1-\frac{1}{p_a}\right)\left(1-\frac{1}{p_b}\right)\cdots\left(1-\frac{1}{p_m}\right).
  4. An equivalent way to express 3. is the following, ϕ(n)=(pakapaka1)(pmkmpmkm1)\phi(n) =\Big(p_a^{k_a} - p_a^{k_a-1}\Big)\cdots \Big(p_m^{k_m} - p_m^{k_m-1}\Big)

What I would like to show you today, is one very interesting property that Euler’s totient function has. This was discovered by Gauss, so the theorem is kind of an Euler/Gauss team up. Also, the proof I will show you is a one-liner proof. I reccomend that you try to prove it on your own before you read the following one!

Theorem: Let ϕ\phi be Euler’s totient function and n.n\in \N. Then,

n=d|nϕ(d).n = \sum_{d\mid n}\phi(d).

Where d|n\sum_{d\mid n} means, “sum over positive divisors dd of nn .”

Let’s do a quick example. Let n=12.n = 12. It follows that the divisors of 12 are, d{1,2,3,4,6,12}.d \in \{1,2,3,4,6,12\}. Thus,

d|12ϕ(d)=ϕ(1)+ϕ(2)+ϕ(3)+ϕ(4)+ϕ(6)+ϕ(12)=1+1+2+2+2+4=12.\sum_{d\mid 12}\phi(d) = \phi(1)+\phi(2)+\phi(3)+\phi(4)+\phi(6)+\phi(12)\\ \qquad\qquad\;\;\;\,=1 +1+2+2+2+4\\ \qquad\qquad\;\;\;\,=12.

How remarkable!

Proof: (Click in the Discovery)

Here’s the idea. All of the factors of n=p1a1p2a2pkakn = p_1^{a_1}p_2^{a_2}\cdots p_k^{a_k} are a term in the following sum

(1+p1+p12++p1a1)(1+p2+p22++p2a2)(1+pk+pk2++pkak).\Big(1+p_1+p_1^2+ \cdots + p_1^{a_1}\Big)\Big(1+p_2+p_2^2+ \cdots + p_2^{a_2}\Big)\cdots \Big(1+p_k+p_k^2+ \cdots + p_k^{a_k}\Big).

Now, since ϕ\phi has the property that ϕ(mn)=ϕ(m)ϕ(n)\phi(mn) = \phi(m)\phi(n) whenever gcd(m,n)=1,\gcd{(m,n)}=1,we can deduce that

d|nϕ(d)=(ϕ(1)+ϕ(p1)+ϕ(p12)++ϕ(p1a1))(ϕ(1)+ϕ(pk)+ϕ(pk2)++ϕ(pkak))=(1+(p11)+(p12p1)++(p1a1p1a11))(1+(pk1)+(pk2pk)++(pkakpkak1))\sum_{d\mid n} \phi(d) = \Big(\phi(1)+\phi(p_1)+\phi(p_1^2)+ \cdots + \phi(p_1^{a_1})\Big)\cdots \Big(\phi(1)+\phi(p_k)+\phi(p_k^2)+ \cdots + \phi(p_k^{a_k})\Big) \\\qquad\qquad\;\;= \Big(1+(p_1-1)+(p_1^2 - p_1)+ \cdots + (p_1^{a_1}- p_1^{a_1-1})\Big)\cdots \Big(1+(p_k-1)+(p_k^2 - p_k)+ \cdots + (p_k^{a_k}- p_k^{a_k-1})\Big)

where we used (4.) in the properties of ϕ\phi. Observe that the above sums are telescoping. That is, we have a lot of cancelations!

d|nϕ(d)=(p1a1)(pkak)=n.\sum_{d\mid n} \phi(d) = \Big( p_1^{a_1}\Big)\cdots \Big( p_k^{a_k}\Big) = n.

Just like that, we’re done!

\square

Oh, the one-liner version of the above proof is the following:

d|nϕ(d)=m=1ki=1amϕ(pmi)=m=1ki=1am(pmipmi1)=m=1kpmam=n.\sum_{d\mid n} \phi(d) = \prod_{m=1}^k\sum_{i=1}^{a_m}\phi(p_m^{i}) = \prod_{m=1}^k\sum_{i=1}^{a_m}\Big(p_m^{i}-p_m^{i-1} \Big) = \prod_{m=1}^kp_m^{a_m} =n.

Happy Thanksgiving (In the US)

I just want to end by saying thank you to all of you who read my silly little articles. I really appreciate it, and I get a lot of pleasure sharing math(s) with fellow nerds! See you next time!

Be Kind. Be Curious. Be Compassionate. Be Creative.

And Have Fun!

Leave a comment