Determine all infinite sequences $\left(a_{1}, a_{2}, \ldots\right)$ of positive integers satisfying

$$
a_{n+1}^{2}=1+(n+2021) a_{n}
$$

for all $n \geq 1$.

![](https://cdn.mathpix.com/cropped/2024_04_17_e27e300a283338a2e031g-03.jpg?height=183&width=365&top_left_y=134&top_left_x=180)

BALTIC WAY

REYKJAVÍK$\cdot$ 2021

## Baltic Way

Reykjavík, November 11th - 15th
Solutions
Clearly $\left(a_{n}\right)_{n=1}^{\infty}=(n+2019)_{n=1}^{\infty}$ is a solution. We claim that it is the only one. Assume $\left(a_{n}\right)_{n=1}^{\infty}$ is a solution. Let $\left(b_{n}\right)_{n=1}^{\infty}=\left(a_{n}-n\right)_{n=1}^{\infty}$. We claim:

1) If $b_{n}b_{n+1}>b_{n}$.
2) If $b_{n}>2019$, then $2019<b_{n+1}<b_{n}$.

It is clear that these claims imply that $b_{n}=2019$ for all $n$.

Let us prove the claims:

1) Clearly $a_{n}<n+2019$ implies that $a_{n+1}<(n+1)+2019$ which already proves one part of the inequality. Suppose that $b_{n+1} \leq b_{n}$. Then

$$
\left(n+1+b_{n}\right)^{2} \geq a_{n+1}^{2}=1+(n+2021)\left(n+b_{n}\right) .
$$

Expanding gives

$$
\left(n+b_{n}\right)\left(b_{n}-2019\right) \geq 0
$$

which shows that $b_{n} \geq 2019$ contradicting our assumption.

2) It follows in exactly the same way, by just reversing all the inequality signs.