# How to check $x^2+y^2+z^2=7 w^2$ admits no no-trivial integral solution?

Show that the equation $$x^2+y^2+z^2=7 w^2$$ has no non-trivial solutions in integers.

This is a statement made in Lam's Introduction to Quadratic Forms over Fields (Chpt 1, Sec 2). "$$7$$ is known to be not in $$D(f)$$ in elementary number theory" where $$D(f)=\{(x,y,z)\in Q^3, x^2+y^2+z^2=7\}$$ and $$Q$$ is rational number.

It is easy by exhaustion to check $$\mod(8)$$ admitting no solution for $$(x,y,z)$$ which I checked by Mathematica. Thus there are no integral solution.

$$\textbf{Q:}$$ Now I want to check that there is no integer solution. In other words, I need to check $$x^2+y^2+z^2=7w^2$$ with $$w\in \mathbb{Z}-\{0\}$$. How do I check this? I tried mod 8 but it seems that this does not say anything about non-existence.

• – Will Jagy Feb 27 '19 at 20:06
• ...Just clear denominators? If you had a rational solution, doing this gives you an integral solution which you proved does not exist. – YiFan Apr 25 '19 at 3:22
• I think mod 8 works, you have $x^2+y^2+z^2+w^2=0\mod 8$ and you can assume $\gcd(x,y,z,w)=1$. I don't think there are solutions. – Julian Mejia Apr 25 '19 at 3:28
• @JulianMejia Unfortunately, I have already tried mathematica to look up the table of mod 8 and there are non-trivial points in $Z_8^4$ giving rise to mod $8$ solutions. That is why I am asking the question. – user45765 Apr 25 '19 at 3:30
• Can you tell me which are these solutions? These solutions should happen only when $x,y,z,w$ are even, but we assumed coprimility. – Julian Mejia Apr 25 '19 at 3:34

Let's say that $$(x,y,z,w)$$ is a solution. By dividing by $$\gcd(x,y,z,w)$$ we can assume $$\gcd(x,y,z,w)=1$$.

We have $$x^2+y^2+z^2+w^2=8w^2$$ By looking mod 2, we have only two options, that two of them are even or that all of them are odd.

1st case: WLOG say $$x,y$$ even and $$z,w$$ are odd, then $$x^2+y^2+z^2+w^2=0+0+1+1 \mod 4$$ giving a contradiction.

2nd case: If $$x,y,z,w$$ are odd, then $$x^2+y^2+z^2+w^2=1+1+1+1 \mod 8$$ giving a contradiction as well.

So, there are no non trivial solutions.

• Why didn't I think of that?.......+1 – DanielWainfleet Apr 25 '19 at 5:01

Hint: We are looking for integers $$a,b,c,d$$ with $$a^2+b^2+c^2 = 7d^2$$. Work modulo a power of $$2$$.

We may assume $$a,b,c,d$$ are coprime. The only quadratic residues modulo $$8$$ are $$0, 1, 4$$ so the LHS is $$0, 1, 2, 3, 4, 5$$ or $$6$$ mod $$8$$ and the RHS is $$0, 4$$ or $$7$$. So we must have that both sides are $$0$$ or $$4$$ mod $$8$$. But this can only happen when $$a,b,c,d$$ are divisible by $$2$$, which contradicts that they are coprime.

(Why does this work? by Hasse-Minkowski, there must be some number modulo which it has no nontrivial solutions. The obstruction comes from invariants such as the discriminant, $$-7$$. But working modulo $$7$$ doesn't help much. Since there are squares, and squares behave weird in characteristic $$2$$, it's reasonable to try working modulo powers of $$2$$. But to be honest, I wrote this hint directly with Legendre's 3-square theorem in mind.)

• What kind of a hint is this? – Aqua Feb 27 '19 at 20:03
• mod 4 is not enough as 1+1+1=3. Mod 8... Also, a trick by Aubry that is discussed in Serre's little book. – Will Jagy Feb 27 '19 at 20:03
• Thank you. Edited. – Bart Michels Feb 27 '19 at 20:04
• see my article with Pete alpha.math.uga.edu/~pete/Clark_Jagy_11_13_2013.pdf – Will Jagy Feb 27 '19 at 20:05
• @Servaes Theorem 3.6 mostly. As I said, there is a discussion of this exact example in Serre's little arithmetic book. – Will Jagy Feb 27 '19 at 20:09