Published online by Cambridge University Press: 30 September 2022
We show that if $\mathcal {A}\subset \{1,\ldots,N\}$ has no solutions to $a-b=n^2$ with $a,b\in \mathcal {A}$ and $n\geq 1$, then
T.B. was supported by a postdoctoral grant funded by the Royal Society held at the University of Cambridge. J.M. was supported by a Royal Society Wolfson Merit Award, and funding from the European Research Council (ERC) under the European Union's Horizon 2020 research and innovation programme (grant agreement No 851318).