The Question:
Calculate $\phi(100)$
My Attempt:
I attempted to calculate the totient function at the value 100, i.e.:
$$\phi(100)$$
To do this, I used the product rule of the totient function:
$\phi(ab)$ = $\phi(a)$ $\times$ $\phi(b)$
So $\phi(100)$ = $\phi(25)$ $\times$ $\phi(4)$
= $\phi(5)$ $\times$ $\phi(5)$ $\times$ $\phi(2)$ $\times$ $\phi(2)$
= 4 $\times$ 4 $\times$ 1 $\times$ 1
= 16.
The Confusion (if you will)
However, when I searched up the totient function of 100 online, it consistently came up with 40. This seems to me like a more appropriate answer, but I'm not quite sure where I went wrong on my attempt. Could you please tell me where I went wrong?
Thanks!
Well, @Arthur cleared this up for me in the comments, so I'll answer my own question:
$\phi(ab)$ = $\phi(a)$ $\times$ $\phi(b)$, only if a and b are co-prime.
So, while $\phi(100)$ = $\phi(25)$ $\times$ $\phi(4)$ because 25 and 4 are co-primes, $\phi(100)$ = $\phi(5)$ $\times$ $\phi(5)$ $\times$ $\phi(2)$ $\times$ $\phi(2)$ is not true because the 2s are not coprime, and the 5s are not co-prime either.
So, $\phi(100)$ = $\phi(25)$ $\times$ $\phi(4)$.
$\phi(25)$ = 20 (We can evaluate this through the formula $\phi(p^n) = p^{n-1}(p-1)$, so $\phi(5^2) = 5^{1}(4) = 5 \times 4 = 20$.
$\phi(4)=2$.
$\implies \phi(100)$ = $20 \times 2= 40$.
Thanks to @Arthur and @DreiCleaner for clearing this up, and @J.W.Tanner for suggesting some ways to make this answer better!