\documentclass[a4paper,12pt]{article}

\begin{document}

\parindent=0pt

QUESTION

What are the possible remainders when the fourth power of an
integer is divided by 5?



ANSWER

Given integers $m$ and $n$, we may divide $n$ by $m$ and get
$n=qm+r$, with $0\leq r<m$. If we raise this equation to the power
$k$ and use the binomial theorem we get

$$n^k=(qm+r)^k=(qm)^k+\left(\begin{array}{c}k\\1\end{array}\right)
(qm)^{k-1}r+\ldots+\left(\begin{array}{c}k\\k-1\end{array}\right)
(qm)r^{k-1}+r^k.$$

and $m$ divides every term on the right hand side except the last.
Thus $n^k$ and $r^k$ have the same remainder om division by $m$.

Now for our particular case, $m=5,\ k=4$ and the possible
remainders are 0,1,2,3,4. The remainders on dividing $0^4=0,\
1^4=1,\ 2^4-16,\ 3^4=81$ and $4^4=256$ by 5 are 0,1,1,1,1
respectively, and so it follows that for any $n,\ n^4$ has
remainder 0 or 1 on division by 5.

[Revision note: A much more rapid proof follows by using Fermat's
Little Theorem-$\S$4 of this course.]




\end{document}
