One number is removed from the set of integers from $1$ to $n.$ The average of the remaining numbers is $163/4.$ Which integer was removed? 
One number is removed from the set of integers from $1$ to $n.$ The average of the remaining numbers is $\dfrac{163}4$.  Which integer was removed?

Source. British Mathematical Olympiad 2010/11, Round 1, Problem 1
I was hoping if someone could spot the flaw in my working for this question.
Attempt.
I began by letting the integer that was removed be $x$.
Then: $$\frac{1 + 2 + \cdots + (x-1) + (x+1) +\cdots + n} {n-1} = \frac{163}{4}$$
There is two arithmetic sums in the denominator, the first from 1 to $x$ and the second from $x+1$ to $n$.
These are equal to $\frac{x(x-1)}{2}$ and $\frac{(n-x)(n+x+1)}{2}$, and subbing in to first equation this gives:
$$\frac{x(x-1) + (n-x)(n+x+1)}{2(n-1)} = \frac{163}{4}$$
which reduces to:
$$\frac{n^2 + n - 2x}{2(n-1)} = \frac {163}{4}$$
And then:
$$2(n^2 + n -2x) = 163(n-1)$$
At first I thought you could consider factors, as 163 was prime then:
$n-1 = 2$ giving $n = 3$ and $n^2 + n - 2x = 163$, which using $n=3$ gives $x= -75.5$ which isn't our positive integer.
I then tried considering a quadratic in $n$ and using the discriminant but again that just looked to give a negative value of $x.$ I would be grateful for any help
 A: We know that $n$ is odd. Notice that
$$ n^2 - n \leq n^2 + n -2x \leq n^2 +n - 2 $$
$$ \implies n^2 - n \leq \frac{163}{2}(n-1) \leq n^2 +n - 2  $$
which gives us $n \geq 79.5$ and $n\leq 81.5$, so $n=81$
A: This is not how you are supposed to solve it, but I feel like cheating. We have the equation $2(n^2+n-2x)=163(n-1)$, and $1\leq x\leq n$.
If you assume that $x=1$ then you solve for $n$ using the quadratic formula, and you obtain $79.5$.
If you assume that $x=n$ then you solve for $n$ you obtain $81.5$. Thus $n=80$ or $n=81$.
If $n=80$ then you can solve for $x$ and obtain $83=4x$, wrong. So $n=81$. Solving again yields $4n=244$, and ding ding, we have a winner.

As everyone else seems to have done this in the way I considered cheating, I should expand on the way I initially did it, which is completely different.
We have $2(n^2+n-2x)=163(n-1)$, and $1\leq x\leq n$. We see that $n$ is odd, so $n=2m+1$. Substituting in and cancelling the 2s yields
$$(2m+1)^2+(2m+1)-2x=163m$$
or
$$4m^2+2-2x=157m.$$
Write $y=x-1$ and also, the LHS is even, so $m=2a$ is even. More substituting  and removing the $2$ from both sides yields
$$8a^2-y=157a.$$
The crucial point: we see that $a\mid y$. Since $n=2m+1=4a+1$, and $y$ is a multiple of $a$, $y=\alpha a$ for $\alpha$ between $1$ and $4$. Dividing through by $a$ yields
$$8a-\alpha=157.$$
Taking congruences modulo $8$ yields $\alpha\equiv 3\bmod 8$, so $\alpha=3$. Thus $y=3a$, so $x=3a+1$ and $n=4a+1$. We put this back into the top equation, $2(n^2+n-2x)=163(n-1)$, to obtain $a=20$, so $n=81$, $x=61$.
A: The average of $1,2,3,\ldots,n$ is the number halfway between the endpoints, $(n+1)/2,$ so the sum is $n(n+1)/2.$ Omitting $x$ from among $1,2,3,\ldots,n,$ we get the sum $n(n+1)/2-x.$
Thus the average of $1,2,3,\ldots,n$ must be a weighted average of $\big( n(n+1)/2-x\big)/(n-1)$ and $x,$ with respective weights $(n-1)/n$ and $1/n.$
$$
\frac{n-1} n \left( \frac{n(n+1)/2} {n-1} - \frac x {n-1} \right) + \frac 1 n\cdot x = \frac{n+1} 2
$$
Therefore we have:
\begin{align}
& \frac{n-1} n \cdot \frac{163} 4 + \frac x n = \frac{n+1} 2 \\[8pt]
& \frac{n(n+1)}{2(n-1)} - \frac x {n-1} = \frac{163} 4
\end{align}
So we get a system of two equations that is quadratic in $n$ and linear in $x.$ I'd try solving for one of those two in terms of the other and then substituting and solving the remaining equation.
A: Say you're removing $x$ from the set $1, 2, \ldots, n$.  The average of the resulting numbers will be at least $n/2$ (if you remove $n$) and at most $(n+2)/2$ (if you remove $1$.)  So we have
$$ n/2 \le 163/4 \le (n+2)/2 $$
or, multiplying through by 4,
$$ 2n \le 163 \le 2n+2. $$.
So $n = 81$.  You don't have to explicitly work out the number being removed, but it's $(1 + 2 \ldots + 81) - (163/4) \times 80$ = $(81 \times 82)/2 - (163/4) \times 80 = 61$.
