Exercise 6. Determine all sequences $\left(a_{n}\right)_{n \geqslant 1}$ of real numbers such that $a_{i}=a_{i+2020}$ for all integers $i \geqslant 1$, and such that

$$
a_{j}+2 a_{j+2} \geqslant a_{j+1}^{2}+a_{j+1}+1
$$

for all integers $\mathrm{j} \geqslant 1$.
Solution to Exercise 6: Here, the terms $a_{j+1}^{2}$ and 1 in the inequality seem a bit troublesome, as they are not of degree 1 like the other terms in the inequality. We would like to reduce it to a homogeneous inequality, that is, an inequality that remains true if we multiply the different terms by the same factor $k$. Therefore, we will use the inequality $x^{2}+1 \geqslant 2 x$, which is true for all real $x$, since $(x-1)^{2} \geqslant 0$. Applying this inequality to the relation gives

$$
a_{j}+2 a_{j+2} \geqslant a_{j+1}+a_{j+1}^{2}+1 \geqslant 3 a_{j+1}
$$

This relation is already more manageable. Now we would like to use the fact that the sequence is 2020-periodic. We will therefore consider an integer $j \geqslant 1$ such that $a_{j}$ is maximal. This is possible given that the sequence takes a finite number of distinct values because it is periodic. Without loss of generality, we assume that $j \geqslant 2$.

Thus, we have $3 a_{j} \leqslant a_{j-1}+2 a_{j+1} \leqslant a_{j}+2 a_{j}=3 a_{j}$ by the maximality of $a_{j}$. In particular, to have equality, we must have $a_{j-1}=a_{j}=a_{j+1}$. An immediate induction shows that if $k \geqslant 0, a_{j+k}=a_{j}$ and that if $k \leqslant j-1, a_{j-k}=a_{j}$. The sequence is therefore constant and equals $a_{j}$. The inequality then becomes $a_{j}+2 a_{j} \geqslant a_{j}^{2}+a_{j}+1$ or $a_{j}^{2}-2 a_{j}+1=\left(a_{j}-1\right)^{2} \leqslant 0$, so $a_{j}=1$.

Conversely, if $a_{k}=1$ for all $k \geqslant 1$, then for any positive integer $j, a_{j}+2 a_{j+2}=3 \geqslant 3=a_{j+1}^{2}+a_{j+1}+1$, so the constant sequence equal to 1 is a solution. The only sequence that is a solution is therefore the constant sequence equal to 1.

Comment from the graders: The exercise is generally well done, by various methods. However, few students thought to verify that the sequence obtained at the end is indeed a solution: even though it was very easy to verify here, it is important to at least mention a verification. Indeed, when asked to find all solutions to a problem, it is always necessary to verify that the solutions obtained are indeed solutions.