Problem

Source: EGMO 2022/3

Tags: EGMO, EGMO2022



An infinite sequence of positive integers $a_1, a_2, \dots$ is called $good$ if (1) $a_1$ is a perfect square, and (2) for any integer $n \ge 2$, $a_n$ is the smallest positive integer such that $$na_1 + (n-1)a_2 + \dots + 2a_{n-1} + a_n$$is a perfect square. Prove that for any good sequence $a_1, a_2, \dots$, there exists a positive integer $k$ such that $a_n=a_k$ for all integers $n \ge k$. (reposting because the other thread didn't get moved)