Integer to Power of Multiple of Order

Theorem
Let $a$ and $n$ be integers.

Let $a \perp n$, that is, let $a$ and $b$ be coprime.

Let $c \in \Z_{>0}$ be the order of $a$ modulo $n$.

Then $a^k \equiv 1 \pmod n$ iff $k$ is a multiple of $c$.

Further, $\phi \left({n}\right)$ is a multiple of $c$, where $\phi \left({n}\right)$ is the Euler phi function of $n$.

Proof
First note from Integer has Order Modulo n iff Coprime to n that unless $a \perp n$ the order of $a$ modulo $n$ does not exist.

Necessary Condition
Let $k$ be a multiple of $c$.

Then $k = cr$, say.

Then:
 * $a^k = a^{cr} = \left({a^c}\right)^r \equiv 1^r \equiv 1 \pmod n$

Sufficient Condition
Let $a^k \equiv 1 \pmod n$.

Then:
 * $1 \equiv a^k \equiv a^{q c + r} \equiv \left({a^c}\right)^q a^r \equiv 1^q a^r \equiv a^r \pmod n$

So $r = 0$ or else (from the Division Theorem) $0 < r < c$ and this contradicts $c$ being the smallest integer such that $a^c \equiv 1 \pmod n$.

Hence $k$ is a multiple of $c$.

From Euler's Theorem, we have $a^{\phi \left({n}\right)} \equiv 1 \pmod n$ and the above result can be applied directly.