1

This problem is from a great book:

$$\color{rgb(128,128,255)}{\text{Discovering Higher Mathematics}}\\\color{rgb(255,128,128)}{\text{Four habits of Highly Effective Mathematicians}}\\\text{By }\color{rgb(0,191,0)}{\text{Alan Levine}}$$


Find the remainder when $1^{99}+2^{99}+3^{99}+4^{99}+5^{99}$ is divided by $5$.


My Approach:

  • $1^{\text{any natural number}}\equiv1\pmod{10}$

  • Finding the units digit of powers of $2$: $2^1\equiv2\pmod{10}, 2^2\equiv4\pmod{10}, 2^3\equiv8\pmod{10}, 2^4\equiv6\pmod{10}$

This pattern will repeat for higher integer exponents. Now $99\equiv3\pmod{4}$, so $2^{99}\equiv2^3\equiv8\pmod{10}$

  • Finding the units digit of powers of $3$: $3^1\equiv3\pmod{10}, 3^2\equiv9\pmod{10}, 3^3\equiv7\pmod{10}, 3^4\equiv1\pmod{10}$

This pattern will repeat for higher integer exponents. Now $99\equiv3\pmod{4}$, so $3^{99}\equiv3^3\equiv7\pmod{10}$

  • Finding the units digit of powers of $4$: $4^1\equiv4\pmod{10}, 4^2\equiv6\pmod{10}, 4^3\equiv4\pmod{10}$

This pattern will repeat for higher integer exponents. Now $99\equiv0\pmod{3}$, so $4^{99}\equiv4^0\equiv1\pmod{10}$

  • $5^{\text{any natural number}}\equiv5\pmod{10}$

Adding these: $1+8+7+1+5=22\equiv2\pmod{5}$

My final answer is $2$.


$\color{red}{\text{Question 1:}}$ Is my approach correct?

$\color{red}{\text{Question 2:}}$ Is there a faster way to solve this problem?


Your help would be appreciated. THANKS!

Bill Dubuque
  • 282,220
Hussain-Alqatari
  • 5,738
  • 3
  • 16
  • 44
  • 2
    Are you trying to find the remainder mod $5$ or $10$? – Julio Puerta Jun 27 '24 at 20:16
  • @JulioPuerta mod 5. But in my solution I used mod 10, then evaluated the sum, then find mod 5 for the sum – Hussain-Alqatari Jun 27 '24 at 20:17
  • For a solution-verification question to be on topic you must specify precisely which step in the proof you question, and why so. This site is not meant to be used as a proof checking machine. – Bill Dubuque Jun 27 '24 at 20:18
  • 4
    $1^{99}+2^{99}+3^{99}+4^{99}+5^{99}\equiv1+2^{99}+(-2)^{99}+(-1)^{99}+0^{99}\equiv0\pmod5$ – J. W. Tanner Jun 27 '24 at 20:20
  • 4
    Question $2$, ie looking for faster methods: Consider that $$\bmod 5: \ 1^{99} + 2^{99} + 3^{99} + 4^{99} + 5^{99} \equiv 1 + 2^{99} + (-2)^{99} + (-1)^{99} \equiv 1 + 2^{99} - 2^{99} - 1 \equiv 0$$ – Sahaj Jun 27 '24 at 20:20
  • 1
    An error lies in your conclusions for $4$. Since $99 \equiv 0 \pmod 3$, then $99$ is a multiple of $3$. Then $$ 4^{99} = (4^3)^k $$ for some integer $k$, and so $$ 4^{99} \equiv 4^3 \equiv 4 \pmod{10} $$ Correspondingly, your final sum should be $25 \pmod{10}$, or rather $0 \pmod 5$.

    WolframAlpha confirms this.

    – PrincessEev Jun 27 '24 at 20:21
  • As far as a "faster" way goes, I can't think of one necessarily. I would have pursued the same fundamental logic, but diving directly into mod-$5$ throughout instead of using mod-$10$, but if it's easier/faster for you to process it that way first it's still valid. Perhaps a slight bit of expediency could be earned from noting that $$ 4^{99} = 2^{198} $$ and hence just squaring your result from the $2$ calculation. I also like Sahaj's suggestion a lot. – PrincessEev Jun 27 '24 at 20:21
  • To be honest, I don't really understand your approach. You write "this pattern will repeat" without actually explaining this. You got a wrong answer anyway. Hint: try to use Euler's theorem. (equivalently, Fermat's little theorem) – Mark Jun 27 '24 at 20:21
  • "To be honest, I don't really understand your approach." -- They are exploiting the fact that the least residues of $a^n$, mod $m$, will repeat as $n$ increases. – PrincessEev Jun 27 '24 at 20:22
  • 1
    Hint: $\bmod 5!:\ 1^{99}!+4^{99}\equiv 1^{99}+(-1)^{99}\equiv 0,,$ similarly $,3\equiv -2,$ so $,2^{99}+3^{99}\equiv 0,,$ see the linked dupes which explain at length how to exploit this mod-negation reflection symmetry to pair up summands that sum to zero so cancel out of the sum. – Bill Dubuque Jun 27 '24 at 20:24
  • 1
    $4^k\bmod10$ depends on $k\bmod2$ or $k\bmod4$, not $k\bmod3$ – J. W. Tanner Jun 27 '24 at 20:27
  • @PrincessEev basically my approach is finding the sum of each term mod 10 first, then when we get the sum mod 10, we find mod 5. – Hussain-Alqatari Jun 27 '24 at 20:35

0 Answers0