Let [tex]N[/tex] be a [tex]1998[/tex]-digit number divisible by [tex]9[/tex]. Let [tex]a[/tex] be the sum of the digits of [tex]N[/tex], [tex]b[/tex] the sum of the digits of [tex]a[/tex], and [tex]c[/tex] the sum of the digits of [tex]b[/tex]. Find [tex]c[/tex].
Solution:
A number and the sum of its digits leave the same remainder when divided by [tex]9[/tex]. Since [tex]N[/tex] is divisible by [tex]9[/tex], so are [tex]a[/tex], [tex]b[/tex] and [tex]c[/tex] (and they are positive).
Each of the [tex]1998[/tex] digits is at most [tex]9[/tex], so [tex]a\le 9\times 1998=17982[/tex].
So [tex]a[/tex] has at most five digits, and if it has five, its first digit is [tex]1[/tex]. Hence [tex]b\le 1+9+9+9+9=37[/tex].
[tex]b[/tex] is a multiple of [tex]9[/tex] not greater than [tex]37[/tex], so [tex]b\in\{9, 18, 27, 36\}[/tex], and in every case [tex]c=9[/tex].