You are on page 1of 16

Complete solutions to 7.

1 Page 1 of 16

Complete Solutions to Exercise 7.1

1. In each case we create a table and then plot the appropriate graph:
(a) We are given p  5 so our least positive residues are x  1, 2, 3 and 4:
x 1 2 3 4


x 2 mod 5  1 4 4 1

Plotting this graph gives


x 2  2 mod 5 

As we can see from the graph and table there is no solution to x 2  2 mod 5 .  
Therefore, we cannot solve the Diophantine equation x 2  2  5y .
(b) This time p  17 so our table is
x 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16


x 2 mod 17  1 4 9 16 8 2 15 13 13 15 2 8 16 9 4 1

Plotting the graph:

x 2  2  mod 17 

Using the above graph or table we have


Complete solutions to 7.1 Page 2 of 16


x 2  2 mod 17  
 x  6 mod 17  
and x  11 mod 17 
Now we need to solve the Diophantine equation
x 2  2  17y .
Substituting the simplest of these solutions for x we have x  6, x  11 gives
36  2
62  2  17y  y  2
17
121  2
112  2  17y  y  7
17

Our solutions are x  6, y  2  
and x  11, y  7 .
(c) Similarly for p  19 we have:
x 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18

x 2 mod 19  1 4 9 16 6 17 11 7 5 5 7 11 17 6 16 9 4 1
Plotting this graph gives:

x 2  2  mod 19 

As we can see from the graph and table that there are no solutions to


x 2  2 mod 19 . 
Hence the Diophantine equation x 2  2  19y has no solutions.

2. In each case we use the Proposition (7.4):


p 1
quadratic residues.
2
(a) Substituting p  1223 into this formula gives that there are
Complete solutions to 7.1 Page 3 of 16

1223  1
 611 quadratic residues of 1223.
2
3571  1
(b) Similarly, there are exactly  1785 quadratic residues of 3571.
2
104 729  1
(c) Also, there are  52 364 quadratic residues of 104 729.
2
179 424 673  1
(d) Repeating this we have  89 712 336 quadratic residues of
2
179 424 673.

3. We need to use Euler’s Criterion (7.5) to determine whether the given residues are
quadratic residues:

 
p1
a is a quadratic residue of p  a 2
 1 mod p

p  1 37  1
We are given the prime p  37 so   18 .
2 2

(a) In this case we need to evaluate 618 mod 37 . We have 
62  36  1 mod 37 . 
Therefore using the rules of indices we have

   1  1 mod 37 .  
9 9
618  62

 
Since 618  1 mod 37 so by Euler’s Criterion, 6 is a quadratic non-residue of 37.

(b) Similarly, we need to find the least positive residue of 218 mod 37 . Evaluating  
a simple power of 2 gives


25  32  5 mod 37 . 
Writing the index 18 as a multiple of 5 plus any remainder we have
18  3  5  3 .
Therefore, we have
353
 
3
218  2  25  2 3
 5  8  125  8  14  8  112  1 mod 37  
3

 
Since 218  1 mod 37 so 2 is a quadratic non-residue of 37.

 
(c) This time we need to evaluate 1218 mod 37 . First we find 122 mod 37 :  
122  144  4 mod 37  
Complete solutions to 7.1 Page 4 of 16

Evaluating powers of 4 :


4 
2
 16 mod 37

4  64   10  10 mod 37


3

4  4  10  40  3 mod 37


4

Since 3 is a smaller number let us use this result; 4  3 mod 37 . We have  
4

   4
9 9
1218  122
 4  4
8


 
4
2
 4   4  3  4  36  1 mod 37
2

 
Hence 12 is a quadratic residue of 37 because 1218  1 mod 37 .  
(d) We need to find the least positive residue of 518 mod 37 . Finding a simpler  
index of 5:


52  25  12 mod 37 . 
We have

   12 mod 37


9 9
518  52 (*)
For the residue 12 we can use the results of part (c).

12  12  12


9 8

 
 122  12
4

 4  12  3  12  36  1 mod 37  


4

Using this result in (*) gives


518  12  1 mod 37 .  
9

Hence 5 is a quadratic non-residue of 37.

 
4. To find the square root of a mod p means we need to solve x 2  a mod p .  
We need to first determine if the given residues are quadratic residues. How?
By using Euler’s Criterion (7.5):

 
p1
a is a quadratic residue of p  a 2
 1 mod p

p  1 17  1
In each case p  17 so   8.
2 2
Complete solutions to 7.1 Page 5 of 16

(a) We first need to find the least positive residue of 28 mod 17 . Well we have  
24  16  1 mod 17 .  
Therefore

   1  
2 2
28  24  1 mod 17

By Euler’s Criterion, 2 is a quadratic residue of 17 because 28  1 mod 17 . This  


 
means that x 2  2 mod 17 has solutions. Squaring x  1, 2, 3, 4, 5 does not give
2 modulo 17. Squaring x  6 gives
62  36  2 mod 17  
 
Hence x  6 mod 17 is one solution. By Proposition (3.14) (b):


a 2  b 2 mod p  a  b mod p  
We have the two solutions given by:
x 2  62  x  6  6,  6  6, 11 mod 17 .  
 
The two square roots of 2 mod 17 are x  6, 11 mod 17 .  

(b) We have been given x 2  16 mod 17 . Note that 
x 2  16  42 mod 17 .  
We have
x 2  42  x  4  4,  4  4, 13 mod 17 .  
 
Square roots of 16 mod 17 are x  4,13 mod 17 .  
 
(c) This time we are given x 2  5 mod 17 . Again, we first test to see if there are

solutions. We need to find the least positive residue of 58 mod 17 :  


52  25  8 mod 17 .  
Remember 8  2 3 so

     2  mod 17
4 4 3
58  52  8 4  23 (*) 4

Recall (from part(a)) that 2  1 mod 17 . Substituting this into (*) yields
4

5  2   1  1 mod 17 .


3 3
8 4

Since 5  1 mod 17 so 5 is a quadratic non-residue which implies


8

x  5 mod 17 has no solutions.


2
Complete solutions to 7.1 Page 6 of 16

 
The square roots of 5 mod 17 do not exist.

5. In each case we need to complete the square on the given residues.

 
(a) We need to solve x 2  2x  2  0 mod 23 . Completing the square, we have

x 2  2x  2  x 2  2x  1  1  x  1  1  0 mod 23 .  
2

Subtracting 1 from both sides gives

x  1  
2
 1 mod 23 .

Let y  x  1 then we need to solve y 2  1 mod 23 .  


The prime p is 23 so we first need to find

 
p1 231

1  1  1  1 mod 23 .


11
2 2

This means there are no solutions to y  x  1  1 mod 23 so there are no  


2

solutions to the given congruence x 2  2x  2  0 mod 23 .  


(b) Now we need to solve the quadratic congruence x 2  4x  2  0 mod 23 .  
Completing the square gives

 4x  4  2  x  2  2  0 mod 23 .  
2
x 2  4x  2  x
2

x 2
2

Adding 2 to both sides yields

x  2  
2
 2 mod 23 .
Let y  x  2 so we need to solve the quadratic congruence
y 2  2 mod 23 .  
First, we need to see if 2 is a quadratic residue of 23 by applying Euler’s Criterion.
This means we must find the least positive residue of 211 mod 23 .  
Evaluating some simple powers of 2:

 
25  32  9 mod 23 , 26  64  5 mod 23  
We have
211  265  26  25  5  9  45  22  1 mod 23  
 
Hence, we have solutions to y 2  2 mod 23 . We have two solutions to this
quadratic congruence. Trying y  5 gives

52  25  2 mod 23 .  
Complete solutions to 7.1 Page 7 of 16

We need to find the other solution which is given by 5  18 mod 23 .  


 
We have the solutions y  5 mod 23 and y  18 mod 23 . Remember we need to  
find x where y  x  2 . Subtracting 2 from both these congruences gives

 
x  2  5 mod 23  x  3 mod 23  
x  2  18 mod 23  x  16 mod 23  
The two solutions to the given congruence x 2  4x  2  0 mod 23 are  
x  3, 16 mod 23  

(c) We are required to solve x 2  6x  5  0 mod 23 . Completing the square gives 
x 2  6x  5  x 2  6x  9  4
 x  3  4  0 mod 23  
2

Adding 4 to both sides yields

x  3  
2
 4 mod 23

 
Let y  x  3 so we must solve y 2  4 mod 23 . Clearly trying y  2 is going to

 
work because 22  4 mod 23 . Hence one of the solutions is y  2 mod 23 . We  
need to find the other solution. Therefore
y  2  2,  2  2, 21 mod 23 .  
  
Hence, we have y  2 mod 23 and y  21 mod 23 . Substituting y  x  3 gives 

x  3  2 mod 23   x  1  22 mod 23  
x  3  21 mod 23    x  18 mod 23  

Our two solutions to x 2  6x  5  0 mod 23 are x  18,  22 mod 23 .

6. We need to prove that 1 is a quadratic residue of an odd prime p 


p  1 mod 4 . 
Proof.

 . Let  
p  1 mod 4 so p  1  4k where k is an integer. Using Euler’s
Criterion (7.5):

 
p1
a is a quadratic residue of p  a 2
 1 mod p

Applying this with a  1 gives


Complete solutions to 7.1 Page 8 of 16

 
p 1 4k 11

1  1  1  1 mod p


2k
2 2

Hence 1 is a quadratic residue of p.


 . Let 1 be a quadratic residue of p. By Euler’s Criterion we have

 
p 1

1 2  1 mod p .
p 1 p 1
This implies that must be even or  2m where m is an integer. Making
2 2
p the subject of the formula gives p  1  4m which implies p  1 mod 4 .  
This completes our proof.

7. (a) We are required to prove that if a is a quadratic residue then p  a is a


quadratic residue  p  1 mod 4 .  
Proof.
This is very similar to the proof of the previous question.

 . Let  
p  1 mod 4 so p  1  4k where k is an integer. Using Euler’s
Criterion (7.5):

 
p1
a is a quadratic residue of p  a 2
 1 mod p

Applying this
p1 p 1

p  a  2  a  2

 
p1 p 1 4k 11 p 1 p 1
 1 2 a 2
 1 2 a 2
a 2

 1 mod p
 Because a is a
1 quadratic residue of p

By Euler’s Criterion p  a is a quadratic residue of p.


 . Let p  a be a quadratic residue of p. By Euler’s Criterion we have
p1 p 1

p  a  2
 a  2

p1 p 1
 1 2
a 2

p1
 1
 Because a is a quadratic residue
2 1
 
p1
 1 2  1  Because p  a is a quadratic residue
 
p 1 p 1
This implies that must be even or  2m where m is an integer. Making
2 2
p the subject of the formula gives p  1  4m which implies p  1 mod 4 .  
Complete solutions to 7.1 Page 9 of 16

This completes our proof.



(b) In this case we need to prove:
If a is a quadratic residue then p  a is a quadratic non-residue  p  3 mod 4 .  
Proof.

 . Let  
p  3 mod 4 so p  3  4k where k is an integer. Using Euler’s
Criterion (7.5):

 
p1
a is a quadratic residue of p  a 2
 1 mod p

Applying this
p 1 p 1

p  a  2
 a  2

p1 p 1
 1 2
a 2

4 k 31 p 1
 1 2 a 2

 
p1
 1  1
2k 1
a 2
1  1 mod p
Because a is a
quadratic residue of p

By Euler’s Criterion p  a is a quadratic non-residue of p.


 . Let p  a be a quadratic non- residue of p. By Euler’s Criterion we have
p1 p1

p  a  2
 a  2

p1 p 1
 1 2
a 2

p1
 1Because a is a quadratic residue
2 1
 
p1
 1 2  1  Because p  a is a quadratic non-residue
 
p 1 p 1
This implies that must be odd or  2m  1 where m is an integer.
2 2
Making p the subject of the formula gives
p  1  4m  2  p  4m  3

which gives p  3 mod 4 .  


This completes our proof.

8. We need to show that ax 2  bx  c  0 mod p where p   a can be written as


y 2  m mod p . 
Complete solutions to 7.1 Page 10 of 16

Proof.
Multiply both sides of the given quadratic congruence by 4a yields
4a 2x 2  4abx  4ac  0 mod p .  
Completing the square on this gives

4a 2x 2  4abx  4ac  2ax  b   4ac  b 2


2

 2ax  b   b 2  4ac mod p  


2

Let y  2ax  b then y 2  2ax  b  and let m  b 2  4ac .


2


We have y 2  m mod p . 

We solve each of the given quadratic congruences using the above established
formula.

 
(a) We are given 2x 2  2x  1  0 mod 29 so substituting a  2, b  2, c  1
into y  2ax  b  4x  2 and m  b 2  4ac  4  4  2  1  4 yields


y 2  4 mod 29  25 mod 29 .   
 
This y 2  25  52 mod 29 implies y  5  5, 24 mod 29 . We have  
y  4x  2  5  4x  3  x  8 mod 29  
y  4x  2  24  4x  22  x  20 mod 29  
Our solutions are x  8, 20 mod 29 .  
(b) This time we are asked to solve 5x 2  9x  4  0 mod 101 . Again using the  
above derived formula with a  5, b  9, c  4 :
y  2ax  b  10x  9 , m  b 2  4ac  81  4  5  4   1 .


Using y 2  m mod 101 gives 
 
y 2  1 mod 101  y  1 mod 101 .  

Thus, we need to solve 10x  9  1 mod 101  10x  8  93 mod 101 .   
We can rewrite the last congruence as a linear Diophantine equation:


10x  93 mod 101   10x  93  101y  10x  101y  93
10 and 101 are relatively prime so we can solve
10x  101y  1  x  10, y  1
10x  101y  93  x  930, y  93
Complete solutions to 7.1 Page 11 of 16

 
Therefore x  930  80 mod 101 . One of our solutions is x  80 mod 101 .  
Similarly computing the other solution for y  1  100 mod 101 :  
10x  9  100 mod 101    10x  91mod 101
Writing the equivalent linear Diophantine equation 10x  101y  91 . We have
10x  101y  1  x  10, y  1
10x  101y  91  x  910, y  91

Our other solution is x  910  100 mod 101 . The solutions to  



5x 2  9x  4  0 mod 101 are x  80, 100 mod 101   

(c) We are asked to solve 7x 2  9x  3  0 mod 41 . Again using the above formula 
with a  7, b  9, c  3 gives
y  2ax  b  14x  9 , m  b 2  4ac  81  4  7  3  3 .

 
We need to solve y 2  3 mod 41 . We first need to check that 3 is a quadratic
residue of 41 by using Euler’s Criterion (7.5):

 
p1
a is a quadratic residue of p  a 2
 1 mod p

 
411
Computing 3  3  x mod 41 . Evaluating simpler powers of 3 :
20
2

3  
4
 81  40  1 mod 41 .
Therefore, using this we have

 
4
5

3  3  3   1  1 mod 41 .


20 45 5

 

Hence by Euler’s Criterion we conclude that y 2  3 mod 41 has no solutions so 
there are no solutions to the given equation 7x  9x  3  0 mod 41 . 2

(d) We need to solve 2x  20x  49  0 mod 61 .


2

Substituting a  2, b  20, c  49 into y  2ax  b  4x  20 and


m  202  4  2  49  8 .

 
We need to solve y 2  8 mod 61 . We first need to check that 8 is a quadratic
residue of 61 by using Euler’s Criterion (7.5):

 
p1
a is a quadratic residue of p  a 2
 1 mod p
Complete solutions to 7.1 Page 12 of 16

 
611
Computing 8 2
 830  x mod 61 . Computing powers of 8:

     
2
82  64  3 mod 61 and 34  32  92  81  20 mod 61 .


We use this result 34  20 mod 61 to evaluate 830   x mod 61 .

   
15 3
830  82  315  34  33  203  27
 202  20  27  34  52  1768  60  1 mod 61  
By Euler’s criterion we know 8 is a quadratic non residue so there is no solution to

 
y 2  8 mod 61 which implies 2x 2  20x  49  0 mod 61 has no solutions.  

 
p1
9. We need to prove that a 2
 1 mod p provided p a . How?

We use Fermat’s Little Theorem (4.1):

n p1  1 mod p  
Proof.
p1
Let x  a 2
then
 p1 
2

x  a 2   a p1  1 mod p


2

     By Fermat's Little Theorem 


 

Now using Lemma (4.3):


x 2  1 mod p   x  1 mod p 
p 1
We have x  1 mod p  . Therefore x  a 2
 1 mod p  . This completes our
proof.

10. We need to prove that if a is a quadratic residue of p then a is not a primitive root
of p.
Proof.
Let a be a quadratic residue of p. By Euler’s Criterion we have

 
p1
a 2
 1 mod p
Suppose a is a primitive root of p. By the definition of the primitive root (6.10):

 
If gcd a, n  1 and a has order  n  then the integer a is called the primitive
root of the integer n.
Complete solutions to 7.1 Page 13 of 16

In our case we are dealing with primes p so  p   p  1 . Since a is a primitive

 
p1
root so a 2
 1 mod p . This is a contradiction because from above we have

 
p1
a 2
 1 mod p . Hence our supposition a is a primitive root of p must be wrong so
a is not a primitive root of p.

11. (a) We need to prove the product of two quadratic non-residues is a quadratic
residue.
Proof.
Let a and b both be quadratic non – residues of p. By Euler’s Criterion we have

   
p1 p1
a 2
 1 mod p and b 2
 1 mod p .
Multiplying these together gives

 
p 1 p 1
a 2 2
b  11 mod p

ab   1 mod p
p1
2

 
p 1
Since ab  2  1 mod p so ab is a quadratic residue of p. This completes our
proof.

(b) This time we need to prove the product of a quadratic residue and quadratic
non-residue is a quadratic non – residue.
Proof.
Let a be a quadratic residue and b be a quadratic non – residues of p. We have

   
p1 p1
a 2
 1 mod p and b 2
 1 mod p .
Multiplying these together gives

 
p1 p 1
a 2 2
b  1 1 mod p

 
p1

ab  2
 1 mod p

 
p1
Therefore ab  2  1 mod p implies that ab is a quadratic non - residue of p.
Hence the product of a quadratic residue and quadratic non-residue is a quadratic
non – residue.

Complete solutions to 7.1 Page 14 of 16

(c) We are required to prove that the square of a quadratic residue of p is a


quadratic residue.
Proof.


By x 2  a 2 mod p   
 x  a mod p which completes our proof.

12. We are asked to show that if a is a quadratic residue modulo p where

 
p  3 mod 4 then the quadratic congruence x 2  a mod p has the solutions  
mod p .
p 1
x  a 4

Proof.
We are given that a is a quadratic residue modulo p so by Euler’s Criterion (7.5):

 
p1
a is a quadratic residue of p  a 2
 1 mod p

 
p1
We have a 2
 1 mod p . Multiplying this by a gives

 
p 1 p1 p 1
1
a a 2
a 2
a 2
 a  x 2 mod p (*)

 
We are also given that p  3 mod 4 which implies p  3  4k . Therefore we can
write the above index as
p  1 3  4k  1
  2 k  1 .
2 2
p 1
Substituting this  2 k  1 into (*) yields
2

 mod p .
p 1
2k 1

2
x2  a 2
a  a k 1

  mod p . By Proposition (3.14) (b):


2
We have x 2  a k 1

a  b mod p   a  b mod p 
2 2

  mod p implies x  a mod p . From above we


2
Applying this to x 2  a k 1 k 1

have p  3  4k which implies that


p 3 p3 p 1
k
 k 1  1  .
4 4 4
Substituting this k  1 
p 1
4
into x  a k 1 mod p gives us our result:  
mod p
p 1
x  a 4
Complete solutions to 7.1 Page 15 of 16

This completes our proof.



(a)  
We need to solve x 2  3 mod 83 . First, we need to establish whether 3 is a
quadratic residue modulo 83. How?
Use Euler’s Criterion with a  3, p  83 :

 
831
3 2
 341  x mod 83 .
We need to find x where x is the least positive residue. From the powers of 3:
34  81  2 mod 83 .  
Using this result we have

   3  2  3  1024  3  28  3  84  1 mod 83  


10 10
341  340  3  34

Hence 3 is a quadratic residue modulo 83. Since 83  3 mod 4 so we can use the  
mod p :
p 1
result proven above which says that x  a 2

 
 
831
 
 
 321    34  3   2  3   32  3   96   13  70 mod 83
5 5
x  3 4
   
Hence, we have the solutions x  13, 70 mod 83 .  
(b)  
We are asked to solve x 2  2 mod 213  1 . First we check that 2 is a 
quadratic residue modulo 213  1 . By Euler’s Criterion we need to find x in
213 11
2 2

 24095  x mod 213  1 . 
Clearly by the definition of congruence we have


213  1 mod 213  1   (†)


Also 13  315  4095 therefore 24095  1 mod 213  1 which implies that 2 is a 
quadratic residue modulo 213  1 . Additionally, 213  1  3 mod 4 which means we  
can use the above result that we proved. Substituting a  2 and p  213  1

mod p yields
p 1
into x  a 4

213 11 213

x  2  2 2  22  22048 mod 213  1 .  


2 11
4

We want to use (†) which means we need to write the index of 2048 as a multiple of
13 and any remainder:
2048  157  13  7 .
Therefore, we have
Complete solutions to 7.1 Page 16 of 16

x  22048  27  128  128, 8063 mod 213  1 .  


(c)  
We need to solve x 2  5 mod 127 . Again, we first test whether 5 is a
quadratic residue modulo 127 by using Euler’s Criterion:

 
1271
5 2
 563  x mod 127 .

 
We can use 53  125  2 mod 127 and 27  128  1 mod 27 . Combining these  
we have

   2  1  2
73
 1  
2   
21 21 21 3
563  5321  53 7
 1 mod 127 .

1 mod 128 
Therefore by Euler’s Criterion we conclude that 5 is a quadratic non – residue
modulo 127 which implies that x 2  5 mod 127 has no solutions.  

13. We are asked to prove that the multiplicative inverse of a quadratic residue of p is
also a quadratic residue of p.
Proof.
Let a be a quadratic residue of p so by Euler’s Criterion we have

 
p1
a 2
 1 mod p (†)
Let b be the multiplicative inverse of a modulo p. This implies
ab  1 mod p   (*)

 
p 1
We need to prove that b 2
 1 mod p . Taking the congruence in (*) to the power
p 1
gives
2

 
p 1 p1 p1 p1

ab  2  a 2
b 2
b 2
 1 mod p .
1 mod p 
by †

 
p 1
Hence we have b 2
 1 mod p so by Euler’s Criterion we conclude that b is a
quadratic residue of p. So the multiplicative inverse of a quadratic residue is also a
quadratic residue of p.

You might also like