TITLE: Sums of integers are squares
QUESTION [5 upvotes]: How can I find the set of distinct positive integers $\mathbb S=\{a, b, c, d, e, f, g, h, i\}$ such that:

$a+b$, $b+c$, $a+c$ are squares,
$d+e$, $e+f$, $d+f$ are squares,
$g+h$, $h+i$, $g+i$ are squares,
$a+b+c = d+e+f = g+h+i$ is square?

If there are several solutions then choose with minimal $a+b+c$.

REPLY [6 votes]: The equation 
$x^2+y^2+z^2=2w^2$ has infinitely many solutions. For example, one family is
$x=3m^2+2mn-n^2$
$y=3m^2-2mn-n^2$
$z=4mn$
$w=3m^2+n^2$