Euler Phi Function of Integer

Theorem
Let $$n \in \Z^*_+$$, that is, a positive integer.

Let $$\phi: \Z^*_+ \to \mathbb{Z}^*_+$$ be the Euler $\phi$-function.

Then for any $$n \in \Z^*_+$$, we have:

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

where $$p_1, p_2, \ldots, p_r$$ are the distinct primes dividing $$n$$.

Proof
We express $$n$$ in its Prime Decomposition:

$$n = p_1^{k_1} p_2^{k_2} \ldots p_r^{k_r}, p_1 < p_2 < \ldots < p_r$$

as we determined it was always possible to do.

As all primes are, by definition, coprime, then from Euler Phi Function is Multiplicative we have:

$$\phi \left({n}\right) = \left({p_1^{k_1}}\right) \left({p_2^{k_2}}\right) \cdots \left({p_r^{k_r}}\right)$$

and from Euler Phi Function of a Prime, we have $$\phi \left({p_s^{k_s}}\right) = p_s^{k_s} = \left({1 - \frac 1 {p_s}}\right)$$

So $$\phi \left({n}\right) = 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)$$

and the result follows directly from $$n = p_1^{k_1} p_2^{k_2} \ldots p_r^{k_r}$$.