Documente Academic
Documente Profesional
Documente Cultură
Assignment 8
Solutions
Exercise 1.(a) Let a and b be integers not divisible by the prime p. Show that either one or all three of the
integers a, b, and ab are quadratic residues of p.
(b) Show that if n has the prime factorization
2t
n = p2t
1
1 +1
· · · pk2tk +1 pk+1
k+1
· · · p2t
l
l
then
n p1 pk
= ··· .
q q q
(c) Show that if b is a positive integer not divisible by the prime p then
p−1
X ib
= 0.
i=1
p
In particular, the number of occurences of −1 on the right must be even, hence is either 0 or 2. This states
that 1 occurs either 3 or 1 times. In the first case, all three numbers are quadratic residues of p, while in the
second case exactly one of them is a quadratic residue of p.
(b) Using the multiplicativity of the Legendre symbol,
2tk+1
!
p2t1 +1
· · · pk2tk +1 pk+1 · · · p2tl
n 1 l
=
q q
2tk 2tk+1
!
2t1
p1 · · · pk pk+1 · · · p2t l
l p1 · · · pk
= .
q q
is a square. Thus,
n p1 · · · pk p1 pk
= = ··· ,
q q q q
the last equality following from the multiplicativity of the Legendre symbol.
(c) Since b is not divisible by p, p being prime ensures that gcd(b, p) = 1. It follows that
1
is a reduced residue system modulo p. Indeed. each residue ib is reduced, being the product of the reduced
residues i and b. On the other hand, if ib ≡ jb mod p then the fact b is reduced modulo p allows us to
conclude i ≡ j mod p. If 1 ≤ i, j ≤ p − 1, the last congruence implies that i = j. It follows that the numbers
in (1) are incongruent modulo p. Since p has exactly p − 1 reduced residue classes, the claim follows.
From class, we know that up to congruence there are (p − 1)/2 quadratic residues of p and (p − 1)/2
quadratic non-residues of p. Since the elements ib, 1 ≤ i ≤ p − 1, run over all reduced residues of p, we
deduce that (ib/p) = 1 for (p − 1)/2 choices of i and = −1 for the remaining (p − 1)/2 values of i. Thus,
p−1
X
ib p−1 p−1
= − = 0.
i=1
p 2 2
aX 2 + bX + c ≡ 0 mod p, (1)
Y 2 ≡ d mod p
where Y = 2aX + b. Determine the number of incongruent solutions modulo p of (1). (Hint : The last
answer will depend on d.)
Solution : (a) If p = 2 then we may assume a = 1 and b, c are either 0 or 1. There are thus four cases to
consider.
X 2 ≡ 0 mod 2
X 2 + X ≡ 0 mod 2
X 2 + 1 ≡ 0 mod 2
X 2 + X + 1 ≡ 0 mod 2
The first two congruences admit the solution X = 0, while the third has the solution X = 1. By inspection,
neither 0 nor 1 is a solution of the fourth congruence. Since any element is congruent to either 0 or 1
modulo 2, we see it has no solution.
Observing that the product of the constant and linear coefficients are 0 in the first three cases, and 1 in
the fourth case, we deduce that the general quadratic congruence
aX 2 + bX + c ≡ 0 mod 2, gcd(a, 2) = 1,
y ≡ 2ax + b mod p.
2
For such x,
0 ≡ ax2 + bx + c mod p.
The preceding shows that x is a soluton of (1) if and only if y = 2ax+b is a solution of the congruence y 2 ≡
d mod p, that is the congruences are equivalent.
The congruence
Y 2 ≡ 0 mod p
has the unique solution 0. The preceding discussion allows us to conclude that (1) has a unique solution
if d = 0. If d 6= 0 then
Y 2 ≡ d mod p
has either no solution if (d/p) = −1 or exactly two solutions if (d/p) = 1. Once again the preceding discussion
allows us to conclude that (1) has either no solution or exactly two according to d being a quadratic non-
residue or quadratic residue of p.
X 2 ≡ a mod n
in terms of the Legendre symbols pa1 , . . ., pak .
Solution : We assume gcd(a, n) = 1.
By the Chinese Remainder Theorem, the solutions of the congruence
X 2 ≡ a mod n (1)
Yi2 ≡ a mod pα
i ,
i
1 ≤ i ≤ k. (2)
Yi2 ≡ a mod pi
has a solution if and only if a is a quadratic residue of pi . Furthermore, it has exactly two distinct non-zero
solutions modulo p, say ±bi . Observing
d(Yi2 − a)
= 2Yi
dYi
3
does not vanish at ±bi , Hensel’s Lemma ensures that each of the solutions lift to a unique solution of the
congruence
Yi2 ≡ a mod pαi .
i
Thus, the last congruence either has no solutions or precisely two incongruent solutions modulo pα
i , according
i
solutions. The remarks at the start allows us to conlcude that this is also the number of solutions of the
congruence (1).
From the last equation, ( 3p ) is seen to be 1 precisely when both factors on the left are equal. Recalling
that up to congruence 1 is the only quadratic residue of 3, if both factors are equal to 1 then
p ≡ 1 mod 4
and
p ≡ 1 mod 3,
hence the Chinese Remainder Theorem yields
p ≡ 1 mod 12.
On the other hand, as up to congruence 2 is the unique non-quadratic residue of 3, if both factors are equal
to −1 then
p ≡ 3 ≡ −1 mod 4
and
p ≡ 2 ≡ −1 mod 3,
hence the Chinese Remainder Theorem yields
p ≡ −1 mod 12.
4
On the other hand, ( p3 ) is equal to −1 precisely when exactly one of the factors is positive and the other
is negative. If (−1)(p−1)/2 = 1 and ( p3 ) = −1 then
p ≡ 1 ≡ 5 mod 4
and
p ≡ 2 ≡ 5 mod 3
hence the Chinese Remainder Theorem yields
p ≡ 5 mod 12.
p ≡ 3 ≡ −5 mod 4
and
p ≡ 1 ≡ −5 mod 3
hence the Chinese Remainder Theorem yields
p ≡ −5 mod 12.
Observing that 1 and 4 ≡ −1 mod 5 are the quadratic residues of 5, we deduce 5 is a quadratic residue of p
if and only if p ≡ ±1 mod 5.
7 21 107 37 11
Exercise 6. Evaluate the following Legendre symbols. (a) 53 . (b) 101 . (c) 1009 . (d) 641 . (e) 79 .
Solution :(a) Both 7 and 53 are prime. Observing 53 ≡ 1 mod 4, the Law of Quadratic Reciprocity yields
7 53 4
= = = 1.
53 7 7
.
(b) By multiplicativity of the Legendre symbol,
21 3 7
= .
101 101 101
and
7 101 3
= = = −1
101 7 7
by Exercise 5(a), since 7 ≡ −5 mod 12. Therefore,
21 3 7
= = (−1) · (−1) = 1.
101 101 101
5
(c) Both 107 and 1009 are prime. Since 1009 ≡ 1 mod 4, the Law of Quadratic Reciprocity yields
107 1009 46 2 23
= = = .
1009 107 107 107 107
(d) As both 37 and 641 are prime, with the later congruent to 1 modulo 4, the Law of Quadratic Reciprocity
yields
37 641 12 4 3 3
= = = = = 1,
641 37 37 37 37 37
by exercise 5(a), since 37 ≡ 1 mod 12.
(e) Observing 11 and 79 are both prime and congruent to 3 modulo 4, the Law of Quadratic Reciprocity
yields
11 79 2
=− =− = −(−1) = 1,
79 11 11
since 11 ≡ 3 mod 8.
Bonus Question. (a) Show that Euler’s form of the Law of Quadratic Reciprocity implies the Law of
Quadratic Reciprocity as stated in class.
(b) Prove
Euler’s form of the Law of Quadratic Reciprocity using Gauss’s Lemma. (Hint : Show that to
a
find p , one need only find the parity of the number of integers k satisfying one of the inequalities
(2t − 1)p tp
≤k≤ , t = 1, 2, . . . , 2u − 1,
2a a
where u = a/2 if a is even and u = (a − 1)/2 if a is odd. Then, take p = 4am + r with 0 < r < 4a and show
that finiding the parity of the number of integers k satisfying one of the inequalities is the same as finding
the parity of the number of integers satisfying one of the inequalities
(2t − 1)r tr
≤k≤ , t = 1, 2, . . . , 2u − 1.
2a a
Show that this number depends only on r. Then repeat the last step of the argument with r replaced
by 4a − r.)
Solution :(a) Let p and q be odd primes. We distinguish two cases
6
(I) p ≡ q mod 4 : Writing
p − q = 4a,
the fact p and q are distinct primes ensures that p does not divide a. In light of the properties of the
Legendre symbol, Euler’s form yields
p p−q 4a a a 4a p−q −q −1 q
= = = = = = = = .
q q q q p p p p p p
If p ≡ 1 mod 4 then
−1
= (−1)(p−1)/2 = 1 = (−1)(p−1)/2·(q−1)/2 .
p
On the other hand, if p ≡ 3 mod 4 then, recalling that p ≡ q mod 4 then
−1
= (−1)(p−1)/2 = −1 = (−1)(p−1)/2·(q−1)/2 .
p
(−1)(p−1)/2·(q−1)/2 = 1.
Writing p+q = 4a, the fact p and q are distinct odd primes ensure that a is not divisible by p. Therefore,
Euler’s form yields
p p+q 4a a a 4a p+q q q
= = = = = = = = (−1)(p−1)/2·(q−1)/2 .
q q q q p p p p p
a
(b) To apply Gauss’s Lemma to compute p , we need to find the parity of the numbers
p−1
a, 2a, . . . , a
2
which have least positive residue between p/2 and p. If ka is such a number then there exists an integer t
such that
p−1 (2t − 1)p
tp ≥ ka ≥ tp − = . (1)
2 2
Since 1 ≤ k ≤ (p − 1)/2, t must lie among
1, 2, . . . , ⌊a/2⌋ = u.
tp (2t − 1)p
≥k≥ 1≤t≤u (2)
a 2a
Thus we must find the parity of the number of integers k satisfying the last inequalities.
7
Suppose p = 4am + r, with 0 < r < 4a. The conditions (2) become
tr (2t − 1)r
4mt + ≥ k ≥ 2(2t − 1)m + , 1 ≤ t ≤ u.
a 2a
Since we are only interested in parity of the number of k, we can drop the even integers in each of these
inequalities (which reduces the number of k be an even number). Thus, the conditions reduce to
tr (2t − 1)r
≥k≥ ,
a 2a
which only depends on r. Therefore, if p ≡ q ≡ r mod 4a then
a a
= .
p q
In the case p ≡ −q ≡ r mod 4a, then q ≡ 4a − r mod 4a. Substituting 4a − r for r in the conditions we
get
t(4a − r) (2t − 1)(4a − r)
≥k≥
a 2a
which reduces to
tr (2t − 1)r
4t − ≥ k ≥ (2t − 1)2 − .
a 2a
Again, we may drop the even integers in each inequality, and multiplying through by −1 doesn’t change the
number of k, but it makes the conditions identitcalto the conditions for p above. Therefore,
a a
= .
p q