What factor has to be applied to $\phi(ab)\propto\phi(a)\phi(b)$ for non-coprime $a,b$?

For $a,b$ coprime, it is known that $\phi(ab)=\phi(a)\phi(b)$. But is there a connection between $\phi(ab)$ and $\phi(a),\phi(b)$ if they are not coprime?


Solution 1:

Note that Euler's product formula $$\phi(n) = n\prod_{p\mid n}\left(1-\frac1p\right)$$ implies $$\begin{align} \phi(a\cdot b) &= ab\prod_{p\mid ab}\left(1-\frac1p\right) \\ &= ab\frac{\prod_{p\mid a}\left(1-\frac1p\right)\prod_{p\mid b}\left(1-\frac1p\right)}{\prod_{p\mid\gcd(a,b)}\left(1-\frac1p\right)} \cdot\frac{\gcd(a,b)}{\gcd(a,b)} \\ &= \phi(a)\phi(b)\frac{\gcd(a,b)}{\phi(\gcd(a,b))} \end{align}$$

Or to obtain a more symmetrical expression:

$$\phi(ab)\phi(\gcd(a,b)) = \phi(a)\phi(b)\gcd(a,b)$$

or even more symmetrical (courtesy of lhf):

$$\frac{\phi(ab)}{ab}\cdot\frac{\phi(d)}{d} = \frac{\phi(a)}a\cdot\frac{\phi(b)}b\quad\text{where}\ d = \gcd(a,b)$$