Euler's squares
Euler found four whole numbers such that the sum of any two of the numbers is a perfect square...
Problem
Euler found four whole numbers such that the sum of any two of the numbers is a perfect square. Three of the numbers that he found are \begin{equation*} a= 18530, \quad b=65570, \quad c=45986. \end{equation*}
Find the fourth number, $x$. You could do this by trial and error (sometimes called trial and improvement), and a spreadsheet would be a good tool for such work. However, Euler would not have used any electronic calculating aids to find his 'fearsome foursome' and he would have found ways of reducing the search to a small number of cases and this is what you should try to do. You could do this by writing down \begin{equation*} a+x = P^2 \end{equation*} \begin{equation*} b+x = Q^2 \end{equation*} \begin{equation*} c+x = R^2, \end{equation*}
and then focussing on $ Q^{2}-R^2=b-c $ which is known. Moreover you know that $ Q > \sqrt{b} $ and $ R> \sqrt{c} $. Use this to show that $ Q-R \leq 41 $. Use a spreadsheet to calculate values of $ Q+R $, $ Q$ and $ x $ for values of $ Q-R $ from $ 1 $ to $ 41 $, and hence to find the value of $ x $ for which $ a+x $ is a perfect square.
There may be better ways to do this, and if you find one, do let us know!
Student Solutions
Congratulations to Tony Cardell, age 14, State College Area High School, Pennsylvania, USA for this solution. Three of the numbers Euler has listed are 18530, 65570 and 45986. We want to find the fourth number that will complete his set so that any two added together form a perfect square. Therefore, we can set up the equations, where $p$, $q$ and $r$ are natural numbers, and $x$ is our fourth Euler number:
$\begin{eqnarray} 18530 + x &=p^2\\ 65570 + x &=q^2\\ 45986 + x &=r^2, \end{eqnarray}$
Now by subtraction, we have $q^2-r^2 = 19584.$ Following the hint given in the problem, we know $q \geq \sqrt{65570} \geq 257$ and $r \geq \sqrt{45986} \geq 215$\ so $q+r \geq 472$ and \[ q-r \leq {19584 \over 472} \leq 41.5 \] so $q-r$ is less than or equal to $41$.
Now since we have the factorization $(q - r)(q + r)$, we want to find possible values of $q - r$ in our range from $1$ to $41$. You can do this by computing the prime factorization of $19584$ which is $2^7 \times 3^2 \times 17$. This generates a table of small factors. Here are the ones under $41$: $1$, $2$, $3$, $4$, $6$, $8$, $9$, $12$, $16$, $18$, $24$, $32$, $34$, $36$. From these values we can find $q+r$ easily. Adding $q-r$ and $q+r$ yields $2q.$ We want as small $q$ as possible (we want to keep them around Euler's other numbers), so since $q-r$ and $q+r$ are inversely related, we should start the calculation of possible $q$'s with the factors closest to the squares: $36$, $34$, and $32$. Each of these yields $q$ values respectively of $290$, $305$, and $322$. Squaring these and subtracting $65570$ yields possible $x$ values. Respectively these are: $18530$, $27455$, $38114$. Now $18530$ is already on Euler's list, so we move on to the next one, $27455$. We find this fails when added to $18530$ (it does not form a perfect square in this case). Moving on to the next possible value we find: combinations of $18530$, $65570$, and $45986$ are given to work among themselves.
$\begin{eqnarray} 38114 + 18530 &=238^2\\ 38114 + 65570 &=322^2\\ 38114 + 45986 &=290^2. \end{eqnarray}$
Thus $38114$ is our answer!!