Finding the Sum of the Digits of Numbers

How many integers between 1 1 and 1 0 21 10^{21} are such that the sum of their digits is 2 2 ?

231 230 210 190 211

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.

1 solution

Edwin Gray
Aug 16, 2018

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

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...