Hamilton 2016 Q5
5. James chooses five different positive integers, each at most eight, so that their mean is equal to their median.
In how many different ways can he do this?
Hamilton Olympiad 2016, Question 5. © UK Mathematics Trust. Original paper on ukmt.org.uk
Answer: 10
Since there are five different positive integers, the middle one is at least 3. But the five numbers are at most 8, so the middle one is at most 6.
However, the middle value is the median of the numbers, which we are told is equal to the mean. Let the integers, in increasing order, be \(a\), \(b\), \(c\), \(d\) and \(e\). Thus \(c\) is the median and therefore the mean.
Because \(c\) is the mean, \(a + b + c + d + e = 5c\), and thus \((a + b) + (d + e) = 4c\). We know that \(d + e\) is at most \(7 + 8 = 15\), so that \(a + b\) is at least \(4c - 15\); also, \(a + b\) is at most \((c - 2) + (c - 1) = 2c - 3\).
For each value of \(c\), we first list the possible values of \(a + b\). From \(a + b\) we find \(d + e\).
Finally, we list the possible values of \(a\), \(b\), \(d\) and \(e\), using \(0 < a < b < c < d < e\). The following table shows the results.
| \(c\) | \(a + b\) | \(d + e\) | \(a\) | \(b\) | \(d\) | \(e\) |
| 3 | 3 | 9 | 1 | 2 | 4 | 5 |
| 4 | 3 | 13 | 1 | 2 | 5 | 8 |
| 1 | 2 | 6 | 7 | |||
| 4 | 12 | 1 | 3 | 5 | 7 | |
| 5 | 11 | 2 | 3 | 5 | 6 | |
| 5 | 5 | 15 | 1 | 4 | 7 | 8 |
| 2 | 3 | 7 | 8 | |||
| 6 | 14 | 2 | 4 | 6 | 8 | |
| 7 | 13 | 3 | 4 | 6 | 7 | |
| 6 | 9 | 15 | 4 | 5 | 7 | 8 |
So altogether there are 10 ways for James to choose the integers.
Solution © UK Mathematics Trust, from the Hamilton Olympiad 2016 solutions.