8
Math 324, Fall 2011 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 n = p 2t1+1 1 ··· p 2t k +1 k p 2t k+1 k+1 ··· p 2t l l then n q = p 1 q ··· p k q . (c) Show that if b is a positive integer not divisible by the prime p then p-1 i=1 ib p =0. Solution :(a) By multiplicativity of the Legendre symbol, one has ab p = a p b p . Recalling that the Legendre symbol take values in ±1, multiplication by ab p yields 1= ab p a p b 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, n q = p 2t1+1 1 ··· p 2t k +1 k p 2t k+1 k+1 ··· p 2t l l q = p 2t1 1 ··· p 2t k k p 2t k+1 k+1 ··· p 2t l l q p 1 ··· p k q . The first factor is equal to 1, since p 2t1 1 ··· p 2t k k p 2t k+1 k+1 ··· p 2t l l = p t1 1 ··· p t k k p t k+1 k+1 ··· p t l l 2 is a square. Thus, n q = p 1 ··· p k q = p 1 q ··· p k 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 b, 2b, ··· , (p 1)b (1) 1

Math , Fall Assignment 8dam/Math324/ass8f11sol.pdf · Assignment 8 Solutions Exercise 1 ... Show that there are always two consecutive quadratic residues of p. ... since p 6= 3, 1,

Embed Size (px)

Citation preview

Page 1: Math , Fall Assignment 8dam/Math324/ass8f11sol.pdf · Assignment 8 Solutions Exercise 1 ... Show that there are always two consecutive quadratic residues of p. ... since p 6= 3, 1,

Math 324, Fall 2011Assignment 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 theintegers a, b, and ab are quadratic residues of p.

(b) Show that if n has the prime factorization

n = p2t1+11 · · · p2tk+1

k p2tk+1

k+1 · · · p2tl

l

then(

n

q

)

=

(

p1

q

)

· · ·

(

pk

q

)

.

(c) Show that if b is a positive integer not divisible by the prime p then

p−1∑

i=1

(

ib

p

)

= 0.

Solution :(a) By multiplicativity of the Legendre symbol, one has

(

ab

p

)

=

(

a

p

)(

b

p

)

.

Recalling that the Legendre symbol take values in ±1, multiplication by(

abp

)

yields

1 =

(

ab

p

)(

a

p

)(

b

p

)

.

In particular, the number of occurences of −1 on the right must be even, hence is either 0 or 2. This statesthat 1 occurs either 3 or 1 times. In the first case, all three numbers are quadratic residues of p, while in thesecond case exactly one of them is a quadratic residue of p.

(b) Using the multiplicativity of the Legendre symbol,

(

n

q

)

=

(

p2t1+11 · · · p2tk+1

k p2tk+1

k+1 · · · p2tl

l

q

)

=

(

p2t11 · · · p2tk

k p2tk+1

k+1 · · · p2tl

l

q

)

(

p1 · · · pk

q

)

.

The first factor is equal to 1, since

p2t11 · · · p2tk

k p2tk+1

k+1 · · · p2tl

l =(

pt11 · · · ptk

k ptk+1

k+1 · · · ptl

l

)2

is a square. Thus,(

n

q

)

=

(

p1 · · · pk

q

)

=

(

p1

q

)

· · ·

(

pk

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

b, 2b, · · · , (p − 1)b (1)

1

Page 2: Math , Fall Assignment 8dam/Math324/ass8f11sol.pdf · Assignment 8 Solutions Exercise 1 ... Show that there are always two consecutive quadratic residues of p. ... since p 6= 3, 1,

is a reduced residue system modulo p. Indeed. each residue ib is reduced, being the product of the reducedresidues i and b. On the other hand, if ib ≡ jb mod p then the fact b is reduced modulo p allows us toconclude i ≡ j mod p. If 1 ≤ i, j ≤ p− 1, the last congruence implies that i = j. It follows that the numbersin (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)/2quadratic non-residues of p. Since the elements ib, 1 ≤ i ≤ p − 1, run over all reduced residues of p, wededuce 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∑

i=1

(

ib

p

)

=p − 1

2−

p − 1

2= 0.

Exercise 2. Consider the quadratic congruence

aX2 + bX + c ≡ 0 mod p, (1)

where p is prime and a, b, and c are integers with a not divisible by p.

(a) Let p = 2 Determine which quadratic congruences modulo 2 have solutions.

(b) Let p be an odd prime and set d = b2−4ac. Show that the congruence (1) is equivalent to the congruence

Y 2 ≡ d mod p

where Y = 2aX + b. Determine the number of incongruent solutions modulo p of (1). (Hint : The lastanswer 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 toconsider.

X2 ≡ 0 mod 2

X2 + X ≡ 0 mod 2

X2 + 1 ≡ 0 mod 2

X2 + 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 1modulo 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 inthe fourth case, we deduce that the general quadratic congruence

aX2 + bX + c ≡ 0 mod 2, gcd(a, 2) = 1,

has a solution precisely when bc ≡ 0 mod 2.

(b) Ifax2 + bx + c ≡ 0 mod p

theny2 = (2ax + b)2 = 4a2x2 + 4abx + b2 = 4a(ax2 + bx) + b2 ≡ 4a(−c) + b2 = d mod p.

On the other hand, supposey2 ≡ d mod p.

By hypothesis, a is reduced modulo p. Since p is odd, 2 is also reduced modulo p, hence 2a is reducedmodulo p. The elementary theory of linear congruences asserts there is a unique x modulo p such that

y ≡ 2ax + b mod p.

2

Page 3: Math , Fall Assignment 8dam/Math324/ass8f11sol.pdf · Assignment 8 Solutions Exercise 1 ... Show that there are always two consecutive quadratic residues of p. ... since p 6= 3, 1,

For such x,

0 ≡ y2 − d = (2ax + b)2 − (b2 − 4ac) = 4a2x2 + 4abx + b2 − b2 + 4ac = 4a(

ax2 + bx + c)

mod p.

Observing that 4a = 2 · 2a is reduced modulo p, it can be cancelled to yield

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 y2 ≡d mod p, that is the congruences are equivalent.

The congruenceY 2 ≡ 0 mod p

has the unique solution 0. The preceding discussion allows us to conclude that (1) has a unique solutionif 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 discussionallows 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.

Exercise 3. Let p be a prime with p ≥ 7.

(a) Show that there are always two consecutive quadratic residues of p. (Hint : First show that at least oneof 2, 5, and 10 is a qudratic residue of p.)

(b) Show that there are always two quadratic residues of p that differ by 3.

Solution :(a) Since p 6= 2, 5, exercise 1(a) asserts that at least one of 2, 5 or 10 is a quadratic residue of p.On the other hand, since p 6= 3, 1, 4,and 9 are all quadratic residues of p. It follows immediately that one ofthe pairs (1, 2), (4, 5), or (9, 10) are consecutive quadratic residues of p.

(b) One can take 1 and 4.

Exercise 4. Let n be an odd integer with prime factorization

n = pα1

1 · · · pαk

k .

Find an expression for the number of solutions of the congruence

X2 ≡ a mod n

in terms of the Legendre symbols(

ap1

)

, . . .,(

apk

)

.

Solution : We assume gcd(a, n) = 1.By the Chinese Remainder Theorem, the solutions of the congruence

X2 ≡ a mod n (1)

are in one-one correspondence to the solutions of the system of congruences

Y 2i ≡ a mod pαi

i , 1 ≤ i ≤ k. (2)

Observing gcd(a, n) = 1 implies gcd(a, pi) = 1, the congruence

Y 2i ≡ a mod pi

has a solution if and only if a is a quadratic residue of pi. Furthermore, it has exactly two distinct non-zerosolutions modulo p, say ±bi. Observing

d(Y 2i − a)

dYi= 2Yi

3

Page 4: Math , Fall Assignment 8dam/Math324/ass8f11sol.pdf · Assignment 8 Solutions Exercise 1 ... Show that there are always two consecutive quadratic residues of p. ... since p 6= 3, 1,

does not vanish at ±bi, Hensel’s Lemma ensures that each of the solutions lift to a unique solution of thecongruence

Y 2i ≡ a mod pαi

i .

Thus, the last congruence either has no solutions or precisely two incongruent solutions modulo pαi

i , accordingto whether a is a quadratic nonresidue or residue of pi.

Observing

1 +

(

a

pi

)

=

{

0, if a is a quadratic nonresidue of pi;2, if a is a quadratic residue of pi,

the preceding discussion allows us to conclude that the system (2) has precisely

(

1 +

(

a

p1

))

· · ·

(

1 +

(

a

pk

))

.

solutions. The remarks at the start allows us to conlcude that this is also the number of solutions of thecongruence (1).

Exercise 5. (a) Show that if p is an odd prime then

(

3

p

)

=

{

1, if p ≡ ±1 mod 12−1 if p ≡ ±5 mod 12.

(Hint : Law of Quadratic Reciprocity.)

(b) Find a congruence describing all (odd) primes for which 5 is a qudratic residue.

Solution : If p is an odd prime other than 3, the Law of Quadratic Reciprocity yields

(

3

p

)

= (−1)(p−1)/2(p

3

)

.

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 equalto −1 then

p ≡ 3 ≡ −1 mod 4

and

p ≡ 2 ≡ −1 mod 3,

hence the Chinese Remainder Theorem yields

p ≡ −1 mod 12.

In summary, ( 3p ) = 1 precisely when p ≡ ±1 mod 12.

4

Page 5: Math , Fall Assignment 8dam/Math324/ass8f11sol.pdf · Assignment 8 Solutions Exercise 1 ... Show that there are always two consecutive quadratic residues of p. ... since p 6= 3, 1,

On the other hand, ( 3p ) 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

andp ≡ 2 ≡ 5 mod 3

hence the Chinese Remainder Theorem yields

p ≡ 5 mod 12.

On the other hand, if (−1)(p−1)/2 = −1 and (p3 ) = 1 then

p ≡ 3 ≡ −5 mod 4

andp ≡ 1 ≡ −5 mod 3

hence the Chinese Remainder Theorem yields

p ≡ −5 mod 12.

In summary, ( 3p ) = −1 precisely when p ≡ ±5 mod 12.

(b) Since 5 ≡ 1 mod 4, if p is an odd prime other than 5 then the Law of Quadratic Reciprocity yields

(

5

p

)

=(p

5

)

.

Observing that 1 and 4 ≡ −1 mod 5 are the quadratic residues of 5, we deduce 5 is a quadratic residue of pif and only if p ≡ ±1 mod 5.

Exercise 6. Evaluate the following Legendre symbols. (a)(

753

)

. (b)(

21101

)

. (c)(

1071009

)

. (d)(

37641

)

. (e)(

1179

)

.

Solution :(a) Both 7 and 53 are prime. Observing 53 ≡ 1 mod 4, the Law of Quadratic Reciprocity yields

(

7

53

)

=

(

53

7

)

=

(

4

7

)

= 1.

.

(b) By multiplicativity of the Legendre symbol,

(

21

101

)

=

(

3

101

)(

7

101

)

.

Since 101 ≡ 1 mod 4, the Law of Quadratic Reciprocity yields

(

3

101

)

=

(

101

3

)

=

(

2

3

)

= −1

and(

7

101

)

=

(

101

7

)

=

(

3

7

)

= −1

by Exercise 5(a), since 7 ≡ −5 mod 12. Therefore,

(

21

101

)

=

(

3

101

)(

7

101

)

= (−1) · (−1) = 1.

5

Page 6: Math , Fall Assignment 8dam/Math324/ass8f11sol.pdf · Assignment 8 Solutions Exercise 1 ... Show that there are always two consecutive quadratic residues of p. ... since p 6= 3, 1,

(c) Both 107 and 1009 are prime. Since 1009 ≡ 1 mod 4, the Law of Quadratic Reciprocity yields

(

107

1009

)

=

(

1009

107

)

=

(

46

107

)

=

(

2

107

)(

23

107

)

.

Observing 107 ≡ 3 mod 8, we have(

2

107

)

= −1.

Furthermore, since both 23 and 107 are congruent to 3 modulo 4, the Law of Quadratic Reciprocity yields

(

23

107

)

= −

(

107

23

)

= − (15 · 23) = − (5 · 23) (3 · 23) .

Since 23 6≡ ±1 mod 5, exercise 5(b) allows us to conclude that(

523

)

= −1. Since 23 ≡ −1 mod 12, exer-

cise 5(a) allows us to conclude(

323

)

= 1, hence

(

23

107

)

= −(−1) · 1 = 1.

In light of the preceding calculations, we deduce

(

107

1009

)

=

(

2

107

)(

23

107

)

= −1 · 1 = −1.

(d) As both 37 and 641 are prime, with the later congruent to 1 modulo 4, the Law of Quadratic Reciprocityyields

(

37

641

)

=

(

641

37

)

=

(

12

37

)

=

(

4

37

)(

3

37

)

=

(

3

37

)

= 1,

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 Reciprocityyields

(

11

79

)

= −

(

79

11

)

= −

(

2

11

)

= −(−1) = 1,

since 11 ≡ 3 mod 8.

Bonus Question. (a) Show that Euler’s form of the Law of Quadratic Reciprocity implies the Law ofQuadratic Reciprocity as stated in class.

(b) Prove Euler’s form of the Law of Quadratic Reciprocity using Gauss’s Lemma. (Hint : Show that to

find(

ap

)

, one need only find the parity of the number of integers k satisfying one of the inequalities

(2t − 1)p

2a≤ k ≤

tp

a, t = 1, 2, . . . , 2u − 1,

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 showthat finiding the parity of the number of integers k satisfying one of the inequalities is the same as findingthe parity of the number of integers satisfying one of the inequalities

(2t − 1)r

2a≤ k ≤

tr

a, t = 1, 2, . . . , 2u − 1.

Show that this number depends only on r. Then repeat the last step of the argument with r replacedby 4a − r.)

Solution :(a) Let p and q be odd primes. We distinguish two cases

6

Page 7: Math , Fall Assignment 8dam/Math324/ass8f11sol.pdf · Assignment 8 Solutions Exercise 1 ... Show that there are always two consecutive quadratic residues of p. ... since p 6= 3, 1,

(I) p ≡ q mod 4 : Writingp − q = 4a,

the fact p and q are distinct primes ensures that p does not divide a. In light of the properties of theLegendre symbol, Euler’s form yields

(

p

q

)

=

(

p − q

q

)

=

(

4a

q

)

=

(

a

q

)

=

(

a

p

)

=

(

4a

p

)

=

(

p − q

p

)

=

(

−q

p

)

=

(

−1

p

)(

q

p

)

.

If p ≡ 1 mod 4 then(

−1

p

)

= (−1)(p−1)/2 = 1 = (−1)(p−1)/2·(q−1)/2.

On the other hand, if p ≡ 3 mod 4 then, recalling that p ≡ q mod 4 then

(

−1

p

)

= (−1)(p−1)/2 = −1 = (−1)(p−1)/2·(q−1)/2.

In all cases, we see that(

−1

p

)

= (−1)(p−1)/2·(q−1)/2,

hence the preceding calculations yield

(

p

q

)

= (−1)(p−1)/2·(q−1)/2

(

q

p

)

.

(II) p ≡ −q mod 4 : In this case, one of p and q is congruent to 1 modulo 4, so

(−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

q

)

=

(

p + q

q

)

=

(

4a

q

)

=

(

a

q

)

=

(

a

p

)

=

(

4a

p

)

=

(

p + q

p

)

=

(

q

p

)

= (−1)(p−1)/2·(q−1)/2

(

q

p

)

.

(b) To apply Gauss’s Lemma to compute(

ap

)

, we need to find the parity of the numbers

a, 2a, . . . ,p − 1

2a

which have least positive residue between p/2 and p. If ka is such a number then there exists an integer tsuch that

tp ≥ ka ≥ tp −p − 1

2=

(2t − 1)p

2. (1)

Since 1 ≤ k ≤ (p − 1)/2, t must lie among

1, 2, . . . , ⌊a/2⌋ = u.

For each such t, dividing the inequality (1) by a yields

tp

a≥ k ≥

(2t − 1)p

2a1 ≤ t ≤ u (2)

Thus we must find the parity of the number of integers k satisfying the last inequalities.

7

Page 8: Math , Fall Assignment 8dam/Math324/ass8f11sol.pdf · Assignment 8 Solutions Exercise 1 ... Show that there are always two consecutive quadratic residues of p. ... since p 6= 3, 1,

Suppose p = 4am + r, with 0 < r < 4a. The conditions (2) become

4mt +tr

a≥ k ≥ 2(2t − 1)m +

(2t − 1)r

2a, 1 ≤ t ≤ u.

Since we are only interested in parity of the number of k, we can drop the even integers in each of theseinequalities (which reduces the number of k be an even number). Thus, the conditions reduce to

tr

a≥ k ≥

(2t − 1)r

2a,

which only depends on r. Therefore, if p ≡ q ≡ r mod 4a then

(

a

p

)

=

(

a

q

)

.

In the case p ≡ −q ≡ r mod 4a, then q ≡ 4a− r mod 4a. Substituting 4a− r for r in the conditions weget

t(4a − r)

a≥ k ≥

(2t − 1)(4a − r)

2a

which reduces to

4t −tr

a≥ k ≥ (2t − 1)2 −

(2t − 1)r

2a.

Again, we may drop the even integers in each inequality, and multiplying through by −1 doesn’t change thenumber of k, but it makes the conditions identitcalto the conditions for p above. Therefore,

(

a

p

)

=

(

a

q

)

.

8