$\phi(n)$ is called Euler's totient function, counts the positive integers smaller than $n$ and don't share factor with $n$ except 1. For prime numbers $\phi(n) = n - 1$. And if prime factorization of $n$ is $p * q$, then $\phi(n) = \phi(p) * \phi(q) = (p- 1) * (q - 1)$
In [ ]: