Subfield: Algebra


Question: An infinite sequence of positive integers $a_{1}, a_{2}, \ldots$ is called good if

(1) $a_{1}$ is a perfect square, and

(2) for any integer $n \geq 2, a_{n}$ is the smallest positive integer such that

$$
n a_{1}+(n-1) a_{2}+\ldots+2 a_{n-1}+a_{n}
$$

is a perfect square.

Prove that for any good sequence $a_{1}, a_{2}, \ldots$, there exists a positive integer $k$ such that $a_{n}=a_{k}$ for all integers $n \geq k$.

Solution:
Define the following auxiliary sequences:

$$
\begin{aligned}
& b_{1}=a_{1}, \quad b_{n}=a_{1}+a_{2}+\cdots+a_{n} \\
& c_{1}=b_{1}, \quad c_{n}=b_{1}+b_{2}+\cdots+b_{n} .
\end{aligned}
$$

Observe that

$$
\begin{gathered}
c_{n}-c_{n-1}=b_{n} \\
b_{n}-b_{n-1}=\left(c_{n}-c_{n-1}\right)-\left(c_{n-1}-c_{n-2}\right)=a_{n}
\end{gathered}
$$

Therefore,

$$
c_{n}=\left(2 c_{n-1}-c_{n-2}\right)+a_{n}
$$

is the smallest square greater than $2 c_{n-1}-c_{n-2}$.

Claim. $\sqrt{c_{n}}-\sqrt{c_{n-1}} \leq \sqrt{c_{n-1}}-\sqrt{c_{n-2}}$

Proof 1. Let $c_{n}=m_{n}^{2}, c_{n-1}=m_{n-1}^{2}, c_{n-2}=m_{n-2}^{2}$, where the value of $c_{n}$ is momentarily permitted to exceed its minimum. Any value is permitted for which

$$
b_{n}=c_{n}-c_{n-1}>b_{n-1}=c_{n-1}-c_{n-2}
$$

Factoring,

$$
\left(m_{n}-m_{n-1}\right)\left(m_{n}+m_{n-1}\right)>\left(m_{n-1}-m_{n-2}\right)\left(m_{n-1}+m_{n-2}\right) .
$$

In the case that $m_{n}-m_{n-1}=m_{n-1}-m_{n-2}$, this inequality clearly holds, as $m_{n}+m_{n-1}>m_{n-1}+m_{n-2}$. Thus, the minimal possible value of $m_{n}$ satisfies the claimed inequality.

Proof 2. Denote $c_{n-1}=x^{2}, c_{n-2}=(x-d)^{2}$. Then

$$
2 c_{n-1}-c_{n-2}=2 x^{2}-(x-d)^{2}=x^{2}+2 d x-d^{2}=(x+d)^{2}-2 d^{2}<(x+d)^{2} .
$$

It follows that $c_{n} \leq(x+d)^{2}$.

And so the sequence of positive integers $\sqrt{c_{n}}-\sqrt{c_{n-1}}$ is decreasing. Any such sequence is eventually constant.

As a corollary, $c_{n}=(x+n d)^{2}$ for sufficiently large $n$, with fixed integers $x$ and $d$. Along the lines above, it becomes clear that $a_{n}=c_{n}-2 c_{n-1}+c_{n-2}=2 d^{2}$, so the sequence $\left(a_{n}\right)$ is constant.
We write:

$$
s_{n}^{2}=S_{n}=a_{1}+\left(a_{1}+a_{2}\right)+\ldots+\left(a_{1}+\ldots+a_{n}\right)
$$

So, setting $b_{n}:=a_{1}+\ldots+a_{n}$, we have $S_{n}=b_{1}+b_{2}+\ldots+b_{n}$ and, in particular $S_{n+1}=S_{n}+b_{n+1}$. Now, we study the quantity $S_{n} b_{n}=+b_{1}+b_{2}+\ldots+b_{n}+b_{n}$ in two different ways. Since $b_{n+1}$ is the smallest integer strictly greater than $b_{n}$ such that $b_{1}+\ldots+b_{n}+b_{n+1}$ is a perfect square, we must have

$$
b_{1}+b_{2}+\ldots+b_{n}+b_{n} \geq\left(s_{n+1}-1\right)^{2}
$$

However, we also have

$$
b_{1}+b_{2}+\ldots+b_{n}+b_{n}=S_{n}+b_{n}=2 S_{n}-S_{n-1} \text {. }
$$

Combining, we obtain

$$
s_{n}^{2} \geq \frac{s_{n-1}^{2}+\left(s_{n+1}-1\right)^{2}}{2}>\left(\frac{s_{n-1}+s_{n+1}-1}{2}\right)^{2}
$$

where the final inequality is strict since the sequence $\left(s_{k}\right)$ is strictly increasing. Taking a square root, and noting that all the $\left(s_{n}\right)$ are integers, one obtains $s_{n+1}-s_{n} \leq s_{n}-s_{n-1}$.

Now we focus on the sequence $d_{n}=s_{n+1}-s_{n}$. $\left(s_{k}\right)$ is strictly increasing thus $\left(d_{k}\right)$ is positive. However we proved that $d_{n+1} \leq d_{n}$, so the sequence $\left(d_{k}\right)$ is eventually constant, so eventually $s_{n}=b n+c$ and $S_{n}=(b n+c)^{2}$ with some numbers $b, c$; then

$$
a_{n+2}=S_{n+2}-2 S_{n+1}+S_{n}=(b(n+2)+c)^{2}-2(b(n+1)+c)^{2}+(b n+c)^{2}=2 b^{2} .
$$