115 11. Proof. If n = 1, then n 3 +1 = 2 is a prime. Assume, to the

115
11. Proof. If n = 1, then n3 + 1 = 2 is a prime. Assume, to the contrary, that there exists a prime
p = n3 + 1 for some integer n ≥ 2. Then p = (n + 1)(n2 − n + 1). Therefore, either n + 1 = 1
or n2 − n + 1 = 1. If n + 1 = 1, then n = 0, which is impossible; while if n2 − n + 1 = 1, then
n2 − n = 0, implying that n = 1 or n = 0, both of which are impossible.
12. (a) 19 = 3 + 5 + 11.
(b) 17 = 2 + 3 + 5 + 7.
(c) 43 = 3 + 5 + 7 + 11 + 17.
13. Proof. Assume that Goldbach’s conjecture is true. Then every even integer that is 4 or greater
can be expressed as the sum of two primes. Let n ≥ 3 be an integer. We show that n can be
expressed as the sum of three integers, each of which is either 1 or a prime. Since 3 = 1 + 1 + 1
and 4 = 1 + 1 + 2, the conjecture is true if n = 3 and n = 4. Hence we may assume that n ≥ 5.
We consider two cases.
Case 1. n is odd. Then n − 1 is even and n − 1 ≥ 4. Thus n − 1 can be expressed as the sum
of two primes p1 and p2 and so n = 1 + p1 + p2 .
Case 2. n is even. Then n − 2 is even and n − 2 ≥ 4. Thus n − 2 can be expressed as the sum
of two primes p1 and p2 and so n = 2 + p1 + p2 .
14. The conjecture is false. The integers 23 and 29 are consecutive odd primes, 23 · 29 + 2 = 669
is not prime and 5 ! 669.
15. It’s not clear if the conjecture is true.
16. Proof. Suppose that 43, 112, 609 is not prime. Then there are integers a and b such that
43, 112, 609 = ab, where 1 < a < 43, 112, 609 and 1 < b < 43, 112, 609. Therefore, 243,112,609 −
1 = 2ab − 1 = (2a )b − 1 and so (2a − 1) | (2ab − 1), which is a contradiction.
17. Since 3k − 1 is even and 3 | (4k − 1) for every integer k ≥ 2, these numbers are not primes.
Exercises for Section 7.3. The Division Algorithm
1. (a) q = r = 4.
(b) q = r = 0.
48 = 11 · 4 + 4.
0 = 11 · 0 + 0.
(c) q = −5 and r = 7.
(d) q = 0 and r = 9.
2. (a) ⌊38/11⌋ = 3,
(b) ⌊22/11⌋ = 2,
−48 = 11 · (−5) + 7.
9 = 11 · 0 + 9.
38 − 11⌊38/11⌋ = 5.
22 − 11⌊22/11⌋ = 0.
(c) ⌊−38/11⌋ = −4,
−38 − 11⌊−38/11⌋ = 6.
3. (a) 47 div 14 = 3 and 47 mod 14 = 5.
(b) 81 div 22 = 3 and 81 mod 22 = 15.
(c) 180 div 45 = 4 and 180 mod 45 = 0.
(d) 24 div 25 = 0 and 24 mod 25 = 24.
(e) 0 div 15 = 0 and 0 mod 15 = 0.
(f) −55 div 27 = −3 and −55 mod 27 = 26.
116
4. Proof. We show that at least one of the integers n, n + 2 and n + 4 is divisible by 3 and, since
n ≥ 4, at most two are primes. Dividing n by 3, we have n = 3q, n = 3q + 1 or n = 3q + 2 for
some integer q. We consider these three cases.
Case 1. n = 3q. Since 3 | n and n > 3, it follows that n is not a prime.
Case 2. n = 3q + 1. Hence n + 2 = 3q + 3 = 3(q + 1). Since q + 1 ∈ Z, it follows that 3 | (n + 2).
Since n + 2 > 3, it follows that n + 2 is not a prime.
Case 3. n = 3q + 2. Hence n + 4 = 3q + 6 = 3(q + 2). Since q + 2 ∈ Z, it follows that 3 | (n + 4).
Since n + 4 > 3, it follows that n + 4 is not a prime.
5. Since n is an odd integer, n = 2k + 1 for some integer k. Therefore, n2 = (2k + 1)2 =
4k 2 + 4k + 1 = 4(k 2 + k) + 1. Thus n2 has a quotient of k 2 + k and a remainder of 1 when
divided by 4.
6. Consider a = 2 and b = 3. Then a mod 4 = 2 ̸= 3 = b mod 4. Also, a2 mod 4 = 4 mod 4 =
0 ̸= 2 = a mod 4, and b2 mod 4 = 9 mod 4 = 1 ̸= 3 = b mod 4.
7. No. Solution. Let a and b be two distinct positive integers. Then we may assume that 1 ≤
a < b. Then a mod b = a. Since 0 ≤ b mod a ≤ a − 1, it follows that a mod b ̸= b mod a. !
8. Proof. Assume that 3 ! n. Then n = 3q + 1 or n = 3q + 2 for some integer q. We consider
these two cases.
Case 1. n = 3q + 1. Then
n2 = (3q + 1)2 = 9q 2 + 6q + 1 = 3(3q 2 + 2q) + 1.
Since 3q 2 + 2q is an integer, n2 has a remainder 1 when divided by 3.
Case 2. n = 3q + 2. Then
n2 = (3q + 2)2 = 9q 2 + 12q + 4 = 9q 2 + 12q + 3 + 1 = 3(3q 2 + 6q + 1) + 1.
Since 3q 2 + 6q + 1 is an integer, n2 has a remainder 1 when divided by 3.
9. (a) Proof. Let n ∈ Z. Then n = 3q, n = 3q + 1 or n = 3q + 2 for some integer q. We consider
these three cases.
Case 1. n = 3q. Then 3 | n.
Case 2. n = 3q + 1. Then 2n + 1 = 2(3q + 1) + 1 = 6q + 3 = 3(2q + 1). Since 2q + 1 is an
integer, 3 | (2n + 1).
Case 3. n = 3q + 2. Then n + 1 = 3q + 3 = 3(q + 1). Since q + 1 is an integer, 3 | (n + 1).
(b) The proof is similar to (a).
10. n = 5q + r for some integers q and r, where r ∈ {0, 1, 2, 3, 4}.
11. Proof. Let a, b, c, d and e be five consecutive integers. Hence we may assume that a = n,
b = n + 1, c = n + 2, d = n + 3 and e = n + 4 for some integer n. Thus n = 5q, n = 5q + 1,
n = 5q + 2, n = 5q + 3 or n = 5q + 4 for some integer q. We consider these five cases.
Case 1. n = 5q. Then a = 5q and 5 | a.
Case 2. n = 5q + 1. Then e = n + 4 = (5q + 1) + 4 = 5q + 5 = 5(q + 1). Since q + 1 is an
integer, 5 | e.
117
Case 3. n = 5q + 2. Then d = n + 3 = (5q + 2) + 3 = 5q + 5 = 5(q + 1). Since q + 1 is an
integer, 5 | d.
Case 4. n = 5q + 3. Then c = n + 2 = (5q + 3) + 2 = 5q + 5 = 5(q + 1). Since q + 1 is an
integer, 5 | c.
Case 5. n = 5q + 4. Then b = n + 1 = (5q + 4) + 1 = 5q + 5 = 5(q + 1). Since q + 1 is an
integer, 5 | b.
12. First we show that 4 divides the product of four consecutive integers.
Proof. Let a = n, b = n + 1, c = n + 2 and d = n + 3 be four consecutive integers, where
n ∈ Z. Then n = 4q, n = 4q + 1, n = 4q + 2 or n = 4q + 3 for some integer q. Let m = abcd.
We consider these four cases.
Case 1. n = 4q. Then m = (4q)(bcd) = 4(qbcd). Since qbcd ∈ Z, it follows that 4 | m.
Case 2. n = 4q + 1. Then d = n + 3 = (4q + 1) + 3 = 4q + 4 = 4(q + 1). Thus
m = abcd = abc[4(q + 1)] = 4[abc(q + 1)]
Since abc(q + 1) ∈ Z, it follows that 4 | m.
(The proofs of Cases 3 and 4 are similar to that of Case 2).
Next we show that 4 never divides the sum of four consecutive integers.
Proof. Let a = n, b = n + 1, c = n + 2 and d = n + 3 be four consecutive integers, where
n ∈ Z. Then
s
= a + b + c + d = n + (n + 1) + (n + 2) + (n + 3)
= 4n + 6 = 4(n + 1) + 2.
Since n + 1 ∈ Z, it follows that s has a remainder of 2 when divided by 4. Thus 4 ! s.
13. (a) Proof. Let n + 1, n + 2, . . . , n + p be p consecutive integers. Then n = pq + r for some
integers q and r, where 0 ≤ r ≤ p − 1. Since 1 ≤ p − r ≤ p, one of the integers 1, 2, . . . , p
is p − r. Hence one of the integers n + 1, n + 2, . . . , n + p is n + (p − r). Since n = pq + r,
it follows that
n + (p − r) = pq + r + (p − r) = pq + p = p(q + 1).
Hence
(n + 1)(n + 2) · · · (n + p) = p(q + 1)m
where m ∈ Z. Since (q + 1)m ∈ Z, it follows that p | (n + 1)(n + 2) · · · (n + p).
(b) Proof. Let n + 1, n + 2, . . . , n + p be p consecutive integers. Then
(n + 1) + (n + 2) + · · · + (n + p)
= pn + (1 + 2 + · · · + p)
p(p + 1)
p+1
= pn +
= p(n +
).
2
2
Since n + p+1
2 is an integer if and only if p is odd, it follows that p | [(n + 1) + (n + 2) +
· · · + (n + p)] if and only if p =
̸ 2.
14. Proof. Assume that 3 ! n. Then n = 3q + 1 or n = 3q + 2 for some integer q. We consider
these two cases.
Case 1. n = 3q + 1. Then
2n2 − 5 =
=
2(3q + 1)2 − 5 = 2(9q 2 + 6q + 1) − 5
18q 2 + 12q + 2 − 5 = 18q 2 + 12q − 3 = 3(6q 2 + 4q − 1).
118
Since 6q 2 + 4q − 1 is an integer, 3 | (2n2 − 5).
Case 2. n = 3q + 2. Then
2n2 − 5 =
2(3q + 2)2 − 5 = 2(9q 2 + 12q + 4) − 5
18q 2 + 24q + 8 − 5 = 18q 2 + 24q + 3 = 3(6q 2 + 8q + 1).
=
Since 6q 2 + 8q + 1 is an integer, 3 | (2n2 − 5).
15. Proof. Assume first that a and b are of the same parity. We consider two cases.
Case 1. a and b are even. Then a = 2x and b = 2y, where x, y ∈ Z. Then
a2 − b2 = (2x)2 − (2y)2 = 4x2 − 4y 2 = 4(x2 − y 2 ).
Since x2 − y 2 is an integer, 4 | (a2 − b2 ).
Case 2. a and b are odd. Then a = 2x + 1 and b = 2y + 1, where x, y ∈ Z. Then
a2 − b 2
(2x + 1)2 − (2y + 1)2 = 4x2 + 4x + 1 − (4y 2 + 4y + 1)
4(x2 + x − y 2 − y).
=
=
Since x2 + x − y 2 − y is an integer, 4 | (a2 − b2 ).
For the converse, assume that a and b are of opposite parity. We consider two cases.
Case 1. a is odd and b is even. Then a = 2x + 1 and b = 2y, where x, y ∈ Z. Then
a2 − b2 = (2x + 1)2 − (2y)2 = 4x2 + 4x + 1 − 4y 2 = 4(x2 + x − y 2 ) + 1.
Since x2 + x − y 2 is an integer, 4 ! (a2 − b2 ).
Case 2. a is even and b is odd. Then a = 2x and b = 2y + 1, where x, y ∈ Z. Then
a2 − b 2
= (2x)2 − (2y + 1)2 = 4x2 − 4y 2 − 4y − 1
= 4x2 − 4y 2 − 4y − 4 + 3 = 4(x2 − y 2 − y − 1) + 3.
Since x2 − y 2 − y − 1 is an integer, 4 ! (a2 − b2 ).
16. Proof. We first show that if 3 ! a2 , then 3 ! a. Assume that 3 | a. Then a = 3x for some
integer x. Thus a2 = (3x)2 = 3(3x2 ). Since 3x2 is an integer, 3 | a2 . Thus if 3 ! a2 , then 3 ! a.
Assume that 3 ! a2 . Then 3 ! a. Thus a = 3q + 1 or a = 3q + 2 for some integer q. We
consider these two cases.
Case 1. a = 3q + 1. Then
a2 − 1 = (3q + 1)2 − 1 = (9q 2 + 6q + 1) − 1 = 3(3q 2 + 2q).
Since 3q 2 + 2q is an integer, 3 | (a2 − 1).
Case 2. n = 3q + 2. Then
a2 − 1 = (3q + 2)2 − 1 = (9q 2 + 12q + 4) − 1 = 9q 2 + 12q + 3 = 3(3q 2 + 4q + 1).
Since 3q 2 + 4q + 1 is an integer, 3 | (a2 − 1).
119
17. Proof. Assume that 3 ! a and 3 ! b. Then one of the following four situations occurs:
(1) a = 3s + 1 and b = 3t + 1;
(2) a = 3s + 1 and b = 3t + 2;
(3) a = 3s + 2 and b = 3t + 1;
(4) a = 3s + 2 and b = 3t + 2;
where s, t ∈ Z. We consider these four cases.
Case 1. a = 3s + 1 and b = 3t + 1. Then
a2 − b 2
=
=
(3s + 1)2 − (3t + 1)2 = (9s2 + 6s + 1) − (9t2 + 6t + 1)
9s2 + 6s − 9t2 − 6t = 3(3s2 + 2s − 3t2 − 2t).
Since 3s2 + 2s − 3t2 − 2t is an integer, 3 | (a2 − b2 ).
[The proofs of the other cases are similar.]
18. Proof. Assume that 3 ! n. Then n = 3q + 1 or n = 3q + 2 for some integer q. We consider
these two cases.
Case 1. n = 3q + 1. Then
2n2 + 1 =
=
2(3q + 1)2 + 1 = 2(9q 2 + 6q + 1) + 1
18q 2 + 12q + 2 + 1 = 18q 2 + 12q + 3 = 3(6q 2 + 4q + 1).
Since 6q 2 + 4q + 1 is an integer, 3 | (2n2 + 1).
Case 2. n = 3q + 2. Then
2n2 + 1 =
=
2(3q + 2)2 + 1 = 2(9q 2 + 12q + 4) + 1
18q 2 + 24q + 8 + 1 = 18q 2 + 24q + 9 = 3(6q 2 + 8q + 3).
Since 6q 2 + 8q + 3 is an integer, 3 | (2n2 + 1).
For the converse, assume that 3 | n. Then n = 3x for some integer x. Thus
2n2 + 1 = 2(3x)2 + 1 = 3(6x2 ) + 1.
Since 6x2 is an integer, 3 ! (2n2 + 1).
19. Proof. Let p be a prime different from 2 and 5. Dividing p by 10, we obtain p = 10k + r for
some integers k and r, where 0 ≤ r ≤ 9. If r = 0, then 10 | p, which is impossible. If r = 2,
then p = 10k + 2 = 2(5k + 1). Since 5k + 1 is an integer, 2 | p, again an impossibility since
p ̸= 2. If r = 4, then p = 10k + 4 = 2(5k + 2). Since 5k + 1 is an integer, 2 | p, which is a
contradiction. If r = 5, then p = 10k + 5 = 5(2k + 1). Since 2k + 1 is an integer, 5 | p, which
is impossible since p ̸= 5. If r = 6, then p = 10k + 6 = 2(5k + 3). Since 5k + 3 is an integer,
2 | p, which is impossible. If r = 8, then p = 10k + 8 = 2(5k + 4). Since 5k + 4 is an integer,
2 | p, which is impossible. Hence p = 10k + r, where r ∈ {1, 3, 7, 9}.
20. Proof. Let p ≥ 3 be a prime. Dividing p by 4, we obtain p = 4k + r for some integers k and r,
where 0 ≤ r ≤ 3. If r = 0, then 4 | p, which is impossible. If r = 2, then p = 4k + 2 = 2(2k + 1).
Since 2k + 1 is an integer, 2 | p. Since p ≥ 3, we have a contradiction. Thus p = 4k + 1 or
p = 4k + 3 for some integer k.
120
21. Proof. Let p ≥ 5 be a prime. Dividing p by 6, we obtain p = 6k + r for some integers
k and r, where 0 ≤ r ≤ 5. If r = 0, then 6 | p, which is impossible. If r = 2, then
p = 6k + 2 = 2(3k + 1). Since 3k + 1 is an integer, 2 | p. Since p ≥ 5, we have a contradiction.
If r = 3, then p = 6k + 3 = 3(2k + 1). Since 2k + 1 is an integer, 3 | p, which is a contradiction
since p ≥ 5. If r = 4, then p = 6k + 4 = 2(3k + 2). Since 3k + 2 is an integer, 2 | p, which is a
contradiction since p ≥ 5. Hence p = 6k + 1 or p = 6k + 5 for some integer k.
22. Proof. Assume that n = 6k + 5 for some integer k. Then
n = 6k + 5 = 6k + 3 + 2 = 3(2k + 1) + 2.
Letting ℓ = 2k + 1, we have n = 3ℓ + 2, where ℓ ∈ Z.
23. Proof. We show that 3 ! (n2 + 1) for every n, thereby showing that 3 | (n2 + 1) is false and
that the desired implication is true. We consider three cases.
Case 1. n = 3q for some integer q. Then
n2 + 1 = (3q)2 + 1 = 3(3q 2 ) + 1.
Since 3q 2 is an integer 3 ! (n2 + 1).
Case 2. n = 3q + 1 for some integer q. Then
n2 + 1
= (3q + 1)2 + 1 = 9q 2 + 6q + 1 + 1
= 9q 2 + 6q + 2 = 3(3q 2 + 2q) + 2.
Since 3q 2 + 2q is an integer, 3 ! (n2 + 1).
Case 3. n = 3q + 2 for some integer q. Then
n2 + 1
= (3q + 2)2 + 1 = 9q 2 + 12q + 4 + 1
= 9q 2 + 12q + 5 = 3(3q 2 + 4q + 1) + 2.
Since 3q 2 + 4q + 1 is an integer, 3 ! (n2 + 1).
Exercises for Section 7.4. Congruence
1. (a) 47 ≡ 23 (mod 8)
(d) 12 ≡ 12 (mod 13)
(b) 18 ≡ 38 (mod 5)
(e) 37 ≡ 35 (mod 2)
2. (a) True, since 7 | (24 − 3)
(c) 20 ̸≡ 10 (mod 3)
(b) False, since 8 ! (−17 − 9)
(c) True, since 4 | [(−5) − (−5)]
(d) True, since 3 | [24 − (−3)]
3. −9, 4, 17, 30
4. (a) Yes
(b) No
(c) No
(d) No.
5. Proof. First, we prove that if a ≡ b (mod n), then b = a + ℓn for some integer ℓ. Assume
that a ≡ b (mod n). By Theorem 7.25, a = b + kn for some integer k. Then b = a − kn. Thus
b = a + ℓn, where ℓ = −k.
We now turn to the converse and prove that if b = a+ℓn for some integer ℓ, then a ≡ b (mod n).
Assume that b = a + ℓn for some integer ℓ. Thus a = b − ℓn. Therefore, a = b + kn, where
k = −ℓ. By Theorem 7.25, a ≡ b (mod n).