14

The sum of the digits in $9 k$ (where $k$ is an integer) is a multiple of $9$: for example

$$9\cdot 1=9$$ $$9\cdot 7=63 \qquad \text{and } 6+3=9\cdot 1$$ $$9\cdot 11=99 \qquad \text{and } 9+9=9\cdot 2$$

But why?

  • 1
    Try writing the product as $n_0 + n_1\times 10 + n_2 \times 10^2 + \cdots + n_m \times 10^m$ where $0\leq n_i \leq 9$ are integers. Then subtract the sum of the digits (i.e. the $n_i$s) from your starting number. You can show that this difference is divisible by nine. This shows that the number you started with is divisible by nine if and only if the sum of the digits is divisible by nine. – James Apr 05 '15 at 23:16
  • Simply, "cast nines". Similarly cast elevens for an alternating sum... – suckling pig Aug 21 '24 at 07:42

4 Answers4

16

An integer $9k$ (where $k\in\Bbb{Z}$) can be written as $$9k=n_1+10n_2+100n_3+\cdots$$ where $n_1,n_2,\cdots$ are the digits of $9k$. Example: $$9\cdot145=1305=5\cdot1+10\cdot0+100\cdot3+1000\cdot1$$ Factoring, $$9k=(n_1+n_2+n_3\cdots)+(9n_2+99n_3+999n_4+\cdots)$$ $$=(n_1+n_2+n_3\cdots)+9(n_2+11n_3+111n_4+\cdots)$$ $$=\sum{\textrm{digits of 9}}+9x$$ where $x\in\Bbb{Z}$ is a number we don't really need to know. Thus, $$\sum{\textrm{digits of 9}}=9k-9x=9(k-x)$$ Since $(k-x)\in\Bbb{Z}$ then $$9\mid \sum{\textrm{digits of 9}}$$

Note: if we didn't use base 10 numbers, then 9 wouldn't have this "magic" property. If we worked in base 14 or something, then 13 would have this special property

3

It is because $10$ gives $1$ as remainder when dividing by $9$. This can be expressed by the general notation of 'congruence' $$10\equiv 1\pmod9$$ (that expresses that these two numbers give the same remainder when dividing by $9$).

Then, it easily follows from the property of these congruences that they behave like equality with respect to addition and multiplication, that $10^n\equiv 1^n=1\pmod9$.

Alternatively, of course $10^n$ will also give remainder $1$ modulo $9$, as the number $99\dots9$ is divisible by $9$.

Now, a number $n=\overline{abc\dots}$ is just $n=\left(((a\cdot10+b)\cdot10+c)\cdot 10+\dots\right)$, so modulo $9$ we have the following congruence: $$n\equiv \left(((a\cdot 1+b)\cdot1+c)\cdot1+\dots\right)=a+b+c+\dots,$$ i.e., $n$ gives the same remainder modulo $9$ as the sum of its digits. In particular, it gives remainder $0$ (divisible by $9$) iff the sum of its digits is divisible by $9$.

Berci
  • 92,013
1

It seems like this is a natural candidate for proof by induction. Suppose $n=9k$ is a multiple of $9$. Clearly the sum of the digits of $n$ are divisible by $9$ for $k=1$. Suppose that this holds for arbitrary $k$, where $n$ is the $m$-digit number given by $$n=9k=d_m d_{m-1}\ldots d_1$$ Let $s_k = d_m+\ldots+d_1$ be divisible by 9. We will show that $s_{k+1}$, which is the sum of the digits of $n+9 = 9(k+1)$ is also divisible by $9$.

Suppose $d_1=0$. Then the sum of the digits of $n+9=9(k+1)$ is $s_{k+1}=s_k+9$, which is also divisible by 9. (The ones digit $d_1$ has changed from $0$ to $9$.)

Now suppose that $d_1 > 0$ and $d_2 < 9$. Then $9(k+1) = n+9 = n + 10 - 1$. Now in the sum of digits, the ones digit $d_1$ is decreased by 1 and the tens digit $d_2$ is increased by 1, so $s_{k+1} = s_k$, which is divisible by 9.

Now if $d_2$ happens to be $9$, let $r$ be the smallest integer greater than $2$ such that $d_r < 9$. (If all digits to the left of the ones digit are $9$, then let $r = m+1$, with $d_{m+1}=0$.) In this case, all digits $d_{r-1}$ through $d_2$ are reduced by $9$ (changed from $9$ to $0$) and $d_r$ is increased by $1$, offsetting the decrease by $1$ in the ones digit. The net result is that $s_{k+1} = s_k - (r-2)\times 9$, which is also divisible by $9$.

nlmath
  • 61
1

Every number can be written as follows:

$$a = 10^n \cdot a_n + 10^{n-1} \cdot a_{n-1} + ... + 100 \cdot a_2 + 10 \cdot a_1 + a_0$$

(where $a_0$ is the last digit, $a_1$ the last but one, ... and $a_n$ the first)

If you subtract the sum of the digits from that number, you get:

$10^n \cdot a_n + 10^{n-1} \cdot a_{n-1} + ... + 100 \cdot a_2 + 10 \cdot a_1 + a_0 - (a_n + a_{n-1} + ... + a_2 + a_1 + a_0)$

$=(10^n-1) \cdot a_n + (10^{n-1} - 1) \cdot a_{n-1} + ... + (100-1) \cdot a_2 + (10-1) \cdot a_1$

Now take into account that $10^î-1 = 99...9$ (the digit $9$ appears $i$ times).

So that number becomes: $999...9 \cdot a_n + 99...9 \cdot a_{n-1} + ... + 99 \cdot a_2 + 9 \cdot a_1$,

which can be written as:

$$9 \times (111...1 \cdot a_n + 11...1 \cdot a_{n-1} + ... + 11 \cdot a_2 + 1 \cdot a_1)$$

Quod erat demonstrandum :-)

Dominique
  • 3,267
  • Nice. This shows that the difference between any positive integer n and the sum of its digits s is a multiple of 9, in which case n is a multiple of 9 iff s is a multiple of 9. – nlmath Aug 21 '24 at 15:08