Don't understand casting out nines

Let n be a positive integer. If the sum of the digits of n is divisible by 9, then n is divisible by 9.

I got upto here,

100a + 10b + c = n
a + b + c = 9k; k exists in the set Z (all integers)

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

Solutions Collecting From Web of "Don't understand casting out nines"


Addendum. Two points.

  1. First, this isn’t exactly what is usually referred to as “casting out nines”, which is detailed on the linked Wikipedia page. This is just a method for checking that a number divides by 9.

  2. Since I did it for you, you should consider trying a similar method to figure out how the sum of the digits of a number can tell you if it divides by 3. How can you tell if a number divides by 6?