TITLE: Proving $1+2^n+3^n+4^n$ is divisible by $10$
QUESTION [11 upvotes]: How can I prove 

$$1+2^n+3^n+4^n$$ is divisible by $10$  if $$n\neq 0,4,8,12,16.....$$

REPLY [3 votes]: After checking that $S(n)=1+2^n+3^3+4^n\equiv0$ mod $10$ for $n=1$, $2$, and $3$ (i.e., computing $S(1)=10$, $S(2)=30$ and $S(3)=100$), induction does the rest, thanks to the difference
$$\begin{align}
S(n+4)-S(n)&=2^n(2^4-1)+3^n(3^4-1)+4^n(4^4-1)\\
&=15\cdot2^n+80\cdot3^n+255\cdot4^4\\
&\equiv5\cdot2^n+0\cdot3^n+5\cdot4^n\mod 10\\
&=5\cdot2(2^{n-1}+2^{2n-1})\\
&\equiv0\mod 10
\end{align}$$
Remark:  This also shows that $S(4n)\equiv4$ mod $10$, since $S(0)=1+1+1+1=4$.