Michael K. answered 04/24/19
PhD professional for Math, Physics, and CS Tutoring and Martial Arts
Euler's totient function (φ) can be thought of counting the positive integers up to a given integer n that are relatively prime to n
As it turns out...
φ(n) = φ((p1)k1) x φ((p2)k2) x ... x φ((pm)km)
Where the pm are the prime numbers used to represent n. km are the number of factors of each prime number representation.
So φ(100) = φ(102) = φ(22)φ(52) = n x ( 1 - 1/p1) * (1 - 1/p2 ) = 100 * (1 - 1/2) * (1 - 1/5) = 40
But φ((p1)k1) can be represented as p1k1 x (1 - 1/p1)
So the terms in the multiplication can be written as -->
φ(22) = 22 * (1 - 1/2) = 4*(1/2) = 2
φ(52) = 52 * (1 - 1/5) = 25*(4/5) = 20
So φ(100) = φ(102) = φ(22)φ(52) = 2 * 20 = 40
Also --> φ(n) = φ((p1)k1) x φ((p2)k2) x ... x φ((pm)km) = n x ( 1 - 1/p1) * (1 - 1/p2 ) x ... x (1 - 1/pm)