Elementary Number Theory – Calculating Euler’s Totient Function Values

elementary-number-theorytotient-function

I never understood how to calculate values of Euler's totient function. Can anyone help?

For example, how do I calculate $\phi(2010)$?

I understand there is a product formula, but it is very different from regular products, so how should I do this? Thanks.

Best Answer

From Wikipedia: if $\displaystyle n=p_1^{k_1}\cdots p_r^{k_r}$, then

$\varphi(n)=\varphi(p_1^{k_1})\varphi(p_2^{k_2})\cdots\varphi(p_r^{k_r})=p_1^{k_1}\left(1- \frac{1}{p_1}\right)p_2^{k_2}\left(1-\frac{1}{p_2}\right)\cdots p_r^{k_r}\left(1-\frac{1}{p_r} \right)=$

$=n\cdot\left(1-\frac{1}{p_1}\right)\left(1-\frac{1}{p_2}\right)\cdots\left(1-\frac{1}{p_r}\right)$

So you'll have to find all different prime factors $p_1,\cdots,p_r$ of n.