Given $gcd(a,n) = 1$, we need to prove that a^(n-1) === 1 mod n.

(a is the base, n is mod)