# Prove, for any positive integer $n$, that $n -3$ must be a multiple of $5$ if $n^3 -n -4$ is a multiple of $5$.

I had previously solved the problem of proving that $n^3-n-4$ must be a multiple of $5$, given that $n-3$ is a multiple of $5$. I did so by algebraically manipulating $n^3-n-4$ into:

$$2(n-3)+(n-1)(n-1)((n-3)+5)$$

Given that the first term is a given multiple of $5$, and the second term is a product of a multiple of $5$, I could prove directly that the sum of these terms was a multiple of $5$.

With the new (reverse) problem, I can't do this direct algebraic manipulation, and I believe the way to go about this problem is proof by cases, where the list of exhaustive cases would be when the remainder is $0$, $1$, $2$, $3$, or $4$.

My question is, what steps should I take to set up and show the proof for cases? I am new to these numerical theory problems, and so any basic guidance would be very much appreciated.

-
Hint: $(n-1)^2+2$ is not divisible by $5$. – njguliyev Sep 29 '13 at 20:55

Write $n$ in the form $5k+r$, where $r\in\{0,1,2,3,4\}$. Show that $n^3-r^3$ is a multiple of $5$, as of course is $n-r$, so that

$$(n^3-n-4)-(r^3-r-4)=(n^3-r^3)-(n-r)$$

is a multiple of $5$. Thus, if $n^3-n-4$ is a multiple of $5$, so is $r^3-r-4$. Now show that $3$ is the only value of $r$ for which $r^3-r-4$ is a multiple of $5$.

-
Many thanks for your help - I understand now how this proof is performed, thanks to yours and Cameron's answers. – Christian Yenko Sep 29 '13 at 21:29
@Christian: You’re welcome. – Brian M. Scott Sep 29 '13 at 21:33

We can write $n=5k+r,$ where $r\in\{0,1,2,3,4\}$ by division with remainder. Then \begin{align}n^3-n-4 &= (5k+r)^3-(5k+r)-4\\ &= (125k^3+75k^2r+15kr^2+r^3)-5k-r-4\\ &= 5(25k^3+15k^2r+3kr^2-5k)+r^3-r-4.\end{align} All that remains, then, is to show that $r^3-r-4$ is not a multiple of $5$ when $r=0,1,2,4.$

-
Many thanks for your help - I understand now how this proof is performed, thanks to yours and Brian's answers. I wish I was able to accept both answers. – Christian Yenko Sep 29 '13 at 21:29