That $5^n$ really threw me off and I'm not really sure how to start this problem.
What can I do in a congruence problem with the exponent $n$?
That $5^n$ really threw me off and I'm not really sure how to start this problem.
What can I do in a congruence problem with the exponent $n$?
On
Kind of brute force: Each time we increase $n$ by $1$, we multiply the previous remainder by $5$ to find the new remainder. So if we find a cyclic pattern, we know that it will continue since the new remainder just depends on the previous. Starting from $n = 0$, we find the cycle to be $1, 5, 9, 13, 1, 5, 9, 13, \dots$ and this confirms the problem statement.
Here is a straight approach.
$5^n=(4+1)^n$.
Expand $(4+1)^n$ with binomial theorem, and notice that $$\forall n\geq 2,\; 4^n\equiv 0 \; \; \text{mod 16}$$