# Number problem

1. Jan 22, 2007

### Ja4Coltrane

1. The problem statement, all variables and given/known data
How many three digit numbers are there that the middle digit is the average of the first and last digit.

3. The attempt at a solution

I started with 9 because of 111, 222,...999
then I added 7 for 123, 234,...789
then 5 for 135, 246,...579
3 for 147, 258, 369
1 for 159
that gives 24 but I doubled it for 123 and 321
that's 48 but I then subtracted 9 for 111=111
that leaves 39 which is not one of the possible correct answers.

2. Jan 22, 2007

### HallsofIvy

Does 011 or 000 count as a "three digit number"? I'm going to assume it does not.

In order that the average of two numbers, (a+b)/2, be an integer a+ b must be even which means that either the two numbers are both even or that they are both odd. The first digit can be any of 1 through 9. If the first digit is odd, the last digit can be any of the 5 odd digits. If the first digit is even, the last digit can be any of the 5 even digits (we can count 0 now). That is, there are 5(9)= 45 choices for the first and last digits. But the requirement that the middle digit be the average of the first and last means that the middle digit is "given" by the first and last- there are no other choices. There are 45 possible 3 digit numbers such that the middle digit is the average of the first and last digits.

If 000, 00a, 0ab are allowed, then there are 10 choices for the first digit and, still, 5 choices for the last digit for each of those. There are 10(5)= 50 such numbers.