A number is removed from the set of integers from $1$ to $n$. Now, the average of remaining numbers turns out to be $40.75$. Which integer was removed?
By some brute force, I got $61$. I want to know if there's any analytic approach?
A number is removed from the set of integers from $1$ to $n$. Now, the average of remaining numbers turns out to be $40.75$. Which integer was removed?
By some brute force, I got $61$. I want to know if there's any analytic approach?
The average of the integers $1$ through $n$ is $\frac12(n+1)$. Removing a number smaller than this will increase the average, and removing a number larger than this will lower it. In particular, removing $1$ will cause the maximum increase in the average, to
$\frac1{n-1}\left(\frac{n(n+1)}2-1\right)=\frac{n^2+n-2}{2(n-1)}=\frac{(n+2)(n-1)}{2(n-1)}=\frac12(n+2)\;,$
and removing $n$ will cause the maximum decrease in the average, to
$\frac1{n-1}\left(\frac{n(n+1)}2-n\right)=\frac{n^2-n}{2(n-1)}=\frac{n}2\;.$
The new average of $40.75$ therefore must be between $\frac{n}2$ and $\frac12(n+2)=\frac{n}2+1$, inclusive. Life becomes easier if we double everything: $81.5$ must be between $n$ and $n+2$, inclusive. That is, $n\le 81.5\le n+2\;,$ and therefore $79.5\le n\le 81.5\;.$ Since $n$ must be an integer, the only possibilities are $n=80$ and $n=81$.
The sum of the integers $1$ through $80$ is $3240$, so if $n=80$, you need to find $k$ in the range from $1$ to $80$ inclusive so that $\frac{3240-k}{79}=40.75\;.$ However, the solution to this equation is not an integer, so $n$ must be $81$.
The sum of the integers $1$ through $81$ is $3321$, so this time you want $k$ satisfying $\frac{3321-k}{80}=40.75\;,$ which is easily solved to find that $k=61$.
We want $\ \frac{n(n+1)}2-m=\frac {163(n-1)}4\ $ with $m\le n\ $ so that :
$n-1 = 4k$ with $k\in \mathbb{N}\ $ and the equation becomes :
$m=f(k)$ with $f(k):=(4k+1)(2k+1)- 163k\ $ and $1\le\ m\le 4k+1\ $
so that $k\approx \frac {163}{2\cdot 4}\approx 20$
Trying $f(19)$ to $f(21)$ should be enough!
Hint $\rm\displaystyle\ \frac{n(n\!+\!1)/2-k}{n\!-\!1}\, =\, \frac{n}2 + \frac{n\!-\!k}{n\!-\!1}\,\in\, \left[\frac{n}2,\frac{n}2\!+\!1\right] \ni40.75\ \Rightarrow\ n\in[81.5,79.5]\ \Rightarrow\ k = \ldots$