1

Let $n$ be a positive integer such that $n<1000$. If the sum of the digits of $n$ is divisible by 9, then $n$ is divisible by 9.

I got up to here:

$$100a + 10b + c = n$$ $$a+b+c = 9k,\quad k \in\mathbb{Z}$$

I didn't know what to do after this, so I consulted the solution

The next step is:

$$100a+10b+c = n = 9k +99a+9b = 9(k +11a+b)$$

I don't get how you can add $99a + 9b$ randomly, can someone please explain this for me?

Zev Chonoles
  • 132,937

3 Answers3

2

We are not adding it "randomly", we add it to both sides of the equation $$a+b+c=9k$$ to produce$$\begin{align*} (a+b+c)+99a+9b&=(9k)+99a+9b\\\\ 100a+10b+c&=9k+99a+9b\\\\ n&=9k+99a+9b\\\\ n&=9(k+11a+b) \end{align*}$$ The statement is true for any positive integer $n$, not just $n<1000$. The best way to prove that is through modular arithmetic.

Zev Chonoles
  • 132,937
1

I don't know why they are thinking about three digits. I would say let $n=10a+b$, where $b \lt 10$ (intuitively, $b$ is the ones digit and $a$ is all the rest). Then $n \pmod 9 \equiv 10a+b = (10-1)a +a +b \equiv a+b \pmod 9$ shows we can "strip off" all the lowest digits and add them up.

Ross Millikan
  • 383,099
  • Unfortunately, I still do not understand the need to strip off all the lowest digits. Can you rephrase the answer please (as a comment) – AndrewMurray Mar 01 '13 at 06:05
  • @AndrewMurray: An example is that the remainder on dividing $123$ by $9$ is the same as dividing $12+3=15$ by $9$ because the difference is $120-12=12(10-1)=108$ which is divisible by $9$. – Ross Millikan Mar 01 '13 at 06:07
0

Simple way to see it: Take the number $N = \sum_{0 \le k \le n} d_k 10^k$ where the $d_k$ are the digits, modulo 9 you have: $$ N = \sum_{0 \le k \le n} d_k 10^k \equiv \sum_{0 \le k \le n} d_k \pmod{9} $$ since $10 \equiv 1 \pmod{9}$, and so $10^k \equiv 1 \pmod{9}$ for all $k$.

vonbrand
  • 28,394