Homework 8 solutions M328K
by Mark Lindberg/Marie-Amelie Lawn
Problem 1:
81 = 34 .
x3 − 9x2 + 26x − 24 ≡ 0 (mod 81)
Xx = 0: f (0) = −24 ≡ 0 (mod 3)
Xx = 1: f (1) = 1 − 9 + 26 − 24 = −6 ≡ 0 (mod 3)
Xx = 2: f (2) = 8 − 9 ∗ 4 + 26 ∗ 2 − 24 = 0 ≡ 0 (mod 3)
f 0 (x) = 3x2 − 18x + 26
x = 0: f 0 (0) = 26 ≡ 2 6≡ 0 (mod 3) Case 1 of Hensel’s Lemma.
f 0 (x0 ) ≡ 2 (mod 3)
p=3
p2 = 9
p3 = 27
p4 = 81
k
k
k
k
=1
=2
=3
=4
t1 ≡ 1 (mod 3)
t2 ≡ 0 (mod 3)
t3 ≡ 0 (mod 3)
x0 ≡ 0 (mod 3)
x1 ≡ 3 (mod 9)
x2 ≡ 3 (mod 27)
x3 ≡ 3 (mod 81)
f (x0 ) = −24
f (x1 ) = 0
f (x2 ) = 0
Don’t care.
t1 = −2 −24
3 = (−2)(−8) = 16 ≡ 1 (mod 3)
t2 = −2 90 0 ≡ 0 (mod 3)
0
t3 = −2 27
0 ≡ 0 (mod 3)
x ≡ 3 (mod 81)
x = 1: f 0 (1) = 3 − 18 + 26 = 11 ≡ 2 6≡ 0 (mod 3) Case 1 of Hensel’s Lemma.
f 0 (x0 ) ≡ 2 (mod 3)
p=3
p2 = 9
p3 = 27
p4 = 81
k
k
k
k
=1
=2
=3
=4
t1 ≡ 1 (mod 3)
t2 ≡ 0 (mod 3)
t3 ≡ 0 (mod 3)
x0 ≡ 1 (mod 3)
x1 ≡ 4 (mod 9)
x2 ≡ 4 (mod 27)
x3 ≡ 4 (mod 81)
f (x0 ) = −6
f (x1 ) = 0
f (x2 ) = 0
Don’t care.
t1 = −2 −6
3 = (−2)(−2) = 4 ≡ 1 (mod 3)
0
t2 = −2 9 0 ≡ 0 (mod 3)
0
t3 = −2 27
0 ≡ 0 (mod 3)
x ≡ 4 (mod 81)
x = 2: f 0 (2) = 3 ∗ 4 − 18 ∗ 2 + 26 = 2 6≡ 0 (mod 3) Case 1 of Hensel’s Lemma.
f 0 (x0 ) ≡ 2 (mod 3)
p=3
p2 = 9
p3 = 27
p4 = 81
k
k
k
k
=1
=2
=3
=4
t1 ≡ 0 (mod 3)
t2 ≡ 0 (mod 3)
t3 ≡ 0 (mod 3)
x0 ≡ 0 (mod 3)
x1 ≡ 2 (mod 9)
x2 ≡ 2 (mod 27)
x3 ≡ 2 (mod 81)
f (x0 ) = 0
f (x1 ) = 0
f (x2 ) = 0
Don’t care.
0
t1 = −2 30 = (−2)(−8) = 16 ≡ 1 (mod 3) t2 = −2 09 0 ≡ 0 (mod 3) t3 = −2 27
0 ≡ 0
(mod 3)
x ≡ 2 (mod 81)
1
Thus, overall, x ≡ 2, 3, 4 (mod 81) .
Problem 2
4.5
1) # 2: a)
2x + 3y ≡ 5 (mod 7)
x + 5y ≡ 6 (mod 7).
∆ = 2 ∗ 5 − 3 ∗ 1 = 10 − 3 = 7 ≡ 0 (mod 7), so we can’t use the method using
the inverse of the matrix.
Multiply the second equation by 2 and substract the first from this new equation. We get
7y ≡ 7 (mod 7) ≡ 0 (mod 7),
for which y ≡ 0, 1, 2, 3, 4, 5, 6 are solutions. Consequently the solutions to the
system are the pairs
(x, y) = {(0, 4), (1, 1), (2, 5), (3, 2), (4, 6), (5, 3), (6, 0)}
b)
4x + y ≡ 5 (mod 7)
x + 2y ≡ 4 (mod 7).
∆ = 4 ∗ 2 − 1 ∗ 1 = 8 − 1 = 7 ≡ 0 (mod 7), so again we cannot use the method
computing the inverse of the matrix.
Multiply the first equation by 2 and substract the second from it. We get
7x ≡ 6 mod 7. But the equation has no solution since (7, 7) = 7. So the
system has no solution.
0 1
10 1
4 0
2 1
(mod 5)
≡
=
4.5 # 4:
2 3
22 3
2 1
4 3
2)
x + y + z ≡ 1 (mod 10)
x + 2y + 3z ≡ 2 (mod 10)
2x + 3y + 6z ≡ 3 (mod 10)
1 1 1
2 3
1 3
1 2
det 1 2 3 = 1 ∗ det
− 1 ∗ det
+ 1 ∗ det
3 6
2 6
2 3
2 3 6
= 6 − 3 − (6 − 6) + 3 − 4 = 3 − 0 − 1 = 2 ≡ 2
(mod 10)
gcd(2, 10) = 2 6= 1, hence again we cannot use the method using the inverse of the matrix.
Adding and substracting multiples of the equations, as in the previous problem, we finally
get
y≡1
2z ≡ 0
(mod 10)
(mod 10)
x+z ≡0
(mod 10),
which can easitly be solved.
2
Problem 3
4.5 # 5 There is no need for a base case here, since the base case would be A ≡ B (mod m),
which is our given. Thus, I shall jump straight into the inductive case. Assume that
An−1 ≡ Bn−1 (mod m). Since we know that A ≡ B (mod m), we have that, by
the rules of multiplication in modulus, A · An−1 ≡ B · Bn−1 (mod m), and so by the
definition of powers of matrices, An ≡ Bn (mod m). Thus, by induction, if this is true
for n = 1, is it true for all integers n ≥ 1.
2 4 11
4 11
4 11
4 ∗ 4 + 11 ∗ 1 4 ∗ 11 + 11 ∗ 22
4.5 # 6
=
·
=
1 22
1 22
1 22
1 ∗ 4 + 22 ∗ 1 1 ∗ 11 + 22 ∗ 22
27 286 X 1 0
=
≡
(mod 26).
26 495
0 1
0 1
= −1 ≡ 4 (mod 5).
4.5 # 8 a) det
1 0
∆ ≡ 4 (mod 5).
−1
0 −4
0 −1
0 1
0 1
≡
=
(mod 5).
=4
−4 0
−1 0
1 0
1 0
1 2
b) det
= 4 − 6 = −2 ≡ 3 (mod 5).
3 4
∆ ≡ 2 (mod 5).
−1
8 −4
4 −2
1 2
3 1
≡
=
=2
(mod 5).
−6 2
−3 1
3 4
4 2
2 2
= 4 − 2 = 2 ≡ 2 (mod 5).
c) det
1 2
∆ ≡ 3 (mod 5).
−1
2 2
2 −2
6 −6
1 4
=3
(mod 5)
=
≡
1 2
−1 2
−3 6
2 1
Problem 4
4.5 # 9
1 1 0
0
1
1
1
a) det 1 0 1 = 1 det
− 1 det
+ 0 det ∼
0 1
1 1
0 1 1
1 ∗ (−1) − 1 ∗ 1 + 0 = −2 ≡ 5 (mod 7).
∆ ≡ 3 (mod 7).
0 1
1 0
1 0
− det
det
det 1 1
−1
1 1
0 1
1 1 0
1 0
1 0
1 0 1 = 3 − det 1 1
det
− det
0
1
0
1
1
1
0 1 1
1 0
1 1
1 1
det
− det
det
0 1
0 1
1 0
−1 −1 1
−3 −3 1
4 4 3
= 3 −1 1 −1 = −3 3 −3 ≡ 4 3 4 (mod 7)
1 −1 −1
3 −3 −3
3 4 4
3
1 2 3
2 5
1 5
1 2
b) det 1 2 5 = 1 det
− 2 det
+ 3 det
4 6
1 6
1 4
1 4 6
1 ∗ (−8) − 2 ∗ 1 + 3 ∗ 2 = −4 ≡ 3 (mod 7).
∆ ≡ 5 (mod 7).
2 5
2 3
2 3
− det
det
det 4 6
−1
4 6
2 5
1 2 3
1 3
1 3
1 2 5 = 5 − det 1 5
det
− det
1 6
1 6 1 5
1 4 6
1 2
1 2
1 2
det
− det
det
1 4
1 4
1 2
2 0 6
−8 0
4
−40
0
20
15 −10 ≡ 2 1 4 (mod 7)
= 5 −1 3 −2 = −5
2 −2 0
10 −10
0
3 4 0
4.5 # 10
21
1
4 4 3
x
0
a) y = 4 3 4 2 = 22 ≡ 1 (mod 7).
23
3
3 4 4
z
2
1
x
2 0 6
1
8
b) y = 2 1 4 1 = 7 ≡ 0 (mod 7).
0
z
3 4 0
1
7
Problem 5
6.1 # 8:
40! =1311
(mod 1763)
(Done in lecture 21.)
6.1 # 12: 21000000 29 ∗ 217∗58823 = 29 ∗ (217 )58823 ≡ 29 ∗ 258823 = 212 ∗ 217∗3460 = 212 (217 )3640
≡ 21 2 ∗ 23460 = 24 ∗ 217∗204 = 24 (217 )204 ≡ 24 ∗ 2204 = 24 ∗ (217 )12 ≡ 24 ∗ 21 2
= 217−1 ≡ 1 (mod 17)
6.1 # 16: By the definition of composite, there exist some integers p, q < n such that p · q = n. If
p 6= q, then we have that by the definition of factorial, both p and q are contained in
(n − 1)!. That is, assuming WLOG that p > q it can be written as
(n − 1) · (n − 2) · · · p · · · q · · · 2 · 1
= p · q · (n − 1) · (n − 2) · · · (p + 1) · (p − 1) · · · (q + 1) · (q − 1) · · · 2 · 1
= n · (n − 1) · (n − 2) · · · (p + 1) · (p − 1) · · · (q + 1) · (q − 1) · · · 2 · 1
≡ 0 · (n − 1) · (n − 2) · · · (p + 1) · (p − 1) · · · (q + 1) · (q − 1) · · · 2 · 1
≡0
(mod n)
Thus, we must only now consider the case where n is composite and p = q. This means
that n = p · q = p2 , and so n is a perfect square by definition. There are no composite
4
positive integers < 4, and we are discounting 4 (Because 3! = 6 6≡ 0 (mod 4)), so we
can assume that our perfect square must be > 4. Thus, n = p2 > 4 ⇒ p > 2, and
so p · 2 < p · p = n. This means than both p = q and 2p are less than n, so they are
contained in (n − 1)!. By the definition of factorial, we have that
(n − 1)! = (n − 1) · (n − 2) · · · (2 · p) · · · p · · · 2 · 1
= 2 · p · p · (n − 1) · (n − 2) · · · (2 · p + 1) · (2 · p − 1) · · · (p + 1) · (p − 1) · · · 2 · 1
= 2 · n · (n − 1) · (n − 2) · · · (2 · p + 1) · (2 · p − 1) · · · (p + 1) · (p − 1) · · · 2 · 1
≡ 2 · 0 · (n − 1) · (n − 2) · · · (2 · p + 1) · (2 · p − 1) · · · (p + 1) · (p − 1) · · · 2 · 1
≡0
(mod n)
Therefore, in all cases where n is composite and n 6= 4, we have that (n − 1)! ≡ 0
(mod n).
Problem 6
Part 1: If x2 ≡ a mod p has a solution, say x = x0 , then we can easily show that −x0 is another
solution since
(−x0 )2 = x20 ≡ a mod p.
Moreover x0 and −x0 are incongruent modulo p. In fact assume that x0 ≡ −x0 mod p.
Then equivalently 2x0 ≡ 0 mod p or p|2x0 . But this is impossible because p is odd,
hence p does not divide 2, and p does not divide x0 since x20 ≡ a mod p, and hence p
does not divide x2 .
Now we have to show that there are no other incongruent solutions modulo p. We prove
this by contradiction. Assume that x1 is a third solution different from x0 or −x0 . Then
x20 ≡ x21 ≡ a mod p. Consequently
x20 − x21 ≡ (x0 + x1 )(x0 − x1 ) ≡ 0
mod p.
Hence p|(x0 − x1 ) or p|(x0 + x1 ), which is equivalent to x0 equivx1 mod p or x0 = −x1
mod p and leads to the contradiction.
Part 2: We compute the least positive residues modulo p of the squares of the integers 1, 2, . . . p−
1. Because there are p − 1 squares to consider, and because eauch congruence x2 ≡ a
mod p has either 0 or two solutions, there must be exactly p−1
2 quadratic residues of p
p−1
among the integers 1, 2, . . . p − 1. The remaining p − 1 − p−1
2 = 2 positive integers
less that p − 1 are then quadratic nonresidues of p.
Problem 7
Part 1: Let b be a positive integer with (b, n) = 1. Then (b, pi ) = 1 for i = 1, 2, . . . k and hence
by Fermat’s little theorem bpi −1 ≡ 1 mod (pi ), for all i = 1, 2, . . . k.
Now because (pi − 1)|(n − 1) there exist for each i an integer li such that n − 1 =
li (pi − 1)and consequently
li
bn−1 = bli (pi −1) = b(pi −1) ≡ 1
Hence finally bn−1 ≡ 1 mod p1 p2 . . . pk = 1 mod n.
5
mod pi .
Part 2: Easy to check.
Part 3: Let n be a composite number with the properties of part 1). Then (n − 1, n) = 1, and
by part 1) (n − 1)n−1 ≡ 1 mod n. Assume that n ≥ 4 is even, then n − 1 is odd and
(n − 1)n−1 ≡ (−1)n−1
mod n ≡ −1
which is a contradiction. Hence n is odd.
6
mod n 6≡ 1
mod n,
© Copyright 2026 Paperzz