**Starting point.** The struggle for a magic square consisting of distinct square numbers is still ongoing, but it has produced an amusing landmark result called the [Parker square](https://www.bradyharanblog.com/the-parker-square). One of the issues is that square numbers are very scarce - which leads to the following question.


**Problem.** A *$3\times 3$ magic square* is a $3\times 3$ integer matrix with all entries being distinct, such that all row sums, column sums, and diagonal sums are equal.


We call a set $D\subseteq \mathbb{N}$ *dense* if $$\lim\inf\_{n\to\infty}\frac{|D\cap \{1,\ldots, n+1\}|}{n+1} > 0.$$


If $D\subseteq\mathbb{N}$ is dense, is there always a $3\times 3$ magic square with all the entries lying in $D$?



$3\times 3$ magic squares consisting of entries of a dense set $D\subseteq \mathbb{N}$
Yes.


By Szemerédi's theorem, your set contains an arithmetic progression of arbitrary length. In particular, it contains a progression of length 9, say it's $d\_1,\ldots,d\_9$. Then
$$
\begin{pmatrix}
d\_2 & d\_7 & d\_6\\
d\_9 & d\_5 & d\_1\\
d\_4 & d\_3 & d\_8
\end{pmatrix}
$$
is a magic square.


