If the positive greatest common divisor of the integers $a$ and $b$ is $d$ , then $$\varphi(ab) = \frac{d\,\varphi(a)\,\varphi(b)}{\varphi(d)}.$$
Proof. Using the positive prime factors $p$ , the right hand side of the asserted equation is