# If two consecutive numbers are removed from the series 1+2+3+…+n1+2+3+\ldots+n the average becomes 99/499/4. Find the two numbers.

The initial average will be n+12\frac{n+1}{2}. If the two numbers are kk and k+1k+1 then the new average will be n(n+1)/2−(2k+1)n−2\frac{n(n+1)/2-(2k+1)}{n-2}. I couldn’t figure further even though I got the relation between nn and kk in many different ways.

If the question is not clear, here is an example to explain it.
If n=10n=10, the initial average will be 5⋅55\cdot 5 {(1+2+⋯+10)/10(1+2+\cdots + 10)/10}
Now if two consecutive numbers like 2,32,3 or 8,98,9 are removed from this series, the new average changes, and this new average has been given to be 99/499/4, however we also don’t know the value of nn, so the question seems to be pretty difficult.

=================

The initial average is (n+1)/2(n+1)/2, not (n+1)/n(n+1)/n.
– barak manos
2 days ago

That’s what I wrote on paper, but I made a typo in the question. Thanks for pointing out.
– Harsha G.
2 days ago

How can this sequence be said to have an average? For any given average, there exists an nn such that the average of nn or more terms is greater than the given one.
– Myridium
2 days ago

What about the the average of 1+2+3+…10? It is 5.5. And if we remove two consecutive terms for example 2,3 the average changes. This is what the question is saying. Just we don’t know the number of terms, and we have to also find the two consecutive numbers which have been removed. Hope that makes it clear.
– Harsha G.
2 days ago

In that case, please edit your question to clarify that we are trying to solve for nn as well (also saying what nn is).
– Myridium
2 days ago

=================

5

=================

As in Claude Leibovici’s answer, removing k+(k+1)k+(k+1) from 1+2+⋯+n1+2+\cdots+n to leave an average of 99/499/4 implies, after a bit of algebra, that

k=2n2−97n+1948k={2n^2-97n+194\over8}

is an integer between 11 and n−1n-1. It’s easy to see that kk being an integer implies n≡2n\equiv2 mod 88. If we write n=8m+2n=8m+2 (with m>0m\gt0, since n=2n=2 is obviously not possible), we find, after a tad more algebra, that k=16m2−89m+1k=16m^2-89m+1. The inequality constraints are thus now

1≤16m2−89m+1≤8m+11\le16m^2-89m+1\le8m+1

or

89≤16m≤9789\le16m\le97

There is clearly only one integer solution: m=6m=6, corresponding to n=50n=50 and k=43k=43.

This problem is really amazing. Manipulating inequalities, the bounds are so close to each other !
– Claude Leibovici
2 days ago

The new average will be n(n+1)2−(2k+1)n−2=994\frac{\frac{n(n+1)}2-(2k+1)}{n-2}=\frac {99}4 Solving for kk gives k=2n2−97n+1948k=\frac{2 n^2-97 n+194}{8} which must be a positive integer lower or equal to nn.

Solving for nn gives n=97+√64k+78574n=
\frac{97+\sqrt{64 k+7857}}{4} which must be an integer.

Now consider the extreme cases k=1k=1 and k=n−1k=n-1; this gives very narrow bounds for nn. From algebra, k=1→n=932k=1\to n=\frac{93}2 and k=n−1→n=1012k=n-1\to n=\frac{101}2. In the worst case, only four values of nn would need to be tested.

I guess not. My teacher asked for the values.
– Harsha G.
2 days ago

@HarshaG.. There is a solution. Try to find it.
– Claude Leibovici
2 days ago

I did get this relation myself, but it doesn’t lead to much revelation.
– Harsha G.
2 days ago

1

Actually, k+1≤nk+1 \le n.
– lhf
2 days ago

@lhf. You are right !
– Claude Leibovici
2 days ago

This approach finds that the new average lies within ±1\pm 1 of the original average. This significantly narrows down possibilities, and the solution can then be found easily by elimination.

After removing the two numbers, the new average, aa, is given by
994=a=n(n+1)2−(2k+1)n−2=n+12⏟original average, a0+n−2kn−2⏟∈[−1,1] for 1≤k≤n−1\begin{align}
\frac {99}4=a&=\frac{\frac{n(n+1)}2-(2k+1)}{n-2}\\
&=\underbrace{\frac {n+1}2}_{\text{original average, $a_0$}}+
\underbrace{\frac {n-2k}{n-2}}_{\in [-1,1] \text{ for } 1\le k\le n-1}
\end{align}

Hence aa lies within ±1\pm 1 of the original average a0a_0 before removal, i.e.
a0−1≤a=994=24.75≤a0+1a_0-1\;\le\; a=\frac {99}4=24.75\;\le\; a_0+1

As a0=n+12a_0=\frac {n+1}2, this means that
24≤a0≤25.524\le a_0\le 25.5.

a0(n)=n+122424.52525.5n47484950n−245464748a−a0(n)=n−2kn−23414−14−34\begin{array} {lrrrr}
\hline{a_0(n)=\frac{n+1}2} &24&24.5&25&25.5\\
n &47 &48 &49 &\color{red}{50}\\
n-2 &45 &46 &47 &\boxed{48} \\
a-a_0(n)=\frac {n-2k}{n-2}&\frac 34&\frac 14&-\frac14&-\frac34\\
\hline
\end{array}
Also, the sum of the remaining numbers 994(n−2)\frac {99}4 (n-2) must be integer, so (n−2)(n-2) must a multiple of 44, the only candidate for which is 4848.

Hence we conclude that n=50,k=43◼\color{red}{n=50, k=43}\qquad \blacksquare

We have, that the sum of n+1n+1 terms, excluding the mm-th and m+1m+1-th, is:
S(n+1,m)=∑1⩽k⩽m−1k+∑m+2⩽k⩽n+1k=∑1⩽k⩽m−1k+∑1⩽k⩽n−m(k+m+1)==(m2)+(m+1)(n−m)+(n+1−m2)==12m(m−1)+(m+1)(n−m)+12(n+1−m)(n−m)==12(m(n−1)+(n+3)(n−m))==12(n(n−1)+4(n−m))=n(n+3)2−2m
\begin{gathered}
S(n + 1,m) = \sum\limits_{1\, \leqslant \,k\, \leqslant \,m – 1} k + \sum\limits_{m + 2\, \leqslant \,k\, \leqslant \,n + 1} k = \sum\limits_{1\, \leqslant \,k\, \leqslant \,m – 1} k + \sum\limits_{1\, \leqslant \,k\, \leqslant \,n – m} {\left( {k + m + 1} \right)} = \hfill \\
= \left( \begin{gathered}
m \\
2 \\
\end{gathered} \right) + \left( {m + 1} \right)\left( {n – m} \right) + \left( \begin{gathered}
n + 1 – m \\
2 \\
\end{gathered} \right) = \hfill \\
= \frac{1}
{2}m\left( {m – 1} \right) + \left( {m + 1} \right)\left( {n – m} \right) + \frac{1}
{2}\left( {n + 1 – m} \right)\left( {n – m} \right) = \hfill \\
= \frac{1}
{2}\left( {m\left( {n – 1} \right) + \left( {n + 3} \right)\left( {n – m} \right)} \right) = \hfill \\
= \frac{1}
{2}\left( {n\left( {n – 1} \right) + 4\left( {n – m} \right)} \right) = \frac{{n\left( {n + 3} \right)}}
{2} – 2m \hfill \\
\end{gathered}

So we shall have:

\begin{gathered}
\frac{{S(n + 1,m)}}
{{n – 1}} = \frac{{99}}
n – 1 = 4\,q \hfill \\
S(n + 1,m) = \frac{{n\left( {n + 3} \right)}}
{2} – 2m = 99\;q \hfill \\
1 \leqslant m \leqslant n = 4\,q + 1 \hfill \\
n\left( {n + 3} \right) = 198\;q + 4m \hfill \\
\end{gathered} \right. \hfill \\
\end{gathered}

\begin{gathered}
\frac{{S(n + 1,m)}}
{{n – 1}} = \frac{{99}}
n – 1 = 4\,q \hfill \\
S(n + 1,m) = \frac{{n\left( {n + 3} \right)}}
{2} – 2m = 99\;q \hfill \\
1 \leqslant m \leqslant n = 4\,q + 1 \hfill \\
n\left( {n + 3} \right) = 198\;q + 4m \hfill \\
\end{gathered} \right. \hfill \\
\end{gathered}

The last gives:

\begin{gathered}
4 \leqslant 4\left( {4q + 1} \right)\left( {q + 1} \right) – 198\;q = 4m \leqslant 4\left( {4\,q + 1} \right) \hfill \\
0 \leqslant \left( {4q + 1} \right)\left( {q + 1} \right) – \frac{{198}}
{4}\;q – 1 \leqslant 4\,q \hfill \\
0 \leqslant q^{\,2} – \frac{{178}}
{{16}}\;q \leqslant \,q \hfill \\
0 \leqslant q – \frac{{178}}
{{16}} \leqslant \,1 \hfill \\
\end{gathered}

\begin{gathered}
4 \leqslant 4\left( {4q + 1} \right)\left( {q + 1} \right) – 198\;q = 4m \leqslant 4\left( {4\,q + 1} \right) \hfill \\
0 \leqslant \left( {4q + 1} \right)\left( {q + 1} \right) – \frac{{198}}
{4}\;q – 1 \leqslant 4\,q \hfill \\
0 \leqslant q^{\,2} – \frac{{178}}
{{16}}\;q \leqslant \,q \hfill \\
0 \leqslant q – \frac{{178}}
{{16}} \leqslant \,1 \hfill \\
\end{gathered}

i.e.

\frac{{178}}
{{16}} \leqslant q \leqslant \,\frac{{194}}
{{16}}} \right\rceil \leqslant q \leqslant \,\left\lfloor {10 + \frac{{34}}

\frac{{178}}
{{16}} \leqslant q \leqslant \,\frac{{194}}
{{16}}} \right\rceil \leqslant q \leqslant \,\left\lfloor {10 + \frac{{34}}

In conclusion, so we have:

\left\{ \begin{gathered}
q = 12 \hfill \\
n = 4\,q + 1 = 49 \hfill \\
m = \frac{1}
{4}\left( {n\left( {n + 3} \right) – 198\;q} \right) = 43 \hfill \\
\end{gathered} \right.

\left\{ \begin{gathered}
q = 12 \hfill \\
n = 4\,q + 1 = 49 \hfill \\
m = \frac{1}
{4}\left( {n\left( {n + 3} \right) – 198\;q} \right) = 43 \hfill \\
\end{gathered} \right.

which in fact gives:

\frac{{S(n + 1,m)}}
{{n – 1}} = \frac{{\frac{{n\left( {n + 3} \right)}}
{2} – 2m}}
{{n – 1}} = \frac{{\frac{{49 \cdot 52}}
{2} – 86}}
{{48}} = \frac{{1188}}
{{48}} = \frac{{99}}
{4}

\frac{{S(n + 1,m)}}
{{n – 1}} = \frac{{\frac{{n\left( {n + 3} \right)}}
{2} – 2m}}
{{n – 1}} = \frac{{\frac{{49 \cdot 52}}
{2} – 86}}
{{48}} = \frac{{1188}}
{{48}} = \frac{{99}}
{4}

This solutions seems really intriguing, but in a good way. I am in High School, maybe that is why. Which topic in Maths is this solution part of?
– Harsha G.
2 days ago

This is nice, for sure.
– Claude Leibovici
2 days ago

@HarshaG., well actually there is no much of sophisticate about. In the first line I splitted the sum substantially into three parts, but you can easily do it if just you know how to compute \sum\limits_{a\, \leqslant \,k\, \leqslant \,b} k \sum\limits_{a\, \leqslant \,k\, \leqslant \,b} k which is just n.\, of\, terms \times avg.\, value = n.\, of\, terms \times (1st\, term+last\, term)/2n.\, of\, terms \times avg.\, value = n.\, of\, terms \times (1st\, term+last\, term)/2. Then the rest is just manipulation of inequalities, and final is just to find the integer value of qq respecting the bounds.
– G Cab
2 days ago