7. On the board are the integers from 1 to $n$. One of the numbers is erased. The average of the remaining numbers is $11 \frac{1}{4}$.

Which number was erased?
A) 6
B) 7
C) 11
D) 12
E) 21
A7. A) 6 The average of the numbers from 1 to $n$ is exactly $\frac{n+1}{2}$. We can divide the numbers into pairs, with one number remaining if $n$ is odd: 1 paired with $n$, 2 paired with $n-1$, and so on. The average of each pair is then $\frac{n+1}{2}$.

If we remove a number, the smallest possible average that remains is the average of the numbers from 1 to $n-1$, which is exactly $\frac{n}{2}$. This is because we have removed the largest number. The largest possible average that remains is the average of the numbers from 2 to $n$, which is exactly $\frac{n+2}{2}$.

Thus, we have $\frac{n}{2} \leqslant \frac{45}{4}$ and $\frac{45}{4} \leqslant \frac{n+2}{2}$. Multiplying these inequalities by 2, we get $n \leqslant \frac{45}{2} \cdot 2 = 45/2 \cdot 2 = 22.5$. Therefore, there are two possibilities: $n=21$ or $n=22$. We will now show that $n=22$ is not possible.

If $n$ were 22, then 21 numbers would remain. Taking the average of 21 integers means we first add 21 integers and then divide the result by 21. This gives us a fraction of the form $\frac{S}{21}$. This can never equal $\frac{45}{4}$. The equation $\frac{S}{21}=\frac{45}{4}$ implies $4S = 21 \cdot 45$, but $21 \cdot 45$ is not divisible by 4.

So we start with the numbers from 1 to 21. The sum of these numbers is exactly 21 times the average: $21 \cdot \frac{21+1}{2} = 21 \cdot 11 = 231$. The average of the remaining 20 numbers must be $\frac{45}{4}$, so the sum of the remaining numbers must be $20 \cdot \frac{45}{4} = 225$. This means we must remove the number $231 - 225 = 6$.