Math 152, Problem Set 2 solutions (2018-01-24) All variables a, b, n, etc are integers unless otherwise stated. Each part of a problem is worth 5 points. 1. Let us look at the following equation: x 5 1 x 1 = y3 1 (1) and let us try to find all integral solutions (x, y). (When x = 1, we just realize the LHS as x 4 + x 3 + x 2 + x + 1, which is then 5.) (a) Prove that if a prime p divides x5 1, then either p = 5 or 5 p 1. x 1 (Hint: Q3(b) in Problem Set 1 might be useful.) Solution. Let p be a prime and x an integer. Suppose p divides x 4 +x 3 +x 2 +x+1 = (x 5 1)/(x 1). It follows that p divides x 5 1. Let k be the smallest positive integer such that p x k 1. We know p x 5 1, so certainly k 5. I claim that in fact k 5, i.e. either k = 5 or k = 1. To see this, note that p x 5 1 and p x k 1 together imply that p gcd(x 5 1, x k 1) = x gcd(5,k) 1, where the equality is from Q3(a) of Problem Set 1. Since gcd(5, k) k and we assumed k to be the smallest positive integer such that p x k 1, we must in fact have k = gcd(5, k). Since we also have k 5, this is equivalent to saying that k 5, as claimed. So we now have two cases: The first case is that k = 5 is the smallest positive integer such that p x k 1. Then Q3(b) of Problem Set 1 tells us that 5 p 1, which is one of the conditions we wanted to show. The second case is that k = 1, i.e. p x 1, or in other words x 1 (mod p). Then x 4 + x 3 + x 2 + x + 1 1 + 1 + 1 + 1 + 1 5 (mod p). But we assumed p x 4 + x 3 + x 2 + x + 1, i.e. x 4 + x 3 + x 2 + x + 1 0 (mod p). So we deduce that 5 0 (mod p), i.e. p 5. But then we must have p = 5, which is the other condition we wanted to show. (b) Show that (1) in fact has no integral solutions. (Hint: By part (a), any divisor of y 3 1 has to be (mod 5) to either 0 or 1.) Solution. Suppose given two integers x, y such that equation (1) holds. Let p be any prime dividing y 3 1 = (x 5 1)/(x 1). By part (a), either p 0 (mod 5) or p 1 (mod 5). More generally, let d be any divisor of y 3 1. Then d is the product of powers of primes that divide y 3 1, so it follows from the above that either d 0 (mod 5) or d 1 (mod 5). Writing y 3 1 = (y 1)(y 2 + y + 1), we can apply the above fact for d = y 1 and d = y 2 + y + 1: 1
Suppose d = y 1 0 (mod 5). Then y 1 (mod 5). But then d = y 2 +y+1 1 + 1 + 1 3 (mod 5), which is not equivalent to 0 or 1 mod 5. Contradiction. Suppose d = y 1 1 (mod 5). Then y 2 (mod 5). But then d = y 2 +y+1 4 + 2 + 1 2 (mod 5), which is not equivalent to 0 or 1 mod 5. Contradiction. In either case we have a contradiction, so we conclude there are no pairs of integers x, y satisfying equation (1). 2. Prove that for any integer m with gcd(m, 6) = 1, there exists a natural number n such that 2 n + 3 n + 6 n 1 is a multiple of m. Solution. (We follow the strategy discussed for Problem 2.4 in the lecture notes (2018-01-12).) Let m be an integer such that gcd(m, 6) = 1. Note that this also implies gcd(m, 2) = 1 and gcd(m, 3) = 1. Let n := φ(m) 1. I claim that 2 n + 3 n + 6 n 1 (mod 15) for this choice of n (solving the problem). Since gcd(m, 6) = 1, it suffices to check this after multiplying both sides by 6, i.e. we want to show that We have 6 2 n + 6 3 n + 6 6 n 6 (mod 15). 6 2 n + 6 3 n + 6 6 n = 3 2 φ(m) + 2 3 φ(m) + 6 φ(m), and by Euler s theorem this is equivalent to 3 + 2 + 1 = 6 mod m, as desired. On the other hand, show that this is impossible with m = 15. Solution. We first note the periodicities in the sequences 2 n, 3 n, 6 n mod 15: 2 4 1 (mod 15), so 2 4+n 2 n (mod 15) for all n 0. 3 5 3 (mod 15), so 3 4+n 3 n (mod 15) for all n 1. 6 2 6 (mod 15), so 6 n = 6 (mod 15) for all n 1. It follows that all possible values of 2 n + 3 n + 6 n (mod 15) occur in the range 0 n 4. Computing the values in this range gives the following results: n 2 n + 3 n + 6 n (mod 15) 0 3 1 11 2 4 3 11 4 13 We conclude that there is no n such that 2 n + 3 n + 6 n 1 (mod 15). 3. Find the minimal positive integer t such that whenever gcd(x, 63) = 1. Prove your result. x t 1 (mod 63) Solution. We factorize 63 = 3 2 7. Computing (p 1)p s 1 for these two factors, we get (3 1) 3 = 6, (7 1) 1 = 6. 2
Thus by Corollary 4.2 of the lecture notes (2018-01-19), for t = 6 we have x t 1 (mod 63) whenever gcd(x, 63) = 1. I claim t = 6 is minimal. Suppose we have another such t. Then, taking x = 10 (which is coprime to 63), we have 10 t 1 (mod 63). This in particular implies 10 t 1 (mod 7), and since 10 3 (mod 7) this is equivalent to saying that 3 t 1 (mod 7). One easily checks that the minimal t for which this holds is t = 6. 4. Find the least natural number t, for which there exists some 1 s < t, such that n s and n t have the same last 3 digits for any natural number n. (Note: The last 3 digits of 18 (for example) is considered 018, and thus the same as that of 2018.) Solution. The first observation is that two natural numbers x, y have the same last 3 digits if and only if x y (mod 1000). Let 1 s < t be two natural numbers. We will show that the following two conditions on (s, t) are equivalent: n s n t (mod 1000) for all natural numbers n; s 3 and 100 t s. It follows immediately from this equivalence that the minimal t asked for in the problem is t = 103 (with corresponding s = 3). So let s prove the claimed equivalence. For n a natural number, n s n t (mod 1000) if and only if 1000 n s n t. Then factoring 1000 = 2 3 5 3, we see that 1000 n s n t if and only if both 2 3 n s n t and 5 3 n s n t. Let s characterize when 5 3 n s n t for all natural numbers n. Write n s n t = n s (1 n t s ). (Note that t s > 0.) We consider two cases for n: First consider the case that n 0 (mod 5). Then 1 n t s 1 (mod 5), so 5 3 n s (1 n t s ) if and only if 5 3 n s. This condition holds for all n divisible by 5 (in particular n = 5) if and only if s 3. The other case is that gcd(n, 5) = 1. Then gcd(n s, 5) = 1 too, so 5 3 n s (1 n t s ) if and only if 5 3 1 n t s, i.e. if and only if n t s 1 (mod 5 3 ). The generalization of Fermat s little theorem to prime power modulus tells us that this holds if t s is divisible by (5 1) 5 2 = 100. In fact, n t s 1 (mod 5 3 ) for all n coprime to 5 if and only if 100 t s. This follows from the fact that this value (p 1) p s 1 in Fermat s little theorem is the minimal exponent e such that n e 1 (mod p s ) for all n coprime to p. This fact will be proved later in the course. We conclude that 5 3 n s n t for all natural numbers n (both divisible by 5 and coprime to 5) if and only if both s 3 and 100 t s. Going through the same analysis with 5 3 replaced by 2 3, one see that 2 3 n s n t for all natural numbers n if and only if both s 3 and (2 1) 2 2 = 4 t s. These conditions are implied by the conditions coming from the analysis of 5 3. So finally we deduce that 1000 n s n t for all natural numbers n if and only if s 3 and 100 t s, as we desired to show. 5. Let us look at the equation 3 x = 2 y + 1 (2) 3
(a) Show that if y 3, we have 2 y 2 x. Solution. First observe that 2 3 = 8 = 3 2 1, so in particular 2 3 3 2 1. By Lemma 3.3 of the lecture notes (2018-01-17), it follows inductively that for y 3 we have 2 y 3 2y 2 1. It might be psychologically helpful for the next paragraph to note that we can equivalently write this as 2 k+2 3 2k 1 for k 1. Now let x, y be positive integers with y 3, and suppose that 2 y 3 x 1. We will show that this implies 2 y 2 x (solving the problem). We have 2 y 3 x 1 and 2 y 3 2y 2 1, so we deduce 2 y gcd(3 x 1, 3 2y 2 1) = 3 gcd(x,2y 2) 1, where the equality is by Q3(a) of Problem Set 1. Now, gcd(x, 2 y 2 ) = 2 k for some 0 k y 2. If we had k < y 2, then we would have 2 y > 2 k+2 and 2 y 3 2k 1, contradicting the fact 2 k+2 3 2k 1 from the previous paragraph. Therefore we must have k = y 2. It follows that 2 y 2 x, as desired. (b) Prove that (2) has only 2 solutions in natural numbers. Solution. When y = 0 or y = 2 there is clearly no solution. When y = 1 there is a (unique) solution given by x = 1. When y = 3 there is a (unique) solution given by x = 2. It only remains to show that there can be no solution with y 4. By part (a), if y 4 and 3 x = 2 y + 1, then 2 y 2 x, so in particular x 2 y 2. But then 3 x 3 2y 2, and it is easy to see that 3 2y 2 > 2 y + 1: we compute this to be true for y = 4, and the left-hand side grows much faster than the right-hand side so it is also true for y > 4. Thus there can be no such solution (x, y). 6. ( ) Find all solutions in natural numbers to the equation 2 x = 7 y + 9. Solution. I claim the only solution is (x, y) = (4, 1). By inspection this is the only solution with x 4, so it suffices to prove that there are no solutions with x 5. Suppose (for the sake of contradiction) that (x, y) is a solution with x 5. Then 32 = 2 5 2 x so we get 7 y = 2 x 9 9 23 (mod 32). We have 7 3 23 (mod 32) and 7 4 1 (mod 32) so we deduce that y 3 (mod 4). We also have 7 4 1 (mod 5), and 7 3 3 (mod 5). Thus the condition y 3 (mod 4) implies that 2 x = 7 y +9 3+9 2 (mod 5). Since 2 4 1 (mod 5) but 2 2 1 (mod 5), this implies that x 1 (mod 4). Next observe that 2 x = 7 y + 9 2 (mod 7). Since 2 3 1 (mod 9), this implies x 1 (mod 3). Together with x 1 (mod 4) this implies that in fact x 1 (mod 12). Next we use that 2 12 7 12 1 (mod 13). Since x 1 (mod 12) we have 2 x 2 (mod 13). And since y 3 (mod 4), we must have that y is equivalent to 3, 7, or 11 mod 12. Using that 2 x = 7 y + 9 (mod 13), we deduce that in fact we must have y 7 (mod 12). 4
Finally, we use that 2 36 1 (mod 37) and 7 9 1 (mod 37). Since x 1 (mod 12), we must have that x is equivalent to 1, 13, or 25 mod 36. Then 2 x is equivalent to 2, 15, or 20 mod 37. Similarly, since y 7 (mod 12), we must have that y is equivalent to 7, 19, or 31 mod 36. Then 7 y + 9 is equivalent to 6, 16, or 5 mod 37. Thus we cannot have 2 x 7 y + 9 (mod 37), a contradiction. 5