Digit Sum 18

How many 3 digit positive integers N = a b c N= \overline{abc} are there, such that the digit sum of N N (i.e. a + b + c a+b+c ) is equal to 18?

Details and assumptions

The number 012 = 12 012=12 is a 2-digit number.


The answer is 54.

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.

10 solutions

Jp Delavin
May 20, 2014

For non-negative integers a , b a,b and c c , the equation a + b + c = 18 a+b+c=18 has ( 20 2 ) = 190 \binom{20}{2}=190 solutions.

However, this also counts the cases where a , b a,b or c c is greater than 9 9 . We should discount these cases.

Let 10 a 18 10 \leq a \leq 18 . The equation b + c = 18 a b+c=18-a has ( 18 a + 1 1 ) = \binom{18-a+1}{1}= ( 19 a 1 ) = \binom{19-a}{1}= 19 a 19-a solutions.

a = 10 18 19 a = a = 1 9 a = 9 ( 9 + 1 ) 2 = 45 \displaystyle\sum_{a=10}^{18} 19-a=\displaystyle\sum_{a=1}^{9} a=\frac{9(9+1)}{2}=45 solutions.

By symmetry, there are also 45 solutions in cases where b b or c c is greater than 9 9 . Also, note that there will never be a case where two of a , b a,b or c c are greater than or equal to 10 10 since 10 + 10 = 20 > 18 10+10=20>18 .

We should also determine the number of solutions where a = 0 a=0 , since a a represents the first digit of a 3 3 -digit number. Since we already know the number of ways where a , b a,b or c c is greater than 9 9 , we are only concerned with cases such that a = 0 a=0 and b b and c c are less than 10 10 . There is only one such case, namely, ( 0 , 9 , 9 ) (0,9,9) .

Thus, the desired number is 190 3 × 45 1 = 54 190-3\times45-1=54 .

Most students did a case by case analysis, either from sets of numbers a + b + c = 18 a+b+c=18 , or looking at the hundreds digit. John shows us a procedure of dealing with the conditions a , b , c , 9 a, b, c, \leq 9 in a more general way by using the Principle of Inclusion and Exclusion.

Lawrence presents an interesting interpretation of the a + b + c = 18 a+b+c=18 condition to quickly count the number of ways.

Calvin Lin Staff - 7 years ago
Lawrence Sun
May 20, 2014

There are obviously 111 12 + 1 = 100 111 - 12 + 1 = 100 numbers from 100 to 999 divisible by 9. Now, if a number has digit sum 18 it is clearly divisible by 9. There is one number with digit sum 27 from 100 to 999 (namely, 999). How many of them have digit sum 9? This is just a standard balls and urns problem, and the answer is simply ( 11 2 ) 10 = 45 {11 \choose 2} - 10 = 45 . The reasoning behind this math? The 10 -10 comes from the 10 numbers less than 100 with digit sum 9. The ( 11 2 ) {11 \choose 2} comes from the fact that that is the number of solutions to a + b + c = 9 a+b+c = 9 where a , b , c a,b,c are nonnegative integers.

Hence it follows the number of numbers with digit sum 18 is 100 45 1 = 54 100 - 45 - 1 = 54 , the desired answer.

Jephthah Orobia
May 20, 2014

Since a a cannot be 0 0 then a = { 1 , 2 , 3 , . . . , 9 } a=\{1,2,3,...,9\} , Let a = 1 a=1 , then ( b , c ) = { ( 8 , 9 ) , ( 9 , 8 ) } (b,c) = \{(8, 9),(9, 8)\} , thus there are 2 2 when a = 1 a=1 ; Let a = 2 a=2 , then ( b , c ) = { ( 7 , 9 ) , ( 9 , 7 ) , ( 8 , 8 ) } (b,c) = \{(7, 9),(9, 7),(8,8)\} , thus there are 3 3 when a = 2 a=2 ; Let a = 3 a=3 , then ( b , c ) = { ( 6 , 9 ) , ( 9 , 6 ) , ( 8 , 7 ) , ( 7 , 8 ) } (b,c) = \{(6, 9),(9, 6),(8,7),(7,8)\} , thus there are 4 4 when a = 3 a=3 ; Hence, for all values of a a , there are a + 1 a+1 three digit number that satisfy the condition, thus: 2 + 3 + 4 + . . . + 10 = 9 ( 2 + 10 ) 2 = 54 2+3+4+...+10 = \frac {9(2+10)}{2} = 54 there are 54 54 three digit number.

Bryan Tran
May 20, 2014

For 3 digit numbers with distinct digits, you can list out all the different summations of 18 with distinct addends, which are: 189 279 378 269 468 459 567 There are 7 of these, which each have 6 permutations, so there are 42 3 digit numbers with distinct digits. For numbers with 2 digits being the same, there are only 3: 288 477 558. There are 3 permutations for each of these so there are 9 total. There are special cases we need to count, being 666, which is 1 additional number, and 909 and 990, which have the zero in them, adding 2 more. So the answer is 42+9+1+2=54

Sunny Kama
May 20, 2014

Let us do this problem using permutations as follows... Consider all possible three digit arrangements given here The three digits are - 9 9 0 & possible permutations are - 2 The three digits are - 9 8 1 & possible permutations are - 6 The three digits are - 9 7 2 & possible permutations are - 6 The three digits are - 9 6 3 & possible permutations are - 6 The three digits are - 9 5 4 & possible permutations are - 6 The three digits are - 8 8 2 & possible permutations are - 3 The three digits are - 8 7 3 & possible permutations are - 6 The three digits are - 8 6 4 & possible permutations are - 6 The three digits are - 8 5 5 & possible permutations are - 3 The three digits are - 7 7 4 & possible permutations are - 3 The three digits are - 7 6 5 & possible permutations are - 6 The three digits are - 6 6 6 & possible permutations are - 1 Therefore the total number of three digit numbers whose digit sum is equal to 18 is = 2 + 6 + 6 + 6 + 6 + 3 + 6 + 6 + 3 + 3 + 6 + 1 = 54

Frank Fazekas
May 20, 2014

Consider the case a = 1. Therefore, b + c = 17. There are two solutions: (1, 9, 8) and (1, 8, 9). Consider more generally the case a = k, where 1<=k<=9. Similarly, we see that b + c =18 - k. This has k + 1 solutions because b can range from any number from 9 to (9-k) and c is then uniquely determined. Therefore, the answer is 2 + 3 + ... + 10 = 10 *11 / 2 - 1 = 54; note that we are not including 1 in the sum because this corresponds to the case a = 0.

Prasang Gupta
May 20, 2014

Assuming first digit to be 1, only 2 numbers can be formed 198 and 189. If the first digit is 2, 3 combinations are possible-297,288,279 Similarly, we'll get a series from digit 1 (198,189) with 2 possible solutions to digit 9 (990,81,72,...27,18,09) with 10 possible solutions. Summing them up gives 54.

Joanne Tan
May 20, 2014

First, list the possible number combinations starting from the highest value. Then, compute and add the number of possible permutations for each of the listed combinations.

990 - 2
981 - 6
972 - 6
963 - 6
954 - 6
882 - 3
873 - 6
864 - 6
855 - 3
774 - 3
765 - 6
666 - 1









Total = 54

Yan Zhang
May 20, 2014

18 is consisting of two different digits: (0 9 9) ,(2 8 8), (4 7 7), (5 5 8) three different digits (1 8 9), (2 7 9),(3 6 9), (3 7 8), (4 5 9), (4 6 8), (5 6 7), one digit (6 6 6).We know that the combinations of two different digits is 3 ((because 099 doesn't account,so the for (0 9 9)there are only 2 ways); the combinations of three different digits is 6; the combinations of one digit is 1. So let us gather these data together by using 2+3 3+6 7+1=54

Calvin Lin Staff
May 13, 2014

Solution 1: First, let us ignore the restriction that a 0 a \neq 0 . We seek the number of integers 0 a , b , c 9 0 \leq a, b, c \leq 9 such that a + b + c = 18 a+b+c = 18 . Set x = 9 a , y = 9 b , z = 9 c x=9-a, y=9-b, z=9-c . Then, we want the number of integers 0 x , y , z 9 0 \leq x, y, z \leq 9 such that x + y + z = 9 x+y+z=9 . This creates a bijection between the 2 sets.

From the well known bars and stripes argument, there are ( 11 2 ) = 55 {11 \choose 2}=55 non-negative integer solutions to the equation x + y + z = 9 x + y + z=9 . Since these are non-negative, it follows that the maximum value of x , y x, y or z z is going to be 9. Hence, any set of non-negative integers that satisfy x + y + z = 9 x+y+z=9 also satisfy the additional constraint that 0 x , y , z 9 0\leq x, y, z \leq 9 . Thus, there are 55 55 sets of solutions in all.

From the bijection established in the first paragraph, it follows that there are 55 55 sets of 3 digits that sum up to 18. Since we further require that a 0 a \neq 0 , which only happens in the case ( a , b , c ) = ( 0 , 9 , 9 ) (a, b, c) = (0, 9, 9) , hence there are 55 1 = 54 55-1 = 54 sets of solutions in all.

Solution 2: We perform a case by case analysis, based on the value of the first digit. For a = k 0 a=k \neq 0 , we can check that there are k + 1 k+1 values of b b and c c that satisfy the given conditions. Hence, there are 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 = 54 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 = 54 such 3-digit numbers.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...