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)
Problem
Source: EGMO 2022/3
Tags: EGMO, EGMO2022
10.04.2022 07:00
2, 8, 18, 32, 50, 72, 98, 128, 162, 200, 242, 288... are the repeating terms the difference increases by 4 each time \shrug
10.04.2022 07:40
Sketch: Let $F(n)$ be the big expression, and $K(n)$ be the square root of $F(n)$. Then note that by difference of squares, if $K(n)-K(n-1) = x$, setting $a_{n+1} = 2x^2$ will result in $F(n+1)$ being a square as needed, and furthermore we would get $K(n+1)-K(n)=x$. Thus the $K(i+1)-K(i)$ are non-increasing, and since there are then finitely many values of $K(i+1)-K(i)$, after a certain point $K(i+1)-K(i)$ is constant. If this constant is $c$, all the rest of the $a$'s in the sequence of end up being $2c^2$, as desired.
10.04.2022 11:17
Let $a_1+\cdots+a_k=b_k$. Then, $b_1$ is a perfect square and for any integer $n\ge 2$, $b_n$ is the smallest positive integer greater than $b_{n-1}$ such that $b_1+b_2+\cdots +b_n$ is a perfect square. Let $b_1+\cdots +b_k=c_k^2$ and $b_0=c_0=0$. Since the sequence $(b_i)_{i=1}^{\infty}$ is strictly increasing, we know that $c_i^2-c_{i-1}^2\ge c_{i-1}^2-c_{i-2}^2+1\Rightarrow c_i^2\ge 2c_{i-1}^2-c_{i-2}^2+1$. Hence, we find that $c_i=\left\lceil \sqrt{2c_{i-1}^2-c_{i-2}^2+1}\right\rceil$. We want to prove that $(a_i)$ is eventually constant. Hence, we need to prove that $(b_i)$ is eventually arithmetic. Hence, we need to prove that $(c_i)$ is eventually arithmetic. Then, it suffices to prove that $c_k-c_{k-1}\ge c_{k+1}-c_k$. [since $(c_i)$ is strictly increasing, this proves that $(c_i)$ is eventually arithmetic] Hence, we need to prove that $2c_k-c_{k-1}\ge c_{k+1}=\left\lceil \sqrt{2c_k^2-c_{k-1}^2+1}\right\rceil$. Then, it suffices to prove that $$2c_k-c_{k-1}\ge \sqrt{2c_k^2-c_{k-1}^2+1}\Leftrightarrow 4c_k^2+c_{k-1}^2-4c_kc_{k-1}\ge 2c_k^2-c_{k-1}^2+1\Leftrightarrow 2(c_k-c_{k-1})^2\ge 1$$, which is correct since $(c_i)$ is strictly increasing. Done.
10.04.2022 17:13
10.04.2022 18:54
We define the partial sums $\{S_n\}_{n\geq 1}$ by $S_n=a_0+a_1+\cdots a_n$. We will now only work with this new sequence, translating the condition of $a_k$ being a positive integer to $S_{n+1}>S_n$ for every $n\geq 1$. Also $S_n$ can be defined as the least integer greater than $S_{n-1}$ such that $$na_1 + (n - 1)a_2 + . . . + 2a_{n-1} + a_n=S_1+S_2+\cdots+S_n$$is a perfect square. We are motivated by the deep fact that $1+3+5+\cdots +2n-1=n^2$, to realize the following: Observation: $\{S_n\}_{n\geq 1}$ can be obtained by "labeling" the odd integers inductively as follows: - In move $1$, given $S_1=a_1=k^2$ label the first $k$ odd integers. - In move $n$, keep labeling the first odd integer that hasn't yet been labeled and keep track of the sum $S_n$ of the integers labeled during this move. We stop once $S_n>S_{n-1}$. For instance when $S_1=16=1+3+5+7$ we can proceed as follows: $$\underbrace{1, 3, 5, 7}_{S_1=16}, \underbrace{9, 11}_{S_2=20}, \underbrace{13, 15}_{S_3=28}, \underbrace{17, 16}_{S_4=33}\dots $$ Claim: Let $x_k$ be the amount of integers that we label in move $n$. Then $\{x_i\}$ is eventually constant. Pf: Evidently $x_n\leq x_{n-1}$, as the sum of $x_n$ consecutive odd integers is strictly larger than that of the previous $x_n$. As $x_k\geq 1$ is bounded below, it must eventually stay constant. $\blacksquare$ Now we are done, as if the amount of integers labeled is eventually constant, then so is the difference $S_{n}-S_{n-1}=a_n$, as desired.
11.04.2022 17:42
Let $b_n^2=na_1+(n-1)a_2+...+2a_{n-1}+a_n$. Observe that since $a_n$ is the smallest positive integer such that $b_{n-1}^2+(a_1+a_2+...+a_{n-1})=b_n^2-a_n$ is a perfect square, we have that $a_n \leq 2b_n-1$. $(\heartsuit)$ Now, observe that $2b_n^2-b_{n-1}^2=(n+1)a_1+na_2+...+3a_{n-1}+2a_n=b_{n+1}^2-a_{n+1}$. Thus, $b_n^2-b_{n-1}^2=(b_{n+1}^2-b_n^2)-a_{n+1} \geq b_{n+1}^2-b_n^2-2b_{n+1}+1=(b_{n+1}-1)^2-b_n^2 \implies (b_n-b_{n-1})(b_n+b_{n-1}) \geq (b_{n+1}+b_n-1)(b_{n+1}-b_n-1) \implies b_{n+1}-b_n-1 \leq b_n-b_{n-1} \frac{b_n+b_{n-1}}{b_{n+1}+b_n-1} = b_n-b_{n-1} (1-\frac{b_{n+1}-b_{n-1}-1}{b_{n+1}+b_n-1}) < b_n-b_{n-1}$, since $b_{n+1}-b_n-1 < b_{n+1}+b_n-1$. Therefore, $b_{n+1}-b_n-1 < b_n-b_{n-1} \implies b_{n+1}-b_n \leq b_n-b_{n-1}$, so since $b_{n+1}-b_n$ is a non-increasing sequence of positive integer numbers, it must be eventually constant. Thus, there exist positive integers $N,M$ such that $b_{n+1}-b_n=M$ for all $n \geq N$. Now, let $s_n=a_1+a_2+...+a_n$. Observe that $b_n^2-b_{n-1}^2=s_n, b_{n+1}^2-b_n^2=s_{n+1}$, so $s_{n+1}-s_n=b_{n+1}^2-2b^n+b_{n-1}^2$, so taking $n>N$, we have that $a_{n+1}=s_{n+1}-s_n=(b_n+M)^2-2b_n^2+(b_n-M)^2=2M^2$, so the sequence $\{a_n\}_{n=1}^{\infty}$ is eventually constant, as desired. $\blacksquare$
12.04.2022 03:18
Define $(b_n)^2 = na_1 + (n-1)a_2 + \dots + 2a_{n-1} + a_n$ (such that $b_n$ is positive). Note that $a_1 = (b_1)^2$ and $a_2 = (b_2)^2 - 2(b_1)^2$. Key claim: For all $n\ge 3$, $a_n = (b_n)^2 - 2(b_{n-1})^2 + (b_{n-2})^2$. Proof: Strong induction on $n$. The base case follows from $(b_3)^2 = 3a_1 + 2a_2 + a_3 = 3(b_1)^2 + 2\left((b_2)^2 - 2(b_1)^2\right) + b_3$. For the induction step, suppose for some $n\ge 4$ that the claim holds for all $3\le k < n$. Then we have $(b_n)^2 = na_1 + (n-1)a_2 + \dots + 2a_{n-1} + a_n$ $= n(b_1)^2 + (n-1)\left((b_2)^2 - 2(b_1)^2\right) + (n-2)\left((b_3)^2 - 2(b_2)^2 + (b_1)^2\right) + \dots + 2\left((b_{n-1})^2 - 2(b_{n-2})^2 + (b_{n-3})^2\right) + a_n$ $=-(b_{n-2})^2 + 2(b_{n-1})^2 + a_n$ which rearranges to the desired, so the induction step is complete. From the claim, it follows that $(b_n)^2$ is the least perfect square greater than $2(b_{n-1})^2 - (b_{n-2})^2$ for all $n\ge 3$. Now, define $c_n = b_{n} - b_{n-1}$. Then for $n\ge 3$ we have $2(b_{n-1})^2 - (b_{n-2})^2 = 2(b_{n-2} + c_{n-1})^2 - (b_{n-2})^2 = (b_{n-2})^2 + 4b_{n-2}c_{n-1} + 2(c_{n-1})^2 < (b_{n-2} + 2c_{n-1})^2$. In particular, $c_n\le c_{n-1}$, so $\{c_n\}$ is nonincreasing from $n=3$ onward. The above equation also implies that $c_n > 0$, so $\{c_n\}$ is eventually constant. At this point $\{a_n\}$ will also become constant, so we are done.
12.04.2022 06:56
Almost identical to the post above, but I'll post for storage. Let $b_k^2=ka_1+(k-1)a_2+\dots+a_k$. Then $a_1+a_2+\dots+a_k=b_{k+1}^2-b_k^2$, so $a_{k+1}=b_{k+1}^2-b_k^2-(b_k^2-b_{k-1}^2)$. In other words, $b_{k+1}$ is the smallest square larger than $2b_k^2-b_{k-1}^2$. Let $c_k=b_k-b_{k-1}$, so $b_{k+1}$ is the smallest square larger than $b_k^2+2b_kc_k-c_k^2$. Clearly $b_{k+1}\leq b_k+c_k$, so the gap between consecutive $b_i$ is nonstrictly decreasing. Since $b_k$ is also strictly increasing, eventually $b_k^2+2b_kc_k-c_k^2>(b_k+c_k-1)^2$. This means $b_{k+1}=b_k+c_k$ eventually, implying the result.
13.04.2022 03:52
$x_n = na_1+(n-1)a_2+ \cdots + a_n$ and notice that: $ x_{n+1}=2x_n-x_{n-1}+a_{n+1}$. However, notice that if $x_{n-1}=a^2, x_n=(a+b)^2$ then $2x_n-x_{n-1}=a^2+4ab+2b^2<(a+2b)^2$ which implies that there is $a_{n+1}$ that will make $x_{n+1}\leq (a+2b)^2$. This actually implies that $|x_{n+1}-x_n| \leq |x_n-x_{n-1}|$, and therefore this sequence of consecutive differences gets constant eventually. From there it's over cause we will have $a_{n+1}=2b^2$ for some $b$ that is this difference.
14.04.2022 15:03
This is a UK proposal by Dominic Yeo and Joe Benton. We can generalise the result replacing perfect square by perfect $p\textsuperscript{th}$ power (where $p \geq 2$). Then we claim that $\frac{a_n}{n^{p-2}}$ converges to an integer (and in fact $p(p-1)$ times a perfect $p\textsuperscript{th}$ power). Specifically, in the case $p=2$ this means the sequence $\left(a_n\right)$ converges to an integer and so $a_n$ must be eventually constant. Write $S_{n}=t_n^p$ where $t_n$ are integers. Observe we can write: $$a_{n}=S_{n}-2 S_{n-1}+S_{n-2}=t_n^{p}-2t_{n-1}^{p}+t_{n-2}^p$$This gives us an alternative way to define $t_n$ as the smallest integer strictly greater than $\left(2t_{n-1}^{p}-t_{n-2}^p\right)^{1/p}$ where $t_1=a_1^{1/p}$, $t_0=0$. By induction, $t_n$ is strictly increasing. By AM-GM inequality we have for $x \in [0,2]$ and $x \neq 1$: $$1 < x(2-x) \leq \left[x(2-x)\right]^{p/2} \leq \frac{x^{p}+(2-x)^p}{2}$$Rearranging this shows: $$2-x > \left(2-x^{p}\right)^{1/p}$$Setting $x=\frac{t_{n-2}}{t_{n-1}} \in (0,1)$ (as $t_n$ strictly increasing) and multiplying through by $t_{n-1}$ we get: $$2t_{n-1}-t_{n-2} >\left(2t_{n-1}^{p}-t_{n-2}^p\right)^{1/p}$$As $2t_{n-1}-t_{n-2}$ is an integer, it follows that $t_{n} \leq 2t_{n-1}-t_{n-2}$ and rearranging: $$0 <t_{n}-t_{n-1} \leq t_{n-1}-t_{n-2}$$so $\left(t_{n}-t_{n-1}\right)$ is a strictly decreasing sequence of positive integers and so must eventually be constant and therefore for sufficiently large $n$ we can write $t_{n}=An+B$ where $A,B$ are constants. We then have: $$a_n=t_n^{p}-2t_{n-1}^{p}+t_{n-2}^p=p(p-1)A^{p}n^{p-2}+\cdots$$where the lower order terms have powers $\leq (p-3)$. Hence $\frac{a_{n}}{n^{p-2}} \rightarrow p(p-1)A^{p}$ as required.