3

The sum of cubes of any three consecutive integers is divisible by $9$. i.e $(n^3 + (n+1)^3 + (n+2)^3)\mod9=0$ for every $n\in\mathbb{Z}$.

They say it is sufficient to check out for values of $n=0,1,2,3,...8$ due to properties of modular arithmetic. Why this is so ?

Thanks

user061703
  • 3,877

4 Answers4

3

This happens because of the following properties, which you can easily verify:

$$ (a + b) \mod c \equiv ((a \mod c) + (b \mod c)) \mod c \\ (a * b) \mod c \equiv ((a \mod c) * (b \mod c)) \mod c $$

This lets you rewrite your required condition as: $$((n \mod 9)^{3} + ((n \mod 9) + 1)^{3} + ((n \mod 9) + 2)^{3}) \mod 9 = 0$$ for all $n$, which makes it sufficient to check for $n = 0, 1, \dots, 8$.

2

This is because

  1. every number is congruent to exactly one of $0,1,\dots ,8$.
  2. congruences are compatible with addition and multiplication, i.e. if $x\equiv x'$ and $y\equiv y'\mod m$, then $x+y\equiv x'+y'$ and $xy\equiv x'y'\mod m$.
Bernard
  • 175,478
1

Alternatively:

$n^3+(n+1)^3+(n+2)^3$

$=n^3+n^3+3n^2+3n+1+n^3+6n^2+12n+8$

$=3n^3+9n^2+15n+9$

$=9(n^2+1)+3n(n^2+5)$

In fact, you only need to check for $n=1;n=2;n=3$.

  • If $n=1$ or $n \equiv 1 \pmod{3}$ then $n^2\equiv 1\pmod{3}\Rightarrow3|n^2+5\Rightarrow9|n(n^2+5)$

  • If $n=2$ or $n \equiv 2 \pmod{3}$ then $n^2\equiv 1\pmod{3}\Rightarrow3|n^2+5\Rightarrow9|n(n^2+5)$

  • If $n=3$ or $3|n$ then $3|n^2+5\Rightarrow9|n(n^2+5)$

Note that $9|9(n^2+1)$, this finishes the proof.

user061703
  • 3,877
1

Let $n=m-1$

$$(m-1)^3+m^3+(m+1)^3=3m^3+6m=3\underbrace{(m-1)m(m+1)}_{\text{ product of three consecutive integers}}+9m$$

Use The product of $n$ consecutive integers is divisible by $n$ factorial