How many three-digit numbers satisfy the property that the middle digit is the average of the first and the last digits?
Problem 124
Official solution
Solution 1
Let the digits be so that . In order for this to be an integer, and have to have the same parity. There are possibilities for , and for . depends on the value of both and and is unique for each . Thus our answer is .
Solution 2
Thus, the three digits form an arithmetic sequence.
If the numbers are all the same, then there are possible three-digit numbers.
If the numbers are different, then we count the number of strictly increasing arithmetic sequences between and and multiply by 2 for the decreasing ones:
Common difference
Sequences possible
Number of sequences
1
8
2
6
3
4
4
2
This gives us . However, the question asks for three-digit numbers, so we have to ignore the four sequences starting with . Thus our answer is .