Equal to 5

How many integers between 1 and 1000 have the sum of the digits equal to 5?


The answer is 21.

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.

3 solutions

John Aries Sarza
May 29, 2014

There are 3 arrangements with digits 0,0,5; 6 with 0,1,4; 6 with 0,3,2; 3 with 0,1,3 and 3 with 1,2,2

A total of 21 \boxed{21}

you should be more specific because sum of digits of 995 also ends up in 5 which gives 111 solutions between 1 to 1000

Saurabh Nenawati - 7 years ago

Log in to reply

The question clearly asked only for the SUMMATION of DIGITS equal to 5. . 995 is not one of the arrangement because 9+9+5=23. It is nice to say that from 23 , the sum again of digits is 5. But make sense, SUMMATION OF DIGITS is not the same as the SUMMATION OF THE SUMMATION OF THE DIGITS. Which means there are only 005,050,500,014,041,104,140... and so on and so forth possible answers.

John Aries Sarza - 7 years ago
Krit Phuengphan
May 31, 2014

The generalized solution is C 7 , 2 = 21 C_{7,2}=21 For any number, there are invisible bars separating nearby digits. Accordingly, since we want sum of digits of number,which is between 1 1 to 1000 1000 , to be 5 5 ; we therefore have to consider the three-digit numbers, which each has two invisible bars. So, there are 7 7 empty boxes at the beginning and two of those to be chosen. Then the answer jumps out! :)

ps, three-digit number in this method includes two-digit and one-digit number.

Mostafa Balboul
Feb 28, 2016

One solution could to be to transform it into a Combinations-with-repetition problem. Instead of thinking of the different numbers competing for the digits of the number, think of the digits of the number competing for the "ones" that will end up summing to five. For example, 320 could be thought of as: (1-3) (1-3) (1-3) (1-2) (1-2) or even (1-2) (1-3) (1-2) (1-3) (1-3). Because the items (the digit number) are repeating, and their order is irrelevant, this follows the formula for combinations with repetition. The formula is given by (n+r-1)!/r!(n-1)!

One important thing to notice is that, if no "one" is ascribed to the hundreds digit or the tens digit, we will only have a one-digit number. If at least one of the "ones" is given to the tens digit, we will have a two-digit number, while a three-digit number requires at least one "one" for the hundreds digit. Thus, the model of this problem accounts for not only the one-digit numbers, but also the two and three-digit numbers; it can even be extended to numbers with thousands of digits, if necessary.

We have three items (the digit numbers) to fit in five slots (the "ones" that the digits will accumulate to sum up to 5). Our formula is (3+5-1)!/5!(3-1)!, or 7!/5!2!, which evaluates to 21. There are, in fact, 21 different numbers between 1 and 1000 whose digits sum up to 5.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...