-1

I'm trying to find out the remainder when dividing $1+2+3+\dots+3^{100}$ by $5$.

If we were to expand the terms like this: $$ \begin{array}{cccccccccc} 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8 & 9 & 10 \\ 11 & 12 & 13 & 14 & 15 & 16 & 17 & 18 & 19 & 20 \end{array} $$

I can see that the sum of every $5$ consecutive terms is divisible by $5$. But I am not sure how to evaluate the whole expression.

The answer in the text book sums the $5$ last terms $$ 3^{100} + (3^{100}-1) + (3^{100}-2) + (3^{100}-3) + (3^{100}-4) = 5 \cdot 3^{100} - 10, $$ and divides that by $5$ in order to find the remainder.

I don't understand how they can deduce that it's sufficient to only take the last $5$ terms? The remainder is $1$, but when I evaluate the sum of $5$ consecutive numbers, I've found the remainder to be $0$ when dividing by $5$.

In order to just evaluate the $5$ last terms, they must somehow know that this property is applicable for all the terms until the five consecutive numbers ending with $3^{100}$. How can they be sure of that?

What I tried was to apply that I know that the sum can be evaluated as: $$ \sum_{i=0}^{n} i = \frac{n(n+1)}{2}, $$ which becomes $$ \sum_{i=0}^{3^{100}} i = \frac{3^{100}(3^{100}+1)}{2}, $$ which I think I could theoretically divide by $5$ and see the remainder, but I can't evaluate that.

The answer is using logic, and I think that is the way to go in order to solve this or similar exercises on a possible exam.

Bill Dubuque
  • 282,220
Cenderze
  • 131
  • 2
    $3^{100}=1$ in $\Bbb F_5$, so the sum is equal to $1$. Start with $3^4=81=1$. – Dietrich Burde Nov 07 '24 at 17:14
  • 1
    What happens if you virtually continue your table all the way to the last line? (You only need to write the last line.) You've already explained how every complete line is divisible by $5$. Is the last line complete? – Eric Towers Nov 07 '24 at 17:17
  • Are you sure you have understood the book correctly? As you say, the sum of any five consecutive terms is divisible by $5$; so you can discard the first $n$ terms, where $n$ is the largest number $\le 3^{100}$ that is divisible by $5$. But this leaves us with $3^{100}\bmod 5=1$ term, not five terms. – TonyK Nov 07 '24 at 17:19
  • Duplicate soon to be closed – Bill Dubuque Nov 07 '24 at 17:22
  • 2
    @BillDubuque: Duplicate of what? Isn't it customary to provide a link to the original? – TonyK Nov 07 '24 at 17:25
  • Finding a good dupe target takes much more time than answering, so please be patient while others manage the site. – Bill Dubuque Nov 07 '24 at 17:29
  • @BillDubuque: I can't make sense of that at all. Are you saying that you know it's a dupe, you just can't find the original? That is not very useful! – TonyK Nov 07 '24 at 17:56
  • 1
    As in dupes, each consecutive chunk of length $,5,$ beginning with an integer $\equiv \color{#c00}1\pmod{!5}$ has sum $\equiv \color{#c00}1!+!2!+!3!+!4!+!5\equiv 1!+!2!-!2!-!1!+!0\equiv 0\pmod{!5},,$ so since $,3^{100}\equiv (3^4)^{25}\equiv 1^{25}\equiv \color{#c00}1,$ the sum is $\equiv 0 + 0+\cdots +0+\color{#c00}1\equiv 1.,$ Yes, you can also evaluate it using said sum formula - again using $3^{100}\equiv 1,$ (see mod order reduction in the last dupe for general methods for evaluating large modular powers). $\ \ $ – Bill Dubuque Nov 07 '24 at 17:57
  • @BillDubuque: It is also considered common courtesy to notify commenters with '@' when you respond. – TonyK Nov 07 '24 at 23:19
  • @TonyK Of course I know that. My prior (closure explaining) comment was intended for the OP, not you. – Bill Dubuque Nov 07 '24 at 23:34
  • @BillDubuque: Nice try! But your previous comment was presumably directed at me. – TonyK Nov 08 '24 at 00:15

1 Answers1

3

Your proposed method works fine. To finish the job, just note that $3^4 \equiv 1 \pmod 5$, so $3^{100} = (3^4)^{25} \equiv 1^{25} \equiv 1 \pmod 5$, which means $\displaystyle \frac{3^{100}(3^{100}+1)}{2} \equiv \frac{1 \cdot 2}{2} \equiv 1 \pmod 5$.

Robert Shore
  • 26,056
  • 3
  • 21
  • 49