A Sum of Digits Problem
Question
I wrote down all integers from 1 to 711. Next, I added up all the digits that I have written. I get the number S. Prove that S is divisible by 711.
Solution
The idea is to separately count “the sum of digits”.
For example, what is the sum of all digit “1’s” found from 1 to 99?
The numbers with digit 1 are:
1, 21, 31, 41, 51, 61, 71, 81, 91, (nine numbers)
And
10, 11, 12, 13, 14, 15, 16, 17, 18, 19, (ten numbers)
Where the sum for the ones digit only (in the above, note that “11” has two ones)
(1 x 9) + (10 + 1) = 20
After that we count the rest using the idea above. The rest of the solution is continued in the images: