MATH 324 Summer 2005 Elementary Number Theory Solutions to Assignment 2 Due: Wednesday July 20, 2005
Department of Mathematical and Statistical Sciences University of Alberta
Question 1. [p 75. #23]
Show that iff(x) = anxn + an−1x
n−1 + · · · + a1x + a0
where the coefficients are integers, then there is an integer y such that f(y) is composite.(Hint: Assume that f(x) = p is prime, and show p divides f(x + kp) for all integers k. Conclude fromthe fact that a polynomial of degree n, n > 1 takes on each value at most n times, that there is an integery such that f(y) is composite.)
Solution: Suppose that there does not exist an integer y ∈ Z such that f(y) is composite, then for eacht ∈ Z, f(t), the value of the polynomial at t, being an integer, has the property that |f(t)| is either 0, 1, ora prime. Since there are only finitely many t’s for which |f(t)| can be 0 or 1, then there are infinitely manyintegers t for which |f(t)| is a prime, let P = {t ∈ Z : |f(t)| is prime}.
Let x be an integer and suppose that f(x) = p where p is a prime (an argument similar to that given belowwill handle the case f(x) = −p).
Consider the difference
f(x + kp) − f(x) = an
(
(x + kp)n − xn)
+ an−1
(
(x + kp)n−1 − xn−1)
+ · · · + a1
(
(x + kp) − x)
+ (a0 − a0),
then
f(x + kp) − f(x) = kpan
(
(x + kp)n−1 + · · · + xn−1)
+ kpan−1
(
(x + kp)n−2 + · · · + xn−2)
+ · · · + kpa1.
Thus, if f(x) = p, then p | f(x + kp) for all integers k, and since |f(t)| is a prime for each t ∈ P, then wemust have f(x + kp) = ±p for infinitely many integers k. So there must either be infinitely many values ofk for which f(x + kp) = +p, or, there must be infinitely many values of k for which f(x + kp) = −p.
However, this contradicts the fact that a polynomial of degree n > 1 takes on each value at most n times.Therefore, there must exist an integer y such that f(y) is composite.
Question 2. [p 94. #4]
Let a be a positive integer. What is the greatest common divisor of a and a2?
Solution: We will show that (a, a2) = a. Clearly, a | a2, so a is a common divisor of a and a2. Now, if d | a
and d | a2, then d | a also, so that (a, a2) = a.
Question 3. [p 94. #5]
Let a be a positive integer. What is the greatest common divisor of a and a + 1?
Solution: We will show that (a, a + 1) = 1. To see this, note that if d | a and d | a + 1, then d | a + 1 − a,
that is, any common divisor of a and a + 1 must divide 1, therefore (a, a + 1) = 1.
Question 4. [p 95. #6]
Let a be a positive integer. What is the greatest common divisor of a and a + 2?
Solution: We will show that (a, a + 2) =
{
1 if a is odd
2 if a is even.
If a is odd and if d | a and d | a + 2, then d | 2, and since a is odd, then d = 1. Therefore (a, a + 2) = 1.
If a is even, then 2 | a and 2 | a + 2, while if d | a and d | a + 2, then d | 2. Therefore (a, a + 2) = 2.
Question 5. [p 95. #8]
Show that if a and b are integers with (a, b) = 1, then (a + b, a − b) = 1 or 2.
Solution: Since(a + b, a− b) | a + b and (a + b, a − b) | a − b,
then(a + b, a − b) | a + b + a − b = 2a and (a + b, a − b) | a + b − (a − b) = 2b,
that is, (a + b, a − b) | (2a, 2b) = 2(a, b) = 2. Therefore, (a + b, a − b) = 1 or 2.
Question 6. [p 95. #25]
Show that every positive integer greater than 6 is the sum of two relatively prime integers greater than one.
Solution:
(a) If n is an odd integer, say n = 2a + 1, with a > 1, then n = a + (a + 1), and (a, a + 1) = 1.
Note: a > 1 implies that n = 2a + 1 ≥ 5.
(b) If n is an even integer of the form n = 4a, then n = (2a − 1) + (2a + 1) and (2a − 1, 2a + 1) = 1, sinceif d | 2a− 1 and d | 2a + 1, this implies that d is odd and d | 2, so we must have d = 1.
Note: 2a − 1 > 1 implies that a > 1, which implies that n = 4a ≥ 8.
(c) If n is an even integer of the form n = 4a + 2, then n = (2a − 1) + (2a + 3) and (2a − 1, 2a + 3) = 1,
since if d | 2a − 1 and d | 2a + 3, then d is odd and d | 4, so that d = 1.
Note: 2a − 1 > 1 implies that a > 1, which implies that n = 4a + 2 ≥ 10.
Therefore, every positive integer greater than six is the sum of two relatively prime integers greater thanone.
Question 7. [p 105. #5]
Find the greatest common divisor of each of the following sets of integers.
(a) 6, 10, 15
(b) 70, 98, 105
(c) 280, 330, 405, 490
Solution:
Note: We use the fact that (a, b, c) = ((a, b, ), c).
(a) a = 6, b = 10, c = 15, (6, 10) = 2 since 10 = 6 · 1 + 46 = 4 · 1 + 24 = 2 · 2 + 0
and (2, 15) = 1 since 15 = 2 · 7 + 12 = 1 · 2 + 0
Therefore, (6, 10, 15) = ((6, 10), 15) = (2, 15) = 1.
(b) a = 70, b = 98, c = 105
(70, 98) = 14 since 98 = 70 · 1 + 2870 = 28 · 2 + 1428 = 14 · 2 + 0
and (14, 105) = 7 since 105 = 14 · 7 + 714 = 7 · 2 + 0
Therefore, (70, 98, 105) = ((70, 98), 105) = (14, 105) = 7.
(c) a = 280, b = 330, c = 405, d = 490
(280, 330) = 10 since 330 = 280 · 1 + 50280 = 50 · 5 + 3050 = 30 · 1 + 2030 = 20 · 1 + 1020 = 10 · 2 + 0
and (10, 405) = 5 since 405 = 10 · 40 + 510 = 5 · 2 + 0
and (5, 490) = 5 since 490 = 5 · 98 + 0.
Therefore,
(280, 330, 405, 490) = ((280, 330), 405, 490)
= (10, 405, 490)
= ((10, 405), 490)
= (5, 490)
= 5.
Question 8. [p 106. #7]
Express the greatest common divisor of each set of numbers in Question 7 as a linear combination of thenumbers in that set.
Solution:
(a) a = 6, b = 10, c = 15
We want to write (a, b, c) = ax+by+cz for some integers x, y, z. From Question 7a we have 10 = 6 ·1+4,
and 6 = 4 · 1 + 2, so that
2 = (6, 10) = 6 − 4 = 6 − (10 − 6) = 6 · 2 + 10 · (−1),
and1 = (2, 15) = 15− 2 · 7 = 15− (6 · 2 + 10 · (−1)) · 7,
that is, 1 = 6 · (−14) + 10 · 7 + 15 · 1, and x = −14, y = 7, and z = 1.
(b) a = 70, b = 98, c = 105
Again, we want to write (a, b, c) = ax + by + cz for some integers x, y, z. From Question 7b we have
14 = (70, 98) = 70− 28 · 2 = 70 − (98 − 70) · 2,
so that 14 = (70, 98) = 70 · 3 + 98 · (−2).
Also,7 = (14, 105) = 105− 14 · 7 = 105− (70 · 3 + 98 · (−2)) · 7,
that is, 7 = 70 · (−21) + 98 · 14 + 105 · 1, and x = −21, y = 14, and z = 1.
(c) a = 280, b = 330, c = 405, d = 490
Now we want to write (a, b, c, d) = ax + by + cz + dw for some integers x, y, z, w. From Question 7c wehave
10 = (280, 330) = 30 − 20 = 30− (50 − 30) = 30 · 2 + 50 · (−1),
so that 10 = (280, 330) = 280 · 2 − (330 − 280) · 11 = 280 · 13− 330 · 11.
Also,5 = (280, 330, 405) = (10, 405) = 405− 10 · 40,
so that,5 = (280, 330, 405) = 405− (280 · 13− 330 · 11) · 40,
that is,5 = (280, 330, 405) = 280 · (−520) + 330 · 440 + 405 · 1.
Therefore, 5 = (280, 330, 405, 490) = (5, 490), so that
5 = (280, 330, 405, 490) = 280 · (−520) + 330 · 440 + 405 · 1 + 490 · 0,
and x = −520, y = 440, z = 1, w = 0.
Note: All of the computations above came from the Euclidean algorithm in Question 7.
Question 9. [p 117. #14]
Let p be a prime and n a positive integer. Show that the largest exponent ν(n) such that pν(n)∣
∣ n! is givenby dePolignac’s formula:
ν(n) =
⌊
n
p
⌋
+
⌊
n
p2
⌋
+
⌊
n
p3
⌋
+ · · · .
Solution: For k ≥ 1, the integers in the sequence 1, 2, 3, · · · , n which are divisible by pk are
pk, 2 · pk, 3 · pk, · · · , q · pk
where q =
⌊
n
pk
⌋
. So the number of integers in the sequence 1, 2, 3, · · · , n which are divisible by pk is
⌊
n
pk
⌋
.
On the other hand, the exponent ν(n) of the largest power of p in the prime factorization of n! is
⌊
n
p
⌋
+
⌊
n
p2
⌋
+ +
⌊
n
p3
⌋
+ · · · +
⌊
n
pr
⌋
where r is determined by n from pr ≤ n < pr+1 (e.g. the number divisible by p2 have to be counted twice,
once in
⌊
n
p
⌋
and once in
⌊
n
p2
⌋
).
Question 10. [p 117. #15]
Find the prime power factorization of 20!.
Solution: The primes less than 20 are
2, 3, 5, 7, 11, 13, 17, 19.
Now,⌊
20
2
⌋
+
⌊
20
22
⌋
+
⌊
20
23
⌋
+
⌊
20
24
⌋
= 10 + 5 + 2 + 1 = 18,
so that 218∣
∣ 20!, but 219∣
∣6 20!.
Also,⌊
20
3
⌋
+
⌊
20
32
⌋
= 6 + 2 = 8,
so that 38∣
∣ 20!, but 39∣
∣6 20!.
Also,⌊
20
5
⌋
= 4,
so that 54∣
∣ 20!, but 55∣
∣6 20!.
Also,⌊
20
7
⌋
= 2,
so that 72∣
∣ 20!, but 73∣
∣6 20!.
Finally,⌊
20
11
⌋
=
⌊
20
13
⌋
=
⌊
20
17
⌋
=
⌊
20
19
⌋
= 1.
Therefore, the prime power factorization of 20! is
20! = 218 · 38 · 54 · 72 · 11 · 13 · 17 · 19.
Question 11. [p 138. #1c]
Solve the following Diophantine equation, either find all integer solutions, or show that there are no integralsolutions.
21x + 14y = 147.
Solution: Here a = 21, b = 14, c = 147 and d = (a, b) = 7∣
∣ c, so the equation does have solutions. Weuse the Euclidean algorithm to find a particular solution:
21 = 14 · 1 + 7
14 = 7 · 2 + 0.
Therefore, 147 = 7 · 21 = 21 · 21 + 14 · (−21), that is, 21 · 21 + 14 · (−21) = 147, and a particular solution isgiven by x0 = 21, y0 = −21.
The general solution is given by
x = x0 +
(
b
d
)
t
y = y0 −
(
a
d
)
t
where t ∈ Z. Therefore, all solutions are obtained from
x = 21 + 2t
y = −21− 3t
where t ∈ Z is arbitrary.
Question 12. [p 138. #1d]
Solve the following Diophantine equation, either find all integer solutions, or show that there are no integralsolutions.
60x + 18y = 97.
Solution: Here a = 60, b = 18, c = 97, and d = (a, b) = 6∣
∣6 97, so the linear Diophantine equation has nosolutions.
Question 13. [p 138. #1e]
Solve the following Diophantine equation, either find all integer solutions, or show that there are no integralsolutions.
1402x + 1969y = 1.
Solution: Here a = 1402, b = 1969, c = 1, ; and d = (a, b) = 1, so that d∣
∣ c, and the equation does havesolutions. Again, we use the Euclidean algorithm to find a particular solution:
1969 = 1402 · 1 + 567
1402 = 567 · 2 + 268
567 = 268 · 2 + 31
268 = 31 · 8 + 20
31 = 20 · 1 + 11
20 = 11 · 1 + 9
11 = 9 · 1 + 2
9 = 2 · 4 + 1
2 = 1 · 2 + 0,
and working backwards, we get (eventually)
1402 · 889 + 1969 · (−633) = 1,
so a particular solution is given by x0 = 889, y0 = −633.
The general solution is
x = 889 + 1969 · t
y = −633− 1402 · t
where t ∈ Z.
Question 14. [p 138. #8]
A shopper spends a total of $5.49 for oranges, which cost 18c6 each, and grapefruits, which cost 33c6 each.What is the minimum number of pieces of fruit the shopper could have bought?
Solution: Let x be the number of oranges bought and let y be the number of grapefruit bought, then wewant to solve the linear diophantine equation 18x + 33y = 549.
Here a = 18, b = 33, c = 549, and d = (18, 33) = 3∣
∣ 549, so there are solutions. We use the Euclideanalgorithm to find a particular solution:
33 = 18 · 1 + 15
18 = 15 · 1 + 3
3 = 3 · 5 + 0,
so that 3 = 18 − 15 = 18 − (33 − 18) = 18 · 2 + 33 · (−1), and 18 · 366 + 33 · (−183) = 549. Therefore, aparticular solution is x0 = 366, y0 = −183.
The general solution is
x = 366 + 11t
y = −183− 6t
where t ∈ Z, and since we must have x ≥ 0 and y ≥ 0, then we need −34 < t ≤ −31.
For t = −31,
x = 366− 11 · 31 = 25
y = −183 + 3 · 31 = 3
which gives a total of 28 pieces.
For t = −32,
x = 366− 11 · 32 = 14
y = −183 + 3 · 32 = 9
which gives a total of 23 pieces.
For t = −33,
x = 366− 11 · 33 = 3
y = −183 + 3 · 33 = 15
which gives a total of 18 pieces.
Therefore, the minimum number of pieces of fruit the shopper can purchase is 18 pieces: 3 oranges and 15grapefruit.
Question 15. [p 138. #9]
A postal clerk has only 14-cent and 21-cent stamps to sell. What combinations of these may be used to maila package requiring postage of exactly each of the following amounts?
(a) $3.50 (b) $4.00 (c) $7.77
Solution:
(a) The linear diophantine equation we need to solve is 14x + 21y = 350. Here a = 14, b = 21, c = 350,
and d = (14, 21) = 7, and since 7∣
∣ 350, then there are solutions. Use the Euclidean algorithm to finda particular solution:
21 = 14 · 1 + 7
14 = 7 · 2 + 0
so that 7 = 14 · (−1) + 21 · 1, and 14 · (−50) + 21 · 50 = 350.
A particular solution is x0 = −50, y0 = 50, and the general solution is
x = −50 + 3t
y = 50 − 2t
where t ∈ Z. We need x ≥ 0, y ≥ 0, so that 17 ≤ t ≤ 25. The possible combinations are:
t = 17 x = 1 y = 16
t = 18 x = 4 y = 14
t = 19 x = 7 y = 12
t = 20 x = 10 y = 10
t = 21 x = 13 y = 8
t = 22 x = 16 y = 6
t = 23 x = 19 y = 4
t = 24 x = 22 y = 2
t = 25 x = 25 y = 0
(b) The linear diophantine equation we need to solve is 14x + 21y = 400. Here a = 14, b = 21, c = 400,
and d = (14, 21) = 7, and since 7∣
∣6 400, then there are no solutions.
(c) The linear diophantine equation we need to solve is 14x + 21y = 777. Here a = 14, b = 21, c = 777,
and d = (14, 21) = 7, ; and since 7∣
∣ 777, then there are solutions. Use the Euclidean algorithm to finda particular solution: 14 · (−1) + 21 · 1 = 7, so that 14 · (−111) + 21 · 111 = 777. A particular solution isx0 = −111, y0 = 111, and the general solution is
x = −111 + 3t
y = 111− 2t
where t ∈ Z. We need x ≥ 0, y ≥ 0, so that 37 ≤ t ≤ 55, and there are 19 possible solutions
x = −111 + 3t
y = 111− 2t
where 37 ≤ t ≤ 55.