TITLE: Proof that a number evenly divides the difference of two numbers to the nth power
QUESTION [11 upvotes]: I have tried to prove that $9^n - 4^n \equiv 0 \pmod{5}$.
At first I started out with considering the cases when $n$ is even and when it's odd and then show that the resulting expressions are congruent with $0 \pmod{5}$, but i think the proof can be shortened even further:
$$
9^n - 4^n \equiv (-1)^n - (-1)^n
$$
No matter what value $n$ takes, $a - a = 0$ for all $a$, QED.
Is this reasoning solid?

REPLY [6 votes]: You can prove this by induction.

First, show that this is true for $n=1$:
$9^{1}-4^{1}=5$
Second, assume that this is true for $n$:
$9^{n}-4^{n}=5k$
Third, prove that this is true for $n+1$:
$9^{n+1}-4^{n+1}=$
$9\cdot9^{n}-4\cdot4^{n}=$
$5\cdot9^{n}+4\cdot9^{n}-4\cdot4^{n}=$
$5\cdot9^{n}+4\cdot(\color\red{9^{n}-4^{n}})=$
$5\cdot9^{n}+4\cdot\color\red{5k}=$
$5\cdot(9^{n}+4k)$

Please note that the assumption is used only in the part marked red.