0% found this document useful (0 votes)
16 views

Lect-Notes 03fa

Uploaded by

jose rodrigo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views

Lect-Notes 03fa

Uploaded by

jose rodrigo
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 50

1. Sums and Products Solution 2.

Since


In math, very often we have some interesting numbers which we would like





cos n sin n 2 cos 45 cos n sin 45 sin n 2 cos 45 n


to find their sum or product. Below we will look at a few methods for doing these
operations. (Here we will also consider integrals which we can view as summing


cos 1 cos 2 cos 44 sin 1 sin 2 sin 44





uncountably many numbers.)





2 cos 44 cos 43 cos 1





Pairing Method. Recall to find S 1 2 100 we can say S 100


cos 1 cos 2 cos 44 1








Therefore, 1 2





99 1 also and hence 2S 1 100 2 99 100 1






sin 1 sin 2 sin 44





2 1


100 101 10100 yielding S 5050 This suggest that in handling numbers we



can try to pair them first and hope this can simplify the problem.
2




101 dx
xi3 i (3) (1980 Putnam Exam) Evaluate



Examples. (1) (2000 APMO) Find S for xi 2


1 tan x


0


1 3xi 3xi2 101



i 0 

2 2


cosr x dx





dx


x3 Solution. Let r 2 and I Since
3x 2 3
x 3 Let f x


r cosr x sinr x



Solution. Note 1 3x 1 x Then 1 tan x


0 0



x 3 x3


1


cos t sin t and sin t cos t the change of variable x t will


f x f 1 x 1 Since 1 xi x101 we have




2 2 2



sinr t dt



101
yield I So



sinr t cosr t


2S f xi f x101 102 S 51






i 0

i 0



2 2
cosr x sinr x








2I dx dx I





cosr x sinr x 2 4


0 0
cos 1 cos 2 cos 44








(2) (2000 HKMO Math Camp) Express in the


sin 1 sin 2 sin 44











form a b c where a b and c are integers.




a b a b Telescoping Method. A particularly simple type of sum everybody can do is of




Solution 1. Recall cos a cos b 2 cos cos and sin a sin b




2 2 the form


a1 a2 a2 a3 an 1 an a1 an


a b a b


2 sin cos Taking a 45 n and b n for n 1 2 22 we








2 2 This type of sum is called a telescoping sum. Similarly, there are telescoping
have


products, where the factors are of the form ai ai 1 and their product is a1 an




2 cos 452 cos 432 cos 412 cos 12




cos 1 cos 2 cos 44







Some summation or product problems are of these forms. So in summing, we







2 sin 452 cos 432 cos 412 cos 12




sin 1 sin 2 sin 44 should try to see if the terms can be put in the form ai ai 1 Here are some












examples.



cos 452 2 1


1 2





45


sin Examples. (4) Simplify sin 1 sin 2 sin n


2 1


2

1 2



cos a b cos a b


So for large k


1
Solution 1. Recall sin a sin b Setting b we get


2
2
1 1


cos a cos a


2 2 k
n3 1 k2 2 k2 k 1


sin a So 1 1 7 2 13 3 21 k k 1










2 sin 12


n3 1 k2


1 3 3 4 7 5 13 k k 1 3k k 1





n 2


sin 1 sin 2 sin n






1 3
2
cos 32 cos 52 1 1 Taking limit as k we get the answer is



cos cos cos n cos n









2 2 2 2 3
2 sin 12
cos 12 1


cos n


2


1 100
2 sin 1


2
(6) Show that 2 101 2 20



n 1
n


Solution 2. (Use complex arithmetic) Let z cos 1 i sin 1 By de Moivre’s


formula, z k cos 1 i sin 1 k cos k i sin k Note sin 1 sin 2 Solution. (Note it may be difficult to find the exact sum. We have to bound the


sin n








Im z z 2 z n Now terms from above and below.) To get telescoping effects, we use








z zn 1 z1 2 zn 1 zn 1 2 z1 2 1 1 1










n 1 n n n 1


z2 zn


z









n 1 n 2 n n n 1


1 2 1 2



z 1 z z 2i sin 1 2


1 1
i sin n 12 sin 12



cos n cos 2



2
Summing from n 1 to 100, then multiplying by 2, we get the inequalities.
2i sin 12


1
sin 12 i cos 12 1



sin n cos n


2 2


2 sin 12

n
Binomial Sums. For sums involving binomial coefficients, we will rely on the
cos 12 1 n 1
sin 12


cos n sin n


binomial theorem and sometimes a bit of calculus to find the answers. Triv-

2 2
So sin k Also, cos k n n

2 sin 12 2 sin 12 n k n


ially, from 1 x n x we get 2n


k 1 k 1 by setting x 1 and





k 0
k k 0
k


k


k


n 3
1 0 by setting x 1
1 These equations explain why the sum of




(5) (1977 Putnam Exam) Evaluate (Here an lim a2 a3 ak ) n 0


k






n3 1


k
the n-th row of the Pascal triangle is 2n and the alternate sum is 0. Below we will


n 2 n 2


look at more examples.


Solution. Note that
n 2

n3 1 n2 12


n 1 n n 1 1


1 n n 1


Examples. (7) Simplify



k


n3 1 n2 1 n2


1 n n 1 n n 1


k 0


3 4
n n


n n n n n k


n 1 n 2
k2 1


Solution. Since the sum is the same as Note both sides again, we get n 1 x n n 1x 1 x x



k n k k n k k


k 0 k 0


this sum is the coefficient of x n in n


k2 n2n 1
1 2n 2
1 2n 2


Setting x 1 we get n n n n




k


n n 2 n n 2



k 0
xn xn


1 x x 1 x x






1 2 1 2


n n 2n 2n n
x 2n



1 x 1 x 1 x 1 x






n Fubini’s Principle. When we have m rows of n numbers, to find the sum of these
mn numbers, we can sum each row first then add up the row sums. This will be
n 2 n



2n the same as summing each column first then add up the column sums. This simple


Therefore, 

(Remark: By looking at the coefficients of x j on


k 0
k n fact is known as Fubini’s Principle. There is a similar statement for the product of


m n m n


the mn numbers. In short, we have



both sides of the identity 1 x 1 x 1 x we will get the more



general identity m n n m m n n m
j



m n m n


ai j ai j and ai j ai j




k j k j i 1 j 1 j 1 i 1 i 1 j 1 j 1i 1

k 0


Historically the original Fubini’s principle was about interchanging the order of


n double integrals, namely if f is integrable on the domain, then



n


(8) (1962 Putnam Exam) Evaluate in closed form k2



k b d d b


k 0



f x y dxdy f x y dydx


a c c a



n n! n n 1 n n 1 n 2


Solution 1. For n k 2


k k! n k ! k k 1 kk 1 k 2


Examples. (9) For a n n chessboard with n odd, each square is written a 1 or a


So


n n


n n 1 Let pi be the product of the numbers in the i-th row and q j be the product of the





k n k k 1 k



numbers in the j -th column. Show that p1 p2 pn q1 q2 qn 0


k k


k 0 k 2


n


n 2 n 1

Solution. By Fubini’s principle, p1 p2 pn q1 q2 qn Note each pi or q j


n n n 1 n


k 2 k 1


is 1 Suppose there are s 1 ’s among p1 p2 pn and t 1 ’s among

k 2






1 2n 2
n 2n 1
1 2n 2 q1 q2 qn Then either s and t are both odd or both even. Now



n n n 1 n n


The cases n 0 and 1 are easily checked to be the same.


p1 p2 pn q1 q2 qn s n s t n t





2n s t 0


n


n k


n


Solution 2. (Use calculus) Differentiating both sides of 1 x x we




k because n s t is odd.


k 0


n


n k Note: If two integer variables are either both odd or both even, then we say they


n 1 1


get n 1 x k x Multiplying both sides by x then differentiating




k 0
k are of the same parity.


5 6



Arctan x Arctan x


Solution. There are n! permutations of 1 2 3 n Call them f 1 f 2 f n!


(10) (1982 Putnam Exam) Evaluate dx



0 x Write each in a separate row. For each permutation, replace each fixed point of
f by 1 and replace all other numbers in the permutation by 0. Then the row sum
Solution. n


gives the number of fixed points of f Now k Pn k is the sum of the row sums,





Arctan x Arctan x 1 u






k 0





dx Arctan ux dx


x x grouped according to the Pn k rows that have the same row sum k By Fubini’s


u 1


0 0
principle, this is also the sum of the column sums. For the j -th column, the





1
dudx number of 1’s is the number of times j is a fixed point among the n! permutations.
xu 2


1 1


0 If j is fixed, then the number of ways of permuting the other n 1 numbers is






1 Pnn 11


n 1 ! So the column sum is n 1 ! for each of the n columns.

dxdu

xu 2


1


1 0 n





Therefore, the sum of column sums is n n 1! n! This is k Pn k





du ln


k 0



1 2u 2

The interchange is valid since the integrand of the double integral is nonnegative Exercises
and continuous on the domain and the integral is finite.
1 1 1 1 1
1. Find





1 cot 1 1 cot 5 1 cot 9 1 cot 85 1 cot 89





(11) Let n be a positive integer and p be a prime. Find the highest power of p
dividing n!. 2. (1988 Singapore MO) Compute
Solution. Write 1 2 n For k 1 2 n if the highest power of p


1 1 1



dividing k is j then write j 1’s in a column below the factor k in 1 2 n













2 1 1 2 3 2 2 3 100 99 99 100


(If p does not divide k then j 0 so do not write any 1.) The total number of 1’s

below 1 2 n is the highest power of p dividing n! Summing the column








sums is difficult, but summing the row sums is easy. In the first row, there is one 1 3. For n a positive integer and 0 x prove that cot cot x n






2 2n


in every p consecutive integers, so the first row sum is [n p] In the second row,


there is one 1 in every p 2 consecutive integers, so the second row sum is [n p 2]




4. (1990 Hungarian MO) For positive integer n show that


Keep going. The i-th row sum is [n p i ] So the total number of 1’s is


x x x 1 n x


[n p 2] [n p 3] sin3 3 sin3 3n 1
sin3 3 sin n sin x

[n p]








3 32 3n 4 3


This is the highest power of p dividing n!




[n 4]


n n





2n 2 n 2


5. For a positive integer n show that 2 cos





(12) (1987 IMO) Let Pn k be the number of permutations of 1 2 3 n which 4k 4


k 0


n


have exactly k fixed points. Prove that k Pn k n! (A fixed point is a number




*6. Prove that tan2 1 tan2 3 tan2 5 tan2 89 4005 (Hint: Find a








k 0




that is not moved by the permutation.) polynomial of degree 45 having roots tan 1 tan2 3 tan2 5
2
tan2 89 )





7 8
*7. (1990 Austrian-Polish Math Competition) Let n 1 be an integer and let 2. Inequalities (Part I)
f1 f 2 f n! be the n! permutations of 1 2 n (Each f i is a bijective


We often compare numbers or math expressions, such as in finding maxima


function from 1 2 n to itself.) For each permutation fi let us define


n
1 n! or minima or in applying the sandwich theorem. So we need to know some useful





S fi fi k k Find S fi inequalities. Here we will look at some of these and see how they can be applied.


k 1
n! i 1



*8. (1991 Canadian MO) Let n be a fixed positive integer. Find the sum of all AM-GM-HM Inequality. For a1 a2 an 0


positive integers with the following property: In base 2, it has exactly 2n a1 a2 an n





digits consisting of n 1’s and n 0’s. (The leftmost digit cannot be 0.) AM GM n
a1 a2 an HM


n 1 1 1





a1 a2 an

Either equality holds if and only if a1 a2 an


1 1
Examples. (1) By the AM-GM inequality, for x 0 x 2 x 2 with



x x
equalilty if and only if x 1


(2) By the AM-HM inequality, if a1 a2 an 0 then


1 1 1


n2


a1 a2 an





a1 a2 an


(3) If a b c 0 and abc 1 find the minimum of a b c ab bc ca


Solution. By the AM-GM inequality,
a b c ab bc ca



3 3


abc 1 and ab bc ca 1


3 3


So a b c ab bc ca 9 with equality if and only if a b c 1


Therefore, the minimum is 9.
1 n 1 n 1


(4) For positive integer n show that 1 1






n n 1


1
Solution. Let a1 a2 an 1 an 1 By the AM-GM inequality,





1



n


1


n 1 1


1 1 n


n n 1


AM 1 GM 1 1


n 1 n 1 n


9 10
1 n 1 1 n Solution. By the Cauchy-Schwarz inequality,


Taking the n 1 -st power of both sides, we get 1 1


n 1 n


2
12 12 12 12 a 2 b2 c2 d2


a b c d





(5) (1964 IMO) Let a b c be the sides of a triangle. Prove that


So 8 e 2 4 16 e2 Expanding and simplifying, we get e 5e 16


0


2 
2 2


a b c a b c a b c a b c 3abc



This means 0 e 16 5 Examining the equality case of the Cauchy-Schwarz






inequality, we see that when a b c d 6 5 e will attain the maximum


value of 16 5


a b c b c a c a b





Solution. Let x y z then x y z 0


2 2 2 (8) (1995 IMO) If a b c 0 and abc 1 then prove that
and a z x b x y c y z The inequality to be proved becomes


1 1 1 3
x 2 2y y 2 2z z 2 2x



z x y 3z x x y y z









a3 b c b3 c a c3 a b


2


This is equivalent to x 2 y y 2 z z 2 x xy 2 yz 2 zx 2 6xyz which is true




because x 2 y 2 z z 2 x xy 2 yz 2 zx 2 6 6 x 6 y 6 z 6 6xyz by the AM-GM


1 1 1
inequality. Solution. Substituting x bc y ca z ab the inequality be-


comes a b c
x2 y2 z2 3


Cauchy-Schwarz Inequality. For real numbers a1 a2 an b1 b2 bn


z y x z y x 2





2 x y z
a12 a22 an2 b12 b22 bn2








a1 b1 a2 b2 an bn



Now x y
z y z x z y x By the










z y y x


x z



Cauchy-Schwarz inequality, we get
Equality holds if and only if ai b j a j bi for all i j 1 n


x2 y2 z2


2
Examples. (6) Find the maximum and minimum of a cos b sin where




x y z z y x z y x





z y x z y x


0 2






2x y z



Solution. By the Cauchy-Schwarz inequality, Using the last inequality and the AM-GM inequality, we get
2
a2 b2 cos2 sin2 a2 b2


a cos b sin


x2 y2 z2



x y z 3 3 xyz 3





z y x z y x 2 2 2




So a 2 b2 a cos b sin a 2 b2 Equality holds if and only if










a sin b cos i.e. tan b a There are two such ’s in [0 2 corresponding





to the left and right equalities. So the maximum is a 2 b2 and the minimum is



a 2 b2


Rearrangement (or Permutation) Inequality. If a1 a2 an and





b1 b2 bn then


(7) (1978 USAMO) For real numbers a b c d e such that a b c d e 8


and a 2 b2 c2 d 2 e2 16 find the maximum of e a1 b1 a2 b2 an bn a1 br1 a2 br2 an brn a1 bn a2 bn an b1





1




11 12
where br1 br2 brn is a permutation of b1 b2 bn . Chebysev’s Inequality. If a1 a2 an and b1 b2 bn then





Example. (9) (1978 IMO) Let c1 c2 cn be distinct positive integers. Prove


a1 a2 an b1 b2 bn








a1 b1 a2 b2 an bn





that n
c2 cn 1 1
c1 1


a1 bn a2 bn an b1





1


2 n2

2 2 n
Either equality holds if and only if a1 a2 an or b1 b2 bn


Solution. Let a1 a2 an be the ci ’s arranged in increasing order. Since the ai ’s 

are distinct positive integers, we have a1 1 a2 2 an n Now, since


0 prove that a a bb cc a b c 3








1 1 Examples. (11) (1974 USAMO) For a b c abc


a1 a2 an and 1 by the rearrangement inequality, we






22 n2
get Solution. By symmetry, we may assume a b c Then log a log b log c


c2 cn a2 an 2 n By Chebysev’s inequality,
c1 a1 1






22 n2 22 n2 22 n2
log a a bb cc


a log a b log b c log c


(10) Redo example (8) using the rearrangement inequality.


a
c log a log b log c b


a b c





log abc 3


Solution. (Due to Ho Wing Yip) We define x y z as in example (10). Without 3

loss of generality, we may assume x y z because the inequality is symmetric. The desired inequality follows by exponentiation.
1 1 1
Then xyz 1 x 2 y 2 z 2 and By the rearrangement 

(12) If 0 ak 1 for k 1 2 n and S a1 a2 an then prove that



z y x z y x






inequality,
n
x2 y2 z2 x2 y2 z2 ak nS





1 ak n S


z y x z y x y x z y x z


k 1


x2 y2 z2 x2 y2 z2


z y x z y x x z y x z y


Solution. Without loss of generality, we may assume a1 a2 an 0


a1 a2 an
Adding these inequalities and dividing by 2, we get Then 0 1 a1 1 a2 1 an and





1 a1 1 a2 1 an


x2 y2 z2 1 y2 x2 z2 y2 x2 z2 By Chebysev’s inequality,








z y x z y x 2 y x z y x z


a1 a2 an


S 1 a1 1 a2 1 an





Applying the simple inequality a 2 b2 2


a b 2 to the numerators of the right




1 a1 1 a2 1 an


sides, then the AM-GM inequality, we get 1 n ak n
n S n
ak





1 ak


x2 y2 z2


1 y x z y x z


n k 1 1 ak k 1 n 1 ak

k 1



z y x z y x 2 2 2 2


The result follows.




x y z 3 xyz 3


3


2 2 2
13 14




In math as well as in statistics, we often need to take averages (or means) Solution. Let a x b y c z then the inequality becomes


of numbers. Other than AM, GM, HM, there are so-called power means and
symmetric means, which include AM and GM as special cases. a 13 b13 c13


a 10 b10 c10


abc
Power Mean Inequality. For a1 a2 an 0 and s t





Now a 13 b13 c13 13 10 3 10 3
a 10 b10 c10 abc


3M13 3M13 M13 3M10 M0


1 t


1 s


a1s a2s ans a1t a2t ant






Ms Mt


n n 1 1 1 a8 b8 c8


(14) If a b c 0 then prove that


Equality holds if and only if a1 a2 an a b c a 3 b3 c3


Solution. The inequality is equivalent to


a12 a22 an2





Remarks. Clearly, M1 AM and M 1 H M Now M2 1 1 1

n a8 b8 c8 a 3 b3 c3 2


abc bc ca ab


is called the root-mean-square (RMS) of the numbers. It appears in statis- a b c
tics and physics. Also, taking limits, it can be shown that M is M AX


By the power mean inequality and the symmetric mean inequality,



max a1 a2 an M0 is G M and M is M I N min a1 a2 an So we


have
a8 b8 c8 3M88 3M18 3S18 3S16 S12


M AX RM S AM G M H M M I N


1 3 6 1 2 2


2


S3 3 S2 abc bc ca ab


Maclaurin’s Symmetric Mean Inequality. For a1 a2 an 0 Multiplying by 3 on both sides, we are done.


1 2
Sn1 n


2n then show that


AM S1 S2 GM (15) If a1 a2 an 0 and 1 a1 1 a2 1 an








a1 a2 an 1





where S j is the average of all possible products of a1 a2 an taken j at a time.


Any one of the equalities holds if and only if a1 a2 an Solution. By the symmetric mean inequality,


Remarks. To be clear on the meaning of S j take n 4 In that case, we have 2n


1 a1 1 a2 1 an








a1 a2 a3 a4 a1 a2 a1 a3 a1 a4 a2 a3 a2 a4 a3 a4


n n
S1 S2 1 nS1 S2 Sn Sn


1

4 6 2 n 1


a1 a2 a3 a1 a2 a4 a1 a3 a4 a2 a3 a4 n 2 n



nSn1 n n
Snn 1 n
Sn1 n n





1 S Sn 1


S3 and S4 a1 a2 a3 a4


2 n




4 n 1


1 n


So 2 1 Sn Then a1 a2 an Sn 1











5 5 5 5 x2 5 y2 5 z2
Examples. (13) Show that x y z x y z for posi-





yz zx xy
tive x y z


15 16
Exercises 3. Number Theory

1. Redo example (11). §1 Divisibility.

2. Redo example (13).


Definitions. (i) If a b c are integers such that a bc and b 0 then we say b


divides a and denote this by b a (For example, 2 divides 6, so we write 2 6 )


3. Redo example (15). (ii) A positive integer p 1 is a prime number if 1 and p are the only positive
integers dividing p If a positive integer n 1 is not prime, it is a composite
x12 x22 xn2


4. For x1 x2 xn 0 show that x1 x2 xn number.







x2 x3 x1
There is a famous proof of the fact that there are infinitely many prime


5. For 0 a b c 1 and a b c 2 show that 8 1 a 1 b 1 c abc






numbers. It goes as follow. Suppose there are only finitely many prime numbers,
say they are p1 p2 pn Then the number M p 1 p2 pn 1 is greater than


a3 b3





0 and c2 d2 a2 b2 3



6. If a b c d then show that 1



p1 p2 pn So M cannot be prime, hence there is a prime number p i dividing


c d


M However, pi also divides M 1 Hence pi will divide M M 1 1 a


7. For a1 a2 an 0 and a1 a2 an 1 find the minimum of contradiction.









1 2 1 2 1 2 Fundamental Theorem of Arithmetic (or Prime Factorization Theorem).



a1 a2 an






a1 a2 an Every positive integer n can be written as the product of prime powers n
2 e1 3 e2 5 e3 7 e4 pkek where the ei ’s are nonnegative integers, in one and only one


way (except for reordering of the primes).
8. If a b c d 0 and S a2 b2 c2 d 2 then show that


Examples. 90 21 32 51 and 924 22 31 71 111


a3 b3 c3 a3 b3 d3 a3 c3 d3 b3 c3 d3


S Questions. Do positive rational numbers have prime factorizations? (Yes, if





a b c a b d a c d b c d


exponents are allowed to be any integers.) Do positive real numbers have prime
factorizations (allowing rational exponents)? (No, does not.)


9. If x1 x2 xn 0 and x1 x2 xn 1 then show that








Corollaries. (1) m p1d1 p2d2 pkdk divides n p1e1 p2e2 pkek if and only if


n n 0 di ei for i 1 2 k



xk 1




xk (2) The number n 2e1 3e2 pkek has exactly e1 1 e2 1


ek 1 positive






1 xk n 1

k 1 k 1


divisors.
(3) A positive integer n is the m-th power of a positive integer b (i.e. n b m ) if
10. Let a b c be the sides of a triangle. Show that and only if in the prime factorization of n 2e1 3e2 5e3 pkek every ei is a multiple

of m


a 2b a b2 c b c2 a c


b c a 0


21 32 51 it has 1 1 2 1 1 1


Examples. (1) Since 90 12 positive



d1 d2 d3
divisors. They are 2 3 5 where d1 0 1 d2 0 1 2 and d3 0 1


17 18
(2) Suppose n is a positive integer such that 2n has 28 positive divisors and 3n has and


max ek i


30 positive divisors. How many positive divisors does 6n have? [a1 a2 an ] 2max e1 i 3max e2 i pk





2 e1 3 e 2 pkek Then e1 2 e2 1


Solution. Write n ek 1 28


For n 2 a1 a2 [a1 a2 ] a1 a2 (The last equation need not be true for more





and e1 1 e2 2 ek 1 30 Now a e3 1 ek 1 divides



than 2 numbers.)





28 and 30, so it must be 1 or 2. If a 1 then e1 2 e2 1 28 and



2 1 31 8 23 30 so 6 8 2 1 30 2 3 31


e1 1 e 2 2 30 which have the unique solution e1 5 e2 3 It follows


Example. (5) 6 2 [6 8] 24



6n has e1 2 e2 2 a 35 positive divisors. If a 2 then e1 2 e2 1 14




Prime factorization is difficult for large numbers. So to find gcd’s, we can


and e1 1 e2 2 15 which have no integer solutions by simple checking.




also use the following fact.


(3) (1985 IMO) Given a set M of 1985 distinct positive integers, none of which
has a prime divisor greater than 26. Prove that M contains at least one subset of


Euclidean Algorithm. If a b are integers not both zeros, then a b a


four distinct elements whose product is the fourth power of an integer.


bm b a b an for any positive integers m n In particular, if a b 0


and a bm r then a b r b





Solution. Let M n1 n2 n3 n 1985 Taking prime factorizations, suppose

n i 2 e1 i 3 e2 i 5 e3 i 23e9 i Since 23 is the ninth prime number, there are 29 512





possible parity (i.e. odd-even) patterns for the numbers e i 1 e2 i e3 i e9 i So Examples. (6) 2445 652 489 652 489 163 163


among any 513 of them, there will be two (say n i n j ) with the same pattern. Then
(7) (IMO 1959) Prove that the fraction 21n 4

is irreducible for every natural number


n i n j bi2j Note bi j cannot have any prime divisor greater than 26. 14n 3





Remove these pairs one at a time. Since 1985 2 512 961 513 there 


Solution. 21n 4 14n 3 7n 1 14n 3 7n 1 1 1


are at least 513 pairs. Consider the bi j ’s for these pairs. There will be two (say


bi j bkl ) such that bi j bkl c2 Then n i n j n k n l bi2j bkl
2
c4


The following are some useful facts about relatively prime integers.
Definitions. Let a1 a2 an be integers, not all zeros.


(1) For nonnegative integers a b not both zeros, a b is the least positive integer



(i) The greatest common divisor (or highest common factor) of a 1 a2 an


of the form am bn where m n are integers. In particular, if a b 1





is the largest positive integer dividing all of them. We denote this number then there are integers m n such that am bn 1





by a1 a2 an or gcd a1 a2 an If a1 a2 an 1 then we say





Reasons. Clearly a b divides positive numbers of the form am bn hence


a1 a2 an are coprime or relatively prime. In particular, two coprime integers


a b am bn By symmetry, we may assume a b We will induct on



have no common prime divisors!


a If a 1 then b 0 or 1 and a b 1 a 1 b 0 Suppose this








(ii) The least common multiple of a1 a2 an is the least positive integer




is true for all cases a a0 By Euclidean algoritnm, a0 b r b where



which is a multiple of each of them. We denote this number by [a 1 a2 an ] or
a0 bq r 0 r b Since b a0 by the inductive hypothesis, there are








lcm a1 a2 an



integers m n such that a0 b r b rm bn a0 bq m bn


a0 m b n qm So the case a a0 is true.


Example. (4) 6 8 2 [6 8] 24 6 8 9 1 [6 8 9] 72



(2) If n ab and a n 1 then n b (This is because ar ns 1 for some





e
2 e1 i 3 e 2 i


pk k i then integers r s so that n ab r n sb b ) In particular, if p is prime and


Theorem. If ai



p ab then p a or p b From this, we get that if a n 1 and b n 1

min ek i


2min e1 i 3min e2 i



a1 a2 an pk then ab n 1






19 20
(3) If n k ab and a b


1 then each of a and b is the k-th power of an integer. is divisible by 3 if and only if the sum of digits is divisible by 3 can be easily


(This follows from taking prime factorization of n and using the second part explained by
of the last fact.)
an 10n an 1 10n 1


a1 10 a0 an an a1 a0 mod 3





1

§2 Modulo Arithmetic.
In working with squares, (mod 4) is useful in doing parity check since 2n 2


4n 2 0 mod 4 and 2n 1 2 4n 2 4n 1 1 mod 4 Similarly for cubes,





Division Algorithm. Let b be a positive integer. For any integer a there are



we have k 3


integers q r such that a bq r and 0 r b (r is called the remainder of a 1 0 or 1 mod 9 according to k 1 0 1 mod 3 respectively.





upon division by b Remainders are always nonnegative.) For fourth powers, k 4 0 or 1 (mod 16) according to k is even or odd respectively.




Also, as in the reasoning above for (mod 3), one can show that every nonnegative
Note that when 19 is divided by 5, the remainder is 4, but when 19 is integer in base 10 is congruent to the sum of its digits (mod 9). To determine the


units digits, we use (mod 10).


divided by 5, the remainder is 1 because 19 5 4 1 When the integers


6 5 4 3 2 1 0 1 2 3 4 5 6 7 is divided by 5, the respec-


tive remainders form the periodic sequence The following facts are very useful in dealing with some problems.


Further Properties. (iii) (Cancellation Property) If am am mod b and


4 0 1 2 3 4 0 1 2 3 4 0 1 2



a b 1, then b a m m , so b m m i.e. m m mod b


(iv) (Existence of Multiplicative Inverse) If a b 1 then there exists a unique


Definitions. (i) We say a is congruent to a modulo b and denote this by a 1 mod b We may denote this m by a 1 (Reasons.


m mod b such that am




a mod b if and only if a and a have the same remainder upon division by b


Since a b 1 there exist integers m n such that 1 a b am bn





(ii) For a positive integer n a complete set of residues modulo n is a set am mod b If am 1 mod b then m m mod b by the cancellation prop-




of n integers r1 r2 rn such that every integer is congruent to exactly one of erty.)




r1 r2 rn modulo n (For example, 0 1 2 n 1 form a complete set of 1 then we define a c a 1 c mod b


(v) For a positive integer c if a b


residues modulo n for every positive integer n.) c 1 c m c 1


Since a a 1 mod b so we also have a a mod b From this,



we can check that a r s a r a s mod b and a r s a rs mod b for all integers







Basic Properties. (i) a a mod b if and only if b a a (Often this is used as




r s




the definition of the congruent relation.)
(vi) For nonnegative integers a b not both zeros, if r a 1 mod s and r b








(ii) If a a mod b and c c mod b then a c a c mod b a c








1 mod s then there are integers m n isuch that r a b r am bn ra m rb n








c mod b ac a c mod b a n a n mod b and P a


a P a mod b



1 mod s




for any polynomial P x with integer coefficients.


1 then a p 1 1 mod p


Fermat’s Little Theorem. If p is prime and a p


Example. (8) Find the remainder of 197820 upon division by 53


125
(This means that a p 2 a 1 mod p because a a p 2


1 mod p )



Solution. 197820 2000 22 20 20 48410 10 2565


22 16



1 then a n


65 25 35 32 7


Euler’s Theorem. If a n 1 mod n where the Euler -




26 mod 125





function n is the number of positive integers less than or equal to n, which are


Other than finding remainders, modulo arithmetic is also useful in many relatively prime to n (For a prime p p p 1 and hence Euler’s theorem


situations. For example, (mod 2) is good for parity check. The fact that a number generalizes Fermat’s little theorem.)

21 22
74 1 mod 10 by Euler’s theorem. Now 77 17


To understand the reasons behind these theorems, we will define a reduced set 3 mod 4 and so



7 7
77 4n 3 4 n 3 n 3
343 3 mod 10 So the units digit of 77 is 3.






of residues modulo n to be a set of n integers r1 r2 r n such that every 7 7 7 1 7









integer relatively prime to n is congruent to exactly one of r 1 r2 r n modulo






n. To prove Euler’s theorem, we note that if r1 r2 r n is a reduced set of Chinese Remainder Theorem. Let m 1 m 2 m k be positive integers such that





mi m j 1 for every pair i j . Then the equations x b1 mod m 1 x


residues modulo n and a n 1 then ar1 ar2 ar n are relatively prime to








n and they also form a reduced set of residues modulo n. (This is because r i r j b2 mod m 2 x bk mod m k have a common solution. In fact, every two





if and only if ari ar j (mod n) by the properties above.) So each ari is congruent solutions are congruent mod m 1 m 2 m k and we say the solution is unique






to a unique r j modulo n and hence mod m 1 m 2 mk


m1m2 mk
Reasons. One solution x can be found as follow: let M j then


n




mj


a r1 r2 r ar1 ar2 ar r1 r2 r mod n








n


n


m1 m2 mk


x M1 b1 M2 b2 Mk bk





n




Since r1 r2 r n 1 applying the cancellation property, we get a 1




n


(mod n).


m


M i i bi


is a solution since m i M j for i j Mi m i 1 imply x


bi mod m i for i 1 2 k by Euler’s theorem. Next, to show the solution is


Wilson’s Theorem. If p is a prime number, then p 1 ! 1 (mod p). (The


unique mod m 1 m 2 m k let x bi mod m i also. Then x x 0 mod m i





converse is also true, if n 4 is composite, then n 1 ! 0 (mod n).)


for i 1 2 k i.e. x x is a common multiple of the m i ’s. Since m i m j 1


Reasons. The case p 2 is clear. Let p 2 be prime and 1 a p then





for i j so their lcm m 1 m 2 m k x x Then x x mod m 1 m 2 mk )





a p 1 implies a 2a a p 1 form a reduced set of residues modulo p





and hence there is a unique b such that 1 b p and ab 1 (mod p). We have






Computation Formulas. If a b 1 then ab a b If n



a b if and only if p divides a 2 1 p1e1 p2e2 pkek and ei 1 for i 1 2


a 1 a 1 that is a 1 or p 1.


k, then


Hence, for the p 3 integers 2 3 p 2 we can form p 3 2 pairs a b

with ab 1 (mod p). Then p 1 ! 1 1 p 3 2 p 1




1 1 1


1 (mod p).






n n 1 1 1


p1 p2 pk
For the converse of Wilson’s theorem, if n 4 is composite, then let p be a
prime dividing n and supoose n p 2 Then p n and n p n so that p n p









Reasons. For the first statement, observe that if 1 x ab and x ab 1






p 2 then p 2 and p 2 p p2 n





and n p n p divides n 1 ! If n



then x a 1 and x b 1 So the remainders r s of x upon divisions by a b


2


so again n divides 2 p p 2 p which divides n 1 ! are relatively prime to a b respectively by the Euclidean algorithm. Conversely,


if 1 r a a r 1 and 1 s b b s 1 then x r mod a and x










Examples. (9) 1 1 If p is prime, then 1 2 3 p 1 are re;atively


s mod b have a unique solution less than or equal to ab by the Chinese remainder






prime to p and so p p 1 (Again, this means Fermat’s little theorem


theorem. Thus, the pairing x r s is a one-to-one correspondence. The second





is a special case of Euler’s theorem). For k 1 p prime, since the numbers statement follows from the first statement and the fact pik pik 1 p1i





p 2p 3p p k are the only numbers less than p k not relatively prime to p k so


1 1
pk pk pk 1 p k 1 1p 2 2 52





Examples. (11) 100 100 1 1 40






2 5


7
(10) Let us find the units digit of 77 Note 10



4 since only 1,3,7,9 are less (12) To solve the system x 3 mod 7 x 2 mod 5 we may use the formula in






1 so 7 10 the paragraph below the Chinese remainder theorem to get x 5 7 3 7 5 2





than or equal to 10 and relatively prime to 10. Since 7 10




23 24
56 3 7 4 2 So, 23 1978m (because 1978n m 1 is odd) and the least m is 3. Let d n m


17 mod 35 (However, in general the formula may involve large



The problem now is to look for the least positive integer d such that 5 3 1978d 1


numbers.) Alternatively, we can solve as follow: x 3 mod 7 x 7n 3






(i.e. 1978d 1 mod 53 Since 53 100 so 1978100 1 mod 53 by Euler’s









x 2 mod 5 7n 3 2 mod 5 7n 1 4 mod 5 theorem. Thus the least such d is at most 100.






Suppose the least d 100 Let 100 dq r with 0 r d then








n 3 7n 2 mod 5 n 5k 2





1978r 1978d q 1978r 1978100 1 mod 53 Since d is to be the least such





exponent, r must be 0. Then d 100 Also, 5 1978 d 1, so 1 1978d 3d mod 5





Then x 7 5k 2 3 35k 17 (or x 17 mod 35 )







The only such d’s are multiples of 4. So d 4 or 20 However, example (8) shows


that 197820 1 mod 53 (This also shows that 19784 1 mod 53 because





(13) (IMO 1989) Prove that for each positive integer n there exist n consecutive


4 3 20 4 5
1 mod 53 ) So d


1978 1 mod 5 implies 1978 1978 100


positive integers, none of which is an integral power of a prime number.


Therefore the least d 100 and the least m n d 2m 106 when m 3


Solution. Let p1 p2 p2n p2n be 2n distinct prime numbers. Now by the and n d m 103


1



Chinese remainder theorem,

Exercises



x 1 mod p1 p2 x 2 mod p3 p4 x n mod p2n 1 p2n


have a common solution. Then each of the numbers x 1 x 2 x n is 1. For each of the following statements, determine if each is true or false. If





divisible by two different prime numbers. Hence each cannot be a prime power. true, give an explanation. If false, provide a counterexample.
(a) If p is a prime number and p n k then p k n k



(14) If q is a prime factor of a 2 b2 and q 3 mod 4 then q a and q b (This






(b) If ab c 1 then a c 1 and b c 1



fact is sometimes useful, for example in exercises 11 and 22.)
(c) If a 2 b2 mod c2 then a


b mod c



q 2


Solution. Suppose q does not divide a say. Then q a 1 Let c a


then ac a q 1 1 mod q by Fermat’s little theorem. Now q a 2 b2 implies 2. As in the last exercise, determine if each of the following statement is true or


b2 a 2 mod q so bc 2 false. Provide reason or counterexample.




1 mod q Then q does not divide bc and








q 1
1 q 1 2


bc 1 mod q contradicting Fermat’s little theorem. So (a) If p is an odd prime, then p 2 1






p 1


p 1 How about




q a and similarly q b p2 4


p 2 p 2 ?








(b) If n 1 then show that the sequence n n n n





(15) (1978 IMO) Let m and n be natural numbers with 1 m n In their decimal n must be all 1’s after the n-th term.







representations, the last three digits of 1978m are equal, respectively, to the last
three digits of 1978n Find m and n such that m n has its least value. 3. If p is a prime number, show that p divides the binomial coefficients C np



p!
for n 1 2 p 1


n! p n !

Solution. Since the last three digits are equal, so 1978 n 1978m mod 1000 i.e.






4. Find all intergers x such that x 1 mod 2 x 2 mod 3 and x



23 53 1978n 1978m 1978m 1978n m



1000 1 3 mod 5


25 26
7
5. Compute the last 2 digits of 77 (Hint: Consider (mod 4) and (mod 25).) also called Bertrand’s Postulate because it was experimentally verified by


Bertrand for x from 1 to 1 000 000 before Chebysev proved it.


6. (1972 USAMO) Prove that for any positive integers a b c


[a b c]2 a b c2


§3 Divisibility Problems





[a b][b c][c a] a b b c c a


Examples. (16) (1998 IMO) Determine all pairs a b of positive integers such


that ab2 b 7 divides a 2 b a b


7. Show that the greatest power of a prime number p dividing n! is
Solution. Considering the expressions as polynomials of a and treating b as
n n n n constant, it is natural to begin as follow. If ab 2 b 7 divides a 2 b a b then





[ k] [ ] [ 2] [ 3]





ab2 b 7 divides


k 1
p p p p


a ab2 b a 2b b2


where [x] is the greatest integer less than or equal to x b 7 a b 7a


8 (1972 IMO 1972) Let m and n be arbitrary non-negative integers. Prove that
If 7a b2 0 then 7 divides b and so b 7k a 7k 2 for some positive


7k 2 7k satisfy the condition.


integer k It is easy to check these pairs a b


2m ! 2n !

m!n! m n !


If 7a b2 0 then ab2 b b2 b2 but this contradicts


7 7a 7a






7a b2 b2 ab2 b 7






is an integer. (Hint: One solution uses the last exercise. Another solution is


to get a recurrence relation.) If 7a b2 0 then ab2 b 7 7a b2 If b 3 then ab2 b 7





9a 7a 7a b2 a contradiction. So b can only be 1 or 2. If b 1 then a 8


9. Do there exist 21 consecutive positive integers each of which is divisible by


divides 7a 1 7 a 8 57 So a 8 divides 57, which implies a 11 or 49.


one or more primes p from the interval 2 p 13?




If b 2 then 4a 9 divides 7a 4 Since 7a 4 2 4a 9 8a 18 we





get 7a 4 4a 9 which has no integer solution. Finally, a b 11 1 and


10. Show that there are infinitely many prime numbers of the form 4n 1. (Hint:


49 1 are easily checked to be solutions.


Modify the proof that there are infinitely many prime numbers.)

11. Show that there are infinitely many prime numbers of the form 4n 1 (Hint:


(17) (1988 IMO) Let a and b be positive integers such that ab 1 divides a 2 b2





Use example 14.) a 2 b2


Show that is the square of an integer.
ab 1


Remarks. There is a famous theorem called Dirichlet’s Theorem on Prime
a 2 b2 ab 1 Assume there exists a case k is an integer,



Solution. Let k


Progression, which states that for every pair of relatively prime positive


integers a b the arithmetic progression a a b a 2b a 3b must but not a perfect square. Among all such cases, consider the case when max a b


is least possible. Note a b implies 0 k 2a 2 a 2 1


2 so that k 1


contain infinitely many prime numbers.


b Now x 2 b2 k xb 1


Hence, by symmetry, we may assume a 0




b 2 k a Now


Another famous theorem known as Chebysev’s theorem asserts that for has a as a root. The other root is the integer c kb a


c2 b2 k 0 and c b2 k a 0 imply c is a positive integer.



every x 1 there is always a prime number p between x and 2x This is cb 1




27 28
b2 k a a2 k a c2 b2 cb 1 is a Solution. Assume n divides 2n 1 for some integer n 1 Since 2n 1 is odd,





Also, c a Now k





so n is odd. Let p be the smallest prime divisor of n Then p divides 2 n 1 hence


nonsquare integer and max b c a max a b contradict max a b is least


2n 1 mod p By Fermat’s little theorem, 2 p 1 1 mod p Now the greatest


possible. Therefore, all such k’s are perfect squares.





common divisor d of n and p 1 must be 1 because d divides n d p 1


Remarks. Considering to the roots of a quadratic expression is a useful trick in


and p is the smallest prime divisor of n Then there are integers r s such that


some number theory problems!


rn s p 1 1 which implies


2d 2n r
2p 1 s


a2 2 1 mod p


(18) (2003 IMO) Determine all pairs of positive integers a b such that


2ab2 b3 1



is a positive integer. a contradiction.
Solution. Let k a 2 2ab2 b3 1 be a positive integer. Then a 2 2kb2 a






kb3 k 0 (Note it is possible to consider roots. However, the following is a Exercises

variation that is also useful.) Multiplying by 4 and completing squares, we get


2a 2kb2 2 2kb2 b 2 4k b2 Let M 2a 2kb2 and N 2kb2 b 12. (1992 IMO) Find all integers a b c with 1 a b c such that a








2 2 2 1 b 1 c 1 is a divisor of abc 1


then M N 4k b


If 4k b2 0 then b is even and M N If M N then we get 



13. (1994 IMO) Determine all ordered pairs m n of positive integers such that



b 2a If M N then 2a 4kb2 b b4 b Thus, we get a b



b 2 b n 3 1 mn 1 is an integer. (Comments: There are 9 solutions.)






or b4 b 2 b with b an even integer. We can easily check these are solutions.





b2 0 then since N 2kb2





If 4k b b 2kb 1 12 1 1 so 14. Redo Example 18 by considering roots of quadratic expression as in the


2
1 2 We have


M N solution of Example 17.




b2 M2 N2 2
N2 4kb2


4k N 1 2N 1 2b 1



15. (1999 IMO) Determine all pairs n p of positive integers such that p is a


2 p and p 1 n 1 is divisible by n p 1 (Hint: For p


prime, n 3





which implies 4k b2 1 b 1 2 0 Since the left side is also nonegative,




consider the smallest prime divisor q of n )


this forces b 1 and k a 2 2a 1 1







a 2 Then a b 2k 1 which


can be checked to be a solution for every positive integer k


7p 2 p 7q 2q





2 2 2 16. (2000 CHKMO) Find all prime numbers p and q such that


If 4k b 0 then M N 1 So


pq


is an integer.
b2 M2 N2 2
N2 4kb2


4k N 1 2N 1 2b 1





17. (2003 IMO) Let p be a prime number. Prove that there exists a prime number
4k b2 2b


which implies 0 1 1 4k However, the right side equals







q such that for every integer n the number n p p is not divisible by q (Hint:

1 8k 2k 1

2
p p 1 p 1 are congruent to





1 4k b 0 a contradiction. Note not all of the prime divisors of M


1 4k 1 4k 2

1 (mod p ). Let q be such a prime divisor of M )


18. (1990 IMO) Determine all integers n 1 such that 2 n 1 n 2 is an integer.


(19) (1972 Putnam Exam) Show that if n is an integer greater than 1, then n does



not divide 2n 1 (Hint: Write n 3k r with 3 r 1 Show k 0 or 1 by factoring 2n 1



29 30



and considering (mod 9). Show r 1 by considering the smallest prime forcing y 1 or 2 However, simple checkings show these are not solutions.


divisor of r if r 1 ) So n 1 is the only solution.


§4 Diophantine Equations–Equations which integral solutions are sought. (23) Determine all integral solutions of y 2 1 x x2 x3 x4


x
Solution. Completing squares, we have x 2 12 y 2 54 x 2 and x 2





Examples. (20) (1979 USAMO) Determine all integral solutions of n 41 n 42


2
x 2 3 2 2 2 2 2 x 2 x


n 414 1599 4 x y So x 1 y x 2 If x is odd, then







2 3 3 2


2 x 1


y x Substituting back in to the equation and simplifying we get


4
16n 4


2 2



Solution. We have 2n 0 mod 16 and


x 2 2x 3 0 yielding x x 2 x2 1 and so


1 or 3. If x is even, then y



5 2


4
16n 4 32n 3 4x 0 forcing x 0 Therefore, the solutions are x y 1 1 3 11


2n 1 8n 3n 1 1 1 mod 16


and 0 1



So, n 41 n 42 n 414



0 1 2 14 mod 16 , but 1599 15 mod 16 So,





there can be no solution.


(24) Determine all nonzero integral solutions of a 2 b2 3


b a a b


Solution. Expanding, then simplifying the equation, we get 2b 2 a2


3a b



(21) (1976 USAMO) Determine all integral solutions of a 2 b2 c2 a 2 b2


3a 2 a


0 Applying the quadratic formula, we get





Solution. Suppose a b c is a solution. If a b c are odd, then a 2 b2 c2




a2 a4 6a 3 15a 2 a2 2


3 mod 4 , but a 2 b2 1 mod 4 If two are odd and one even, then a 2 b2 3a 8a 3a a a 8 a 1







2 2 2 b




c 2 mod 4 , but a b 0 or 1 mod 4 If one is odd and two even, then 4 4




a 2 b2 c2 1 mod 4 , but a 2 b2 0 mod 4







a 4 2 42 must be a perfect square, say x 2 a 4 2 42


So a a 8


Therefore, a b c must all be even, say a 2a0 b 2b0 c 2c0 Then we 2 2


Then a 4 x 16 So a 4 x a 4 x 1 16 or 2 8 or






get a02 b02 c02 4a02 b02 If at least one of a0 b0 c0 is odd, then a02 b02 c02 1 2



4 4 From these, we get the nonzero a 1 8 9 These lead to the solutions



or 3 mod 4 , but 4a02 b02


0 mod 4 So a0 b0 c0 must all be even again, say





a b 1 1 8 10 9 6 9 21 (Check: The 4 solutions yield the



a0 2a1 b0 2b1 c0 2c1 Then a12 b12 c12 16a12 b12 So a1 b1 c1 must all


4 equations 0 0 0 54 108 183 75 45 153 60 450 303





be even. From this we see inductively that a b c can be divisible by any power of

2. Therefore, a b c 0


(25) Find all positive integral solutions of 3 x 4y 5z .


(22) (1993 APMO) Determine all positive integer n for which the equation x n


Solution. We will show there is exactly one set of solution, namely x y z 2.


2 x n 2 x n 0 has an integer as a solution.





To simplify the equation, we consider modulo 3. We have 1 0 1 y 3x 4 y



5z 1 z mod 3 . It follows that z must be even, say z


Solution. If n is even, the terms on the left side are nonnegative and cannot all be 2 . Then


x
5 4y
z
2y 5 2 y Now 5 2 y and 5 2 y are not both divisible





0. So there will not be any integer solution. If n 1 then x 4 is the solution. 3 5

2y 3x and 5 2y


If n is odd and at least 3, then any solution x must be even, otherwise the left side is by 3, since their sum is not divisible by 3. So, 5 1.


odd. Suppose x 2y Then the equation becomes y n 1 y n 1 y n 0 y y



Then, 1 1 0 mod 3 and 1 1 1 mod 3 . From these,


n n n
2 y 3x 1 or 3 mod 8 ,





Obviously y 0 We have 0 y 1 y 1 y 2 mod y So y 2 we get is odd and y is even. If y 2, then 5 5









31 32
2y 1 z mod 3 and 1x


a contradiction. So y 2. Then 5 1 implies 1 and z 2. Finally, Solution. Let x y z be a solution, then 1


a 2 y 2
5b 2


we get x 2. 1 mod 4 So x and z are even, say x 2a and z 2b Then 3 2





a y b
Since 3 2 and 5 are relatively prime, by the theorem on Pythagorean triples,


3a u 2 2 and 2 y 2u where u and one is odd, the other even. Now 2 y


Finally, we come to the most famous Diophantine equation. Let us define


y 1 a
22 y 1 2y 1 1 2y 1 1


2u implies u 2 1 Then 3 1


Pythagorean triples to be triples a b c of positive integers satisfying a 2 b2


Since the two factors on the right differ by 2 and must be powers of 3, we have


c2 . For example, 3 4 5 and 5 12 13 are Pythagorean triples. Clearly, if 


2 y 1 1 1 which gives y 2 u 2 a 1 x 2 and z 2


a 2 b2 c2 , then ad 2 bd 2 cd 2 for any positive integer d. So, solutions






2
of a b 2 2
c with a b c relatively prime (i.e. having no common prime divisors)


Exercises

are more important. These are called primitive solutions. Below we will establish
a famous theorem giving all primitive solutions. 19. Show that 15x 2 7y 2 9 has no integral solutions.


Theorem. If u are relatively prime positive integers of opposite parity and
20. Find all integral solution(s) of x 3 2y 3 4z 3 3


9 (Hint: Consider mod 9


u2 2
u2 2


u then a b 2u c give a primitive solution of

2 2 2 first.)
a b c . Conversely, every primitive solution is of this form, with a possible


permutation of a and b.
21. Find all integral solution(s) of 3 2 x 1 y2





(For example, u 2 1 yields a 3 b 4 c 5.)

Reasons. For the first statement, a 2 b2 u 4 2u 2 2


4
c2 . Suppose two of 22. Show that y 2 x 3 7 has no integral solutions. (Hint: Note y 2 1





2


a b c have a common prime divisor p, then the equation will imply all three have x 2 x 2x 4 and use example 14.)

p as a common divisor. Note p 2 since a c are odd. Then p c a 2 u 2







2 *23. Show that x 4 y 4 z 2 has no positive integral solutions. (Hint: Suppose




and p c a 2 This contradicts u being relatively prime. So a b c must


be relatively prime. x y z is a positive solution with z least possible, then show there is another


For the second statement, if a 2 b2 c2 , then a 2 b2 0 or 1 (mod 4). So, solution with a smaller z value using the theorem on Pythagorean triples.)


Then also conclude that x 4 y 4 z 4 has no positive integral solution.


if a b c are also relatively prime, then one of a or b is odd and the other is even.

Let us say a is odd and b is even. Then c is odd and it follows m c a 2 and 


Remarks. The famous Fermat’s Last Theorem is the statement that for every





n c a 2 are positive integers. Note a m n and c m n relatively




integer n 2 the equation x n y n z n has no positive integral solution.




prime implies m n cannot have a common prime divisor (for if p m and p n then

p m n a and p m n c). Now b 2 2 c2 a 2 4 mn. It follows Fermat claimed to have a proof 350 years ago, but nobody found his proof.








that both m and n are perfect squares with no common prime divisors. Let us say Only a few year ago, Andrew Wiles finally proved it. His proof was 200
m u 2 and n 2
. Then a u 2 2
b 2u and c u 2 2
. Since a is odd, pages long.


u and are of opposite parity.


Remark. The general solutions of a 2 b2 c2 are either trivial with a or b


2 2


equals 0 or nontrivial with a b of the form u d 2u d and c of the form



2 2


u d where u are as above and d is positive.




Example. (26) Find all positive integral solutions of 3 x 4y 5z using the




theorem on Pythagorean triples.

33 34
4. Combinatorics Examples. (3) Let n k be integers such that 0 k n





Combinatorics is the study of counting objects. There are many basic, yet (a) Find the number Pkn (or n Pk ) of permutations of n distinct objects taken k at
useful principles that allow us to count efficiently. a time. This is the number of ways of taking k of the n objects one after the
other without replacement so ordering is important. (If k is not mentioned,
§1. Addition and Multiplication Principles. then the default value is k n )


n
Addition Principle. Suppose events A1 A2 An have a1 a2 an outcomes (b) Find the number Ckn (or n Ck or ) of combinations of n distinct objects


k
respectively. If all of these outcomes are distinct, then the number of outcomes due taken k at a time. This is the number of ways of taking k of the n objects at
to event A1 or event A2 or or event An is a1 a2 an





the same time so ordering is not important.



Remarks. When you need to count something, the difficulty is how to break up the
Solutions (a) There are n outcomes of taking the first object, followed by n 1 out-


things into groups that are easy to count.
comes of taking the second object, ..., there are n k 1 outcomes of taking the k-th



n!
Examples. (1) Flipping a coin (event A1 ) results in two outcomes: head or tail. objects. By the multiplication principle, Pkn n n 1


n k 1








n k!


Tossing a dice (event A2 ) results in six outcomes: 1,2,3,4,5,6. So flipping a coin
or tossing a dice results in 6 2 8 outcomes. (b) Divide all permutations of n objects taken k at a time into groups that


have the same k objects. In each group, the number of ways the k objects were
(2) Find the number of squares having all their vertices belonging to an 10 10 taken was Pkk k! Since order is not important in combinations, the k! ways


array of equally spaced dots. in each group is only counted once. Hence C kn is the number of groups, hence
Pkn n!
Solution. Each such square has a unique circumscribed square with sides parallel to Ckn





k! k! n k !


the sides of the array! Use these circumscribed squares as events. If a circumscribed
square is k k (that is, each side has k 1 dots), then there are k distinct squares



(outcomes) inscribed in this circumscribed square. For k 1 2 9 there are (4) Find the number of positive divisors of a positive integer N having prime


10 k 2 circumscribed squares of dimension k k So the answer is factorization 2e1 3e2 pnen Find the number of ordered pairs a b of positive





integers a b such that lcm a b N


9 9 9 9 9


2
20k 2 k3 k2 k3 Solution. Every divisor of N is of the form 2 A1 3 A2 pnAn where Ai 0 1 2


10 k k 100k 100 k 20 825




ei



k 1 k 1 k 1 k 1 k 1 for i 1 2 n So the number of outcomes in the event of filling in A 1 fol-



using the formulas lowed by the event of filling in A2 ... followed by the event of filling in An is


e1 1 e 2 1 en 1 This is the number of positive divisors of N





n n n


n n 1 n n 1 2n 1 n n 1 2








k2 k3 2 m 1 3m 2 pnm n and b 2 k 1 3 k2 pnkn Then lcm a b


k and Let a N if and

2 6 2


k 1 k 1 k 1 only if max m 1 k1 e1 and max m 2 k2 e2 and ... and max m n kn en



Consider the event max m 1 k1 e1 there are 2e1 1 possible outcomes, namely


m 1 k1 0 e1 1 e1 e1 e1 e1 e1 1 e1 1 e1 0 Similarly,


Multiplication Principle. Suppose events A1 A2 An have a1 a2 an


there are 2ei 1 outcomes for the event max m i ki ei So the number of pairs






outcomes respectively. Then the number of outcomes of event A 1 followed by



a b such that lcm a b n is 2e1 1 2e2 1 2en 1


event A2 ..., followed by event An is a1 a2 an


35 36
§2. Bijection Principle. (7) Each of the vertices of a regular nonagon (i.e. 9-sided polygon) has been
colored either red or blue. Prove that there exist two congruent monochromatic
Bijection Principle. If there is a one-to-one correspondence between the outcomes (i.e. vertices having the same color) triangles.
of event A and outcomes of event B, then A and B have the same number of Solution. By the pigeonhole principle, there are at least five vertices of the same
outcomes. color, say red. So there are at least C35 10 triangles having red vertices. For each
Reminder. When we are asked to count the number of outcomes of an event, triangle ABC (vertices in clockwise order), take vertex A, go around the nonagon
sometimes it may be possible to set up a one-to-one correspondence with another in the clockwise direction and count the number of sides of the nonagon travelled
event whose outcomes are easier to count. from A to B from B to C and from C to A



Arrange these three numbers in increasing order x y z There is a one-to-



Examples. (5) Let n be a positive integer. In how many ways can one write a sum





of at least two positive integers that add up to n? Consider the same set of integers one correspondence between the sides of triangle ABC and x y z Since x y z


are positive integers, x y z and x y z 9 there are 7 outcomes, namely




written in a different order as being different. (For example, there are 3 ways to


express 3 as 3 1 1 1 2 1 1 2 ) x y z 1 1 7 1 2 6 1 3 5 1 4 4 2 2 5 2 3 4 3 3 3 Since




10 7 by the pigeonhole principle, there must be two congruent red triangles.


Solution. (First the answer can be discovered by trying the cases n 4 5 and


observe pattern!) We study the case n 3 We have 3 1 1 1




(8) Let m and n be integers greater than 1. Let S be a set with n elements, and let


1 1 1 1 1 1 Each of the sum is in a one-to-one correspondence




A1 A2 Am be subsets of S Assume that for any two elements x and y in S





with 1 1 1 where each blank square is filled with a or a . Note since


there is a set Ai containing either x or y but not both. Prove that n 2 m




each sum has at least two terms, there is at least on .





Solution. For each element z in S define f z z 1 z2 z m where z i 1


For a general n we have n 1 1 1 with n 1 blank squares. By the


multiplication principle, in filling in the blank squares one followed by the other, if z is in the set Ai otherwise z i 0 If x y then f x and f y differ in


there are 2n 1 ways, but filling all blank squares with is not allowed. So there some coordinates. So the n elements in S correspond to n different f z By



the multiplication principle, there are exactly 2 2 2 2 m possible


are 2n 1 1 ways.

z m ’s. Therefore, n 2m


z1 z2




(6) How many paths are there going from 0 0 to 10 20 on the coordinate plane

such that either the x or the y coordinate of every point on the path is an integer and §3 Pigeonhole Principle.
the x and y coordinates on the path are always nondecreasing at every moment?


Solution. Note such a path is a staircase from 0 0 to 10 20 with corners at


Pigeonhole Principle. If n 1 or more objects are put into n boxes, then at least


lattice points (i.e. points with x y integers). Break the path into unit length pieces.

two of the objects will be in the same box. More generally, if m objects are put
Then each piece is either moving left or up. By projecting the path to the x and m


y-axes, we see that the length is 30 units and there are 10 left and 20 up pieces. into n boxes, then at least objects will be in the same box.
n
There is a one-to-one correspondence between a path and a sequence of 10 lefts
and 20 ups in some order. Hence, among the 30 pieces, it depends where we take Examples. (9) (1954 Putnam Exam) Five point are chosen from inside of the unit
30
the 10 lefts. Therefore, there are C10 paths. 1


square. Show that there are two points with distance at most 2


2
37 38
1 (13) Each pair of 6 distinct points are joined by a red or blue line segment. Show
Solution. Divide the inside of the unit square into 4 squares with side By the


2 that there is a red or blue triangle. (Note if 6 is replaced by 5, the problem will not
pigeonhole principle, there are two points in the same square. Then their distance
1 be true as one can color the edges of a pentagon red and the diagonals blue to get


is at most the length of the diagonal, which is 2 a counterexample.)


2
Solution. Take one of the 6 points, say A By the pigeonhole principle, among the


5 segments from A there are 3 of the same color, say AB AC AD are red. Either


triangle BC D is blue or one of the side, say BC is red, then triangle ABC is red.
(10) Eleven numbers are chosen from 1 2 20 Show that the sum of two of


them is 21.
Alternative Formulation. Among any 6 people, either there are 3 who knows each

other or there are 3 with no pair knows each other.


Solution. Consider the 10 sets 1 20 2 19 10 11 By the pigeonhole


principle, two of them will be from the same set. Hence the sum is 21.
Solution. Associate each person a point. Draw a red segment joining the points
if the corresponding people knows each other, a blue segment if they don’t know
each other. Then use the result above.
(11) From any set of m integers, where m 1 show that there must be a subset Remarks. There is a famous theorem known as Ramsey’s Theorem, which asserts

the sum of whose elements is divisible by m that for any positive integers p and q there is a smallest positive integer n



R p q such that the following statement is true:


Solution. Let a1 a2 am be the integers. Consider the m 1 numbers



If n points are given with no three collinear and all line segments connecting
S0 0 S1 a1 S2 a1 a2 Sm a1 a2 am pairs of them are colored red or blue, then either there are p points, all seg-








ments connecting them are red or there are q points, all segments connecting
them are blue.



By the pigeonhole principle, there are Si S j with i j such that Si S j mod m





Then a j 1 ai Si S j 0 mod m So a j 1 ai is a subset the sum





Example (13) is the statement R 3 3 6 Very few Ramsey numbers R p q are










of whose elements is divisible by m known. Also, Ramsey’s theorem can be extended to more than 2 colors. Briefly,


given integers p1 pk there is a least n such that if all segments connecting


n points are colored by k colors C1 Ck then either there are p1 points with


segments all C1 colored or or there are pk points with segments all Ck colored.


(12) Suppose n 1 numbers are chosen from 1 2 2n Show that there are two


of them such that one divides the other.


§4 Principle of Inclusion and Exclusion.
m
Solution. Factor each of the n 1 numbers into the form 2 k with k odd. There



are n possibilities for k namely k 1 3 2n 1 By the pigeonhole principle Principle of Inclusion and Exclusion (PIE). Let S denote the number of elements



two of them have the same k factor. Then the one with the smaller exponent m in a set S


A1 A2 A1 A2 A1 A2



divides the one with the larger exponent m


A1 A2 A3 A1 A2 A3 A1 A2 A1 A3 A2 A3 A1 A2 A3





39 40
In general, So the number of ways no letters go into the right envelopes is





A1 A2 An Ai Ai A j Ai A j Ak 1 1 1 1






n! A1 A2 An n! 1





1 i n 1 i j n 1 i j k n 1! 2! 3! n!


(Note the probability that no letters will go to the right envelopes is the above
Examples. (14) Find the number of positive integers at most 1000 which are 1 1 1 1
expression divided by n! which is close to 1 when n






divisible by 10 or 12 or 14. e 1! 2! 3!
is large.)
Solution. Let Ak be the set of positive integers at most 1000 which are divisible by


k Since Ai A j Alcm i j lcm 10 12 60 lcm 10 14 70 lcm 12 14









84 and lcm 10 12 14 420 so by PIE,


(16) (Euler -function) For a positive integer n show that the number of integers


m
1


A10 A12 A14






in 1 2 n that are relatively prime to n is n n 1 where


pi



A10 A12 A14 A10 A12 A10 A14





i 1

n p1e1 p2e2 pmem is the prime factorization of n





A12 A14 A10 A12 A14








1000 1000 1000 1000 1000 1000 1000


Solution. Instead we count the number of integers in 1 2 n that are not


10 12 14 60 70 84 420 relatively prime to n Then these integers are divisible by at least one of the primes


100 83 71 16 14 11 2 215 p1 p2 pm Let Ai be the number of integers in 1 2 n that are divisible


by pi By PIE,


m





Ai Ai Ai Aj Ai Aj Ak





(15) (Derangement Problem) How many ways can n letters be put into n envelopes i 1 1 i m 1 i j n 1 i j k m



so that no letter goes into the right envelope? n n n





1 i m
pi 1 i j m
pi p j 1 i j k n
pi p j pk
Solution. Totally there are n! ways of putting n letters into n envelopes. We will


count the opposite situation, where at least one letter goes into the right envelopes. Hence
Let Ai be all possible ways of putting letters into envelopes such that the i-th letter



goes to the right envelope. Since the other letters may go randomly into the other n n A1 A2 Am



n n


n 1 envelopes, Ai n 1 ! Similarly, Ai A j n 2 ! for i j as the








other n 2 letters may be randomly placed, etc. By PIE, pi pi p j

1 i m 1 i j m


n 1 1 1 1 1


n 1




Ai Ai Ai Aj Ai Aj Ak









p1 p2 pm p1 p2 pm 1 pm

i 1 1 i n 1 i j n 1 i j k n





1 1 1



n n n n 1 1 1

n 1! n 2! n 3! p1 p2 pm


1 2 3 m
1


1 1 1 1


n 1

n!




p


i
1! 2! 3! n! i 1


41 42
§5 Recurrence Relations and Generating Functions. 1 1 A B


So f x By partial fraction, we get





x2 x 1 x2 x 1 x r x s


Given a sequence a0 a1 a2 a3 a recurrence relation is typically a for- 1 1 1 5 1 5





mula for an in terms of a0 a1 a2 an 1 and n For example, the famous where A B r s Note s r


2 2


5 5

Fibonacci sequence is defined by the initial conditions F0 1 F1 1 and the





1 So for x r we have x r 1 x s 1 and


recurrence relation Fn Fn 1 Fn 2 for n 2 Using the recurrence relation,


we see that the Fibonacci sequence Fn is 1 1 2 3 5 8 13 21 34 55 89 1 1 1 1 1 r 1 s


f x


For a sequence a0 a1 a2 a3 the generating function of the sequence is





5 r x s x 5 1 x r 1 x s


a 0 a1 x a 2 x 2 a3 x 3


f x (Note this series may not converge for all





x2 x2


1 1 x 1 x


real x ) We can often use recurrence relations and generating functions to help in









5 r r2 r3 s s2 s3
counting things.
1 1 1


Examples. (17) Let an be the number of regions formed on a plane by n lines, no xn



n 1 sn 1


n 0 5 r


two of which are parallel and no three concurrent. Find a n


1 1 1 1 1 5 1 1 5


Solution. Clearly, a1 2 a2 4 a3 7 by drawing pictures. To solve the

Therefore, Fn Since Binet’s



problem by recursion, observe that any two of the lines must intersect. Suppose rn 1 sn 1


5 r 2 s 2
n 1 lines formed an 1 regions. The n-th line will intersect them at n 1 points. formula follows.

These n 1 points divide the n-th line into n parts and each part cuts one of the

an 1 regions into two. So an an 1 n Then Using generating functions, we can find formulas for terms of k-th order linear


recurrence relations (which are of the form an c1 an 1 c2 an 2 ck an k








an a1 an an an an a2 a1


1 1 2


with constants c1 c2 ck )

n 2 n 1


n n 1 2





2 Theorem. Let the sequence a0 a1 a2 satisfy an c1 an 1 c2 an 2 (c1 c2




n2


n 2 n 1 n 2 constants) for n 1 and the characteristic equation x 2 c1 x c2 has roots r1 r2






Therefore, an a1


2 2 Then there are constants b1 b2 such that for n 0 1 2


b1r1n b2 r2n


if r1 r2


(18) Show that the n-th term of the Fibonacci sequence is given by an
b1r1n b2 nr2n if r1 r2 .




1 1 5 1 5



n 1 n 1


Fn (Binet’s Formula)




5 2 2
Remarks. Similar theorem is true for higher order linear recurrence relation. If
F0 F1 x F2 x 2 F3 x 3


Solution. Consider the generating function f x satisfies an c1 an 1 c2 an 2 c3 an 3 and x 3 c1 x 2 c2 x c3




a0 a1 a2




of the Fibonacci sequence. Using F0 F1 and Fn Fn 1 Fn 2 we have




has roots r1 r2 r3 then there are constants b1 b2 b3 such that for n 0 1 2




F1 x 2 F2 x 3 F3 x 4


xf x F0 x





 
b1 r1n b2 r2n b3 r3n if r1 r2 r3 are distinct


x2 f x F0 x 2 F1 x 3 F2 x 4




b1 r1n b2 nr1n b3 r3n





an if r1 r2 r3


x2 F2 x 2 F3 x 3 F4 x 4 b1 r1n b2 nr1n b3 n 2 r1n if r1 r2 r3 .


x f x F1 x f x 1







43 44
2
(19) (1989 Putnam Exam) Prove that there exists a unique function f defined on a2n a2n 2 a2n Then using the recurrence relation and the first relation, we get


1





0 such that f x


0 and f f x 6x f x


a2n 2 a2n a2n a2n a2n a2n a2n 2 a2n a2n 2 a2n a2n


4 2 3 1 3 1


1





a2n 2 a2n a2n a2n a2n a2n 2 a2n a2n 1 a2n





Solution. For a 0 define a0 a an f an 1 for n 1 2 3 Then an 3 1 2 1 3 3





f an 1 f f an 2 6an 2 f an 2 an 1 6an 2 The characteristic


2


a2n a2n a2n a2n




3 2 1


3


equation x 2 3n 2n If



x 6 has roots 3 and 2. So an 0



then an 0 when n is large, contradicting f x 0 So 0 Since a0 a so which completes the induction for the second relation.





a We get f a a1 2a Simple checking shows that f x 2x satisfies








f f x 4x 6x f x Therefore, the unique function is f x 2x


(21) Suppose a1 a2 an and b1 b2 bn are two different groups of n positive


integers such that the numbers ai a j 1 i j n are the same as the numbers






bi b j 1 i j n Show that n is a power of 2.





(20) (1991 Chinese National Senior High Math Competition) Let a n be the number
x a1 x a2 x an and g x x b1 x b2 x bn


of positive integers having digits 1, 3 and 4 only and sum of digits equal n (Find a Solution. Let f x








recurrence relation for an and) show that a2n is a perfect square for n 1 2 3 Then


f2 x x 2ai x ai aj
f x2 x ai aj





Solution. Let An be the set of all such integers. Then A1 1 A2 11 A3 2 2

111 3 A4 1111 13 31 4 So a1 1 a2 1 a3 2 a4 4 Note i 1 1 i j n 1 i j n






the number d1d2 dk (in digit form) is in An if and only if the number d1d2 dk 1



f2 x f x2 x ai aj
x bi bj
g2 x g x2


An 1 if dk 1


2 2


is in An 3 if dk 3 So an an 1 an 3 an 4 for n 4 Although we


1 i j n 1 i j n




An 4 if dk 4.
So g x 2 f x2 g2 x f2 x


g x f x g x f x Since


can get a formula for an using the characteristic equation method, it turns out that


1 k p x for some k 1 and polynomial


g1 n f 1 so g x f x x


formula will not be to helpful to show a2n ’s are perfect squares.


p x Then


Before proceeding further, we will use the recurrence relation to write out
g x2 f x2 x2 1 k p x2 p x2


the terms of an We get 1 1 2 4 6 9 15 25 40 64 104 169 273 441 714


g x f x x 1



1 kp x


The a2n sequence is 1 4 9 25 64 169 441 and seems to be all perfect squares. g x f x x p x

What can we observe from the an sequence? Well, a2n 1 a2n a2n 1 and


2k Therefore n 2k 1


2 Setting x 1 we get 2n f 1 g1

a2n a2n 2 a2n seem to be true. If true, these can finish the problem for us





1


2
12 and if a2k m 2 then a2k 2 2 will


because a2 a2k a a m


2k 2k 1


1


imply all a2n ’s are perfect squares by induction.

Now we can check the relations by mathematical induction. For the first For the next few examples, we will need to multiply power series. Observe that
relation, a1 a2 2 a3 Suppose a2n 1 a2n a2n 1 Then a2n 1 a2n 2








a2 x 2 a3 x 3 b2 x 2 b3 x 3


a0 a1 x b0 b1 x





a2n 1 a2n a2n 2 a2n 3 by the recurrence relation, which completes the


induction for the first relation. For the second relation, a 2 a4 4 a32 Suppose a2 b0 x 2


a0 b0 a0 b1 a1 b0 x a 0 b2 a1 b1








45 46
For sequences a0 a1 a2 a3 and b0 b1 b2 b3 we define their convolution The binomial theorem asserts that for any real number


to be the sequence c0 c1 c2 c3 where


1


x2 xk





1 x 1 x


n



cn a0 bn a1 bn an b0 ak bn 2 k


1 k k 0

k 0


1 k 1





is the coefficient sequence of the product of the generating functions for the two where If is a nonnegative integer, this is true


k k!
sequences. We will denote the convolution by a n bn cn for all x However, if is not a nonnegative integer (eg. 1), then it is only



1


true for x 1 Considering the cases n and 1 2 we have


x2 x3


On the open interval 1 1 if we multiply 1 x





1 x


n n n 1 n k 1


1 2x 3x 2 4x 3


by itself, we get (This also follows from






1 x 2


k k!

differentiating the geometric series.) In short, 1 1 n 1 Now


1 kn n


1 n k 1 n k 1





1


x 2x 2 3x 3 k! k






2


1 x

1 1 1 k 1


1 k 1


1 2


1 1 3 5 2k 3


1 x 2 2 2


2 3


Differentiating both sides, we get 1 4x 9x 16x 2k k!



k k!


x 3


Examples. (22) For n 3 show that Example. (23) (Catalan Numbers) Find the number Tn of ways a convex n-sided

polygon can be divided into triangles by n 3 nonintersecting diagonals. (Here

n n n n
22 32 n 1 2


nonintersecting means no intersection inside the polygon.)




1 n 0





1 2 3 n


Solution. The first few cases are T3 1 T4 2 and T5 5 Consider a n 1 -




sided convex polygon 1 2 n 1 Fix edge n n 1 For any of these divisions,


Solution. Note the left side is a convoluted expression. Now


one of the triangles will be k n n 1 with 1 k n 1 For each such k






1 x the polygon 1 2 k n 1 has k 1 sides and the polygon k k 1 n has


9x 2 16x 3


1 4x





n k 1 sides. These yield Tk 1 Tn k 1 triangulations of 1 2 n 1 having

x 3


1





triangle k n n 1 (For the case k 1 or n 1 T2 should be set to 1.) Summing

n n n n n n 2 n n from k 1 to n 1 we get Tn 1 T2 Tn T3 Tn 1 Tn T2 which is a





x2 1 1



x x x x x




n n 1 0 0 1 n convoluted expression.

n


x 1 x


T4 x 2 T5 x 3


Consider the generating function f x T2 T3 x We





n 3 have


Their product is x 1 x 1 x which is of degree n 1 So the coefficient




of x n is
f2 x T22 T4 T2 x 2


T2 T3 T3 T2 x T2 T4 T3 T3




n n n n


22 2 n 1 2



3 1 n 0





T5 x 2 T6 x 3


T3 T4 x


1 2 3 n


47 48
So x f 2 x T4 x 2 T5 x 3 T6 x 4


T3 x f x 1 Solving for f x with 6. (1978 Austrian-Polish Math Competition) There are 1978 clubs. Each club







x 0 we get
has 40 members. It is known that every pair of these clubs has exactly one
common member. Show that there is one member who belongs to every club.


1 1 4x 1 1 2


k 7. (1964 IMO) Seventeen people correspond by mail with each other. In their



f x 1 4x


2x 2x k 0
k letters only 3 different topics are discussed. Each letter deals with only one


of these topics. Show that there are at least three people who write to each


Since f 0 T2 1 the plus sign is rejected. Comparing coefficients, we get other on the same topic. (Hint: Use 17 points and 3 colors. One color for

for n 3 4 5 each topic.)




n
Cn2n 2 4





8. Show that for integers a b c with c 0 1 4 9 16 if a b c





1 1 2 2n 4 !




n 1

Tn 4

p q c then a b c n





p q c for every positive integer n






2 n 1 n 1!n 2! n 1


9. Let an be the number of ways in which a 2 n rectangle can be formed out


of n 1 2 rectangles. Find a recurrence relation of a n in terms of an 1 and

Exercises. an 2 then find an in terms of n

10. Let an be the number of strings of n symbols each of which is either 0, 1 or


1. (1980 USSR Math Olympiad) Let n be an odd integer greater than 1. Show
2 such that no two consecutive 0’s occur. Show that a n 2an 1 2an 2 and


that one of the numbers 21 1 22 1 23 1 2n 1 is divisible by n


find an in terms of n (Note a1 3 a2 8 a3 22 )

(Hint: None of them is congruent to 1 mod n )


11. Show that there are an 2n 1 ways of arranging the integers 1 2 n in a


2. Show that there are integers a b c not all zero, with absolute values less

row such that except for the leftmost, every number differ from some number
than 106 such that
to its left by 1 or 1 (Hint: The rightmost integer must be 1 or n )




1 2 3


Fn2 if k 2n is even





a b 2 c 3 12. In example (12), show that ak where Fn




1 10 6 1012 Fn Fn if k 2n 1 is odd,





is the n-th Fibonacci numbers.


(Hint: Consider all numbers of the form r s 2 t 3 where r s t




106 1 and see how they are distributed.)




0 1 2



3. (1976 USA Math Olympiad) Each square of a 4 7 board is colored white or




black. Prove that with any such coloring, there is always a rectangle whose
four corner squares are of the same color. Is this true if the board is 4 6?


4. For n 3 how many n digit numbers are there such that each digit is 1, 2 or

3 and the digits contain 1,2,3 each at least once? (Hint: Let A 1 be the set of
n digit numbers, each of its digits is 2 or 3.)
5. In a group of 100 people, suppose everyone knows at least 51 other people
in the group. Show that there are three people in the group who know each
other.

49 50




5. Functional Equations Step 2 We will prove f kx k f x for k x by induction. This is true


for k 1 Assume this is true for k Taking y kx we get


A functional equation is an equation whose variables are ranging over func-


tions. Hence, we are seeking all possible functions satisfying the equation. We f x kx f x f kx f x kf x k 1 f x



will let denote the set of all integers, or denote the positive integers, 0



denote the nonnegative integers, denotes the rational numbers, denotes the


Step 3 Taking y x we get 0 f 0 f x x f x f x


real numbers, denote the positive real numbers and denote the complex



f x f x So f kx f kx k f x for k Therefore,


numbers.


f kx k f x for k x



1
f k 1k 1 1 1


Step 4 Taking x we get f 1 kf f f 1


In simple cases, a functional equation can be solved by introducing some



k k k k
substitutions to yield more informations or additional equations. m 1 m



Step 5 For m n f mf f 1 Therefore, f x cx with


n n n





Example. (1) Find all functions f : such that c f 1






Check: For f x cx with c f x y c x y cx cy f x f y


x2 f x x4






f 1 x 2x



In dealing with functions on after finding the function on we can often


for all x


finish the problem by using the following fact.


x, we have 1 x 2 f 1 x



Solution. Replacing x by 1 f x 21 x


1 x 4 Since f 1 x 2x x 4 x 2 f x by the given equation, we have


Density of Rational Numbers. For every real number x, there are rational num-

1 x 2 2x x 4 x 2 f x 1 x 4 Solving for f x , we



f x 21 x bers p1 p2 increase to x and there are rational numbers q1 q2 decrease



have to x We denote this by pn x and qn x as n








x 4 2 x4


21 x 1 1 x 2x

x2


f x 1 It follows from decimal representation of real numbers. For example,


x2 1 x 2


31 314 3141 32 315 3142


3 14159 is the limits of 3 and also 4
x2 x2 f x x2 1 x2 2


Check: For f x 1 f 1 x 1 1 x


10 100 1000 10 100 1000


2x x 4


Example. (3) Find all functions f : such that f x y f x f y







for all x y and f x 0 for x 0


For certain type of functional equations, a standard approach to solving the

problem is to determine some special values (such as f 0 or f 1 ), then induc-


Solution. Step 1 By example 2, f x x f 1 for x


1





tively determine f n for n 0 follow by reciprocal values f n and use density


Step 2 If x y then x y 0 So





to find all f x x The following are examples of such approach.



Example. (2) Find all functions f : such that f x f x y y f x y f y f y





So, f is increasing.


f x y f x f y (Cauchy Equation)



Step 3 If x , then by the density of rational numbers, there are p n qn

for all x y



such that pn x q n pn x and qn x as n So by steps 1 and 2,










Solution. Step 1 Taking x 0 y we get f 0 f 0 f 0 f 0 0 pn f 1 f pn f x f qn qn f 1 As n pn f 1 xf 1









51 52
1 1


and qn f 1 x f 1 So pn f 1 and qn f 1 will squeeze f x to x f 1 . We get


f x 0 for all x 0 (since f x 0 implies f 1 f x f x f 0


x x




f x x f 1 for all x Therefore, f x cx with c f 1 0


which would lead to a contradiction).


Check: For f x cx with c 0 f x y c x y cx cy f x f y





Define g : by g ln f e Then







and f x cx 0 for x 0


ln f e x y
ln f e x f e y ln f e x ln f e y





g x y g x g y





Remarks. (1) In example 3, if we replace the condition “ f x 0 for x 0”


by “ f is monotone”, then the answer is essentially the same, namely f x cx


Since f is monotone, it follows that g is also monotone. Then g c for all



with c f 1 Also, if the condition “ f x 0 for x 0” is replaced by “ f is x c for all x 0


Therefore, f x



continuous at 0”, then steps 2 and 3 in example 3 are not necessary. We can take



rational pn x and take limit of pn f 1 f pn f pn x f x to get


As an application of these facts, we look at the following example.

xf 1 f x since pn x 0

Example. (4) (2002 IMO) Find all functions f from the set of real numbers to





(2) The Cauchy equation f x y f x f y for all x y has noncontin- itself such that



uous solutions (in particular, solutions not of the form f x cx). This requires


f x f z f y f t f xy zt f xt yz




the concept of a Hamel basis of the vector space over from linear algebra.



The following are some useful facts related to the Cauchy equation. for all x y z t in


Solution. (Due to Yu Hok Pun, 2002 Hong Kong IMO team member, gold medalist)



Fact 1. Let A [0 or 0 If f : A satisfies f x y








c for all x Then the equation implies 4c 2 2c So c can only be


Suppose f x



f x f y and f xy f x f y for all x y A then either f x 0 for


1 1


all x A or f x x for all x A


0 or Reversing steps, we can also check f x 0 for all x or f x for all



2 2
x are solutions.



Proof. By example 2, we have f x f 1 x for all x If f 1 0 then



f x f x 1 f x f 1 0 for all x A Otherwise, we have f 1 0 Suppose the equation is satisfied by a nonconstant function f Setting x 0






since f 1 f 1 f 1 we get f 1 1 Then f x x for all x A



and z 0 we get 2 f 0 f y f t 2 f 0 which implies f 0 0 or





f y f t 1 for all y t In the latter case, setting y t we get the constant


f y 2



If y 0 then f y f y f y 0 and f x y


1



f x f y f x which implies f is increasing. Now for any x A



function f y for all y Hence we may assume f 0 0


2


by the density of rational numbers, there are pn qn such that pn x qn





Setting y 1 z 0 t 0 we get f x f 1 f x Since f x is not the


pn x and qn x as n As f is increasing, we have pn f pn








zero function, f 1 1 Setting z 0 t 0 we get f x f y f xy for all


f x f qn qn Taking limits, the sandwich theorem gives f x x for all








x A xy In particular, f f 0 for 0





Setting x 0 y 1 and t 1 we have 2 f 1 f z f z f z which




Fact 2. If a function f : 0 satisfies f xy f x f y for all x y 0





implies f z f z for all z So f is even.




and f is monotone, then either f x 0 for all x 0 or there exists c such that





Define the function g : 0 by g f 0 Then for all

You might also like