Two consecutive numbers both have a digital sum which is a multiple of 11. What is the smallest pair of numbers?
Note: the digital sum is the number equalling the sum of all the digits of the number. For example the digital sum of 123456 is 21.
Ordinarily (in 9 out of 10 cases) adding 1 to a number adds 1 to its digital sum. Only if the number ends in a nine can something different happen.
If the last k digits of a number are 9's, the digital sum changes by 9k+1; that is, it goes down by 9k1. The smallest k for which that is a multiple of 11, so that the digital sum can remain a multiple of 11, is 5. So the number ends in exactly 5 9's.
The five 9's themselves sum to 45, which is 1 more than a multiple of 11, or, more usefully, 10 less than the next multiple of 11. So the digital sum of the digits to the left of the five 9's must be 10. They can't be 19, as that would make the trailing 9's be 6 in number, rther than 5, and as can be verified does not work as 1,999,999. The lowest pair of digits would be 28, and that indeed does work as 2,899,999 has digital sum 55, and the next number, 2,900,000 has digital sum 11.
The answer is (2,899,999, 2,900,000).

Posted by Charlie
on 20081208 14:09:27 