Find the number of three digit numbers from 100 to 999 inclusive which have any one-digit that is the average of the other two.
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.
Excellente Solution. Mérite un upvote.
With one of the digit as 1 to begin with:
102, 111 → possible cases
102 can be permuted in 4 ways to give a three digit number. 111 can permuted in 1 way for the same reason.
Now, let a digit be 2
240, 231, 222 → possible cases
240 → 4 sub-cases
231 → 6 sub-cases
222 → 1 sub-case
Now let a digit be 3
360, 351, 342, 333 → possible cases
360 → 4 sub-cases
351 → 6 sub-cases
342 → 6 sub-cases
333 → 1 sub-case
Now let a digit be 4
408, 417, 426, 453, 444 → possible cases
408 → 4 sub-cases
417 → 6 sub-cases
426 → 6 sub-cases
453 → 6 sub-cases
444 → 1 sub-case
Now let a digit be 5
519, 528, 537, 546, 555 → possible cases
519 → 6 sub-cases
528 → 6 sub-cases
537 → 6 sub-cases
546 → 6 sub-cases
555 → 1 sub-case
Now let a digit be 6
639, 648, 657, 666 → possible cases
639 → 6 sub-cases
648 → 6 sub-cases
657 → 6 sub-cases
666 → 1 sub-case
Now let a digit be 7
759, 768, 777 → possible cases
759 → 6 sub-cases
768 → 6 sub-cases
777 → 1 sub-case
Now let a digit be 8
879, 888 → possible cases
879 → 6 sub-cases
888 → 1 sub-case
At last, let a digit be 9
999 is the only case and sub-case.
Now sum of all the subcases is 1 2 1
We can create 3 cases as: 111,222=>9 numbers
AP triplets having 0 =>(0,1,2),(0,2,4),(0,3,6),(0,4,8) 4 each
AP triplets without 0 (6 numbers each)=>1(common difference=4)+3(c.d=3)+5(c.d=2)+7(c.d=1)=16
9+16+96=121
Problem Loading...
Note Loading...
Set Loading...
We write a 3-digit number as a b c .
Having one digit being the average of the two others means being able to chose two digits, and having no choice for the third one. But those two digits have to be of the same parity, otherwise their average would not be an integer. Indeed, take i , j ∈ N , then ( 2 i + 2 j ) / 2 and ( 2 i + 1 + 2 j + 1 ) / 2 are in N whereas ( 2 i + 1 + 2 j ) / 2 is not.
We also have to make sure that the first digit is positive. Therefore we count : For ( b , c ) both pair numbers we have 5 × 5 choices minus 1 (we exclude ( 0 , 0 ) ) and for ( a , c ) or ( a , b ) pairs we have 4 × 5 choices each because a is chosen in { 2 , 4 , 6 , 8 } and b ∈ { 0 , 2 , 4 , 6 , 8 } . But 2 2 2 , 4 4 4 , 6 6 6 , 8 8 8 are counted twice too many. Adding all this up gives : 5 2 − 1 + 2 × 4 × 5 − 2 × 4 = 5 6
For impairs we don't have the problem with a being equal to 0 , so a , b , c all play the same role. For each pair of two digits ( a , b ) , ( b , c ) , or ( a , c ) we can chose 5 × 5 combinations, and removing the 1 1 1 , 3 3 3 , 5 5 5 , 7 7 7 , 9 9 9 twice gives 5 2 × 3 − 5 × 2 = 6 5 .
Finally, the result is 6 5 + 5 6 = 1 2 1