## Task B-4.5.

Lea was teaching her sister Ela to add natural numbers. After some time, Lea chose a natural number $n$ and wrote $1+2+3+\cdots+n$ on a piece of paper. While adding, Ela mistakenly added one of the written numbers twice and ended up with a result of 228. How many numbers did Ela need to add? Which number did she add twice?
## First solution.

Let $x$ be the number that Ela added twice. Then we have

$$
\begin{gathered}
1+2+3+\cdots+n+x=228, \quad 1 \leqslant x \leqslant n \\
\frac{n(n+1)}{2}+x=228 \\
n(n+1)+2 x=456
\end{gathered}
$$

From (1) and (2) it follows that

$2 \leqslant 456-n(n+1) \leqslant 2 n$, or

$n^{2}+n \leqslant 454$ and $n^{2}+3 n \geqslant 456$.

This system can be written as

$$
\left(n+\frac{1}{2}\right)^{2} \leqslant 454+\frac{1}{4} \quad \text { and } \quad\left(n+\frac{3}{2}\right)^{2} \geqslant 456+\frac{9}{4}
$$

from which it follows that $n \geqslant 19.9$ and $n \leqslant 20.9, n \in \mathbb{N}$.

The only natural number that satisfies both inequalities is $n=20$.