TITLE: Lagrange four squares theorem
QUESTION [35 upvotes]: Lagrange's four square theorem states that every non-negative integer is a sum of squares of four non-negative integers. Suppose $X$ is a subset of non-negative integers with the same property, that is, every non-negative integer is a sum of squares of four elements of $X$.
$\bullet$ Is $X=\{0,1,2,\ldots\}$? 
$\bullet$ If not what is a minimal set $X$ with the given property?

REPLY [3 votes]: Back to my original suggestion, it appears that taking $X$ to be numbers with at most four prime factors is (basically) enough. Indeed, the following paper due to Tsang and Zhao show the following: every sufficiently large integer $N \equiv 4 \pmod{24}$ can be written as $x_1^2 + x_2^2 + x_3^2 + x_4^2 = N$, with $x_i \in P_4$ for $i = 1,2,3,4$. Here $P_r$ is the set of numbers with at most $r$ prime factors. I am guessing one only needs to take $r$ slightly larger, and allowing for possibly non-primitive representations, to cover the remaining congruence classes.