# Math Help - remainder when divided by 7

1. ## remainder when divided by 7

What is the remainder when (1^3)+(2^3)+(3^3)+...+(1990^3) is divided by 7?

2. Try to prove:
If x is integer, then x^3(mod7)=0 or 1 or 6

3. Originally Posted by chris86
What is the remainder when (1^3)+(2^3)+(3^3)+...+(1990^3) is divided by 7?
We need merely note that $\displaystyle \left\lfloor\frac{1990}{7}\right\rfloor=284$ and that $\displaystyle 7\cdot 284=1988$. From this we can note that

$\displaystyle \#\left\{m\leqslant 1990:m\equiv k\text{ mod }7\right\}=284\;\;\;k=0,\cdots,6$

It follows then that

$\displaystyle \sum_{n=1}^{1990}n^3\equiv 284\sum_{n=1}^{7}n^3+1989^3+1990^3\text{ mod }7$

Note though that in $\mathbb{Z}/7\mathbb{Z}$ we have that $4^{-1}=2$ and so in particular

$\displaystyle \sum_{n=1}^{1990}n^3\equiv 284\sum_{n=1}^{7}n^3+2\equiv 2\cdot284\cdot 4\sum_{n=1}^{7}n^3+2\text{ mod }7$

Note though that in general

$\displaystyle 4\sum_{k=1}^{m}k^3=m^2(m+1)^2$

And so in particular

$\displaystyle 2\cdot 284\cdot4\sum_{n=1}^{7}n^3+2\equiv 2\cdot284\cdot 7^2\cdot8^2+2\equiv 2\text{ mod }7$

4. Originally Posted by Drexel28
We need merely note that $\displaystyle \left\lfloor\frac{1990}{7}\right\rfloor=284$ and that $\displaystyle 7\cdot 284=1988$. From this we can note that

$\displaystyle \#\left\{m\leqslant 1990:m\equiv k\text{ mod }7\right\}=284\;\;\;k=0,\cdots,6$

It follows then that

$\displaystyle \sum_{n=1}^{1990}n^3\equiv 284\sum_{n=1}^{7}n^3+1989^3+1990^3\text{ mod }7$

Note though that in $\mathbb{Z}/7\mathbb{Z}$ we have that $4^{-1}=2$ and so in particular

$\displaystyle \sum_{n=1}^{1990}n^3\equiv 284\sum_{n=1}^{7}n^3+2\equiv 2\cdot284\cdot 4\sum_{n=1}^{7}n^3+2\text{ mod }7$

Note though that in general

$\displaystyle 4\sum_{k=1}^{m}k^3=m^2(m+1)^2$

And so in particular

$\displaystyle 2\cdot 284\cdot4\sum_{n=1}^{7}n^3+2\equiv 2\cdot284\cdot 7^2\cdot8^2+2\equiv 2\text{ mod }7$

The above is too involved, imho. Using Zaratustra's hint, it's easy to show that

$(7k)^3+(7k+1)^3+\ldots +(7k+6)^3=0\!\!\pmod 7\,,\,\,\forall k\in\mathbb{N}$ , so since $1990=7\cdot 284+2$ , we get

that the sum equals $1989^3+1990^3=1^3+2^3=2\!\!\pmod 7$

Tonio