The remainder of $1^1+2^2+3^3+\dots+98^{98}$ mod $4$

166 Views Asked by At

How can I solve this problem:

If the sum $S=(1^1+2^2+3^3+4^4+5^5+6^6...+98^{98})$ is divided by $4$ then what is the remainder?

I know that all the even terms I can ignore since $(2n)^{2n}=4^nn^{2n})$ which is divisible by $4$,but i dont know what to do next it. Also I know we can write each of them as $(99-98)^1+(99-97)^2+(99-96)^3...+(99-1)^{98}$.

2

There are 2 best solutions below

5
On BEST ANSWER

$$S=1^1+2^2+3^3+4^4+5^5+6^6+7^7+...97^{97}+98^{98}\equiv \\S\equiv1^1+0+3^3+0+5^5+0+7^7+...+97^{97}+0\\\equiv1^1+3^3+5^5+7^7+...+97^{97}\\\equiv1^1+0+3^3+0+5^5+0+7^7+...+97^{97}+0\\\equiv1^1+3^3+5^5+7^7+...+97^{97}\equiv\\S\equiv1+(4k-1)^3+(4k+1)^5+(4k-1)^7+(4k+1)^9+(4k-1)^{11}...+(4k+1)^{97}\\\equiv1+(-1)^3+1^5+(-1)^7+...+(-1)^{97}\\(1,3,5,..97)=49 ,term\\so\\\equiv1+(-1+1)+(-1+1)+....=1 $$

0
On

In mod $4$, note that for any positive integer $m$, $$(2m)^{2m}=(4m^2)^m\equiv 0$$$$(4m-1)^{4m-1}\equiv (-1)^{4m-1}\equiv -1$$$$(4m-3)^{4m-3}\equiv 1^{4m-3}\equiv 1$$ and that $97=4\cdot 25-3,\ 95=4\cdot 24-1$.

Hence, we have $$S\equiv 24\cdot (-1)+25\cdot 1\equiv 1.$$