How many positive integers less than 10,000 are there in which the sum of the digits equals 5?
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.
Let us try some examples, 5, 1211, 230. As the numbers must smaller than 10000, it at most has 4 digits.
Look at the examples again, 5=0005 (which means 5=0+0+0+5), 1211(5=1+2+1+1), 230=0230(5=0+2+3+0). We can find that every unique number means a unique partition of 5. But digits of numbers have specific position (such as 312 and 321 are two different numbers.) Hence, the answer of this question is same as the way of partition of 5 in four integers considering its position (5=0+0+0+1 and 5=0+1+0+0 are consider different .)
This is actually as same as ways of putting 5 identical balls into four different basket. Which is equal to ( 5 5 + ( 4 − 1 ) ) = 5 6 .
(If you are interested why it is equal to ( 5 5 + ( 4 − 1 ) ) = 5 6 , search 'identical object into distinct bins' in Brilliant)