# 19 is not the sum of two perfect rational squares

Can someone show me a proof as to why 19 is not the sum of the squares of two rational number? I have seen similar proofs for other numbers but I need help with 19 specifically since its residue system is so large.

• Suppose $19=(a/c)^2+(b/c)^2$, multiply both sides by $c^2$ then take the equation mod 4. – Sophie May 15 '17 at 6:21

Note that the square of an integer can only be $0$ or $1$ mod $4$. So the sum of two perfect squares can only be $0$, $1$ or $2$ mod $4$.

An odd integer is representable as the sum of two integers if and only if it is $1$ mod $4$.

Let $n\equiv 0$ (mod $4$). If $n=x^2+y^2$ for some $x,y\in\mathbb{N}$, then $x$ and $y$ are both even. So $\frac{n}{4}=(\frac{x}{2})^2+(\frac{y}{2})^2$.

Now suppose that $$19=\left(\frac{p}{q}\right)^2+\left(\frac{r}{s}\right)^2$$ for some $p,q,r,s\in\mathbb{N}$ with $q,s\ne0$. Then we have

$$19(qs)^2=(ps)^2+(rq)^2$$

If $qs$ is odd and $(qs)^2\equiv 1$ (mod $4$) and hence $19(qs)^2\equiv 3$ (mod $4$) , which is impossible. So $qs$ is even and hence $(qs)^2$ is divisible by $4$. So $19(\frac{qs}{2})^2$ is the sum of two perfect squares. We can repeatedly divide $qs$ by $2$ until the quotient is odd, but then the quotient is 3 (mod $4$) and cannot be the sum of two perfect square. This leads to a contradiction.

• To the O.P. : Observe that this method applies for any prime (not just for 19) that is 1 less than a multiple of 4. – DanielWainfleet May 15 '17 at 8:14
• I'm confused about when qs is even. Why are you repeatedly dividing by 2? Does you proof basically state that 19${(qs)}^2$ is the sum of two perfect squares if qs is even? – shrindle May 16 '17 at 5:28
• I have proved that if $n$ is a multiple of $4$ which is expressible as the sum of two perfect squares, then $\frac{n}{4}$ is also expressible as the sum of two perfect squares, Now $qs$ is even. So $19(qs)^2$ is expressible as the sum of two perfect squares, We can divide $qs$ by $2$ so that $19(\frac{qs}{2})=\frac{19(qs)^2}{4}$ is expressible as the sum of two perfect squares. If $\frac{qs}{2}$ is odd, then the process ends. If $\frac{qs}{2}$ is still even, we can further divide it by $2$ and the resulting integer is still expressible as the sum of two perfect squares. – CY Aries May 16 '17 at 5:40
• We can continue this process until $\frac{qs}{2^k}$ is odd. – CY Aries May 16 '17 at 5:41
• Doesn't that entail that 19 is the sum of two rational numbers if qs is odd? – shrindle May 16 '17 at 5:44

Because $x^2\equiv(0,1,4,9,-3,6,-2,-8,7,5)\mod19$ and there does not exist $\{a,b\}\subset\{1,4,9,-3,6,-2,-8,7,5\}$, for which $a+b$ divided by $19$ leaves no remainder.

The rest is an infinite descent.

A square must be $\equiv 0$ or $1$ mod $4$, hence a sum of squares must be $0,1$ or $2$ mod $4$. But $19 \equiv 3$ mod $4$.