Question 44
Let $n$ be an integer greater than or equal to $2$. Find the smallest positive integer $m$ for which there exists a sequence $a_1, a_2, \dots, a_n$ of positive integers satisfying the following two conditions:
* $a_1 \lt a_2 \lt \dots \lt a_n = m$.
* All of the $n-1$ numbers $\frac{a_1^2 + a_2^2}{2}, \dots, \frac{a_{n-1}^2 + a_n^2}{2}$ are perfect squares.
* $a_1 \lt a_2 \lt \dots \lt a_n = m$.
* All of the $n-1$ numbers $\frac{a_1^2 + a_2^2}{2}, \dots, \frac{a_{n-1}^2 + a_n^2}{2}$ are perfect squares.