The digits in the number, 42, add to six. There are exactly six 2-digit numbers with this property: 15, 24, 33, 42, 51, and 60.
How many 3-digit numbers exist for which the sum of the digits is six?
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 the 3 -digit number be a b c where 1 ≤ a ≤ 6 , 0 ≤ b ≤ 6 , 0 ≤ c ≤ 6 .
Then the number of suitable 3 -digit integers is equivalent to the number of integer solutions to the equation a + b + c = 6 with the aforementioned restrictions.
Now let a = a ′ + 1 . Then the equation becomes a ′ + b + c = 5 where each of a ′ , b , c is a non-negative integer. This is now a stars and bars problem, (see Theorem 2 in the link), with solution
( 5 7 ) = 2 1 .
Comments: Using the method discussed above, to find the number of suitable 2 -digit numbers, we would be working with the equation a ′ + b = 5 , giving a solution of ( 5 6 ) = 6 , as expected.
For 4 -digit numbers, we would have a ′ + b + c + d = 5 ⟹ ( 5 8 ) = 5 6 numbers.
In general, for an k -digit number there would be ( 5 k + 4 ) solutions. So, for example, there would be ( 5 1 4 ) = 2 0 0 2 1 0 -digit numbers whose digits sum to 6 .
Nycc one brian 👍
I used C program as
void main() {
int i, count = 0;
int r,n,a;
for(i=100; i<=600;i++) {
a = i;
n = 0;
while(a > 0) {
r = a%10;
n = n+r;
a/=10;
}
if(n == 6)
count++;
}
printf("%d", count);
}
and it prints 21
For every hundredth digit (n ≤ 6) there will be a (6-n) tenth digits So for 6(hundredth digit) - 1(possible case) for 5 - 2 . . for 1 - 6 So sigma n = n(n+1)/2 = 21
firstly fix hundredth digit as 1: 105,114,123,132,141,150 then fix hundredth digit a 2: 204,213,222,231,240 similarly 3: 303,312,321,330 4: 402,411,420 5: 501,510 6: 600
There is exactly twenty-one 3-digit numbers- 114, 141, 411, 105, 150, 510, 501, 123, 321, 231, 312, 213, 132, 600, 222, 240, 204, 402, 420, 330, 303.
Problem Loading...
Note Loading...
Set Loading...
There are exactly twenty-one 3-digit numbers for which the sum of the digits is six: 105, 150, 501, 510, 114, 141, 411, 123, 132, 213, 231, 312, 321, 204, 240, 402, 420, 222, 303, 330, 600