# Quadratic Residues form a sub-semigroup, that cannot be acted on by non-residues

Where they go over a proof that $$x^2 - 5y^2 = 3z^2$$ doesn't have integer solutions $$(x,y,z)$$ such that $$z \ne 0$$. Their proof has the following skeleton (outlined from the powerpoint but with more detail...)

$$x^2 - 5y^2 \equiv 0 \mod 3$$ $$x^2,y^2 \in \lbrace 0, 1 \rbrace \mod 3, \ 5 \equiv 2 \mod 3 \rightarrow x^2\equiv y^2 \equiv 0 \mod 3$$ $$\rightarrow x \equiv y \equiv 0 \mod 3 \rightarrow x^2 \equiv y^2 \equiv 0 \mod 9$$

$$\rightarrow 3z^2 \equiv 0 \mod 9 \rightarrow z^2 \equiv 0 \mod 3 \rightarrow z^2 \equiv 0 \mod 9$$

$$\rightarrow x^2 - 5y^2 \equiv 0 \mod 27$$

Now at this point it is implied that it is easy to "deduce" that this chain continues arbitrarily longer as infinite descent. But I reject that being obvious, in order for this "descent" to continue we have to prove that for each odd-power of 3 there doesn't exist a pair of quadratic residues $$a,b$$ other other than 0 such that $$a=5b$$. otherwise my step in line 2 won't be able to generalize.

So that leads to a natural conjecture: is it true that for all positive odd $$n$$ there doesn't exist non-zero quadratic residues $$a,b \mod 3^n$$ such that $$a \equiv 5b$$? How do I prove that? It seems like it requires induction but its not clear.

Of course that has a natural generalization too (since we could relabel our "classes" arbitrarily ):

$$x^2 \equiv a \mod c \\ y^2 \equiv b \mod c \\ a = kb \\ \rightarrow \exists L | L^2 \equiv k \mod c$$

• What is your definition of quadratic residue? – Lord Shark the Unknown Oct 1 '18 at 21:05
• My definition: The congruence classes of squares modulo $n$ are the “residue Clases” modulo $n$. individual classes are quadratic residues. (Ex: 0,1 are quadratic residues modulo 3, while 2 is not, (0,1,2) are the three equivalence classes of integers modulo 3) – frogeyedpeas Oct 1 '18 at 21:07
• That is a very peculiar definition of quadratic residue. No textbook I am aware of admits zero as a quadratic residue modulo a prime. – Lord Shark the Unknown Oct 1 '18 at 21:09
• Regardless of the definition of quadratic residue, it is clear that the error pointed out in the question is indeed an error. – RghtHndSd Oct 1 '18 at 21:13
• frog, encourage you to read my short answer carefully. It goes as far as is possible in avoiding arguments that trail off to infinity. The two lemmas on mod 9 and mod 25 are finite checks, easily confirmed – Will Jagy Oct 1 '18 at 21:23

Lemma: if there is any integer solution to $$x^2 - 5 y^2 - 3 z^2 = 0$$ with not all of $$x,y,z$$ equal to zero, then there is such a solution with $$\gcd(x,y,z) = 1.$$

Proof: given a solution $$(a,b,c)$$, not all zero, divide all by $$\gcd(a,b,c)$$

Lemma: if we have integers with $$x^2 - 5 y^2 - 3 z^2 \equiv 0 \pmod 9 \; ,$$ then all three of $$x,y,z$$ are divisible by $$3$$

Lemma: if we have integers with $$x^2 - 5 y^2 - 3 z^2 \equiv 0 \pmod {25} \; ,$$ then all three of $$x,y,z$$ are divisible by $$5$$

Note that the product relation for the Hilbert Norm Residue symbol requires that an indefinite ternary quadratic form be anisotropic over $$\mathbb Q_p$$ for an even number of finite primes $$p$$

On the other hand, the prime $$2$$ presents no obstacle:

   n == x^2 - 3 y^2 - 5 z^2 mod 16
note x,y,z not all even.

n         x    y    z

0         0    1    3
1         0    3    2
2         1    3    2
3         0    0    3
4         1    0    3
5         0    3    0
6         1    3    0
7         0    2    3
8         0    1    1
9         0    1    2
10         1    1    2
11         0    0    1
12         1    0    1
13         0    1    0
14         1    1    0
15         0    2    1

n         x    y    z


=========================================================

0 and 3 are missing mod 9

1         0    0    4
2         1    0    4
4         0    0    1
5         1    0    1
6         0    1    0
7         0    0    2
8         1    0    2

0 and 10 and 15 are missing mod 25

1         1    0    0
2         0    1    2
3         0    3    2
4         1    3    2
5         0    0    2
6         1    0    2
7         0    4    2
8         0    2    1
9         1    2    1
11         2    4    2
12         0    6    1
13         0    2    0
14         1    2    0
16         2    6    1
17         0    1    1
18         0    2    2
19         1    2    2
20         0    0    1
21         1    0    1
22         0    1    0
23         0    3    0
24         1    3    0


=====================================

• I don't understand that last line, how much time would it take to learn this machinery?/what is the message being communicated in more elementary terms? – frogeyedpeas Oct 1 '18 at 21:23
• @frogeyedpeas I wrote the last line for lord shark, I suppose; it just means that both primes 3 and 5 work to prove impossibility. I have met some very famous mathematicians who did not know that little tidbit. You do not need it yet, but it is in Cassels, Rational Quadratic Forms. – Will Jagy Oct 1 '18 at 21:26