Putnam Training Exercise Number Theory and Congruences (Answers) October 10th, 2015 1. Can the sum of the digits of a square be (a) 3, (b) 1977? - Answer: (a) No, a square divisible by 3 is also divisible by 9. (b) Same argument. 2. Show that if a2 + b2 = c2 , then 3|ab. - Answer: For any integer n we have that n2 only can be 0 or 1 mod 3. So if 3 does not divide a or b they must be 1 mod 3, and their sum will be 2 modulo 3, which cannot be a square. 3. Prove that the fraction (n3 + 2n)/(n4 + 3n2 + 1) is in lowest terms for every possible integer n. - Answer: That is equivalent to proving that n3 + 2n and n4 + 3n2 + 1 are relatively prime for every n. There are two possible ways to show it: - Assume a prime p divides n3 + 2n = n(n2 + 2). Then it must divide n or n2 + 2. Writing n4 + 3n2 + 1 = n2 (n2 + 3) + 1 = (n2 + 1)(n2 + 2) − 1 we see that p cannot divide n4 + 3n2 + 1 in either case. - The following identity (n2 + 1)(n4 + 3n2 + 1) − (n3 + 2n)2 = 1 (which can be checked algebraically) shows that any common factor of n4 + 3n2 + 1 and n3 + 2n should divide 1, so their gcd is always 1. (Note: if you are wondering how I arrived to that identity, I just used the Euclidean algorithm on the two given polynomials.) 4. Prove that there are infinitely many prime numbers of the form 4n + 3. - Answer: Assume that the set of primes of the form 4n + 3 is finite. Let P be their product. Consider the number N = P 2 − 2. Note that the square of an odd number is of the form 4n + 1, hence P 2 is of the form 4n + 1 and N will be of the form 4n + 3. Now, if all prime factors of N where of the form 4n + 1, N would be of the form 4n + 1, so N must have some prime factor p of the form 4n + 3. So it must be one of the primes in the product P , hence p divides N − P 2 = 2, which is impossible. 5. Show that there exist 2015 consecutive numbers, each of which is divisible by the cube of some integer greater than 1. - Answer: Pick 2015 different prime numbers p1 , p2 , . . . , p2015 (we can do that because the set of prime numbers is infinite) and solve the following system of 2015 congruences: 0 (mod p31 ) x ≡ −1 (mod p32 ) x ≡ x ≡ −2 (mod p33 ) ... x ≡ −2014 (mod p32015 ) According to the Chinese Remainder Theorem, that system of congruences has a solution x (modulo M = p31 . . . p32015 ). For k = 1, . . . , 2015 we have that x + k ≡ 0 (mod p3k ), hence x + k is in fact a multiple of p3k . 6. (USAMO, 1979) Find all non-negative integral solutions (n1 , n2 , . . . , n14 ) to n41 + n42 + · · · + n414 = 1599 . - Answer: We look at the equation modulo 16. First we notice that n4 ≡ 0 or 1 (mod 16) depending on whether n is even or odd. On the other hand 1599 ≡ 15 (mod 16). So the equation can be satisfied only if the number of odd terms in the LHS is 15 modulo 16, but that is impossible because there are only 14 terms in the LHS. Hence the equation has no solution. 7. Let f (n) denote the sum of the digits of n. Let N = 44444444 . Find f (f (f (N ))). - Answer: Since each digit cannot be greater than 9, we have that f (n) ≤ 9 · (1 + log10 n), so in particular f (N ) ≤ 9 · (1 + 4444 · log10 4444) < 9 · (1 + 4444 · 4) = 159993. Next we have f (f (N )) ≤ 9 · 6 = 54. Finally among numbers not greater than 54, the one with the greatest sum of the digits is 49, hence f (f (f (N ))) ≤ 4 + 9 = 13. Next we use that n ≡ f (n) (mod 9). Since 4444 ≡ 7 (mod 9), then 44444444 ≡ 74444 (mod 9) . We notice that the sequence 7n mod 9 for n = 0, 1, 2, . . . is 1, 7, 4, 1, 7, 4, . . . , with period 3. Since 4444 ≡ 1 (mod 3), we have 74444 ≡ 71 (mod 9), hence f (f (f (N ))) ≡ 7 (mod 9). The only positive integer not greater than 13 that is congruent with 7 modulo 9 is 7, hence f (f (f (N ))) = 7. 8. Do there exist 2 irrational numbers a and b greater than 1 such that bam c = 6 bbn c for every positive integers m, n? √ √ - Answer: The answer is affirmative. Let a = 6 and b = 3. Assume bam c = bbn c = k for some positive integers m, n. Then, k 2 ≤ 6m < (k + 1)2 = k 2 + 2k + 1, and k 2 ≤ 3n < (k + 1)2 = k 2 + 2k + 1. Hence, subtracting the inequalities and taking into account that n > m: 2k ≥ |6m − 3n | = 3m |2m − 3n−m | ≥ 3m . m 9m ≤ k 2 ≤ 6m , which implies 41 ≤ 23 . This holds only for m = 1, 2, 3. This Hence 4 values of m can be ruled out by checking the values of ba2 c = 6, bac = 2, ba3 c = 14, bbc = 1, bb2 c = 3, bb3 c = 5, bb4 c = 9, Hence, bam c = 6 bbn c for every positive integers m, n. bb5 c = 15 . 9. Prove that there are no primes in the following infinite sequence of numbers: 1001, 1001001, 1001001001, 1001001001001, . . . - Answer: Each of the given numbers can be written 1 + 1000 + 10002 + · · · + 1000n = pn (103 ) where pn (x) = 1 + x + x2 + · · · + xn , n = 1, 2, 3, . . . . We have (x − 1)pn (x) = xn+1 − 1. If we set x = 103 , we get: 999 · pn (103 ) = 103(n+1) − 1 = (10n+1 − 1)(102(n+1) + 10n+1 + 1) . If pn (103 ) were prime it should divide one of the factors on the RHS. It cannot divide 10n+1 − 1, because this factor is less than pn (103 ), so pn (103 ) must divide the other factor. Hence 10n+1 − 1 must divide 999, but this is impossible for n > 2. In only remains to check the cases n = 1 and n = 2. But 1001 = 7 · 11 · 13, and 1001001 = 3 · 333667, so they are not prime either. 10. The digital root of a number is the (single digit) value obtained by repeatedly adding the (base 10) digits of the number, then the digits of the sum, and so on until obtaining a single digit—e.g. the digital root of 65,536 is 7, because 6 + 5 + 5 + 3 + 6 = 25 and 2 + 5 = 7. Consider the sequence an = integer part of 10n π, i.e., a1 = 31 , a2 = 314 , a3 = 3141 , a4 = 31415 , a5 = 314159 , and let bn be the sequence b 1 = a1 , b2 = Find the digital root of b106 . aa12 a a 4 a , b3 = a 3 a1 2 , b4 = a 3 a1 2 , ... ... - Answer: In spite of its apparent complexity this problem is very easy, because the digital root of bn becomes a constant very quickly. First note that the digital root of a number a is just the reminder r of a modulo 9, and the digital root of an will be the remainder of rn modulo 9. For a1 = 31 we have digital root of a1 = digital root of 31 = 4 ; digital root of a21 = digital root of 42 = 7; digital root of a31 = digital root of 43 = 1; digital root of a41 = digital root of 44 = 4; and from here on it repeats with period 3, so the digital root of an1 is 1, 4, and 7 for remainder modulo 3 of n equal to 0, 1, and 2 respectively. Next, we have a2 = 314 ≡ 2 (mod 3), a22 ≡ 22 ≡ 1 (mod 3), a32 ≡ 23 ≡ 2 (mod 3), and repeating with period 2, so the reminder of an2 depends only on the parity of n, with an2 ≡ 1 (mod 3) if n is even, and an2 ≡ 2 (mod 3) if n is odd. And we are done because a3 is odd, and the exponent of a2 in the power tower defining bn for every n ≥ 3 is odd, so the reminder modulo 3 of the exponent of a1 will be 2, and the reminder modulo 9 of bn will be 7 for every n ≥ 3. Hence, the answer is 7. 11. Prove that if n is an integer greater than 1, then n does not divide 2n − 1. - Answer: By contradiction. Assume n divides 2n − 1 (note that this implies that n is odd). Let p be the smallest prime divisor of n, and let n = pk m, where p does not divide m. Since n is odd we have that p 6= 2. By Fermat’s Little Theorem we k−1 have 2p−1 ≡ 1 (mod p). Also by Fermat’s Little Theorem, (2mp )p−1 ≡ 1 (mod p), k k−1 k−1 k−1 hence 2n = 2p m = (2p m )p−1 · 2p m ≡ 2p m (mod p). Repeating the argument k k−1 k−2 we get 2n = 2p m ≡ 2p m ≡ 2p m ≡ · · · ≡ 2m (mod p). Since by hypothesis 2n ≡ 1 (mod p), we have that 2m ≡ 1 (mod p). Next we use that if 2a ≡ 1 (mod p), and 2b ≡ 1 (mod p), then 2gcd(a,b) ≡ 1 (mod p). If g = gcd(n, p − 1), then we must have 2g ≡ 1 (mod p). But since p is the smallest prime divisor of n, and all prime divisors of p − 1 are less than p, we have that n and p do not have common prime divisors, so g = 1, and consequently 2g = 2, contradicting 2g ≡ 1 (mod p). 12. (Putnam 2001, B-1) Let n be an even positive integer. Write the numbers 1, 2, . . . , n2 in the squares of an n × n grid so that the kth row, from right to left is (k − 1)n + 1, (k − 1)n + 2, . . . , (k − 1)n + n . Color the squares of the grid so that half the squares in each row and in each column are read and the other half are black (a chalkboard coloring is one possibility). Prove that for each such coloring, the sum of the numbers on the red squares is equal to the sum of the numbers in the black squares. - Answer: Let R (resp. B) denote the set of red (resp. black) squares in such a coloring, and for s ∈ R ∪ B, let f (s)n + g(s) + 1 denote the number written in square s, where 0 ≤ f (s), g(s) ≤ n − 1. Then it is clear that the value of f (s) depends only on the row of s, while the value of g(s) depends only on the column of s. Since every row contains exactly n/2 elements of R and n/2 elements of B, X X f (s) = f (s). s∈R s∈B Similarly, because every column contains exactly n/2 elements of R and n/2 elements of B, X X g(s) = g(s). s∈R s∈B It follows that X s∈R as desired. f (s)n + g(s) + 1 = X s∈B f (s)n + g(s) + 1,
© Copyright 2026 Paperzz