Definition:Euler Phi Function

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

The totient, indicator or Euler $\phi$-function is the function $\phi: \Z^*_+ \to \Z^*_+$ defined as:


 * $\phi \left({n}\right) = $ the number of integers less than or equal to $n$ which are prime to $n$.

That is, $\phi \left({n}\right) = \left|{S_n}\right|: S_n = \left\{{k: 1 \le k \le n, k \perp n}\right\}$.

Note that by this definition $\phi \left({1}\right) = 1$ as $\gcd \left\{{1, 1}\right\} = 1$.

It follows from the definition of $\Z'_n$ that $\phi \left({n}\right)$ is the number of elements in $\Z'_n$.