Totient Function
Notes
Euler's totient or phi function of an integer n,
![](http://latex.codecogs.com/svg.latex?\phi(n))
, counts the positive integers less than or equal to n that are relatively prime to n. The totient function is multiplicative, that is
![](http://latex.codecogs.com/svg.latex?\phi(mn)=\phi(m) \phi(n))
if m and n are coprime.
If p is prime and
![](http://latex.codecogs.com/svg.latex?k \geq 1)
then
Euler's product formula states
![](http://latex.codecogs.com/svg.latex?\phi(n)=n \Pi_{p|n} \left( 1- \frac{1}{p}\right))
for each distinct prime number p that divides n.