Complete Solutions To Exercise 7.1ereqwrqw
Complete Solutions To Exercise 7.1ereqwrqw
Complete Solutions To Exercise 7.1ereqwrqw
1 Page 1 of 16
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
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
x 2 2 mod 17
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.
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:
p1
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
353
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
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
122 12
4
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):
p1
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
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
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
The square roots of 5 mod 17 do not exist.
(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
x 1
2
1 mod 23 .
p1 231
4x 4 2 x 2 2 0 mod 23 .
2
x 2 4x 2 x
2
x 2
2
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 265 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
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
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 .
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):
p1
a is a quadratic residue of p a 2
1 mod p
p 1 4k 11
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.
■
. Let
p 1 mod 4 so p 1 4k where k is an integer. Using Euler’s
Criterion (7.5):
p1
a is a quadratic residue of p a 2
1 mod p
Applying this
p1 p 1
p a 2 a 2
p1 p 1 4k 11 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
p a 2
a 2
p1 p 1
1 2
a 2
p1
1
Because a is a quadratic residue
2 1
p1
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
. Let
p 3 mod 4 so p 3 4k where k is an integer. Using Euler’s
Criterion (7.5):
p1
a is a quadratic residue of p a 2
1 mod p
Applying this
p 1 p 1
p a 2
a 2
p1 p 1
1 2
a 2
4 k 31 p 1
1 2 a 2
p1
1 1
2k 1
a 2
1 1 mod p
Because a is a
quadratic residue of p
p a 2
a 2
p1 p 1
1 2
a 2
p1
1Because a is a quadratic residue
2 1
p1
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
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
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 91mod 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
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):
p1
a is a quadratic residue of p a 2
1 mod p
411
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
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
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):
p1
a is a quadratic residue of p a 2
1 mod p
Complete solutions to 7.1 Page 12 of 16
611
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.
p1
9. We need to prove that a 2
1 mod p provided p a . How?
n p1 1 mod p
Proof.
p1
Let x a 2
then
p1
2
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
p1
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
p1
root so a 2
1 mod p . This is a contradiction because from above we have
p1
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
p1 p1
a 2
1 mod p and b 2
1 mod p .
Multiplying these together gives
p 1 p 1
a 2 2
b 11 mod p
ab 1 mod p
p1
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
p1 p1
a 2
1 mod p and b 2
1 mod p .
Multiplying these together gives
p1 p 1
a 2 2
b 1 1 mod p
p1
ab 2
1 mod p
p1
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
By x 2 a 2 mod p
x a mod p which completes our proof.
■
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):
p1
a is a quadratic residue of p a 2
1 mod p
p1
We have a 2
1 mod p . Multiplying this by a gives
p 1 p1 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
2k 1
2
x2 a 2
a a k 1
a b mod p a b mod p
2 2
831
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
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
831
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 11
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
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
1271
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
73
1
2
21 21 21 3
563 5321 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
p1
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 p1 p1 p1
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.
■