Problem Solvng n Math (Math 43900) Fall 2013 Week four (September 17) solutons Instructor: Davd Galvn 1. Let a and b be two nteger for whch a b s dvsble by 3. Prove that a 3 b 3 s dvsble by 9. Soluton: a 3 b 3 = (a b)(a 2 + ab + b 2 ). Snce a b s known to be dvsble by 3, we just need to show that a 2 + ab + b 2 s too, for the product to be dvsble by 3 3 = 9. We know a b (mod 3), so (usng the basc facts) a 2 + ab + b 2 a 2 + a 2 + a 2 3a 2 0 (mod 3); so ndeed a 2 + ab + b 2 s dvsble by 3. Source: Northwestern Putnam preparaton. 2. Fnd all ntegers n such that 2 n + n 8 n n + n. Soluton: It seems lke, f 2 n + n 8 n n + n, then the quotent should be somethng lke n4 n, so lets hypothesze that t s n4 n +k for some nteger k. The equaton (2 n +n)(n4 n +k) = n8 n +n reduces to k2 n + n 2 4 n + nk = n. If k = 0 ths becomes n 2 4 n = n or n4 n = 1. Ths holds for no n. If k > 0, then k2 n + n 2 4 n + nk > n, so the equalty holds for no n. If k < 0, say k = l for l > 0, then the equalty becomes n 2 4 n = (l + 1)n + l2 n. For ths to hold, we probably need l n 2 2 n, so try l = n 2 2 n + m for nteger m. The equalty becomes n 3 2 n + mn + n + m2 n = 0. Ths can t hold for m = 0 or m > 0, so consder m = k < 0. We reduce to n 3 2 n + n = k(2 n + 1). The soluton to ths s probably of the form k = n 3 + r. Substtutng ths n leads to n = n 3 + r(2 n + 1). If r = 0, the only possble soluton s n = 1. If r > 0, there s no possble soluton. If r = s wth s > 0, then the equaton becomes s(2 n + 1) = n 3 n. It s easy to check that 5(2 n + 1) > n 3 n for all n 1, so we need only consder s 4, for whch t s easy to check that there are no soluton. 1
So: the only possblty s n = 1, whch does n fact work, so ths s the unque soluton. Source: I took ths from Northwestern s Putnam preparaton, where the orgnal queston was to fnd all n for whch 2 n + n 8 n + n; usng the same strategy ths can be solved rather more quckly than the one I (accdently!) wrote. 3. Let x, y and z be ntegers wth the property that 1 x 1 y = 1 z. Prove that both gcd(x, y, z)xyz and gcd(x, y, z)(y x) are both perfect squares. Soluton: If we replace x, y and z wth x/gcd(x, y, z), y/gcd(x, y, z) and z/gcd(x, y, z) then nether the defnng relaton, nor the perfect-squareness or otherwse of the targets change, so we mght as well assume that gcd(x, y, z) = 1. So our frst task s to show that f x, y and z have no factor n common to all three (other than 1), and 1/x 1/y = 1/z, then xyz s a square. We can get xyz out of the defnng relaton by multplyng through by x 2 yz to get xyz = x 2 z + x y = x 2 (y + z) so ts enough to show y +z a square. If not, there s some prme p wth p 2a+1 (y +z), and wth p 2a+2 (y + z). Usng xyz = x 2 (y + z) we get that p 2a+1 xyz. But we can t have p x (we re assumng gcd(x, y, z) = 1), so p 2a+1 yz. By PHP, we must have ether p a+1 y or p a+1 z. If the former, then from p 2a+1 (y + z) we get p a+1 (y + z) and so p a+1 z, and f the latter for the same reason we get p a+1 y. So ether way, we have both p a+1 y and p a+1 z, so p 2a+2 yz, so p 2a+2 (y + z), a contradcton. So y + z s a square as requred. Our second task s to show that f x, y and z have no factor n common to all three (other than 1), and 1/x 1/y = 1/z, then y z s a square. We can get y x out of the defnng relaton as follows: multply through by xyz to get whch s equvalent to yz = xz + xy (y x)(z x) = x 2. Suppose p (y x). Then p x 2 and so p x. Snce p (y x) we also have p y. Snce we are assumng gcd(x, y, z) = 1 we therefore cannot have p z, and so, snce p x, we cannot have p (z x). It follows that gcd(y x, z x) = 1. How can t be that the product of two numbers s a perfect square (x 2 n ths case), and the two numbers are co-prme? By lookng at the prme factorzaton, we see that t can happen only f both of the numbers are perfect squares. So y x s a square, as requred. Source: Northwestern Putnam preparaton. 2
4. Let n > 1 be an nteger and p a prme such that n (p 1) and p (n 3 1). Prove that 4p 3 s a perfect square. Soluton: We have p (n 1)(n 2 + n + 1) so ether p (n 1) or p (n 2 + n + 1). The frst s mpossble (t mples p n 1, but n (p 1) says n p 1 so p n + 1). So we have p (n 2 + n + 1). By n (p 1) we have kn = p 1 for some k 1, and by p (n 2 + n + 1) we have lp = n 2 + n + 1 for some l 1. From the frst, we have lp = lkn + l, and so lkn + l = n 2 + n + 1 or n 2 + (1 lk)n + (1 l) = 0. The solutons to ths quadratc must be ntegers, so the dscrmnant must be a perfect square,.e., (1 lk) 2 4(1 l) = x 2 for some nteger x. One possblty s l = 1 (the left-hand sde above becomes (1 k) 2, certanly a square). But l = 1 says p = n 2 + n + 1, so 4p 3 = 4n 3 + 4n + 1 = (2n + 1) 2, a perfect square. If l > 1 then rewrtng the above as (lk 1) 2 + 4(l 1) = x 2, we see that 4(l 1) 2(lk 1) + 1 (why? (lk 1) 2 s a perfect square, and when we add 4(l 1) we get a larger perfect square; the frst perfect square after (lk 1) 2 s (lk) 2, whch dffers from (lk 1) 2 by 2(lk 1) + 1, so we need to add at least ths much). 4(l 1) 2(lk 1) + 1 mples k = 1 (f k 2 then 2(lk 1) 4l 2 > 4(l 1)). But k = 1 says p = n + 1, so n + 1 (n 2 + n + 1), so n + 1 n 2, mpossble for n > 0 (why n + 1 n 2 1, so f n + 1 n 2 then n + 1 1). Source: Northwestern Putnam preparaton. 5. Show that the sum of consecutve prmes s never twce a prme. Soluton: Suppose p < q are consecutve prmes, wth p + q = 2r where r s prme. Then r = (p + q)/2 satsfes p < r < q, a contradcton snce there are no prmes between p and q. Source: Stanford Putnam preparaton. 6. Prove that 2 70 + 3 70 s dvsble by 13. Soluton: (Dan s quck soluton) 2 2 3 2 (mod 13); rasng both sdes to the power 35, get 2 70 3 70 (mod 13), and we are done! (My laborous soluton): By Fermat (or easy multplcaton!) we have 2 12 1 (mod 13), so 2 60 1 (mod 13). By easy multplcaton, 2 10 10 (mod 13), so 2 70 10 (mod 13). By Fermat (or easy multplcaton) we have 3 12 1 (mod 13), so 3 60 1 (mod 13). By easy multplcaton, 3 10 3 (mod 13), so 3 70 3 (mod 13). Combnng, 2 70 + 3 70 13 0 (mod 13), as requred. Source: Stanford Putnam preparaton. 3
7. Defne f(n) by f(1) = 7 and f(n) = 7 f(n 1) for n > 1. Fnd the last two dgts of f(7). (Note that f(7) s an exponental tower of 7 s, 7 hgh.) Soluton: Notce that 7 4 = 2401 1 (mod 100). So really all we need to do s to fnd the remander, on dvson by 4, of a tower of sx sevens. Now 7 1 (mod 4), and a tower of fve 7 s s odd, so f(6) ( 1) 2k+1 1 3 (mod 4) (here 2k + 1 = f(5); we don t need to know ts value, just that t s odd). So f(6) = 4m + 3 for some m, and f(7) = 7 f(6) = 7 4m+3 7 3 (7 4 ) m 43 (mod 100). The last two dgts are 43. Source: Stanford Putnam preparaton. 8. Several postve ntegers are wrtten on a chalk board. One can choose two of them, erase them, and replace them wth ther greatest common dvsor and least common multple. Prove that eventually the numbers on the board do not change. Soluton: (Thanh s quck soluton) If you pck two numbers a, b wth a b or b a, then snce gcd(a, b) = mn{a, b} and lcm(a, b) = max{a, b} n ths case, the numbers do not change. In general gcd(a, b) lcm(a, b), so f t s not the case that a b or b a, then after the swap t s the case for that partcular par. Intally there are only fntely many pars (a, b) wth a b and b a; ether eventually we replace all these pars wth pars of whch one dvdes to other (n whch case we are done), or we eventually commt to avodng all remanng such pars (n whch case we are done). (My laborous soluton) When we take a par of numbers (a, b), and replace them wth (gcd(a, b), lcm(a, b)), we preserve somethng, namely the product of the par of numbers (that ab = gcd(a, b)lcm(a, b) s easly seen from the prme factorzaton of a and b: f a = p a, b = n p b (wth maybe some of the a, b zero) then so gcd(a, b) = ab = p a +b, p mn{a,b }, lcm(a, b) = gcd(a, b)lcm(a, b) = p max{a,b }, p mn{a,b }+max{a,b }. Thus ab = gcd(a, b)lcm(a, b) follows from x+y = mn{x, y}+max{x, y}, vald for any postve ntegers x, y.) For any fxed postve number, there are only fntely many ways to wrte t as the product of a fxed number of postve numbers (f the target of the product s N, and we are usng d numbers, then each of the d numbers must be a dvsor of N, so the number of ways of 4
wrtng N as a product of d terms s at most a(n) d, where a(n) s the number of dvsors of N). Ths shows that there are only fntely many possbltes for the numbers wrtten on the board. Consder the sum of the numbers. How does ths change wth the swap operaton? It depends on how a + b compares to gcd(a, b) + lcm(a, b). Expermentaton suggests that gcd(a, b) + lcm(a, b) a + b, wth equalty ff the par (a, b) concdes (n some order) wth the par (lcm(a, b), gcd(a, b)). To prove ths, frst consder a = b, for whch the result s trval. For all other cases, assume wthout loss of generalty that a > b. We have lcm(a, b) a > b gcd(a, b). If any one of a = lcm(a, b), b = gcd(a, b) holds then by the conservaton of product the other must too, and the result we are tryng to prove s true. So now we may assume lcm(a, b) > a > b > gcd(a, b), and what we want to show s that ths mples gcd(a, b) + lcm(a, b) > a + b. Let n = ab = gcd(a, b)lcm(a, b), so gcd(a, b) + lcm(a, b) = gcd(a, b) + n gcd(a, b) and a + b = b + n b. A lttle calculus shows that the functon f(x) = x + n/x s decreasng on the nterval (0, n]. Snce gcd(a, b) < b < n, ths shows that gcd(a, b) + whch s exactly what we want to show. n gcd(a, b) > b + n b So, suppose we have the bunch of numbers n front of us, and we perform the swap operaton nfntely often. All swaps preserve the product. Some swaps also preserve the sum; these swaps are exactly the swaps that don t change the set of numbers. All other swaps ncrease the sum. We can only ncrease the sum fntely many tmes (there are only fntely many dfferent confguratons of numbers). Therefore there must be some pont (curously, not boundable as a functon of the orgnal numbers!) after whch we make no more sum-ncreasng swaps; from that pont on, the numbers reman unchanged. Source: Stanford Putnam preparaton. 9. How many prmes numbers have the followng (decmal) form: dgts alternatng between 1s and 0s, begnnng and endng wth 1? Soluton: The number x n = 1010... 101, wth n 0 s, can be wrtten as 1 + 100 + 1000 + 1000000 +... + 1000... 000 = 1 + (100) + (100) 2 +... + (100) n, n other words, x n = P n (100) where P n (x) s the polynomal 1 + x + x 2 +... + x n. We want to know for whch n the polynomal P n (x) s prme for x = 100. For n = 0, t s not (P 0 (100) = 1), and for n = 1 t s (P 1 (100) = 101). So we assume n 2. 5
Snce (x 1)(1 + x + x 2 +... + x n ) = (x n+1 1), we have 99P n (100) = 100 n+1 1 = 10 2(n+1) 1 = ( 10 n+1) 2 1 = ( 10 n+1 1 ) ( 10 n+1 + 1 ). What happens f P n (100) s prme? It must dvde one of 10 n+1 1, 10 n+1 +1. But, for n 2, P n (100) = 1 + (100) + (100) 2 +... + (100) n > 1 + 10 2n > 1 + 10 n+1, so P n (100) s too bg to dvde ether 10 n+1 + 1 or 10 n+1 1. Hence for n 2, P n (100) can t be prme. The concluson s that the only prme of the gven form s 101. Source: NYU Putnam preparaton. 10. Take a walk on the number lne, startng at 0, by on the frst step takng a step of length one, ether rght or left, on the second step takng a step of length two, ether rght or left, and n general on the kth step takng a step of length k, ether rght or left. (a) Prove that for each nteger m, there s a walk that vsts (has a step endng at) m. Soluton: We can easly get to the number m = n(n + 1)/2, for any nteger n: just do 1+2+3+...+n. What about a number of the form n(n+1)/2 k, where 1 k n 1? For k even we can get to ths by flppng the + to a n front of k/2. For k odd we can get to ths by frst addng n + 1 to the end, then subtractng n 2 (net effect: 1), then flppng the + to a n front of (k 1)/2. Thus we can reach every number n the nterval [n(n + 1)/2 (n 1), n(n + 1)/2]. Usng 1 + 2 + 3 +... + n = n(n + 1)/2 we can easly check that the unon of these dsjont ntervals, as n ncreases from 1, covers the postve ntegers. To get to a negatve nteger m, just reverse the sgns on any scheme that gets to m. Another way to get to n > 0: do n = ( 1 + 2) + ( 3 + 4) +... + ( (2n 1) + 2n). (b) Lt f(m) denote the shortest number of steps needed to reach m. Show that exsts, and fnd the value of the lmt. f(m) lm m m Soluton: Our second soluton to part 1 shows f(n) 2n, but to solve part 2 we need to do better. Our frst soluton to part 1 shows that f m [n(n+1)/2 (n 1), n(n+1)/2] then f(m) n + 2. But t s also easy to see that n that nterval, f(m) n, snce the largest number that can be reached n n 1 step s 1 + 2 +... + (n 1) = n(n + 1)/2 n. For m [n(n + 1)/2 (n 1), n(n + 1)/2], we have (n 1)/ 2 m (n + 1)/ 2, and so n 2 n + 1 f(m) 2 n + 2 m n 1. Notce that n here s a functon of m, and that as m we have n also. So the sequence f(m)/ m s sandwched between two postve sequences both of whch go to 2 as m. By the squeeze theorem, exsts and equals 2. f(m) lm m m 6
Source: From A Mathematcal Orchard, Problems and Solutons by Krusemeyer, Glbert and Larson. 7