This question already has an answer here:

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?


marked as duplicate by Henry T. Horton, Davide Giraudo, Amzoti, Norbert, Micah Mar 1 '13 at 16:48

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • $\begingroup$ The statement is true for any positive integer $n$, but from what you've written, are you assuming that $n$ is a three-digit number? $\endgroup$ – Zev Chonoles Mar 1 '13 at 5:59
  • $\begingroup$ Updated accordingly. $\endgroup$ – AndrewMurray Mar 1 '13 at 6:00

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.

  • $\begingroup$ This does not explain why it is added though, please explain the need to add 99a + 9b what is the reason for this? $\endgroup$ – AndrewMurray Mar 1 '13 at 6:06
  • $\begingroup$ And how do you know adding 99a + 9b will make 9k equal n? $\endgroup$ – AndrewMurray Mar 1 '13 at 6:07
  • $\begingroup$ To get $n$ on one side of the equation, and a quantity we know will be divisible by 9 on the other. $\endgroup$ – Zev Chonoles Mar 1 '13 at 6:07
  • $\begingroup$ Remember that you defined $a$, $b$, and $c$ so that $$n=100a+10b+c$$ $\endgroup$ – Zev Chonoles Mar 1 '13 at 6:07
  • $\begingroup$ To be honest, I am still lost, but this seems like a better answer than the other good answer, so I gave you a checkmark $\endgroup$ – AndrewMurray Mar 1 '13 at 6:12

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.

  • $\begingroup$ Unfortunately, I still do not understand the need to strip off all the lowest digits. Can you rephrase the answer please (as a comment) $\endgroup$ – AndrewMurray Mar 1 '13 at 6:05
  • $\begingroup$ @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$. $\endgroup$ – Ross Millikan Mar 1 '13 at 6:07

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$.


Not the answer you're looking for? Browse other questions tagged or ask your own question.