How to prove the following problem?
Prove that, there is a sequence of $2023$ distinct integers such that the sum of the squares of any two consecutive terms is a perfect square itself.
I tried with Pythagorean triple. I can generate a sequence but I can't conclude. Thanks.
e.g. $6, 8, 15, 20, 48, 64, \dots $
\begin{multline*} Triples:\\ (6, 8, 10)\\ (8, 15, 17)\\ (15, 20, 25)\\ (20, 48, 52)\\ (48, 64, 80)\\ \dots \end{multline*}
We begin with Euclid's formula $\quad A=m^2-k^2 \quad B=2mk \quad C=m^2+k^2.\quad$
For the sum of squares of any two consecutive terms to equal a square, each alternate odd or even number, except for the first, must participate in at least two triples. For example: $\,(5,12,13), (35,12,37)\,$ begins the sequence $\,\{5,12,35,612,1075,23100,16571,\cdots\}.\quad$ In a Pythagorean triple, Side-$A\,$ can be any odd number greater than one and side-$B\,$ can be any multiple of $\,4.\quad$ Beginning with $\,A=5,\,$ and given $\,(5,12,13)\,$ we can find $\,B=12\,$ triples using the formula by solving for $\,k\,$ and testing a defined range of $\,m$=values. Any value of $\,m\,$ that yields an integer yields an $\,(m,k)\,$ pair we seek.
$$B=2mk\implies k=\frac{B}{2m} \quad\text{ for }\quad \bigg\lfloor \frac{1+\sqrt{2B+1}}{2}\bigg\rfloor \le m \le \frac{B}{2}$$ The lower limit ensures $m>k$ and the upper limit ensures $m\ge 2$ $$B=12\implies\qquad \bigg\lfloor \frac{1+\sqrt{24+1}}{2}\bigg\rfloor =3 \le m \le \frac{12}{2}=6\\ \text{ and we find} \quad m\in\{3,6\}\implies k\in\{2,1\}$$ $$F(3,2)=(5,12,13)\qquad F(6,1)=(35,12,37)$$
Beginning with $\,(35,12,37),\,$ we can find another side-$A$ using
$$A=m^2-k^2\implies k=\sqrt{m^2-A}\quad\text{for}\quad \sqrt{A+1} \le m \le \frac{A+1}{2}$$ The lower limit ensures $k\in\mathbb{N}$ and the upper limit ensures $m> k$. $$A=35\implies \sqrt{35+1}=6\le m \le \frac{35+1}{2} =18\\ \text{ and we find}\quad m\in\{6,18\}\implies k \in\{1,17\} $$ $$F(6,1)=(35,12,37)\qquad F(18,17)=(35,612,613) $$
This process can be repeated (alternately find A and B triple) indefinitely so there are more than 2023 numbers where the sum of squares of any two consecutive terms is also a square. The numbers can get quite large but sometimes the numbers decrease as shown in the last term of the example sequence.
If we allow ourselves to be trivial, there are also infinite sequences such as $\quad 5,12,35,12,35,12,35,12,35,\cdots$ that satisfy the conditions.