<<

Unit 1 Theory of Numbers

Natural Numbers Thenumbers1,2,3,…,whichareusedincountingarecalled naturalnumbers or positive. Basic Properties of Natural Numbers In the system of natural numbers, we have two ‘operations’ addition and multiplication with the followingproperties. Let x,, y z denotearbitrarynaturalnumbers,then 1. x+ y isanaturalnumber i.e., thesumoftwonaturalnumberisagainanaturalnumber. 2. Commutative law of addition x+ y = y + x 3. Associative law of addition x+()() y + z = x + y + z 4. x⋅ y isanaturalnumber i.e., productoftwonaturalnumbersisanaturalnumber. 5. Commutative law of multiplication x⋅ y = y ⋅ x 6. Associative law of multiplication x⋅()() y ⋅ z = x ⋅ y ⋅ z 7. Existence of multiplicative identity a⋅1 = a 8. Distributive law x() y+ z = xy + xz

Divisibility of Integers An integerx ≠ 0 divides y, if there exists an a such that y= ax and thus we write as x| y ( x divides y). If x doesnotdivides y,wewriteas x\| y (x doesnotdivides y ) [Thiscanalsobestatedas y isdivisibleby x or x isaof y or y isamultipleof x]. Properties of Divisibility 1. x | y and y | z ⇒ x | z 2. x | y and x | z ⇒x| ( ky± lz ) forall k, l∈ z. z = setofallintegers. 3. x | y and y | x ⇒ x= ± y 4. x | y,where x>0, y > 0 ⇒x≤ y 5. x | y ⇒ x | yz foranyinteger z. 6. x | y iff nx | ny,where n ≠ 0. 2 IndianNational MathematicsOlympiad

Test of Divisibility Divisibility by certain special numbers can be determined without actually carrying out the process of division.Thefollowingtheoremsummarizestheresult: ApositiveintegerNisdivisibleby • 2ifandonlyifthelastdigit(unit'sdigit)iseven. • 4ifandonlyifthenumberformedbylasttwodigitsisdivisibleby4. • 8ifandonlyifthenumberformedbythelastthreedigitsisdivisibleby8. • 3ifandonlyifthesumofallthedigitsisdivisibleby3. • 9ifandonlyifthesumofallthedigitsisdivisibleby9. • 5ifandonlyifthelastdigitiseither0or5. • 25ifandonlyifthenumberformedbythelasttwodigitsisdivisibleby25. • 125ifandonlyifthenumberformedbythelastthreedigitsisdivisibleby125. • 11 if and only if the difference between the sum of digits in the odd places (starting from right) and sumofthedigitsintheevenplaces(startingfromtheright)isamultipleof11. Division For any two natural numbers a and b, there exists unique numbers q and r called respectively quotient andremainder, a= bq + r, where 0 ≤r < b. Common Divisor If a number ‘c’ divides any two numbers a and b i.e., if c | a and c | b, then c is known as a common divisor of a and b. If a number d divides a and b and is divisible by all the common of a and b, then d is known as the greatestcommondivisor (GCD)of a and b orHCFof a and b. TheGCD ofnumbers a and b istheuniquepositiveinteger d withthefollowingtwoproperties. (i) d | a and d | b (ii) If c | a and c | b;then c | d Wewriteitas (,)a b= d Forexample, (,);12 15= 3 (,)7 8= 1 Note 1. (,)(,)a b= b a 2.If a|b;then (,)a b= a Properties of GCD 1. If (,)b c= g and d isacommondivisorof b and c,then d isadivisorof g. 2. Forany m > 0, (mb , mc )= m ( b , c )  b c   1  3. If d |b and d |c and d > 0,then  ,(,) =   b c d d  d  b c  4. If (,)b c= g,then  ,  = 1 g g  5. If (,)b c= g,thenthereexiststwointegers x and y suchthat g= xb + yc 6. If (,)a b = 1 and (,)a c = 1,then (,)a bc = 1 7. If a| bc = 1 and (,),a b = 1 then a | c = 1 TheoryofNumbers 3

Forexample a=6,, b = 21 c = 10 6| 21× 10 but (,)6 21= 3 and (,)6 10= 2 and6dividesneither21nor10 LCM of two integers a, b is the smallest positive integer divisible by both a and b and it is denoted by [a,b]. The can be used to find the GCD of two integers as well as representing GCD as in5thproperty.Consider2numbers18,28 28= 1. 8 + 10 ;18= 110. + 8 10= 1 ⋅ 8 + 2 ; 8= 4 ⋅ 2 + 0 (,)18 28= 2 (,).18 28= 2 = 10 − 1 8 =10 −(.) 18 − 110 =210.. − 118 =2(.). 28 − 118 − 118 =228.. − 318 =228.() + − 3 18

Note Therepresentationin5thpropertyisnotunique.Infactwecanrepresent (,)a b as xa+ yb ininfinite numberofwayswhere x, y∈ Z Z = setofallintegers. Inaboveexample,252isLCMof18and28. 252= 9. 28 252= 1418. (,).()18 28= 2 28 + − 3 ⋅ 18 =228.() + 252KK + − 318 − 252 =()()2 + 9KK 28 + − 3 − 14 18 where K isanyinteger. Unit 1iscalledunitinthesetofpositiveintegers. Prime Apositiveinteger P issaidtobeprime,if (i) P > 1 (ii) P has no divisors except 1 and P i.e., A number which has exactly two different factors, itself and one,iscalleda primenumber. Thus, 2, 3, 5, 7, 11, ... are primes. 2 is the only even number which is prime. All other primes beingodd. Buttheconverseisnottrue i.e., everyoddnumberneednotbeprime. Composite Every number (greater than one) which is not prime is called composite number. i.e., a number which has more than two different factors is called composite. For example 18 is a composite number because 2, 3, 6,9aredivisorsof18otherthan1and18. We can also define a composite number as : A n is said to be composite, if there exists integers l and m suchthat n = lm,where 1

Remark

G Aprimenumber P canbewrittenasaproductonlyinonewaynamely P.1. G A composite number n can also be written as n.1. But composite number can be written in one more way alsoasmentionedabove. G Acompositenumberhasatleastthreefactors.

Note 1isneitherprimenorcomposite. Twin Primes Apairofnumbersissaidtobe twinprimes,iftheydifferby2. e.g., 3,5aretwinprimes. Perfect Number Anumber n issaidtobeperfectifthesumofalldivisorsof n (including n)isequalto2n. Forexample 28isaperfectnumberbecausedivisorsof28are1,2,4,7,14,28. Sumofdivisorsof n ()=28 = 1 + 2 + 4 + 7 +14 + 28 =56 = 2n Coprime Integers Twonumbers a and b aresaidtobe coprime,if1isonlycommondivisorsof a and b. i.e., ifGCD of a and b = 1 i.e., if (,)a b = 1 e.g., (4,5) = 1,(8,9) = 1.

Theorem1 If a= qb + r , then (,)(,)a b= b r . Proof Let (,)a b= d and (,)b r= e Q (,)a b= d ∴ d | a and d | b ∴ d | aand d| qb ∴ d | (a –qb) i.e., d |r []Qa− qb = r ∴ d iscommondivisorof b and r. ∴ d |e [Qe istheGCD of b and r]…(i) Again Q (b, r) = e e e ∴ e |b and e |r ∴ and bq r ∴ e|bq + r i.e., e|a []Qa= bq + r ∴ e isacommondivisorof a and b. ∴ e|d [Qd istheGCD of a and b]…(ii) From Eqs.(i)and(ii),wehave d= e i.e., (,)(,)a b= b r Remark Theaboveresultcanalsobestatedas: GCD of a and b issameasGCD of b and r,where r isremainderobtainedondividing a by b.

Corollary If (,)a b = 1,then (,)(,)b r= a b = 1 i.e., if a is coprime to b,then r is coprime to b. r isremainderobtainedondividing a by b. TheoryofNumbers 5

Theorem 2 If d is the greatest common divisor of a and b, then there exists integers x and y such that d= xa + yb anddistheleastpositivevalueof xa+ yb. Proof CaseI Bysuccessiveapplicationofdivisionalgorithmtonumbers a and b. K Let r1,,, r 2 rn besuccessiveremainders. = + < < Therefore, a bq1 r 10, r 1 b (Dividing a by b) = + < < b r1 q 2 r 20, r 2 r 1 (Dividing b byremainder r1 ) = + < < r1 r 2 q 3 r 3, 0 r 3 r 2 (Dividing r1 byremainder r2 ) M M M = + < < rn−2 r n − 1 qn r n , 0 rn rn − 1 = + < < rn −1 rn qn + 1 r n + 1, 0 rn + 1 rn > > K Since r1 r 2 is a set of decreasing integers, this process must terminate after a finite number of step. i.e., remaindermustbezeroaftersomestage. = ∴ = + = Solet rn + 1 0 rn −1 rn qn + 10 rn qn + 1 ∴ = = rn | rn − 1 (,)rn − 1 rn r n [If a | b,then ()]a, b a = = = = K = = Now, ()()(,)(,)a,, b b r1 r 1 r 2 r 2 r 3 (,)rn − 1 rn rn …(i)

i.e., GCDof a and b is rn . = − = + = = − Fromfirstofaboveequations r1 a bq 1 ax 1 by 1,where x11,, y 1 q = − = − Puttingthevalueof r1 a bq 1 in r2 b r 1 q 2 = − = − − = − + r2 b r 1 q 2 b() a bq 1 q 2 b aq2 bq 1 q 2 = − + + = + = − aq2 b1( q 1 q 2 ) ax2 by 2 , where x2 q 2 = + y21 q 1 q 2 = + = + Similarly, r3 ax 3 by 3 andsoon rn ax n by n = + or rn ax by = = where xn x and yn y = = = + i.e., GCD of a and b rn canbeexpressedas (,)a b d ax by [ByEq.(i)] CaseII (,)a b= d (Q d | a and d | b) ∴ d| ( ax+ yb ) forallvaluesof x and y. ∴ ∃ aninteger k suchthat xa+ yb = kd …(ii) Butleastvalueof k is1. Putting k = 1 inEq.(ii),leastvalueof xa+ yb is d.

Corollary If a and b are coprime integers i.e., if (,),a b = 1 then there exists integers x and y such that ax+ by = 1

 a b Example 1 If (,)a b= d,then  ,  =1. d d  Solution Q (,)a b= d ∴ d| a and d| b [BydefinitionofGCD]. ∴ = Thereexistsintegers a1and b1 suchthat a da1 …(i) = b db1 …(ii) Again Q (,)a b= d 6 IndianNational MathematicsOlympiad

Thereexistsintegers x and y suchthat ax+ by = d [ByTheorem2] Puttingvaluesof a and b fromEqs.(i)and(ii) + = da1 x db 1 y d. + = or a1 x b 1 y 1 = (,)a1 b 1 1 [Bycorollarytheorem1]      a b = Q =a = b or , 1  FromEq.(),(), ia1, fromEq. ii b 1  d d   d d  Remark = = = = (,)a b d and a a1 d, b b 1 d,then a1 and b1 are coprime i.e., (,)a1 b 1 1

Example 2 Ifa|bc and (,),a b =1 thena|c. Solution Q a|bc ∴ Thereexistsaninteger d suchthat bc= ad …(i) Q (,)a b =1 ∴ Thereexistintegers m and n suchthat am+ bn =1 …(ii) MultiplyingbothsidesofEq.(ii)by c, acm+ bcn = c …(iii) Putting bc= ad fromEq.(i)inEq.(iii) acm+ adn = c a() cm+ dn = c ∴ a|c

Note If a|bc and (,)a b =1,then a|c.Thisresultisalsoknownas GaussTheorem.

Example 3 Provethateverytwoconsecutiveintegersare coprime. Solution Let n and n + 1 betwoconsecutiveintegers. Let (,)n n+1 = d ∴ d|n and d|n + 1 d|( n+1 ) − n or d |1 ∴ d =1 ∴ (,)n n +1 = 1 i.e., n and ()n + 1 arerelativelyprime.

Example 4 Showthat GCD of a+ b and a− b iseither 1 or 2, if (,)a b =1. Solution Let (,)a+ b a − b = d ∴ d|( a+ b ) and d|( a− b ) ∴ d|( a+ b + a − b ) and d|( a+ b ) − ( a − b ) or d| 2 a and d| 2 b. i.e., d isacommondivisorof 2a and 2b. ∴ d|(2 a , 2 b ) [BydefinitionofGCD] TheoryofNumbers 7

i.e., d|2 ( a , b ) [Q(,)(,)]ma mb= m a b But (,)a b =1 ∴ d |2 ∴ d =1 or d = 2 .

Example 5 Find GCD of 858 and 325 andexpressitintheformm 858+ n 325. Solution 858= 325. 2 + 208 …(i) Dividing858by325 325= 2081. + 117 …(ii) Dividing325by208 208= 1171. + 91 …(iii) Dividing208by117 117= 911. + 26 …(iv) Dividing117by91 91= 26. 3 + 13 …(v) Dividing91by26 26= 13. 2 ∴ GCDof858and325is d =13 FromEq.(v), d =13 = 91 − 26 3. Substitutingthevalueof26fromEq.(iv) ⇒ 91− 3(.) 117 − 911 =91 − 3117.. + 3 91 =4.. 91 − 3117 Substitutingthevalueof91fromEq.(iii) =4208(). − 117 − 3117 =4.. 208 − 7117 Substitutingthevalueof117fromEq.(ii) =4.() 208 − 7 325 − 2081 =4... 208 − 7 325 + 7 208 =11208.. − 7 325 =11(.). 858 − 325 2 − 7 325 [Puttingthevalueof208fromEq.(i)] =11858... − 22 325 − 7 325 =11858.. − 29 325 =m858 + n. 325 where m=11, n = − 29

Example 6 Ifaandbarerelativelyprime,thenanycommondivisorofacandbisadivisorofc. Solution a and b arerelativelyprime ∴ ∃ integers x and y suchthat ax+ by =1 …(i) Let d beanycommondivisorof ac and b. Q d| ac, ∴ ∃ aninteger m suchthat ac= dm …(ii) Q d| b , ∴ ∃ aninteger n suchthat b= dn …(iii) MultiplyingbothsidesofEq.(i)by c acx+ bcy = c …(iv) 8 IndianNational MathematicsOlympiad

Puttingthevaluesof ac and b fromEqs.(ii)and(iii)inEq.(iv). dmx+ dncy = c or d() mx+ ncy = c ∴ d | c

Example 7 If a andbareanytwooddprimes,showthat ()a2− b 2 iscomposite.

Solution a2− b 2 =()() a − b a + b Q a.0 and b areoddprimes. So,let a=2 k + 1 b=2 k ′ + 1 ∴ a− b =2 k + 1 − 2 k ′ − 1 =2k − 2 k ′ =2(k − k ′ ) iseven a+ b =2 k + 1 + 2 k ′ + 1 =2k + 2 k ′ + 2 =2()k + k ′ + 1 iseven ∴ Neither ()a− b nor ()a+ b isequalto1. ∴ Neitherofthetwodivisors ()a− b and ()a+ b of ()a2− b 2 isequalto1. ∴ ()a2− b 2 iscomposite. [Q Outofthetwodivisorsofaprimenumber p,onemustbeequalto1]

Example 8 Ifa|c,b|cand (,)a b =1,thenab|c. Solution Q a|c ∴Thereexistsanintegers d suchthat c= ad …(i) Q b|c ∴ Thereexistsaninteger e suchthat c= be Q (,)a b =1,thereforethereexistintegers m,n suchthat am+ bn =1 …(ii) Multiplyingbothsidesby c acm+ bcn = c …(iii) Putting c = be fromEq.(ii)in acm and c= ad fromEq.(i)in bcn,Eq.(iii)becomes abem+ band = c ab() em+ dn = c ∴ ab| c

Example 9 Ifa2− b 2 is a , show thata2− b 2 = a + b, wherea, b are natural numbers.

Solution a2− b 2 =()() a − b a + b …(i) Q ()a2− b 2 isaprimenumber ∴ Oneofthetwofactors =1 Q a− b =1 [Qa− b < a + b] TheoryofNumbers 9

Q Theonlydivisorofaprimenumberare1anditself. Eq.(i)becomes a2− b 2 =1()a+ b or a2− b 2 = a + b e.g., 32− 2 2 = 5 (whichisprime) ⇒ 32− 2 2 = 3 + 2, 3 2, ∈N.

Example 10 Prove that an integer is divisible by 9 if and only if the sum of its digits is divisible by 9. = K Solution Let a an a3 a 2 a 1 beaninteger

[Note a is not the product of a1,, a 2 a 3,…, an but a1,,, a 2 a 3 …,an are digits in the value of a. For example 368 is not the product of 3, 6 and 8 rather 3, 6, 8 are digits in value of368 =8 + 6 × 10 + 3 × ()] 10 2 = a an …a3 a 2 a 1 = +1 +2 +3 + K + n − 1 a1 ()()()10 a2 10 a3 10 a4 ( )10 an = + + + + K a110 a 2 100 a 3 1000 a 4 = + + + + + + + a1()() a 29 a 2 a 3 99 a 3 ()...a4999 a 4 = + + + +K + + + + K ()a1 a 2 a 3 a 4 ()9a2 99 a 3 999 a 4 …(i) = + + + + or a S9(...) a2 11 a 3 111 a 4 = + + + + K where S a1 a 2 a 3 a 4 isthesumofdigitsinthevalueof a ∴ − = + + + a S9(...) a2 11 a 3 111 a 4 ∴ 9|(a− S ) …(ii) CaseI a isdivisibleby9 i.e., 9|a …(iii) ∴ 9| [()]a− a − S [FromEqs.(ii)and(iii)] i.e., 9|S i.e., sumofdigitsisdivisibleby9. CaseII S (sumofdigits)isdivisibleby9 i.e., 9|S …(iv) FromEqs.(ii)and(iv),9|[()]a− S + S i.e., 9|a i.e., theinteger a isdivisibleby9.

Theorem 3 Provethattheproductofanyrconsecutivenumbersisdivisiblebyr ! . Proof Let = + +K + − Pn n( n1 )( n 2 ) ( n r 1 ) …(i) betheproductof r consecutives integersbeginningwith n. WeshallprovethetheorembyInductionmethod. = = For r1, Pn n isdivisibleby 1! forall n. ∴ Thetheoremistruefor r = 1 i.e., theproductof1(consecutive)integerisdivisibleby1!. Letusassumethetheoremtobetruefortheproductof ()r − 1 consecutiveintegers. 10 IndianNational MathematicsOlympiad

i.e., everyproductof ()r − 1 consecutiveintegersisdivisibleby ()!r − 1 . Changing n to n + 1 inEq.(i) ∴ = + +K + Pn + 1 ( n1 )( n 2 ) ( n r ) Multiplyingbothsidesby n = + +K + nPn + 1 n( n1 )( n 2 ) ( n r ) =n( n +1 )( n + 2 )K ( n + r − 1 )( n + r ) = + nPn + 1 () n r Pn = + nPn rP n − = ⋅ or n() Pn + 1 Pn r P n − = ⋅ Pn or P+ Pn r n 1 n + +K + − = ⋅ n( n1 )( n 2 ) ( n r 1 ) r [Usingvalueof Pn ] n − = + +K + − or Pn + 1 Pn r( n1 )( n 2 ) ( n r 1 ) − = or Pn + 1 Pn r Productof ()r − 1 consecutiveintegers. = rP …(i) Where P denotestheproductof ()r − 1 consecutiveintegers. Buttheproduct P of ()r − 1 consecutiveintegersisdivisibleby ()!r − 1 . [Byassumption] ∴ P= k( r − )!1 ∴ − = − = − = Eq.(i)becomes Pn + 1 Pn rk()! r 1 kr( r )1 ! k()! r − ∀ i.e., r! | ( Pn + 1 Pn ), n Put n = 1 ∴ − r!| ( P2 P 1 ) = ⋅ ⋅K = But P1 1 2 3 r r ! isdivisibleby r !

i.e., r1!| P 1 ∴ − + r!| ( P2 P 1 ) P 1 i.e., r!| P2 Put n = 2, ∴ − r!| ( P3 P 2 )

But r!| P2 ∴ − + r!| ( P3 P 2 ) P 2

i.e., r!| P3 andsoon.

Generalising wecansaythat r!| Pn forall n. n Corollary Cr isaninteger − −K − + − n = n ! = n( n1 )( n 2 ) ( n r 1 )( n r )! Cr r!( n− r )! r!()! n− r − −K − + = n( n1 )( n 2 ) ( n r 1 ) r ! the product ofr consecutive integers = = Aninteger r ! (QTheproductof r consecutiveintegerisdivisibleby r !) .

Note Thereforetheproductoftwoconsecutiveintegersisdivisibleby 2!;= 2 theproductofanythree consecutiveintegersisdivisibleby 3= 6! andsoon. TheoryofNumbers 11

Example 1 Provethatproductoftwooddnumbersoftheform 4n + 1 isoftheform ()4n + 1 . Solution Let a=4 k + 1, b=4 k ′ + 1 betwonumbersoftheform ()4n + 1 ∴ ab=()()4 k + 1 4 k ′ + 1 =16kk ′ + 4 k + 4 k ′ + 1 =4() 4kk ′ + k + k ′ + 1 =4l + 1 (where l=4 kk ′ + k + k ′) Whichisinform ()4n + 1 .

Example 2 Provethatsquareofeachoddnumberisoftheform 8j + 1 . Solution Let n=2 m + 1 beanoddnumber. n2=()2 m + 1 2 = 4 m 2 + 4 m + 1 =4m() m + 1 + 1 Now, m() m + 1 beingproductoftwoconsecutiveintegers,isdivisibleby 2! = 2 ∴ m() m+1 = 2 j ⇒ n2 =4() 2 j + 1 =8j + 1

Example 3(a) Showthatsumofanintegeranditssquareiseven. Solution Let n beanyinteger. So,wehavetoprovethat n2 + n iseven. ⇒ n2 + n = n() n + 1 which is product of two consecutive numbers n and n + 1 and hencedivisibleby 2! = 2 Hence, n2 + n isanevennumber.

Example 3(b) Ifnisaninteger.Provethatproduct n() n 2 −1 ismultipleof 6.

Solution n()()() n2 −1 = n n − 1 n + 1 =()()n −1 n n + 1 Whichbeingtheproductofthreeconsecutiveintegersisdivisibleby 3! = 6 ∴ n() n 2 −1 isdivisibleby6. i.., e n() n 2 −1 isamultipleof6. Note If n isamultipleof p,weshallwrite n= M() p .

Example 4 Ifrisaninteger,showthat r()() r2 −1 3 r + 2 isdivisibleby 24. Solution r()()()()() r2 −1 3 r + 2 = r r − 1 r + 1 3 r + 2 =()()()r −1 r r + 1{} 3 r + 2 − 4 =3()()()()()r − 1 r r + 1 r + 2 − 4 r − 1 r r + 1 ()()()r−1 r r + 1 r + 2 beingtheproductoffourconsecutiveintegersisdivisibleby 4! = 24 ∴ 3()()()r− 1 r r + 1 r + 2 isalsodivisibleby24. 12 IndianNational MathematicsOlympiad

Again ()()r−1 r r + 1 isdivisibleby 3! = 6 ∴ 4()()r− 1 r r + 1 isalsodivisibleby 4⋅ 6 = 24 ∴ r()() r2 −1 3 r + 2 =3()()()()r − 1 r r + 1 r + 2 − 4 r − 1 r() r + 1 isalsodivisibleby24.

Example 5 Ifm,narepositiveintegers,showthat (m+ n )! isdivisibleby m!! n . + ⋅ ⋅KK + + + Solution (m n )! = 1 2 3m()()() m 1 m 2 m n m!! n m!! n + +K + = m!()()() m1 m 2 m n m!! n + +K + = ()()()m1 m 2 m n n! = The product ofn consecutive integers n! = Aninteger ∴ (m+ n )! isdivisibleby m!! n .

Example 6 If ()4x− y isamultipleof 3,showthat 4x2+ 7 xy − 2 y 2 isdivisibleby 9. Solution Q 4x− y isamultipleof3. ∴ 4x− y = 3 m ∴ y=4 x − 3 m Onputtingvalueof y in 4x2+ 7 xy − 2 y 2 =4x2 + 7 x()() 4 x − 3 m − 2 4 x − 3 m 2 =4x2 + 28 x 2 − 21 xm −2() 16x2 + 9 m 2 − 24 xm =4x2 + 28 x 2 − 21 xm − 32 x 2 − 18 m 2 + 48 xm =27mx − 18 m2 =9m() 3 x − 2 m ∴ 4x2− 7 x − 2 y 2 isdivisibleby9.

Example 7 If n isaninteger,provethat n()() n+1 2 n + 1 isdivisibleby 6. Solution n()() n+1 2 n + 1 =n()[()()] n +1 n + 2 + n − 1 =n()()()() n +1 n + 2 + n n + 1 n − 1 =n()()()() n +1 n + 2 + n − 1 n n + 1 Each of the two ()()n−1 n n + 1 and ()()n+2 n + 1 n being the product of three consecutive integersisdivisibleby 3= 6! ∴ n()() n+1 2 n + 1 isalsodivisibleby6.

Example 8 Provethat 4 doesnotdivide ()m2 + 2 foranyinteger m. Solution Q m isaninteger. ∴ Either m isevenor m isodd. CaseI m iseven Solet m= 2 k TheoryofNumbers 13

∴ m2+2 =() 2 k 2 + 2 =4k 2 + 2 =2() 2k 2 + 1 =(2 × an odd integer) Whichisnotdivisibleby4. CaseII m isodd Let m=2 k + 1 ∴ m2+2 =() 2 k + 1 2 + 2 =4k2 + 1 + 4 k + 2 =()2 + 4k + 4 k 2 + 1. Whichbeinganoddintegerisnotdivisibleby4.

Note Twoimportantformulae. 1.If n iseitherevenorodd, − − − − xn− y n =()( x − y x n1 + x n 2 y +xn3 y 2 +K + y n 1) 2.If n isodd, − − − − xn+ y n =()( x + y x n1 − x n 2 y +xn3 y 2 −K + y n 1)

Example 9 Provethat 8n− 3 n isdivisibleby 5. − − − Solution 8n− 3 n =()(. 8 − 3 8 n1 + 8 n 2 3 + K + 3n 1) − − − or 8n− 3 n = 5(.) 8 n1 + 8 n 2 3K + 3 n 1 ∴ 8n− 3 n isdivisibleby5.

Example 10 If p >1 and 2p − 1 isprime,thenprovethatpisprime. Solution Ifpossible,let p benotprime ∴ p iscomposite.(Q p >1) ∴ p= mn, where m >1 and n >1 ∴ 2p− 1 = 2 mn − 1 =(m )2 n − 1 n Putting 2m =a =an −1 n ,where a =2m > 2 − − − =()()a −1 an1 + a n 2 +K + 1 n 1 Now,eachofthetwofactorson RHS isgreaterthan1. ∴ 2p − 1 iscomposite. Butitiscontrarytogiven ∴ p mustbeprime. Remark p G Butconverseisnottrue i.e., when p isprime, 2− 1 neednotbeprime. 11 G For example, p =11 isprimebut 2− 1 isdivisibleby23andhenceisnotprime.

Theorem 4 Thenumberofprimesisinfinite. Proof Ifpossiblesupposethatthenumbersofprimeisfinite. ∴ ∃ thegreatestprimesay q. Let b denotetheproductoftheseprimes2,3,5,…,q. i.e., let b=2 ⋅ 3 ⋅ 5 K q …(i) let a= b + 1 …(ii) Surely, a ≠ 1 (Qa= b +1 > 1) 14 IndianNational MathematicsOlympiad

∴ Thenumber a musthaveaprimesayfactor p i.e., p| a. Now, p is one of the primes 2, 3, 5, 7 … q (Because according to our assumption 2, 3, 5, 7, … q are the only primes). ∴ p| b (Qb= 235..K q ) Now p| a and p| b ∴ p| a− b or p |1 [QfromEq.(ii), a− b = 1] p = 1 (whichisimpossible) (Q1isnotprime) Sooursuppositionisfalse. ∴ Thenumberofprimesisinfinite.

Theorem 5 Fundamental Theorem of Arithmetic each natural number greater than 1 can be expressedasaproductofprimesinoneandonlyoneway(exceptfortheofthefactors).

Example 1 Everynaturalnumberotherthan 1 admitsofaprimefactor. Solution Supposethat n ≠1 isanaturalnumber. If n itselfisaprimenumber,theexampleisprovedinasmuchastheprimenumber n isafactorofitself. If n iscomposite,then n musthavefactorsotherthan1and n. Let l betheleastofthesefactorsof n otherthan1and n. i.e., 1 1 ∴ l iscomposite ∴ ∃ integers l1 and l2 suchthat = < < < < l l1 l 2 where1 l1 l and1 l2 l ⇒ l1| l but l| n ∴ < < < l1| n where1 l1 l n < i.e., l1() l isadivisorof n otherthan1and n. < Butthisisacontradictionbecause l1 l and l istheleastdivisorof n otherthan1 and n. ∴ Oursuppositioniswrong. ∴l isaprimefactorof n.

Example 2 Show that every odd prime can be put either in the form 4k + 1 or 4k + 3 (i.e., 4k − 1), wherekisapositiveinteger. Solution Let n beanyoddprime.Ifwedivideany n by4,weget n=4 k + r where 0≤r < 4 i.e., r = 0,,, 1 2 3 ∴ Either n= 4 k or n=4 k + 1 or n=4 k + 2 or n=4 k + 3 Clearly, 4n isneverprimeand 4n+ 2 = 2() 2 n + 1 cannotbeprimeunless n = 0 (Q 4and2cannotbefactorsofanoddprime) TheoryofNumbers 15

∴ Anoddprime n iseitheroftheform 4k + 1 or 4k + 3. But 4k+ 3 = 4() k + 1 − 4 + 3 = 4 k ′ − 1 (where k′ = k + 1) ∴ Anoddprime n iseitheroftheform 4k + 1 or ()4k + 3 i.e., 4k′ − 1. Note 1.Everynumberoftheform 4k + 3 isoftheform 4k − 1 andconversely. 2.Everynumberoftheform 4k + 1 or 4k − 1 isnotnecessarilyprime. 3.Theaboveresultshouldbecommittedtomemory.

Example 3 Showthatthereareinfinitelymanyprimesoftheform 4n + 3. Solution Ifpossible,letnumberofprimesofform ()4n + 3 befinite. These primes are 3, 7, 11,…, q (put n = 0, 1, 2, …) Let q bethegreatestoftheseprimesoftheform ()4n + 3 . Let a= 3,,,, 7 11 K q betheproductofallprimesoftheform ()4n + 3 . Let b=4 a − 1 …(i) ⇒ b >1 [Qa ≥ 3,∴b=4 a − 1, b ≥11] ∴ Byfundamentaltheorem b canbeexpressedasaproductofprimessay K p1.. p 2 p 3 pr . = K i.e., b p1. p 2 pr …(ii) Now, b=4 a − 1 isoddandhence2can'tbeafactorof b. ∴ Noneoftheprimefactorsin RHS ofEq.(ii)is2. i.e., Everyprimefactorin RHS ofEq.(ii)isodd. ∴ K + + Eachof p1,,, p 2 pr isoftheform ()4n 1 or ()4n 3 . K + Again,all p1,,, p 2 pr can'tbeoftheform ()4n 1 . [Q Ifitwereso,then b (theirproduct)willalsobeoftheform ()]4n + 1 . ButthisiscontrarytoEq.(i)as b=4 a − 1 isoftheform ()4n + 3 . ∴ K + Atleastoneof p1, p 2 pr (say p)is(aprimefactorof b)oftheform ()4n 3 i.e., p|b. Also p|a [Q p isoneprimeoftheform ()4n + 3 and a isproductofallsuchprimes]. ∴ p|4a ∴ p|(4 a− b ) ∴ p |1 [Q fromEq.(i), 4a− b = 1] Whichisimpossible [Q p beingprime >1 ] ∴ Oursuppositioniswrong. ∴ Numberofprimesoftheform ()4n + 3 isinfinite.

Theorem 6 The number of divisors of a composite number n : If n is a composite number of the α α α = 1 2 k order n p1. p 2 …pk ,thenthenumberofdivisorsdenotedby d() n is α+ α +K α + (11 )( 2 1 ) (k 1 ) Proof Let n be any composite number, let d() n denote the number of divisors of composite number n by Fundamental Theorem of Arithmetic. n can be expressed as the product of the powers of primes. α α α = 1 2 K k K α α α n p1. p 2 pk ,where p1 ,p2 ,, pk aredistinctprimesand 1 , 2…, k arenonnegativeintegers. 16 IndianNational MathematicsOlympiad

α α Q 1 2 3 K 1 p1 isaprimenumber,therefore,theonlydivisorsofp1 are1, p1, p1 ,,, p1 p1 α 1 α= + Thenumberofthesedivisorsof p1 1 1 α 2 α= + Similarly,thenumberofdivisorsofp2 2 1 α k α= + Thenumberofdivisorsof pk k 1 α α α =1 ⋅ 2 K k =α + α+K α + Therefore,thetotalnumberofdivisorsof n p1 p 2 pk ()()()1 1 2 1k 1 α Q i ≤ ≤ [ Everydivisorof ()1 i k isadivisorof n] =α + α + α + i.e., d( n ) (11 )( 2 1 )…()k 1 . α α α =1 ⋅ 2 ⋅ 3 Note Let n p1 p 2 p 3 [,,p1 p 2 p 3 aredistinctprimenumbers] Let d() n denotesnumberofdivisor. 1.If n isaperfectsquarethen d() n isodd Q ( allthe di areeven) 2.If n isnotaperfectsquarethen, d() n iseven. [Thenumberofwaysofwriting n aretheproductoftwofactors.] d() n + 1 If n isaperfectsquare,thennumberofwaysareequalto . 2 d() n If n isnotaperfectsquare,thennumberofwaysareequalto . 2

Theorem 7 The sum of the divisors of any composite number n is denoted by σ()n which is equal to  α+1   α +1   α + 1  p 1− 1 p 2 − 1 p k − 1  1   2  K  k  .  −   −   −   p1 1   p2 1   pk 1 

Proof Let n be any composite number and let σ()n is sum of positive divisors of n. By Fundamental TheoremofArithmetic n canbeexpressedastheproductofthepowersofprimes. α α α ∴ = 1 2 K k n p1. p 2 pk K α αK α [where p1,,, p 2 pk aredistinctprimesand 1,,, 2 k arenon-negativeintegers] Q p1 isprimenumber α α ∴ 1 2 K 1 divisorsof p1 areonly 1,,p1 p1 ,, p1 α + 1 α α 1[]p − 1 Sumofthesedivisorsof p1 =1 + p + p2 +K + p 1 = 1 1 1 1 1 p − 1  n −  Q = = =α + = a( r )1  RHS isaGeometricProgression with a 1, r p1, n 1 1 and Sn   r − 1 

α + 1 α ()p 2 − 1 Similarlysumofdivisorsofp 2 = 2 2 − p2 1 α + 1 α ()p k − 1 Sumofdivisorsof p k = k k − pk 1 α α α ∴ σ = =1 ⋅ 2 k ()n Sumofdivisorsof n p1 p 2 ... pk α+1 α +1 α + 1 ()p 1− 1 ()p 2 − 1 ()p k − 1 = 1 . 2 K k . − − − ()p1 1 ()p2 1 (pk 1) α Q i ≤ ≤ [ Everydivisorof pi ()1 i k isdivisorof n] TheoryofNumbers 17

Note If dk () n denotesthesumof k thpowerofdivisorof n,then α+ α + α + ()pk ()()11 −1 ()pk 2 1 −1 ()pk ()m 1 −1 d() n = 1 ⋅ 2 K m k k − k − k − ()p1 1 ()p2 1 ()pm 1

Example 1 Findthesumofthecubesofdivisorof 12. Solution 12= 22 × 3 3()() 2+ 1 − 3 1 + 1 − = 2 1 × 3 1 = dk ()12 2044 23 − 1 33 − 1

Example 2 Findthenumberofdivisorof 600. Solution 600= 23 × 3 1 × 5 2 α= α = α = 13,, 2 1 3 2 =α + α + α + Numberofdivisors ()()()11 2 1 3 1 =()()()3 + 1 1 + 1 2 + 1 =4 × 2 × 3 = 24 Greatest Integer Function Greatestintegerfunctionisalsoknownas BracketFunction. If x is any real number, then the largest integer which does not exceed x is called the integral part of x andwillbedenotedby []x . The function which associates with each real number x, the integer []x is often called the bracket function. Forexample, [],[],3= 3 − 4 = − 4 [ . ]37= 3 5 [.],,−42 = − 5 = 1 [−π ] = − 4 3

Note 1. []x isthelargestinteger ≤ x. 2. If a and b arepositiveinteger,suchthat a= qb + r, 0 ≤r < b a r r Then, =q + ,where 0< < 1 b b b   ∴ a =   q b  a  i.e.,   isthequotientinthedivisionof a by b. b  Properties of Greatest Integer Function (1) [][]x≤ x < x + 1 and x−1 < [ x ] ≤ x , 0≤x,[] 0 ≤ x − x < 1

(2) If x≥0,[] x = Σ 1 1 ≤i ≤ x (3) [][],x+ m = x + m If m isaninteger.

(4) [][][][][]x+ y ≤ x + y ≤ x + y + 1

(5) [][],x+ − x = 0 If x isaninteger = − 1 otherwise. 18 IndianNational MathematicsOlympiad

[]x   x  (6)   = , if m isapositiveinteger. m  m 

(7) −[] −x istheleastintegergreaterthanorequalto x. Thisisdenotedas ()x (readasceiling x) Forexample, (.),(.)25= 3 − 25 = − 2 (8) [.]x + 05 isthenearestintegerto x. If x ismidwaybetweentwointegers, [.]x + 05 representsthelargerofthetwointegers.  n  (9) Thenumberofpositiveintegerslessthanorequalto n anddivisibleby m isgivenby . m 

(10) If p isaprimenumberand e isthelargestexponentof p suchthat ∞   e n p| n ! , then e = Σ   i = 1 pi 

[]a  a  Theorem 1 Ifaisrealnumber,cisnaturalnumber,then   =  c  c  Proof Let []a= n i.e., n islargestinteger ≤ a ∴ a= n + r, 0≤r < 1 …(i) []a  n  Let   = = m  c  c  n ∴ =m + s, where 0≤s < 1 c ∴ n= mc + cs, where 0 ≤cs < c …(ii) []a  n  Now, LHS = −   = = m  c  c  a  n+ r  RHS = = [Puttingvalueof a from Eq.(i)] c   c  Puttingthevalueof n fromEq.(ii). + + = mc cs r   c   cs+ r  =m +  c  FromEq.(ii), cs ≤()c − 1 and r < 1 Adding cs+ r < c −1 + 1 ⇒ cs+ r < c cs+ r ∴ < 1 c  cs+ r  ∴ RHS =m + = m  c  ∴ LHS = RHS. TheoryofNumbers 19

Theorem 2 Foreverypositiverealnumber x  x + 1 + = []x 2  2  Proof Firstsupposethat x=2 m + y , where m isanintegerand 0≤y < 1. x  [],x= 2 m = m 2 x+ 1 2 m+ 1 + y  = = m  2   2  1 1 + y Since ≤ < 1 2 2 x  x + 1 ∴ + = []x 2  2  Next,let x=(),2 m + 1 + y where m isanintegerand 0≤y < 1. x  x+ 1 ()2 m+ 2 + y  Then, = m, = =m + 1 2  2   2  []x=2 m + 1 x  x + 1 ∴ + = []x 2  2  Thedesiredequalityholdsforallpossiblevaluesof x.

Example 1 Findthehighestpowerof 3 containedin 1000!. Solution p=3, n = 1000       n = 1000 = 1 =     333  333 p   3   3     n = 333 = =     []111 111 p2   3      n = 111 = =     []37 37 p3   3        n = 37 = 1 =     12  12 p4   3   3     n = 12 = =     []4 4 p5   3        n = 4 = 1 =     1  1 p6  3  3     n = 1 =     0 p7  3 ∴ Highestpowerof3containedin1000! n   n   n   n   n   n   n  =   +   +   +   +   +   +   p  p2 p 3 p 4  p5  p6 p 7 

=333 + 111 + 37 + 12 + 4 + 1 + 0 = 498 20 IndianNational MathematicsOlympiad

n  n + 1 2n  Theorem 3 Ifnandkarepositiveintegersandkisgreaterthan 1, then + ≤ k   k   k  Proof Let n= qk + r, q and r areintegersand 0≤r ≤ k − 1 n r n + 1r + 1 Then, =q + , =q + , k k k k 2n 2r =2q + k k n  n + 1 2n  (i) r< k − 1, then = q,,= q ≥ 2q k   k   k  Thedesiredresultisimmediate. (ii) r= k − 1,then n  n + 1 = q, =q + 1, k   k  2n  2()k − 1  =2q +   =2q + 1  k   k  + ∴ n  + n 1 = 2n  k   k   k  Fromwhichthedesiredresultisimmediate.

Theorem 4 Ifnbeanypositiveinteger,thenshowthat n+ 1  n+ 2  n+ 4  n + 8 + + + +K = n  2   4   8   16 

Proof Weknowthat, x  x + 1 []x = + 2  2  n n n n Applyingaboveformulaton,,,,, K 2 4 8 16 n  n + 1 []n = + 2  2  n  n  (/)n 2+ 1 = +   2  4  2 

n  n  (/)n 4+ 1 = +   4  8  2 

n  n  (/)n 8+ 1 = +    8  16  2  n  n  n  Addingcorrespondingsidesandcancellingouttheterms ,,,…frombothsides,wehave 2  4  8 n+ 1  n+ 2  n + 4 n = + + + K  2   4   8  []n= n TheoryofNumbers 21

Theorem5 Foreveryrealnumberx  1  2  n − 1 []x+ x + +x + +K +x + = []nx  n   n   n  Proof Let x=[], x + y where 0≤y < 1 Let p beanintegersuchthat p−1 ≤ ny < p (This is always possible because given a real number, we can always find two consecutive integers betweenwhichthenumberlies). k k Now, x + =[]x + y + n n k p−1 + k p+ k Also, y + liesbetween and n n n p−1 + k Solongas < 1, n i.e., k< n −( p − )1 k y + islessthan1andconsequently n  k  x +  = []x  n   k  i.e., x +  = []x for k = 0, 1,…, n− p  n   k  But x +  =[x ] + 1,for k= n − p + 1,…, n − 1  n   1  n − 1 ∴ []x+ x + +K +x +  n   n  =[x ] +K + [ x ]( n − p + 1 times) +([x ] +1 ) + ([ x ] + 1 ) +K ( p − 1 ) times =n[ x ] + ( p − )1 …(i) Also, [][[]]nx= n x + ny =n[ x ] + ( p − )1 Since p−1 ≤ ny < p …(ii) FromEqs.(i)and(ii)  1  2  n − 1 []x+ x + +x + + K +x + = []nx  n   n   n 

Theorem 6 Thehighestpowerofaprimenumberpcontainedin n ! isgivenby n   n   n  k( n !) =   +   +   + K p  p 2 p 3 

Proof Letk( n !)denote the highest power of p contained inn !n !is the product of the factors 1, 2, 3, …, n. Thefactorsin n ! whichwillbedivisibleby p are n  p,,,2 p 3 p K  p p  n   n   ∴ k( n !)=   + k    ! …(i) p   p   22 IndianNational MathematicsOlympiad

n Changing n to inEq.(i) p  n   n    n   k   !! =   + k     …(ii)  p  p 2  p 2   PuttingthevaluefromEq.(ii)inEq.(i) n   n    n   k( n !)=   +   + k    ! p  p 2  p 2   n   n   n  Continuingthisprocess,weget k( n !) =   +   +   + K p  p 2 p 3  Thisprocessmustendafterafinitenumberofsteps.

Congruences If a and b are two integers and m is a positive integer, then a is said to be congruent to b modulo m, if m divides a− b denotedby m| ( a− b ). Innotationformweexpressitas a≡ b mod m or a− b ≡ 0 mod m. Note 1. a≡ b mod m,then m|( a− b ) or ()a− b isamultipleof m. 2.If m|( a− b ) [m doesnotdivides ()],a− b then a issaidtobeincongruentto b modmandthis factisexpressedas a isnotcongruentto b mod m. 3.If m| a,then a ≡ 0 mod m Forexample: (i) 13≡ 1 mod4 (Q 4| ())13− 1 = 12 (ii) 4≡ − 1 mod5 (Q 5|( 4− ( − 1 )) = 5 ) (iii) 12≡ 0 mod4 (Q 4|12) (iv) 17isnotcongruentto3mod5 (Q 5| ( 17− 3 ))

Theorem 7 If a≡ b modm,then (i) a+ c = b + c modm (ii) ac≡ bc modm,wherecisanyinteger. Proof (i)Qa≡ b mod m m | (a− b) ⇒ m | {()()a+ c − b + c }[Qa+ c −()] b + c = a − b a+ c ≡ b + c mod m (ii)Qa≡ b mod m m| ( a− b ) m| c ( a− b ) m| ( ac− bc ) ∴ ac≡ bc mod m

Note Theconverseoftheorem15(ii)isnottrue. Theoremstatesthatif a≡ b mod m,then ac≡ bc mod m. i.e., acongruencecanalwaysbemultipliedbyaninteger But the converse is not true i.e.,. It is not always possible to cancel a common factor from a congruence. Forexample: 16≡ 8 mod 4 [Q 4|16–8] But if we cancel the common factor 8 from numbers 16 and 8, we get 2≡ 1 mod 4 which is a false resultbecause 4|( 2− 1 ) TheoryofNumbers 23

Theorem 8 If a≡ b modmand c≡ d modm,then (i) a+ c ≡ b + d mod m (ii) a− c ≡ b − d mod m (iii) ac≡ bd mod m Proof (i)Qa≡ b mod m and c≡ d mod m ∴ m| ( a− b ) and m| ( c− d ) m| (( a− b ) + ( c − d )) or m| (( a+ c ) − ( b + d )) ∴ a+ c ≡ b + d mod m (ii) a≡ b mod m and c≡ d mod m ∴ m| ( a− b ) and m| ( c− d ) ∴ m| ( a− b ) − ( c − d ) or m| ( a− c ) − ( b − d ) a− c ≡ b − d mod m (iii)Qa≡ b mod m and c≡ d mod m m| ( a− b ) and m| ( c− d ) ∴ Thereexistsinteger h and k suchthat a− b = mh and c− d = mk a= b + mh and c= d + mk Multiplyingthetwoequations,weget ac=( b + mh )( d + mk ) =bd + mbk + mhd + m2 hk ac− bd = m() bk + hd + mhk ∴ Bydefinitionof divisibility m| ( ac− bd ) or ac≡ bd mod m Corollary If a≡ b modm,then a2≡ b 2 modm Q a≡ b mod m andagain a≡ b mod m Multiplyingthetwocongruence a2≡ b 2 mod m

Theorem 9 (i)Provethat a≡ a modm i.e.,everyintegeriscongruenttoitself. (ii)If a≡ b modm,then provethat b≡ a mod m (iii) If a≡ b mod m, b≡ c mod m provethat a≡ c mod m Proof (i)Weknowthat m|0 ()m ≠ 0 m| ( a− a ) a≡ a modm [bydefinitionofcongruence] (ii)Let a≡ b mod m m| ( a− b ) ∴ m|− ( a − b ) or m| ( b− a ) ∴ b≡ a mod m (iii)Let a≡ b mod m and b≡ c mod m ∴ m| ( a− b ) and m| ( b− c ) ∴ m| ( a− b ) + ( b − c ) or m| ( a− c ) ∴ a≡ c mod m 24 IndianNational MathematicsOlympiad

Theorem 10 If a≡ b modm,then ak≡ b k modmforeverypositiveintegerk. Proof Weknowthat, − − − − ak− b k =( a − b )( a k1 + a k 2 b + a k 3 b 2 + K + b k 1 ) …(i) But a≡ b mod m ⇒m| ( a− b ) ∴ Thereexistsaninteger t suchthat a− b = mt …(ii) Puttingthisvalueof ()a− b fromEq.(ii)inEq.(i) − − − ak− b k = mt( a k1 + a k 2 b + K b k 1 ) ∴ m| ( ak− b k ) ∴ ak≡ b k mod m

≡ =n + n−1 + n − 2 +K + + Theorem 11 If a b mod m and f() x p0 x p 1 x p2 x pn − 1 x pn is an integral rationalfunctionofanindeterminatexwithintegralcoefficients,then f()() a≡ f b mod m Q =n + n−1 + n − 2 + K + + Proof f() x p0 x p 1 x p2 x pn − 1 x pn Putting x= a ∴ =n + n−1 + n − 2 + K + + f() a p0 a p 1 a p2 a pn − 1 a pn …(i) Putting x= b ∴ =n + n−1 + n − 2 + K + + f() b p0 b p 1 b p2 b pn − 1 b pn …(ii) SubtractEq.(i)fromEq.(ii),weget − =n − n + n−1 − n − 1 + K + − f()()()() a f b p0 a b p 1 a b pn − 1 () a b = −n−1 + n − 2 +K + n − 1 + p0 ( a b )( a a b b ) −n−2 + n − 3 +K + n − 2 +K + − p1 ( a b )( a a b b ) pn − 1 () a b − = −n−1 + n − 2 + K +n−2 + n −2 + n − 3 +K + n − 2 or f()()()[( a f b a b p0 a a b b)() p1 a a b b +K + pn − 1 ] …(iii) =()a − b t (say) But a≡ b mod m (given) m| ( a− b ) ∴ ∃ aninteger k suchthat a− b = mk Puttingthisvalueof a− b = mk inEq.(iii) f()() a− f b = mkt ∴ m| f ( a )− f ( b ) ⇒ f()() a≡ f b mod m

Theorem 12 Fermat Theorem Ifpisprime,then ()()a+ bp = a p + b p modp.

Proof Expandingbybinomialtheorem +p = p + p p−1 + p p − 2 2 + K +p p− 1 + p ()a b a C1 a b C2 a b Cp − 1 ab b p − 1 +p = p + p + Σ p p− r r or ()()a b a b Cr a b …(i) r = 1 TheoryofNumbers 25

p = p ! ≤ ≤ − Now, Cr ;()1r p 1 r!( p− r )! But p !..= 123 … p isdivisibleby p p is coprime to r ! Q p is coprime to1,2,3,…r (Qr< p, p isprime) ∴ p iscoprimetotheirproduct = r ! Alsoforthesamereason p is coprime to ()!p− r ∴ p = p ! Cr isdivisibleby p. r!( p− r )! ∴ ∃ aninteger kr suchthat p = Cr pk r p Puttingthisvalueof Cr inEq.(i) p − 1 +p − p + p = Σ p− r r ()()a b a b p kr a b r =1 whichisdivisibleby p. ∴ ()()a+ bp ≡ a p + b p mod p

Generalization If p isaprimenumber,provethat + + +K + p ()a1 a 2 a 3 an ≡p + p + p +K + p ()a1 a 2 a 3 an mod p + + +K +p = + p ()()a1 a 2 a 3 an a 1 b 1 = + +K + where b1 a 2 a 3 an ≡p + p ()a1 b 1 mod p. ≡p + + +K + p [()]a1 a2 a 3 an mod p ≡p + + p [()]a1 a2 c 2 mod p = + +K + ≡p + p + p where c2 a 3 a 4 an ()a1 a 2 c 2 mod p continuinglikethis,weget + + +K + p ≡p + p +K + p ()a1 a 2 a 3 an ()a1 a 2 an mod p Theorem 13 Ifpprimenumber,then ap = a modp

Proof Weknowthat, + + +K + p ≡p + p + p K + p ()a1 a 2 a 3 an (a1 a 2 a 3 an ) mod p …(i) = = =K = = Putting a1 a 2 a 3 an 1 inEq.(i) ()1+ 1 + 1 +K + 1 p ≡()1p + 1 p + 1 p +K + 1 p mod p or np ≡()1 + 1 + 1 +K + 1 mod p or np ≡ n mod p foreverynaturalnumber n. Replacing n by a. ap = a mod p 26 IndianNational MathematicsOlympiad

Theorem 14 Fermat Little Theorem − Ifpisaprimenumberand (,)a p ≡ 1,provethat ap 1 = 1 mod p.

Proof As p isprime. ∴ ap = a mod p Cancelling a frombothsides. [∴a is coprime to p] − Wehave ap 1 ≡ 1 mod p.

=n − n − n + n − n − + −n− 2 n n + − n− 1 n Theorem 15 n!()()... n C1 n1 C 2 n 2 ()()1CCn − 2 2 1 n − 1 Proof Expandingbybinomialtheorem x− n = nx − n()() n−1 x + n n − 2 x−K +n −n− 2 2 x + n − n−1 x + − n ()e1 e C1 e C2 e Cn − 2 ()()1 e Cn − 1 1 e ( )1 …(i) 2 3 θ θ θ θ Weknowthat e =1 + + + + K 1!!! 2 3 θ Usingthisexpansionof e , Eq.(i)becomes n  x x2 x 3 x n  1 + + + +KK + + − 1  1!!!! 2 3 n   2 n  − − 2 − n  = +nx +() nx +KK +() nx +  −n  + ()n1 x+ [( n1 ) x ] +K + [(n1 ) x ] + K 1  C1 1   1! 2! n !   1! 2! n !   − − 2 − n  +n + ()n2 x+ [( n2 ) x ] +KK+ [(n2 ) x ] + C2 1   1! 2! n ! 

2 n  +K +n −n − 2  + 2x+()2 x + KK+(x )2 + Cn − 2 ()1 1   1! 2! n 

 2 n  + −n − 1n  +x + x +KK + x +  + − n ()1Cn − 1  1  ( )1  1!!! 2 n 

Comparingcoefficientof x n onbothsides nn ()n − 1n ()n − 2 n 1 = − nC + nC −K + n ! 1n ! 2 n ! − n − n1 n n− 2 n 2 ()1 Cn − 1 ()−1 C − + n 2 n ! n ! Multiplyingbothsidesby n ! =n − n − n + n − n −K + −n− 2 n n + − n− 1 n n!()() n C1 n1 C 2 n 2 ()()1CCn − 2 2 1 n − 1

Theorem 16 Wilson Theorem Ifpisprime,then ()!p −1 + 1 ≡ 0 modp Proof Case I when p = 2 ()!2− 1 + 1 ≡ 0 mod 2 [Putting p = 2 in ()!p −1 + 1 ≡ 0 mod p ] ⇒ 1! + 1 ≡ 0 mod2 ⇒ 2≡ 0 mod2 whichistrue ∴ Wilsontheoremistruefor p = 2 . TheoryofNumbers 27

CaseII If p isanoddprime. =n − n − n + n − n − + −n− 2 n n + − n− 1 n n!()()... n C1 n1 C 2 n 2 ()()1CCn − 2 2 1 n − 1 Put n= p − 1 onbothsides ∴ − = −p−1 − p − 1 − p − 1 ()!()()p1 p 1 C1 p 2 +p−1 − p −1 + + − p − 3 p −1 p − 1 + − p−2 p − 1 C2 ()..() p 3 1 Cp − 32 ( )1 Cp − 2 …(i) Q p isprime. ∴ p is coprime toallnumbers < p. i.e., p is coprime to p−1,,, p − 2 p − 3 … 2,1. ∴ Putting a= p −1,,, p − 2 p − 3 …2inFermatTheorem − ap 1 ≡ mod p − ()p −1p 1 ≡ 1 mod p − or ()p −1p 1 − 1 = M(p) − ()()p−1p 1 = M p + 1 − Similarly, ()()p−2p 1 = M p + 1 − ()()p−3p 1 = M p + 1 ………………… ………………… ………………… − 2p 1 =M() p + 1 − − − Puttingthesevaluesof (),()p−1p1 p − 2 p 1,…, 2p 1 inEq.(i). ∴ − = + −p − 1 + +p − 1 + + + − p−3 p − 1 ()![()][()]p1 M p 1 C1 M p 1 C2[()]..() M p1 1 Cp − 3 + + − p−2 p − 1 [()]()M p1 1 Cp − 2

p − 1 − = + −p−1 + p − 1 − K + −p − 3 + − p−2 p − 1 or ()!()p1 M p 1 C1 C2 ()()1CCp − 3 1 p − 2 − AddingandSubtracting ()−1 p 1 in RHS. − = +p−1 − p − 1 +p−1 − p −1 +K + − p −3 p − 3 (p1 )! M ( p ) [( 1 ) C1 CCC2 3 ()1 p − 3 + − p−2 p − 1 + −p−1 − − p − 1 ( )1 Cp − 2 ()]()1 1 − − ()!()()()p−1 = M p + 1 − 1p1 − − 1 p 1 − ∴ ()!()()p−1 = M p + 0 − − 1 p 1 =M( p ) − 1 Qp isodd. ∴p − 1 iseven. − ∴ ()−1p 1 = 1 or ()!()p−1 + 1 = M p ()!p −1 + 1 isdivisibleby p. ∴ ()!p −1 + 1 ≡ 0 mod p.

Theorem 17 Converse of Wilson Theorem If p > 1 and ()!p −1 + 1 ≡ 0 modp,thenpisaprimenumber. Proof Ifpossiblelet p benotprime. ∴ p iscomposite(Qp > 1). = < < < < < ≤ − < ≤ − Solet p p1 p 2,where (,)1p1 p 1 p 2 p or 1p1 p 1,1p2 p 1 28 IndianNational MathematicsOlympiad

< ≤ − Now, 1p1 p 1 ∴ − − p1 isoneofthefactorsinthevalueof ()!p 1 andtherefore p1 divides ()!p 1 . = Also p p1 p 2 …(i) ⇒ p1 | p …(ii) But ()!p −1 + 1 ≡ 0 mod p ∴ p| ( p −1 )! + 1 …(iii) FromEqs.(ii)and(iii) − + p1 | ( p 1 )! 1 …(iv) FromEqs.(iv)and(i) − + − − p1 | ( p1 )! 1 ( p 1 )!

i.e., p1 1| Q > Butthisisimpossible. ( p1 1) ∴ p isaprimenumber.

Euler’s Function Definition : The number of integers≤ n and coprime to n is called Euler's function for n and is denoted by φ ().n Examples φ( )1 = 1 [Q1istheonlyinteger ≤ 1 and coprime to1]. φ( )2 = 1 [Q1istheonlyinteger < 2 and coprime to2]. φ( )8 = 4 [Q1,3,5,7aretheonlyfourintegers < 8 and coprime to8]. Remark

G If p is a prime number, then 1, 2, 3, …()p −1 are all less than p and coprime to p and are()p −1 in total. ∴ φ()p = p −1

 1   1   1  Theorem 18 Prove that φ()n = n 1 −  1 −  K 1 −  where p,,..., p p are distinct prime   1 2 r  p1  p 2  pr factorsofn. Q K Proof p1,,, p 2 pr aredistinctprimefactorsof n. k k ∴ = 1 2 K kr n p1. p 2 pr k k k k ∴ φ = φ 1 2 kr = φ1 φ 2 K φ kr ()(....)n p1 p 2 pr ()()()p1 p 2 pr Q K φ = φ φ [ p1,,, p 2 pr are distinct primes and hence are coprime to each other and ()()()ab a b , if a and b are coprime toeachother.]

k 1  k  1   1  =p 11 − p 2 1 − Kp kr 1 −  1 2 r    p1   p2  pr

k k  1   1   1  =p1. p 2 K p kr 1 −  1 −  K 1 −  1 2 r    p1  p 2  pr

 1   1   1  k k =n 1 −  1 −  K 1 −  [.]QKn= p1 p 2 p kr   1 2 r  p1  p 2  pr TheoryofNumbers 29

 1 Theorem 19 Provethat φ()pk = p k 1 −  , where p isprime.  p  − Proof Numberofintegersfrom1to p k whicharenot coprime to p k are p.1, p.2, p.3,… p. p k 1. − Totalnumberofsuchintegers,whicharenotcoprimeto pk= p k 1. ∴ φ()p k = Numberofintegers coprime to p k and < p k. − =pk − p k1 = p k (/)1 − 1 p Remark If a and b are coprime toeachother,then φ()()()ab = φ a φ b .

Example 1 Findthenumberofpositiveintegers ≤ 3600 that coprime to3600. Solution n =3600 = 24 × 3 2 × 5 2 φ()()()n = φ3600 = φ 24 × 3 2 × 5 2  1   1   1   1  1  1 =n1 −  1 −  1 −  =3600 1 −  1 −  1 −              p1 p 2 p 3 2 3 5 = = = [Here p1 2, p23,] p 3 5 1 2 4 =3600 × × × 2 3 5 ∴ φ()3600 = 960

Example 2 If m > 2, showthat φ ()m iseven. Solution If (,)a m =1,then (,)m− a m =1 ∴ Integers coprime to m occurinpairsoftype a and m− a . ∴ φ ()m iseven.

Example 3 Forwhatvaluesofmis φ ()m odd. Solution If m>2, φ ( m ) iseven. φ( )1 = 1 φ( )2 = 1 Onlyfor m=1, m = 2 φ ()m isodd. 10n− 1 10 n − 1 Concept Let a = = 10− 1 9 10n − 1 Wecanexpressany a oftheform intermsofperfectsquare. 9 10n − 1 a = ⇒ 9a = 10n − 1 9 9a + 1 = 10n Let b=9 a + 1 c=8 a + 1 Now,consider 4ab+ c =4a() 9 a + 1 + 8 a + 1 =36a2 + 12 a + 1 =()6a + 1 2 30 IndianNational MathematicsOlympiad

Verification ()6× 1 + 12 = 7 2 = 49 =()6 × 11 + 12 = 67 2 ()6× 111 + 12 = 667 2 Now,consider ()a−1 b + c =(a −1 )( 9 a + 1 ) + 8 a + 1 =9a2 + a − 9 a − 1 + 8 a + 1 =9a2 = () 3 a 2 Verification a = 1 ⇒32 a = 11 ⇒ ( )33 2 Now,consider ()16ab+ c 16a() 9 a+ 1 + 8 a + 1 ()12a + 1 2 Thisisalsoaperfectsquare. Concept Provethateverynumberofthe49,4489,44489,4448889isaperfectsquare. Ifthereare n foursand ()n − 1 eightandone9.

Letusdenote444889as 43 8 2 9.

Consider667writtenas 62 7 Weknow444889 = ()667 2. ∴ 2 = Wedevelop ()6nm −1 7 4n 8n − 1 9 Ifthisistruethen 2 2 2  n −   ×n +   n +  2 = 6() 10 1 + = 6 10 3 = 2. 10 1 ()6n − 1 7  1      9   9   9  2n+ n + 40 40+ 1 = 410.. 410 1 = n−1 n − 1 = 4n 8− 9 9 9 n 1

Example 1 Let n be the natural number. If 2n + 1and 3n + 1are perfect square. Then prove that n isdividedby 40. Solution 40= 23 × 5. Itissufficienttoprovethat n isdivisibleby8and5. Let 2n+ 1 = x 2 …(i) and 3n+ 1 = y 2 …(ii) ⇒ x 2 isodd. ⇒ x isodd. Let x=2 a + 1 ()()2n+ 1 = 2 a + 1 2 2n+ 1 = 4 a2 + 4 a + 1 n=2 a2 + a ⇒ n iseven. If n iseven ⇒ 3n + 1 isodd ⇒ y 2 isodd ⇒ y isodd Let y=2 b + 1 SubtractEq.(i)fromEq.(ii),weget n= y2 − x 2 …(iii) TheoryofNumbers 31

⇒ n=()()2 b + 12 − 2 a + 1 2 Weknowsquaredifferenceofoddnumberisalwaysdivisibleby8. ∴ n isdivisibleby8. …(iv) Ifweeliminate n between1and2 3x2− 2 y 2 = 1 Sincesquareofoddnumberendswith1,5or9 ∴ 3x 2 endswith3,5or4,7 ⇒ 2y 2 endswith2,0,8 ⇒ x 2 endswith1and y 2 endswith1 ⇒ n= y2 − x 2 [fromEq.(iii)] = 0 ∴ Itisdivisibleby5.

Example 2 Prove that there are infinitely many squares in the sequence 1, 3, 6, 10, 15, 21, 28,…

Solution SupposeTn isasquare n() n + 1 LetT oftheabovesequencebe n 2 n( n + )1 ⇒ T = n 2 = 2 IfitisasquarethenTn () m n() n + 1 ⇒ = ()m 2 2 ⇒ n()() n+1 = 2 m 2

Also,T4n n + 1() isalsoasquare. 4n()[()()] n+ 1 4 n n + 1 + 1 ∴ T + = 4n() n 1 2 4()[] 2m2 4 n 2 + 4 n + 1 = =4m2() 2 n + 1 2 2

T4n n + 1()isalsoaperfectsquare. ∴ = perfectsquaresareT1 1 = T8 36isaperfectsquare.

T288 isalsoaperfectsquare.

Example 3 If N =123 × 3 4 × 5 2,findthetotalnumberofevenfactorofN. Solution If N =123 × 3 4 × 5 2 Then, N =26 × 3 7 × 5 2 ∴ TotalNumberoffactorsare =()()()6 + 1 7 + 1 2 + 1 = 7 × 8 × 3 =168 Inabovefactors,someoftheseareoddmultipleandsomeareeven. Theoddmultiplesareformedonlywithcombinationof35and55. Sototalnumberofoddmultiplesis ()()7+ 1 2 + 1 = 24 ∴ Evenmultiples =168 − 24 = 144 32 IndianNational MathematicsOlympiad

Example 4 Showthat n2 −3 n − 19 isnotamultipleof 289 foranyintegern. Solution Suppose172|n 2 − 3 n − 19 Since n2 −3 n − 19 =()() n + 7 n − 10 + 51 17|(n+ 7 )( n − 10 ); ∴ 172 |(n+ 7 )( n − 10 ) (Q n+7 ≡ n − 10 (mod 17 )) ⇒ 172|(n 2 − 3 n − 19 ) − ( n + 7 )( n + 10 ) i.e.,172 | 51 whichisacontradiction Consequently n2 −3 n − 19 isnotamultipleof289.

Example 5 Determineallintegersnsuchthat n4− n 2 + 64 isthesquareofaninteger. Solution Since n4− n 2 +64 > n 4 − 2 n 2 + 1 =()n 2 −1 2 forsomenonnegativeinteger k, ()()n4− n 2 +64 = n 2 + k 2 = n 4 + 2 n 2 k + k 2 64 − k 2 i.e., n 2 = fromwhichwefindthatthepossiblevalues64,1,0for n 2 are 2k + 1 obtainedwhen k = 0,, 7 8 respectively. Hence, n ∈(,,)0 ± 1 ± 8

Example 6 Let a,,, b c d, e be consecutive positive integers such that b+ c + d is a perfect square and a+ b + c + d + e isaperfectcube.Findsmallestpossiblevalueofc. Solution a, b, c, d, e are consecutive positive integerb+ c + d = 3 c anda+ b + c + d + e = 5 c Now, 3|3c ⇒ 32 | 3c (Q 3c isasquare) ⇒ 3|c ⇒ 3|5c ⇒ 33 | 5c (Q 5c isacube) ⇒ Also 5 5| c ⇒ 53 | 5c ⇒ 52 |c ∴ 33 5 2|c i.e., 675|c ∴ 675beingapossiblevalueof c isthesmallestofsuchnumbers.

Example 7 If 11+ 11 11a 2 + 1 is an odd integer where a is a . Prove that a is perfectsquare. Solution Let λ =11 + 11 11a 2 + 1 Then, ()()λ −112 = 11 2 11a 2 + 1 Simplifying,weget λ() λ −22 = 113a 2 r Putting |a |= ,r, s∈ N suchthat (,)r s =1 gives λ() λ −22s2 = 11 3 r 2. s Since112|s becauseotherwise11woulddivide r,11|λ.Writing11µ λ= , weget µ() µ −2s2 = 11 r 2 Since 11|s for otherwise we would have 11|r. Itfollowsthat s =1. Thuswehave µ() µ −2 = 11r 2.Since µ − 2 and µ areconsecutiveoddintegerstheyarerelatively prime. If11|µ − 2,then µ isasquareofform11n + 2 whichisnotpossible. ∴11|µ andhence µ =11n 2 forsome n∈ N. Thus,wehave λ=11 µ = 112n 2 TheoryofNumbers 33

Example 8 Determineallpairsofpositiveintegers (,)m n forwhich 2m+ 3 n isaperfectsquare. Solution Let 2m+ 3 n = k 2 Since ()−1m ≡ 2 m ≡k 2 ≡ 1 (mod3) (Q 3 |k ) m iseven,say2p. Now, ()k − 2p (k + 2p ) = 3n + ⇒k −2p = 1 and k +2p = 3 n ⇒ 2p1 + 1 = 3 n + Since ()−1n ≡ 3 n (mod4) =2p 1 + 1 ≡ 1, n iseven,say2q. + Now ()()3q− 1 3 q + 1 = 2 p 1 ⇒ 3q − 1 = 2 ⇒ 3q = 3 ⇒q =1 andhence p = 2 So,wehaveonlyonesolution(4,2).

Example 9 Determinethesetofintegersnforwhich n2 +19 n + 92 isasquare. Solution Let n2+19 n + 92 = m 2, m isanonnegativeinteger.Then, n2+19 n + 92 − m 2 = 0 1 Solvingfor n,weget n=() −19 ± 4 m2 − 7 2 ∴ 4m2 − 7 isasquare i.e., 4m2− 7 = p 2 Where p∈ N ∴ ()()2m− p 2 m + p = 7 ∴ 2m+ p beingpositivetherefore(2m+p)is7and 2m− p = 1 Hence, 4m = 8 ⇒m = 2 Thus,wehave n2 +19 n + 92 = 4 ⇒ n2 +19 n + 88 = 0 ⇒ ()()n+8 n + 11 = 0 ⇒ n = − 8 or–11

Example 10 Findn,if 2200− 2 192 ⋅ 31 + 2n isaperfectsquare. Solution 2200− 2 192 31 + 2n = 2 192() 2 8 − 31 + 2 n =2192() 256 − 31 + 2n =2192 ⋅ 225 + 2n ∴ Forsome m∈ N 2n =m2 − 2 192 ⋅ 225 =m2 −()2 96 ⋅ 15 2 =()()m −296 ⋅ 15 m + 2 96 ⋅ 15 α α+ β So, m =296 ⋅ 15 = 2 and m +296 ⋅ 15 = 2 forsomenonnegativeintegers α, β . +αβ α α β Hence, 297 ⋅ 15 = 2 − 2 =2() 2 − 1 α β ⇒ 2= 297 and 2− 1 = 15. i.e., α = 97 and β = 4 ∴ n =2α + β = 198

Example 11 Findthenumberofvaluesofnforwhich 211+ 2 8 + 2n isaperfectsquare. Solution Wecanwrite 211+ 2 8 + 2n as 28() 2 3 + 1 + 2n ⇒ 28 ⋅ 9 + 2n − ⇒ 2n() 28 n ⋅ 9 + 1 34 IndianNational MathematicsOlympiad

− Note that for any k < 8, 2k() 28 k 9+ 1 is not a square, when k is odd, 2k is not a square and in the other case, the second factor is not a square. Hence n ≥ 8. Now write − 211+ 2 8 + 2n as 28() 9+ 2n 8 . Then the problem is to find the number of non negative integers k suchthat 9+ 2k isasquare. 9+ 2k = t 2 ⇒ 2k =()()t − 3 t + 3 + ⇒t −3 = 2p and t +3 = 2p q forsomenonnegativeintegers p and q. ∴2p() 2 q − 1 = 6 implying p =1 fromwhichitfollowsthat t = 5. Hence,thereisauniquesolution.

Example 12 Findallpositiveintegersnforwhich n 2 + 96 isaperfectsquare. Solution Suppose m isapositiveinteger,suchthat n2+96 = m 2 Then, m2− n 2 =96 ⇒()()m− n m + n = 96 sincem− n < m + n andm− n,m+ n must be both even [asm+ n =( m − n ) + n .2 Thereforem− n,m+ n must be both odd or both even; also if both of them are odd, thentheproductcannotbeeven. ∴ Onlypossibilitiesare m− n =2, m + n = 48 ⇒m=25, n = 23 m− n = 4,m+ n = 24 ⇒m=14, n = 10 m− n =6, m + n = 16 ⇒m=11, n = 5 m− n = 8,m+ n =12 ⇒m=10, n = 2

Example 13 Give with justification, a natural number n for which 39+ 3 12 + 3 15 + 3n is a perfect cube. − Solution 39+ 3 12 + 3 15 + 3n = 3 9( 1 + 3 4 + 3 6 + 3n 9 ) − =()()()33 3{ 1 + 3 ⋅ 3 2 + 3 3 2 2 + 3 2 3 + 3n 9 − 3() 32 2} − =()()33 3 1 + 3 2 3 provided 3n 9− 3 5 = 0 − = ()270 3 provided 3n 9= 3 5 i.e., provided n =14 So,givennumberisaperfectcubewhen n =14

Example 14 Provethat 2p+ 3 p isnotaperfectpowerifpisaprimenumber. Solution If p =2, 2p + 3 p = 22 + 3 2 = 13 (notaperfectpower) Letnow p beaprime > 2.. x+ a divides xp+ a p,whenever p isodd[factortheorem] ∴ 2p+ 3 p isdivisibleby 2+ 3 = 5.Weshallshowthat 2p+ 3 p isnotdivisibleby 52. − − − − xp+3 p =()( x + 3 x p1 − 3 x p 2 +32x p 3 +K +()) − 3 p 1 When x = − 3,then − − − xp1−3 x p 2 +K +() − 3 p 1 − − − =()()() −3p1 − 3 − 3 p 2 +K + − 3 p 1 − = p3p 1 TheoryofNumbers 35

Showingthat x + 3 doesnotdivide − − − − xp1−3 x p 2 + 3 2 x p 3 +K +() − 3 p 1 Consequently ()x + 3 2 doesnotdivide xp + 3 p.So, ()2+ 3 2 doesnotdivide 2p+ 3 p. Since 2p+ 3 p isamultipleof5butisnotamultipleof 52. ∴ itcannotbeaperfectpower.

Example 15 A 4 digit number has the following properties (I) It is a perfect square (II) its first 2 digit are equal to each other (III) its last two digit are equal to each other.Find all such four digitnumber. Solution We want to find positive integers x and y such that1≤x ≤ 9,0≤y ≤ 9 and xxyy is a perfect square. Since,102= 100100, 2 = 10000. It follows that xxyy must be the square ofa2digitnumber.Supposethat ()ab2 = xxyy. Thenumber xxyy isclearlyamultipleof11. Since,itisaperfectsquareitmustbeamultipleof112 i.e., 121. ∴Itmustbeoftheform 121× 1121,, × 4121 × 9,121× 16,121× 25, 121× 36,121× 49,121× 64,121× 81 Outofthese121× 64 i.e., 7744isoftheform xxyy,weconcludethat7744isthe desirednumber.

Example 16 Showthatforanyintegern,thenumber n4−20 n 2 + 4 isnotaprimenumber. Solution n4−20 n 2 + 4 =() n 4 − 4 n 2 + 4 − 16 n 2 =()n2 −2 2 − 16 n 2 =()()n2 −4 n − 2 n 2 + 4 n − 2 …(i) Note Itcanbeeasilyseenthatnoneofthefactors n2 −4 n − 2,n2 +4 n − 2 canhavethevalue ± 1, whateverintegralvalue n mayhave.Herefourcasesarises. 4± 28 (i) n2 −4 n − 2 = 1 ⇒n = 2 4± 20 (ii) n2 −4 n − 2 = − 1 ⇒n = 2 −4 ± 28 (iii) n2 +4 n − 2 = 1 ⇒n = 2 −4 ± 20 (iv) n2 +4 n − 2 = − 1 ⇒n = 2 Fromtheabovefourcases,wefindthatwhateverintegralvalue n mayhave, n4−20 n 2 + 4 isthe productoftheintegers n2 −4 n − 2 and n2 +4 n − 2 neitherofwhichequals ± 1..

Example 17 Prove that the product of four consecutive natural numbers cannot be a perfect cube. Solution Considertheproduct P= n( n + )1(n+2 )( n + 3 ),where n isanaturalnumber. Ifpossible,that P isaperfectcube = k 3 Twocasesarises. CaseI If n isodd. n,(),() n+1 n + 3 areallprimeto n + 2 Now,weknowthateverycommondivisorof n+ p and n+ q mustdivide q− p. 36 IndianNational MathematicsOlympiad

∴ n + 2 and n()() n+1 n + 3 arerelativelyprime. Since,theirproductisaperfectcube,eachofthemmustbeaperfectcube. Since, n3 < n()()() n +1 n + 3 < n + 3 3 ∴ n()()() n+1 n + 3 = n + 1 3 or ()n + 2 3 As n()() n+1 n + 3 and ()n + 2 3 arerelativelyprime,sosecondpossibilityruledout. Also n()()() n+1 n + 3 = n + 1 3 ⇒n =1.Since P = 24,when n =1 whichisnota perfect cube.Sothepossibility n =1 isalsoruledout.So n cannotodd. CaseII Ifn iseven. Then n + 1 isprimeto n, n + 2 and n + 3.Consequently n + 1 isrelativelyprimeto n()() n+2 n + 3 .Sincetheproductofrelativelyprimenumbers n + 1 and n()() n+2 n + 3 isaperfectcube,eachofthemmustbeaperfectcube. n3 < n()()() n +2 n + 3 < n + 3 3 ∴ n()() n+2 n + 3 = either ()n + 1 3 or ()n + 2 3since n()() n+2 n + 3 and n + 1 arerelativelyprime ∴ Firstpossibilityruledout. Also n()()() n+2 n + 3 = n + 2 3 ⇒n +4 = 0 whichisoutofquestion.Consequently n cannotbeeven. Thus,wefindthattheproductof4consecutiveintegerscannotbeaperfectcube.

− Example 18 Findallprimespforwhichthequotient (2p 1 − 1 )| p isasquare. Solution Supposem() m+1 = 7 n 2,m andn are integers sincem andm + 1are relatively prime. ∴ m and m + 1 mustbethenumbers 7p2, q 2 (in some order) p andq are relatively prime and pq= n; Since the product of 2 consecutiveintegeriseven. ∴ m() m + 1 iseven,whichmeansthatoneofthenumbers m, m + 1 mustbeeven. Suppose m= q 2 (sothat m+1 = 7 p2 ).Sinceeverysquarenumberisofoneofthe forms 4k, 4 k + 1.Consequently m + 1 mustbeofoneoftheforms 4k + 1, 4k + 2. Howeverthisisnotpossibleforif p iseven,then 7p2 isoftheform 4k.If p isodd, then 7p2 isoftheform 4k + 3. ∴ m+1 ≠ 7 p2.So m= 7 p2 and m+1 = q 2 Concept of Finding Number of Positive Integral Solutions for the Equation of the Form x2+ y 2 = k

Weknowthat, (n )22 ≡ 0 mod4 and ()2n + 12 ≡ 1 mod4 Now,if (a) x and y arebotheventhen, x2+ y 2 ≡ 0 mod4 (b) x and y arebothoddthen, x2+ y 2 ≡ 2 mod4 TheoryofNumbers 37

(c)oneisevenandotherisoddthen, x2+ y 2 ≡ 1 mod4

{∴x2+ y 2 ≡ 0, 1, 2 mod 4 andx2+ y 2 ≡/ 3 and 4} theabovediscussionimplies,if x2+ y 2 = k andif k isoftheformof (4m + 3 ), then x2+ y 2 = k doesnothaveanyintegralsolution. e.g., suppose,weareaskedtofindintegralsolutionforequation x2+ y 2 = 19, thenitwillnothaveanyintegralsolutionbecause19isoftheform ()4m + 3 . Now,ifwehave x4+ y 4 = k, thenweknowthat (n )24 ≡ 0 mod16 and ()2n + 14 ≡ 1 mod16 Again,if(a) x and y arebotheventhen, x4+ y 4 ≡ 0 mod16 (b) x and y arebothoddthen, x4+ y 4 ≡ 2 mod16 (c)oneisevenandotherisodd,then x4+ y 4 ≡ 1 mod16 ∴ x4+ y 4 ≡ 0,, 1 2 mod16 and x4+ y 4 ≡/ i mod16, where i = (,,,..,)3 4 5 15 So,theabovediscussionimplies,if x4+ y 4 = k and k is of the form ()16m+ i , wherei = 3,,,, 4 5K 15, then x4+ y 4 = k will not have any integral solution. e.g., supposeweareaskedtofindintegralsolutionsforequation. x4+ y 4 = 16003, thenitwillnotgiveanyintegralsolutionbecause16003isoftheform ()16m + 3 . Theconceptcanbeextendedtomorethantwovariablesexpression,supposetheequationis 4 +4 +4 +4 + +4 = x1 x2 x3 x4 ... x14 1599 now,weknowthat (n )24 ≡ 0 mod16 and ()2n + 14 ≡ 1 mod16 14 ∴ Σ 4 ≡ K xi 0,, 1 2 14 mod16 i = 1 butour RHS is1599 ≡ 15mod16. ∴ Nointegralsolutioncanbeobtainedfortheaboveequation.

Reason [If all the variables are considered to be odd, then maximum remainder which can come out is “14” and if anyofthevariableisanevennumberthenremainderwillbelessthan14.] Now,letusconsideranotherdiscussion. Ifwehave a2+ b 2 + c 2 = a 2 b 2 weknow, (n )22 ≡ 0 mod4 and ()2n + 12 ≡ 1 mod4 38 IndianNational MathematicsOlympiad

Case I If a,b and c allareoddthen, a2+ b 2 + c 2 ≡ 3 mod4 whereas a2 b 2 ≡ 1 mod4. Itwillnevergiveanequality,sothegivenequationhasnointegralsolution. Case II Iftwonumbersareoddandoneiseven,then a2+ b 2 + c 2 ≡ 2 mod4 whereas a2 b 2 ≡ 0, 1 mod4 Againwegetnointegralsolution. Case III Iftwoevenandoneodd. a2+ b 2 + c 2 ≡ 1 mod4 whereas a2 b 2 ≡ 0 mod4 Again,nointegralsolution Case IV Ifallareeventhen a2+ b 2 + c 2 ≡ 0 mod4 whereas a2 b 2 ≡ 0 mod4 Now, there is a possibility to have a solution and the only possible solution is (0, 0, 0) which is the only trivialsolution. Now,letuscomeagaintothediscussionof x2+ y 2 = k we have seen, ifk=4 m + 3 there is no integral solution now, if k is even then it will be either of the form k= 4 m or k=4 m + 2 considering k= 4 m If m canbeexpressedas i2+ j 2 , where i and j arenon-negativeintegerssuchthat (i) i≠ j,thentherewillbefourintegralsolutionsand8orderedpairs. (ii)if i= j or m canbewrittenas i 2+ 0 2,thentherewillbetwointegralsolutionsand4orderedpairs. Letusconsidersomeexamples. e.g., x2+ y 2 = 20 here, 20 is of the form 4(5) and 5 can be expressed as 5= 12 + 2 2 which gives i = 1 and j = 2 so, it implies there are 4 integral solutions, which will be of the form ± 2i and ± 2j also we have 8 ordered pairs. Thereforeinthiscasewehave(2,4)asoneofthesolutionsandothersolutionsare (2, –4), (–2, –4), and (–2, 4) also (4, 2), (4, –2), (–4, –2) and (–4, 2) keep this thing in mind there are only 4 integers used. e.g., x2+ y 2 = 8 Here, 8= 4() 2 and 2= 12 + 1 2 whichgives i= j . So, it implies there are 2 integral solutions which will be of the form 2i and 2j also we have 4 ordered pairsthereforeinthiscasewehaveoursolutionsare (2,2),(–2,–2),(2,–2)and(–2,2) keep this thing in mind there are only 2 integers used. TheoryofNumbers 39

e.g., x2+ y 2 = 4 Here, 4= 4() 1 and 1= 12 + 0 2 whichgives i = 1 and j = 0 So, it implies there are 2 integral solutions, which are of the form 2i and 2j also we have 4 ordered pairs. Thereforeinthiscasethesolutionsare (,2 0 ),(− 2 , 0 ),(, 0 2 ) and(0,–2). e.g., x2+ y 2 = 24 Here, 24= 4 × 6 and6can'tberepresentedas i2+ j 2 soitwillnothaveanyintegralsolution. e.g., x2+ y 2 = 12 Here, 12= 4 × 3 and3againcan'tbeexpressedas i2+ j 2 soitwillalsonothaveanyintegralsolution. Now, considering k=4 m + 2 and if m can be written as ()i2+ j 2 + i + j and if i≠ j, then these will be 4integersand8orderedpairsofsolutions. Andif i= j,thentherewillbe2integersand4orderedpairsofsolutions. e.g., x2+ y 2 = 10 Here, 10= 4() 2 + 2 and 2=()()()() 12 + 0 2 + 1 + 0 Therefore there will be four integral solutions which will be given as ±()2i + 1 and ±()2j + 1 and in this case the solutions are ± 3 and ± 1 which will give eight ordered pairs as (3, 1), (3, –1), (–3, 1) and (–3, –1) also(1,3),(1,–3),(–1,3)and(–1,–3). e.g., x2+ y 2 = 2 Here, 2= 4() 0 + 2 and 0=()()()() 02 + 0 2 + 0 + 0 Therefore there are only two integral solutions which will again be given as ±()2i + 1 and ±()2j + 1 and in this case the solutions are ± 1 and ± 1, which will give four ordered pairs as (1, 1), (1, –1), (–1, 1) and (−1, −1). e.g., x2+ y 2 = 18 Here, 18= 4() 4 + 2 and 4=()()()() 12 + 1 2 + 1 + 1 So i = 1 and j = 1 ⇒ i= j Therefore it will have 2 integral solutions which will be given as ±()2i + 1 and ±()2j + 1 and in this case thesolutionsare ± 3 and ± 3 whichgivesfourorderedpairsas (,),(,3 3 3− 3 ),( − 3 ,) 3 and (,)−3 − 3 e.g., x2+ y 2 = 14 Here, 14= 4() 3 + 2 and 3 can't be expressed as ()i2+ j 2 + i + j as it is always an even number and an even number can't be equal to an odd number. So it implies if right hand side is ()4m + 2 and m is an odd number. So the equationwillneverproduceanyintegralsolution. Now,wewillextendthisconceptforanoddnumberinrighthandsideoftheequation. 40 IndianNational MathematicsOlympiad

x2+ y 2 = k i.e., k=4 m + 1 or k=4 m + 3 Asithasbeenalreadydiscussed ()k=4 m + 3 willnotproduceanyintegralsolutions. So,considering k=4 m + 1, only. If m= i2 + j 2 + j, then there will be an odd integer and an even integer, if i ≠ 0 and j ≠ 0 or i ≠ 0 and j = 0 , then there are fourintegersand8orderedpairswhichwillsatisfytheequation. So,oneoftheintegralsolutionis ± 2i andotheris ±()2j + 1 . Now, ifi = 0, j ≠ 0, then there are two integers and four ordered pairs which will satisfy the equations. So,oneoftheintegralsolutionis0andotheris ±()2j + 1 . e.g., x2+ y 2 = 21 Here, 21= 4 × 5 + 1 But5cannotbewrittenas i2+ j 2 + j,soitwillnotgiveanyintegralsolution.

Exceptional case : If x2+ y 2 = k and k isanoddandaperfectsquare,thenperformthefollowingtestalways. Take square root of k, which will come out to be as k, now subtract “1” from it we get ()k − 1 always double it, so it becomes 2(k − 1 ), now add “1” to it which becomes 2()k − 1 . If this value is a perfect square say, it is a 2 , then the equation will always have 6 integers and 12 ordered pairs as its solutions andtheintegerswillbe ±a, ± ( k − ),1 ± k and 0.Alwayskeepthisthinginmind k isaninteger. Andifthetestfails,thenequationwillbesolvedbythemethoddiscussedearlier. e.g., x2+ y 2 = 169 here 169= 4(), 42 + 1 which is of the form ()4m + 1 and also it is an odd perfect square so we will have to performthementionedtest. e.g., 169= 13 13− 1 = 12 12× 2 = 24 24+ 1 = 25 and 25= 52 ∴ we will have 4 integers in which ±5,, ± 12 will form 8 ordered pairs (5, 12), (5, –12), (–5, 12), (–5, –12), (12, 5), (12, –5), (–12, 5), (–12, –5) also there will be three ± 13, 0 which will form four pairs (13, 0),(–13, 0), (0, 13), (0, –13) e.g., x2+ y 2 = 49 here 49= 4 × 12 + 1, which is of the form ()4m + 1 and also an odd perfect, so we will again perform the mentionedtest. 49= 7 7− 1 = 6 6× 2 = 12 12+ 1 = 13 but13isnotaperfectsquarethereforethesolutionwillbecheckedbytheearliermethod. 12=()()() 02 + 3 2 + 3 Here, i = 0 and j = 3 so the solutions will be 0 and ± 7. Also the ordered pairs will be (0, 7), (0, –7), (7, 0) and (–7, 0) TheoryofNumbers 41

Concept Solvingoftheequationoftheform xy= n. If we are asked to find the number of positive integral solution for xy= n, we first write n is the form α α α 1 2 3 p1.. p 2 p 3 . The number of positive integral solution is same as the number of divisors of n which is α+ α + α + equalto (11 )( 2 1 )( 3 1 )… Letusconsiderexample xy = 8 = 23 Number of divisors of 8 are 3+ 1 = 4. So there are 4 integral solution and 4 ordered pair namely (1, 8) (8,1)(2,4)(4,2) Nowletusconsideranotherexample xy=72( x + y ) wecanwriteitas (x−72 )( y − 72 ) = 722. Let x−72 = X, y − 72 = 722 ∴ XY =722 = 2 6. 3 4 Numberofsolutionsare35. A Concept The area of a ∆ formed by pythogorean triplet with integersidesisalways divisible by3. 1 Areaof ∆ ABC= BC × AB 2 k2 + 1 1 =2x() x 2 − 1 2 k2 – 1 =()x3 − x Let p() x= x3 − x BC 2k For x > 1 weuseinduction p(),2= 8 − 2 = 6 p( )2 istrue Let p() x betruefor n= m p() m= m3 − m = 3 c ∴ p()()() m+1 = m + 13 − m + 1 =()()m +13 − m + 1 = m 3 + 3 m 2 + 2 m =3c + m + 3 m2 + 2 m =3()c + m + m 2 ∴ P() m + 1 istrue. ∆ Concept The radius of the circumcircle of a formed by pythogorean A tripletcannotbeinteger. The hypotenuseofthe ∆ ABC isthediameterofthecircle. Letusconsiderthe pythogoreantriplet x 2 − 1, 2x, x 2 + 1 Here x 2 + 1 is hypotenuse. Since x is an even number its square is also even, thereforeanevennumberplusoneisanoddnumber. ∴ 2 + x 1 isanoddnumber B C x 2 + 1 ∴ Radiusof circumcircleis 2 Concept Foranynaturalnumber x for x= 0,,,..., 1 2 n − − 2n+ 1,() 2 x 22 x 2 x − 1 , 2x() 22 n 2 x + 1 − AC2=[2x ( 2 2 n 2 x + 1 )] 2 42 IndianNational MathematicsOlympiad

− − + =22x() 2 4 n 4 x + 2 2 n 2 x 1 + 1 C − + − + + =()24n 4 x 2 x + 2 2 n 2 x 1 2 x + 2 2 x − + AC2=()2 4n 2 x + 2 2 n 1 + 2 2 x x 2n–2x x − + 2 (2 + 1) 2 + 1 AB2+ BC 2 =[()]()2 2x 2 2 n 2 x − 1 2 + 2 n 1 2 − − + =22x() 2 4 n 4 x − 2 ⋅ 2 2 n 2 x + 1 + 2 2 n 2 − =24n 2 x + 2 2 x + 2 2 n ⋅ 2 2 − 2 2 n ⋅ 2 − A x 2n–2x B =24n 2 x + 2 2 x + 4 ⋅ 2 2 n − 22. 2 n 2 (2 – 1) − =24n 2 x + 2 2 x + 22. 2 n − + =24n 2 x + 2 2 x + 2 2 n 1

Example 1 Provethattherearenonaturalnumbers,whicharesolutionsof15x2− 7 y 2 = 9. Solution 15x2− 9 = 7 y 2 3() 5x2− 3 = 7 y 2 ⇒7y 2 isamultipleof3. ⇒ y isamultipleof3. Let y= 3 z 3() 5x2− 3 = 7 × 9 z 2 5x2− 3 = 21 z 2 5x2= 21 z 2 + 3 5x 2 isamultipleof3. ⇒ x isamultipleof3 Let x= 3 u 15u2= 1 + 7 z 2 15u2− 6 z 2 = 1 + z 2 1 + z 2 isamultipleof3. Butforany z between0to9,1 + z 2 isnotamultipleof3. Forany z,thegivenequationhasnointegralsolution. Aliter Since RHS isodd, x and y mustbeopposite i.e., oneevenandoneodd. As3|15and3|9 ∴ 3mustdivide 7y 2. = 2 −2 = Let y3 y1 so 5x 21 y1 3 Again,since3divide21so3mustdivide 5x 2. = Let x3 x1 , weget 2 −2 = 15x1 7 y1 1 ⇒ 2 =2 + 15x1 7 y1 1 TheoryofNumbers 43

2 Lastdigitofperfectsquare y1 maybeoneofthesevalues0,1,4,9,6,5. 2 + Hence,lastdigitof 7y1 1 willbe1,8,9,4,3,6respectively. 2 But 15x1 endsin0or5. ∴ 2 =2 + 15x1 7 y1 1 hasnosolutions.

Example 2 Showthat x2 +1 = 3 y hasnosolutionsinintegers. Solution Since LHS cannotbeamultipleof3forany x between0to9. RHS isalwaysamultipleof3. ∴ x2 +1 = 3 y hasnointegralsolutions.

Example 3 Showthat 21x2− 10 y 2 = 9 hasnosolution. Solution 21x2− 9 = 10 y 2 ⇒ 3() 7x2− 3 = 10 y 2 ⇒ 10y 2 isamultipleof3. ⇒ y isamultipleof3. = Let y3 y1 2 − = × 2 3() 7x 3 10 9 y1 2 − = 2 7x 3 30 y1 2 = +2 ⇒ 2 = + 2 7x 3 30 y1 7x 3() 1 10 y1 ⇒ 7x 2 isamultipleof3 So, x ismultipleof3. = Let x3 x1 ×2 = + 2 7 9x1 3() 1 10 y1 2 = + 2 21x1 1 10 y1 2 −2 = + 2 21x1 9 y1 1 y1 2 −2 = + 2 3() 7x1 3 y1 1 y1 ⇒ + 2 1 y1 isamultipleof3. + 2 But1 y1 isnotamultipleof3. ∴ Thegivenequationhasnointegralsolution.

Note Everyinteger m canbewrittenintheform x2+ y 2 − 5 z 2. If m= 2 n,then =2n =()()() n − 22 + 2 n − 1 2 − 5 n − 1 2 If m=2 n + 1 =()() n + 12 + 2 n 2 − 5 n 2 Verification, 7= 2()()()() 3 + 1 = 3 + 12 + 2 × 3 2 − 5 3 2 =16 + 36 − 45 =52 − 45 = 7 Similarly,everyintegercanbewrittenintheformof x2+ y 2 + z 2 − 5 u 2 44 IndianNational MathematicsOlympiad

1 Example 4 Prove 2n C isaninteger. n + 1 n Solution If a and b areintegersand a− b = c,then c isalsoaninteger. = 2n = 2n Let a Cn ; b Cn − 1   2n 2n 2n! 2n! 2n! n CC−− = − =1 −  n n 1 n!! n (n+1 )!( n − 1 )! n!! n  n +1 2n!  1  =   ⇒ itisaninteger. n!! n n + 1

kn kn (kn )! kn! CC− − = − n n 1 (kn− n )! n ! (kn− n +1 )!( n − 1 )! (kn )!  (kn− n )! n !  = 1 −  (kn− n )! n !  (kn− n +1 )!( n − 1 )! (kn )!  n  = 1 −  (kn− n )! n !  kn− n + 1 kn− n +1 − n  kn−2 n + 1 = knC   = knC   . n  kn− n + 1  n  kn− n + 1  Itisaninteger.

Example 5 If xy=22 ⋅ 3 4 ⋅ 5 7() x + y , findthenumberofintegralsolution. Solution Let N =22 ⋅ 3 4 ⋅ 5 7 xy= N() x + y xy= Nx + Ny xy− Nx − Ny = 0 ()()x− N y − N = N 2 ()()..x− N y − N = 24 3 8 5 14 Numberofintegralsolution =()()()4 + 1 8 + 1 14 + 1 =5 × 9 × 15 = 675

Example 6 Findallpositiveintegersx,ysatisfying 1+ 1 = 1 x y 20 Solution Suppose x, y aretwopositiveintegerssuchthat 1 1 1 + = …(i) x y 20 1 1 1x − 20 then = − = y20 x 20 ⋅ x + − ∴ 1= x 20 4 5 x y 20x Implyingthat 5x isrational. TheoryofNumbers 45

Now x∈ N ⇒ 5x ∈N.Hence5x isthesquareofanintegerwhichisdivisibleby5. ∴ 5x= () 5 a 2 forsome a∈ N i.e., x= 5 a 2 similarly y= 5 b2 forsome b∈ N. Now,Eq.(i)becomes 1 1 1 + = ⇒ 2(a+ b ) = ab a b 2 ()()a−2 b − 2 = 4 ⇒ (,)(,),(,),(,)a b ∈{}3 6 4 4 6 3 . ∴ Solution set is {(45, 180), (80, 80), (180, 45)}.

Example 7 Findthenumberofsolutionsinpositiveintegersoftheequation 3x+ 5 y = 1008. Solution Let x, y∈ N suchthat 3x+ 5 y = 1008 then 3 5| y ⇒ 3|y ⇒ y= 3 k forsome k∈ N Now, 3x+ 15 k = 1008 ⇒ x+5 k = 336 ⇒ 5k ≤ 335 ⇒ k ≤ 67 Thus,anysolutionpairisgivenby (,)(,)x y=336 − 5 k 3 k where1≤k ≤ 67. ∴ Numberofsolutionsis67.

Example 8 Provethattheredonotexistpositive integrs x,, y z satisfying 2xz= y 2 and x+ z = 997. Solution 2|y 2 ⇒4|2xz ⇒2|x or z ⇒2|x and z [Q 2 |(x+ z )] = = = Let x2 x1, y 2 y 1 and z2 z1 = 2 + = Then 2x1 z 1 y 1 and x1 z 1 997 = = Again y1 andoneof x1,, z 1 say x1, areevenwriting x12 x 2 and y12 y 2 = 2 + = Wehave x2 z 1 y 2 and 2x2 z 1 997

Since,997isaprime, x 2 and z1 arerelativelyprime. ∴ Eachisasquaresincetheirproductissquare. + + ≡ ≡ Sinceanysquareisoftheform8n, 8n 1 or 8n 4, 2x 2 0 or2(mod8)and z1 1 Q (mod8) ( z1 isodd). + ≡ Hence 2x2 z 1 1 or 3 (mod8). Acontradictionas 997≡ 5 (mod8).

Example 9 Showthattheequation 3x10− y 10 = 1991 hasnointegralsolution. Solution Supposetheexistenceof x, y∈ Z suchthat 3x10− y 10 = 1991.Notethat11|1991. ∴ Neither x nor y isdivisibleby11forotherwise11woulddivideboth. ⇒ 1110| 3x 10− y 10 = 11 10 |1991 animpossibility. Hence x and y areprimeto11. ∴ x10≡ y 10 ≡1 (mod11) ⇒ 1991= 3x10 − y 10 ≡ 3 − 1 = 2 acontradiction. 46 IndianNational MathematicsOlympiad

Example 10 Findallintegralsolutionsof x4+ y 4 + z 4 − t 4 =1991 Solution Let n be any integer ; when it is oddn4−1 =()()() n − 1 n + 1 n 2 + 1 is divisible by 16 as n−1,, n + 1 n 2 + 1are all even andn −1,n + 1being consecutive even integers one of themisdivisibleby4.When n iseven n 4 ≡ 0 (mod16). Thus, n 4 ≡ 0 or1,Nowforany x,,,, y z t∈ Z x4+ y 4 + z 4 − t 4 ≡ α where α ∈{} −1,,,, 0 1 2 3 ,since1991≡ 7 x4+ y 4 + z 4 − t 4 ≠1991

Example 11 For n∈ N, let s(n) denote the number of ordered pairs (,)x y of positive integers for 1 1 1 which + = .Determinethesetofpositiveintegersnforwhich s() n = 5 . x y n 1 1 1 Solution + = ⇒ x, y> n x y n ∴ x= n + a and n+ b, a, b∈ N. 1 1 1 Now, + = n+ a n+ b n ⇒ ()()()n+ b + n + a n = n + a n + b ⇒ n2 = ab ∴ s() n isthenumberofdivisorsof n 2 α α = 1K m α≥K ≥ α Let n p1 pm beprimeof n where 1 m. = +αK + α Then s()()() n 1 21 1 2 m ∴ s() n = 5 ⇒ +α = 1 21 5 and m =1 ∴ = 2 n p1 Requiredsetis {p2 : p isprime}.

1 1 1 Example 12 If + = ;a,, b c are positive integers with no common factors. Prove that()a+ b is a a b c square. a+ b 1 Solution Bythehypothesis = ab c i.e., ()a+ b c = ab Let p beanyprimewhichdivides ();a+ b then p dividesoneof a, b andtherefore both. Since gcd(,,); a b c =1 p doesnotdivide c. ∴ forany k∈ N, pk | a ⇔ pk | b Hencethemaximumpowerof p whichdivides a+ b isthesquareofthemaximum powerof p whichdivides a. ∴ a+ b isasquare. TheoryofNumbers 47

3n − 5 Example 13 Findallintegersnsuchthat isalsoaninteger. n + 1 3n − 5 8 Solution Since, =3 − isaninteger. n+ 1 n + 1 8 ∈{} ±1,,, ± 2 ± 4 ± 8 n + 1 8 and 3 − isasquare. n + 1 8 Consequently = −1 or2; n + 1 i.e., n = − 9 or3

Example 14 Findthenumberofpairsofintegers (,)a b suchthat a3+ a 2 b + ab 2 + b 3 +1 = 2002. Solution a3+ a 2 b + ab 2 + b 3 =()()a + b a2 + b 2 = 2001 =3 × 23 × 29 a+ b isthereforeoneofthethreenumbers 3,,. 23or 29 If a+ b = 3,then a=1, b = 2 (or a=2, b = 1)sothat a2+ b 2 = 5. Butinthiscase a2+ b 2 =23 × 29 ∴a+ b isnot 3. If a+ b = 23, then a2+ b 2 = 87 sothatboth a and b willbelessthan10and a+ b < 20,acontradiction. If a+ b = 29,then a2+ b 2 = 69 sothatboth a and b willbelessthan10and a+ b < 20, a contradication. Thus,thenumberofpairs (,)a b satisfyingthegivenconditioniszero.