Example (multiplicative group of Zn)

Recall that the division algorithm states that $x\in\Z_n$ has a multiplicative inverse mod $n$ $\iff$ there are $y,m\in\Z$ such that $xy + mn = 1$ $\iff$ $\mrm{gcd}(x,n) = 1$.

Definition (multiplicative group of Zn) open_in_new

Define $$ \Z_n^\times = \sb{ x \in \Z_n }{\mrm{gcd}(x,n) = 1}. $$ This is a group with operation $\times_n$.

Definition (Euler totient function) open_in_new

The Euler totient function is defined as $$ \phi(n) = \#\sb{x\in\Z_n}{\mrm{gcd}(x,n) = 1}. $$

Theorem (Fermat-Euler theorem) open_in_new

Let $x,n\in\Z_n$. If $\mrm{gcd}(x,n) = 1$, then $$x^{\phi(n)} \equiv 1 \mod n.$$

Proof