Combinatorics. Find the number of three digit numbers from 100 to 999 inclusive which have any digit that is the average of other two? Combinatorics. Find the number of three digit numbers from 100 to 999 inclusive which have any digit that is the average of other two? 
i tried to do it by making different cases but the answer did not match.
the answer is 121
 A: First of all, if the digits are the same, there are $9$ (those are $111,222,\cdots,999$). If the digits are different, then we can do the following.
Pick any number $a$ between $1$ and $9$ (exactly $9$ possibilities for this). The other number $b$, that is, the one you want to take the average with, must be the same $\mod 2$ (so if $a$ is even, then so is $b$, and if $a$ is odd, so is $b$ - otherwise $\frac{a+b}2$ is not an integer). Let's look at the case where $a$ is odd first (five possibilities) and so is $b$ (four possibilies, since it cannot be equal to $a$ - makes total of 20, and there are $6$ permutations, so that makes 120, but now we got double the actual amounts since we can swap $a$ and $b$, that is, we get the same result for $a=n$ and $b=m$ as $a=m$ and $b=n$, so that makes 60 total possibilities).
We do the same for even $a$ (four possibilities), and so there are $3$ choices for $b$ (that makes $12$ total possibilities, 6 permutations, divide by $2$, makes $36$). Now we have found a total of $9+60+36=105$ numbers. But we still need to find all the numbers with a digit $0$. Since $0$ cannot be the average of the other two (then the number would be $000$), we have $a=0$, so four possibilities for $b$ (because $b$ has to be even for the last digit $\frac{a+b}2=\frac b2$ to be defined), and only $4$ permutations, since the number cannot start with $0$, and we don't divide by two, since $a$ is fixed, which makes a total of $4\cdot 4=16$ possibilities. The total of all of those numbers thus is $105+16=121$.
Hope this helped!
A: Let the three digits by $a, b, c$ (not necessarily in order) and let $a \le b \le c$.  As one is the average of the other two, $b = c - k = a + k$ (which also means $c = a + 2k$).
$k$ can go from $0$ to $4$.
If $k = 0$, $a = b = c$ and there are 9 such options.
Otherwise there are $a$ can span from $0$ to $9 - 2k$ so there are $9 - 2k + 1$ options.  For example.  if $k = 1$ the options are $(0,1,2)...(7,8,9)$.  That is 8 options.  If $k = 2$ the options are $(0,2,4) ....(5,7,9)$.  That is 6 options.
For $k = 1,2,3,4$ there are 8, 6, 4, 2 options or 20 total.  For each of these options, the digits are all different so there are 6 ways to arrange them.  (abc,acb,bac,bca,cab,cba).  So there are 20*6 =120 ways the digits can be different.
But you can't have the first digit equal to zero. There are four cases where $a = 0$ and $b = k$ and $c = 2k$.  Of those four cases there are two ways to arrange them.  (0bc, and 0cb). So there our 8 "forbidden" cases where the first digit is 0.
So there or 120 - 8 = 112 ways to do this where the digits are not all the same.
And there are 9 ways to do the where the digits are all the same.
So there are 112 + 9 = 121 ways total. 
