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.