Smallest range
What is the smallest possible range that these 4 integers could have?
Problem
Four integers are chosen so that their mean is 2017.
The integers are all different.
What is the smallest possible range that the 4 integers could have?
This problem is taken from the UKMT Mathematical Challenges.
Student Solutions
Balancing the sum of 4 numbers
If the integers have a small range, then they are all close together. $2017$ is the mean, so they should all be close to $2017.$ If they were allowed to be the same, then they could all be $2017,$ with a range of $0,$ since:
$$(2017 + 2017 + 2017 + 2017)\div4 = 2017$$
We need to change the numbers in the sum so that they are all different to each other without changing the value of the sum. If we decrease one by $1$, then we can increase another by $1$ without affecting the value of the sum:
$$2017 + 2017 + 2017 + 2017=2016+2018+2017+2017$$
Now we still have two integers that are the same. This time we will have to decrease one of them by $2$ and increase the other by $2$:
$$2016+2018+2017+2017=2016+2018+2015+2019$$
So the smallest possible range is the difference between $2019$ and $2015$, which is $4$.
Trying out consecutive integers
To have the smallest range possible, the integers should be as close together as possible, so they should be consecutive.
$2017$ is the mean, so they should all be close to $2017$. So we could try sets of consecutive integers close to $2017$.
$(2014+2015+2016+2017)\div4=8062\div4=2015.5<2017$
$(2015+2016+2017+2018)\div4=8066\div4=2016.5<2017$
$(2016+2017+2018+2019)\div4=8070\div4=2017.5>2017$
So the integers cannot all be consecutive.
Notice that when $2017$ was in the second half of the four consecutive integers (so there were more numbers smaller than $2017$ than larger than $2017$), the mean was too small.
But when $2017$ was in the first half of the four consecutive integers (so there were more numbers larger than $2017$ than smaller than $2017$), the mean was too big.
By removing $2017$ from the four integers, we can choose a set which has two numbers smaller than $2017$ and two numbers larger than $2017$:
$(2015+2016+2018+2019)\div4=8068\div4=2017$.
So the smallest possible range is the difference between $2019$ and $2015$, which is $4$.
Using algebra and factors
To have the smallest range possible, the integers should be as close together as possible, so they should be consecutive. Four consecutive integers can be written as $n,n+1,n+2,n+3$.
So we want $$\begin{align}(n+(n+1)+(n+2)+(n+3))\div4&=2017\\ \Rightarrow n+n+1+n+2+n+3&=4\times2017\\ \Rightarrow4n+6&=4\times2017\end{align}$$
But $4n$ and $4\times2017$ are both multiples of $4$ (when $n$ is an integer), so the difference between them can't be $6$. So the four integers can't be consecutive. The difference between $4n$ and $4\times2017$ should be $4$ or $8,$ so we can tweak our integers to make this difference $4$ or $8.$
Suppose we choose to make the difference $8$, so our sum $n+(n+1)+(n+2)+(n+3)$ needs to increase by $2$. If we increase $n$ or $(n+1)$ by $2$, then we get $(n+2)$ or $(n+3)$ - but that's not allowed, because we've already used $(n+2)$ and $(n+3)$ and the integers are all supposed to be different. If we increase $(n+2)$ or $(n+3)$ by $2$, we get $(n+4)$ or $(n+5)$. To keep the range as small as possible, we should increase $(n+2)$ by $2$ to give $(n+4)$. So now we have: $$\begin{align}(n+(n+1)+(n+4)+(n+3))\div4&=2017\\
\Rightarrow n+n+1+n+4+n+3&=4\times2017\\
\Rightarrow 4n+8&=4\times2017\\
\Rightarrow 4n&=4\times2017-8\\
\Rightarrow 4n&=4\times2017-4\times2\\
\Rightarrow 4n&=4\times(2017-2)\\
\Rightarrow n&=2015\end{align}$$ So the integers are $2015,2016,2019,2018$ and so the range is $4$.