Proof of a formula involving Euler's totient function: $\varphi (mn) = \varphi (m) \varphi (n) \cdot \frac{d}{\varphi (d)}$ 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?

You can write $\varphi(n)$ as a product $\varphi(n) = n \prod\limits_{p \mid n} \left( 1 - \frac 1p \right)$ over primes.
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)}
$$
