Let be a set of consecutive positive integers such that for any integer in , the sum of the digits of is not a multiple of 11. Determine the largest possible number of elements of .
Solution
We claim that the answer is 38. This can be achieved by taking the smallest integer in the set to be 999981. Then, our sums of digits of the integers in the set are none of which are divisible by 11.
Suppose now that we can find a larger set : then we can then take a 39-element subset of which has the same property. Note that this implies that there are consecutive integers for which are all in for . Now, let have sum of digits . Then, the sums of digits of are , respectively, and it follows that .
If the tens digit of is not 9, note that has sum of digits , which is divisible by 11, a contradiction. On the other hand, if the tens digit of is 9, the sum of digits of is , which is also divisible by 11. Thus, has at most 38 elements.
Motivation: We want to focus on subsets of of the form , since the sum of digits goes up by 1 most of the time. If the tens digit of is anything other than 0 or 9, we see that can at most contain the integers between and , inclusive. However, we can attempt to make have sum of digits congruent to modulo 11, as to be able to add as many integers to the beginning as possible, which can be achieved by making end in the appropriate number of nines. We see that we want to take so that the sum of digits upon adding 1 goes down by , giving the example we constructed previously.