4B. For the real numbers $a_{1}, a_{2}, a_{3}, \ldots, a_{2021}$, it is given that the sum of any three numbers whose indices are consecutive numbers $i, i+1, i+2, i=1, \ldots, 2019$, is 2021. If $a_{1}=1000$ and $a_{2021}=900$, determine the remaining numbers.
Solution. We have:

$$
\left\{\begin{array}{l}
a_{1}+a_{2}+a_{3}=2021 \\
a_{2}+a_{3}+a_{4}=2021 \\
\ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots \\
a_{2018}+a_{2019}+a_{2020}=2021 \\
a_{2019}+a_{2021}+a_{2021}=2021
\end{array}\right.
$$

From the first two equations, it follows that $a_{1}=a_{4}$, from the next two $a_{2}=a_{5}$, then $a_{3}=a_{6}$, etc., up to $a_{2017}=a_{2020}$ and $a_{2018}=a_{2021}$. We have

$$
a_{1}=a_{4}=\ldots=a_{2017}=a_{2020}=1000 \text { and } a_{2}=a_{5}=\ldots=a_{2018}=a_{2021}=900
$$

According to this,

$$
a_{3}=a_{6}=\ldots=a_{2016}=a_{2019}=2021-1000-900=121
$$

## Third Year

1AB. Given the function $f(x)=\left(a^{2}+a+1\right) x^{2}+(2 a-3) x+(a-5)$, where $a$ is a real parameter. Determine those values of the parameter $a$ from the set of natural numbers for which the function $f$ has one root greater than 1 and the other less than 1?