Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

The third formula on the wikipedia page for the Totient function states that $$\varphi (mn) = \varphi (m) \varphi (n) \cdot \dfrac{d}{\varphi (d)} $$ where $d = \gcd(m,n)$.

How is this claim justified?

Would we have to use the Chinese Remainder Theorem, as they suggest for proving that $\varphi$ is multiplicative?

share|cite|improve this question
There might be a direct proof, but of course if you show that $\varphi$ is multiplicative (using the Chinese Remainder Theorem) and that $\varphi(p^a) = p^a - p^{a-1}$, then you get your result. – Joel Cohen Feb 29 '12 at 15:18
@lhf: You mean the group of units mod (m, n, mn)? I certainly don't know how to do that! – The Chaz 2.0 Mar 13 '12 at 2:21
It'd be nice to relate this formula with the natural mapping $U_{mn}\to U_m \times U_n$ by proving that the kernel has size $d$ and the image has index $\phi(d)$. – lhf Mar 13 '12 at 2:22
See also…. (Thanks @Dane!) – lhf Mar 14 '12 at 12:07
up vote 21 down vote accepted

You can write $\varphi(n) = n \prod_{p \mid n} \left( 1 - \frac 1p \right)$. Using this identity, we have

$$ \varphi(mn) = mn \prod_{p \mid mn} \left( 1 - \frac 1p \right) = mn \frac{\prod_{p \mid m} \left( 1 - \frac 1p \right) \prod_{p \mid n} \left( 1 - \frac 1p \right)}{\prod_{p \mid d} \left( 1 - \frac 1p \right)} = \varphi(m)\varphi(n) \frac{d}{\varphi(d)} $$

share|cite|improve this answer
Thanks, Dane. That is concise! – The Chaz 2.0 Feb 29 '12 at 15:26
This should probably be restricted to prime $p$. – G. Bach Apr 25 '14 at 19:55

Hint $\ $ A multiplicative function $\rm\:f(n)\:$ satisfies said identity if for all primes $\rm\:p\:$

$$\rm\ j\le k\ \Rightarrow\ \ f(p^{j+k}) = \frac{f(p^j)\: f(p^k)\: p^j}{f(p^j)}\ =\ p^j f(p^k)$$

Indeed we have $\rm\ \ \phi(p^{j+k})\ =\ p^{j+k}-p^{j+k-1}\ =\ p^j (p^k-p^{k-1})\ =\ p^j \phi(p^k)$

share|cite|improve this answer
Thanks, Bill. I'll try to wrap my head around that. It seems useful. – The Chaz 2.0 Feb 29 '12 at 16:44

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.