# Why can't this number be written as a sum of three squares of rationals?

This may be a very naive question and I apologize in advance.

Suppose that $n$ is a positive integer which cannot be written as a sum of three squares $a^2+b^2+c^2$ for integers $a,b,c\in\mathbb{Z}$.

Does it follow that $n$ cannot be written as a sum of three squares $a'^2+b'^2+c'^2$ for rationals $a',b',c'\in\mathbb{Q}$? Why?

## 1 Answer

There is a fairly easy answer; a positive integer is the sum of three squares if and only if it is not of the form $4^k (8n +7).$ Or, more useful for us, if and only if it is not $4^k m$ with $m \equiv 7 \pmod 8.$

If you have the sum of three rational squares equal to such a number, call it $t,$ then we can multiply through by the square of the least common denominator, which forces everything to be integers, so we have all integers in $x^2 + y^2 + z^2 = t L^2.$ Now, $L$ factors as some power of $2$ times an odd number, so let $L = 2^r s$ with odd $s.$ The important bit is that $s^2 \equiv 1 \pmod 8$ (CHECK THIS). So, $L^2 = 4^r s^2.$

Finally, we knew $t = 4^km$ with $m \equiv 7 \pmod 8,$ because $t$ was not integrally the sum of three squares. So $t L^2 = 4^{k+r} m s^2,$ where $m s^2 \equiv 7 \pmod 8.$ Therefore $t L^2$ is also not the sum of three integer squares and we are done.

It is true that positive integers are the sum of three integer squares if and only if they are the sum of three rational squares. This result, for a number of quadratic forms, is generally referred to as the Davenport-Cassels Theorem, but was first proved by Aubry about 1912 I think. It appears in Serre's little book, A Course in Arithmetic, with three squares on pages 45-46, and Davenport-Cassels on pages 46-47.

There are infinitely many quadratic forms with the same property, they represent a number over the integers if and only if they represent it over the rationals. The stronger property used in the Davenpost-Cassels hypothesis, for positive quadratic forms, occurs for just 70 forms of the type called "even lattices." The restriction is that the "covering radius" be strictly below $\sqrt 2.$ A full list is given by G. Nebe see http://www.math.rwth-aachen.de/~Gabriele.Nebe/pl.html and the pdf listed as Even lattices with covering radius stricktly smaller than sqrt{2}. Beiträge zur Algebra und Geometrie, Vol. 44, No. 1, 2003, 229-234 Note that I forgot the case R=A2A1A1 in Theorem 7. This root system yields two further lattices, one with covering radius =sqrt{2} and one with c.r. strictly smaller than sqrt{2}

There are 103 positive forms in three variables that have your property, that they represent an integer over the integers if and only if they represent it over the rationals. Each is summarized by six coefficients preceded by a "discriminant" I call Delta. Any primitive, positive ternary with the property is "equivalent" to one of these 103. ADC stands for Aubry-Davenport-Cassels. Let's see, only thirteen of the forms below belong on Nebe's list. Her hypotheses are far more restrictive than the adc property. Her list has 70 entries because the number of variables gets as large as ten.

$$Q(x,y,z) = a x^2 + b y^2 + c z^2 + r y z + s z x + t x y,$$ and $$\Delta = 4 a b c + r s t - a r^2 - b s^2 - c t^2$$

       Delta   a     b          c      r    s    t
---------------------------------------------------------
2:    1     1          1      1    1    1   ADC       2 = 2
3:    1     1          1      0    0    1   ADC       3 = 3
4:    1     1          1      0    0    0   ADC       4 = 2^2
5:    1     1          2      1    1    1   ADC       5 = 5
6:    1     1          2      0    0    1   ADC       6 = 2 * 3
6:    1     1          2      1    1    0   ADC       6 = 2 * 3
7:    1     1          2      0    1    0   ADC       7 = 7
8:    1     1          2      0    0    0   ADC       8 = 2^3
9:    1     1          3      0    0    1   ADC       9 = 3^2
10:    1     1          3      1    1    0   ADC      10 = 2 * 5
10:    1     2          2      2    1    1   ADC      10 = 2 * 5
11:    1     1          3      0    1    0   ADC      11 = 11
12:    1     1          3      0    0    0   ADC      12 = 2^2 * 3
12:    1     2          2      1    1    1   ADC      12 = 2^2 * 3
12:    1     2          2      2    0    0   ADC      12 = 2^2 * 3
13:    1     2          2      1    0    1   ADC      13 = 13
14:    1     1          5      1    1    1   ADC      14 = 2 * 7
15:    1     1          4      0    1    0   ADC      15 = 3 * 5
15:    1     2          2      1    0    0   ADC      15 = 3 * 5
16:    1     2          2      0    0    0   ADC      16 = 2^4
17:    1     2          3      2    1    1   ADC      17 = 17
18:    1     2          3      2    1    0   ADC      18 = 2 * 3^2
18:    2     2          2      1    2    2   ADC      18 = 2 * 3^2
20:    1     1          5      0    0    0   ADC      20 = 2^2 * 5
20:    1     2          3      1    0    1   ADC      20 = 2^2 * 5
20:    1     2          3      2    0    0   ADC      20 = 2^2 * 5
21:    1     2          3      0    0    1   ADC      21 = 3 * 7
21:    1     2          3      1    1    0   ADC      21 = 3 * 7
22:    1     2          3      0    1    0   ADC      22 = 2 * 11
24:    1     1          6      0    0    0   ADC      24 = 2^3 * 3
24:    1     2          3      0    0    0   ADC      24 = 2^3 * 3
24:    1     2          4      2    1    1   ADC      24 = 2^3 * 3
25:    2     2          2     -1    1    1   ADC      25 = 5^2
28:    2     2          3      2    2    2   ADC      28 = 2^2 * 7
30:    1     1         10      0    0    1   ADC      30 = 2 * 3 * 5
30:    1     3          3      1    1    1   ADC      30 = 2 * 3 * 5
32:    1     2          4      0    0    0   ADC      32 = 2^5
33:    1     2          5      1    1    1   ADC      33 = 3 * 11
36:    1     2          5      2    0    0   ADC      36 = 2^2 * 3^2
36:    1     3          3      0    0    0   ADC      36 = 2^2 * 3^2
36:    1     3          4      3    1    0   ADC      36 = 2^2 * 3^2
40:    1     2          5      0    0    0   ADC      40 = 2^3 * 5
42:    1     1         11      1    1    0   ADC      42 = 2 * 3 * 7
44:    1     2          6      2    0    0   ADC      44 = 2^2 * 11
45:    2     2          3      0    0    1   ADC      45 = 3^2 * 5
46:    1     3          5      3    1    1   ADC      46 = 2 * 23
48:    1     2          6      0    0    0   ADC      48 = 2^4 * 3
49:    1     2          7      0    0    1   ADC      49 = 7^2
50:    1     4          4      3    1    1   ADC      50 = 2 * 5^2
56:    1     3          5      2    0    0   ADC      56 = 2^3 * 7
60:    2     2          5      0    0    2   ADC      60 = 2^2 * 3 * 5
60:    2     3          3      0    0    2   ADC      60 = 2^2 * 3 * 5
63:    1     3          6      3    0    0   ADC      63 = 3^2 * 7
70:    1     2          9      0    1    0   ADC      70 = 2 * 5 * 7
72:    2     2          5      1    1    1   ADC      72 = 2^3 * 3^2
72:    2     3          3      0    0    0   ADC      72 = 2^3 * 3^2
75:    1     4          5      0    0    1   ADC      75 = 3 * 5^2
78:    1     5          5      4    1    1   ADC      78 = 2 * 3 * 13
84:    1     1         21      0    0    0   ADC      84 = 2^2 * 3 * 7
90:    1     1         30      0    0    1   ADC      90 = 2 * 3^2 * 5
92:    2     3          5      2    0    2   ADC      92 = 2^2 * 23
99:    2     3          5      3    1    0   ADC      99 = 3^2 * 11
100:    2     2          7     -1    1    1   ADC     100 = 2^2 * 5^2
100:    2     3          5      0    0    2   ADC     100 = 2^2 * 5^2
112:    2     3          5      2    0    0   ADC     112 = 2^4 * 7
120:    1     3         10      0    0    0   ADC     120 = 2^3 * 3 * 5
121:    1     3         11      0    0    1   ADC     121 = 11^2
126:    3     3          5      3    3    0   ADC     126 = 2 * 3^2 * 7
140:    1     2         18      2    0    0   ADC     140 = 2^2 * 5 * 7
147:    3     3          5     -2    2    1   ADC     147 = 3 * 7^2
150:    2     5          5      5    0    0   ADC     150 = 2 * 3 * 5^2
156:    2     3          7      0    2    0   ADC     156 = 2^2 * 3 * 13
169:    2     5          5     -3    1    1   ADC     169 = 13^2
180:    2     2         15      0    0    2   ADC     180 = 2^2 * 3^2 * 5
200:    1     5         10      0    0    0   ADC     200 = 2^3 * 5^2
234:    2     3         11      3    2    0   ADC     234 = 2 * 3^2 * 13
240:    2     5          6      0    0    0   ADC     240 = 2^4 * 3 * 5
252:    3     3          7      0    0    0   ADC     252 = 2^2 * 3^2 * 7
289:    3     5          6      1    2    3   ADC     289 = 17^2
294:    5     5          5     -3    3    4   ADC     294 = 2 * 3 * 7^2
300:    1    10         10     10    0    0   ADC     300 = 2^2 * 3 * 5^2
350:    3     3         10      0    0    1   ADC     350 = 2 * 5^2 * 7
360:    1     3         30      0    0    0   ADC     360 = 2^3 * 3^2 * 5
450:    5     5          6      0    0    5   ADC     450 = 2 * 3^2 * 5^2
468:    1     6         21      6    0    0   ADC     468 = 2^2 * 3^2 * 13
490:    3     3         14      0    0    1   ADC     490 = 2 * 5 * 7^2
588:    3     7          7      0    0    0   ADC     588 = 2^2 * 3 * 7^2
600:    2     5         15      0    0    0   ADC     600 = 2^3 * 3 * 5^2
700:    5     6          6      2    0    0   ADC     700 = 2^2 * 5^2 * 7
720:    2     6         15      0    0    0   ADC     720 = 2^4 * 3^2 * 5
882:    2    11         11      1    2    2   ADC     882 = 2 * 3^2 * 7^2
900:    3    10         10     10    0    0   ADC     900 = 2^2 * 3^2 * 5^2
980:    6     6          7      0    0    2   ADC     980 = 2^2 * 5 * 7^2
1014:    1    13         23     13    1    0   ADC    1014 = 2 * 3 * 13^2
1200:    1    10         30      0    0    0   ADC    1200 = 2^4 * 3 * 5^2
1764:    1    21         21      0    0    0   ADC    1764 = 2^2 * 3^2 * 7^2
1800:    5     6         15      0    0    0   ADC    1800 = 2^3 * 3^2 * 5^2
2028:    2     7         39      0    0    2   ADC    2028 = 2^2 * 3 * 13^2
2450:    1     9         70      0    0    1   ADC    2450 = 2 * 5^2 * 7^2
3042:    3    17         17      8    3    3   ADC    3042 = 2 * 3^2 * 13^2
3600:    3    10         30      0    0    0   ADC    3600 = 2^4 * 3^2 * 5^2
4900:    2    18         35      0    0    2   ADC    4900 = 2^2 * 5^2 * 7^2
6084:    6    13         21      0    6    0   ADC    6084 = 2^2 * 3^2 * 13^2