Show that $1^n+2^n+3^n+4^n$ is divisible by 5 if and only if n is not divisible by 4 Show that $$1^n+2^n+3^n+4^n$$ is
divisible by 5 if and only if n is not divisible by 4.
I don't find the relation why must divisible by 5 anyone can give a hint or give some part of proof?

If $4 \mid n \implies n = 4k $  
$1^{4k} + 2^{4k} + 3^{4k} + 4^{4k} \equiv 1^k + 1^k + 1^k + 1^k \equiv 1 + 1+ 1 + 1 \equiv 4 \space \text{(mod 5)}$
If $4 \nmid n \implies n = 4k + 1 \vee n = 4k + 2 \vee 4k + 3$ 
For, $n = 4k + 1$ you get:
$1^{4k+1} + 2^{4k+1} + 3^{4k+1} + 4^{4k+1} \equiv 1^k \times 1 + 1^k \times 2 + 1^k \times 3 + 1^k \times 5 \equiv 1 + 2+ 3 + 4 \equiv 10 \equiv 0 \space \text{(mod 5)}$ 
