# Where can I find information about Lagrange's Theorem with certain squares left out?

Lagrange's Theorem tells us that every integer can be written as the sum of at most four non-negative squares.

Is it also true that, for example, every integer can be written as the sum of at most four non-negative squares excluding 7^2=49? I feel sure that it is true. Where can I find theorems of this sort?

There is a formula (due to Jacobi) for the number of representations of an integer as a sum of four squares and estimates for the number of representation of an integer as a sum of three squares (e.g. see Is there a simple way to compute the number of ways to write a positive integer as the sum of three squares?). So, the answer to your question would be something like proving that $r_4(n) > r_3(n-49)$ which should follow for large $n$ from the above results.
• Yes. Perhaps it is worthwhile to note that $r_3(n-49)$ can be bounded from above effectively, and $r_4(n)$ can be bounded from below effectively, both without GRH. – GH from MO Jun 4 '14 at 3:11
EDIT: Emil has pointed out that i had an incorrect interpretation of the question. The idea about not using 49 seems to work for all numbers. Evidently it also works for all numbers that can be written as the sum of three squares. Not two squares, though, any prime of the form $49 + x^2$ such as 53 has no alternative, for instance.
ORIGINAL: On page 140 of The Sensual Quadratic Form by John Horton Conway, he proves that the positive integers that are not the sum of four positive squares are $$1,3,5,9,11,17,29,41, 2 \cdot 4^m, 6 \cdot 4^m, 14 \cdot 4^m.$$ I think this must be what you want, because he specially mentions the bound $49.$ An important detail in this is that, if any multiple of $8$ is the sum of four squares, these squares are even.
• I was quite puzzled by your answer, but it occurred to me that you may read the question differently than me (and Felipe Voloch, apparently). I assume the question asks whether every integer can be written as $a_1^2+a_2^2+a_3^2+a_4^2$, where $a_1,\dots,a_4\ne7$. You seem to interpret it as whether every integer different from 49 can be written as a sum of four squares satisfying an extra condition that you added in to make this reading make sense. – Emil Jeřábek Jun 1 '14 at 9:56