-1

I know the answer can be achieved by modular arithmetic but I have no clue how.

Curious
  • 21

4 Answers4

1

\begin{align} &\sum_{i=2018}^{4033} i \mod 2017\\&\equiv\sum_{i=1}^{2016} (i+2017) \mod 2017 \\& \equiv \sum_{i=1}^{2016} i \mod 2017 \\&\equiv1+2+ \ldots+2015+2016 \mod 2017 \\&\equiv1+2+\ldots+(-2)+(-1) \mod 2017 \text{, match the $i$-th term with $2017-i$ term} \\&\equiv 0 \end{align}

Siong Thye Goh
  • 149,520
  • 20
  • 88
  • 149
0

$2018 + \dots + 4033 \equiv 1 + \dots + 2016 \equiv (2016^2 + 2016)/2 \equiv (-1^2 - 1)/2 \equiv 0 \mod 2017$.

There was probably a nicer way to do this by pairing up the numbers with their inverses, but I misread this question and was halfway through the answer when I was double checking. C'est la vie.

Duncan Ramage
  • 6,928
  • 1
  • 20
  • 38
0

Note that $$2018 \equiv 1 \mod 2017$$ $$2019 \equiv 2 \mod 2017$$ $$...$$ $$4033 \equiv 2016 \mod (2017)$$ Adding all of these $$2018+2019+...+4033 \equiv 1+2+...+2016=\frac{(2016)(2017)}{2}\equiv 0 \mod 2017$$

LM2357
  • 4,083
0

Way 1: You add $2018+\dots +4033$ which is $(1+\dots +4033)-(1+\dots 2017)$, you need to calculate a lot for this way.

Way 2: If you divide $a+b$ by $m$, and you get $c$, then $c$ can also be remainder of $a$ + remainder of $b$ if the value you get is smaller than $m$. If remainder of $a$ + remainder of $b$$>m$, you just have divide remainder of $a$ + remainder of $b$ once again to get the value $c$. Can you see why? Hint: Note that you can write a natural number $g\geq m$ in this way: $g=md+r$, when you divide $g$ by $m$ where $d$ is natural number and $0\leq r<m$.

This simply implies $a\equiv s$, $b\equiv t$, then $a+b\equiv s+t$.

Note that $2017+k\equiv k$, $1\leq k\leq 1008$ and $4034-k\equiv -k$, $1\leq k\leq 1008$. Sum up, you get $2018+\dots +4033\equiv 0$.

MAN-MADE
  • 5,381