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?
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?
$4\nmid n\implies$ either $n$ is odd or $n\equiv2\pmod4$
Using Proof of $a^n+b^n$ divisible by a+b when n is odd,
if $n$ is odd $5$ divides $1^n+4^n,2^n+3^n$
For $n=4m+2$
$$1^{4m+2}\equiv1,2^{4m+2}\equiv-1,3^{4m+2}\equiv-1,4^{4m+2}\equiv1\pmod5$$
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)}$
$$=>1^n+2^n+3^n+4^n$$ $$=>1^n+2^n+(-2)^n+(-1)^n$$ Consider the case when $n=2k+1$ $$=>1^{2k+1}+2^{2k+1}+(-2)^{2k+1}+(-1)^{2k+1}$$ $$=>1+2*2^{2k}-2 *(2)^{2k}-1$$ $$=>0$$ When, $n = 2k$ $$=>1^{2k}+2^{2k}+(-2)^{2k}+(-1)^{2k}$$ $$=>1+2^{2k}+(-2)^{2k}+1$$
Similarly, two cases arise $k=2k' + 1$ and $k=2k'$ You can see for yourself, if n is odd, it is divisible by 5 and hence not divisible by 4(hence covers the cases when $n = 4k+1, n = 4k+3$) , and if n gives remainder of 2 when divided by 4, it is divisible by 5. Also, when n is a multiple of 4, it is not divisible by 5 since, the sum gives a remainder of 4 when divided by 5.
By Euler's theorem, $\gcd(k,5)=1 \implies k^n\equiv{k^{n\bmod(5-1)}\pmod5}$.
Since $5$ is prime, this holds in particularly for all $k\in\{1,2,3,4\}$.
Therefore: