<s>[INST] Proving $1+2^n+3^n+4^n$ is divisible by $10$ How can I prove 

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

 [/INST] We consider it $(\mathrm{mod}\;2)$ and $(\mathrm{mod}\;5)$ separately. 
Clearly $1$ and $3^n$ are odd, while $2^n$ and $4^n$ are even, so their sum is even. 
Now by Fermat's Little Theorem, when $a$ is not divisible by $5$, $a^5 \equiv a \mod 5$, so $a^4 \equiv 1 \mod 5$. Thus we only need to check $n=1$, $2$, and $3$. 
(note that $1$, $2$, $3$, and $4$ are not divisible by $5$. 
If $n=1$, we get $1+2+3+4=10$, which is divisible by $5$
If $n=2$, we get $1+4+9+16=30$, which is divisible by $5$. 
If $n=3$, we get $1+8+27+64=100$, which is divisible by $5$.
Thus we have proved it $(\mathrm{mod}\;5)$ and we are done. 
</s>