1.4.2. The Legendre symbol
This section is based on part of [BUR11, Sec. 9.2].
We aim to turn Euler’s Criterion (Corollary 1.4.1.10) into an algorithmic criterion.
Remark 1.4.2.2.
Let be an odd prime and be such that . It is convenient to define
With this convention, the map is defined for all .
Example 1.4.2.3.
Let . We have seen in Example 1.4.1.12 that is a quadratic non-residue modulo and that is a quadratic residue modulo . Therefore,
The Legendre symbol has the following properties.
Proposition 1.4.2.4.
Let be an odd prime and with and . The following statements hold:
-
(1)
If , then .
-
(2)
.
-
(3)
.
-
(4)
.
-
(5)
and .
Proof.
We provide a proof of all statements for the sake of completeness.
(1) See Remark 1.4.1.8.
(2) The integer is a solution of the congruence .
(3) This is the content of Euler’s Criterion (Corollary 1.4.1.10).
Corollary 1.4.2.5.
Let be an odd prime and with and . Then
Proof.
Using Proposition 1.4.2.4(4) and Proposition 1.4.2.4(2),
Corollary 1.4.2.6.
Let be an odd prime. Then
Proof.
By Proposition 1.4.2.4(5), the equality
holds. Since is odd, it is congruent to either or modulo . In the first case, for some , so that
is even. In the second case, for some , so that
is odd. The claim readily follows. ∎
The following theorem illustrates the utility of Corollary 1.4.2.6.
Theorem 1.4.2.7.
There are infinitely many primes congruent to modulo , that is, of the form for some integer .
Exercise. The proof will be added later.
Our next aim is to determine the precise number of quadratic residues modulo a given odd prime (Theorem 1.4.2.9).
Proposition 1.4.2.8.
Let be an odd prime and a primitive root of ; in particular, . Then
that is, is a quadratic non-residue modulo .
Proof.
Suppose that is a quadratic residue modulo . By Euler’s Criterion (Corollary 1.4.1.10),
But then , which contradicts the fact that
Theorem 1.4.2.9.
Let be an odd prime. The following statements hold:
-
(1)
We have
Hence, among the integers , there are exactly quadratic residues modulo and exactly quadratic non-residues modulo .
-
(2)
Let be a primitive root of (Theorem 1.3.3.7). Then an integer with is a quadratic residue modulo if and only if there exists an even integer such that .
Proof.
We prove both statements at once. Let be a primitive root of , which exists by Theorem 1.3.3.7. Since , by Theorem 1.3.2.5, for each there exists a unique integer such that
Therefore, by Proposition 1.4.2.4(1),
The claim follows from the following statements:
-
•
The sum has the even number of summands.
-
•
By Proposition 1.4.2.4(4), we have . Hence,
-
•
By Proposition 1.4.2.8 we have .
Combining the above statements, we obtain
Finally, the above argument shows that, considered modulo , the quadratic residues modulo are the integers of the form with an even integer. In particular, there are exactly quadratic residues modulo and exactly quadratic non-residues modulo . This finishes the proof. ∎
We now aim to obtain a criterion for determining whether is a quadratic residue modulo a given odd prime (Theorem 1.4.2.12). For this, we need the following interpretation of the Legendre symbol.
Theorem 1.4.2.10 (Gauß’ Lemma).
Let be an odd prime and with . Set
and
Then
Proof.
Each is of the form with . Since and , we have , so that
Moreover, by Corollary 1.2.1.11, for we have
Let be the remainders of elements of upon division by such that , and let be those remainders with . The previous observation implies that the integers are distinct. Thus,
We claim that for all . Suppose instead that for some . Since and are the remainders of a pair of elements of when divided by , there exist integers
such that
Then, since and ,
Equivalently, . Consequently,
Equivalently, . By the previous observation, we must have , but this is impossible since . This proves the claim.
Therefore, the distinct integers
are the integers in some order. Hence, the factorial of the integer is
We obtain the congruence
On the other hand,
Since each of the integers is congruent modulo to exactly one element of ,
Combining the above congruences,
Since , Corollary 1.2.1.11 yields the congruence
Equivalently,
By Euler’s Criterion (Corollary 1.4.1.10),
and therefore
Since both sides of the latter congruence equal or , the equality
must hold. This finishes the proof. ∎
We illustrate Gauß’ Lemma (Theorem 1.4.2.10) in an example.
Example 1.4.2.11.
Not covered in the lectureLet .
-
•
Let . Then
Since all satisfy , they are themselves the remainders of division by . The elements of that are larger than are the integers , so that in this case. We obtain
in agreement with Example 1.4.2.3.
-
•
If we now take , then
The remainders of elements of upon division by are, in order,
The elements of whose remainder upon division by is larger than are therefore the integers , so that in this case. We obtain
in agreement with Example 1.4.2.3.
Theorem 1.4.2.12.
Not covered in the lecture Let be an odd prime. Then
Proof.
By Gauß’ Lemma (Theorem 1.4.2.10),
where is the number of integers in the set
whose remainder upon division by is larger than . Since all the elements of are less than in this case, they are their own remainders. Therefore, it suffices to determine the number of elements in that are larger than .
For ,
Here, the symbol denotes the largest integer such that . Since the prime is odd, it is congruent modulo to exactly one of the integers . We analyse these four cases separately:
-
•
If for some , then and
is even.
-
•
If for some , then and
is odd.
-
•
If for some , then and
is odd.
-
•
If for some , then and
is even.
This finishes the proof. ∎
Corollary 1.4.2.13.
Not covered in the lecture Let be an odd prime. Then
Proof.
We have
Suppose that or, equivalently, since we have . In both cases we have for some . Consequently,
or
and both of the above integers are even.
Suppose now that or, equivalently, since we have . In both cases we have for some . Consequently,
or
and both of the above integers are odd. The claim follows by comparing these parities with Theorem 1.4.2.12. ∎
Example 1.4.2.14.
Not covered in the lectureIf or , we have . By Theorem 1.4.2.12,
in agreement with Example 1.4.1.11 (for ) and Example 1.4.2.3 (for ).
The following result illustrates the utility of Theorem 1.4.2.12.
Theorem 1.4.2.15.
There are infinitely many primes congruent to modulo , that is, of the form for some integer .
Exercise. The proof will be added later.