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$?
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}$$
Standard induction applies:
Clearly this is true for $n = 0$.
Assume true for $n \ge 0$, then:
\begin{eqnarray*}
5^n &\equiv& 1+4n \mod 16\\
5^{n+1} = 5\cdot 5^n &\equiv& 5 + 20n \mod16\\
&\equiv& 5 + 4n \mod 16\\
5^{n+1}&\equiv& 1 + 4(n+1) \mod 16
\end{eqnarray*}
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.
Hint $\,\ {\rm mod}\ m^2\!:\ (1+m)(1+\color{#c00}n\,m) \,\equiv\, 1+(\color{#c00}{n\!+\!1})m\ $ is your inductive step (with $\,m=4).$