3

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?

Git Gud
  • 31,356
Lingnoi401
  • 1,755

4 Answers4

4

$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$$

  • Here, the question is asking you to prove that if n is divisible by 4 then the expression is not divisible by 5. You have simply proved that the expression is surely divisible by 5 for all other cases. You have to include a case about the fact that if n=4k then there is no way that the expression is divisible by 4 – oshhh Oct 12 '16 at 02:51
2

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)}$

Fred
  • 91
  • Can you explain how you got $2^{4k}\equiv 1^k(mod \ 5)$ ? – oshhh Oct 12 '16 at 07:18
  • 1
    @OsheenSachdev $2^{4k} = 16^{k}$, and $16 \equiv 1 \text{(mod 5)}$ so $ 2^{4k} = 16^{k} \equiv 1^{k} \equiv 1 \text{(mod 5)}$ – Fred Oct 12 '16 at 12:58
1

$$=>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.

ukh
  • 378
0

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:

  • $\small{n\equiv0\pmod4\implies1^{n}+2^{n}+3^{n}+4^{n}\equiv1^{0}+2^{0}+3^{0}+4^{0}\equiv1+1+ 1+ 1\equiv4\pmod5}$
  • $\small{n\equiv1\pmod4\implies1^{n}+2^{n}+3^{n}+4^{n}\equiv1^{1}+2^{1}+3^{1}+4^{1}\equiv1+2+ 3+ 4\equiv0\pmod5}$
  • $\small{n\equiv2\pmod4\implies1^{n}+2^{n}+3^{n}+4^{n}\equiv1^{2}+2^{2}+3^{2}+4^{2}\equiv1+4+ 9+16\equiv0\pmod5}$
  • $\small{n\equiv3\pmod4\implies1^{n}+2^{n}+3^{n}+4^{n}\equiv1^{3}+2^{3}+3^{3}+4^{3}\equiv1+8+27+64\equiv0\pmod5}$
barak manos
  • 43,109