Math 104A - Spring 2016 - Final Exam Solutions
Problem 1.
Solve the quadratic congruence
x2 − 5x − 7 ≡ 0
mod 112 .
Solution:We solve the congruence
x2 − 5x − 7 ≡ 0
mod 11
using the quadratic formula suitably interpreted in Z11 . We have
p
√
√
5 + 52 − 4 · 1 · (−7)
5 + 53
5± 9
5±3
x1,2 =
=
=
=
= 1 or 4.
2
2
2
2
Next, we use Taylor’s theorem to solve the congruence
f (x) = x2 − 5x − 7 ≡ 0
mod 112 .
– Assume x ≡ 1 mod 11. We have f (1) = −11,
f 0 (x) = 2x − 5 =⇒ f 0 (1) = −3 =⇒ f 0 (1)−1 = 7.
Thus
x ≡ 1 − f 0 (1)−1 · f (1)
mod 112 ≡ 1 − 7 · (−11)
mod 112 ≡ 78
mod 112 .
– Assume x ≡ 4 mod 11. We have f (4) = −11,
f 0 (x) = 2x − 5 =⇒ f 0 (4) = 3 =⇒ f 0 (4)−1 = 4.
Thus
x ≡ 4 − f 0 (4)−1 · f (4)
mod 112 ≡ 4 − 4 · (−11)
mod 112 ≡ 48
The two solutions are
x ≡ 48
mod 112 , x ≡ 78
mod 112 .
mod 112 .
Problem 2.
Let p ≡ 2 mod 3 be a prime.
(i) Show that the congruence x3 ≡ 1 mod p has the unique solution x ≡ 1 mod p.
(ii) Show that the congruence
x3p − px − 1 ≡ 0
mod p2
has no solutions.
Solution:
(i) The number of solutions of the congruence x3 ≡ 1 mod p is given by d = (3, φ(p)) =
(3, p − 1) = 1 by a theorem proved in class. The gcd calculation used the fact that p − 1 ≡ 1
mod 3. Since x ≡ 1 mod p is clearly a solution, it must be the unique solution.
(ii) We solve the congruence
f (x) = x3p − px − 1 ≡ 0
mod p.
This is equivalent to
x3p − 1 ≡ 0
mod p =⇒ x3p ≡ 1
mod p.
By Fermat
xp ≡ x mod p =⇒ x3p ≡ x3
mod p =⇒ x3 ≡ 1
mod p =⇒ x ≡ 1
mod p
using part (i).
Next, we solve f (x) ≡ 0 mod p2 using Taylor. We have
f 0 (x) = 3px3p−1 − p =⇒ f 0 (1) = 2p.
This is divisible by p so we are in the singular case. However f (1) = −p which is not
divisible by p2 , so the congruence has no solutions mod p2 .
Problem 3.
(i)
(ii)
(iii)
(iv)
(v)
(vi)
Using rules of Legendre symbols, show that 6 is not a quadratic residue mod 17.
Using (i), show that 6 is a primitive root mod 17.
It is given that 6 is a primitive root mod 172 . Write down an element of order 136 mod 172 .
Write down a primitive root modulo 2 · 17e .
How many primitive roots are there mod 17e ?
Among the units mod 17e , how many quartic residues are there?
Solution:
(i) We have
6
17
=
2
17
3
17
.
Since 17 ≡ 1 mod 8, we must have
2
17
= 1.
Next, by quadratic reciprocity we have
17−1 3−1
17−1
3
17
17
−1
·
= (−1) 2 2
=
=
= (−1) 2 = −1.
17
3
3
3
Thus
6
17
= 1 · (−1) = −1,
showing 6 is not a quadratic residue.
(ii) On general grounds, the order ord17 (6) divides 16. The possible values of the order are
{1, 2, 4, 8, 16}. Note however that the order cannot divide 8 since otherwise 68 ≡ 1 mod 17
which is not the case by (i). Indeed, as 6 is not a quadratic residue, it follows that 68 ≡ −1
mod 17. Thus the order ord17 (6) must equal 16, proving 6 is a primitive root.
(iii) The order of 6 equals φ(172 ) = 17 · 16 = 272. We are seeking an element 6k of order exactly
136 mod 172 . By a result proved in class, the order of 6k equals
272
= 136 =⇒ (k, 272) = 2.
(k, 272)
We can take k = 2, hence the desired element is 62 = 36.
(iv) By the theorem proved in class, once we know 6 is a primitive root mod 172 , we are guaranteed that 6 is a primitive root mod 17e for e ≥ 2. Since 6 is even, 6 + 17e is a primitive
root mod 2 · 17e , again by a theorem in class.
(v) As shown in the homework, the number of primitive roots is
φ(φ(17e )) = φ(17e−1 · 16) = φ(17e−1 ) · φ(16) = 17e−2 · 16 · 8 = 17e−2 · 27 .
(vi) The quartic residues are of the form x4 for some unit x. Since 6 is a primitive root, we can
express
x = 6k , 0 ≤ k < φ(17e ) =⇒ x4 = 64k , 0 ≤ k < φ(17e ).
However, there are repetitions on the list {64k } for 0 ≤ k < φ(17e ), which occur with period
1
e
e−1 with respect to k. Indeed,
4 φ(17 ) = 4 · 17
0
0
mod 17e ⇐⇒ 4k 0 ≡ 4k mod φ(17e )
1
⇐⇒ k 0 ≡ k mod φ(17e ).
4
Therefore, the nonrepeating quartic residues are 64k where 0 ≤ k < 14 φ(17e ) = 4 · 17e−1 , so
there are 4 · 17e−1 quartic residues.
64k ≡ 64k
mod 17e ⇐⇒ 64k −4k ≡ 1
Problem 4.
(i) Write down all solutions of the linear equation
24x + 13y = 1.
(ii) Find the inverse of 13 modulo 24.
Solution:
(i) We run the Euclidean algorithm
24 = 1 · 13 + 11
13 = 1 · 11 + 2
11 = 2 · 5 + 1.
Thus
1 = 11 − 2 · 5
= 11 − 5 · (13 − 11) = 6 · 11 − 5 · 13
= 6 · (24 − 13) − 5 · 13 = 6 · 24 − 11 · 13.
A particular solution is
x0 = 6, y0 = −11.
The general solution is
x = 6 + 13t, y = −11 − 24t.
(ii) To find the inverse y of 13 mod 24 we need to solve
13y ≡ 1
mod 24 =⇒ 13y = 1 + 24z =⇒ 24(−z) + 13y = 1.
By part (i), we see
y = −11 − 24t ≡ −11
The inverse 13−1 = 13 in Z24 .
mod 24 ≡ 13
mod 24.
Problem 5.
Solve the linear system of congruences
5x ≡ 1
mod 24, 2x ≡ 22
mod 36.
Solution:We first bring the congruences in normal form
5x ≡ 1
mod 24 =⇒ x ≡ 5−1
mod 24 =⇒ x ≡ 5
mod 24.
Also
2x ≡ 22
mod 36 =⇒ x ≡ 11
mod 18.
We factor 24 = 23 · 3, 18 = 2 · 32 . The first congruence becomes
x≡5
mod 23 , x ≡ 5
mod 3 ≡ 2
mod 3.
The second congruence becomes
x ≡ 11
mod 2 ≡ 1
mod 2, x ≡ 11
mod 32 ≡ 2
mod 32 .
Some of these congruences are redundant. We only keep the ones that are relevant namely
x≡2
mod 9
x≡5
mod 8.
We need to solve x = 2 + 9k = 5 + 8`. This is equivalent to 9k = 3 + 8`. This is a linear diophantine
equation and it can be solved in several ways. But it’s quicker to note that
8` = 9k − 3 =⇒ 8|9k − 3 =⇒ 8|k − 3 =⇒ k ≡ 3
mod 8.
Thus
k = 8n + 3 =⇒ x = 2 + 9(8n + 3) = 72n + 29 =⇒ x ≡ 29
mod 72.
Problem 6.
I. It is given that g = 10 is a primitive root modulo 97. Write down the solutions to
the following congruence:
10x ≡ 3
mod 97.
II. How many solutions do the following congruences have?
(i) x2 ≡ −1 mod 19 · 29 · 37
(ii) x24 ≡ 1 mod 2e where e > 5
(iii) x16 ≡ 16 mod 412
Solution:
Part I. We find
10x ≡ 3
mod 97 ≡ 3 + 97
mod 97 ≡ 102
mod 97 =⇒ x ≡ 2
mod 96
using that 10 is a primitive root, hence it has order 96.
Part II.
(i) The congruence x2 ≡ −1 mod 17 · 29 · 37 rewrites as
x2 ≡ −1
mod 19, x2 ≡ −1
mod 29, x2 ≡ −1
mod 37.
The first congruence has two solutions {x0 , x1 } since 17 ≡ 1 mod 4. The second congruence
has 2 solutions modulo 29 as well, call them {y0 , y1 }. Similarly, the third congruence has 2
solutions {z0 , z1 }. Thus we have 8 possibilities
x ≡ xi
mod 17, x ≡ yj
mod 29, x ≡ zk
mod 37
corresponding to each choice i ∈ {0, 1}, j ∈ {0, 1}, k ∈ {0, 1}. Each triple of congruences
determines x uniquely modulo 17 · 29 · 37 by the Chinese remainder theorem. Thus there are
8 solutions to the original congruence.
(ii) Write x = ±5y where 0 ≤ y < 2e−2 = order2e (5). We have
x24 = 524y ≡ 1
mod 2e =⇒ 2e−2 |24y =⇒ 2e−5 |3y =⇒ 2e−5 |y
=⇒ y ∈ {0, 2e−5 , 2 · 2e−5 , 3 · 2e−5 , 4 · 2e−5 , 5 · 2e−5 , 6 · 2e−5 , 7 · 2e−5 }.
There are 8 values for y, hence 16 values for x modulo 2e taking the signs into account.
(iii) We need to verify first that the congruence has solutions. Once we know that the congruence
has a solution, we know that the number of solutions equals
d = (φ(412 ), 16) = (40 · 41, 16) = 8.
By the theory developed in class, we need to check that
16
We have
16
φ(412 )
8
φ(412 )
8
= (24 )
≡1
φ(412 )
8
=2
mod 412 .
φ(412 )
2
≡1
mod 412 .
The last congruence requires justification, and there are several ways of seeing this. One
possible argument is as follows. Since φ(412 ) = 41 · 40, we need to show
220·41 ≡ 1
mod 412 ⇐⇒ (210 )82 ≡ 1
mod 412 .
Direct calculation shows that 210 = 1024 = 41q − 1 for q = 25. Then using the binomial
theorem,
82
10 82
82
(2 ) = (41q − 1) = 1 − 41q ·
+ higher order terms involving (41q)2
1
≡ 1 − 41q · 82
as claimed.
mod 412 ≡ 1
mod 412 ,
Problem 7.
√
Let R = Z[ −11].
(i) Show that 2 is irreducible in R.
(ii) Show that 2 is not prime in R.
(iii) Show that R is not an Euclidean domain.
Solution:
(i) We use the norm over R given by
√
N (a + b −11) = a2 + 11b2 .
If 2 is reducible, we could write
2=α·β
for α, β non-units in R. Taking norms we obtain
22 = N (2) = N (α · β) = N (α) · N (β).
√
– If N (α) = 1, write α = a + b −11 so that
2
a2 + 11b2 = 2 =⇒ b2 ≤
=⇒ b = 0 =⇒ a = ±1 =⇒ α = ±1.
11
This means α is a unit, contradiction.
– Similarly, N (β) = 1 implies β is a unit, contradiction.
√
– The only remaining case is N (α) = N (β) = 2. For α = a + b −11 we find
2
a2 + 11b2 = 2 =⇒ b2 ≤
=⇒ b = 0 =⇒ a2 = 2
11
which is a contradiction. Thus 2 cannot be reducible in R.
(ii) We have
√
√
2|3 · 4 = 12 = (1 + −11)(1 − −11).
If 2 were prime, then by definition
2|1 ±
√
−11.
Thus for some a, b ∈ Z we must have
√
√
1
2(a + b −11) = 1 ± −11 =⇒ a =
2
contradicting that a ∈ Z.
(iii) Since in an ED, primes and irreducibles agree, R cannot be ED.
Extra credit.
Find the product of all quadratic residues which are units mod 7e .
We imitate the proof in the homework given for product of quadratic residues modulo
Solution:
primes.
Let m = 7e . Let g be a primitive root mod m. We have seen in class that the quadratic residues
modulo m are of the form
1
g 2k , 0 ≤ k < φ(m).
2
We compute the product of all quadratic residues as
1
1 · g 2 · g 4 · . . . · g 2( 2 φ(m)−1)
1
mod m ≡ g 2(1+2+...+( 2 φ(m)−1))
1
1
mod m ≡ g ( 2 φ(m)−1)· 2 φ(m)
mod m.
We claim that
1
x = g 2 φ(m) ≡ −1
mod m.
Indeed, by Euler,
x2 ≡ g φ(m)
The congruence
x2
mod m ≡ 1
mod m.
≡ 1 mod m has
d = (2, φ(m)) = (2, 6 · 7e−1 ) = 2
solutions, by the count of solutions done in class. These solutions are x ≡ ±1 mod m. However
if x ≡ 1 mod m, then the order of g would divide 12 φ(m) contradicting that g is a primitive root.
Thus x ≡ −1 mod m as claimed.
Substituting into product to be computed, we obtain
1
1
g ( 2 φ(m)−1)· 2 φ(m)
1
mod m ≡ (−1) 2 φ(m)−1
since 3 · 7e−1 − 1 is even.
e−1 −1
mod m ≡ (−1)3·7
mod m ≡ 1
mod m,
© Copyright 2026 Paperzz