Are there arbitrarily large sets $\mathcal S=\{a\_1,\ldots,a\_n\}$ of strictly positive integers such that all sums $a\_i+a\_j$ of two distinct elements in $\mathcal S$ are squares?


Considering subsets in $\mathbb Z$ should essentially give the same answer since such a set can contain at most one negative integer.


An example of size $3$ is given by $\{6,19,30\}$.
(Allowing $0$, one gets $\{0,a^2,b^2\}$ in bijection with
Pythagorean triplets $c^2=a^2+b^2$.)


There is no such example with four integers in $\{1,\ldots,1000\}$.
(Accepting $0$, solutions are given by Euler bricks:
$\{0,44^2,117^2,240^2\}$ is the smallest example. I suspect thus that there are strictly positive solutions in $\mathbb N^4$).


An equivalent reformulation: Consider the infinite graph with vertices $1,2,3,\ldots$ and edges $\{i,j\}$ if $i+j$ is a square.
Does this graph contain arbitrarily large complete subgraphs?
(Trivial observation: Every edge $\{a,b\}$ is only contained in finitely many different complete subgraphs.)


*Motivation* This is somehow a variation on question [Generalisation of this circular arrangement of numbers from $1$ to $32$ with two adjacent numbers being perfect squares](https://mathoverflow.net/questions/408235)



Size of set of integers with all sums of two distinct elements giving squares
The size of such sets is bounded by some (unknown) constant, assuming a big conjecture in arithmetic geometry.


The Bombieri-Lang conjecture (non-trivially via the Uniformity Conjecture, see Stanley Yao Xiao's comment) implies that for any $f(x)\in \mathbb{Z}[x]$ of degree $5$, with no repeated roots, there are at most $B$ many rational numbers $m$ for which $f(m)$ is a square - here $B$ is some absolute constant (so the conjecture goes), completely independent of $f$.


This implies that the size of a set $A$ such that $a+a'$ is a square for any two distinct elements $a,a'\in A$ is at most $B+5$. Indeed, take any $5$ distinct elements $a\_1,\ldots,a\_5\in A$, and consider $f(x) = (x+a\_1)\cdots(x+a\_5)$. For any $m\in A\backslash \{a\_1,\ldots,a\_5\}$, we know that $f(m)$ is a square, and so $\lvert A\rvert-5\leq B$.


I learnt of this kind of argument (and the Uniformity Conjecture) via this paper of Cilleruelo and Granville, which has many similar arguments and applications: <https://arxiv.org/pdf/math/0608109.pdf>.


