## Task B-4.4.

A sequence is defined by the recursive formula

$$
x_{1}=1, x_{n+1}=x_{n}+2 n+1, n \geqslant 1
$$

Determine $x_{2018}$.
## First Solution.

Let's write down the first $n$ terms of the sequence.

$$
\begin{aligned}
& x_{1}=1 \\
& x_{2}=x_{1}+2 \cdot 1+1 \\
& x_{3}=x_{2}+2 \cdot 2+1 \\
& \quad \cdots \\
& x_{n}=x_{n-1}+2 \cdot(n-1)+1
\end{aligned}
$$

By adding the above equations, we get:

$$
x_{1}+x_{2}+x_{3}+\cdots+x_{n}=x_{1}+x_{2}+\cdots+x_{n-1}+2 \cdot(1+2+\cdots+(n-1))+n \cdot 1 \quad 2 \text { points }
$$

It follows that $x_{n}=2 \cdot \frac{(n-1) \cdot n}{2}+n$

or $x_{n}=n^{2}$.

1 point

The desired term is: $x_{2018}=2018^{2}$.