1

In my textbook, it says,

The sum of the cubes of any three consecutive integers is divisible by $9$

This statement is equivalent to proving,

$(n^3 + (n+1)^3 + (n+2)^3 ) \mod 9 =0$ is true for $n=0,1, \ldots, 8$

Now I understand how the modulo function works but I just don't see how the latter part is the same as the former. Can anyone walk me through it?

Note that, I'm not really looking for the proof, what I am looking for is how the first and the second statement are related.

Follow up question which begs to be asked,

Given some expression of $a \in \mathbb{Z}$, say $P(a)$, are the following 2 statements equivalent?

  1. $n$ divides $P(a), \, \forall a \in \mathbb{Z}$ and for some fixed $n \in \mathbb{N}$

  2. $P(a) \mod n = 0, \forall a \in \{0,1, \ldots, n-1\}$

Can anyone explain me whether or not the two statements are equivalent? Thanks!

William
  • 4,893

4 Answers4

1

$$ n | P(a) \ \forall \ a\in \mathbb Z \iff P(a) \mod n = 0 \ \forall \ a\in \{0,1,2\dots n-1\}$$ The key here is that if all elements $e$ in this set satisfy this property, then all numbers of the form $e+nk$ for some integer $k$ also satisfy this property, as the $kn$ term gets vanished mod $n$. For instance, $$ n^3 +(n+1)^3 +(n+2)^3 \equiv (n+9k)^3 +(n+9k+1)^3 +(n+9k+2)^3 \pmod 9 $$ because $$(n+9k)^3 = n^3 +9^3k^3 +3n^2(9k) +3(n)(9^2k^2) = n^3 +9(\text{stuff}) $$ and similarly for the other two terms.

Vishu
  • 14,469
  • There was a big typo, I meant to wrote $n| P(a)$, sorry for the trouble. – William Dec 21 '20 at 11:24
  • @William I noticed! Hence the first line in my answer. No worries. – Vishu Dec 21 '20 at 11:39
  • Ah yes, I see now. After scribbling around a little. I think I get it. Let me put this into my words. So given a polynomial in $a$, i.e. $P(a)$ we can show that $P(a)$ is divisible by $n$ for all $a \in \mathbb{Z}$ by showing/checking that $n|P(a)$ for every $a \in S = {0,1, \ldots n-1 }$ because any integer $a$ can be expressed as $nq+r$ with $r \in S$ and the fact that $P(r) \equiv P(nk + r) \mod n$ since $P(nk+r)$ contains all terms of the form $Ar^n$ or $B(nk)$ for integers $A$ and $B$? – William Dec 21 '20 at 12:47
  • @William Correct. – Vishu Dec 21 '20 at 12:50
  • Where you hiding, downvoters? What’s wrong with this answer? – Vishu Dec 21 '20 at 19:02
0

If $n$ and $m$ are equivalent modulo $9$, then so are $n^3$ and $m^3$. Hence there is no need to try all $n$, but only those that yield different values modulo $9$.

0

$3$ consecutive numbers gives remainders $0,1,-1(i.e 2)$ in some order when divided by $3$. So let $3$ consecutive numbers be $3k,3k'+1,3k''-1$ in some order. Cubing and adding we get, $(3k)^3+(3k'+1)^3+ (3k''-1)^3= 27k^3+27k'^3+ 9k'^2+ 9k'+1+27k''^3- 9k''^2+ 9k''-1= 9K$

Anwesha1729
  • 352
  • 2
  • 8
-1

Given some expression of $a \in \mathbb{Z}$, say $P(a)$, are the following 2 statements equivalent?

  1. $n$ divides $P(a), \, \forall a \in \mathbb{Z}$ and for some fixed $n \in \mathbb{N}$

  2. $P(a) \bmod n = 0, \forall a \in \{0,1, \ldots, n-1\}$

Yes, let's derive the equivalence step-by-step.

$$\begin{align} \forall\, a\,\in\, \Bbb Z:&\ \ \ n\,\mid\, P(a)\\[.2em] \iff \forall\, a\,\in\, \Bbb Z:&\ \ \ 0 = P(a)\bmod n\\[.2em] \iff \forall\, a\,\in\, \Bbb Z:&\ \ \ 0 = P(\bar a)\bmod n,\,\ \bar a = a\bmod n, \ \rm by\ \color{#C00}{PCR}\\[.2em] \iff \forall\, \bar a\in[n]\!:&\ \ \ 0 = P(\bar a)\bmod n,\,\ [n] = \{0,1,\ldots,n\!-\!1\}\\[.2em] \iff \forall\, \bar a\in\Bbb Z_n\!:&\ \ \ 0 = P(\bar a) \end{align}\qquad$$

where we employed the following Polynomial Congruence Rule $\, =\rm\color{#C00}{PCR}$

$\quad \bmod n\!:\ a\equiv \bar a\,\Rightarrow\, P(a)\equiv P(\bar a),\ $ for $\,P(x)\,$ any polynomial with integer coef's

Generally, given any expression composed of sums and products of integers, its value $\bmod n\,$ is unchanged when we replace the arguments of the sums and products by congruent arguments. In particular this is true if we replace them by their least nonnegative reps $\, a\mapsto a\bmod n$.

Above we could replace the standard residue system $\,[n] = 0,1,2,\ldots\,n\!-\!1\,$ by any complete system of residues $\cal R,\,$ i.e. any set of integers such that every integer is congruent to exactly one $\,r\in \cal R.\,$ Then verifying that every $\,r\in\cal R\,$ is a root is sufficient to guarantee that every integer is a root, since every integer is congruent to some normal rep $\,r\in\cal R,\,$ i.e. we have $\,n\equiv r\in {\cal R}\,\Rightarrow\, P(n)\equiv P(r)\equiv 0,\,$ by $\,\rm\color{#c00}{PCR}$

A "normal" rep in $\cal R$ can be view as "name' or "label" for the entire set of integers equivalent to it, i.e. $\,r\mapsto [r]_n = r + n\Bbb Z,\,$ the set of all integers $\equiv r\pmod{\!n}.\,$ Then the congruence sum and product rules imply that addition and multiplication is well-defined on these classes by the rules $[a]+[b] = [a+b],\,$ $[a]*[b] = [a*b].\,$ In turn this implies that the arithmetical (ring) laws of $\,\Bbb Z\,$ are inherited by the classes with these operations, so they form a new system of numbers (ring) $\,\Bbb Z_n\,$ sharing many of the same properties of the ring of integers - so we can reuse our well-honed integer arithmetic intuition in this new modular number system. In particular, viewed in the ring $\,\Bbb Z_n\,$ your statement simplifies to the final form in the string of equivalences, viz. $\,\forall\,\bar a \in \Bbb Z_n\!:\ P(\bar a) = 0,\,$ i.e. every element of $\,\Bbb Z_n\,$ is a root of $\,P\,$ (here $P$ is viewed as a polynomial over $\,\Bbb Z_n\,$ by mapping its integer coef's into $\,\Bbb Z_n\,$ via $\,p_i\mapsto \bar p_i = [p_i]_n)$.

Bill Dubuque
  • 272,048