0% found this document useful (0 votes)
207 views238 pages

1001 Problems in Classical Number Theory (Solutions) PDF

Uploaded by

Kristine Henson
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
207 views238 pages

1001 Problems in Classical Number Theory (Solutions) PDF

Uploaded by

Kristine Henson
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 238
Part 3 Solutions Solutions (1) (a) In =1, the result is true. Assume that the result is true for 7 and Tet us prove ie for n +1 Since _ (m4 int) — Lethon (net) = MD 4G nth) the result follows. (b) If = 1, the result is true. Assume that the result is true for n and let us prove it for n +1. Since n(n+DQn+1) 6 PHP pec tntt (nt? +(n+1)? (n+ D(r+2)2n+3) 6 the result follows. (c) lfm =1, the result is true. Assume that the result is true for n and. let us prove it for n +1. Since 2 PHD Heeb (nt 1) een (n(n +2)? 7 the result follows, (2) We only need to observe that nS = (9428 $e $n8) (18 $2 4-4 (n= 1/5) n(n+1))?_ ((n=3)n)* 3 2) where we used the identity of Problem 1 (c). | 1(3__2n+1 (2) Th gen exrnin cane wren se (2 = 22) or nh po tive integer. (4) By using the formula of Problem 1 (a), we obtain Dede b n= AEE tm) = 2 MED oon 4 2) (5) Since SP, "21), it is enough to check that (ays? = (cayenne) «®) yo P= (Ip We use induction, First of all, (+) is true for n = 1. Assume that (+) is true for n = i; we will show that this implies that it is true for n = k-+ J, ot 1001 PROBLEMS IN CLASSICAL NUMBER THEORY Indeed, this implies successively ka Yay? Dey? + (ye + 1)? (E+ 1) = ys comet? = cot (wont ABE2) _ yer (K+ DR +2) (-1) al . as required. (6) This result can be proved by induction by observing that 2M BRET gant 4 Q2gan—}_ gaypn-l pant = aha?) PH) — BPMN @? (7) This result can be proved by induction by observing that aint pint ined gin 4 thin — pint ala” — 8") 4 6%(a —b9). (8) This result can be proved using induction by observing that ahh gmt ght — ath yah 8" — a"(a—b) +-H(a" —B). (9) We use induction as well as the relation ne das (10) Multiplying the given inequality (2n)! < 2®"(n!)? by the trivial inequality (2n-+i) < 2(n+1)?, then using induetion, one easily proves the inequality (11) Multiplying the relation (n + 1)/n® < (n+ 1) (valid for n > 3) by the Yat H+ns ye given inequality n? < nl allows one to use induction and thereby obtain the result. (12) This follows from (14 = (140) +0) > (Lt nOL +0) = 10+ nO + nd >it (n+16. REMARK: This inequality is often called the Bernoulli inequality, being attributed to Jacques Bernoulli (1654-1705), (13) By using the induction hypothesis and by observing that (tat =H iL +or > 1 +e(r nos ME Doe, Dit (nd tyes CNM g the result follows, SOLUTIONS 105 (14) We prove this result by induction, For n = 1, the result is true. Assume that it is true for n and let us prove it for n +1. Since 1 (n? +3n?43n +14 2n +2) Z((m+8 +240) (r +2n) +n? +n $1 is an integer because of the induction hypothesis, the result follows. (15) Let f(m) = 10" +3.4"? +5, Since f(0) = 54 is divisible by 9 and since f(n+1)— fin) 9 for each integer n> 0, = 10" +4? is an integer, the result follows, (16) The first equation is equivalent (after simplification) to | nok Re which in turn is equivalent to n = 2k +1, as was to be shown, (17) (a) By adding the relations aeons nS (%) anton = S-0(), we obtain » Eu+en5(7) =255(%), which yields the result (b) This follows essentially from part (a) and the fact that S72", (%t) = an (18) Comparing the geometric mean with the arithmetic mean, we obtain Lb24e tn nlnti) _ mtd nn 2° so that the result follows by raising each side to the power n. (19) (Gelfand [13]) For n = 8 the result is true. Assume that k can be written asa sum of 3's and 5's. Then, this sum contains one 5 (possibly many) or none at all. In the first case, we replace 2 5 by two 3's, The new number k-+1 then contains 3's or 5's. In the second case, there is at least three 3's, and we can replace them by two 5's. The new number k +1 then contains 3's or 5's. This proves the result, (20) Let P, be the following proposition: the number of lines thus created by n points for which no combination of three of these points are on a straight line is n(n — 1)/2. Since two points determine a straight line and since 2(2—1)/2 = 1, Ph is true. Assume now that Py is true for an integer n> 2. If'a new point is added to the collection of n points in such a way that it cannot be on a straight line created by two of the points, then m additional lines will thus be added and the new collection of n+ 1 points will determine n(n — 1)/2-+n = 2% tines. ‘The result then follows by induction. (nyins 1001 PROBLEMS IN CLASSICAL NUMBER THEORY (21) The proofs done by induction, If 1a 1 tetas tove BT then, since VE+1~ Vk < 1/VE+1, the sum of these two inequalities gives the result (22) Let Roxy := 494594 + Ok), In light of Problem 1 (c), we know that 2k — 1, this last sum can be written as (B 439 4-4 (2k— 19) + (+8 +--+ (2k -2)9) = (843% 4-4 (2k = 1)9) +29 (19 4.29 439 +--+ (R19) = Ran + PS Te follows that Rac = Snr 25a = (FPO) 5 ( nt) (2k — 1)? — 242(k — 1)? = k7(2k? ~ 1), as was to be shown, (23) Using the Binomial Theorem, we have (nth 1 = (me 1h =n) + (nt — (wht) + + (ott = 1H) (24) (25) (26) soLUTIONS sor ‘Therefore, if S,(n) is polynomial of degree +1 for each positive integer 1 B “~e (5-641) (m=2)n_ (w—1)n 41) _n+1 # @-1F oP 2m Let Sy be the given sum. Since P4241 = (7 41)- and since RL sce mf @+i¢@-i+1) —— (x — Fis pis) 22-751 BFiFT)’ we have Sn = = 3(1 zarpri): and the result follows We will show that the choice (m,n,r) = (2,3,7), for which $ = 41/42, maximizes the sum $ in the sense that for any other choice (m,n, 7), with S'<1, we must have § < 45, So let us consider such a triple (m,,7). Without any loss in generality, we may assume that 2 3, then selilto il Spt3tan nse Hence, m= 2. Let us now show that n= 3. If n > 4, we have 1.1 19 41 Se ee Ssotats7m<@ Hence, n = 3. It remains to show that r = 7. Two situations need to be considered: 3 8. In the first case, we have 1iisijit pee 273tenh 108 (28) (29) 1001 PROBLEMS IN CLASSICAL NUMBER THEORY ‘a contradiction. In the second case, we have 3 AL Sahatetetyty atstpSptate aa ‘We my therfore conclae that r=, thus completing the root ‘The problemi equivalent tothe combinatorial problem which consist in distributing k balls in ¢ urns with the restriction that there must be at least ne ball in the fs ura We shal call upon the combinatorial theorem ‘according to which there are (f=?) distinct vectors with (positive) integer contponents satisfying the relation ata t teak, We then place the fist ballin the first um and distribute the k — 1 remaining balls inthe €urat. The above result then yee = (bte=2 atom (7457), os required We prove the first formula; the proof of the second formula is similar First of all, it is true fot n = 1. Assume that it is true for each odd number n < k, k odd. Since Peat et aant eceeae = (4) ea the result will follow if we manage to show that +2 kd (' . ) +02) -( ; ) or similarly that ka) (k+2) os (3°)- (63?) =a +27 But this relation is true, since (epey _ kta (k+2) 3 3 BR + I! 3k (k+2! ((K+HE+A) ~ aoe ( ke +1) (42)! (6+ 12) a= REN) = ais +12) = (k+2)?, which completes the proof (CRUX, 1978). Since the sum ofthe elements of any subset cannot exceed 90 +91 +--+ 09 = 945, the sum of the elements of the subsets of § can be found amongst the numbers 1,2,...,945. Since the et $ contains 10 elements, we ean form 20 —1 = 1023 nonempty diffrent subsets. The Pigeonhole Principle then aliows us to conclude that there exist (atleast) two subsets having the same sum. By removing the elements which are common t0 these two subsets, we obtain two disjoint subsete with the same sum. (30 SOLUTIONS 100 }) There are exactly 50 possible remainders when we divide the numbers by 50, and these remainders are the numbers: 0,1,2,..., 49. Since we have 51 integers and only 50 possible remainders, it follows that using the Pigeonhole Principle, there are at least two numbers amongst these 51 integers having the same remainder. Then, the difference of these two integers has 0 as a remainder and is therefore divisible by 50. (31) For each n-th day of the year, let a, be the total number of solved prob- lems between the first day and the n-th day inclusively. Then a,42,... is a strictly increasing sequence of positive integers. Consider another sequence by, 2,.-. obtained by adding 20 to each element of the preced- ing sequence, that is by = an +20, 1 = 1,2,.... ‘The by’s are strictly. increasing and aro also all distinct, But for a period of eight consecutive weeks (one needs to consider at least seven consecutive weeks) during the year, the student cannot solve more than 11-8 = 88 problems. Then, the numbers ay are located between 1 and 88 inclusively, while the by’s are detween 21 and 108 inclusively. Since there are 56 days in eight weeks, the concatenation of the two sequences gives 4,025.56; 01 + 20,02 +20,.--4056 +20, which yields a total of 112 distinct integers all located between 1 and 108 inclusively. By the Pigeonhole Principle, at least two elements of the concatenated sequence must be equal. One of the two must be in the first half of the sequence and the other in the second part. Let a; and ax +20 be these two integers. We then have aj — aj = 20, which implies that the student must solve exactly 20 problems between the (j + 1)-th day and the k-th day of the year, (82) Divide the surface of the table into squares of 3 inches by 3 inches. We then have a total of 2000 squares. The diagonal of each of these squares is Vii inches long, that is approximately 425 inches. ‘Therefore, a cylindri- Cal glass of diameter 5 inches will cover entirely any given square. Hence, if we place seven marbles in each square, there will be a total of 14000 marbles on the table. Hence, by the Pigeonhole Principe, since we have ‘total of 14001 marbles, one of these wil contain atleast eight marbles (33) We easily see that the number 1 of secants thus drawn is given by Ny = (3). Let No be the number of points of intersection of these secants. For any group of points taken four by four, there is exactly two secants joining ‘the points that intersect inside the circle, so that V2 = () We are then ready to count the number of regions in terms of n. At each drawn secant, the circle is divided into an additional region. At each intersection point, the circle is divided into an additional region. ‘The solution is therefore given by Lemons (S)o(Q) en ‘which can also be written in the polynomial form n*/24—n5/4+23n/24— nee een (84) Let f(n) be the number of required moves, that is the number of moves that are necessary to succeed in transferring a tower of n disks. It is easy to see that we must no 1001 PROBLEMS IN CLASSICAL NUMBER THEORY (a) first move the n—1 disks from the top of the first post to the second post (using in the process the third post): (0) then move the largest disk to the third post; (c) and finally move the n ~ 1 disks from the second post to the third (using if need be the first post). We then obtain, by setting /(0) = 0 and /(1) J(n) =2f(n- +1 (nD). We observe that /(2) 1 J(3) =7,--- and we then conjecture that Sho) =2"=1, a result which can easily be proved by induction (85) Let NV be an arbitrary positive integer. Let F), be such that Fi, 5 is of the form 4r +1, 4r-+2, 4r-+3 or dr +4, with r > 1, and we can establish that 1+ (9 ((29? - (28+ 1%), art = ae = PP Sart y?— e+), ar +3 APE Naty? era"), feet = sate Banas. (87) We construct a procedure, using MAPLE software (here, we have used version 5), which gives the positive integers n < NV such that (Inn) # 2. > kurepa:=proc(N) > local n; > for n from 1 to N do > if ged(sum(k!,k-0. -n-1) ator > then print(‘ n‘=n) else fijod; end: > kurepa(i000) ; (38) Assume that the integers a and are increased by n. Then we have a+n= (b+ n)652 + 8634 — 651n. Since the remainder must be positive, it follows that 651n < 8634, that is, n< 18.26. Hence, n= 13, REMARK: More generally, with a = by +r instead of (#), the quantity Na1t 2g 24 ge por ‘Therefore, NE pam pao ta) a BH (M2 EDS 4 KOEI) ET DBL 4 2 eg OMT ont a rr 1001 PROBLEMS IN CLASSICAL NUMBER THEORY an expression which can be written as follows in basis 2: U1.-1190...001. (40) Let. = 77 + 13°7 +1997. We will show that 3|N and that 13], Indeed, N= (+1) +(12+1)" + (18-41) =3A+3 for a certai integer A, while N= (13-6) + 13° + (13 +6)" = 13"B + (—6)"" +6" = 13°78 for a certain integer B. Since (3,13) = 1, it follows that 391N. REMARK: This result remains true when the integer 37 is replaced by an arbitrary odd positive integer. Moreover, note that by using congruences, the proof is almost immediate. (41) We first observe that 49= 4841, 2352=77-48 and 2304 = 487, ‘We therefore need to show that @ 483|49" — 49-48-m In fact, we will show the more general result (2) (a—1)*Ja" — a(a—1)n— First of all, we observe that a" —a(a-iyn=1 = (a"=1)-aa—1)n (a-1)(a""" 4a"? ++ +a41)— alan (0-1) (0%! 4a"? +s bat 1 —an) u Since the expression a"! + a-2..+.4a+1—an vanishes when a= 1 and is divisible by a— 1, we have a” ~a(a=1)n—1 = (0-1)? for a certain positive integer N,, which establishes (2) and therefore (1) (42) Let n be an arbitrary positive integer and let N= n4+2n? +2n?-+-2n +1 It is clear that N= (n-+1)'— (2n8 + 4n? +2n) = (n+1)8— 2n(n-+1)? = (n+ 1)%(n? + D). Therefore, if N is a perfect square, there exists a positive integer a such that (n+ 1)%(n? + 1) = a2, in which case there exists another integer 6 such that n? 41 = 62, Since two perfect squares cannot be consecutive, the result is proved. (48) We write N = 10a-+6 where 0 2. Then 10101 = 1-68 40-67 41-7 +0-b4 1-0 = +b +1 (F +b+1)H-b+1), 1 product of two integers larger than 1 (49) The produet of four consecutive integers is Ne=n(nt int 2(n+3). Since a member of the product is divisible by 4 and another is divisible by 2, this shows that 8|V. On the other hand, if we write n = 3k +r, 0 ...)?, that is six times a perfect square, But we have five factors in the produet V, each being of one of the above four types. Using the Pigeonhole Principle, we may conclude that. two of the factors n+, must be of the same type. Let us frst examine the possibility that it is one of the types (i), (fi) or (iv). This is not possible, since if we take for example type (ii), we would have that two amongst five consecutive mumbers belong to the sequence 2, 8, 18, 32, 50, ..., that is numbers separated by at least 6. Therefore, two of the factors nj must be of type (i), that is perfect squares. But the only chain of five consecutive numbers which contains two perfect squares is 1, 2, 3, 4,5, whose product is equal to 120, which is not a perfect square.” This completes the proof (62) We only need to observe that n° —n = (n—2)(n~1)n(n + 1)(n-+2) + n(n? — 1) (63) Since n and (n-+1) are twe consecutive integers, 2jn(n-+1). To show that 3]n(n-+ 1)(2n-+ 1), itis enough to consider the three cases: n= 3k +r, O. (54) We only need to observe that using the Binomial Theorem, there exists a positive integer M such that (a4 11 = 14 (n+ 1a tee. (85) Observe that 41a (n41~ 1? +1=(n 41)? -2n41) +2. Hence, for the relation to be true, we must have that (n + 1)[2, that is n=l. SOLUTIONS, us (56) Since n® 4.206 = (n? +2—2)? + 206 = (n? +2)" —6(n? +2)? +12(n? +2) + 198, the relation will be true if (n®-+2)|198. The only possibilities are therefore: n? 42 = 1,2,3,6,9,11, 18,22,33,66,99, 198, in which ease the positive values of the required m are: 1, 2, 3,4, 8 and 14, For example, with b= 5 and a =2, we have 5[2? + 1, 542-2 and 5424 +1 = 17. (67) First observe that n° + 216 = (n® +2—2)* +216. Then we proceed as in the preceding problem, and we obtain that the only possible integer satisfying the given property is n = 2. (58) The nave is NO, Inde if? +1 then there exis postive integer E such that a?-+1 = kb. It follows that a*-+1 = (kb—1)?-+1 = MU—2kb+2 ee ne ater ere asta ee ee ga easy to choose integers a and b in such a way that bla? +1 and b/2a? For instance, with 6 = 5 and a = 2, we obtain that 5/2? +1, 5/2-2" and 5/28+1=17. (59) (a) Since (G2) COG) - COQ) vwe obtain the result. (b) This follows from the fact that rr (().(2))=(@-0()( Nk and from the fact that (n +1 —k,k) = (n +1, 4). ott anfocz| 2 (,",) wanna} k ny\y_ (k= Int _(7n aral.",) © (n+ 2—WH(K— DN (nF 1— HL (2): then x = k~1€ A, Hence, any linear combination of (k — 1) and (n-+2—k) also belongs to A. In particular, (n-+2~k, k— 1) belongs also to A and since (n+ 2~k,k~ 1) = (n+1,4—1), we obtain the result REMARK: Parts (a) and (b) of this problem could have been solved as in part (c). (60) (Putnam, 1984). It is clear that Sln+2) = f(n +1) = (n+ 2 = (n+2)(n4 0)! = (n+ (s0n +1) -F0) ue (61) @) (63) (64) (65) (66) (7) (68) (69) 1001 PROBLEMS IN CLA: ICAL NUMBER THEORY ‘Therefore, choosing P(e) = x +3 and Q(z) = We only need to observe that ~2, the result follows. (24043 70 41) —8) = (2943 — tn 8) = 722451) ‘and that 7/22" — 1, and thereafter use induction REMARK: This result follows also from Problem 54. Indeed, PET +1) — Tn — (7+ 1)} = 248 — 7-8. We have a = 10g+r, 0 2, then (n— 1)! is even while n* — 1 is odd. If 2fm and n> 5, then n—1 is even and eal (n(a,b)""!,0+b), no |in—2y! so that (n—1)2|(n-1)!, Since (n—1)! = n*—1, we must have (n—1)?n*—1, and using Problem 70, we must have (n— 1)|F and therefore k 2m ~ 1 In this case, for n > 5, nk -12n"1-1> (n=! Hence, the only possible cases yielding a solution aren = 2, n= 3 and n= 5, the corresponding values of k then being 1, 1 and 2. (73) (a) Since 6 = ag, +11 and since a > rs, q > 1, then b rig +r > 2ni- Similarly, a= niga + 2 > Tig +2 > for each > 1, 2 an +r > ra. Finally, Tes Pea ides2 thea, OS Tes? < Tht so that Pe = rea igeen +742 > Masadden + Pkg 2 Pree (b) Since b> Ip > Pry > Brg >... > QUEM Ar, > QUTDI2 > 95/2, we concide that j-< 21ogb/ log? and the result follows (74) Consider the numbers of the form n = 3°, k= 0,1, . so that (4) M41 52% We will show that (i) the first factor on the right-hand side is divisible by 3*~, while (ii) the second factor is divisible by 3. From this, it follows that the left-hand side of (+) is di akan. ‘To show (i), we will show by induction that 2°” +1 is divisible by 3. It is clear that its result is true for m= 1, since 3/9. Assume now that 2°" + 1 is divisible by 3. Thus, if we set = 2°""', we may write isible by 31.3 = SOLUTIONS, 9 P41 a") pa 2841 = (e+ Det—241) =" tz +1), an expression divisible by 3, because of our indaction hypothesis. In order to show (if), we only need to observe that if a is an odd positive integer (namely, here a = 3*-!), then (2°)? ~ 2° +1 is divisible by 3, which is indeed the case since (2-2 41a 48-2 +1 51-241=0 (mod 9) (75) Using Euclidean division, we can write m =ng-+r,0< 1 1 and that 10" — 1 =n? Setting Ny = 3(10" ~ 1), we then have Ne= UL OK 4 10-8 4 F104 1. But, for j > 1, there exists a constant A > 1 such that 10/ = (3? + 1) = 34 +1, which allows us to conclude that there exists a constant M > 1 such that N, = 3M+. Since 9|(10"—1) =n’, it follows that 27/108 — 1. ‘Therefore 3iNe S0 that k ~ 3r for a certain positive integer r. We have thus established that 10%" ~'1 and 10% are two consecutive cubes (with > 1), ® contradiction. Hence, the only integer & such that 10* — 1 is a cube is k =0. (68) Since aj42n + 87 ~ 6(7m +4) = 13, the result follows (9) By hypothesis, we have that (a+ 5)/ab is an integer and therefore that ab|(a +6). Since aja +6 and ala, it follows that alb. Moreover, bja +6 and b|b imply bla. Now clearly, a|b and bla, with a, positive, implies that a=b. {t then follows that, for 1/a+1/a = 2/a to be an integer, we must have a2, which means that a= 4 or 2 (90) We write a = 44, b= 4B where (A, B) = 1. Then, (a?,¥) = 16(4?,4B3), and since (A?, B) = 1, we conclude that each common divisor of A? and 4B° must be 1 or 4. Hence, the possible values of (a?,63) are 16 and 64, (91) Set d, = (30456, 5a+8b) and d = (a,b). Since d;|(3a+5b) and dj |(5a+86), then aj)( 8804 5h) —5(5a+80)), that is dsla. In similar way, we obtain that di[b and consequently did. Since d = (a,6), it follows that d|(3a-+5b) and d|(5a+86) and therefore d|d;. Since dldy and dy|d, we conclude that d= dy. “The general case can he handled in a similar way, and we obtain (ma -+nb,ra+ sb) = (a,b) when ms — nr = 1. SOLUTIONS m4 (92) Let r = (d,m) and set s= d/r. Since r| Letting M = m/r, then (22) -Gan= Since djmn, there exists an integer ¢ such that dé = mn, so that rst = -Mrn, that is s|Mn. Since (s, M) = 1, it follows that s|n. Let d= (r,5); then d|r and r|m imply that d'|m and dn. We therefore have d'|(m,m) = 1, 0 that (7,5) =1 (93) We have that d(a +8) + (a ~ b) = 2a and therefore that dia since d is ‘odd. Similarly, we have that dl(a + b) — (a ~ b) = 2b and therefore that dlp since dis odd. Hence, dla, 6). (04) Since 19? = 361, each composite number < 360 is divisible by a prime number < 17. Since there are only seven prime numbers < 17, it follows by the Pigeonhole Principle that at least two of these given eight composite numbers must be divisible by the same prime number. (95) Since ab = +? = q2*---q2* for certain prime numbers q1,42y ---14x and certain positive integers @1,.02,..-,0 and since (2,6) = 1, it is clear that some of the q2"’s will be factors of a while tie others will be factors of 5, thus establishing that a and b are perfect squares. (96) IF it were true, it would follow from Problem 95 that n and n +1 are two consecutive perfect squares, which is not possible. (97) The only possible values are 1, 2, 7 and 14. Indeed, if then dl, (98) ‘The first statement is true because it is equivalent to 3|(n— 1)n(n+ 1) ‘The second statement is false: simply take n = 4. The third statement is true because itis easily shown to be equivalent to 8l4n(n-+1). The fourth statement is true because 2in(n + 1) and 3)n(n+1)(n +2) (99) ‘The answer is YES. Indeed, on the one hand, 3n(n+ 1)(n +2), while on the other hand, one of the two numbers n and n +2 is divisible by 4, the other by 2. (100) Since we have n? +47 = n? 448 ~ 1, it is enough to show that 24)n® ~ 1 First of all, any positive integer n is of one of the following six forms: 6k, Ok +1, OF +2, 6+ 3, 6k +4, Ok +5. Since (n,2) = (n,3) = 1, it is lear that n can only be of the form 6k +1 or 6k +5, in which case it is immediate that n? — 1 is divisible by 24. (101) Let a = dr and b = ds where (r,s) 2a,...,ba by 6, we obtain the quotients =a Since (r,) = 1, the only is a multiple of s. Since (102) Part (a) is immediate. For part (b), i (20 + 6)a + (yo — a)b =a. (103) Let d = (a,mn); then dla and dlmn. Since (m,n) = 1, using Problem 92, we have d= rs, (r,3) = 1, rjm and sin. But rsja implies rla and sla. It follows that r|(a,m) and s|(a,n), so that d{a,m)(a,n). ‘To complete the proof, we must now show that (a,m)(a,n)|d. Let d2 = (a,m) and it is enough to show that sin, = (nn +14), Dividing each of the integers a, ntegers amongst (+) are those whose numerator ds, this will happen exactly times. is sufficient to observe that wm 1001 PROBLEMS IN CLASSICAL NUMBEIt THEORY dy = (ayn); then dla and dalmn, so that d\(a,mn). But dj|a and dln imply d;|(a,mn). Since (m,n) = 1, it follows that (d;,d3) = 1, which allows us to conclude that dida|(a, mn). (104) Let d = (n? + 3n-+2, 6n° + 15n? +3n—7). We then have that djén(n? + 3n+2) — (Gn? + 15n? +3n —7) = 3n? +-9n +7. Now since dln? +3n +2, it follows that djn? + 9n +7 — 8(n? +3n +2) = 1 and therefore (105) The first three problems can be solved in a similar way. For (a), we proceed as follows. Let d = (a+b,a~b), so that d|2b and d[2a, We then have dl(2b, 2a) = 2(a,) so that d2, which proves that d = 1 or 2. Finally, for (d), it is suicient to notice that a — 3ab-+ 6 = (a +b)? — Sab. (106) (a) Set d = (a? + #,a? — 6). We then have that dj2a° and dj26>, and since (a,b) = 1, we have d[2. ‘Therefore, d = 1 or d = 2. More precisely, when @ and b are of opposite parity, we find the value 1, while if a and b are of the same parity, we obtain the value 2. (b) We have (2-8) = (eb (aero? —ab+) (a b)(a+b,(a +b)? ~ Sab) = (a ~b)(a+0,3ab). Let d = (a+b, 3ab), so that dj3b(a +b) —3ab = 36? and di3a(a+b) — Bab = 3a?, and therefore dl3. It follows that (a? ~b2, a? — 6°) = a—b or 3(a~). More precisely, the value is a—b if 3(a-+0) and 3(a—6) if 3\(a-+0). (107) (a) False, Indeed, (2,3) = (2,5) = 1 even though 6 = [2,3) 4 [2,5] = 10. (b) True. It is enough to show that: (a,b) = g => (a,b?) = g?. We know that if (A,B) = 1, then (42, B2) = 1. But by hypothesis we have a = Ag and b = Bg with (A,B) = 1. It follows that a® ‘Aég? and 6% = BYg?, which means that (02,02) = (A%9?, Bg?) 9 (A®, BY) = 9. (©) True. Indeed, let g = (a,b) and h = (a,b,c). It is clear that lg. Therefore, it follows that glk. But. 9 = (0,8) = (a,¢), which implies that gla, g[b and gle. It follows that gl(a,b,c) = h, as was to be shown. (108) (a) The statement is true. Indeed, let (a,6) = d, s0 that a = dA and b= 4B with (A, B) = 1. Therefore, (A", B") = 1, and since a"|b", wwe obtain A"d"|B"d", that is A"|B". “Hence, A"|(A",B") = 1, which shows that A= 1 and therefore that d = a. It follows that b= dB =aB, which proves the statement. One can also prove this result by writing « = [[pf* and 6 = [Tp and then using the fact that a™[b" to obtain that na; there exist x,y € Z such that ax-+by = 1. Since cla, there exists g € Z such that. a= qe; therefore, az + by = qex + by = 1 == (cb) =1, (110) qu) (112) (urs) (ua) (115) (116) SOLUTIONS a We have (@,bc) =1 <> there exist x,y € Zsuch that ax-+ bey = 1. We therefore obtain that (a,b) = 1 and (a,¢) = 1 Assuming that (a,b) = 1, we must show that 1 = (a +b,ab). Setting = (a +5,ab), we obtain that dja? and djb2, so that d|(a?,b2) = 1. The more general case (a,b) = d > 1 can be obtained from the first part, using the fact that (a/d,/d) = 1 Let «@ and b be the integers such that a+ = 186 and [a,b] = 1440. Since (a,b) = (a +b, (a,b]) and since (186, 1440) = 6, then a = 6A and b= 6B where (A,B) = 1. This leads to A+B = 31 and [A,B] and since (4, B) = 1, we have AB = 240. We then have A(31~ Al and therefore A = 15 or A = 16. The other two numbers are therefore 90 = 2-3-5 and 96 = 25-3. (a) Let d= (a,bc) and g = (a,(a,b)c). We have that gla and gl(ac,be) and therefore that glbe. Consequently, gld. But dla and dpc imply that dj(ac, be) = (a, )e and therefore that dlg. Hence, d = g. (b) From part (a), we have (a, be) = (a, ¢(a, 33} = (a,(a,¢)(a,)). Indeed, (c,ab) = (¢,(a,¢)b) = (eb). It is enough to show that the two numbers are both powers of the same prime number. Assume that p* divides either one of the two expressions. Then, p*|mn, and since (m,n) = 1, then either p*|m and (p,n) = 1 or else p*|n and (p,m) = 1. Since both cases are identical, we can assume that p*[m, in which case we must have (p,n) = 1. Therefore, pi|(ma+nb,mn) += p\(ma+nb) > pr|b > prl(d,m) <> p*|(a,n)(b,m), Setting b =a, we obtain (a(m+n),mn) = (a,n)(a,m). Since (m,n) = 1 also implies (m +n,mn) = 1, we conclude that (a, mn) = (a,n)(a,m), thus also obtaining the result of Problem 103. ‘The answer is NO. This follows from the identity and from the fact that both quantities (2) and (7) are larger than 1. REMARK: This problem remained unsolved until one thought about using the above identity (see Guy [16], B81). P. Erdés and G. Szekeres [11] asked if the Inrgest prime factor of the greatest. common divisor of (") and (") is always larger than r, the only counter-example with r >'3 being (():0)-(G)-@) Let (a,5) =d with (a,b) ~ (a,b) = 143. inst of all, it is clear that d[143. We must therefore examine the possiblities d = 1, d= 11, d= 13 and d= 143, Set a = Ad and b= Bd with (A,B) = 1. If d= 1, then [a,0] ~ (a,8) = 148 becomes AB — 1 = 148 and since (A,B) = 1, we have A= a= 16 and B=) =9, as well as A=a=1and Boba a4 1001 PROBLEMS IN CLASSICAL NUMBER THEORY 1, then AB (3 and therefore A= 2 and B= 7 (which 22 and b = 77), as well as A= 1 and B = 14 (which gives = 154) 3, we obtain 43, we have a "The only six possible (ordered pairs) solutions are therefore {a,b} = {1,144}, (9.16), {11, 154}, {22,77}, {39,52}, {143, 286) (117) For the first part we proceed as follows. Let d = (a,b,c) and dy = ((a,8),¢). Since dla and dj, we have d|(a,8). Similarly, dle; hence, dds On the other hand, d;|(a,)s it follows that dla and di6, and since dle, this shows that dild. Since dld; and di|d, we have d= di. For the second part, we proceed in the following manner. Let M = {e,b,¢), m = [a,b] and m = [m,c). From the definition of ma, it fol lows that mlm; and elms, Consequently, alm, bm, and cms; that is (a,b, cms. Conversely, Mf = [a,c] implies a|M, 0M and c|M, and there- fore (a,)[M and cM. ‘This allows us to conclude that my = [[a,b],<]|M and the result follows. More generally, we have 52, (215435.-+54n) = (a1, (024-++4@n)) and [a152,.-- | By using Euclid’s algorithm, we obtain 132 = 102-1430, 102 = 30-3412, 30 = 12-246, 2 = 6-2 It follows from this that (132, 102) = 6 and therefore that (132, 102, 36) = ((182, 102), 36) = (6,36) = 6. Using the above system of equations starting at the second one from the bottom and moving up, we obtain successively 6 = 30-12-2=90— (102—3-30)-2=7-30— 2-102 7- (182 ~ 102) ~ 102-2. =7- 132 - 9-102 On the other hand, since 7-6 + (—1) -36=6, we obtain that 7-(T- 132 —9- 102) — 36 = 6 = 49-132 + (63) - 102 + (-1) -36 =6. We may thus choose x = 49, y= -63 and z = -1 (a1, lazy... 4u]} (118) It is easy to see that (n,n+1,n-+2) = ((nyn+1),n+2) = (Iyn+2) =1. Since (n,n-+1) = 1, it follows that [n,n-+1,n+2) = [n,n+1},n-+2] [n(n +1),n-+2]. Since {n(n +1),n-+2) = (nn +2) =1 or 2, then n(nt+i)(nt2) — ifmisodd , n(n+1)(n+2)/2 if mis even. (119) We know that (+) (ab,¢)[ab,<] = abe. Since (a,b) = 4, it follows that [a,8] = ab, and since (a,c) = (b,¢) = 1, we have (ab,c) ~ 1. ‘Therefore, (#) becomes (ab, <] = abe, so that [(a,6),¢] = abe. By using Problem 117, wwe reach the conclusion, tninttinea}={ SOLUTIONS 15 (120) The answer is YES. If (a,6) = 1, we have (02,38) = 1; hence, using Problem 117, we obtain (0°, ab,b%) = ((a2,"), ab) = (1,08) = 1 (121) The answer is YES. If (a,b) = 1, then (02,62) = 1, (a?,0#] = a8? and Problem 120 allows us to obtain that (a2, a, 04) = 1. Consequently from Problem 117, we have (a2, ab, 2] = [02,6], ab] = (026, ab] = a8? = (a2, 64) For the general case (a,6) = d, it is enough to redo the last part with (a/d, b/d (122) The answer is YES. We seth = (a,b,¢) and g = ((a,b),(a,e)), and we easily show that glh and hg. (123) ‘The answer is NO. It is enough to consider the counter-example provided by choosing a= 6, b=3 and c= 15. (124) This problema was stated by the mathematician Jean-Henri Lambert (1728- 177). Letting (m,n) = ¢ and using the fact that [m,n|(m,n) = mn, we = @™-14)%*-1=(@"-1)"" a(n =a (tt Jeon and we conclude that ald" — 1. Similarly, dimly = (a 141)" —1=(@ - 1)" (ae maytag (Se ern and we obtain that bjdl™"l — 1, Since (a,b) = 1, the result follows. (125) Assume that (m,n) = 1, m > n. We will show that a (a —1,a"—1) =a-1. Since (a,6-+ ma) = (a,b), we have (a = 1,0" — 1) = (a —1- (a ~1)," = 1) = (a — a", a" Since (a",a” — 1) = 1, this shows that (ae = 1," = 1) = (a"(a""" —1),a" = 1) = (@™" — 1,0" =), Without any loss in generality, we may assume that m > n, in which case we can write m= ng-+r,0 1. Since (m/d,n/d) = 1, we are brought. back to the first case, and we thus have ((oty"/4—1,(at/4—1) a (126) (azz) 1001 PROBLEMS IN CLASSICAL NUMBER THEORY which takes cate of the first part of the problem. For the other cases mentioned in the second part (which by the way cover also the first part), we proceed in the following manner. First letting (m,n) = 1 and u = +1, v=, we have (a tua" 4v) = (a +u—wo(a" +v),a" +0) = (a —wva" a +0) = (a — weya" +0), since (a",a" + 1) = 1. Continuing this process, we obtain (0 + 1a" +1) =(a" +10" —1) =(a4 1,43) oF (a+ ,a—1) according to the parities of m and n. More precisely, we have the following: Since (a+ 1)|(a* + 1) for k odd and since (a + 1)|(a — 1) for k even, it follows that taking into account the fact that a +1 cannot divide a* +1 if kis even unless a = 1, we obtain that a+1 ifmnis odd, (a +1,0"+1)=4 1 ifmnis even and ais even, 2 if mis even and a is odd and that 1 ifmis odd and a is even, (a +1,a"—1)=4 2 ifmis odd and ais odd, a+1_ ifmis even, Wien d= (m,n) > 1, we can proceed essentially as we did for the first case. To find the value of (a”—b",a""—b"), we may assume that (a, 8) = 1 and a > b. tn this case, set d = (m,n), = a!—O# and v = (a™—B",a"— #"). Since dim, it follows that u)(a™ — 6"), and since din, we also have ul(a” ~ 1") and we obtain that ulv. Then, we only need to show that vu Choose integers x > O and y >0 such that me ~ny =d. Tt is lear that a" =a a6 40), and therefore a 5m = aE u) — BE = Ma) 4 wa Since v|(a” — 8"), we have v|(a"™* — 6") and similarly v|(a"Y — 6"), and the last equation allows one to obtain that vjua"®. Since (a,6) = 1, we have (v,a) = 1. Indeed, every common divisor of a and v divides a” and a —0", and therefore divides 6”, and since (a,b) = 1, we have (a,v) = 1. Finally, vjua" implies vlu and the result follows. Let a and 6 be two arbitrary integers, and set x = 5a and y = 5h, In order to have x+y = 5a +5b = 40, we must have a+b = 8. Moreover, to have (r, y) = 5, we must have (a,b) = 1. Therefore, it remains to show that it is possible to find infinitely many relatively prime pairs of integers and b such that a+6 = 8, To do so, itis enough to choose, for example, +2 and b= 5-2, where t € Z. ‘There are four possible pairs: a = 15, 6 = 90; a = 90, b = 15; a = 30, b= 45; a = 45, = 30. For the general case, we proceed in the following way. Since (a,b) = d, there exist integers A and B such that a = dA, 4B, where (A,B) = 1. But [a,b] = m implies that [d4,dB] [A,B] = dAB = m. Hence, the system of equations (0, ) = d, [2,6] =m. (128) (129) (130) (131) SOLUTIONS a has solutions if and only if dlm. These solutions will be the same as that of AB = mjd where (A, B) = 1. For each prime number p dividing m/d, we cannot have both p|A and p|B. Therefore, either A contains the largest power of p which divides m/d, or else A does not have p as a divisor. Hence, for each prime factor p of m/d, we have two choices for the pair {A,B}, and therefore in total as many pairs as m/d has distinet prime factors, that is as many as 201". ‘This follows from the fact that 3jm and 3]n while 3101 (a) We observe that it follows that (1 (a?"" +1)(@?""" -1) a?" 4:1)(a?”* 4:1) (a? + 1)(a + 1)fe— 1), Hence, if m > n, a2” +1 is a divisor of a?” ~ 1, as required. (b) Note that a?” — 1 = (a?” +1) —2 and that this integer is divis- ible by each of the factors on the right-hand side of (+). Let d = (a?” + 1,02" +1). We may assume that_n < m, and therefore a2” 4 1|(a2” +1) — 2, which implies d|(a?" +1) — 2. Therefore, d|2 so that d= 1 or d= 2. (AMM, Vol. 75, 1971, p. 201). Let d be the greatest common divisor of the given numbers. In particular, d divides the sum of these numbers and since (see Problem 17 (b)) an), (2n) , (2n) 2m) youn (1) + (3) +) ++ Gets) <2 it follows that d must be of the form 2*. If n = 2*r, where r is an odd integer and K a nonnegative integer, then since (2?) = 2%, it follows that any common divisor of the given numbers cannot be larger than 241, To show that 2"? divides all these numbers, we first write, for m=1,8)...20—1, C)- Cr) 22025) Since the binomial coefficients are integers and since m is an odd number, me ee) a") whore M is an integer and m = 1,3,...,2n— 1. This proves that 2+ is, the greatest common divisor of the given numbers. Each a, can be written in the form aj = 2%b;, where a, > 0 and b; is odd. Let B = {by,b2y..-sbnss}- We have by < 2n, i= 1,2,....n-1. But there exist only n odd numbers < 2n; hence, there exist j,k such that by = by. ‘Then, consider the two integers a= 2%; and ay = 2b Itis clear that a; 4 ay (since by = bx). Ifay then print(2"i-1, ‘ is a prime number ‘) > else fi; od; (b) With Marre, we may use > mextprime(10A(400)+1) 5 We thus obtain the integer 108° + 267 (136) With Mapu, the program below enumerates the Sst NV (here NV = 120) prime numbers. > for i to 120 do > p.isitbprime(i) od; For example, p.(1.-120) gives the first 120 prime numbers. SOLUTIONS: 129 (137) In order to find four consecutive integers with the same number of prime factors, we must use the function ©. First we type in > readlib(ifactors): with (aumtheory) and thereafter, we type in the following instructions > Onega:=n->eum (‘factors(a) [2] [3] [2], > it, .nops(factorset(a))) > for n to 1000 do if Onega(n)=Omega(n+i) and > Onega(n+t)=Omega(n+2) and Onega(n+2)=Onega(a+3) > then print(n) else fi; od; ‘To find four consecutive integers having the same number of divisors, it is enough to type in the instructions > with (austheory): > for n to 1000 do > if tau(n)=tau(nt1) and tau(ntt)=tau(n+2) > > and tau(n+2)=tau(a+3) then print (n) else f1; od (138) (a) With the procedure “return”, the search is easily done: > return:=proc(n: :integer) 10+s+ixen(a, 10); > m:siquo(a,10) od; end: And for our problem, we have the following procedure: > invp:sproc(::integer) local a; > for n from 1 to N do if deprine(n) > and isprime(retura(n)) then > print (m) fi; od; end: Without the procedure “return”, we may proceed as follows: > invp:=procit) > for j from 169 to N do > Lesconvert (ithprime(3) ,base, 10) ;# N <= 1229 > if type(1000«L[1] +100+1 [2] +10+L [3] +L(4] ,prime)=true > then print (ithprime(j)) else fi; 0d; end: (b) > Anvp:=proc(ti: integer) > local a; > for n from 1 to N do > Af isprime(n)=false then elif > type (sqrt (return(n)), integer)=true > then print(n) else fi; ed; end: If we do not use the procedure “return”, we may proceed as follows: > invp:=proc(W) local j, Ls > for j from 26 to N > do L:sconvert(ithprime(j),base,10);# N <= 168 > if type (sqrt (100+L[1]+10*L [2] +L{3]), integer)=true then > print (ithprime(j)) else fi; od; end: 10 1001 PROBLEMS IN CLASSICAL NUMBER THEORY or the following procedure: invp:sproc(N) Local j, L; for j from 169 to do L:=convert (ithprime(j),base,10);# N <= 1229 Af type (sqrt (1000+L [1] +100+L (2) +10*L(31+L[4]), Anteger)=true then print (ithprime(j)) else fi; od} end: (139) With Marte: > for n from 3 by 2 to 10000 do > if isprime(n) and isprime(n +2) and isprine(n +6) > then print(n) else £1; od; (140) We prove this result using induction on k. The result is immediate for 4k =2. Assume that the result is crue for a certain integer & > 2, that is for which we have py <2. It is enough to show that pest <2, From Bertrand’s Pastulate, there exists a prime number between py and 2p which case pes < 2pe, and the result is proved, (141) tis enough to show that d # 2,4 (mod 6). First ofall, assume that d = 2: if pe = 1 (mod 3), then puyi = pe+2 = 0 (mod 3), contradicting the fact that pes is primes similarly if pe = 2 (mod 8), then pe-1 = pe—2=0 (mod 3), contradicting the fact that p,-1 is prime. ‘The same type of contradiction emerges when we assume that d = 4. If d = 6k +2 or 6k +4 with & > 1, the same argument works. For d = 6, it is pie = 53; for d= 12, itis pyr = 211; for d = 18, it is prass = 20201. REMARK; It is interesting to observe that the gap d = 24 is reached earlier than might be expected in the sequence of prime numbers, namely with Piggo = 16787. (142) This statement follows from the fact that each of the listed numbers is & perfect square, since 12321 = 11, 1234321 = 1111°,..., 12345678987654321 = 1111111112. (143) Let k > 2. Since each number < ng is either 1, a prime number or else & composite number, itis clear that vvvvvv a ny = Lt (n) +k By using MarweMarica and the program +1 ;¥hide [Prine?s [a] fen-10°a-1,n64]; Print (i0"a, 1,3}1 wwe obtain the table 10 18 100 133. 10001197 This reveals that mip = 18, nig = 138 and nig = 1197, For values of k larger than 1000, and to accelerate the computations, one can use the approximation (guaranteed by the Prime Number Theorem) n(x) ~ Tes + pairz 80 that (1) gives, Tog? my +k Togne (44) SOLUTIONS 131 and therefore that 14 2 m (1-1) wr, a (tam -iar) which in patiular means that (3) log ry © log k. Combining (2) and (3), we obtain the approximation 1 @ wet (ope) Setting s4(n) = 1+ x(n) +k—n, it follows that if a number n satisfies ‘se(n) = 0, then n = ng. First consider the case k = 10%, From (4), we have as a first approxi- ‘mation niqs 11.369. By using MATHEMATICA and the program ne11369;\ihile[(a*s [a] )!=0,nen+a) ;Print [n] where s(n) = sio00(n), we obtain that myoo99 = 11374. Similarly, with the approximation niqs ~ 110425, we obtain that mos = 110487. The following is the table giving the values of nos for 1 < a < 10 @ [Rion @ [fio 1/18 ©) LOST 605 2 | 133 7 | 10708595 3 | 1197 8 | 106091 745 4] aia74 9 | 1053422339 5 | 10487) | 10 | 19475688327 Let k > 2. Setting r = [logns/log2), it is clear that the number ms satisfies Sot! From this relation and the approximation x(z) ~ [2 (guaranteed by the Prime Number Theorem), it follows that, ogre so that log ny ~ logk + loglogny ~ log k and therefore that, my © Blogny © klogk, which gives a starting point for the computation of the exact value of ny. Using MATHEMATICA and the program Dolk = 10°}; n = Floor [¥(keLoglk]]15 While[s = Floor ({Logisl /Log{2]1]; s=Sum[PrimePs [n"(1/3)) ,{4,1,r)}3 (aek-s) !0,n-n¢a) ; Printlj,"->", n,"=",FactorInteger (n)) ,{1,3,10}) ‘we finally obtain the following table: 12 1001 PROBLEMS IN CLASSICAL NUMBER THEORY a] hie @ [Rio 1/16 6 | 1547a 787 2/419 7 | 179390821 3) 7517 8 | 2037968761 4) 103511 9 | 22801415981 5 | 1295953] | 10 | 252096677813 (145) If nis even, then 2" +n? is also even and therefore not a prime. It follows that n = 1,3 or 5 modulo 6. If n = Gk-+ 1 for a certain nonnegative integer k, then 2" = 2°! = 2 (mod 3) and n? = 1 (mod 3); in this ease, we have that 2" +n? =2+1=0 (mod 3). Similarly, if n = 6k +5 for a certain nonnegative integer k, we easily show that 3|2" + n?. Therefore, the only way that 2" +n? can be a prime number is that n = 3 (mod 6). Thus, by considering all the positive integers n < 100 of the form n = 6k +3 and using a computer, we find that the only prime numbers of the form 2" + n?, with n < 100, are those corresponding to n= 1,9,15,21,33. (146) We will show that if n is of the form n = 3k +1 or n = 3k+2 with k > 1, then 7lay. Moreover, we will show tit ifn is of the form n = 3(3k-+ 1) or n= 3(3k +2) with k > 1, then 73|an. Finally, since 3a, ifn is even, it will follow that, for ay to be prime, n must be an odd multiple of 9. So let n = 3k +a, with a = 1 or 2. Since 8* = 1 (mod 7) for each integer k > 1, we have ay = 22" +i) +1 = DDH 1) 41 = 8k2r(82° 41) 415 (2" +1) +1 (mod 7), But 7=0 (mod?) ifa=1, (mod 7) ifa=2, wenanrief which establishes our first statement. Let us now assume that n = 3(3k-+ a) with a= 1 or 2. Since 2° (mod 73), we have 22" $1) $1 = RFQ 1) ET = (28)4299((2°)0% 41) +1 = 24(2% 4 1) 41 (mod 73). But 28(08" 41) +1 B+1)+1=73=0 (mod 73) ifa 2(2!2 41) +1=4161=0 (mod 73) ifa=2, which establishes our second statement. Having observed that aq is prime for n = 1,5 and 9, and then con- sidering all the numbers of the form n = 9(2k +1), we obtain using a. computer that a, is composite for each integer n, 10 3. Assume that the result is true for all natural numbers < n— 1 and let us show that it implies that it must be true for n. Let Pa = TIpcnP- First of all, ifn is even, then Px = Pp.-r, 80 that the result is true for'n, Let us examine the case where n is odd, that isn = 2k-+1 for a certain positive integer k. It follows that each prime number p such that k-+2

(* + (At) =2(? we obtain AE) (# = 1,2,3) such that 2 (213%57)? = 3 (293%)? = 5 (2.9%5)” To do so, we must find integers a, 3) and >; (i = 1,2,3) such that 2a; +1=Sa2 = 5a, 25, = 392 +1= 544, 21 = 392 = 599 +1 We easily find a; = 7.02 =5,03=3, Gy = 5, =3,h=2 = 3,9 =2=1 We then obtain that n = 2(27 - 35. 5%)? = 3023308800000 serves our purpose, (154) This follows from the identity n® 97 = (n!4)8 38 = (nl — 3)(n® + 3! +37) (155) We proceed by contradiction by assuming that there does not exist any prime number in the interval jr,2z], in which case we have 6(2x) = 6(x) By using the inequalities 0.732 < 0(r) < 1.12r, we would then have 1462 = 2(0.73)x < (22) = O(c) < 1.422, a contradiction (156) We proceed by induction. First of all, for n = 4, the sesult is true, since 121 = 11 = p2 < pipapspi = 210. Assume that the inequality DE < papa +-py- is true for a certain integer k > 5. By using Bertrand’s Postllate in the form ps1 < 2Ph, We then have Phat < APE <4pypa-- “Pha < PIPa-> “Phy and the result then follows by induction. SOLUTIONS, 135 (157) If there exist g,r,a € N such that g” = (g"/2)? = a, where r is even and q” = p+m® with p prime and m € N, then a? — m? = p, so that (a—m)(a+m) = p. Since pis prime, we must have a~m = 1 and a-m = and therefore m =a —1 and p = 2a~ 1. Hence, if 2a— 1 = 2g"? —1 is composite, q” cannot be written as p+ m?, as was to be shown. (158) For p = 3, the result is immediate. Assume that p > 5. If p = 3k+1 for a certain positive integer k, then 8k +1 = 24k +9, a multiple of 3 Otherwise, that is if p = 3k — 1 for a certain positive integer &, then 8p - 1 = 24k — 9, a multiple of 3, which contradicts the fact that 8p ~ 1 is prime. In both cases, the result is proved. (159) If a positive integer of the form 3k +2 has no prime factor of the form 3k+2, then all its prime factors are of the form 3k +1. Since the product of two integers of the form 3k-+ 1 is of the form 3k-+ 1, the result follows. Since each product of prime numbers of the form 4k+1 is of the same form and since each product of prime numbers of the form 6k-+1 is of the same form, the result follows. (160) (a) We have 23 = 3-31+2-2141-Iand 57 = 2-414 1-34 1-2141-1 (b) To find the Cantor expansion of a positive integer m, we proceed as follows. Let m be the largest positive integer such that m! O, let my be the largest positive integer such that mi! < dy and let dm, be the largest positive integer such that dm, “mi! < dj. As above, we have @ < dy, < my. If dm, »m! = dy; then the Cantor expansion is given by m= ayy tl + am, « mi), where O my > >... with the corresponding integers 0|< aj, < mj. Since the sequence of m,’s is decreasing, it must have an end. Let us show the uniqueness of this representation, Assume that for 0 < aj,b; 3, then p+2p—-8=1+42p-2=2%p+1) (mod 3) <=> 3\(p +1). But for p > 3, p = 3k+ 1, and in each of the cases itis easily seen that at least one of the two numbers p +2 and p? + 2p—8 is not a prime. (163) The answer is YES. If p = 3, then p? +8 = 17 is prime and p? +4 prime. It is the only prime number with this property. Indeed, not have this property, while if p > 3, then p = +1 (mod 3), in which 1 (mod 3), that is p? +8=9'= 0 (mod 3), s0 that y? +8 is not ‘Thus the result. (164) (Ribenboim [28], p. 145). First assume that the congruence is satisfied. Then n # 2,4 and (n—1)!+1 = 0 (mod n). Thus, using Wilson’s ‘Theorem, n is prime, Moreover, 4(n — I) +2 = 0 (mod n +2); thus, multiplying by n(n +1) we obtain Aff + 1)! +1] +2n? + 2n and therefore Al(n+ 1)!+ 1} + (n +2)(2n—2)=0 (mod +2); hence, 4i(n +1)! + 1] = 0 (mod n +2). This is why, using Wilson’s ‘Theorem, n+ 2 is also prime. Conversely, ifn and n+2 are prime, then n #2 and (r-Dl+1 = 0 (mod n), (a+ I41 = 0 (modn+2). (mod n +2) soLutions as But n(n +1) = (n-+2)(n—1)+2, and this is why 2(n—I)!-+1 = k(n +2), where k is an integer. From the relation (n — 1)! = —1 (mod n), we obtain 2k +1 = 0 (mod n). Now, 2(n—1)!+1 = k(n +2) is equivalent to A(n—1)!+2 =0 = —(n-+2) (mod n+2). Moreover, 4(n—1)!+2 = 4k = =(n+2) (mod n). Hence, 4(n—1)!+2 = —(n+2) (mod (n(n+2)); that is a((n -Dl+ 1) +n=0 (mod n(n +2)). (165) The prime number p = 3 is the only one with this property, because if p> 3, then p = 2k + 1 for a certain integer k > 2, in which case w= PH 4k.2=2 (mod 3) while P=1 (mod 3), so that 2 +p? =0 (mod 3), (165) The answer is p = 19. Indeed, 17) +1 =a? = 17p = (a—1)(a+1). We then have 17 =a—1 and p=a+1or17=a+1andp=a-lI. The first case yields a = 18 and p = 19, while the second case yields @ = 16 and p= 15, which is to be rejected. Thus the result. (167) (a) The possible values of (a?,8) are p and pi (b) The only possible value of (02,2) is p?. {c) The possible values of (a6) are p, p? and pi. (4) The possible values of (a°, 2) are p? and p? (168) (a) The only possible value is p? (b) The only possible value is p. {c) The only possible value is p. (d) The possible values are p?, p*, p* and p' (169) We have (ab?, p*) = p* and (a? + b?, p*) = p?. (170) (a) True. (b) True. () True. (4) False. Indeed, we have 13[2? + 9? and 13[3? +2, while 13/2? +2? 5. an ) ® is an immediate consequence of Theorem 12. 172) Let BP pee, pil pee Bp rr From Theorem 12, (a,b,c) = ppin@rP-n) ,. pinlarsBone) and ae(an.31i78) gant) [a,b] = pr Pr To prove the result, we proceed by contradiction. Assume for example that (a,b) > 1. Using the fact that (a,6,¢)[a,b,¢] = abe, it follows, using the above notation, that min(ai, 8,4) + max(ai 8.4) =A +B 4+% = LB or). But it is easy to prove that for the sum of three nonnegative integers to be equal to the sum of the smallest and of the largest of these same three 138 (a3) (174) (175) (176) 1001 PROBLEMS IN CLASSICAL, NUMBER THEORY numbers, at least 6vo of these numbers must be 0. But this contradicts the fact that (a,0) > 1, an inequality which means that there exists an io (1 < to 1. Hence, the result ‘We use Theorem 12 and the fact that sain (a, is} = min{ay,B:} + min( 3.7} + min{a, ys} ~min{ay + 5,5: +, 04 +7}: ‘The second part follows from the first part and Problem 171 Let f = ptt Since [a,) = [ns pM") and (a,8) = [Ty pM, it is enough to show that, for each i 2max{ai, Gis Yi} ~ max{ay, i} — max{Hi,4} —max{, 05} min{as, 64,74} ~ min{ax, Ai} — min(G,"4} — min{y, as}. Without loosing in generality, we may assume that, for a given i, a > 8 > “ws from which the result easily follows. Let a = [Ti pt, 6 = [Ty ph. ¢ = [1_, ps". Without loosing in gener- ality, we may assume that a; < 6, < ¢. ‘The equation of the statement allows one to conclude that ¢; +a; = }(a; + b + cj) and therefore that 4; +e; = by, which implies, since ¢; > bi, that b = ¢ and a; = 0. This ‘means that in erder for the relation to be true, for the same prime num- ber, two of the exponents must be equal while the third one should be 0. Hence, we can choose a = 2.31.59 = 6, b= 2-3-5! = 10 and = 2.31.51 = 15, Note that the numbers 42, 70, 15 will also do. ‘The left inequality is obvious. To prove the right equality, first observe that = Th" #n=[L Qe where p' is the largest power of p not exceeding n. In other words, 4, is defined implicitly by the inequalities p’r 2. But this is possible only if we choose a = p(p~2) (provided that p> 2). If p= 2, that isn = 4, it is clear that the result does not. hold. (181) TFit is the case, we will have n(n+1) 2 means that we are looking for the positive integers n for which there ‘ positive integer M = M(n) such that (n+1) we 2m Dy Foe thats 2ST a If +1 =p, with p prime, then n = p~ 1, in which case M is not an Integer. Therefore, n+ I must be composite; that is n +1 = pr, where pis prime, If p and r can be chosen in such a way that p ¥ r, then p and r will show up as factors in the product (n —1)!, implying that M is ‘an integer. If the only possible choice for p and r is p = r, then we have n+1=r and 2(n = 1)! = 2(p? — 2} = 2(p? — 2)(p* — 3)--- peed. Hence, in order for 2(n — 1)! to be divisible by p?, we must have that 2(n~1)! contains the factors p and 2p; that is we must have (p — a) = 2p for a certain integer a > 2. But this is possible only if a = p(p — 2) (provided p > 2). It follows that the result is true for all integers n such that a4 p— 1, p being an odd prime number. (182) (AMM, Vol. 81, 1974, p. 778). From the solution of Problem 181, we hhave that ifm >'5 is a composite integer, (n~2)l/m is an even integer and Cheep” ome cnn (222) = ntl nl, thatis 2**}(m— at I, that Z| (0! M (n-1l= 1001 PROBLEMS IN CLASSICAL NUMBER THEORY On the other hand, ifn = pis prime, then by Wilson’s Theorem, (p~2) =(p—1)! = 1 (mod p), in which case there exists an integer k such that (p—2)!= kp +1 and therefore Hence, if p > 5, then 4|(p ~ 2)! and therefore (52) ‘These two cases allow us to conclude that for n > 5, the term indexed by nin the sum is 0 if» or n-+2 is composite and is ("-1)(—1) = 1 ifn and n+2are prime. Note thet the term “2” is necessary in order to count, the pairs of twin primes (3,5) and (5,7). (183) Assume that there does not exist any prime p between n and nt, Then, consider the number N =n! — 1. If-N is prime, we have found a prime number between n and nl, a contradiction. If N is composite, then there exists a prime number p such that p 1, 8 > 1, and therefore PAL (PQ 442741), ‘where each factor is larger than 1, which contradicts the fact that a” ~ 1 is prime. (186) If a is odd, then a” +1 > 4 and is an even integer, hence not prime, On the other hand, if n has an odd factor r > 1, then there exists a positive integer m such that n = mr, in which case a" £1 (a™ + 1)(a™—Y — a9) 4. a 41) a Since r > 3, both factors are larger than 1, and this contradicts the fact that a” +1 is prime. Hence, n has no odd factor larger than 1 and n must be of the form 2”. (187) (TYCM, Vol. 13, 1982, p. 208). We reduce these expressions modulo 3. Since 2” +1 with z > is of the form 2 +1 with ¢ > 0, it follows that 2 41=2%41=(%)'+1=2 (mod 3) SOLUTIONS ut But 2"—1=0or1 (mod 3) depending whether « is even or odd. Hence, (2 - 1)(2”—1) =0 or 1 (mod 3), and since 2” +1 = 2 (mod 3), the result follows. (188) The result is true for n = 1, since in this case it is easy to check that Fy =2? +1 =3and Fy -2=2" +1-2=5-2=3, Assume that the result is true for n = k and let us show that it implies that the result is then true for n =k +1. Indeed, by the induction hypothesis, we have FoF Fav FeiPe = (Fe~2)Fa= (2-1) (2 +1) 41) -2= Fa as required. (189) Assume the contrary, that is that there exist two integers m > n > O such that (Fy,,F,) => 1. Then, using Problem 188, we have @) FoF ++ Fm = Fm = 2 Since Fa is one of the factors on the left of (+), it follows that [2 But since each Fermat number is odd, it is impossible to have d = 2. Hence, d= 1, and the result follows, (190) With the help of a computer, we find that this number is 20341. (191) From Problem 189, all Fermat numbers are pairwise relatively prime. Each Fermat number therefore introduces in its factorization at least- one new prime number. As a consequence, the Fermat, numbers generate in- finitely many prime numbers, (192) To prove part (a), we proceed by induction. First ofall, itis elear that 32/28" +1. Assuming that 3*|/,_, for some k > 2, we will show that this implies that 3°*1|fj,. Using the fact that a? +1 = (a-+ I)(a?—a+1), we have ) See are (e ar = (4) (@7Y'-@) 4) = AB, say. The expression A is divisible by 3* because of the induction hypoth- esis. It therefore remains to show that 3|B. But B = a? —a +1, where a=2"""' =2 (mod 3). It follows that B=a?-a+1=2?-2+1=0 (mod 3), as required "To prove part (b), we only need to observe that fu-sIfn» axis implied by the awond line of (2, (193) (Tais problem can be found on page 64 of the book of D.J. Newnan (24), Consider the arithmetic progression 15k-+7, k= 1,2,-.., which by Dicich- let's Theorem contains infinitely many prime numbers. If p = 18K +7, is clear that p—2-= 15K-+5 is ¢ multiple of § and that p-+2 a inultiple of 3, which proves the resul (294) Since ca ua (195) (196) (197) (198) (199) 1001 PROBLEMS IN CLASSICAL NUMBER THEORY wwe have 22 = (29)? = (154)? = 23716 = and the result follows. First of all, it is clear that F, = 2% +1=17 = 7 (mod 10). Therefore, it is enough to shaw that if F = 7 (mod 10) for a certain k > 2, then Fes =T (tod 10). Indeed, we have by the induction hypothesis that ere (st) =(@%+0-1) +1=0-1841= 640 = ~1 (mod 641), Fan = 7 (aod 10), as required We proceed by contradiction in assuming that 2* divides an integer m € E\ (28), in which case m = 2'r for a certain integer r > 1, implying that 21 is in the set E, which contradicts the minimal choice of 2 For the second part of the problem, assume that the given sum is an integer M_ The smailest common multiple of the elements of B must be of the form 2%m, where m is sn odd number. Multiplying the sum by But when the left-hand side is expanded, one of the m terms is equal to 1m/2 while all the others ate integers, which yields a contradiction since mis odd We have 21 = BYP —1 =F — QHD $29 4 4D, which implies that the number 2° — 1 is divisible by 31 for any positive Integer n. Hence, p= 31 wil serve our purpese. We have My = 3, Mz =7, Ms = 1, My = 211, My = 2811, which ar all prime numbers, while Afj = 59-509 and My = 19-97-27 are composite REMARK: Using the MAPLE progrant > for k from 8 to 10 do print( 3 MO) = Afactor (product (4ebprine(4), 191.2449) od we obtain Mg = 347-27953, Mg = 317-703763 and Myo = 331-571-34231. ‘8802006, we stil don’t know ifthe sequence {My} contains infinitely many prime nunbers; with the help of a computer, we can nevertheless easily establish thatthe only values of b < 1000 for which My i & prime number are: 1, 2,8, 4,5, 11, 75, 172,172, 984, 487, 616 and 643 Any prime number dividing pyp2:*"Ps +18 distinct from any of the primes pi,P2y-+-sPri hence, i follows that Pr S Pipa" Pr +, and using an induction argument, we obtain that Pro S22? 2 Pp 2, which proves the result soLUTIONS| ua (200) Let x > 3, Choose r € N such that @ ‘We easily observe that such a choice of r is unique. The left inequality of (1), the fact that (x) is a nondecreasing function and the relation Pe <2?" allow us to write “ease” @ (a) > mle") > m(2") > x(p,) =r. ‘The right inequality of (1) guarantees that @) 1 > loglogz. Combining (2) and (3), we obtain the required inequality: (201) Assume that there is only a finite number of prime numbers of the form 4n+3, Denote them by <<< and consider the number « N= Agua ge —1 = Alqran-s-4e 1) +3, whichis clearly of the form 4n-+3, I Nis prime, then we have found & prime number of the form n +8 lneger then qh, thereby yielding a contradiction. If N is composite, then N cannot be the product of only prime numbers of the form dn-+1 (since NV would then also be of the form 4in++1). Therefore there exists a prime number q ofthe form 4n +3 which divides N. If q is equal to one of the q's, that would mean, in light of relation (2), that lt, again a contradiction. Hence, q> gy and the result is proved (202) Assume that there is only a finite number of prime numbers ofthe form 6n +5. Denote them by nemo and consider the number ® N= Gang 1 = 6(q2---44~ 1) +5, which is surely of the form 6n +5. If N is prime, then we have found @ prime number of the form 6n + 5 larger than q,, thereby yielding a contradiction. If N is composite, then N cannot be the product of only prime mumbers of the form 6n +1 (since NV would also be of the form 6n+1). Therefore there exists a prime number q of the form 6n +5 which divides N. Ifq is equal to one ofthe as that would mean, in light of (¥), that ql, again contradiction. Hence, q > qe and the rst is rowed (203) Ie is enough to consider the palynomial S (a) = (© pi)(w— pa) (@— pe) +2 where pg stands for the k-th prime number. (204) The answer is NO. Consider such a number V with 2k +1 digits, & > 2. We first notice that, for each integer k > 1, (14 10? +--+ 10*)(10? ~ 1) = (20%? — 1) = (ot — 1)(20"* +2). a 1001 PROBLEMS IN CLASSICAL NUMBER THEORY Hence, okt — 10 41) 9-1 Since k > 1, both factors on the right-hand side, after dividing by 99, have two factors larger than 1, so that the number NV is composite. On the other hand, in the particular case k = 1, we find the prime number 101. (205) Let Gy = 2?" +5. First of all, Go = 24 45 = 7, which is prime. We will show that all the other G,’s, that is those with n > 1, are divisible by 3. To do so, itis enough to prove that 2°” = 1 (mod 3). But this is true 1410? 4-4 10% 2 = (2) v"=1 (mod 3). Clearly, we could have obtained the same result if instead of 5 we would have used a number of the form 3k-+2, except that in this case, one should first check whether 2 + 3k +2 = 3k +4 is prime or nat. (206) The answer is NO. Indeed, the next gap in the list is 14; st oceurs when Drs ~ Pr = 127 ~ 113 = M4, while the first gaps of 10 and 12 occur respectively when p,41—Pr = 149-139 = 10 and p,41—pr = 211 - 198 = 2, (207) Let 5 be this series; then 8 (208) We have successively Eterm = F (WS where we used the fact that 4), 4(d) = 0 ifr > 1 and 1 if (209) ‘The result is immediate for 2 <'m < 6. On the other hand, since D_ 1= [van] - [va] +12 van for n > 6, the result follows for each integer n > 2. (210) Assume the contrary, that is that n* = p-+m®, We then have n®—m' which implies that (n—m)(n?-+mn-+m?) = p and therefore that n—m. and n? +-mn +m? =p. This shows that n® n(n —1) + (n 1) SOLUTIONS 15 that is 3n? composite (211) The prime numbers p < 10000 of the indicated form are 2, 5, 17, 37, 101, 197, 257, 401, 577, 677, 1297, 1601, 2917, 3137, 4857, 5477, 7057, 8101 and 8837. Given n > 1, we have n = 0,1,2,3,4,5,6,7,8,9 (mod 10), in which case n? = 0,1,4,9,6,5,6,9,4.1 (mod 10) and therefore n? + 1,2,5,0,7,6,7,0,5,2 (mod 10). Since the numbers n? +1, congruent to 0, 2, 6 or 5 modulo 10, are composite, we are left with the numbers n for which n? +1 = 1,7 (mod 10). Finally, since the numbers n = 4,6 (mod 10) are such that n? +1 = 7 (mod 10) while only the numbers n=0 (mod 10) are such that n?-+1=1 (mod 10), this explains why the digit 7 seems to appear twice as often This follows from the fact that, feom Theorem 27, we have nt= [poe lal < Pp" = Ppp, 3n +1 = p, which contradicts the fact that 3n?— 3n +1 is (212) where we used the fact that (213) Every positive integer n > 6c n= 6k+2,n=6k+3, 6k +5, in which case the corresponding values of n® + 2 ave respectively multiples of 2, multiples f 3, multiples of 2, of the form 6K +5, snultiples of 2 and multiples of 3. It follows that only those n = 6k +3 (with n® +2 = 6K +5) are possible candidates for ensuring that n? +2 is prime, thus the result, (214) Let N-+é be one of these numbers. If is prime, then iJ +i and N-+4 is ‘composite. While if i is not prime, then é is divisible by a prime number Po 2 and where the a's are integers satisfying 0 2, it follows that 4|a;10-+ ao if and only if d\n. To prove (c), it is enough to observe that, since 8|10? = 5? - 27 for ceach integer j > 3, it follows that 8|a2100-+ 4,10 + ap <9 8[n. ‘Therefore it becomes clear that one can generalize this result as follows: Hf > 1 is an integer having at least k digits, then 2*|n if and only if the number made up of the last k digits of n is divisible by 2* (216) (Hlawka [19]). Let n > e* and set f(n)= > 1. It follows that n> TL 22 Cogn ae (217) (218) (219) 1001 PROBLEMS IN CLASSICAL NUMBER THEORY ‘and therefore that logn > f(n)loglogn; that is f(n) < (log n) /loglog n. On the other hand, for n sufficiently large, we have 1 2 woe (1-5) Te follows that gn Oz logrm) = tog (1-3) > soto ( a) ping >togn > 2A, 2 = gn = ~ioglogn Hence, lim log P(n) = 0, and the result is proved. (MMAG, “Aprit 1992, p. 190). Assume the contrary, that is that each Interval (n?, (n + 1)?] contains less than 1000 prime numbers. We know that the sum of the reciprocals of the prime numbers diverges. Hence, according to our hypothesis, we have werdp- EE de Et mat necpeintye? Re” ntcpetnenye YE F(a 4-99) xe)) < 100090 3 < 400, « contradiction We only need to show that if x < y are any two positive real numbers, then there exist two prime numbers p and q such that x < p/q-< y. It is obvious that a (av) a(¢2) ~ sta) (5 (On the other hand, using the Prime Number Theorem, we have mqu) _y 2) lim Tt) _ ¥ ® am az) = It follows from (1) and (2) that lim, ..(n(qy) ~ x(q2)) = +00. This means that for q sufficiently large, say q — qo, there exists at least one prime number po such that gox < py < qoy, in which case we have Po r 1. Then, 1 a im Gm where r is an integer. In this case, the product q2---qn is divisible by q1, which is impossible. SOLUTIONS ur (220) We have successively eae» Ebr eGo wlog2 + 2Rix) —2R(V/z) + S(x), say, where [$(2)] < (2). Relation (3) then follows from (1) and (2). To show the last par, itis sufficient to observe that, since log2 = 0.69... then if « is sufficiently large, 2 1b DY tater) > F (221) .p, be the prime numbers < V% Then, all odd integers < are not divisible by pi,P2,...,Pr are prime numbers. Conse- quently, x(2) — *(V2) counts the number of prime numbers > yz. But the number of positive integers < «which are divisible by none of the primes p),pay..-sPr is equal to oS Ua 2 lal, bao) tee (UP lc al Indeed, let n be an integer < x which is divisible only by the prime nnumibers pa,pes--+ Pri in this case, the sui is equal to t-()e()oevil) tara while if n is not divisible by any of the primes pi,...,pr, then its contri- ‘bution to the right-hand side is obviously 1 REMARK: Observe that expression (+) can also be written as Xam [2] (222) Leta > 5. From Conjecture A, if is even, there exist two prime numbers p and q such that n—2=p+q that is n = p+ +2; while ifn is odd, there exist two prime numbers p and q such thet n —3 = p-+q, so that n=p-+q +3. In both cases, Conjecture B follows. Let ni be an even integer > 4. From Conjecture B, there exist three prime numbers p,q,7 such that n+2=p-+q+r. Since n +2 is even, itis clear that one of the three prime numbers p,q,r must be even, that is equal to 2. Assume that r = 2. It follows that n = p+, which establishes Conjecture A, (223) (This result is attributed to Mind; see P. Ribenboim (29]). First of all, wwe observe that if n #4 is not a prime number, then n|(n— 1)!. Indeed, either n = 0b, with 2 6, then jl(j ~ 1)! in light of the above observation. ‘Therefore, there exists an integer k such that (j1)! = Aj. it follows that (bs ! Finally fj =4, we hve [°F com the pro! a ipletes the proof of Mindé’s formula. 4@)= 1-5 It is therefore easy to see that the quotient A(n)/n tends to 1/a as (&) We have Am=YI~ Ys Ya- Y Th. SE -d1 - It is therefore easy to see that the quotient A(n)/n tends to as n= 00 (c) Using the inclusion-exelusion principle, we have - EG) Sal... live ~teut [As] SOLUTIONS 9 It follows that we Zrlel- Slee] ” mr HS ccjon™ (aids lea meee (ccyrnt [ n |g al 1 + But, as n — 00, this last expression tends to x 1 richer OY reibzeece sere f(t) na as required, (225) We will show that To do s0, we prove that ‘AQ™+) (2) iim, ae Jim, a = 3 Indeed, AQ) Dit Vit Veet Yo ieee Ste kate sieges 1+ (29 = 2) + (25 — 28) pos + (2241 — 224) = 14 RHO 2 1444s begat (asa) It follows from this that AQ On the other hand, a@)=Sis Yi > which implies that tim 42) Kato OR 3 (226) To each clement a € A, we associate its largest odd divisor dy. Its clear that all the d's ate distinet; indeed, if d; = d, for two positive integers i j, then ajla; or ajla,, which is possible only if i = j. It follows that A(@n) ai}, where p(n) stands for the smallest prime factor of n. Let also C; = a,B; = {ai-b: b € By). The sets C, are disjoint indeed, if axr = ajs (with q iow ing ‘The result then follows by combining (1) and (2). (228) Part (a) is obvious. "To prove (b), first observe that the norm of every clement of Eis always > 5. Assume that 3 = (a++by=8)(c+dy/—5); taking the norm, we have 9 = (a2 + 5b2)(c? + 5d2). ‘This is however impossible since both factors on the right-hand side are larger than 5. Hence, 3 is a prime belonging to B. We easily obtain that 20 = (8+2v=5)(3 ~2V=5) and is therefore a composite number in B. Part (c) follows from the fact that 9 = (3 + 0V=5) - (8 + OV—5) = (2 + V-5)(2 - V5), (229) Since 1 ifned, 0 otherwise, sian ={ wwe have that y aw site = S00 aa) Af), ACz) Limen tsi SOLUTIONS 181 (230) Let n be a palindzome with 2r digits. Hence, there exist digits di > 0, da,..-ydy stich that 107-1 + dg10""-? «++ dy 10" + dp lO! + +dsl0? + dal0 + dh 44, (10"—" +1) + de(10"-? 410) +--+ dy(10" + 107) (10-1 +1) + 10d2(10°~9 + 1) +--+ 10'-Pde_4 (10? +1) +10", (10+ 1). ‘The numbers 107+! +1 for i = 0,1,...4r —1 are all multiples of 11. Indeed, using the Binomial Theorem, we obtain that 10 $1214 (1-1 14 > (on mS Jenin =11M for some positive integer M, in which ease the number m is divisible by UL (231) Iris enough to consider the next number, since 1442 = [6,6,2h5 = 6! + 6! +2! (232) Assume that two such representations exist, that is that there also exist positive integers ey < ea <... < ey such that nad tdglt-- td =e! teal +o tert We proceed by induction. If r = 1, then it is clear that d, = e1, in which case the result is proved. Assume that the result is true for r~ 1, and let vs show that it is true for r. Without any loss in generality, we may assume that d, > e,. If dy = e,, then the conclusion follows by an induction argument. We may therefore assume that dy > ey, in which case dy > +1. We then have (ep FINS yl < dil + dal tent so that e, +1 r, a contradiction, and the result follows. (233) (Sierpinski [39], Problem #194) Assume that an integer solution {x,y} does exist, We then have (+) PHL a yh+ (20)? = (yt 2e)(y?—2ey+ de?) = (y+3e)( (ye)? +3". 1 (mod 8), we have 3c? = 3 (mod 8). First of all, if y is even, al teal testes! Srey, y+ (20) 7 (mod 8), 2 contradiction. ‘On the other hand, ify is odd, then y —e is even and (y — ¢)? + 322 is of the form 4k +3. It follows that (yc)? + 3c? has a prime divisor of the fon 4k +3, which is then itself a divisor of 2? +1. But this is impossible because we would then have that the congruence 2? = —1 (mod p) is solvable, which is false since (=!) = —i, where (3) stands for the Legendre Symbol (see Definition 21). [As for the second part of the problem, the infinite set {8e—1 |e = } will do. asa 1001 PROBLEMS IN CLASSICAL NUMBER THECRY (234) (Sierpinski [39], Problem #211) We observe that, for n > 4, we have 5th 5" = 554-1) <5". 24.39 = F-25439 108 39, ‘Therefore, 5" = 5" (mod 10000). I¢ follows that the block of the four last digits of 5" repeats itself for each number 5"**. We easily verify that these “periodic” blocks are 0625, 3125, 5025 and 812%. (235) It is clear that it is enough to consider the cases of two and three cubes. For a € Z, we have a? = 0, 1,8 (mod 9). From this it follows that, given any integers x and y, we have 12,78 Pty 1,42 (mod 9), This implies that not all integers n = 3,4 (mod 9) can be written as the sum of two cubes, Similarly, given integers 2, y and 2, we have 0,1,2,3,6,7,8=0,+1,42,43 (mod 9). Pry+e This implies that not all integers n = +4 (mod 9) can be written as the sum of three cubes. (236) (Anglin (2}, p. 194). Let m be this integer. First of all, it is clear that is an integer. It is then easy to see that m= m4 (b+ 1) + (k= 1) + (RY + (898, which proves the result, (237) (The College Mathematics Journal, March 99, p. 144; solution by T. Amde- bertan). Let (m,n) be such a pair. We write m = didy---dy, where dasdo,.-.sdy stand for the digits of m. We then have 101 1), and consider the fraction n/m, n 2 be the unique integer such that lon rm "==, Ths compet he prs (b) Here indeed is a counter-example: (6) The result follows immediately from the identity A 4m+3 m+2° (m+1)(m+2) © (m4+1)(4m+3) REMARK: Paul Erdés made the fellowing conjecture: For each integer n> 4, the faction 4/n can be written asthe oum of three distinet unitary Fractions (239) First of al, itis clear that if nis complete, we have VI0-104 2, we must have party and (r—y)P+2y=1, which proves that x = y and ry = 1 and therefore that Land p=2. (241) First let p = 2° vy, with 2,y €N. Then, p=(e-wWe?+ey+0"), so that 7 y=1 and pa=Ptayty=(ytl? + (yt Duty? =3y +341 = 3y(y +1) +1, which proves the first: implication. (242) (243) 1001 PROBLEMS IN CLASSICAL NUMBER THEORY Conversely, assume that the prime number p is of the form p = 3k(k-+ 1)+1 with EN. Then, letting 2 = k +1 and y =k, we obtain p = Sk(k+1)4+1=3k7 + 3k+1=(k+ 1)? + (+1) R + RP = Pray ty =(e-Weseuty)=2—y, and the result is established. ‘Tre ten smallest prime numbers of this form are 7, 19, 87, 61, 127, 271, 331, 397, 547 and 631 REMARK: AS of 2006, we still do not know if there exist infinitely many prime numbers of this form, a result which is actually a consequence of Schinzel's Hypothesis H (stated on page 12). First of all, if @ and b are two even integers, itis easy to see that a — 1? is of the form 4k, while if a and b are two odd integers, a — Bis of the form 8k. On the other hand, if one of a or b is even and the other odd, a2 — Bis odd. These observations prove that the coadition is necessary. Assume now that n is not of the form 4k+2. This means that either ‘is odd or it is of the form 4k, If itis odd, then n 1 and n+ are both even, in which case #51 and "4 are integers. It follows that ya (BEL)? _ (mat)? PED oa }o On the other hand, ifn is divisible by 4, then n= (GH) - (7-1) We have thus proved that the condition is sufficient, and the result is proved REMARK: It is interesting to observe that this result allows one to directly solve Problem 2, that is without using the expression for Ty. A? (Contribution of Nicolas Doyon, It is easy to notice that the decimal rep- resentation of an automorphic number ends with a 5 or a 6. We will display an algorithm which allows one to construct infinitely many auto- morphic numbers ending with the digit 5. So iet n be an automorphic rmumber with r digits ending with the digit 5. We now show that the num- ber m made up of the r +1 last digits of n? is also automerphie. Since nis automorphic, we can write m =d- 10" +n for a certain nonnegative integer d. We then have m? = d 10% + 2nd 10" +n? Since n ends with the digit 5, the mumber 2n-10" ends with r4+1 zeros. ‘The +L last digits of m? are therefore equal to the r+1 last digits of n®, which are in fact equal to the digits of m. Hence, m is automorphic. Iterating this process, we conclude that there exist infinitely many automorphic mumbers. This Inst algorithm allows one to build the sequence of automorphic numbers, whose first terms are as follows : 5, 25, 625, (0625), 90625, 890625, 2890625, 12800625, 212890625, .. ‘A variation of this algorithm allows one to build infinitely many au- tomorphic numbers ending with the digit 6 SOLUTIONS 15, (244) (Contribution of Nicolas Doyon) In the case where one of the digits of mis equal to 0, the result is immediate, We may therefore assume that d. #0 for 10-1 — 9"-! > 0, it follows that nl = (d+ Dida ody > did ---d as we wanted to show. Assume now that n nt 101, seserydesisdesasssyde). Let us show abc that the difference n ~ dhjadkya++dy is minimal when dey = 1 Set nl = (Lp dderi + Ledeazs--s€el- Since né = m+ 107K, we have Wt = (diy + Udagarode = n= dey idyya-sdy +107"! ~ deyadess ++ dy. Since 10°"*! — dasadesg+++d > 10"-*-1 — gr-F=! > 0, it follows that Ww — (deer + Udgpa-o-dy > n= dey idyya-*-dy and therefore that the difference n — deyidg42*-dy is: minimal when dys. = 1. By induction, we obtain that the difference n — didz---d, is minimal when n = (1,1,...,1,d,]- We conclude from this that if all the digits of n are different from 0, n~didz---dy > UL 0 > 107-1, thus completing the proof (245) (Contribution of Nicolas Doyon) We will show that this number is 97247. Let n be a number having this property and whose digits are d,day...yd. ‘We must then have na dt dt db + dada -ood From the preceding problem, and since n > 9, we have 10"! < n= dude «dy. We then have the inequalities WW cdf sdf pe dh 7. It follows that n cannot have more than 6 digits and is therefore smaller than 10°. Using a computer, we easily find five numbers satisfying the given property, namely the numbers 1324, 4150, 16363, 93084 and 97247. 1001 PROBLEMS IN CLASSICAL NUMBER THEORY (246) Let ay = 2, a2 = 12, ay = 112 and ay = 2112, Having determined ay = 1b, 1, k > 3, here is the algorithm allowing us to determine © ifby-1 is odd, set ay = 10" + ay # if bj is even, set ax = 2-10"! Fay. It is then easy to check that the number ay thus chosen satisfies the conditions (i), (ii) and (ti). Using induction, we easily prove that this sequence is unique. The first 14 terms of the sequence are 2, 12, 112, 2112, 22112, 122112, 2122112, 12122112, 212129112, 1212122112, 11212122112, 111212122112, 1111212122112 and 1111121122112. (247) In fact, itis enough to prove that the smallest number n such that s(n) = k isn = (a+ 1)10°— 1, where b = (K/9] and a = k—9b. First ofall, clearly, in order for n to be as small as possible, the digit 9 must appear as often as possible and at the end of the number n. But the maximal number » of 9's that one can place at the end of n is b = (k/9], and to obtain s(n) = k, the first digit of n-must be a = k—9b. The number n is therefore n = a99....9. Hence, n = (a+ 1)10%— 1, as was to be shown. (248) (This is part of the problem proposed in Problem #10605 [2997,p. 567] in AMM by J.W. Borwein and C.G. Pinner; solution by D. Bradley, 106 (1999), p. 173.) For m fixed, set f(n) = n(n —_m)/(n® — mn-+m®), We then have f(n) P(m) = I Fins my It is clear that the product is then telescopic, in which case we obtain P(m) = = 1 ntm neem (omy? FT as required. (249) We will show that the numbers 1, 2, 145 and 40585 are the only ones with this property. Indeed, let n be such a number. ‘Then, () dy! + da! + bdo, SOLUTIONS 1st where di,dz,...,dy are the digits of n. By trial and error, we end up seeing that n = 1, n and n = 145 satisfy relation (+). On the other hand, we can show that the number of positive integers n satisfying (+) must be finite, Indeed, it is clear that such a number n must satisfy the double inequality 10! < n= dy! + da! 4+ yl 8, that is ifn > 10’. Therefore, any solution of (+) must be smaller than 107. Hence, using a computer, it remains to examine each number n < 10" to check if it satisfies the condition («), a process tat reveals that che additional nuraber is indeed n= 40585, (250) We will see that this number is n = 2592, because we have 2592 = 2° - 9”, ‘Assume that the number n = didz-+ dz, satisfies the property, «) madi dit dit Then, it is clear that 10% en ck 9, ‘an inequality which can only be satisfied if & < 5. This proves that there exist only finitely many numbers with this property. But this also means that it is also possible, theoretically, that such @ number n could have as ‘many as 10 digits. We should therefore find a way to limit the number of computations in order not to have to check each number n < 10}°, Such fa task is possible, because the only possible factors of any n satisfying (4) are 2, 3, 5 and 7 (since its digits belong to the set {0,1,2,...,9}). It follows that n is of the form n= 2.38.57. 74, for certain nonnegative integers a, 8,7, 6. Since 2° < 10" only if a < 33, 37 < 10" only if § < 20, 57 < 10" only if y < 14, and 7° < 10" only if 5 < 11, itis easy to see that the number of possible candidates is at most 34-21" 15-12 = 128520. Hence, using MATHEMATICA, we can write the following program: Do[n=2"ae3“be5"c+7"d;velntegerDigita la] ;r=Lengeh[v] ; I¢{Bvend)[r] && (Apply [Times Table (v[(2*i-1]], {4,1,2/2}]]! 0) te(Product [v[[24i-1]] “vE[2ei]} ,{4,1,2/2}]==n), Print{a," ",Factorinteger [nJ]], {a,0,33},(b,0,20}, {c,0,14},{4,0,11 }] « program that reveals only the number n = 2592 = 2° 34 (see Dudeney i9)). (251) Such a number n must satisfy 10! 6. We must therefore have + <5, that isn < 10°, Using a computer, we then find that the only numbers having this property are 12, 90, 666, 870, 960 and 1998, (252) Tt follows from the relation ) Baghtr (isr<2h) that the number n = 2 — 1 trivially satisfies the inequality 2 < 3*. Hence, the only admissible positive values for the 2's in the representation nedktat total 2. It follows that FRG TELE t= (1) 24H -1)-1 pectanteeetae Since from (+) we have q = {(3/2)*], we have thus established that [0 (253) The required numter is 69: indeed, we have 69? = 4761 and 69° ‘To show uniqueness, we first observe that 47 q-14+2-1=2-24q (287) souvTions 130 above nine numbers are indeed the only solutions of (+). Since, for each number n with r digits, we have wi! 10*, Therefore, to find all the solutions ‘of (+), we only need to examine one by one each number n < 9999) (258) First of all, we observe that if f(n) > m for a certain positive integer n= dydy--dy, then 10) n (since ifn > 10%, we necessarily have J(n) 2, there exists a polynomial p(x) of degree k with integer coefficients and a positive integer ‘m such that r= p(o). Indeed, frst let m = [n'/*], By writing n in basis 1m, we obtain neg +qamhl poe perm + eo, where ¢; of course 0 < ¢j q5 > which implies that 2/3 ne 1/3 a> which contradicts (8). If che condition is instead given by (2), then if 3jn, there exist prime numbers p and g both different from 3 such that O=n=9tp'+q=1+1=2 (mod 3), which contradicts the fact that n =0 (mod 3); while if3 does not divide 1, there exist prime numbers p, q and r all different from 3 such that Odn=P4@ tr =1414+1=0 (mod 3), again a contradiction. REMARK: There exist at least eight numbers n (with n # p*) such that n= Joy), p, namely n = 378, 2548, 2836 295, 4473 671 462, 23040 925 795, 13579716377 989, 21 467 102506 955 and 119 429 556097 859. (Contribution of Jean-Lou De Carufel) We will show that n = 3 is the only number with this property, so let n be such a number. There exists 1 positive integer r such that 10"! 2, we find, since n® = 0,1 (mod 4), 0 = 0-1 (mod 4) 0-1 (mod 4), s0 that 0 = 3 (mod 4) or 1 = 3 (mod 4), which ible. Hence, we must have r = 1, in which case n? = 10! —1=9, 3, as required ‘These numbers are 42 = 2-3-7=24347, 40 = 2 F547, 290 2-5-29= 2945429, 618 = 2-3-103=2 +3+ 103, 2058 = 2.3.79 6747 = 3-13-173=3° + 13+ 173, 131430 = 2-3-5-13-337= 2743454134337, SBL53L = 3? -7-11-13-59= 3 +7411 +13 +59. ‘To find these numbers, we first observe that the number r of prime factors of n satisfying (*) must be odd. Indeed, assume that r is even. If g: = 2, then n is even and go +++ qr is odd, but. n= 2" + qz-+++++q, is odd, a contradiction. On the other hand, if 9, > 3, then n is odd and g2+---+ a, is odd, in which case n = qf + q2+---+4y is even, a contradiction. We SOLUTIONS 181 ‘must therefore have r > 1, r odd. On the other hand, since for any integer 1 satisfying the given property, we must have a Gate +a), it is enough to verify that logy, (n — (ga +++ +4r)) is an integer The following MATHEMATICA program (which generates the numbers r fn question, the corresponding exponent a and the factorization of n) is therefore quite efficient (below, facters{n] stands for the prime factors of n) Dolw-factors nl ; 34 (OddQ(e=Lengeh (v) ]k&(r>1)e Integer@[a-Log(w[{1}] .n-Apply (Plus, Takelw,-r+1]]1], Print["n=",n," a=",a," ",FactorInteger (n]]1, {n,2,1000000}1 REMARK: The other numbers n< 4-108 with this property are = 5124615 =3-5-341641 = 9! 45 + 341641, 14356 161 = 3? 227. 7x7 = 3! + 227 +7027, 34797 196 = 2? «7. 1249757 = 2 +7 + 1242757, 40.265 322 = 2. 3- 6710887 = 2°° +3 + 6710887, = 67239998 = 2. 257- 190817 = 2°° + 257 + 130817. Bessa (264) (MMAG, Voi. 63, no. 2, p. 129). First of all, it is clear that if n is a product of Mersenne primes, then n = [],, (2%! — 1), where the product runs over certain prime numbers p;, in which case we have = [2 = 22, (7 which proves that the condition is sufficient. Assume now that there exist, prime numbers q; <.-. Ln 21) Since 2N = K(k + 2n — 1), it follows that 2N' must have an odd factor larger than 2, and therefore similarly for N. It follows that .¥ cannot be a power of 2 Conversely, let NV’ be a postive integer which has an odd factor larger than 2. Consider the factorization of 2 as a product of two positive integers of which one is odd. Let A be the smallest of these two factors and B the largest. Setting k = A and n= ®#1=4, it follows that (+ which gives the result REMARK: Since A=1) , BHI-A_ AB () hn 1424-04 (k= 1) thn nt (ntl) tt (ntk-1), the problem is equivalent to the one that consists of searching for the positive integers which can be written as the sum of consecutive integers. (266) They are the integers n of the form n = din +2, m = 0,1,2... since 3072 = 9 = —1 (mod 10), while 3 = 1 (mod 10), 3°41 =3 (mod 10) and 3°" =7 (mod 10). (267) It is the number 5. Indeed, since n! = 0 (mod 7) as soon as n > 7, we have W414 + 50S 4143s alt al + el 424643+146=5 (mod 7). (268) Since for i > 4, 12|i!, the remainder is 1+2+6 = 9. (269) For n odd, 10:32" +1 = 0 (aoc 3), while for each even integer n, 10 32" +10 (mod il), (270) The answer is YES. Since n® = 1 (mod 9) for each integer n such that and since n? = 4 (mod 9) for n =2 (mod 9), it follows that if 2 (mod 9), we have n®-+n2444 =0 (mod 9). On the other hand, since 0 (mod 4) for all even n, we may conclude that 36|n® -+n?-+4 for n= 18k +2, k= 0,1,2, (271) Ifthe equation 3k — 1 = 22-4 3y? had a solution, then we would have 2 (mod 3), which is impossible because 2? = 0,1 (mod 3). (272) We know that PI low nf tox] | SOLUTIONS 16s Amongst the integers 1,2,...m, those which are divisible by pare: p, 2p, Aap, where ky ~ [n/p Since nl =1-2---(p— 1)(p)(p-+ 1)(p + 2)--- (2p — V2p) (2p + 1)(2p + 2)-+-(3p — 1)(3p)((k1 — Dp +1)((k1 ~ 1p + 2 (kip ~ U(kxp)(kip + 1)(kap + 2)--m and since from Wilson's Theorem, the product of the integers in each set {1,2,....p— 1} {pt 1p +2,...,2p— 1p... {(ki — Dp +1, (kx ~ 1p 2,...)kyp— 1} is congruent modulo p to ~1, it follows that (mn Now, amougst the integers 1,2,..-,k1, those which are divisible by p are: P.2p,...,kap, where ky = [kx/p] = [n/p?]. It follows that ican )(E]- [3 mo where 1 < hy < ky. Continuing this process, the result follows, (273) We must show that n!*—n = 0 (moa 10) or equivalently that n!* (mod 2) and n'? —n = 0 (mod 5). Using Fermat's Little Theorem, n? = ‘n (mod 2) which implies n'’ = n (mod 2). Similarly, n® (mod 5) implies n!3 =n (mod 5), (274) Since n must be divisible by 7 and by 11, it can be written as n = 7*- 11°, But n/7=7"-1. 11° must be the 7-th power of an integer, in which case a = 1 (mod 7) and b = 0 (mod 7). Moreover, n/11 = 72-11? must be the 11-th power of an integer, so that @ = 0 (mod 11) and b = 1 (amod 11). Solving this system of congruences gives @ = 22 (mod 77) and = 56 (mod 77). Hence, the smallest positive integer satisfying the given constraints is n = 7? - 115. (275) Consider the system of congruences 2-+j-1 = 0 (mod p2), j = 1,2,....4% where pj stands for the j-th prime number, From the Chinese Remainder Theorem, this system has one solution; that is there exists an integer ‘n which verifies these k congruences. Therefore, each of the & integers non 1,...,n-+k~ Lis divisible by a perfect square, as required (276) Since x’ =a (mod m), there exists k € Z such that x = a+ km and therefore a + km = b (mod m). Hence, there exists j Z such that a+km = b+ jn, that is km— jn = (a8). Since (mn,n}im and (m,n)In, it follows that (m,n)|(a — 8). Reciprocally, assume that (m,n)|(a~ 2). ‘Then, there exists Mf € Z such that, a— 5 = M(m,n) and since (m,n) = kim + kan, kiyks © Z, it follows that there exist integers j and & such that a~b— —km + jm, k= kM, j = kM. Therefore, we have a+ km = b+ jn, Setting 2 =a4+-km, we obtain x = a (mod m) and moreover 2 = a-bim = b+jn, that is 2 = (mod n). (277) Letting WV = (2), then KIN = p(p—1)--(p—k +1) =0 (mod p), and since (k!,p) = 1 then N = 0 (mod p). (278) (a) This follows ftom Problem 277 and induction on n. 164 1001 PROBLEMS IN CLASSICAL NUMBER THEORY (b) Since a? = bP (mod p), then by Fermat's Little Theorem, we have a =b (mod p) and therefore there exists an integer k such that a b+ kp. Hence, by the Binomial Theorem, there exists an integer K such that a? = (b+ kp)? we (Pee + (t)e ter + EMP AP + Kp, where we used the result of Problem 277, thus completing the proof of part (b). " (279) Let N= (P52) = P=VEO=2)- 8) We then have HN = (1)! (mod p) ‘and since (k!,p) = 1, we conchide that NV = (~1)* (mod p). (280) From Wilson's Theorem, (=D! = PDP) — p=)! = (-1)rMp— I= —1 (mod p). Since (—1)"r!=1 (mod p), we obtain the result. For the second part, it is enough to xotice that (—1)99! = 1 (mod 269) and that (—1)!915!= 1 (mod 479). (281) Assume that a solution exists. First, if @ is odd, ay? » -2 #0 (mod 3), which contradicts the given equation. Similarly, if 3 is even, (20-1) (2%? +1), which means that 3[(2/? —1) > 3 or 3[(2%/? + 1) > 3, and this is why we must have that p|(2/ — 1) and p\(2*/? +1), implying that p|2, which is not possible. (282) (P.Giblin [14}) Ascume that q is a prime factor of n. Since m is odd, it follows that q is odd. We will first prove that pl(q — 1). Observe that 4” = 2" =I (mod n), so that 4° = 1 (mod q). It follows that r, the ‘order of 4 modulo g, is «factor of p; we therefore have that r = 1 or r= p. If = 1, then 4 = 1 (mod q), which implies that q = 3, in which case 3[7, which contradicts the fact that n is not a multiple of 3. Hence, r = p, which implies that plq— 1, as required, We shall finally show that Since q— 1 > p, we have g > p—1>n/2> yn, because n > 4. We have thus shown that each prime factor q of nis larger than /n, which is impossible unless n itself is a prime number. (283) (Francesco Sica) Assume that pja—b. Then there exists a positive integer ¢ which is not divisible by p and such that Y boas eph, SOLUTIONS 2065 We then have valerate ~ S(Pewinen = ott tgt + Dae 222 tant gH) = oP +algt*) (mod pt?) We have ths established that (+9) a — = aPtepk** (mod pt), hence, in particular (+). Moreover, it follows from (e+) that p+? divides a? -+a?"lep**, bat, since p fate, it follows that p!+? divides exactly a? — B, as required (284) The answer is NO. If p = 2, then pjl, a contradiction. Hence, p > 3. If 5 is even, then p! +1 =1+1 = 2 (mod 4) while 2” = 0 (mod 4), a contradiction, while if 6 is odd, then 2 = ph +1 (pt ip? ph? +--— pt) = @+NQ where Q > 1 is odd, which is nonsense. (285) Ifa solution {m,n} exists, then it is clear that n> Land that m>n>1, in whieh case 1+n=m! (m—n)(m+n)>m+n>1+n, which is nonsense. Second solution. Assume that 1+ n+n? =m? with n > 1,m>1. We then have 4+ 4n +n? ~ 4m? and therefore (2n +1)? +3 But, the only squares which differ by 3 are 1 and 4. This impli n=0, Which contradicts the fact that n > 1 (286) Let (1) be the equation for which we seek the solutions and let {p,q} be ‘a solution. First of all, it is clear that @) P+i pis p tp+ps1= But it follows from (1) that p(l +p-+#?-+ #4) = 4? -1=(@— {4+ 1) and this shows that pi(g--1)(a-+ 1) It follows that pl(q 1) or pl(q +1) Wolq— 1), then it follows from (2) that pi 1. But this quantity is equal to 3n?-+3n +1, which is congruent to 1 modulo 3, thus the result. Similarly, we prove that (n + 1) —n? # 0 (mod 5), for each integer n > 1. Indeed, it is enough to consider n = 5m +1, 17 =0,1,2,34. SOLUTIONS ser (298) This is true since 2(32)" 4.595" = =0 (mod 27). (204) Since 98° = ~169 = ~13? (mod 337), the result is immediate. (295) Since 193° = 9 (mod 10), then 1918 = 191 for a certain integer &. We thus obtai 19° = 79 (mod 100), which implies that the last two digits are 7 and 9. (296) We have 280 = 2°-5.7 and since both @ and b are odd, then a? (mod 8) and 6? = 1 (mod 8). Therefore, a!? = 1 = b!? (mod 8). Using Fermat's Little Theorem, a = bt = 1 (mod 5) and therefore «al? = b!? (mod 5). Simitatty, Fermat's Little Theorem allows one to obtain a'? b'? (mod 7). ‘The result then follows by combining these congruences. (297) We only need to observe that 2730 = 2-3-5+7-13 and use Fermat's Little Theorem five times (298) The required integer is 21424. Indeed, we must solve the congruences n= 4 (mod 12), n = 4 (mod 17), n = 4 {ewod 45), n = 4 (mod 70) ‘The first two are equivalent to n =4 (mod 204), while the last two give n= (mod 1530). Finally, the solution of these last two congruences is ven by n= 4 (mod 21420), which gives the result (299) The answer is YES. From Fermat's Little Theorem, n!? =n =n (mod 7), nll =n (mod 7) and n? =n (mod 7), so that the polynomial is con- sgruent to 3n-+4n° +n + 3n5 +3n = 7n+7n® = 0 (mod 7). Thus the result (300) Since (*0) 7, p prime. An integer N’ made up entirely of “1” can be written as N = (10" — 1)/9. But from Fermat's Little Theorem, 10°-* = 1 (mod p), which means that, 10"-) = 1 (mod p) for m = 1,2,3,.... Since p ¥ 3, this means that p\(10"-9 — 1)/9, for m = 0, 1,2,3,..., and the result follows (307) Indeed, we easily check that 2% = 1 (mod 341), while n = 341 = 11-31 is not prime, (308) (AMM, Vol. 67, 1960, p. 923). From Fermat's Little Theorem, it fol- Jows that 6° = 6 (mod 3) and 8% = b (mod 2) nd therefore that 6° = b (mod 6). Since 6° — 6 = (0? — 1), we have PHP 1POE Poe PHI) and therefore 6 ~b is a factor of b? ~8, in which case 6” —b = 0 (mod 6). Fermat's Little Theorem allows one to writs 6? — 6 = 0 (mod p), and since (6,p) = 1, we have 6 — 6 = 0 (mod 6p). Similarly, we obtain (mod 6p). Combining the congruences ab? — ab = 0 (mod 6p) and —ba? + ab = 0 (mod 6p) then yields the result. (309) The answer is NOT ALWAYS. Assume that n is an odd integer. Since 1424+ (n= 1) = n(n —1)/2 and since n is odd, it follows that (n—1)/2 is an integer and consequently the congruence is true. Assume that n is an even integer. Letting n = 2m, then 1424---+(n—1) =m(2m—1) £0 (mod 2m). (310) Using the formula 37}, = ““+Y@H+ (see Problem 1), with k =n. we obtain that n must satisfy n = "+1 (mod 6). (BL1) ‘The answer is YES. Since 12 42° +--+ (n—1)? = n-n(n—1)2/4 (see Problem 1), it follows that the congruence is true if n® ~ 2n? +n = 0 (mod 4). Setting n = 4m +r, 0. 1, we have +282 (mod +4), then the result will follow. But this last congruence can easily be obtained by induction on k. For k= 1, the result is immediate. Assuming that. the congruence is true for k, that is that 5° = 142? + M2 for a certain positive integer M, then squaring each side of this last equation, wwe obtain st 21423 (mod 24), ‘The general case can be handled essentially in the same manner. (314) This follows from the fact that the given expression is equal to ain nbon ss which using Fermat's Little Theorem is easily seen to be an integer. (815) is clear that 2 = 0 (mod 13) is not a solution. So let 1 < x < 12. Then, from Fermat's Little Theorem, we have that x! = 1 (mod 13) and this is why 2% = 1 (mod 13). The congruence to be solved can therefore be reduced to 7x = 1 (mod 13), which leads to the solution + = 2 (mod 13). (316) The seven pairs are {2,9}, {3,6}, {4,13}, {5.7}, {10,12}, {11,14} and (8.15 67) Since) = 1 for i # jit follows from Euler's Theorem that mf = 1 (mod mj). Since the function ¢ is a multiplicative fune- tion, we have mi") = 1 (mod m,) for i # j. On the other hand, +n, m$/905) = 9 (mod ms), 90 that for j = 1,2,...,7, we obtain Pl/4on 4 ya BOMBED. 4 pg/ 40) =p —1 (mod my). Since the integers m, are relatively prime, the result follows, (318) From Wilson's Theorem, @- Y=) @-(k-N—~ 1)" = 1p = kt and multiplying by (—1)*"1, the result follows. (819) The answer is YES to both questions. We first use Fermat's Little Theo- rem for p and then for q, in which case we obtain pty g ts (mod p), p+ gts since (p,q) = 1, and the result follows To prove the second part, we cali upon Euler’s Theorem. (mod p), (mod q), 170 1001 PROBLEMS IN CLASSICAL NUMBER THEORY (320) We have PM? = 9(9") = 9(8 +1)" = 98" 4B"! BND) (er 41a 4 t=) won, and this is why 3? = 72n+9=8n+9 (mod 64). (321) We will prove that the required GCD is equal to p. First of all, from Wilson's Theorem, it follows that for p prime, (p— 1)! = —1 (mod p), 1 congruence which can be written as (p ~ 2)!(p ~ 1) = —1 (mod p), ‘implying that (p~2)! = 1 (mod p) and therefore that p| ((p~ 2)! ~ 1). It remains to show that if 2 < k < p= 1, then k does not divide (p—2)! —1 But if2 < k < p-2 and hl(p—2)!~1, we obtain that kl, a contradiction It remains to consider the ease when (p ~ 1)| ((p—2)! 1). Since p is a prime number, p— 1 is an even number, and therefore, using Problem 180, (p ~ 1)|(p — 2)! except for p—1 = 4, that Is when p = 5. Hence, (P- 1){ ((p—2)!— 1) for p> 5 (822) This follows from the fact that dividing by 7 the number 5% leaves 4 as ‘a remainder, while dividing by 7 the number 125°” leaves 3 as a remainder. Indeed, 0014 = yor _ 99200142 _ 32204. 4= 4 (mod 7), 12557 a gBSr gousres = 12. 5 = (2S (mod 7). (323) (a) Since 10= 1 (mod 3), we have BIN <5 aqlO™ ---+a310-+ay =0 (mod 3) > ay te +a +a =0 (mod 3), (b) We have 4IN > al0"$+--+a110+a9 =0 (mod 4) <=> Wa; +a9=0 (mod 4), since 10/ = 0 (mod 4) for each j > 2. (©) We have IN > ayl0" 4-4 0,104 ap =0 (mod 6) So Alan +--+ +02 +41) +9 = 0 (mod 6), > Aan +++ + a2 +4; +49) = Bay (mod 6), since 10) —4 = 0 (mod 6) for each j > 1; indeed, 10/ —4 = 999 ,..96, ‘a number which is even and divisible by 3. (4) IF. has three digits (that is n= 2), then the result is obvious. We examine the case = 3, 80 that N = 1000as + 100a2 + 10a; + ao ‘We must prove that 10003 + 100a2 + 10a; +a =0 (mod 7) <= 100a2 + 10a, +09 ~ ag =0 (mod 7) SOLUTIONS m ‘This boils down to proving that 100243 + 10002 + 10a +a ~ a3 = 0° (mod 7) = 10002 + 100 +a) — a3 =0 (mod 7), an equivalence which is easily verified since 7|1001 ‘To prove the case n = 4, we proceed essentially in the same manner, this time using the identity 10%ay + 10%as + 10a2 + 10a + 06 = 100102, + 100143 + 10002 + 10a + ap ~ (1044 + a3) and by observing that 7|10010. ‘The same argument. works also for the case n= 5. If n> 6, we use the (101) (10° +1), wl To® — 100 = 102(10° (©) We have BIN > al" 4.--4 110-49 =0 (mod 8) ++ 10002 + 10a; +49 = 0 (mod 8), since 107 = 0 (mod 8) for each integer j > 3. (f) Since 10 = 1 (mod 9), it follows that sme argument by also observing that 10°— 1 = 7/108 +1; that: 107 — 10 = 10(10° — 4); that 1); and so on. QIN 5 aqlO" +--+ 01104 a9 =0 (mod 9) Say tee tay +09 =0 (mod 9). (6) We have nN ay lO" +--+ asa =O (mod 11) ay (1= 1)" $0, (11-1) +a;(11—1) +49 =0 (mod 11) 1a + (1 Taye aq =a, +490. (mod I) SU {(-1ag + (DM + +a a1 +09} =0 (mod 11) ay yg to + (1) an + (“1)"a9 0 (mod 11), and the result follows. (324) Observe that 168 = 83.7. Since 8|*770ab45¢", it follows that using Problem 215 we have 8|*45e” and then © = 6. Similarly, 3|°770«056" implies a+b = 1 (mod 3), and 7)"770ab456" implies (asing Problem 323 (e)) that 456 — (10a +b) +77 = 0 (moxt 7), that is 3a +6 = 1 (mod 7). ‘Therefore, a+ = 1 and Sa +6 = 1, which allows us to conclude that a =0 and b= {, The three required numbers are therefore a = 0, b= 1 and c= 6, (825) Since (a,m) = 1, using Euler's Theorem, we have 0 (mod m). aot) 1001 PROBLEMS IN CLASSICAL NUMBER THEORY But (a — 1)(a4™)-1 + g™-2 4. a +1) and since (a ~ 1, m) (326) If pla, then a?~1)'+1 1, and it follows from Fermat's Li = 1 (mod p) and therefore that al?-1)! = (aP-!)®"*" = 1 (mod p), in which case a1 = a (mod p), as required (827) Using Fermat's Little Theavem, pt ye - hehe tm litte (628) Using Fermat's Little Theorem, we have a? = a (mod p) for each positive integer a. Hence, PEP et -UP SLEDS + p= ppt N/2=0 (mod ps since p+ is an even number. (329) This is a consequence of the congruence (K —1)1(p—k)! (see Problem 318) and Fermat's Little Theorem, because De - Diemer AVP p21 gt gp Pte pe 1+ 1-14----141=0 (mod p). (380) From Wilson's Theorem, we have (4n)! = (4n)(4n — 1) [an ~ Qn — Jn} Since 4n = p—1 = 1 (mod p), we have 4n 1 therefore 4n ~ 2 = p—3 (mod p), and the result follows. For the generalization, we have from Wilson’s Theorem (m-+n)! {mod 7), and therefore (9) (m+ n)(m4n—1)---(m+n—(n—)]m!=—1 (mod p). We have m-+n = p= 1= =I (mod p) and m+n~1= ~2 (mod p), and s0 on, until we obtain m-+n—(n—1) =—n (mod p). Then, substituting in (¥), we find («#) {-Ay'mint = -1 (mod p). Since m-+n is even, the second relation of the problem is proved. Finally, the last congruence can be obtained by setting m = n = 25! in (+). (331) From Wilson’s Theorem, n is prime if and only if (n— 1)! = 1 (mod n). ‘Therefore, “1S (w= WL= (e-Aln~2)(n— 3)! =A(n— 3)! (mod 2), and the result follows. (382) ‘This follows immediately from Fermat’s Little Theorem and Wilson's The- orem. Indeed, a? = a (mod p) and a(p ~ 1)! = —a (mod p), allowing us to conclude that a? + a(p ~ 1)! =0 (mod p) 1 (mod p). (-1)* (mod p) 1 (mod p), in which case 1 (mod p). 2 (mod p) and (mod p), s0 that 4m — (2n ~ 1) = —2n soLUTIONS, 3 (n—D41 (833) From Wilson's Theorem, is an integer if and only if n is a prime wuruber, in which case the sum appearing in the statement is equal to Den? =Y1=22), a5 required. (834) 1fd= (7,5), then r= dry and s = ds. Is clear that (441 (mod m) and (a4)*/4=1 (mod ma). ‘Therefore, altel = (qA)lr/Xe/d) = lel (mod m.), alt) = (@@)(/91018 = 16/9 =1 (tod ma), and the result follows, . (885) Let m = gf9f?---gr". If (a,q) = 1, 1 St < ry then a@ler”) 1 (mod gf"). Now, since ohm implies H(¢?*)|6(m), then a2") = 1 (mod gf"). If a > 0 and q > 2 are positive integers, then on the one hhand, we have q°~? > a (we can prove this by induction on a) snd on the other hand, for i = 1,2,--.,7, we have g?'~!|m and gf~|(m). There- fore, () afttim — (mn), Since mom) > 0, then for m > 1, it follows from (+) that m= o(m) > qe Therefore, in the ease (a, qi) > 1, that is gia, we have za. alah 2 Jason It follows that for each positive integer a, the relation fla) (qm) _ 1) is true for i= 1,2,...,7 and therefore that mja™-0", (836) Let-a1,2,...,ayq be a complete residue system modulo m. Since (m+1}/2 is a positive integer, say (m + 1)/2 = k, it follows that m(m +1) St) = mk =0 (mod m), as was to be shown. (387) Let B= {21,22,.--1n} be a complete residue system, ‘The set” con- tains the same number of elements as E and for x:,2, € Ei # J, we have ni #2; If ax; +b= ary +b (mod m), 2tj (mod m), which eontra- ‘then az, = az; (mod m) and therefore 2, dicts our hypothesis. (338) The answer is YES. Indeed, the set {6,12,18,24,30,36} is a reduoed residue system modulo 7. 4 1001 PROBLEMS IN CLASSICAL NUMBER THEORY (839) We must show that YS k=O (omod mn) Let 01, 2...,g(m) be integers smaller ian m and relatively prime to rm. Since (k,m)=1 => (m—&,m) = 1, we have Ay 40g H+ Ogi) = (a1) + (mM ~ ag) +++ +m — A6(m)) = mol) ~ (ar +02 +--+ 444m) Since (mn) is an even integer when m > 2, we then have Dee (mod m) (840) ‘The result follows immedtiately from Wilson's Theorem since rig +p (p~ 1)! (mod p). (B41) The set {1,3,7,9} is a reduced residue system modulo 10. However, Els (ar42\re£) {5,11,28,29} is not a reduced residue system moctulo 10, since (5,10) # 1, (312) (MMAG, Vol. 64, 1991, p. 63). The only solution is (2,y,2) = (2,3,5). First of all, we observe that (x,y) = (2,2) = (y,2) = 1. Then, 2<2< 4 <2, and combining the three given congruences we obtain zy taz+yz—1=0 (mod x,y and 2), Since 1, y and > are pairwise coprime, we have ay4224y2—1=0. (mod aye) It follows that ry +22 +. y2— 1 = k(2y2) for some inteyer k > 1. Dividing by zyz, we obtain that lia +o bla 4k>l pty tray Since x 2, 1/3" is of period 3"~?, (347) (TYCM, Vol. 28, no. 4, 1997, p. $20). Assume that the decimal expansion of a/b is formed by the repetition of the block B = ab of length n > 1. Then, a B ab $= OBBB.. = =a so that 6? = 10"— 1, Hence, for n > 1, b must be an odd integer. If n> 1, then 6? = 1 (mod 4) and therefore 10" ~ 1 = 1 (mod 4), whieh is impossible, Hence, n= I and b = 3, and it follows that the only positive rational numbers having the required property are 1/3 and 2/3, (348) First assume that 10" = 1 (mod n), that is that there exists an integer k such that 10" = 1+ kn. Then, for each fraction m/n, we have @ 109T = km + = Assume that m/n 0.210203... ; then equation (1) allows us to write fom + ™ = yay... andnysdny2 quating integer parts and equating fractional parts shows that @) km = ayay...ay and that ® © oan ssans2 But equation (3) confirms that the digits ay 41, ax42,... are precisely the digits a1, a2,.... This means that the expansion of m/n repeats itself after h digits and therefore that the period of m/n is h. Conversely, if m/n is of period h, that is 040. RA) AH then 18 — aon an = O68 ‘Consequently (10* = 1)m_ isan integer. Since m and n are relatively prime, then we have n|(10*—1). Finally, assume that the period of m/n is f and that 10%” = 1 (mod n). ‘Then, m/n also has fo digits which repeat themselves and hho > h. In particular, h is the smallest positive integer satisfying 10* = 1 (mod n). (349) In the solution of Problem 348, it is proved that: km = ayaz...an, which yields the result 102.04 SOLUTIONS wt (350) This follows from the fact that 10"(m/n) — (m/n) = ayaz...-ar. (351) Let NV +2¢-4 1. We will show that 24—1 > 3 is a proper divisor of N, thereby showing that N is a composite number. Since 24 — 1 is an Codd umber, iis enovgh to show that 2! — 1]21V, But 2N = 2428-22" 1421 (214 at = (t= 1)2ED 4 28 4g 2) 4 =), which proves the result. (352) Let n = 2°—1, where q is a prime, be such a number. Since q is odd and y2(n) = 0, there exists an odd prime number p such that p?|n. We then. have a) 2=1 (mod p*), On the other hand, using Euler's Theorem, we have 2°") = 1 (mod p?), so that (2) 2) = 1 (mod p*). Jt fellows from (1) and (2) that q|p(p ~ 1), which implies that q|(p ~ 1) (cince if q = p, then 2¥ = 1 (mod q), contradicting the fact that 2°-! = 1 (mod q)).. Hence, there exists a pasitive integer a such that p— 1 = ag, ‘which in light of (1) gives wrt = (29)8 = 1% =1 (mod p’), thus establishing that p is a Wieferich prime. REMARK: Only two Wieferich primes have been found so far, namely 1093, and 3511; it is known that there are no other such primes smaller than 1.25 x 10°. (353) We will show that the three smallest prime factors of n ase 2, 3 and 11. First of all, it is clear that 2)n, To see that 3[n, it is sufficient to observe That, 596 pte = _ yt (yy 1-120 (mod 3). Clearly, 5 and 7 are not prime factors of n. Let us check if 11 divides rn, By Fermat's Little Theorem, we have 5° = 1 (mod 11) and 7! = 1 (mod 11), s0 that 5 = 5%. 56 2 125? 16=5 (mod 11), 72 = M7 25.49=49=5 (mod 11). Combining these two congruences, we easily conclude that 1n (354) Let N= + S — 1. We will show that m—1|N. To do so, since m—1 is odd, it i$ clear that we shall reach our goal if we can manage to show that m—12N. But 2N = m*¢m—2= m* —1+m=1= (m= (me! me? + m+ 1) +(m—1), which proves the result. 1001 PROBLEMS IN CLASSICAL NUMBER THEORY (855) Let uj, = 22" +3. As soon as 2” = 3a — 1, then tin can be written as — ee -"2*2 ‘a number which is composite by Problem 354 if a 2 2. Now, there exist infinitely many positive integers m such that 2" = 3a — 1 for a certain positive integer a. Indeed, if n is odd, then 2" +1 = (-1)"+1=0 (mod 3), and this is why all numbers of the form 2°" +3, with n > 3 odd, are composite. (356) We first write sont 4 ge =i oy os 2 +a! Applying the result of Problem 354 with m = 2° and a = 73, we obtain. that m — 1 = 2°—1=31 divides N, and the result follows. (357) The answer is NO. Indeed, although 22” + 15 is prime for n = 0,1,2,3,4,5, when n =6, we have 2 + 15 = 18.446 744073 709551 631 = 31. 107 5561 273.462077 043. ‘To avoid using a computer in order to obtain this last factorization, one can consult the solution of Problem 356 to learn that 31|(2*° + 15) and therefore that ths last number is composite (358) This follows from the fact that 973 = 100 — 27 = 10? — 3° is 2 divisor of 10° — 3° and from the fact that 139|973. (859) We have n = 10° — 7? = (10° — 7)(10° +. 7) = 993 - 1007 = 3- 331 1007. But since n has a prime factor p sue that 300 < p < 400 and since 1007 is not divisible by 3, we conclude that p = 331. (360) We have 2-2 = (8-1 = 2-1) (7? +2) +1) = 127-7? +2) 41) and the result follows. (961) We have waa Pad Nao 415 =2 42 (27 +1) (2-1) = (2 42) ore 1) 21) = (241) 241) +1) (F- = (241) (2!41) (241) (28+ om 1) (2 +1) (2 41) 2° +1) an (+1) (2-1) = (2 +1) (2! +1) -257-17-5.3. ‘The numbers 3, 5, 17 and 257 ate therefore each a prime factor of 22° —1 REMARK: The complete factorization of 2" — 1 is: 2 3-5-7. 257-641 - 65537. 6700417. (862) Im fact, one can show slightly more. Indeed, if $,(N) stands for the number of positive integers n < NV such that ry := 10" +1 is prime, we hhave that sums [Jes rou, SOLUTIONS 179 In order to prove (#), we first observe that if n= 2 (mod 3), then 3)ry; this follows from the fact that, inthis case, n = 3k-+2 for a certain integer 20.0 that 1041 = (3k-+2)104241 = 200-109 +1 (mod 3). On the other hand, it follows from Fermat's Little Theorem that ifn + 1 isa prime number p> 5, then ry is a uultiple of p, since in this ease we have n =p—1, so that nl0” +1 = (p~ 110! +1 =(p—1)+1=0 (mod p). From these two observations and the fact that S. (11) follows. REMARK: Using a computer, we obtain that the smallest seven positive integers n such that n10” +1 is prime are 1, 3, 9, 21, 363, 2161 and 4839. (363) In light of Problem 75, we have that 22-1 = 3, 2°—1 = 7 and 2°—1 are divisors of 2””— 1. Similarly, we have that 2° ~1 = 31 and 2" —1 are prime factors of 2°° — 1 (364) Let n = 287 —1, Since n = 24 — 1 = 290-0 _ 1 = 84-1 —1 and since (8,11) = 1, Fermat’s Little Theorem then yields the result. (865) Using Problem 75, we have that 3°—1 = 80 and that 3°—1 = (3%—1)(3"+ 1) = 26-28 divides 3! —1, Then it follows easily that 2, 5, 7 and 13 are prime factors of 3! —1. Similarly, we have that 3°—1 = (3*~1)(3441) = 80-82 and that 3? — 1 = (3° ~ 1)(3 + 1) = (3 — 1)(8 + 1)(8° + 1) = 26 - 28-730 divides 3® — 1, From this, it follows that 2, 5, 7, 13, 41 and 73 ave prime factors of 384 — 1. (366) Since m is odd, we have a™ +1 = (at iyo"! =a"? a3 —... at 1), 4H inequality (+) and the result follows ‘This shows that 1001 = 10° +1 = (10+ 1)(10? ~ 10+ 1) = 11-91 = 11-713, (367) ‘The result is immediate if we write am 1a (aly gd and we then apply the result of Problem 366 ‘This shows that 1000001 = 10° + 1 = (10? + 1)(10* — 10? + 1) = 101-9901, (368) It follows from Problem 367 that 10" +L = (108 + 1)((10°)* ~ (10%)? + (108)? — 108 + 1). ‘The result then follows from the fact that 7, 11 and 13 are factors of 1001 (369) It is enough to observe that rn! +4 = (n? —2n+2)(n? + 2n+2). For the general case, we only need to observe that nh 4a? = (n? — Van +a)(n? + Van +0), ‘Let us mention that the condition “n 2 v2a" is sufficient but not neces- sary. 180 2001 PROBLEMS IN CLASSICAL NUMBER THEORY (370) We will show that if k = 2 (mod 6), then K10* +1 is a multiple of 3. Indeed, if k= 6) +2 for 2 certain nonnegative integer j, then KOK +1 = (6) +2)10%"? +1=6j+24+1=0 (mod 3), which proves the result, REMARK: It is easy to see that, given a prime number p # 2,5, then for each positive integer k of the form k = (jp + 1)(p— 1), where j is a nonnegative integer, we have p|k10*-+1. Indeed, for such a prime number », it follows from Fermat's Little Theorem that 10°) = 1 (mod p), 0 that k10* +1 = (jp + 1p 1)(10-Y pr} 41 = (p+ IY(p— 1) +1 = ip +p—jp-1+1=0 (mod). (371) Indeod, tet p = k +2 be a prime number. ‘Then, from Fermat's Little ‘Theorem, we have k?—* = 1 (mod p). Since p—1 = k + 1, it follows that KF? =1 (mod p). Finally, since k = p~2 = —2 (mod p), we then obtain successively k-R=1 (mod p), -2-k=1 (mod p), 2k* = -1 (mod p), which establishes that p)(2M* + 1), as required. (872) The result follows from the identity WF at are NO 427 4), which is easily proved by a simple multiplication of the two factors of the right-hand side. Thus, we obtain 2541 = (2 — 2! + 12 +285 + 1), Observing that 22 page 48.3415 (-1)*.2—(-1)9- 841 =2-3+1=0 (mod 5), we quickly obtain 5 as a third factor. In fact, without any difficulty, we obtain that the factorization of 2°° +1 is 28 4 1 = 5. 107 367 629 - 536.903 681. (373) First let g|Mp, q prime. By definition, we have 2° = 1 (mod q), while by Fermat's Little Theorem we have 2°? =1 (mod q). This means that pla — 1, and this is why q—1 = fp for a certain positive integer &. Since is necessarily even, the result follows. Finally, if r}4M,, r composite, then 1 = quga-*-ds for certain prime numbers gi < a < ... < qe. But it follows from the first part tha¢ q: = 1 (mod 2p), i = 1,2,...48, in which case 7 = qidz"+fe = 1 (mod 2p), as required. (874) In the case p = 61, the Lucas-Lehmer Test can be programmed as follows with MATHEMATICA: P61; 924; jet; mp-2%p-1; While [j 3, itis clear that 9) n(r—1) (r* +1) (r~1) IF is eve, Haas (ol 41) (#1), in which case (+) becomes nr — 1) =r 1 = (rf +1) (r*-1) = (41) (2 41) (#1), so that nafts FA) (42 + A) (rl + 1) if €/2 is even, (£1) (12 +1) (om ehh bet) if Y2= mis odd, that is, in both cases, the product of at least three distinct integers larger than 1, ‘On the other hand, if é is odd, then ($1) (Eat gr in which case (e) becomes rte (r+ 1) (et? n(rd so that na (rtrd ar gr tyr pe beret), that is again a product of three integers larger than 1, which are in fact distinet ifr > 3 or if = 2 and k > 7. First of all, it is clear that each of the elements of the set represents @ positive odd number and that this set contains at most 2* integers. To prove that tsro numbers ofthe type 2624-1 2-24...491+1 cannot be equal, assume that there exist ag, 0215... 4-150, ty++-»k-1 € {151} such that, (1) 2 ert + ah? te pend + 40 = 2+ Bet 29 +--+ B12 + By without having each a; = /%. If such is the case, then let j be the first subscript such that a; # 6;. We may assume that ay > Jj, in which case ‘a ~ 8; = 2 and therefore (1) becomes (2) BH + (yg — Bj) ++ + (ear = fr)? + (a0 — fo) = 0. 188 1001 PROBLEMS IN CLASSICAL NUMBER THEORY But it is easy to establish that [lesa = B)-2)2771 ++ + (a1 = f1)2 + (a0 ~ 0) SPEDE LSB 1c 2th ‘and this is why (2) is impossible, in which case we must have a for #=0,1,2,....k-1, ‘Thus the result. ) i) «) (iii) (iv) Such a number & must be prime, because if itis not, then k = ab with rs 2. the product of 1 1, So let p be a prime number, and let q be a prime factor of (10° — 1)/9. Since it is clear that q 4 2,5, we have from Fermat's Little ‘Theorem that 10°! = 1 (mod )- On the other hand, we have by our hypothesis that 10” = 1 (mod q). Combining these two relations, ‘we may conclude that plq~1 and therefore that there exists a positive integer # such that q~ 1 = ip. Since q ~ 1 is even, it follows that i = 2j for a certain positive integer j, and the result follows. ‘We obtain that the five smallest prime numbers p such that the cor- responding number (10° — 1)/9 is prime are 2, 19, 23, 317 and 1031. ‘The following is a table displaying the factorization of the numbers (10 ~ 1)/9, for each prime number 3 < p < 67, p # 19,23: factorization of (10° — 1)/9 3 3-37 5 41-271 7 239-4649 ML 21649513239 18. 58-79-265871653 172071723 5868222357 29 3191-16763 - 43087 - 62003 - 77843880307 31 2791 - 6943319 .57336415063790604359 37 2028119 247529013 -2212304296770203968013 4188-1281 - 538687 - 201768709900322808748657942361 43 173. 1527791 -1963506722254307 - 2140902015395526641 AT 35121409. $16362008763458525001406154038726382279, 53 107 - 1609431 - 1325815267337711173 447198858799491425660200071 59 2559647034361 -43408762856574602121 44534289028559826755746751 61 733-4637 -320401 -974293.. 1360682471 1060717386163 .7061709990156159479 67 493121 -79863595778024342083 -282133380048176667001263153660909177245677 REMARK: Itis interesting to observe that each of the above numbers (10° —1)/9 is squarefree (as isthe case for Mersenne numbers 2° — 1 for which the factorization is known) SOLUTIONS 15 (385) From (+), we obtain that poet yee = (24 y)le ah ty 4 P24? aytht 4 yh), Since 2< x+y <2! + y%+1, it follows that x + y is a proper divisor of n and therefore that n is composite. (386) By hypothesis, there exist positive integers ¢ and y such that ponaa ty) = (rt y)(a? ay ty’). ‘The result then follows if we ean prove that (i) 2-+y # pp and that (ii) a+ y is a proper divisor of n First assume that (i) is false; that is 2 + y= pp. We will then have B= (ey) > 2° +4? = pom, which implies that pj > n and therefore that pp > V7, which contradicts the hypothesis py < V7. Since x + y > 2, in order to prove (ii), it is enough to prove that ay y > 1, in which case 2r > 2+ =m, so that x > n/2. But, in this case, pon =a° +49 = (2+ y)(2? — ay ty?) =n(a? —2y +97), ‘which implies that 2 ny ty? >a? —a2y=2(2-y)>2> 5, Po conteadicting the fact that. py < V/i. (387) We easily observe that, a2 4717 = (247172 2-717 +7174), s0 that 719|7n. Since (7,719) = 1 it follows that n is composite and that 719\n. (388) We easily observe that Ln = 15 + 12128 14 1212)(14 — 13. 12124 1? 1219? — 112128 + 12124), s0 that 1213|11n. Since (L1, 1213) = that 1213|n. In fact, 237 749 938 896 803 = 41 - 1213 - 4780526791. (880) Let 6 be an integer such that (#,7) = 1, and let-p be a prime number such that pln. Then, (b,p) = 1 so that wt =1 (mod p), it follows that n is composite and It follows that ta tyro (0/0) 21 (od p)y ‘which implies that n is a Carmichael number. REMARK: The reciprocal of this result is true (see Giblin [14], p. 156) so that an odd comporite number n > 3 is a Carmichael number if and only (390) (391) (392) (393) (394) 1001 PROBLEMS IN CLASSICAL NUMBER THEORY if itis squarefree and pln = p— 1\n—1. This result is called “Korselt’s Criterion”. First of all, we show that there exists a positive integer m such that p=(6m-+1. Indeed, if this is not the ease, then p= 6m-+ 5 for a certain Integer m, in whick case 2p — 1 = 12m +9 = 3(4m +3) would not be prime. We can therefore write n= (6m +1)(12m + 1)(18m +1) =p-qer, say. Since =~ 1=6-12-18-m? + (6-12 46-18 + 12- 18)m? + (6-+ 12+ 18)m, it is easy to see that p-1=6m\n—1, q—1=12m|n—1 and r—1=18min—1, which guarantees that n is a Carmichael number, from Problem 389. REMARK: Unfortunately, no one has ever proved that there exist infinitely ‘many triples of prime numbers of the form (p, 2p — 1, 3p ~ 2). Let us also ‘mention that (7, 13,19), (37,73, 109) and (211, 421,631) are such triples. Using a computer, we obtain that there exist 228 triples of prime numbers. (p,2p— 1,3p — 2) with p < 100000. Let n be a Carmichael number. By definition, n cannot be a prime num- ber. In light of Korselt’s Criterion, n cannot be @ prime power (since it. rust be squarefree). In fact, it is enough to show that n # pq, where p< q are two odd prime numbers. Assume that n = pg. Then, we should have p— In — 1 and g—1|n ~1, so that q— In —1 = pg—1= q—p+p—1 = p(q—1) + (p—1), which implies that q—1|p—1 and that p~Aln—1 = pq—1= pq —9-+q~1=9(p—1) + (q~1), and therefore p— 1|q—1. Combining these relations, it follows that p — 1 = q—1, that. fs p=, a contradiction First consider the case j = 1. Since = antety*ae ~ 910299°°° Ge + 295° Ge — 1 = 19295" Ge — 243° GHG — 1), it follows that gy — Igoqa-+-ae ~ 1 if and only if gx ~ 1|q19293--- 4x and the result follows, Since 2° + * = (2 + y)(2? — 2y + y*), we immediately derive from (+) that 97 and 109 are (prime) divisors of 327763. Since 327763 97-109 = * the complete factorization of 327763 is then 327 763 = 81-97 109. Since 23 + y° = (e+ y)(x® — 2y +y?), we have that T-n = 341 532611 = 699% + 8° = (699+ 8)(699? — 699-8 + 8%), so that 7:n = 707-4 for a certain integer a, which means that n = 101-4. Hence, 101 is a prime factor of n. REMARK: The complete factorization of 48790373 is 48790373 = 31 - 101 - 15583, 209-4 — 1, (395) (396) (397) soLutions| 1st First of all, f'n > 8 is even, say n= 2k, > 2, then 722 7a ak 7ak (mod 3) Hence, if n is even, the number 2" — 7 is divisible by 3 and is therefore composite, If n = 1 (mod 4), n > 3, then there exists a positive integer k such that n = 4k-+ 1, so that on 728+! 7 = 16. 2—T=1h-2-2=0 (mod 5). Hence, if n = 4k + 1, the number 2" — 7 is divisibie by 5 and is therefore ‘composite. (mod 10), n > 8, then there exists an integer k > 0 such 0k + 7, so that toKs7 7 24-2? 7 =1.7-7=0 (mod 11). Hence, ifn = 10k +7, the number 2" ~7 is divisible by 11 and is therefore ‘composite. lin that n 1 (mod 12), n > 3, then there exists an integer k > 0 such 2k +11, 90 that 2 T= 202411 _ 7 = 4096-2" —7=1*.7-7=0 (mod 13). Hence, ifn = 12k+11, the number 2" —7 is divisible by 13 and is therefore ‘composite. ‘Therefore, we only need to consider the numbers n = 15, 19, 31, 39, .... Using the instruction Prime (2°n — 7] of MarHeMarica, we find that 2°° —7 is prime Continuing this process, we obtain that the next five values of m with the above property are 715, 1983, 2319, 2499 and 3775, To find these values, using the MAPLE software, we type in the pro- gram > for n to 4000 do if isprime(2%n-7) > then print(n) else fi; 04; Let a1 ahs 1 a-l atl a1 It is clear that n, and nz are odd. On the other hand, since ny = 1 (mod 2p) and mz = 1 (mod 2p), we have that n = 1 (mod 2p). Since nla®? — 1, we have a®? = 1 (mod n) and therefore a“? = 1 (mod n), which means that m is pseudoprime in basis a. Applying this method, we find that the numbers 341 and 7381 are pseudoprime numbers in basis 2 and 3 respectively REMARK: ‘This method was imagined in 1904 by Cipolla to generate pseuddoprime numbers (Malo, 1903; sce Williams [41]. Let n be a pseudoprime number in basis 2. If we show that the number N’ = 2° — 1 is also pseudoprime, we shall be done. First ofall, N is composite, since 2” — 1 is divisible by 2°— 1 for each divisor a of n. Since n is pseudoprime, n/2"~ — 1, and this is why n[2"—2.= N= 1. It follows that N = 2" —1|2*—? — 1 and therefore that 2N-1 1 (mod N) as required. 1001 PROBLEMS IN CLASSICAL NUMBER THEORY (898) Ifm=ks+r,01), Print," ", /pl 1ii++H) gives the followi i P njp 1700 228479 —10334355636937793 7400 212885833 48544121 17300 485441211 which establishes the factorization 271 — 1 = 298479 48544121 - 212885833, (407) ‘The factorization is 136258390321 = 104831 - 1299791. (408) We first find m = 269 146942 and g = (m — 1,n) = 17389. Applying the Pollard p— 1 Test, we obtain the result (408) By hypothesis, we have ce (mod p) and therefore 22°" (on0d p), ‘Therefore, 2"*1 is the smallest exponent such that 2°""' = 1 (mod p). But by Fermat's Little Theorem, 2°! = 1 (mod p}, which means that 2°+1[p—1 and in particular that 8lp~1 since n > 2. Therefore, using the Buler’s Criterion, we have @) > 1 ftlows vat 2° | 2 an theron tt 2°29 — 1. We ave ths a (mod p) proved that there exists a postive integer k such that. p ~ 1 thus the result (410) In light of Problem 409, each prime factor p of Fy is of the form p 1. The first value of k for which the corresponding number p ay P41 190 cau) (412) (413) (414) (415) 1001 PROBLEMS IN CLASSICAL NUMBER THEORY divides Fs is k = 5, which gives p = 641, and we conclude that 641 is a prime divisor of Fe In light of Problem 409, each prime factor p of Fs is of the form p k- 2°41, Using a computer, we verify that the first value of k such that Fo/(k- 25 +1) is an integer is k = 1071, The number p corresponding to k = 1071 is p = 274177, which is indeed a prime number. Thus the result Pit iit Fe in and ht (2) <1, then ty Ee Criterion, we have ee ( 1 (mod Fy) Reciprocally, if k"¥* = —1 (mod Fy), let r be the residue of kt modulo By. Since 1 (mod Fy), we have that r= (mod F,). Us ing the result of Problem 399, it follows that Fy is prime. Therefore, (a)=* Leta =n-+a, withn €Z and 02 and thecefore [2a] > 1 or [2b] > 1, and the result follows, (b) It is enough to show that 2[a + 8] < [8a] + (38). 0 1, then we must show that 2 < [Ba] + [36]. Clearly, 3a-+ 3b > 3. Now, since [1] +o] > [2+] —1 for all 2,4 € R, it follows that [3a] + [3b] > [3(a-+ 8)] ~1 2 2, which gives, the result. (©) It is enough to show that ja + 8] < [4a] + [40]. WO 1, then da+4b > 4 and since [4a] + (40] > [4a + 46] — 1 > 3, we obtain the result, Inequalities (d) and (e) are obtained in a similar manner. This follows by observing that (2n)! en) (23) ae (n) =2(0 1) for each integer n > 1 For part (a), in light of Theorem 27, itis enough to show that =) [m) [2] (me, lel) F Se Cea See ace a eestor a Fl Fl=l- El P): which itself follows from Problem Gl 1 (mod Fy). SOLUTIONS 191 (416) Because of Theorem 27, it is enough to show that LeeEE ZG lee slee*"I-E we obtain the result after summing on i. (417) To obtain the number of zeros placed at the end of the number 231, we ‘must find the largest number a such that 10*|/23!. Since 23! contains ‘more 2's than 5's, it is enough to compute the largest power of 5 which divides 23, We are therefore looking for the largest integer a such that 5°| 231. This number a is given by o-[2]-« Since ‘There are therefore foe zeros atthe end of 23! (418) We may write n! = 2°5'm where (m,10) = 1. The largest power of 10 which divides n! is 6 and since n!/10° = 2°~"m is an even integer, the elt flows (419) The integers n whose number of zeras appearing atthe end ofthe decimal expansion of n! is 57 are those whose largest power of 5 which divides n! is 57. We are therefore looking for an integer n such that S, = 57 where Su = [3] + [B] +[B] +---. lfm = 200, then S, = 49; if n = 250, then Sh 62 Hees Sy ~ 7, we ust search amongst integers such that 260 2. Since Tlesy=a 3-8---(2n—¥}- Qn 41) = OED its then ensy to se that es fen +1 fn LAr)-Sbl (Qn+1)! Moreover, since the largest power of 2 which divides “7 is 0, we have which proves the given relation. (423) (AMM, Vol. 82, 1975, p. 854). In fact, we must identify each integer which is divisible by an integer m such that m? 1, the inequalities (n-+2/5)® < n(n+1) < (n+1/2)%, (n-+7/10)? < n(n +2) < (n+ 1)? and (n-+7/5)? < (n+ 1)(n+2) < (n-+3/2)? lead to 9n+8 <2? <9n+9, in which case [x] = [VIn+8]. The case n = 0 is verified directly. (426) (MMAG, Vol. 48, 1975, p. 292). Let m= ak+b, We then have +L ]-- Le] + OPED ens fed] (427) First let x © Q; that is x = §, say. Then, ble € N and ml € N for each m > b. Hence, as soon as m > b, we have cos*(mlrz) = 1 and this is why lithyy-a[e0s?(mlxzz)) = 1. On the other hand, if x € R\Q, then mlz € R\ Q, which implies that 0 < cos*(mlrz) < 1 for all m > 1 ‘and that, cos*(mlrz)] = 0 for all m > 1, which of course implies that Timnmzo[¢0s?(m!x2)] = 0. (428) We first write n in basis 2: a,bEN,OSb n/2 and k 1 if and only: if i ny} and Se = {(z,y) € S| ma < ny). Since (m,n) = 1, there is no point with (435) (436) 1001 PROBLEMS IN CLASSICAL NUMBER THEORY integer coordinates on the line y = mz/n, and this is why SUS, =S and $,NS=0, and by symmetry we have = (n= 1)(m—1) #5; = 49, = #8 (Nim) For a fixed integer x chosen arbitrarily in the interval [1,n ~ 1], there is exactly (= points with integer coordinates of abscissa x located on the line ma ="ny. Therefore, S [me]= eaten, ale $= {(ey) ENXN|1<2 ny} and $= {(2,y) € S| me < ny). Since y = mz/n = mir}n1, where m = mid, n = md, it follows that for x for 4 from 1 to 1000 do ‘> if irem(F(tau,i),3) <> 0 then print(ifactor(i)) > else £8; od: (450) ‘The following program written with MAPLE generates perfect numbers. >for i to 89 do > Mersenne := 2-5 S if ssprine(ersenne) > then print (signa(i) — > else 11; od; In both enses, the answer is NO (451) This follows from the definition, For the second part, kf is not a mul- tiplicative function, except when k = 1, because &f(1) = kf(L-1) = Kf (1) -kf(1), in which case k? 0, the function Of = not rultiplicative because O(1) Finally, § +9 is not necessarily multiplicative: for instance, consider f=9=1 (452) The answer is NO. Indeed, f(2:3-5), £(3)-4(5)-f(7) = 1 implies that f(2) $2-5-7) = fl2)- $B) f() =1. /\(i — 1)eMersenne) (2)-£(8)-f(5) = 0 and f(3-5-7) = 0, which contradicts the fact that, SOLUTIONS 201 (453) By definition, we have (k-1)k k(k+1) 2 and p prime, we have Lesa ag (SQ) +2) FW) + PP) I BP) + + PO) S0) 22 (0)FQ) +22 @)(p) +0+-- +0= 1+ PF) = 90), which proves that f is strongly multiplicative. (459) The answer is YES. Indeed, by hypothesis, if p is an arbitrary prime number and k a positive integer, we have S0) = Ft") = FO Henee, if f(p) #0 and k = 2, it follows that f(p) = 1. We then have established that the only possible values of f(p) are 0 and 1. But since f is entirely determined by the set of values of f(p), it follows that {f(n) n=1,2,8,...}¢ (01). (460) This function g is not multiplicative. Indeed, if g were multiplicative, we would have g(20) = g(4)g(5)- But this last equality is not verified since 49(20) = 3 while g(4) = 2 and gi) =3. (461) Let (+) be the equation whieh is to be proved. Set m= q!+--q2" and n= gft.--98. Then, at’) (ingn) = qlee. gininfands) and fry] = gpeelOnd quanta dr If Fis multiplicative, we have Slr r) Flom) = Flag P) -- Flqpintors-)) Sapte) geqpeston) Let & be an integer such that 1 < k 0, there exists a positive constant Mo(=") such that for each n > 2, we have ne Mole!) a(n? — 1)", 1s was to be shown. (464) From Problem 461, we have for (m,n) = 1, J (Km) fn) = f((Hera, kr) f([kim, kn) = fe) f (eran) and therefore M(e)VOR9 oa (n® — 1) f(km) fen) _ f(kemn), Fk) F(R) Sky" kn) ® Let k € NU {0} be defined implicitly by (3) = 3 +4. Then we have successively, using the fact that f is strictly inereasing and multiplicative, which means that £82) is « multiplicative function. g £06) = f(2)f(3)=6 + 2k, J) < 542%, f(10) = f(2)f(5) < 10-4 4k, J(9) < 944k, F(18) = f(2)f(9) < 18 + 8k, a (15) < 15+8k. On the other hand, since /(3) = 3+, we have that /(5) > 5+ & and therefore that (2) F(15) = F(3)f(5) 2 15 + 8k +R From (1) and (2), it follows that k = 0 and therefore that (3) = 3. We have then proved that f(2' +1) =2'+1, Let us show that, anore generally, wwe have @) JQ +1) =2 41 WH1,2..). For this, we use induction. Assume that the relation (3) is true for v= r ‘and show that it is then true for v = r-+ 1, But FP 42) = fyse" +1) = 202" +1) = 9 +2. 1001 PROBLEMS IN CLASSICAL NUMBER THEORY Since f is strictly increasing, this means that f(2"+1 +1) = 2+ 41. Relation (3) is thus proved. “The fact that f 13 strictly increasing then implies that f(m) =m for all m € N. (460) We only need to prove that g(p") = ag(p) for each positive integer a and each prime number p. But since = jim £07) = ag(p), the claim is proved, (467) We have h(1) = 1 if (1) = g(1) = 1. Let n = mim, where (m1,12) = 1 If m= dr, then d and r have unique factorizations d= ddg end r = riry such that m1 = dry and nz = dgrz, Moreover, (d,r) = 1 if and only if (dh,r1) = 1 = (dayr2)- This shows that (nama) = A(na)h(n2), that is that the function h is multiplicative. (468) Assume that (m,n) = 1 and that (d,r] = mn. Then d ean be written in a vunique way as d= did, with dim and da|n and also r= rary with rm and ra|n. in this case, [1,11] =m and [da, ra] =n, so that himn)= SD fida)= Flas) (aa)o(rs ara) [4s=mn = DO flat) XO fldsha(r2) = roman), (autem la and the result follows (469) The answer is NO. Indeed, if f(p) = 1 for each prime number p, and J(p") = 0 for each integer a > 2 and each prime number p, then lim. f(n) does not exis (470) The answer is NO. Indeed, if f(2*) = 1 for each positive integer k, and J(p*) = 0 for each prime number p > 3 and each positive integer k, then limy oo f(n) does not exist, (ATL) (This problem is a result due to Paul Erdés). Let p and q be two arbitrary distinct prime numbers. Let k and ¢ = E(k) be two integers such that pF a. (c) It is for n =7 (with k = 2) (@) Ifn = 4k-+1 (here a — b means that f(a) = 6), ma dk+ 1 3n 41 = 12k +4 6k4+ 2 3k-4+1, which implies that n=1 nd Pin) =ae+1=3(25") + Bat On the other hand, if n = 4k +3, we have n= 4k +3 — 3n+1= 12k + 10 — 6k + 5 + 3(6k + 5) +1 = 18k + 16, which means that P(n) = 18k + 16 > 4(4k +3) (¢) The integer n = 62 will do, We have indeed 62 B15 94 47 142 71 214 107 822 + 161 — 484 (£) The answer is YES. (g) Since n is odd, we have f(n) = 3n+1=2%r, with a> 1 and r odd, Tt follows that f(n) = 2°~"'r and therefore that, iq) — (20 ha, Pom ee test 3n ath It follows from this that f%(n) > n if and only if a 2i}3n+ 1, and it happens with ¢ probability of 3 + which oceurs if 1001 PROBLEMS IN CLASSICAL NUMBER THEORY (h) Choosing n = 5, we find that the iteration f(5), f2(5), ... enters an endless loop, namely 526 + 13 66 + 33 + 166 — 83 + 416 — 208 104 + 52 26 13, ‘of which 13 is the turning point. Hence, the process never reaches 1. (i) Let & be the integer defined by the relation 2" k. Since 21 > n, we have k +1 > logyn and therefore > logy n— 1. It follows that Syr(n) > k 2 logan = 1 ‘and therefore that Sye(n) > logy n, as required. (j) We proceed as with the preceding problem. However, since f(n) = 3n-+1, we are thereby adding a stage to the process (by passing from n to Sn + 1) and in fact at least two more, since we more than double the number 2, (1s) The result can easily be proved by successive iterations (0) We simply use (ke) (an) The result is essentially a generalization of parts (k) anc (I). (a) With the choice = 2°*! ~ 1, and calling upon (k), we obtain atin) 2(aet!—1) | 2(aert—1) _ gett 1 gett 7 2-1 Bae BT ot -(3) >M, since we can choose @ as large as we want. (0) This function is obviously almost identical to the functic above. (478) The answer is NO. Tt is enough to choose for example a = 4, b = 6 and (474) (a) I is clear that we must examine the different ways of waiting 9 as a product of integers > 2. The only possible choices are 9 and 3-3, so that n= 28 or n= 2.3%, It is clear that n = 36 is the smallest, (b) Reasoning as above, we obtain n = 24-3 = 48, (c) The smallest integer is 144. (475) Since n > 1, we have that n = qf? qf" and 7(n) = (a, +1)---(ay-+1) 14 = 2-7, Then, either r = 2with ay = 1 and az = Gorr = 1 with ay = 13, It follows that the positive numbers with exactly 14 divisors are of two kinds: the numbers pq®, where p and q are distinct prime numbers, and the numbers p'*, where p is an arbitrary prime number. (476) (a) Since 20! = 2°°- 38.54.77. 11- 13-17-19, we find +(20!) = 24-39-5-19, and this is why the largest prime number dividing r(20!) is 19. (b) Similarly, we find (20!) = (2° — 1)(8" — 1)(58 = 1) 29.34.5719, Since 2! — 1 js a Mersenne prime larger than all the other prime izctors, wwe conclude that 2!9 ~ 1 is the largest prime number dividing, (20!) J defined SOLUTIONS 207 (6) 3. (d) 61. (477) (Problem A-1 of Putnam, 1989). Let r(m) be the mumber of divisors of 1m, Then the number of positive integers n such that la or n|b is equal to (a) + 7(b) - r((a,)). (On the other hand, since the function + is multiplicative and since 7(p") = +1 for each prime aumber p and each integer r > 1, the number of required positive integers m is (10°) + (20) — r(2!° 58) = r(2% 51) + 7(20. 5%) =r(2° 5) = 41? 4 61-31 — 41-31 = 2301 (478) Expanding the right-hand side, we obtain Ra ) REMARK: The value of the series is 1.6006695152..., a number which Paul Erdés (10) has proved to be irrational. (479) Part () can easly be obtained using induction. ‘To prove part (ii), we first observe that foreach integer k > 2, 1 @ by babe aby by" ‘an equality that follows from the fact that 1 1 1a 1 be be ( 1 &) Biba et 1 14 A Bite Ob be a Bae 1 1 Dibaba Baba bu where we have used (i) and the definition of the sequence (by) Now using (+), we obtain that for each integer k > 4, 11 1a” a 14 bt 3+(b-a)+ GS x37) 1 1 1 1 TF ibe Baba) 1 1001 PROBLEMS IN CLASSICAL NUMBER THEORY and the result (ji) follows by letting & tend to +00. To obtain the last relation, we write, using (i), as required REMARK: The reader interested by this sequence will appreciate the re cent papers of J.W. Sander and G. Myerson; seein particular LAV. Sander (34) (480) Let (m,n) = 1, If m and n are odd, then since + is multiplicative, (mn) = r(mn) = 7(m)r(n) = ni(m)nu(n), and the result is proved in this case. On the other hand, if one of these ‘two integers is even, say m, then there exists a positive integer a such. that m= 2°r, with r odd (and (r,n) = 1). We then have ni(mn) =n (rn) = r(rn) = r(r)r(n) = 7 (2%F)r(n) = rufra)ra(n). All cases are thus covered, and the result is proved. (481) For each prime number p, we cannot have both pla and p[b, and therefore either a contains the largest power of p which divides m or it does not contain any factor af n. This leaves two choices for each prime factor p, and we therefore have # total of 2%") choices, (482) Let f(n) = #{(a,8) | @ > 1,6 > 1 and (a,0] =n}. It is immediate that f is'a multiplicative function. Indeed, assume that (m,n) = 1 and that {a,6] = mn. Then, a can be written in a unique way as a = aay, with ‘a;|m and az|n, Similarly, 6 = bibs, with bylyn and b2|n. In this case, [ax,b:] = m and [ap,bg] =n. We therefore only need to consider n = p", in which case we have a = p*, b= p4, with r = max(a, 8}. Ifr =a, then B=0,3,...47 (r-+1 possibilities), or else r = Gand a= 0,1,...,7—1(r possibilities). We therefore have a total of 2r +1 possibilities, and this is why 2r-+1 = 7(p?) = 7(n?), as was to be shown. (483) IE (a,b) = d and ab = n, we set A = a/d and B = b/d. The integers A and B are relatively prime and satisfy AB = n/d®. Conversely, if there ‘exist relatively prime integers A and B such that AB = nd, then setting a= dA and 6 = dB, we find that (a6) = d and ab =n. We only need to find the number of ordered pairs (A,B) such that (A,B) = 1 and AB =n/d®, In light of Problem 481, the number of such pairs is 24/4) Finally, since 2) stands for the number of ordered pairs a,b such that (a,b) = d and ab =n, then summing over all the a's such that d\n, ‘we obtain the total number of ordered pairs a,6 such that ab = n, that is the mumber of divisors of n. (484) By hypothesis, we have n = 2m, with m oda. Then, a (Qn) = 128m) = 7(2*)r(m) = (a+ 2)r(m). On the other hand, 2) a(n) = 7(2%m) = 7(2")r(m) = (a+ 1)r(m). SOLUTIONS 200 Combining (1) and (2), we obtain z2n) _a+2 7m) atl (485) Tey a? then +(n) = [If (ai-+ 1), in which case itis clear that 7(n) is odd if and only if a; is even. Hence, we only need to show that each aj is even if and only ifn is a perfect square. It is immediate that ifeach a; is even, then n isa perfect square. Conversely, ifm isa perfect square, then n = m?,m € N. If m = JT {_1 4f*, we therefore obtain that n= [Tiny 42, and the uniqueness of the canonical representation of m then implies that a; = 2e, for f= (486) Let n= PIS a (with a. < ga <.-- < qe primes, 1,003)... 544 positive integers) be a number such that o(n) is prime. Using the formula given in Theorem 31, it is clear that we must have n = q% for a certain prime number q and a certain positive integer a, in which ease 7(n) r(q*) = a+ 1. Therefore we only need to prove that a +1 is a prime number. Now, if it is not the case, that is if a+ 1=ab with 2 2, which contradicts the fact that a(n) is prime. Thus, the result follows. (487) If = oft ate, then o(n) = Te babe batt). Iq = 2, then Q.= 1+ 9)+---+ gf is odd. Ifg i an odd prime number, then Q. is oodd if and only if there exists an odd number of terms in Q;- Hence, in order to have Q; odd, a; must be even. Since a(n) is odd if and only if each Qj is odd, it follows that n must be the product of 2* (k > 0) and of a perfect square. (488) If d runs through the set of divisors of n, then n/d does also. Therefore, we have (n+) =e H=Te=. thus the result. When r(n) is an odd number, the formula still holds because, as we have shown in Problem 485, n is then a perfect square. (480) We have proved in Problem 488 that []d=n"/2, ‘Therefore, calling din upon the inequality comparing the geometric mean and the arithmetic ano (490) (491) (492) (493) 1001 PROBLEMS IN CLASSICAL NUMBER THEORY ‘mean (see Theorem 5), we obtain 1 real n= & sa ye= (ne) 3. It follows that r(n(n + 1)) = r(n)-r(n $1) =2-r(n +1) 22-3=6, ‘On the other hand, if is not prime and larger than 2, then r(n) > 3, so r(n(n+1)) = 7(n)-7(n+ 1) 23-r(n+1) 23-256, ‘We have thus established that 7(n(n-+1)) > 6, for all n > 3. The minimum is therefore attained when n = 3, since in this ease r(n(n-41)) = 2-3 = 6. We have proved in Problem 488 that [[d =n", Defining m and a by n= 2m, with m odd, the relation a) filo) = mr is immediate. To establish the relation @) ale) = (2 me) = anyone, we first observe that fa(n):fi(n) = n7()/2, so that fa(n) = n7(/?/ fi(n). Substituting (1) in this last equation, we easily obiain (2). (MIMAG, Vol. 48, 1975, p. 185). This is equivalent to showing that Y (2ev/m) - +(0m)) logm = 0. But this follows from ¥ trvntogn Liores+ Ses She Ha Te - Xe Titowe os Yond a ‘Toeach divisor d < yi we can associate the divisor n/d, which is therefore > Yi. Since these two categories of divisors end up covering all the divisors of n, itis clear that 7(n) < 2{y/n]. If mis a perfect square, then vin is a divisor of n and the quantity n/\/7i does not introduce any new divisor of n; this is why in this case we have r(n) < 2[yn]—1<2yn. On SOLUTIONS a the other hand, if n is not a perfect square, then yi is not an integer, so that [Vi] < yin and therefore r(n) < 2[yn] < 2¥". Hence, in all cases, we have a(n) < Vf Finally, for n > 5, we have 2y7

You might also like