How many integers between and are such that the sum of their digits is ?
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
For a given value of n, list the number of integers with n digits whose sum is 2. For example, when n= 1, we have only the number 2. When n = 2, we have 11 and 20, so there are 2 numbers. For n = 4, we have 1001,1010,1100, and 2000, so there are 4. In this way, the pattern stays the same, and for n, we have n numbers whose sum of digits is 2. We cannot have 22 digit number for that would be >= 10^21. So the answer is the sum of n from n=1 to n=21, which is 21*22/2 = 231. Ed Gray