Is it AP-ish?

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.

Try my set
123 120 119 121 124 122

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

Charles Dutertre
May 21, 2015

We write a 3-digit number as a b c abc .

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 i,j \in \mathbb{N} , then ( 2 i + 2 j ) / 2 (2i+2j)/2 and ( 2 i + 1 + 2 j + 1 ) / 2 (2i+1+2j+1)/2 are in N \mathbb{N} whereas ( 2 i + 1 + 2 j ) / 2 (2i+1+2j)/2 is not.

We also have to make sure that the first digit is positive. Therefore we count : For ( b , c ) (b,c) both pair numbers we have 5 × 5 5\times 5 choices minus 1 (we exclude ( 0 , 0 ) (0,0) ) and for ( a , c ) (a,c) or ( a , b ) (a,b) pairs we have 4 × 5 4 \times 5 choices each because a a is chosen in { 2 , 4 , 6 , 8 } \{2,4,6,8\} and b { 0 , 2 , 4 , 6 , 8 } b \in \{0,2,4,6,8\} . But 222 , 444 , 666 , 888 222,444,666,888 are counted twice too many. Adding all this up gives : 5 2 1 + 2 × 4 × 5 2 × 4 = 56 5^2 - 1 + 2\times 4 \times 5 - 2 \times 4 = 56

For impairs we don't have the problem with a a being equal to 0 0 , so a , b , c a,b,c all play the same role. For each pair of two digits ( a , b ) (a,b) , ( b , c ) (b,c) , or ( a , c ) (a,c) we can chose 5 × 5 5\times 5 combinations, and removing the 111 , 333 , 555 , 777 , 999 111,333,555,777,999 twice gives 5 2 × 3 5 × 2 = 65 5^2 \times 3 - 5\times 2 = 65 .

Finally, the result is 65 + 56 = 121 65 + 56 = 121

Excellente Solution. Mérite un upvote.

Vishwak Srinivasan - 6 years ago

With one of the digit as 1 1 to begin with:

102, 111 \rightarrow 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 2

240, 231, 222 \rightarrow possible cases

240 \rightarrow 4 sub-cases

231 \rightarrow 6 sub-cases

222 \rightarrow 1 sub-case

Now let a digit be 3 3

360, 351, 342, 333 \rightarrow possible cases

360 \rightarrow 4 sub-cases

351 \rightarrow 6 sub-cases

342 \rightarrow 6 sub-cases

333 \rightarrow 1 sub-case

Now let a digit be 4 4

408, 417, 426, 453, 444 \rightarrow possible cases

408 \rightarrow 4 sub-cases

417 \rightarrow 6 sub-cases

426 \rightarrow 6 sub-cases

453 \rightarrow 6 sub-cases

444 \rightarrow 1 sub-case

Now let a digit be 5 5

519, 528, 537, 546, 555 \rightarrow possible cases

519 \rightarrow 6 sub-cases

528 \rightarrow 6 sub-cases

537 \rightarrow 6 sub-cases

546 \rightarrow 6 sub-cases

555 \rightarrow 1 sub-case

Now let a digit be 6 6

639, 648, 657, 666 \rightarrow possible cases

639 \rightarrow 6 sub-cases

648 \rightarrow 6 sub-cases

657 \rightarrow 6 sub-cases

666 \rightarrow 1 sub-case

Now let a digit be 7 7

759, 768, 777 \rightarrow possible cases

759 \rightarrow 6 sub-cases

768 \rightarrow 6 sub-cases

777 \rightarrow 1 sub-case

Now let a digit be 8 8

879, 888 \rightarrow possible cases

879 \rightarrow 6 sub-cases

888 \rightarrow 1 sub-case

At last, let a digit be 9 9

999 is the only case and sub-case.

Now sum of all the subcases is 121 \boxed{121}

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

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...