Homework 3 Solutions
4.1.4. If a | b and b | c, then there exist integers p and q such that b = ap and c = bq. Then c = bq = (ap)q = a(pq),
so a | c.
Question 1. If n is any integer, then
n3 + (n + 1)3 + (n + 2)3 = n3 + (n3 + 3n2 + 3n + 1) + (n3 + 6n2 + 12n + 8)
= 3n3 + 9n2 + 15n + 9
= 3(n3 + 3n2 + 5n + 3)
which means that 3 divides this quantity.
Question 3. Notice that
(−1) · (10n + 3) + 2 · (5n + 2) = (−10n − 3) + (10n + 4) = 1
so 1 is a linear combination of 10n + 3 and 5n + 2. Every linear combination of 10n + 3 and 5n + 2 is divisible by
1, since 1 divides everything, so this proves that 1 = gcd(10n + 3, 5n + 2).
Question 4. There are a lot of ways to approach this. Here is just one possibility. Let d = gcd(a + nb, b). Then
d | (a + nb) and d | b, so d | ((a + nb) − nb), so d | a. Thus d | a and d | b, so d is a common divisor of a and b.
Next, suppose c is any common divisor of a and b. Then c | (a + nb) also, so since c is a common divisor of
a + nb and b, it must divide d. Thus d is a common divisor of a and b, and every common divisor of a and b is also
a divisor of d, so we conclude that d = gcd(a, b).
4.3.10. If m = kt for t an odd integer, we have
(xk + 1)(xk(t−1) − xk(t−2) + · · · − xk + 1) = (xkt − xk(t−1) + · · · − x2k + xk ) + (xk(t−1) − · · · − xk + 1)
= xkt + 1.
Suppose 2m + 1 is prime. By the fundamental theorem of arithmetic, we can write m = 2a t where a ≥ 0 and t is
odd. Then applying the above with x = 2 and k = 2a , we see that we must have
a
a
2m + 1 = (22 + 1)(22
(t−1)
a
− 22
(t−2)
a
+ · · · − 22 + 1)
but 2m + 1 is prime, so on the right hand side we must have one of the factors equal to 1 and the other equal to
a
0
2m + 1. Notice that 22 + 1 ≥ 22 + 1 ≥ 2 + 1 ≥ 3, so it cannot be equal to 1, so it must be equal to 2m + 1. In
other words, we have
a
2m + 1 = 22 + 1.
Subtracting 1 and taking log2 of both sides, we see that m = 2a , which is what we wanted to show.
Question 5. Suppose a > 1 is a perfect square. Then a = b2 for some positive integer b. If we factor bk as pe11 · · · pekk ,
then
k
a = b2 = (pe11 · · · pekk )2 = p12e1 · · · p2e
k .
By uniqueness of prime factorizations, this is the prime factorization of a, so we see that every exponent in the
prime factorization of a is even.
2ek
1
Conversely, if every exponent in the prime factorization of a is even, we have a = p2e
for primes p1 , . . . , pk
1 · · · pk
and positive integers e1 , . . . , ek , and clearly
a = (pe11 · · · pekk )2 .
√
√
Now suppose a is not a perfect square, and suppose that a is rational, so that we can write a = b/c for some
2 2
2
2
positive integers b and c. Then a = b /c , so ac = b . Since a is not a perfect square, there exists a prime number
p in its prime factorization which appears to an odd power e. Since c2 is a perfect square, p must appear to an even
power in the prime factorization of c2 (that even power might be 0). Since an even plus an odd is odd, we see that
1
p appears to an odd power in the prime factorization of ac2 . But ac2 = b2 , and b2 is a perfect
square, so p has to
√
appear to an even power in the prime factorization of b2 . This is a contradiction. Thus a is irrational.
4.3.54. If p is a prime number, then either p = 3, or else 3 - p. This means that if p 6= 3, then either p ≡ 1 mod 3
or else p ≡ 2 mod 3. This problem is saying that there are infinitely many primes congruent to 2 modulo 3.
Suppose there are only finitely many primes p1 , . . . , pn congruent to 2 modulo 3. Then consider a = 3p1 · · · pn +2.
Notice that we have a ≡ 2 mod pi for i = 1, . . . , n, so none of the primes p1 , . . . , pn is a prime factor of a. Also,
notice that 3 - a, since a ≡ 2 mod 3. This means that all of the prime factors of a must be congruent to 1 modulo
3. Let a = q1e1 · · · qkek be a prime factorization of a. We have just seen that qj ≡ 1 mod 3 for all j = 1, . . . , k. Then
a = q1e1 · · · qkek ≡ 1e1 · · · 1ek = 1 mod 3.
But this is a contradiction, since we saw earlier that a ≡ 2 mod 3, but 1 6≡ 2 mod 3. Thus there must be infinitely
many primes which are congruent to 2 modulo 3.
Question 6. Suppose n = ad · · · a0 , where ai ∈ {0, 1, . . . , 9} are the decimal digits of n. In other words,
n = a0 + 10 · a1 + 102 · a2 + · · · + 10d · ad .
Notice that 10 ≡ 1 mod 9, so
n ≡ a0 + 1 · a1 + 12 · a2 + · · · + 1d · ad = a0 + a1 + · · · + ad mod 9.
Thus we see that n ≡ 0 mod 9 if and only if a0 + · · · ad ≡ 0 mod 9, which means that n is divisibile by 9 if and only
if a0 + · · · + ad is divisible by 9.
2
© Copyright 2026 Paperzz