TITLE: How can I prove by induction that $9^k - 5^k$ is divisible by 4?
QUESTION [6 upvotes]: Recently had this on a discrete math test, which sadly I think I failed.  But the question asked:

Prove that $9^k - 5^k$ is divisible by $4$.

Using the only approach I learned in the class, I substituted $n = k$, and tried to prove for $k+1$ like this:
$$9^{k+1} - 5^{k+1},$$
which just factors to $9 \cdot 9^k - 5 \cdot 5^k$.
But I cannot factor out $9^k - 5^k$, so I'm totally stuck.

REPLY [2 votes]: Note that induction is not actually needed: you can instead use the identity
$$x^n-y^n=(x-y)\sum_{k=0}^{n-1}x^ky^{n-1-k}\;.$$
In this case it becomes
$$9^n-5^n=4\sum_{k=0}^{n-1}x^ky^{n-1-k}\;,$$
and since the summation clearly yields an integer, we have $4\mid 9^n-5^n$. The identity is a standard one, but it’s also not hard to prove:
$$\begin{align*}
(x-y)\sum_{k=0}^{n-1}x^ky^{n-1-k}&=x\sum_{k=0}^{n-1}x^ky^{n-1-k}-y\sum_{k=0}^{n-1}x^ky^{n-1-k}\\\\
&=\sum_{k=0}^{n-1}x^{k+1}y^{n-1-k}-\sum_{k=0}^{n-1}x^ky^{n-k}\\\\
&=\sum_{k=1}^nx^ky^{n-k}-\sum_{k=0}^{n-1}x^ky^{n-k}\\\\
&=x^ny^0+\sum_{k=1}^{n-1}x^ky^{n-k}-\sum_{k=1}^{n-1}x^ky^{n-k}-x^0y^n\\\\
&=x^n-y^n\;.
\end{align*}$$