Diophantus of Alexandria/Arithmetica/Book 3/Problem 6

Example of Diophantine Problem
To find $3$ numbers such that their sum is a square and the sum of any pair of them is a square.

That is, let $\set {p, q, r}$ be a set of $3$ natural numbers such that:


 * $p + q + r$ is square
 * $p + q$ is square
 * $q + r$ is square
 * $r + p$ is square.

What are those $3$ numbers?

Solution
The solution given by is:
 * $\set {41, 80, 320}$

As can be seem:

Proof
Let $p + q + r$ be $x^2 + 2 x + 1$.

Let:
 * $p + q = x^2$

and so:
 * $r = 2 x + 1$

Let $q + r = \paren {x - 1}^2$.

Therefore:

But we have that $p + r$ is a square.

That is:
 * $6 x + 1 = m^2$

which is satisfied by $m^2 = 121$.

This gives us:
 * $x = 20$

and so the numbers are: