The following is a question I've come across, which states:
Determine the smallest integer $k$ such that $4^k \equiv 1 \pmod{19}$.
We know that, according to Fermat's Little Theorem, $a^{p-1}\equiv 1 \pmod{p}$, and because $19$ is prime, it must be that $4^{19-1}\equiv 1$; in other words, $k=18$.
However, this is not the smallest solution - the smallest solution is $9$. I don't know how to find the smallest solution, though I would assume it has to do with the answer of $k=18$ somehow.
Any help would be appreciated.