Proving the Converse of Euler's Totient Theorem
Suppose that for some $B$, $a^B=1 \mod n$. Then we have some integers $k,m$ and an equation of the form $a^Bk+mn=1$. This means that $a^B$ and $n$ are coprime. Then $a$ and $n$ must be coprime.
Suppose that for some $B$, $a^B=1 \mod n$. Then we have some integers $k,m$ and an equation of the form $a^Bk+mn=1$. This means that $a^B$ and $n$ are coprime. Then $a$ and $n$ must be coprime.