Quadratic Residue Summary and Examples
Quadratic Residue Summary and Examples
Eulers Criterion:
p1
a Zp is a quadratic residue if and only if a 2 p +1.
p1
a Zp is a quadratic non-residue if and only if a 2 p 1.
Legendre Symbol:
+1 if a is a quadratic residue
a
= 1 if a is a quadratic non-residue
p
0 if gcd(a, p) 6= 1
Various facts used to compute a
p . For all of these, let p, q be odd primes (p 6= q) and a Zp .
p1
p1
a a
(Restating Eulers Criterion) p = +1 a 2 p +1, and p = 1 a 2 p 1.
p1
ap p a 2
If a p b, then ap = pb .
abp = ap pb
p1
P
a
p =0
a=1
(The book states it slightly differently - I think this way is more convenient when performing
calculations.)
1
n o
(Gauss Lemma) Let n be the number of elements in the set S = a, 2a, . . . , p1
2 a that
p
reduce to an element greater than 2 modulo p. Then
a
= (1)n .
p
Here are a few specific values of which you should be aware. There are others stated in the book
and homework, but these are the most important:
1
p =1
(
1
p1 +1 if p 1 mod 4
p = (1) 2 =
1 if p 3 mod 4
(
2 p1 +1 if p 1 mod 8
p = (1) 2 =
1 if p 3 mod 8
Examples
1.
3 971 31 97
= (1) 2 2
97 3
48 97
= (1)
3
1
=
3
=1
2.
3 3891 32
1 389
= (1) 2
389 3
389
= (1)194
3
2
=
3
= 1
22
3. 11 =0
2
4.
5! 5 4 3 2 1
=
7 7 7 7 7 7
2 3
5 2 3 2 1 5 3 2
= = 1
7 7 7 7 7 7 7 7
51 71 7 31 71 7
= (1) 2 2 (1) 2 2 13
5 3
6 2 3 1
= (1) (1)
5 3
= (1)(1)(1)(1) = 1
5.
24 5 11
880
=
863 863
2 4
5 11
=
863 863 863
51 8631 863 111 8631 863
= 1 (1) 2 2 (1) 2 2
5 11
3 5
= (1)
5 11
5
= (1)(1)
11
51 111
11
= (1) 2 2
5
1
=
5
=1
Proof. Assume that there are finitely many such primes, say p1 (= 5), p2 , . . . , pn , and let
N = 4p1 2 . . . pn 2 + 1 and x = 2p1 . . . pn . Now N is of the form 4k + 1, and N > pi for all i, so
N must be composite. Since N is odd, its prime divisors are odd (and not of the form 4k +1).
If p is a prime divisor of N , p|x2 + 1, so x2 + 1 p 0 and x2 p 1. Thus 1 is a quadratic
modulo p, so p 1 mod 4 (by exercise 4.1.6) and p = 4k + 1 for some k. But then p|N and
p|p1 . . . pn implies p|4p1 2 . . . pn 2 (since p is one of those primes) and thus p|N (N 1) = 1,
a contradiction. Thus there are infinitely many such primes. Q.E.D.
7. Show that there are infinitely many primes of the form 6k + 1. [Proof uses the result of
and hint from Exercise 4.3.4.]
Proof. Assume that there are finitely many such primes, say p1 (= 7), p2 , . . . , pn , and let
N = 4p1 2 . . . pn 2 +3 and x = 2p1 . . . pn . Note that N > pi for all i, and N = 4(6(. . . )+1)+3 6
7 6 1 so N is of the form 6k + 1, and so N must be composite. Since N is odd, its prime
3
divisors are odd (and not of the form 6k + 1). If p is a prime divisor of N , p|x2 + 3, so
x2 + 3 p 0 and x2 p 3. Thus 3 is a quadratic modulo p, so p 1 mod 6 (by exercise
4.3.4) and p = 6k + 1 for some k. But then p|N and p|p1 . . . pn implies p|4p1 2 . . . pn 2 (since p
is one of those primes) and thus p|N (N 1) = 1, a contradiction. Thus there are infinitely
many such primes. Q.E.D.