How many numbers from 1 to 1 0 2 0 0 0 have the sum of their digits equal to 2?
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.
A quick observation:- No. of single digit number having above property :- (obviously) 1 i.e. the number 2; No of 2 digit number :- 2 (11, 20) No. of 3 digit number :- 3 (101, 110, 200) Clearly the solution of n digit number can be given as no. permutation of 1 0 n − 1 + 1 keeping first digit ( 1 ) fixed and plus 1 for 2 ⋅ 1 0 n − 1 . Ex :- for 3 digit number, number of permutation of 1 0 2 + 1 = 1 0 1 , keeping first digit ( 1 ) fixed, is 2 and add 1 for 200. Now clearly the number of solution for n digit number is n
∴ our ans is simple 2 2 0 0 0 ⋅ 2 0 0 1 = 2 0 0 1 0 0 0
Given the 10 numbers up to 1 0 4 that follow the rule:
2 | 11 | 20 | 101 | 110 | 200 | 1001 | 1010 | 1100 | 2000 |
We can see that there's 1 for a single digit, 2 for a pair of them, 3 for three and linearly increasing. So 1 0 2 0 0 0 means the result must be a sumattory from 1 to 2000, which becomes easy if we consider 1000 times 2001.
(Gauss saw that, for our example of 1 0 4 : 1 + 2 + 3 + 4 = ( 1 + 4 ) + ( 2 + 3 ) = 5 + 5 = 2 ⋅ 5 = 2 4 ⋅ 5 = 1 0 .)
So 2 2 0 0 0 ⋅ 2 0 0 1 = 2 0 0 1 0 0 0
We observe that any such number satisfying the above conditions are of the form a 1 a 2 . . . a 2 0 0 1 , a 1 , a 2 , . . . , a 2 0 0 1 ≥ 0 , a 1 + a 2 + . . . a 2 0 0 1 = 2 By stars and bars, the answer is 2001 choose 2, which is 2001000.
Problem Loading...
Note Loading...
Set Loading...
Each number from 1 to 1 0 2 0 0 0 consists of 2000 digits (combination of digits 0,1,2,3,4,5,6,7,8,9)
Getting the no. of numbers whose sum of digits is equal to 2, is equivalent to getting the coefficient of x 2 in ( x 0 + x 1 + x 2 + x 3 + x 4 + x 5 + x 6 + x 7 + x 8 + x 9 ) 2 0 0 0
( x 0 + x 1 + x 2 + x 3 + x 4 + x 5 + x 6 + x 7 + x 8 + x 9 ) 2 0 0 0 * ( x − 1 ) 2 0 0 0 * ( x − 1 ) 1 2 0 0 0
= ( 1 − x 1 0 ) 2 0 0 0 * (n+1999) C n * x n
Expanding ( 1 − x 1 0 ) 2 0 0 0 , we'll get terms with exponent of x greater than 2, so we disregard these terms.
= 1 * (n+1999) C n * x n
Since we are looking for the coefficient of x 2 , then n must be equal to 2
The coefficient of x 2 is 2001 C 2 = 2 0 0 1 0 0 0