Number Theory Homework 5
Number Theory Homework 5
MATH 115
NUMBER THEORY
PROFESSOR PAUL VOJTA
NOAH RUDERMAN
Problems 3.2.7, 3.2.8, 3.2.18, 3.3.4, 3.3.15, 3.4.1a-f, 3.3.4, 3.3.10, 3.5.1, 3.5.3, 3.5.11, and
3.5.12 from An Introduction to The Theory of Numbers, 5th edition, by Ivan Niven, Herbert
S. Zuckerman, and Hugh L. Montgomery
Solution.
We aim to find for which primes p the congruence x2 ≡ 13 mod p has a solution.
First we note that p = 2 and p = 13 are trivial solutions because both congruence classes
of 2 are quadratic residues and 02 ≡
0 mod 13. Next we note that the congruence will have
a solution if the Legendre symbol 13 p
is equal to 1, by definition. By theorem 3.4 we see
that
13 p 13−1 p−1
= (−1) 2 · 2
p 13
p−1
= (−1)6· 2
p−1
= (−1)6 2
p−1
= (1) 2
= 1.
13 p
Clearly, p
= 1 if and only if 13
= 1. By theorem 3.1(1), we see that
p 13−1
≡p 2 mod 13
13
≡ p6 mod 13.
Therefore, 13 is a quadratic residue modulo p if and only if p6 ≡ 1 mod 13. With Mathemat-
ica (see figure 1), we see that p6 ≡ 1 mod 13 if p ≡ 1, 3, 4, 9, 12 mod 13. So the solutions
are p = 2, p = 13, or p ≡ 1, 3, 4, 9, 12 mod 13.
In[969]:= For @i = 0, i < 13, i ++,
Module @8f, x <,
If@Mod @i ^ 6, 13D 1, Print@iDD;
D
D
1
10
12
2
Problem (3.2.8)
Solution.
We want to find all primes p such that 10
p
= 1.
From theorem 3.1(2) we have
10 2 5
= .
p p p
p2 −1
2
From theorem 3.3, we know that if p is an odd prime, then p
= (−1) 8 . If p is odd,
p2 −1 2
then p ≡ ±1, ±3 mod 8. if p ≡ ±1 mod 8, then 8 is even. If p ≡ ±3 mod 8, then p 8−1
is odd. From this, we see that
2 1 if p ≡ ±1 mod 8
= 0 if p ≡ 0 mod 2
p
−1 if p ≡ ±3 mod 8
From theorem 3.4, quadratic reciprocity, we know that p5 = p5 given 5 ≡ 1 mod 4.
By theorem 3.1(1),
p 5−1
≡p 2 mod 5
5
≡ p2 mod 5.
By lemma 2.10, p2 ≡ 1 mod 5 only has solutions for p ≡ ±1 mod 5. Thus,
p 1 if p ≡ ±1 mod 5
= 0 if p ≡ 0 mod 5
5
−1 if p ≡ ±2 mod 5
We see that 10 p
= 1 when p ≡ ±1 mod 5 and p ≡ ±1 mod 8 or p ≡ ±2 mod 5 and
p ≡ ±3 mod 8. By the Chinese remainder theorem, there will be 2 · 2 + 2 · 2 = 8 solutions.
To find the solutions, first we solve the set of congruences
p ≡ ±1 mod 5
p ≡ ±1 mod 8.
Clearly, if p ≡ 1 mod 5 and p ≡ 1 mod 8, then p ≡ 1 mod 40 is a solution. A similar
argument can be used to show p ≡ −1 mod 40 is a solution. To solve the set of congruences
p ≡ −1 mod 5
p ≡ 1 mod 8,
we start with the second congruence whose solution is 1 + 8k for k ∈ Z. Plugging this into
the first congruence, we see that
1 + 8k ≡ −1 mod 5
3
8k ≡ −2 mod 5
3k ≡ 3 mod 5
k ≡ 1 mod 5,
so k = 1 + 5l for l ∈ Z. Now we have our solution
1 + 8k = 1 + 8(1 + 5l)
= 9 + 40l.
For a solution p, we see that p ≡ 9 mod 40.
Now we solve the final congruence
p ≡ 1 mod 5
p ≡ −1 mod 8,
We start with the solution to the second congruence, −1 + 8k, k ∈ Z. Plugging this into the
first congruence, we see that
−1 + 8k ≡ 1 mod 5
8k ≡ 2 mod 5
3k ≡ −3 mod 5
k ≡ −1 mod 5,
so k = −1 + 5l for l ∈ Z. Now we have our solution
−1 + 8k = −1 + 8(−1 + 5l)
= −9 + 40l
= 31 + 40l0 l0 ∈ Z
For a solution p, we see that p ≡ 31 mod 40.
At this point, our first four solutions are p ≡ ±1, ±9 mod 40. Finding the remaining four
involves solving the set of congruences
p ≡ ±2 mod 5
p ≡ ±3 mod 8.
Finding the solutions to these congrunces is equally tedious. Since finding the solutions to
the chinese remainder theorem is not the point of this exercise, I will list the remaining four
solutions: p ≡±3, ±13 mod 40.
10
Therefore, p = 1 when p ≡ ±1, ±3, ±9, ±13 mod 40.
4
Problem (3.2.18)
Solution.
For q = 1111111111111, where q is prime, we wish to find whether or not 1001 is a quadratic
residue mod q.
First we note that 111 · 1001 = 111111. Using this, we see that
q = 111 · 1001 · 107 + 111 · 1001 + 1
6
Problem (3.3.4)
Solution.
We want to determine whether the congruence x4 ≡ 25 mod 1013 has solutions given that
1013 is prime.
2
We see that x4 = (x2 ) = 25 mod 1013, so it is sufficient to prove that x2 ≡ ±5 mod 1013
has solutions.
First we consider x2 ≡ 5 mod 1013. Using theorem 3.4, or quadratic reciprocity, and the
fact that 5 ≡ 1 mod 4, we see that
5 1013
=
1013 5
3
=
5
= −1,
because by inspection
(
a 1 if a ≡ ±1 mod 5
=
5 −1 if a ≡ ±3 mod 5
By definition, x2 ≡ 5 mod 1013 has no solutions.
Second we consider x2 ≡ −5 mod 1013. Using theorem 3.1, we see that
−5 −1 5
=
1013 1013 1013
1013−1
= (−1) 2 · (−1) (from our earlier work)
= (−1)506 · (−1)
= 1 · −1
= −1.
By definition, x2 ≡ −5 mod 1013 has no solutions.
Since x2 ≡ ±5 mod 1013 has no solutions and ±5 mod 1013 are the only solutions to
2
the congruence y 2 ≡ 25 mod 1013, we see that (x2 ) = x4 ≡ 25 mod 1013 can have no
solutions.
7
Problem (3.3.15)
Solution.
We aim to show that for any prime p ≥ 7, there is some number n ∈ N where 1 ≤ n ≤ 9 and
n n+1
(4) = = 1.
p p
We have three cases
1. p ≡ ±1 mod 8: p2 −1
2
Clearly, p = 1. By theorem 3.3, p2 = (−1) 8 . Clearly, p2 = 1 if p 8−1 is even.
1
8
Problem (3.4.1)
Solution.
10
Problem (3.3.4)
Solution.
√ √
First we find a formula for positive integers xk and yk such that (3 + 2 2)k = xk + 2yk .
We see that
k
√ k X k k−i √ i
(3 + 2 2) = 3 (2 2)
i
i=0
k k
X k k−i √ i X k k−j √ j
= 3 (2 2) + 3 (2 2)
i=0
i j=0
j
i even j odd
k k
X k k−i i i/2 X k k−j j √ j−1 √
= 3 ·2 ·2 + 3 · 2 · ( 2) · 2
i=0
i j=0
j
i even j odd
k k
X k k−i 3i √ X k k−j 3j−1
= 3 ·22 + 2 3 ·2 2 .
i=0
i j=0
j
i even j odd
Now we show gcd(xk , yk ) = 1. By theorem 1.3, the greatest common divisor or x2k and yk2 is
the smallest positive integer that is a linear combination of the two with integer coefficients.
Since we have showed that x2k − 2yk = 1, we see that gcd(x2k , yk2 ) = 1 because there are
no positive integers smaller than 1. By definition, two coprime numbers share no prime
factors. Since the prime factors of xk are a subset of x2k and the prime factors of yk are a
subset of yk2 , we see that xk , yk cannot share any prime factors. Thus, they are coprime and
gcd(xk , yk ) = 1 for all k ∈ N.
Next we show that xk+1 = 3xk + 4yk and yk+1 = 2xk + 3yk for all k ∈ N. We see that
k
X k k−i 3i
xk = 3 ·22
i=0
i
i even
k+1
X k + 1 k+1−i 3i
xk+1 = 3 ·22
i=0
i
i even
k
X k k−j 3j−1
yk = 3 ·2 2
j=0
j
j odd
k+1
X k + 1 k+1−j 3j−1
yk+1 = 3 ·2 2 .
j=0
j
j odd
12
We see that
k k
X k k−i 3i X k k−j 3j−1
3xk + 4yk = 3 3 ·22 +4 3 ·2 2
i=0
i j=0
j
i even j odd
k k
X k k+1−i 3i X k k−j 3j+3
= 3 ·22 + 3 ·2 2
i=0
i j=0
j
i even j odd
k+1 k+1
X k k+1−i 3i X k 3(j−1)+3
= 3 ·2 +
2 3k−(j−1) · 2 2
i=0
i j=0
j−1
i even j even
k+1
X k k+1−i 3i k 3(i−1)+3
= 3 ·22 + 3k−(i−1) · 2 2
i=0
i i−1
i even
k+1
X k k 3i
= + 3k+1−i · 2 2
i=0
i i−1
i even
k+1
X k + 1 k+1−i 3i
= 3 ·22
i=0
i
i even
= xk+1 ,
15
Problem (3.3.10)
Solution.
We want to show that for f (x, y) = ax2 + bxy + cy 2 , a quadratic form with integral coeffi-
cients, that there exist integers x0 , y0 not both 0 such that f (x0 , y0 ) = 0, if and only if the
discriminant d of f (x, y) is a perfect square, possibly 0.
−→
Suppose there exist two integers, x0 and y0 , not both 0, such that f (x0 , y0 ) = 0. We know
that
4af (x0 , y0 ) = (2ax0 + by0 )2 − dy02 = 0.
Call v = 2ax0 + by0 . We see that
v 2 = dy02
v2
=d for y0 6= 0
y02
2
v
= d.
y0
6 0, then d is a perfect square. If y0 = 0, then f (x0 , 0) = ax20 = 0, so a = 0.
Thus, if y0 =
Given that d = b2 − 4ac, if a = 0 then d = b2 , so again d is a perfect square.
←−
Suppose d is a perfect square. Let d = e2 for some e ∈ Z. Given
4af (x0 , y0 ) = (2ax0 + by0 )2 − dy0 ,
we see that
(2ax0 + by0 )2 − dy02 = (2ax0 + by0 )2 − e2 y02
= (2ax0 + by0 + ey0 )(2ax0 + by0 − ey0 )
= (2ax0 + (b + e)y0 )(2ax0 + (b − e)y0 ).
We see that x0 = (b − e), y0 = −2a and x0 = (b + e), y0 = −2a are two solutions. If x0
and y0 are not both 0, we are done, so we suppose that they are both 0. Then −2a = 0
implies a = 0 and b − e = 0 and b + e = 0 imply b = e = 0. Plugging in a = b = 0, we
see that f (x, y) = cy 2 . Clearly, x0 = 1, y0 = 0 is a solution to f (x, y) = 0, and they are
not both zero. Thus if d is a perfect square, there exist integers x0 , y0 not both 0, such that
f (x0 , y0 ) = 0.
16
Problem (3.5.1)
Solution.
18
Problem (3.5.3)
Solution.
x y
For x, y ∈ Z, we want to show that there exist u, v ∈ Z such that ∈ Γ if and only if
u v
gcd(x, y) = 1.
By theorem 1.3, gcd(x, y) = 1 if and only if we can write
xv + yu0 = 1,
for some u0 , v ∈ Z. Let u = −u0 . We have
xv − yu = 1.
Consider the matrix
x y
M= .
u v
We see that M ∈ Γ if and only if gcd(x, y) = 1 because mij ∈ Z and det M = xv − yu = 1
if and only if gcd(x, y) = 1.
19
Problem (3.5.11)
Solution.
Suppose that ax2 + bxy + cy 2 ∼ Ax2 + Bxy + Cy 2 . We want to show that gcd(a, b, c) =
gcd(A, B, C).
Let f (x, y) = ax2 + bxy + cy 2 and h(x, y) = Ax2 + Bxy + Cy 2 . Since f ∼ h, they represent
the same points. Let g = gcd(a, b, c) and G = gcd(A, B, C). Clearly, f (x,y)
g
∈ Z. Because f
and h represent the same points, h(x,y)
g
∈ Z as well. We see that h(1, 0) = A and h(0, 1) = C,
so g | A and g | C. Again, h(1, 1) = A + B + C and because g | h(x, y), then g | B as well.
So g is a common divisor of A,B, and C. Thus, g | G.
Likewise, G | h(x, y) G | f (x, y) for all x, y ∈ Z. We see that f (1, 0) = a and f (0, 1) = c,
so G | a and G | c. Again, f (1, 1) = a + b + c and because G | f (x, y), then G | b as well. So
G is a common divisor of a,b, and c. Thus, G | g.
Since g | G and G | g, g = ±G. But the greatest common divisor is always positive, so
g = G.
20
Problem (3.5.12)
Solution.
for some j ∈ N. From equation 6, we see that α(p) and γ(p) have the same parity. That is,
they are both even or both odd.
Thus, we see that α(p) − min(α(p), γ(p)) is even, so n is a perfect square. Let m2 = n for
some m ∈ Z. We see that
4af (x, y) = (2ax + by)2 − dy 2
4af (x, y) = (2ax + by)2
(2ax + by)2
f (x, y) =
4a
2
by
g 2 2ax
g
+ g
f (x, y) =
4ng
2
2ax by
g g
+ g
f (x, y) =
4n
2
2ax by
g g
+ g
f (x, y) =
4m2
2
2ax + by
f (x, y) = g ,
2mg
so all values of f (x, y) can be represented by gx2 .
Call h(x, y) = gx2 . We see that
2a b
f (x, y) = g x+ y, ux + vy ,
2mg 2mg
where u and v are such that
a b
v− u = 1.
mg 2mg
a b a
Such numbers u, v will exist if gcd mg , 2mg = 1. We also see that mg
= m because
2
a = ng = m g.
b
2
We aim to show that gcd m, 2mg = 1. We see that ac = m2 gc = 2b , so m2 | (b2 /4), so
m | (b/2).
Now we note that if gcd(a, b, c) = g, then gcd ag , gb , gc = 1. We see that
2
b
ac =
2
2
1 b
c=
a 2
22
2
1 b
c= 2
mg 2
1 b b
c= 2 · ·
mg 2 2
c b b
=· · .
g 2mg 2mg
Also,
a m2 g
=
g g
= m2 .
So
2 b b b
gcd m , , · = 1.
g 2mg 2mg
2
2 b b
Clearly, gcd m , 2mg = 1 so we can conclude that gcd m, 2mg = 1 considering their
prime factorizations.
Therefore, there will be u, v which satisfy
a b
v− u = 1,
mg 2mg
and the matrix
b
m 2mg
∈Γ
u v
defines the transformation from h to f . By definition, h ∼ f .
23