Xu Jiagu Lecture Notes On Mathematical Olympiad Courses Seni

Download as pdf or txt
Download as pdf or txt
You are on page 1of 158

Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.

com
by 217.174.237.134 on 09/27/15. For personal use only.

125
Solutions to Testing Questions
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com
by 217.174.237.134 on 09/27/15. For personal use only.

This page intentionally left blank


Solutions to Testing Questions
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

Solutions to Testing Questions 16


Testing Questions (16-A)
by 217.174.237.134 on 09/27/15. For personal use only.

1: We prove the general proposition that this can be done for any n-element
set, where n is an positive integer, Sn D f1; 2; : : : ; ng and integer N with
0  N  2n .
We induct on n. When n D 1, then the only subsets of S1 are ; and f1g.
If N D 1, then let any one element in S be red and the other be black. If
N D 2, then let the two elements ; and f1g be both red.
Assume that the desired coloring can be done to the subsets of set Sn D
f1; 2; : : : ; ng and integer Nn with 0  Nn  2n . We now show that there is
a desired coloring for set SnC1 D f1; 2; : : : ; n; n C 1g D Sn [ fn C 1g and
integer NnC1 with 0  NnC1  2nC1 . We consider the following cases:
(i) 0  NnC1  2n . Applying the induction hypothesis to Sn and Nn D
NnC1 ,we get a coloring of all subsets of Sn satisfying conditions (a),
(b), (c). All uncolored subsets of SnC1 contains the element n C 1,
and we color all of them blue. It is not hard to see that this coloring
of all the subsets of SnC1 satisfies conditions (a), (b), (c).
(ii) NnC1 D 2n C k with 1  k  2n . Applying the induction hypothesis
to Sn and Nn D k, we get a coloring of all subsets of Sn satisfying
conditions (a), (b), (c). All uncolored subsets of SnC1 contain the
element n C 1, and we color all of them red. It is not hard to see that
this coloring of all the subsets of SnC1 satisfies conditions (a), (b),
(c).
Thus our induction is complete.
2: We use induction on k. Let the statement in the question be Pk . For k D 1,
then it is enough to let x1 D 0; x2 D 3; y1 D 1; y2 D 2.
Assume that the propositions Pl ; 1  l  k are all true (k  1). Then
consider PkC1 .

127
128 Solutions to Testing Questions

By the inductive assumption, the set f0; 1; 2; : : : ; 2kC1 1g can be parti-


tioned into two subsets fx1 ; x2; : : : ; x2k g and fy1 ; y2 ; : : : ; y2k g. Then the
sets
fx1; x2 ; : : : ; x2k ; 2kC1 C y1 ; 2kC1 C y2 ; : : : ; 2kC1 C y2k g
and
fy1 ; y2; : : : ; y2k ; 2kC1 C x1 ; 2kC1 C x2; : : : ; 2kC1 C x2k g
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

are disjoint and their union is f0; 1; 2; : : : ; 2kC2 1g. Below we prove that
2 k 2 k 2 2 k k
X X X X
xim C .2kC1 C yi /m D yim C .2kC1 C xi /m : ./
i D1 i D1 i D1 i D1
by 217.174.237.134 on 09/27/15. For personal use only.

In fact,
2 k 2 k ! m 2k
X X m X1 X
./ , C ximC yim .2 kC1 m t
/ yit
t
i D1 i D1 i D1 i D1
2k 2k m
! 2k
X X X1 m X
m m kC1 m t
D yi C xi C .2 / xit
t
i D1
m
! i D1 i D1
2k
i D1
X1 m X
, .2kC1 /m t .xit yit / D 0:
t
i D1 i D1

The inductive assumption gives that


2k
X
.xit yit / D 0; t D 1; 2; : : : ; m 1;
i D1

therefore ./ holds, and hence PkC1 is true. Thus, the inductive proof is
completed.
3: If a < 2, then jf 1 .0/j D jaj > 2, so a … M .
1
If 2  a  , by definitions, f 1 .0/ D f .0/ D a; f n .0/ D .f n 1 .0//2 C
4
a; n D 2; 3; : : :. We prove by induction that jf n .0/j  2 as follows.
1 1
(i) When 0  a  , it can be obtained that jf n .0/j  ; n 2 N.
4 2
1 1
1
In fact, for n D 1, jf .0/j D jaj  . Assume that jf n .0/j  for
2 2
n D k 1 (k  2), then for n D k,
 2
k k 1 2 1 1 1
jf .0/j D jf .0/j C a  C D :
2 4 2
Lecture Notes on Mathematical Olympiad 129

(ii) When 2  a < 0, it can be obtained that jf n .0/j  jaj  2; n 2 N.


In fact, for n D 1, jf 1 .0/j D jaj. Assume that jf n .0/j  jaj for
n D k 1 (k  2), then for n D k,

a2 C a  .f k 1
.0//2 C a D f k .0/  a D jaj:

Note that 2  a < 0 ) a2  2a ) a2 C a  a D jaj, so


Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

jf k .0/j  jaj.
 
1
Thus, we have proven that 2;  M.
4
1
(iii) When a > , let an D f n .0/; n 2 N, then
4
by 217.174.237.134 on 09/27/15. For personal use only.

1
an  a > ; n 2 N;
4
and anC1 D f nC1 .0/ D f .f n .0// D f .an / D an2 C a. For any
n  1,

1 2
 
2 1 1
anC1 an D an an C a D an Ca a ;
2 4 4

hence
n  
X 1
anC1 a D anC1 a1 D .akC1 ak /  n a :
4
kD1

2 a
Hence, for n large enough such that n > 1
, we have
a 4
 
1
anC1  n a Ca>2 a C a D 2 ) a … M:
4
 
1
Combining (i), (ii), (iii), we conclude that M D 2; .
4
4: We prove the conclusion by induction on n.
1
When n D 1, since  4.1 x2 / , .2x2 1/2  0,
x2
1 x1 1
C  C 4x1.1 x2 /
x1  x2 x1 
1
D2 C 2x1 4x1 x2  4 4x1 x2 D 4.1 x1 x2 /:
2x1
130 Solutions to Testing Questions

Assuming that the given inequality holds for n D k, i.e., for any positive
numbers x1 ; x2 ; : : : ; xkC1

1 x1 x1 x2 x1 x2    xk
C C CC  4.1 x1x2    xkC1 /;
x1 x2 x3 xkC1

then
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

1 x2 x2 x3 x2 x3    xkC1
C C CC  4.1 x2 x3    xkC2 /;
x2 x3 x4 xkC2

so that for n D k C 1,
1 x1 x1 x2 x1x2    xkC1
by 217.174.237.134 on 09/27/15. For personal use only.

C C CC
x1 x2  x3 xkC2 
1 1 x2 x2 x3    xkC1
D C x1 C CC
x1 x2 x3 xkC2 
1 1
 C 4x1 .1 x2x3    xkC2 / D 2 C 2x1 4x1 x2    xkC2
x1 2x1
 4 4x1x2    xkC2 D 4.1 x1 x2    xkC2 /:

Hence the inequality is proven for n D k C 1. item[5: ] a1 D 2; anC1 D


a1 a2    an C 1 ) an  2 and a1 a2    an  2n for all n 2 N. We first
prove the following proposition Pn for n 2 N by induction on n:
 
1 1 1 1
1 C CC D : ./
a1 a2 an a1 a2    an

1 1
(i) When n D 1, then a1 D 2 ) 1 D , () is true.
a1 a1
(ii) Assume that () is true for n D k (k  1). Since akC1 D
a1 a2    ak C 1,
 
1 1 1 1 1
1 C CC D
a1 a2 akC1 a1 a2    ak akC1
akC1 a1 a2    ak 1
D D ;
a1 a2    akC1 a1 a2    akC1

so () holds also for n D k C 1.


1
Combining (i), (ii) and that a1 a2    an  , it follows that
2n
 
1 1 1 1 1
1 C CC D  n:
a1 a2 an a1 a2    an 2
Lecture Notes on Mathematical Olympiad 131

Therefore for all n 2 N,


1 1 1 1 1 1 1
C CC 1 n
D C C C n:
a1 a2 an 2 2 4 2

6: Use induction on n. When n D 1, 31 > 14 is true.


2
Assume that when n D k (k  1), 3k > .kŠ/4 holds. Below we show that
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

2
3.kC1/ > Œ.k C 1/Š4 .
2 2
Since 3.kC1/ D 3k  32kC1 and Œ.k C 1/Š4 D .kŠ/4 .k C 1/4 , it suffices to
show that
32kC1  .k C 1/4 ; k 2 N:
by 217.174.237.134 on 09/27/15. For personal use only.

Use induction again. For k D 1, it is clear that 33 D 27 > 24 D 16.


Assume that for k D j , 32j C1 > .j C 1/4 holds. Then for k D j C 1,

.j C 2/4
32j C3  .j C 2/4 , 32  32j C1   .j C 1/4 ;
.j C 1/4

.j C 2/2
and so it suffices to show 3  for j 2 N. This is true since
.j C 1/2

.j C 2/2
3 , 3j 2 C 6j C 3  j 2 C 4j C 4 , 2j 2 C j  1;
.j C 1/2
and the last inequality is obviously true for j 2 N. Thus, the inductive
proof is completed.
7: First we prove by induction on t that if r C s D t is odd, where r; s 2 N0 ,
then ra C sb 2 S .
When t D 1, the conclusion is obvious.
Assume that the conclusion is true when t D 2k 1 (k  1), then for
t D 2k C 1, one of r; s is  2. Say r  2. By induction assumption,
.r 2/a C sb 2 S . By taking x D .r 2/a C sb; y D z D a, then the
condition (ii) yields

ra C sb D x C y C z 2 S;

the conclusion is proven.


We now return to the original problem. Since .a; b/ D 1, for any integer
c > 2ab, there exist integers r; s 2 N0 such that ra C sb D c, where r; s
are given by
r D r0 C bt; s D s0 at; .t 2 Z/:
132 Solutions to Testing Questions

By letting t D t1 and t2 D t1 C 1 such that r1 D r0 C t1 b 2 Œ0; b/ and


r2 D r0 C t2 b 2 Œb; 2b/, then
 
c r1 a c ab c c r2 a c 2ab
s1 D 2 ; ) s1 > a; s2 D > >0
b b b b b
) .r2 C s2/ D .r1 C s1 / C .b a/
) .r1 C s1/ and .r2 C s2 / have different parities;
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

so it is possible to select one value from t1 and t2 such that ri C ti is odd.


Then c D ri a C si b 2 S is proven as before.

8: In order to apply induction, we generalize the result to be proved so that it


reads as follows:
by 217.174.237.134 on 09/27/15. For personal use only.

Proposition. If the n-element subsets of a set S with .nC1/m 1 elements


are partitioned into two classes, then there are at least m pairwise disjoint
sets in the same class.
Proof. Fix n and proceed by induction on m. The case of m D 1 is trivial.
Assume m > 1 and that the proposition is true for m 1. Let P be the
partition of the n-element subsets into two classes. If all the n-element
subsets belong to the same class, the result is obvious. Otherwise select two
n-element subsets A and B from different classes so that their intersection
has maximal size. It is easy to see that jA \ Bj D n 1. (If jA \ Bj D k <
n 1, then build C from B by replacing some element not in A \ B with an
element of A not already in B. Then jA \ C j D k C 1 and jB \ C j D n 1
and either A and C or B and C are in different classes.) Removing A [ B
from S , there are .n C 1/.m 1/ 1 elements left. On this set the partition
induced by P has, by the inductive hypothesis, m 1 pairwise disjoint sets
in the same class. Adding either A or B as appropriate gives m pairwise
disjoint sets in the same class.
Remark: The value n2 C n 1 is sharp. A set S with n2 C n 2 elements
can be split into a set A with n2 1 elements and a set B of n 1 elements.
Let one class consist of all n-element subsets of A and the other consist
of all n-element subsets that intersect B. Then neither class contains n
pairwise disjoint sets.

Testing Questions (16-B)

2n
X
1: Let Pn be the statement: . 1/i ai bi  0, where n D 1; 2; : : :.
i D0
Lecture Notes on Mathematical Olympiad 133

For n D 1, from the given conditions that a0 C a1  0; a1 C a2  0; a1 


0; b0 > 0; b2 > 0 and b0 C b1 C b2 > 0, it follows that

2n
X
. 1/i ai bi D a0 b0 a1 b1 C a2 b2
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

i D0
D b0.a0 C a1 / a1 .b0 C b1 C b2 / C b2 .a1 C a2 /  0;
by 217.174.237.134 on 09/27/15. For personal use only.

and the equality holds if and only if a0 C a1 D a1 D a1 C a2 D 0,


namely, a0 D a1 D a2 D 0. Thus, P1 is proven.

Assume that Pk is true. Then for PkC1 , from the conditions a2kC1 C
a2kC2  0; b2kC2 > 0; a2k C a2kC1  0; a2kC1  0, it follows that
a2kC2  a2kC1 and a2k  a2kC1  0. Therefore
2kC2
X 2k
X1
. 1/i ai bi D . 1/i ai bi C a2k b2k a2kC1 b2kC1 C a2kC2 b2kC2
i D0 i D0
2k
X1
 . 1/i ai bi C a2k b2k a2kC1 b2kC1 a2kC1 b2kC2
i D0
2k
X1
D . 1/i ai bi Ca2k b2k a2kC1 .b2kC1 Cb2kC2 /. (30.1)
i D0

(i) When b2kC1 C b2kC2  0, then a2kC1 .b2kC1 C b2kC2 /  0, so by


the induction assumption,
2kC2
X 2k
X
i
. 1/ ai bi  . 1/i ai bi  0:
i D0 i D0
134 Solutions to Testing Questions

(ii) When b2kC1 C b2kC2 < 0, a2kC1 .b2kC1 C b2kC2 /  a2k .b2kC1 C
b2kC2 /, so
2kC2
X 2k
X1
. 1/i ai bi  . 1/i ai bi C a2k .b2k C b2kC1 C b2kC2 /:
i D0 i D0

Letting ci D bi ; i D 0; 1; 2; : : : ; 2k 1 and c2k D b2k C b2kC1 C


Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

b2kC2 , then
2q 2q
X X
ci D bi > 0 if 0  p  q  k 1;
i D2p i D2p
by 217.174.237.134 on 09/27/15. For personal use only.

2q
X 2k
X1
ci D bi C b2k C b2kC1 C b2kC2 > 0 if 0  p  q D k:
i D2p i D2p

Therefore c1 ; c2; : : : ; c2k satisfy the condition (iii) still, hence, from
the induction assumption,

2k
X1 2k
X
. 1/i ai bi C a2k .b2k C b2kC1 C b2kC2 / D . 1/i ai ci  0:
i D0 i D0

2kC2
X
It is clear that a0 D a1 D    D a2kC2 D 0 ) . 1/i ai bi D 0. Con-
i D0
2kC2
X 2k
X
versely, if . 1/i ai bi D 0, then in either case it implies . 1/i ai bi D
i D0 i D0
2k
X
0 or . 1/i ai ci D 0. Hence, by the induction assumption, a0 D a1 D
i D0
   D a2k D 0. Now a2k C a2kC1  0 and a2kC1  0 together imply that
a2kC1 D 0. a2kC2 b2kC2 D 0 and b2kC2 > 0 then imply that a2kC2 D 0,
therefore
a0 D a1 D    D a2kC2 D 0
is the sufficient and necessary condition for equality to hold.
Thus, PkC1 is true and so by induction, Pk is true for all k 2 N.

2: The proof is by induction on n. The base is provided by the n D 0 case,


0
where 77 C 1 D 71 C 1 D 23 . To prove the inductive step, it suffices to
show that if x D 72m 1 for some positive integer m then .x 7 C 1/=.x C 1/
Lecture Notes on Mathematical Olympiad 135

is composite. As a consequence, x 7 C 1 has at least two more prime factors


than does x C 1. To confirm that .x 7 C 1/=.x C 1/ is composite, observe
that

x7 C 1 .x C 1/7 ..x C 1/7 .x 7 C 1//


D
xC1 xC1
6 7x.x 5 C 3x 4 C 5x 3 C 5x 2 C 3x C 1/
D .x C 1/
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

xC1
D .x C 1/6 7x.x 4 C 2x 3 C 3x 2 C 2x C 1/
D .x C 1/6 72m .x 2 C x C 1/2
D f.x C 1/3 7m .x 2 C x C 1/gf.x C 1/3 C 7m .x 2 C x C 1/g:
by 217.174.237.134 on 09/27/15. For personal use only.

It remains
p to show that each factor exceeds 1. It suffices to check the smaller
one. 7x  x gives
p
.x C 1/3 7m .x 2 C x C 1/ D .x C 1/3 7x.x 2 C x C 1/
 x C 3x C 3x C 1 x.x 2 C x C 1/
3 2

D 2x 2 C 2x C 1  113 > 1:

Hence .x 7 C 1/=.x C 1/ is composite and the proof is complete.

1 19
3: (i) For n D 1; 2 and 3, we have a1 > > and
12 243
r r
19 10 10 7
a2 > 3 C1D ; a3 > 4 C1D ;
243 9 9 3

2
so an > n is true for n D 1; 2; 3. For n  3 we prove the proposition
n
2
by induction on n. Let Pn be the proposition: an > n .
n
s  
2
Assume Pk is true (k  3), then akC1 > .k C 2/ k C 1 implies
k
s  
2 2
PkC1 is true if .k C 2/ k C 1 > .k C 1/ . Since
k kC1
s  
2 2 1 1 1
.k C 2/ k C 1 > .k C 1/ , > C
k kC1 2 k .k C 1/2

and the last inequality is obvious for k  3, PkC1 is proven.


136 Solutions to Testing Questions

(ii) When a1 < 1, it follows by induction that an < n and bn < 0 for
an n anC1 .n C 1/
n 2 N. Below we prove that bn < bnC1 , i.e., < .
2n nC1
2
anC1 .n C 1/ anC1 .n C 1/2 .n C 2/an C 1 .n C 1/2
D D
nC1 .n C 1/.anC1 C n C 1/ .n C 1/.anC1 C n C 1/
.n C 2/.an n/
D ;
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

.n C 1/.anC1 C n C 1/
so
1 nC2
bn C 1 < bnC1 , >
2n .n C 1/.anC1 C n C 1/
2
by 217.174.237.134 on 09/27/15. For personal use only.

, .n C 1/anC1 > 2n.n C 2/ .n C 1/2 , anC1 > .n C 1/ ;


nC1
and the last is true from the result of (i).
When a1 > 1, then similarly we have bn > bnC1 > 0 for n 2 N. Thus,
fbn g is a monotone and bounded sequence, so it is convergent.
4: Let hi also denote the student with height hi . We prove that for 1  i < j 
n, hj can switch with hi at most j i 1 times. We proceed by induction
on j i , the base case j i D 1 being evident because hi is not allowed
to switch with hi 1 .
For the inductive step, note that hi ; hj 1 ; hj can be positioned on the circle
either in this order or in the order hi ; hj ; hj 1. Since hj 1 and hj cannot
switch, the only way to change the relative order of these three students is
for hi to switch with either hj 1 or hj . Consequently, any two switches of
hi with hj must be separated by a switch of hi with hj 1 . Since there are
at most j i 2 of the latter, there are at most j i 1 of the former.
The total number of switches is thus at most
n
!
X1 n
X n
X1 nX
i 1 n
X1 n i
.j i 1/ D j D
2
i D1 j Di C1 i D1 j D0 i D1
n
! !! !
X1 n i C1 n i n
D D :
3 3 3
i D1

5: Yes. There exists such a sequence of moves.


Denote by .a1 ; a2 ; : : : ; an / ! .a10 ; a20 ; : : : ; an0 / the following: if some con-
secutive boxes contain a1 ; : : : ; an coins, then it is possible to perform a
series of allowed moves such that the boxes contain a10 ; : : : ; an0 coins re-
spectively, while the contents of the other boxes remain unchanged.
Lecture Notes on Mathematical Olympiad 137

2010
Let A D 20102010 . Our goal is to show that

.1; 1; 1; 1; 1; 1/ ! .0; 0; 0; 0; 0; A/:

First we prove two auxiliary observations.


Lemma 1. .a; 0; 0/ ! .0; 2k ; 0/ for every a  1.
Proof. We prove by induction that .a; 0; 0/ ! .a k; 2a ; 0/ for every
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

1  k  a. For k D 1, apply Type 1 to the first box:

.a; 0; 0/ ! .a 1; 2; 0/ D .a 1; 21; 0/:

Now assume that k < a and the statement holds for some k < a. Starting
by 217.174.237.134 on 09/27/15. For personal use only.

from .a k; 2k ; 0/, apply Type 1 to the middle box 2k times, until it becomes
empty. Then apply Type 2 to the first box:

.a k; 2k ; 0/ ! .a k; 2k 1; 2/ !    ! .a k; 0; 2kC1 /
! .a k 1; 2kC1 ; 0/:

Hence,
.a; 0; 0/ ! .a k; 2k ; 0/ ! .a k 1; 2kC1 ; 0/:
2
 2
2 22
Lemma 2. For every positive integer n, let Pn D 2 (e.g. P3 D 2 D
16). Then .a; 0; 0; 0/ ! .0; Pa ; 0; 0/ for every a  1.
Proof. Similarly to Lemma 1, we prove that .a; 0; 0; 0/ ! .a k; Pk ; 0; 0/
for every 1  k  a.
For k D 1, apply Type 1 to the first box:

.a; 0; 0; 0/ ! .a 1; 2; 0; 0/ D .a 1; P1 ; 0; 0/:

Now assume that the lemma holds for some k < a. Starting from .a
k; Pk ; 0; 0/, apply Lemma 1, then apply Type 1 to the first box:

.a k; Pk ; 0; 0/ ! .a k; 0; 2Pk ; 0/ D .a k; 0; PkC1 ; 0/
! .a k 1; PkC1 ; 0; 0/:

Therefore,

.a; 0; 0; 0/ ! .a k; Pk ; 0; 0/ ! .a k 1; PkC1 ; 0; 0/:

2
Now we prove the statement of the problem.
138 Solutions to Testing Questions

First apply Type 1 to box 5, then apply Type 2 to boxes B4; B3 ; B2 and B1
in this order. Then apply Lemma 2 twice:

.1; 1; 1; 1; 1; 1/
! .1; 1; 1; 1; 0; 3/ ! .1; 1; 0; 3; 0; 0/ ! .1; 0; 3; 0; 0; 0/
! .0; 3; 0; 0; 0; 0/ ! .0; 0; P3 ; 0; 0; 0/ D .0; 0; 16; 0; 0; 0/
! .0; 0; 0; P16; 0; 0/:
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

We already have more than A coins in box B4 , since


20102010 2010 2010 2011
A  20102010 < .211 /2010 D 2112010 < 22010
11 /2011 112011 215
< 2.2 D 22 < 22 < P16 :
by 217.174.237.134 on 09/27/15. For personal use only.

To decrease the number of coins in box B4 , apply Type 2 to this stack re-
peatedly until its size decreases to A=4. (In every step, we remove a coin
from B4 and exchange the empty boxes B5 and B6 .)
Finally, apply Type 1 repeatedly to empty boxes B4 and B5 :

.0; 0; 0; A=4; 0; 0/ !    ! .0; 0; 0; 0; A=2; 0/ !    ! .0; 0; 0; 0; 0; A/:

Solutions to Testing Questions 17


Testing Questions (17-A)

1: Since S5 D 5a3 and S9 D 9a5 , so 5a3 D 9a5 , i.e., a3 W a5 D 9 W 5. The


answer is (A).
2: Let d be the common difference of fan g. Then
2
3a8 D 5a13 ) 3.a1 C 7d / D 5.a1 C 12d / ) d D a1 < 0;
39
so fan g is a monotonously decreasing A.P.. Since
 
2
an > 0 ) a1 C .n 1/ a1 > 0 ) n < 20:5;
39
S20 is the largest partial sum among those listed. The answer is (C).
3: For n D 1, a1 D 1 C 3 C 4 D 8, and for n  2,

an D Sn Sn 1 D n2 C 3n C 4 .n 1/2 3.n 1/ 4 D 2n C 2;
Lecture Notes on Mathematical Olympiad 139

therefore a2k 1 D 2.2k 1/ C 2 D 4k for k  2, hence


a1 C a3 C a5 C    C a21 D 8 C 4.2 C 3 C    C 11/ D 268:

4: Since all terms of the sequence are positive, d > 0.


Suppose that c r D ai ; c s D aj , where ai ; aj are two terms of the sequence,
c is an integer > 1, r < s; i < j . Let t D s r , then c s c r D c r .c t 1/.
Therefore c r .c t 1/ D aj ai is a multiple of d . For c r Ck t , we have
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

c r Ck t c r D c r .c k t 1/ D c r .c t 1/.c .k 1/t
C    C 1/
which is a multiple of d , therefore the terms of the form c r Ck t are terms in
the sequence. Thus, there is a geometric progression fbn g with bn D b0 q n ,
where b0 D c r ; q D c t D c s r .
by 217.174.237.134 on 09/27/15. For personal use only.

5: Let a D x.y z/, then aq D y.z x/; aq 2 D z.y x/. Therefore


a C aq D x.y z/ C y.z x/ D z.y x/ D aq 2 ) 1 C q D q 2 ;
p
1˙ 5
so q D .
2
6: Write an D a  r n ; n  0. First of all, we show that r is an integer.
r D an =an 1 is a rational number. Let r D ˇ˛ with ˛; ˇ 2 N; .˛; ˇ/ D 1.
It suffices to show ˇ D 1. Otherwise, there exists a prime p which divides
ˇ. Then, for sufficiently large n, an D a  ˛ n =ˇ n is not an integer.
If 4 j ak for some k 2 N, then 4 j an for n  k. Therefore 4 − a0 and
4 − a1 . It’s clear that r ¤ 1 (otherwise, all an D 2004).
Suppose that ak D 2004, i.e. ak D ar k D 2004 D 22  3  167. Since
k  2, if k > 2, then r D 1, it’s impossible. Therefore k D 2 and r D 2,
a D 3  167 D 501.
Thus, an D 501  2n .
7: When n D 1, we have a0 a1 C a1 a0 D a12 , so a1 D 2a0 . When n D 2, then
a22 D 2a0a2 C 2a12 D 2a0 a2 C 8a02 ) .a2 4a0 /.a2 C 2a0/ D 0:
Since a2 C 2a0 > 0, so a2 D 4a0 D 2a1 . Below by induction on n we
prove that
an D 2n a0 ; n D 0; 1; 2; : : : :
For n D 0; 1; 2, the conclusion is true by the above proofs. Assume that the
conclusion is true for all n  i , then for n D i C 1,
i C1
! i
!
2
X i C1 i C1 2
X i C1
ai C1 D ak ai C1 k D 2a0 ai C1 C 2 a0
k k
kD0 kD1
D 2a0 ai C1 C 2i C1 a02 .2i C1 2/;
140 Solutions to Testing Questions

which yields .ai C1 2i C1 a0 /Œai C1 C.2i C1 2/a0  D 0, so ai C1 D 2i C1 a0 .


Thus, the conclusion is true for n D i C1. The inductive proof is completed,
and it is proven that fan g is a G.P. of initial term a0 and common ratio 2.

Testing Questions (17-B)


Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

1: (i) .1 p/Sn D p pan and .1 p/SnC1 D p panC1 yields

.1 p/anC1 D panC1 C pan ) anC1 D pan :


by 217.174.237.134 on 09/27/15. For personal use only.

Let n D 1, then .1 p/a1 D p pa1 gives a1 D p. Therefore fan g is a


G.P. such that its initial term and common ratio are both p, hence an D p n .
Then
p.p n 1/
Sn D ;
n
 p 1n 
n n
 
1 C 1 a1 C 2 a2 C    C n
an D 1 C 1
p C    nn p n D .1 C p/n :

Hence
n
  n

1C 1
a1 Ca2 C    C nn an
2 p 1 .p C 1/n
f .n/ D D  n n ;
2n Sn p 2 .p 1/
p 1 .p C 1/nC1
f .n C 1/ D  nC1 nC1 ;
p 2 .p 1/
pC1 p 1 .p C 1/nC1
f .n/ D  nC1 nC1 ;
2p p 2 .p p/
pC1
* p > 1; ) f .n C 1/ < f .n/; for n 2 N:
2p

pC1
(ii) The given inequality is clear for n D 1 since f .1/ D . For
2p
n  2, from (i),
 n 1  n
pC1 p C1 pC1
f .n/ < f .n 1/ <    <  f .1/ D :
2p 2p 2p
2n
" #
X1 2n
X1 
p C1 k

pC1

pC1
2n 1
Thus, f .k/  D  1 ,
2p p 1 2p
kD1 kD1
where the equality holds if and only if n D 1.
Lecture Notes on Mathematical Olympiad 141

On the other hand, if n  2 and k D 1; 2; : : : ; 2n 1,


" #
p 1 .p C 1/k .p C 1/2n k
f .k/ C f .2n k/ D C 2n k 2n k
p 2k .p k 1/ 2 .p 1/
s
p 1 .p C 1/k .p C 1/2n k
 2 
p 2k .p k 1/ 22n k .p 2n k 1/
s
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

p 1 2.p C 1/n 1
D  n k
p 2 .p 1/.p 2n k 1/
s
p 1 2.p C 1/n 1
D  /:
p 2n .p 2n p k p 2n k C 1
by 217.174.237.134 on 09/27/15. For personal use only.

Since p k C p 2n k
 2p n ) p 2n pk p 2n k
C 1  p 2n 2p n C 1 D
.p n 1/2 ,
p 1 2.p C 1/n
f .k/ C f .2n k/   D 2f .n/;
p 2n .p n 1/
where the equality holds if and only if k D n. Thus,
2n
X1 2n 1 2n
X1
1 X
f .k/ D Œf .k/ C f .2n k/  f .n/ D .2n 1/f .n/:
2
kD1 kD1 kD1

1
2: (i) When n D 1, a1 D 5S1 C 1 D 5a1 C 1 ) a1 D .
4
For n  1,
anC1 1
anC1 an D 5SnC1 C 1 5Sn 1 D 5anC1 ) D ;
an 4
1 1
therefore fan g is a G.P. with a1 D and common ratio r D . Thus,
4 4
1 4 C . 1/n 41n 5
an D . 1/n ; bn D D4C :
4n 1 C . 1/nC1 41n . 4/n 1

(ii) Based on the result of (i),


5 5
b2k 1 C b2k D 8C C
. 4/2k 1
. 1 4/2k 1
5
20
D 8C k
16 1 16k C 4
15  16k 40
D 8 < 8:
.16k 1/.16k C 4/
142 Solutions to Testing Questions

For n D 2m; m 2 N,

Rn D .b1 C b2 / C .b3 C b4 / C    C .b2m 1 C b2m / < 8m D 4n:

For n D 2m 1; m 2 N,

Rn D .b1 C b2 / C .b3 C b4/ C    C .b2m 3 C b2m 2/ C b2m 1


< 8.m 1/ C 4 D 4n:
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

Thus, there is no k 2 N such that Rk  4k.


5
(iii) Based on bn D 4 C , it follows that
. 4/n 1
by 217.174.237.134 on 09/27/15. For personal use only.

5 20 25  16n
cn D b2n b2n 1 D C D
16n 1 16n C 4 .16n 1/.16n C 4/
25  16n 25
< D n:
.16n /2 16
13 13 4 3
Since b1 D 3; b2 D ) c 1 D b2 b1 D 3D , so T1 < .
3 3 3 2
For n  2,
  1
4 1 1 1 4 25  162
Tn < C 25 2
C 3
C    C n
< C 1
3 16 16 16 3 1 16
69 3
D < :
48 2

3: For k D 1, there is nothing to prove. Henceforth assume k  2.


Let p1 ; p2; : : : ; pk be k distinct primes such that

k < pk <    < p2 < p1

and let N D p1 p2    pk . By the Chinese Remainder Theorem, there exists


a positive integer x satisfying

x i .mod pi /

for all i D 1; 2; : : : ; k and x > N 2 . Consider the following sequence :

x C1 xC2 xCk
; ; :::; :
N N N
This sequence is obviously an arithmetic sequence of positive rational num-
bers of length k. For each i D 1; 2; : : : ; k, the numerator x C i is divisible
Lecture Notes on Mathematical Olympiad 143

by pi but not by pj for j ¤ i . Otherwise, pj divides ji j j, which is not


possible because pj > k > ji j j. Let
xCi N
ai WD ; bi WD for all i D 1; 2; : : : ; k:
pi pi
Then
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

xCi ai
D ; gcd.ai ; bi / D 1 for all i D 1; 2; : : : ; k;
N bi
and all bi ’s are distinct from each other. Moreover, x > N 2 implies
xCi N2 N
ai D > >N > D bj for all i; j D 1; 2; : : : ; k
by 217.174.237.134 on 09/27/15. For personal use only.

pi pi pj
and hence all ai ’s are distinct from bi ’s. It only remains to show that all
ai ’s are distinct from each other. This follows from
xCj xCi x Ci
aj D > > D ai for all i < j
pj pj pi
by our choice of p1 ; p2 ; : : : ; pk . Thus, the arithmetic sequence
a1 a2 ak
; ;:::;
b1 b2 bk
of positive rational numbers satisfies the conditions of the problem. 2

Remark. Here is a much easier solution :

For any positive integer k  2, consider the sequence


.kŠ/2 C 1 .kŠ/2 C 2 .kŠ/2 C k
; ;:::; :
kŠ kŠ kŠ
Note that gcd.kŠ; .kŠ/2 C i / D i for all i D 1; 2; : : : ; k. So, taking
.kŠ/2 C i kŠ
ai D ; bi D for all i D 1; 2; : : : ; k;
i i
we have gcd.ai ; bi / D 1 and
.kŠ/2 C i .kŠ/2 C j kŠ kŠ
ai D > aj D > bi D > bj D
i j i j
for any 1  i < j  k. Therefore this sequence satisfies every condition
given in the problem.
144 Solutions to Testing Questions

4: Suppose that there is an A.P. consisting of 40 distinct positive integers, such


that each term is in the form 2k C3l . Let it be a; aCd; aC2d; : : : ; aC39d ,
where a; d are positive integers. Let

m D blog2 .a C 39d /c; n D blog3 .a C 39d /c:

First we show that among a C 26d; a C 27d; : : : ; a C 39d there is at most


one term which is not able to be expressed in the form 2m C 3l or the form
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

2k C 3n , where k; l are nonnegative integers.


If among them the term a C hd cannot be expressed in 2m C 3l or 2k C 3n ,
by assumption, there must be nonnegative integers b and c such that

a C hd D 2b C 3c :
by 217.174.237.134 on 09/27/15. For personal use only.

The definition of m and n implies that b  m; c  n. Since a C hd cannot


be expressed as 2m C 3l or 2k C 3n , so b  m 1 and c  n 1.
If b  m 2, then
1 m 1 n 7
a C hd  2m 2
C 3n 1
D 2 C 3  .a C 39d / < a C 26d;
4 3 12
a contradiction.
If c  n 2, then
1 m 1 n 11
a C hd  2m 1
C 3n 2
D 2 C 3  .a C 39d / < a C 26d;
2 9 18
a contradiction. Hence b D m 1; c D n 1, i.e., there is at most one
term among a C 26d; a C 27d; : : : ; a C 39d that it cannot be expressed as
2m C 3l or 2k C 3n .
Thus, among the 14 numbers, at least 13 of them can be expressed as 2m C3l
or 2k C3n . According to the pigeonhole principle, at least 7 numbers belong
to the same kind of expression. We have two possible cases as follows.
Case 1: There are seven numbers of the form 2m C 3l . Suppose that
they are 2m C 3l1 ; 2m C 3l2 ; : : : ; 2m C 3l7 , where l1 < l2 <    < l7 ,
then 3l1 ; 3l2 ; : : : ; 3l7 are seven terms of 14 terms in an A.P. with common
difference d . However,
 
l7 l1 5 1
13d  3 3  3  3l2 > 13.3l2 3l1 /  13d;
3
a contradiction.
Case 2: There are seven numbers of the form 2k C 3n . Suppose that
they are 2k1 C 3n ; 2k2 C 3n ; : : : ; 2k7 C 3n , where k1 < k2 <    < k7 ,
Lecture Notes on Mathematical Olympiad 145

then 2k1 ; 2k2 ; : : : ; 2k7 are seven terms of 14 terms in an A.P. with common
difference d . However,
 
k7 l1 5 1
13d  2 2  2  2k2 > 13.2k2 2k1 /  13d;
2

a contradiction. Thus, the assumption is wrong, and the proposition is true.


Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

Solutions to Testing Questions 18


Testing Questions (18-A)
by 217.174.237.134 on 09/27/15. For personal use only.

p b2 1
1: Let bn D 1 C 4an ; n  1, then an D n , and so
4
2
bnC1 1 b2 1
D1C n 2
C bn ) bnC1 D .bn C 2/2
4 4 p
) bnC1 D bn C 2 ) bn D 5 C 2.n 1/:

Therefore

bn2 11 p
an D Œ5 C 4 5.n 1/ C 4.n 1/2 1
D
4p 4 p
D 1 C 5.n 1/ C .n 1/2 D 1 C .n 1/.n C 5 1/:

2: (i) Letting n D 1 in the given recursive formula yields .1 b/a1 D ba1 C


4, so a1 D 4. When n  2, the difference of

.1 b/Sn D ban C 4n and .1 b/Sn 1 D ban 1 C 4n 1

yields

.1 b/an D b.an an 1/ C 3  4n 1
; namely an D ban 1 C 3  4n 1
:

an an 1 3
(i) If b D 4, then n
D n 1
C , so that
4 4 4
an a1 3
n
D C .n 1/ ) an D .3n C 1/4n 1
; n  1:
4 4 4
146 Solutions to Testing Questions

(ii) If b ¤ 4, then an D ban C 3  4n 1


1
 
3 n 3 n 1
) an C  4 D b an 1 C 4
b 4  b 4
3 3
) an C  4n D a1 C  4 bn 1
b
 4  b 4
12 3
) an D 4 C bn 1  4n for n  2:
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

b 4 b 4
 
12 3
Since a1 D 4, so an D 4 C bn 1  4n for n  1.
b 4 b 4
Thus,
by 217.174.237.134 on 09/27/15. For personal use only.


n 1
< .3n C 1/  4 ; b D 4;
 
an D 12 3
:̂ 4 C bn 1
 4n b ¤ 4:
b 4 b 4

3n C 1
(ii) When b D 4, then cn D ! 1 as n ! 1, so b ¤ 4.
4
 
4.b 1/ b n 3
When b ¤ 4, then cn D  . if b > 4, then cn ! C1
b.b 4/ 4 b 4
as n ! C1. So 0 < b < 4.
4.b 1/ 3
(i) When 0 < b < 1, > 0; > 0, so cn is decreasing
b.b 4/ b 4
and positive. Further, c1 D 1, so b 2 .0; 1/ satisfies the condition.
(ii) b D 1 ) cn D 1, so b D 1 is allowed.
4.b 1/ 3
(iii) When 1 < b < 4, then < 0; > 0, so cn is increas-
b.b 4/ b 4
3
ing. Since c1 D 1, so cn > 0. lim cn D 2,1<b
n!C1 b 4
5
.
2
 
5
Thus, the allowed range for b is 0; .
2
 
1
3: The given recursive formula gives anC1 D 1 C n an . By induction it is
2
easy to see that an  1 and anC1 > an for all n 2 N.
Lecture Notes on Mathematical Olympiad 147

an 1
Since anC1 an D  n , therefore for n  3,
2n 2
n 1 n 1
X X 1 1
an D a1 C .akC1 ak / > 1 C D2 :
2k 2n 1
kD1 kD1

 
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

1 3
On the other hand, Since anC1 D 1 C n an  an (the equality holds
2 2
only when n D 1), so for n  3
       n 1
1 1 1 1 3
an D 1 C 1C  1C 2 1C a1 < :
2n 1 2n 2 2 2 2
by 217.174.237.134 on 09/27/15. For personal use only.

4: Let bn D log2 an ; n  1, then b1 D 0; b2 D 1 and bn D bn 1 C bn 2 for


n  3. Let ˛; ˇ be the real roots of the characteristic equation x 2 C x 1 D
0, then p p
1 5 1C 5
˛D ; ˇD ;
2 2
therefore bn D A˛ n 1 C Bˇ n 1 . Letting n D 1 and 2 in this formula leads
to
A C B D 0; A˛ C Bˇ D 1 ) A D ˛ 1ˇ ; B D ˛ 1 ˇ
˛n 1
ˇn 1 ˛n 1 ˇn 1
) bn D ) an D 2 ˛ ˇ :
˛ ˇ

1 an 1
5: Since anC2 D 1 D1 D , it follows that
anC1 an 1 an 1

1
anC3 D 1 D 1 C .an 1/ D an ;
anC2

1
so fan g is a periodic sequence with a period 3. Since a1 D 2; a2 D ; a3 D
2
1, so P3 D 1 and

P2009 D .P3 /669  P2 D . 1/669 D 1:

The answer is (B).

6: (i) By induction it is easy to see that an > 0 for all n  1. Now


anC2 a2 C 1 anC2 anC1 anC1 an anC2
D nC1 ) 2 D 2 ) D
an 2
an C 1 anC1 C 1 an C 1 anC1 C a 1 nC1
148 Solutions to Testing Questions

anC1
. Thus,
an C a1n

anC1 an a2 2
D D  D D D 1;
an C a1n an 1 C 1
an 1 a1 C 1
a1 1 C 1
1

1
hence anC1 D an C ; n  1.
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

an
1 1
(ii) a1 D 1 and anC1 D an C an imply an  1 and 0 <  1; n  1.
an2
For n  2,
 2
by 217.174.237.134 on 09/27/15. For personal use only.

1 1
an2 D an 1 C D an2 1 C C2
an 1 an2 1

implies 2 < ak2 ak2 1  3; k  2. Hence, by adding them up for k from 2


to n yields

2.n 1/ < an2 a12  3.n 1/ ) 2n 1 < an2  3n 2


2
) 4015 < a2008  6022 ) 632 < a2008
2
< 782

since 632 D 3969 < 4015 and 782 D 6084 > 6022. Thus, 63 < a2008 <
78.
7: (i) We use induction. The given recursive formula gives anC1 C 1 D
an .an C 1/.
For n D 1, a1 D 3 ) a1  3 .mod 4/.
Assume that an  3 .mod 4/ (n  1), i.e., an D 4k C 3 for some k 2 Z.
Then

anC1 D an .an C 1/ 1 D 4.4k C 3/.k C 1/ 1  3 .mod 4/:

The inductive proof is completed.


(ii) By using anC1 C 1 D an .an C 1/ repeatedly, it follows that

anC1 C 1 D an .an C 1/ D an an 1 .an 1 C 1/ D    D 4an an 1    a2 a1 :

Therefore am j .an C 1/ for m < n. Let .am ; an / D d . Then d j 1, so


d D 1.
8: (i) By solving the equation t 2 4t C 4 D 0, it is obtained that

˛ D ˇ D 2;
Lecture Notes on Mathematical Olympiad 149

therefore an D .A C Bn/2n . Letting n D 1 and 2 respectively yields


1
2.A C B/ D 1 and 2.A C 2B/ D 3 ) A D ; B D 1;
2
therefore an D .2n 1/2n 1
; n 2 N.
Xn Xn n
X
(ii) Sn D .2k 1/2k 1
D k2k 2k 1
DT G, where
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

kD1 kD1 kD1


n
X n
X nC1
X
T D k  2k ) 2T D k  2kC1 D .k 1/2k
kD1 kD1 kD2
n
X
k nC1 n
) T D 2 n2 D 2.2 1/ n  2nC1 D .1 n/2nC1 2
by 217.174.237.134 on 09/27/15. For personal use only.

kD1
) T D .n 1/2nC1 C 2:
n
X
GD 2k 1 D 2n 1;
kD1
) Sn D T G D .n 1/2nC1 C 2 2n C 1 D .2n 3/  2n C 3:

Testing Questions (18-B)

2.2 C an 1/ 1 an 1
1: an C 2 D and an 1D lead to
1 C an 1 1 C an 1
an C 2 an 1 C2
D . 2/  ; n  2:
an 1 an 1 1
By repeatedly applying the recursive relation, it follows that
an C 2 1 a1
C2 . 2/n C 2
D . 2/n D . 2/n ) an D
an 1 a1 1 . 2/n 1
. 2/n C 2
for n  2. Since a1 D 0 satisfies it also, an D ; n  1.
. 2/n 1
4an 1 1 1 1
2: (i) anC1 D ) D C ) bnC1 D bn , where
2an C 1 anC1 2 4an 4
1 2 11 2 1
bn D ; n  1. Thus, b1 D D and fbn g is a G.P. with
an 3 12 3 4
1
initial and common ratio both being . Therefore
4
1 1 2 1 3  4n
bn D n ) D C n ) an D :
4 an 3 4 2  4n C 3
150 Solutions to Testing Questions

Since an > 0, for any x > 0,


   
3 3 3 3 3 3 6 6
x D C x
2 C x .2 C x/2 4n 2C x .2 C x/2 4n 3 3
3 9 1 2 2 x
D C C
2 C x .2 C x/2 4n 3 3
 3
3 9 1 xC2 1 9 6
D D  C
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

2 C x .2 C x/2  an 3 an .x C 2/2 xC2


2
1 3
D an C an  an :
an x C 2
(ii) Based on the resulting inequality, for any x > 0
n   
by 217.174.237.134 on 09/27/15. For personal use only.

X 3 3 3
a1 C a2 C    C an  x
2 C x .2 C x/2 4k
kD1 !
n
3n 3 X 3
D nx :
2 C x .2 C x/2 4k
kD1
n 3 1  
1X 3 4
.1 4n
/ 1 1
Taking x D D 1
D 1 , we have
n 4k n.1 4
/ n 4n
kD1

3n 3n2 3n2
a1 C a2 C    C an  1 1
D 1
> :
2 C n .1 4n
/ 2n C 1 4n
2n C 1

3: By induction it is clear that xn > 0 for all n 2 N. Simplifying the given


recurrence,
q
xn2 1 C 4xn 1 C xn 1
xn D ) .2xn xn 1 /2 D xn2 1 C 4xn 1
2
1 1 1
) xn2 xn xn 1 D xn 1 ) D 2:
xn 1 xn xn
n n    
X 1 1 X 1 1 1 1
Then yn D 2
D 2C D 4C 2 D6 .
x
i D1 i
x1 i D2 xi 1 xi xn xn
1
Since x1 D and
2
q q
xn2 1 C 4xn 1 C xn 1 xn2 1 C xn 1
xn D > D xn 1 ;
2 2
so xn2C 4xn 1 > xn2 1 C 2xn 1 C 1 D .xn 1 C 1/2 , therefore xn >
1
1 1
xn 1 C . Thus, lim D 0 and lim yn D 6.
2 n!C1 xn n!C1
Lecture Notes on Mathematical Olympiad 151

4: Considering 1 C .2006/.2008/.1/ D 20072 , let a D 1; b D 2008. Below we


prove the proposition Pn by induction:

1 C 2006xnC1 xn D .xnC1 xn /2 ; n D 1; 2; : : : :

When n D 1, 1 C 2006x2x1 D 1 C 2006  2008 D 20072 D .x2 x1 /2 , so


P1 is true.
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

Assume that Pk is true (k  1), i.e., 1 C 2006xkC1 xk D .xkC1 xk /2 ,


then for n D k C 1,

1 C 2006xkC2 xkC1
D 1 C 2006xkC1.2008xkC1 xk /
D 20072xkC1
2 2
by 217.174.237.134 on 09/27/15. For personal use only.

xkC1 2006xkC1 xk C 1
2 2 2
D 2007 xkC1 5012xkC1xk C 2006xkC1xk C 1 xkC1
2 2 2 2
D 2007 xkC1 5012xkC1xk C .xkC1 xk / xkC1
D 20072xkC1
2
5014xkC11xk C xk2
D .2007xkC1 xk /2 D .xkC2 xkC1 /2

hence PkC1 is also true, and so the inductive proof is completed.


5: (i) By induction, it’s easy to see that each ai is odd for i  0. Let .ak ; an / D
m for some k < n. Below we show that m D 1.

an D 2 C a0 a1    ak    an 1 ) m j 2:
Since ak ; an are both odd, so m is odd, therefore m D 1.
(ii) Since a0 a1    an 2 D an 1 2, so an 2 D .an 1 2/an 1 , therefore

an 1 D 1 C .an 1 2/an 1 D an2 1 2an 1 C 1 D .an 1 1/2 :

Thus,
2 n n
an 1 D .an 1 1/2 D .an 2 1/2 D    D .a0 1/2 D 22 ;
n 2007
namely an D 22 C 1: Hence a2007 D 22 C 1.
152 Solutions to Testing Questions

Solutions to Testing Questions 19


Testing Questions (19-A)

k 1 1
1: Since D for any natural number k, therefore
.k C 1/Š kŠ .k C 1/Š
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

1 1 1 1 1
sn D .1 /C. / CC. /
2Š 2Š 3Š nŠ .n C 1/Š
1
D 1 ;
.n C 1/Š
by 217.174.237.134 on 09/27/15. For personal use only.

therefore
1
1 s2001 2002Š
D 1
D 2003:
1 s2002 2003Š

2: For n  2,
r r
3 C an 3 C an 1 an an 1
anC1 an D D q q ;
2 2
2 3Can
2
C 3Ca2n 1

so a2 a1 ; a3
a2 ; : : : ; anC1 an have a same sign, i.e. fan g is monotone.
q
7
Since a1 D 4 ) a2 D 2
< a1 , so fan g is a decreasing sequence,
therefore

Sn D .a1 a2 / C .a2 a3 / C    C .an anC1 / D a1 anC1 :


q
3CanC1
Since anC2 < anC1 ) 2 < anC1 ) anC1 > 32 , so

3 5
Sn < 4 D :
2 2

3: (1) The two roots of the given equation are x1 D 3k; x2 D 2k , therefore
n n n
X X X 3n.n C 1/
S2n D .3k C 2k / D 3 kC 2k D C 2.2n 1/:
2
kD1 kD1 kD1

1 1 1 5
(2) a1 D 3; a2 D 2; a3 D 6; a4 D 4 ) T1 D ; T2 D C D .
6 6 24 24
Lecture Notes on Mathematical Olympiad 153

When n  3,
1 1 1 . 1/f .nC1/
Tn D C 2
CC
6 6  2  a5 a6 6 a2n 1 a2n
1 1 1 1
 C CC
6 24 a5a6 a2n 1 a2n 
1 1 1 1 1 1 1
 C C CC n 2 >
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

6 24 24 2 4 2 6
and
5 1 1 . 1/f .nC1/
Tn D CC
24 32  23 a
7 a8 a2n 1 a2n
5 1 1 1 1
 C CC n
by 217.174.237.134 on 09/27/15. For personal use only.

24 9  23 9 24 2
5 1 1 1 5
< C  3 D :
24 9  23 9 2 24
1 5
Thus,  Tn  ; n 2 N.
6 24
n
X
4: Let Sn D a1 C a2 C a3 C  C an for n D 1; 2; 3; . For any n  1, ai C2 D
i D1
n
X
.ai C1 ai / D anC1 a1 , therefore SnC2 D anC1 C a2 . For n D 1999,
i D1
we have
S2001 D a2000 C 1001:
For finding the value of a2000 , we note that anC2 D anC1 an D .an
an 1 / an D an 1 for all n  1, i.e. an D an 3 D an 6 for all
n D 7; 8; 9;    , therefore

a2000 D a2C6333 D a2 D 1001;

and hence
S2001 D 1001 C 1001 D 2002:

5: a is even implies that A must be odd. Let A D .2k C 1/2 , then

A D .2k C 1/2 D 4k 2 C 4k C 1 D 4k.k C 1/ C 1 D 8p C 1

for some positive integer p. Hence


8p D A 1 D an C an 1 C    C a ) a.an 1
C an 2
C    C 1/ D 8p
) 8 j a.an 1 C an 2 C    C 1/:

Since an 1
C an 2
C    C 1 is odd, so 8 j a, the conclusion is proven.
154 Solutions to Testing Questions

   
1 1 1 1
6: Sn D an C D Sn Sn 1 C
2 an 2 Sn Sn 1
p
) Sn2 D Sn2 1 C 1. Since S1 D a1 D 1, so Sn2 D n; Sn D n; n 2 N.
Since
p p p p p
nC n 1<2 n< nC1C n
1 1 1
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

)p p < p < p p
nC1C n 2 n nC n 1
p p 1 p p
) nC1 n< p < n n 1
2 n
100 100
p 1X 1 X p p 1
) 101 1 < < . n n 1/ C
2 Sk 2
by 217.174.237.134 on 09/27/15. For personal use only.

kD1 kD2 $ 100 %


100
X 1 1 X 1
) 18 < < 2.9 C / D 19 ) D 18:
Sk 2 Sk
kD1 kD1

7: From the given assumptions we have

a0 Ca1 C  Can D 21 and a0 Ca1 .25/C  Can .25/n D 78357:

Therefore 0  ai  21 for 0  i  n and a0 is the remainder of 78357


when it is divided by 25, i.e., a0 D 7. Similarly, from

a1 C    C an D 14 and a1 C    C an .25/n 1
D 3134;

a1 is the remainder of 3134 when it is divided by 25, therefore a1 D 9.


Next, from

a2 C a3 C    C an D 5 and a2 C a3 .25/ C    C an .25/n 2


D 125

we have a2 D 0. Finally, from

a3 C    C an D 5 and a3 C a4 .25/ C    C an .25/n 3


D5

we obtain a3 D 5 and ak D 0 for all k > 3. Thus

f .x/ D 7 C 9x C 5x 3

and f .10/ D 5097.


  n
1 1 1 1 2 X1
8: Since D C , so an D .
k.n C 1 k/ nC1 k nC1 k nC1 k
kD1
Lecture Notes on Mathematical Olympiad 155

Hence, for any positive integer n  2,


n nC1
1 1 X1 1 X1
.an anC1 / D
2 nC1 k nC2 k
kD1 kD1
 X n
1 1 1 1
D
nC1 nC2 k .n C 1/.n C 2/
kD1
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

n
!
1 X1
D 1 > 0;
.n C 1/.n C 2/ k
kD1

namely anC1 < an , as desired.


by 217.174.237.134 on 09/27/15. For personal use only.

9: We prove the conclusion by induction on n. For n D 1, we have f .1/ D 2.


  
For k  1 we have nC1Ck
k
D nCk
k 1
C nCk
k
, so

f .n C 1/
nC1
! nC1
! nC1
!
X nC1Ck k
X nCk
k
X nCk
k
D 2 D1C 2 C 2
k k 1 k
kD0 ! kD1 ! kD1
n
1 X nCi C1 i 2n C 1
D 2 C 2 n 1 C f .n/
2 i nC1
i D0
1
D f .n C 1/ C f .n/;
2
that is, f .n C 1/ D 2f .n/ D 2nC1 .
10 The sequence fan gn1 is

21; 90; 11; 1; 12; 13; 25; 38; 63; 1; 64; 65; 29; 94; 23; 17; 40;   

and the sequence of the remainders of an2 when it is divided by 8 is

1; 4; 1; 1; 0; 1; 1; 4; 1; 1; 0; 1; 1; 4; 1; 1; 0;    :

Thus, the sequence is periodic and 6 is its period. From 1 C 4 C 1 C 1 C


0 C 1  0 (mod 8) and 2005 D 6  334 C 1, we find that the remainder of
a12 C a22 C    C a2005
2
when it is divided by 8 is equal to that of a12 , i.e. 1.
156 Solutions to Testing Questions

Testing Questions (19-B)

2 n
X 1 n
1: Such a sequence does not exist. It suffices to show that > .
ai 4
i D2
0 kC1 1 0 kC1 1
2X 2X
1
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

By the Cauchy-Schwartz inequality, @ ai A  @ A  22k .


k k
ai
i D2 C1 i D2 C1
Therefore
kC1
2X
1 22k 22k 22k 1
 >  D :
22kC2
by 217.174.237.134 on 09/27/15. For personal use only.

ai kC1
2X kC1
2X 4
i D2k C1
ai ai
i D2k C1 i D1

Hence 0 kC1 1
2n n
X1 2X
X 1 1 n
D @ A> :
ai ai 4
i D2 kkD0 i D2 C1

Thus, condition (b) is not satisfied provided n is big enough.

2: The left hand of the given equation is an integer, with the right hand side
n
must be as well. Let x D and n D 44m C r , where n; m; r 2 Z and
44
0  r  43. Then the given equation becomes
9 j  9 9  
X r k X X kr
k mC D 44m C r , km C D 44m C r
44 44
kD1 kD1 kD1
9  
X kr
,mDr :
44
kD1

Thus, the m is uniquely determined by r . There are a total of 44 possible


values for r , so the given equation has 44 real solution for x. Let S be the
sum of all these solutions. Letting mr denote the value of m corresponding
to r ,
43 43
" 9  ! #
X X X kr
44S D .44mr C r / D 44 r Cr
r D0 r D0
44
kD1
43 43 X 9   43 X9  
X X kr 45  43  44 X kr
D 45 r 44 D 44 :
44 2 44
r D0 r D0 kD1 r D0 kD1
Lecture Notes on Mathematical Olympiad 157

Hence
43 X
9   43 X
9  
45  43 X kr 1935 X kr
SD D :
2 44 2 44
r D0 kD1 r D0 kD1

43 X
9   43 X
9 9 X43 
 
X kr X X kr kr
Let T D D D . Then 2T D
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

44 44 44
r D0 kD1 r D1 kD1 kD1 r D1
9 X 43     X 9 X43    
X kr k.44 r / kr kr
C D C k .
r D1
44 44 r D1
44 44
kD1 kD1
Since
by 217.174.237.134 on 09/27/15. For personal use only.


kr

kr
 
kr
 < k; if is an integer;
C k D 44
44 44 :̂ k kr
1; if is not an integer,
44
kr
and 1  k  9; 1  r  43, so is an integer only when .k; r / are one of
44
.4; 11/; .8; 11/; .2; 22/; .4; 22/; .6; 22/; .8; 22/; .4; 33/; .8; 33/:

Therefore
9 X
X 43 9
X
2T 8D .k 1/ D 43.k 1/ D 43  36 D 1548;
kD1 r D1 kD1

1548 C 8 1935 379


i.e., T D D 778. Thus, S D 778 D .
2 2 2
3 2
 
3: (i) Since k C < k 2 C 3k C 3 < .k C 2/2 , it follows that
2
b   Xb p b
X 3 X
kC < k 2 C 3k C 3 < .k C 2/:
2
kDa kDa kDa

By taking the arithmetic average of each term, it is obtained that

aCb 3 aCb
C < M.a; b/ < C 2;
2 2 2
 
aCbC3 aCbC4 aCbC3
i.e., < M.a; b/ < , so K.a; b/ D .
2 2 2
158 Solutions to Testing Questions

3 p
(ii) Since k C 1 D bk C c D b k 2 C 3k C 3c,
2
b
X b p
X
.k C 1/ D b k 2 C 3k C 3c
kDa kDa

which implies that


Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

b
1 X aCb aCbC2
N.a; b/ D .k C 1/ D C1D :
b aC1 2 2
kDa

4: Necessity: Suppose that there exists fxn g satisfying the conditions (i), (ii)
and (iii). Note that the equality in (iii) can be changed to the form
by 217.174.237.134 on 09/27/15. For personal use only.

2008
X
xn xn 1 D ak .xnCk xnCk 1 /; n 2 N;
kD1

where x0 D 0. By adding up above first n equalities, considering x0 D 0,


we obtain
2008
X n
X 2008
X
xn D ak .xmCk xmCk 1/ D ak .xnCk xk /
kD1 mD1 kD1

Letting n ! 1 and b D lim xn ,


n!1

b D a1 .b x1 / C a2 .b x2 / C    C a2008 .b x2008 /
2008
X 2008
X
D b ak .a1 x1 C a2 x2 C    C a2008 x2008 / < b  ak ;
kD1 kD1

2008
X
therefore ak > 1.
kD1
2008
X
Sufficiency: Suppose that ak > 1. Define the polynomial f by
kD1

2008
X
f .s/ D 1 C ak s k ; s 2 Œ0; 1;
kD1

2008
X
then f is increasing on Œ0; 1, and f .0/ D 1 < 0; f .1/ D 1C ak >
kD1
0. Hence f has a unique root s0 on .0; 1/, i.e., f .s0 / D 0 with 0 < s0 < 1.
Lecture Notes on Mathematical Olympiad 159

n
X
Define the sequence fxn g by xn D s0k for n D 1; 2; : : :. Then fxn g
kD1
satisfies the condition (i), and
n
X s0 s0nC1
xn D s0k D :
1 s0
kD1
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

s0
Since 0 < s0 < 1, so lim s0nC1 D 0 and hence lim xn D , namely
n!1 1 s0
n!1
2008
X
fxn g satisfies the condition (2). Finally, since f .s0/ D 0 ) ak s0k D 1,
kD1
by 217.174.237.134 on 09/27/15. For personal use only.

2008
! 2008
X X
xn xn 1 D s0n D ak s0k s0n D ak s0nCk
kD1 kD1
2008
X
D ak .xnCk xnCk 1 /:
kD1

Thus, fxn g satisfies the condition (3) as well.


5: Below we prove the following general conclusion: Let n  4; Xn D .x1 ; x2,
   ; xn / be a permutation of the first n natural numbers f1; 2; 3;    ; ng, and
A be the set of all such Xn . Let
f .Xn / D x1 C 2x2 C 3x3 C    C nxn
n3 nC6
and Mn D ff .Xn /jXn 2 Ag, then jMn j D .
6
By induction we first prove that Mn D
 
n.n C 1/.n C 2/ n.n C 1/.n C 2/ n.n C 1/.2n C 1/
; C 1;    ; :
6 6 6
When n D 4, the rearrangement inequality indicates that the minimum
element in M4 is f .f4; 3; 2; 1g/ D 20 and the maximum element in M4 is
f .f1; 2; 3; 4g/ D 30. Besides,
f .f3; 4; 2; 1g/ D 21; f .f3; 4; 1; 2g/ D 22; f .f4; 2; 1; 3g/ D 23;
f .f4; 1; 2; 3g/ D 24; f .f2; 4; 1; 3g/ D 25; f .f1; 4; 3; 2g/ D 26;
f .f1; 4; 2; 3g/ D 27; f .f2; 1; 4; 3g/ D 28; f .f1; 2; 4; 3g/ D 29:

43 4C6
Therefore M4 D f20; 21;    ; 30g ) jM4 j D 11 D , so the
6
conclusion is proven for n D 4.
160 Solutions to Testing Questions

Assume that the conclusion is true for n 1 (n  5), then for the n, since
we can get an element Xn any element Xn 1 by taking xn D n, and for
n
X1
such Xn , f .Xn / D n2 C kxk . By the inductive assumption, f .Xn / can
kD1
take on the value of any integer in the interval
 
.n 1/n.n C 1/ 2 .n 1/n.2n 1/
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

n2 C ;n C
 6 6
n.n2 C 6n 1/ n.n C 1/.2n C 1/
D ; :
6 6

Next consider Xn with xn D 1, then


by 217.174.237.134 on 09/27/15. For personal use only.

n 1 n
X1
Pn X n.n 1/
kD1 kxk D nC kxk D n C k.xk 1/ C
2
kD1 kD1
n
X1
n.n C 1/
D C k.xk 1/:
2
kD1

The inductive assumption then indicates that such f .Xn / takes all integral
values of the interval
 
n.n C 1/ .n 1/n.n C 1/ n.n C 1/ .n 1/n.2n 1/
C ; C
 2 6 2 6
n.n C 1/.n C 2/ 2n.n2 C 2/
D ; :
6 6

2n.n2 C 2/ n.n2 C 6n 1/ n.n2 6n C 5/ n.n 1/.n 5/


Since D D
6 6 6 6
 0, so f .Xn / takes all integer values of the interval
 
n.n C 1/.n C 2/ n.n C 1/.2n C 1/
; ;
6 6

so the conclusion is also true for n. The inductive proof is completed.


n.n C 1/.2n C 1/ n.n C 1/.n C 2/ n3 nC6
In conclusion, jM j D C1 D .
6 6 6
Returning to the original problem, for n D 9, we have jM9 j D 121.
Lecture Notes on Mathematical Olympiad 161

Solutions to Testing Questions 20


Testing Questions (20-A)

˛ ˛ ˛
1: The conclusion is obvious for n D 1. For n  2, let n D p1 1 p2 2    pk k ,
where ˛1 ; ˛2; : : : ; ˛k are non-negative integers. Since
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

.n/ D .˛1 C 1/.˛2 C 1/    .˛k C 1/  2k ;

and
      k
1 1 1 1 n
'.n/ D n 1 1  1 n 1 D ;
by 217.174.237.134 on 09/27/15. For personal use only.

p1 p2 pk 2 2k
n
) '.n/  .n/   2k D n:
2k

2: Write m D 2˛ M1 ; n D 2M2 , where ˛  1; .2; M1 / D 1; .2; M2 / D 1 and


.M1 ; M2 / D 1. Then
'.mn/ D '.2˛C1 M1 M2 / D '.2˛C1 /'.M1 /'.M2 / D 2˛ '.M1 /'.M2 /
D 2  Œ2˛ 1
'.M1 /  '.M2 / D 2'.m/'.n/.
3: It is clear that Q.n/  n (mod 9), so

20052005  .9  222 C 7/2005  72005  76334C1 .mod 9/:

From Euler’s Theorem and '.9/ D 6,

7'.9/  76  1 ) 20052005  7 .mod 9/:


) Q.Q.Q.20052005 ///  Q.Q.20052005 //  Q.20052005 /  20052005
 7 .mod 9/:

On the other hand, 20052005 < .104 /2005 D 108020 implies that 20052005
has at most 8020 digits, therefore Q.20052005 /  9  8020 D 72180, i.e.,
Q.20052005 / has at most 5 digits, so Q.Q.20052005 //  9  5 D 45. Then

Q.Q.20052005 //  45 ) Q.Q.Q.20052005 ///  3 C 9 D 12


) Q.Q.Q.20052005 /// D 7

since Q.Q.Q.20052005 ///  7 (mod 9).


4: Suppose that f is a non-constant solution. We may assume that the first
coefficient is positive, then there exists a positive integer N such tht f .n/ 
2 when n  N .
162 Solutions to Testing Questions

Take any positive integer n  N . If p is a prime factor of f .n/, then


f .n/ j .2n 1/ yields 2n  1 (mod p). Since f .n C p/  f .n/  0 (mod
p) and f .n C p/ j .2nCp 1/, so 2nCp  1 (mod p), therefore 2p  1
(mod p). However, Fermat’s Little Theorem gives 2p  2 (mod p), so
1  2 (mod p), a contradiction! Thus, f must be a constant polynomial.
Let f .x/ D a for all real x.
f .1/ j 21 1 ) a j 1 ! a D ˙1. Thus, f .x/ D 1 identically or
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

f .x/ D 1 identically.

5: Take a prime factor p of the number a1 C 2a2 C    C mam . By the Fer-


mat’s Little Theorem, k p  k (mod p) for each of positive integer k in
f1; 2; : : : ; mg, therefore for any positive integer n,
by 217.174.237.134 on 09/27/15. For personal use only.

n n n
a1  1p C a2  2p C   C an  mp  a1 C 2a2 C   C an m  0 .mod p/;
n n n
hence all the numbers a1  1p C a2  2p C    C an  mp are composite.

6: Write sn D 2'.n/ C 3'.n/ C    C n'.n/ . If n has a prime factor p such that


p 2 j n, let n D p 2m, then

1 C sn  0'.n/ C 1'.n/ C 2'.n/ C 3'.n/ C    C .n 1/'.n/


mp 1 p 1 mp 1 p 1
X X X X
 .jp C k/'.n/  k '.n/
j D0 kD0 j D0 kD0
p 1
X
 mp k '.n/  0 .mod p/;
kD0

namely p j .1 C sn /. However p j n ) p j sn , a contradiction. Thus,


n D p1 p2    pk . Without loss of generality we can assume that p1 <
p2 <    < pk . Then

'.n/ D .p1 1/.p2 1/    .pk 1/;

which implies that .pi 1/ j '.n/ for i D 1; 2; : : : ; k. By Fermat’s Little


Theorem,

'.n/ 1 .mod pi /; if .x; pi / D 1;
x 
0 .mod pi /; if .x; pi / > 1:
n
Among the n 1 numbers 2; 3; : : : ; n there are numbers not relatively
pi
n
prime to pi , so sn  n 1 (mod pi ). Since pi j n, so pi j sn and
pi
Lecture Notes on Mathematical Olympiad 163

n
hence pi j 1 C pi . Thus,
ˇ 
ˇ n n n
p1 p2    pk ˇ
ˇ C CC C1 ;
p1 p2 pk

namely ˇ  
ˇ 1 1 1
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

n ˇˇn C CC ;
p1 p2 p1 p2    pk
1 1 1
therefore C CC is an integer.
p1 p2 p1 p2    pk
7: From Fermat’s Little Theorem,
by 217.174.237.134 on 09/27/15. For personal use only.

2p  2 .mod p/ ) m D 2p 1  1 .mod p/ ) p j .m 1/;

therefore .2p 1/ j .2m 1


1/, and hence m j .2m 1
1/. On the other
hand,

6 j .p 1/ ) 63 D .26 1/ j .2p 1
1/ ) 7 j .2p 2/ ) 7 j .m 1/:

Thus, 127 D .27 1/ j .2m 1 1/. Now it suffices to show that .127; m/ D
1. It’s enough to show that 127 − m since 127 is a prime number.
Since p > 7, write p D 7s C n, where 0 < n < 7; s  1. Then

127 D .27 1/ j .27s 1/ ) 127 j .27sCn 2n / D .2p 2n /:

If 127 j m, then 127 j .2n 1/ which contradicts 0 < 2n 1 < 127, hence
.127; m/ D 1.

8: The general term of the given A.P. is ai C1 D 18 C 19i; i D 0; 1; 2; 3; : : :.


We show that there are infinitely many i such that ai C1 consists of only the
digit 1, i.e.

10k 1
18 C 19i D or 10k D 163 C 171i:
9

Since 10k D 163 C 19  9i ) 10k  11 .mod 19/, we observe the re-


mainders of 10k modulo 19 as k changes, which are listed in the following
table:

k 1 2 3 4 5 6
Remainder 10 5 12 6 3 11
164 Solutions to Testing Questions

therefore k D 6 is the minimum k satisfying the necessary condition that


10k  11 .mod 19/. In fact,
106 1
D 111111 D 18 C 19  5847 or 106 D 163 C 171  5847
9
indicates that 111111 is really in the given A.P.. For getting other k sat-
isfying the necessary condition, by Fermat’s Little Theorem, 1018  1
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

.mod 19/, so 1018t  1 .mod 19/, therefore

106C18t  11  1  11 .mod 19/; for all t 2 N:


106C18t 1
Below we show that is in the given A.P. for any t 2 N.
9
by 217.174.237.134 on 09/27/15. For personal use only.

It suffices to show that 106C18t D 163 C 171m for some m 2 N. Since


9 j .1018t 1/ and 19 j .1018t 1/, so 171 j .1018t 1/, namely 1018t D
1 C 171n; n 2 N. Then
106C18t D .163 C 171  5847/.1 C 171n/ D 163 C 171m
106C18t 1
for some m 2 N. Thus, is in the given A.P. for any t 2 N.
9
(Note: It is explained that 10k  11 (mod 19) is actually a sufficient
k
condition for 10 9 1 is in the given A.P. in the next lecture.)
9: First of all we show the following lemma.
Lemma: If x 2 Z, each odd prime factor p of x 2 C 1 must be of the form
4k C 1.
Proof. If p j .x 2 C 1/, then .p; x/ D 1. Then
p 1
x2 C 1  0 ) x2  1 ) xp 1
 . 1/ 2 .mod p/:
p 1
Fermat’s Little Theorem yields x p 1
 1 .mod p/, so D 2k for
2
some k 2 N. Hence p D 4k C 1.
Now return to the original problem. The given equation is equivalent to
x 2010 C 1 D 4y 2009 C 4y 2008 C 2007y C 2007;
) x 2010 C 1 D .4y 2008 C 2007/.y C 1/:

4y 2008 C 2007  3 .mod 4/ implies that y 2008 C 2007 must have prime
factor with form 4k C 3, but the lemma shows that .x 1005 /2 C 1 has no
such prime factor, a contradiction. Thus, the given equation has no required
solution.
Lecture Notes on Mathematical Olympiad 165

Testing Questions (20-B)

1: First of all, for prime number p and integer n with p − n, Fermat’s Little
Theorem yields
np 1  1 .mod p/: (30.2)
103
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

X
If p > 103, then (30.2) holds for each n  103, so np 1
 103.
nD1
However it is impossible to have 103  0 (mod p) for some p > 103.
Therefore p  103, and so there exist positive integer q and non-negative
integer r < p such that 103 D pq C r . Thus, in the numbers from 1 to 103,
by 217.174.237.134 on 09/27/15. For personal use only.

the number of multiples of p is


103 r
qD ;
p
which gives
103
X
np 1
 103 q  pq C r qr q .mod p/:
nD1

103
X
Since np 1
 0, so
nD1

r q .mod p/: (30.3)

(i) When p > q, then (30.3) implies that r D q, so 103 D .p C 1/r .


Since 103 is prime, so p D 102; r D 1, but this contracts the fact
that p is prime.
(ii) When p  q, then 103 D pq C r  p 2 . Thus, p can only be one
of 3; 5; 7. By checking each of them, it is found that only p D 3
satisfies the given conditions.
Thus, p D 3.
bn 1
2: It is clear that b  2. Suppose that D p l (where p is a prime,
b 1
n  2; l  1).
When n D xy, where x; y > 1, then

b xy 1 b xy 1 by 1 by 1
D y  D .1 C b y C    C b y.x 1/
/ :
b 1 b 1 b 1 b 1
166 Solutions to Testing Questions

b xy 1
Since D p l and x > 1; y > 1, so each factor of the right hand
b 1
side is a power of p. Thus, p j .b y 1/, namely b y  1 .mod p/ )
1 C b y C    C b y.x 1/  x .mod p/. Thus, p j x.
Since x is an arbitrary factor of n, so the above analysis implies that n D p m
(m 2 N). Thus,
m m 2
bp bp bp 1 bp 1
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

1 1
D m 1
  ;
b 1 bp 1 bp 1 b 1
where each factor is a power p and greater than 1, therefore p j .b p 1/,
namely b p  1 (mod p).
On the other hand, Fermat’s Little Theorem gives b p  b (mod p), so
by 217.174.237.134 on 09/27/15. For personal use only.

b  1 (mod p) or p j .b 1/.
ˇ p
ˇb 1
Since p ˇˇ ; , so p 2 j .b p 1/, namely b p  1 (mod p 2 ).
b 1
Suppose that m  2. Consider
2
bp 1
D 1Cb p C  Cb p.p 1/
: ./
bp 1
The right hand side of () has remainder p (mod p 2 ), and it must be greater
than p, so the power of p must be divisible by p 2 , a contradiction. Thus,
m D 1 and n D p.
3: We prove the conclusion by induction on k. For k D 1, n D 1 satisfies the
requirement.
Assume that the conclusion is true for k D t (t  1). Then for k D t C 1,
since there exists positive integer n0 such that nn00  m .mod 2t /, n0 must
be odd. If nn00  m .mod 2t C1 /, then n0 satisfies the requirement for
k D t C 1.
When nn00 6 m .mod 2t C1 /, since nn00 D m C s  2t , so s must be odd,
n
i.e., s D 2l C 1, hence n00  m C 2t .mod 2t C1 /. Below we show that
t
n D n0 C 2 satisfies the requirement for k D t C 1.
Since n is odd, so .n; 2t C1 / D 1 and since '.2t C1 / D 2t , by Euler’s the-
t t t
orem, n2  1 .mod 2t C1 /, therefore nn  nn0 C2  nn0  n2  nn0
.mod 2t C1 /. By the Binomial expansion,
n0
!
t n0
X n0 i t n0 i n n
nn0
D .n0 C 2 / D 2 n0  n00 C 2t n00 .mod 2t C1 /
i
i D0
n n
 m C 2t C 2t n00  m C 2t .n00 C 1/  m .mod 2t C1 /:
Thus, the conclusion is true also for k D t C 1.
Lecture Notes on Mathematical Olympiad 167

4: Since 2009 D 223  9 C 2, so the desired number has at least 224 digits.
Write it as x D c223 c222    c1 c0 . It is obvious that c223  2.
If c223 D 2, then c222 D c221 D    D c1 D c0 D 9. Note that 2009 D
49  41, so

x D 3  10223 1  30 11 .mod 7/ ) 2009 − x:


Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

If c223 D 3, then only one ci is 8 and others are all 9. Therefore

x D 3„
99ƒ‚
: : :…
98„
99ƒ‚ 9 D 4  10223
: : :… 10i 1:
222 i i

Based on the fact 105  1 (mod 41), it follows that


by 217.174.237.134 on 09/27/15. For personal use only.

105k  1; 105kC1  10; 105kC2  18 .mod 41/


105kC3  16; 105kC4  37 .mod 41/;
) x  22 10i 6 0 .mod 41/ ) 2009 − x:

If c223 D 4, then among c222 ; c221; : : : ; c1; c0 two are 8 and the rest are 9,
or one is 7 and rest are 9. Thus

x D 5  10223 10i 10j 1  38 .10i C 10j / .mod 41/;

where i and j may be equal. To obtain 10i C 10j  38 (mod 41), it is


necessary that .i; j /  .0; 4/ or .4; 0/ (mod 5), so i ¤ j and i; j  220.
To let x be minimum we can take j D 220 and i  0 (mod 5). Below it
suffices to choose i such that 49 j x.
By Euler’s Theorem, 1  10'.49/  1042 .mod 49/, and for the factors of
42, if k D 1; 2; 3; 6; 7; 14; 21, then 10k  10; 2; 20; 8; 31; 30; 48 .mod 49/,
therefore there is no positive integer k  41 such that 10k  1 .mod 49/.
Thus,
x D 5  10223 10220 10i 1  5  1013 1010 10i 1
 31 10i .mod 49/;

hence 49 j x if and only if 10i  31 .mod 49/, namely i  7 .mod 42/.


Since i  4 (mod 5), by solving the system, it is obtained that

i  49 .mod 210/:

Thus, the unique solution for i is i D 49, and the corresponding value of x
is
4998 „ 99ƒ‚: : :…
98„
99ƒ‚
: : :…
9:
170 49
168 Solutions to Testing Questions

5: The substitution n D p, a prime, yields p  .f .p//p  0 .mod f .p//,


so p must be divisible by f .p/. Hence, for each prime p, f .p/ D 1 or
f .p/ D p.

Let S D fp W p is prime and f .p/ D pg. If S is infinite, then f .n/p  n


.mod p/ for infinitely many primes p. By Fermat’s little theorem, n 
f .n/p  f .n/ .mod p/, so that f .n/ n is a multiple of p for infinitely
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

many primes p. This can happen only if f .n/ D n for all values of n, and
it can be verified that this is a solution.

If S is empty, then f .p/ D 1 for all primes p, and any function satisfying
this condition is a solution.
by 217.174.237.134 on 09/27/15. For personal use only.

Now suppose that S is finite and non-empty. Let q be the largest prime in
S . Suppose that q  3. Then for any prime p exceeding q,

p  f .p/q  1q .mod f .q// ) p  1 .mod q/:

However, this is not true. Let Q be the product of all the odd primes up to
q. Then all the prime factors of Q C 2 must exceed q. Let p be any prime
factor of Q C 2, then f .p/ D 1, so p  f .p/q .mod f .q// ) p  1
.mod q/, so Q C 2  1 .mod q/. However this contradicts Q C 2  2
.mod q/.

The only remaining case is that S D f2g. Then f .2/ D 2 and f .p/ D 1 for
every odd prime p. Since f .n/2  n .mod 2/, f .n/ and n must have the
same parity. Conversely, any function f for which f .n/  n .mod 2/ for
all n, f .2/ D 2 and f .p/ D 1 for all odd primes p satisfies the condition.

Therefore the only solutions are (i) f .n/ D n for all n 2 N; (ii) any
function f with f .p/ D 1 for all primes p; (iii) any function for which
f .2/ D 2; f .p/ D 1 for primes p exceeding 2 and f .n/ and n have the
same parity.

6: We prove thr statement by contradiction. Suppose that n7 C 7 D x 2 holds for


some pair .n; x/ of positive integers. Then

(i) n must be odd. Otherwise, it follows that x 2  3 .mod 4/.

(ii) n  1 .mod 4/, since n is odd implies that 4 j n7 C 7, so n  1


.mod 4/.
Lecture Notes on Mathematical Olympiad 169

(iii) x 2 D n7 C 7 yields

x 2 C 112 D n7 C 128
D .n C 2/.n6 2n5 C 4n4 8n3 C 16n2 32n C 64/ (30.4)

If 11 − x, then each prime factor p of x 2 C 112 is odd and p  1


.mod 4/, since if p D 4k C 3 then by Fermat’s Little Theorem,
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

x 2  112 ) x p 1
 11p 1
 1 .mod p/;

a contradiction.
(30.4) yields .n C 2/ j x 2 C 112 . But n C 2  3 .mod 4/ implies
that x 2 C 112 has at least one prime factor with remainder 3 modulo
by 217.174.237.134 on 09/27/15. For personal use only.

4, a contradiction.
If x is a multiple of 11, let x D 11y, then (30.4) becomes

121.y 2 C 1/ D .n C 2/.n6 2n5 C 4n4 8n3 C 16n2 32n C 64/:

By substituting n with remainder 0; ˙1; ˙2; ˙3; ˙4; ˙5 (mod 11)


and doing a direct calculation, it is found that n6 2n5 C 4n4
8n3 C 16n2 32n C 64 is not a multiple of 11, so 121 j .n C 2/, and
this indicates that
nC2 6
y2 C 1 D .n 2n5 C 4n4 8n3 C 16n2 32n C 64/: (30.5)
121
By similar reasoning, it can be proven that each prime factor of y 2 C1
must have remainder 1 modulo 4, so its odd divisors must also have
nC2
that property. However,  3 .mod 4/, so (30.5) cannot hold.
121
Thus, n7 C 7 is not a perfect square in all the possible cases. (Given
by Xiaosheng Mu)

Solutions to Testing Questions 21


Testing Questions (21-A)

1: There are infinitely many primes, so for any n 2 N it is always possible to


pick out n distinct primes p1 ; p2;    ; pn . Then .pi2 ; pj2/ D 1 for any i ¤ j
with 1  i < j  n. By the Chinese Remainder Theorem, the system
x 1 (mod p12 ); x  2 (mod p22 );    ; x  n (mod pn2 );
170 Solutions to Testing Questions

has infinitely many solutions. Let x0 > 0 be a positive solution, then


the n consecutive numbers x0 C 1; x0 C 2;    ; x0 C n are divisible by
p12 ; p22;    ; pn2 respectively.
2: x1 D 5 satisfies the equation x  1 (mod 4). Let x2 D 5 C 4k where k 2 N.
Then x2 D 5 C 12 D 17 satisfies the first two equations.
Let x3 D 17 C 20k where k 2 N. From
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

17 C 20k  3 k  4 (mod 7);


we find k D 6, i.e. x3 D 137 is a solution of the system. Thus, the solutions
are given by the the congruence class satisfying the equation
x  137 (mod 140):
by 217.174.237.134 on 09/27/15. For personal use only.

3: It is obvious that p ¤ q. We may assume that p < q.


When p D 2, since q q C 5  5  0 (mod q), q can only be 5. By checking,
.2; 5/ is a solution.
When p; q are both odd primes, q j .p p C 1/ ) q j .p p 1
pp 2
C
p C 1/ and p 2p  1 (mod q).
On the other hand, Fermat’s Little Theorem gives p q 1  1 (mod q). If
.2p; q 1/ D 2, then ordq p D 2 so that p 2  1 (mod q) and hence p  1
(mod q) or p  1 (mod q). Then
0  pp 1
pp 2
C p C 1  1 or 1 C p .mod q/;
a contradiction.
If .2p; q 1/ D 2p, i.e., q  1 (mod p), then 0  p p C q q C 1  2 (mod
p), a contradiction also. Thus, the solutions are .2; 5/ and .5; 2/.
4: Let p1 ; p2 ;    ; pn and q1 ; q2 ;    ; qn be 2n distinct prime numbers. Let x
be any positive solution of the system
x 1 (mod p1 q1 ); x  2 (mod p2 q2 );    ; x  n (mod pn qn );
then each of the n consecutive positive integers x C 1; x C 2;    ; x C n
has at least two different prime factors, satisfying the requirement of the
problem.
5: If all the primes not greater than k are prime factors of m, the conclusion is
clearly true. If this is not the case, let N be the product of all primes which
are not greater than k, and are relatively prime to m. Then N > 1. For
positive integer r with .r; m/ D 1, the system of equations
x  r (mod m); x  1 (mod N )
Lecture Notes on Mathematical Olympiad 171

has positive solutions, and for any such solution, each of its prime factor is
relatively prime to N , so it must be greater than k. By taking each number
of a reduced residue system modulo m as r to get the corresponding solu-
tion x, the group of '.m/ solutions form a required reduced residue system
modulo m.

6: For positive integer n > 1,


Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

nC1 n 1 nC1 n n 1 C1 n n 1 C1 n
Fn2 1 D .22 C 1/2 D .22 C 22 C 1/2  .22 /2
n n 1 C1 n 1 C1
D .22 /2  . 1/2  1 .mod Fn /:
nC1 nC2
Therefore Fn2 1 C 1  0 .mod q/, and it yields Fn2 1  1 .mod q/. By
by 217.174.237.134 on 09/27/15. For personal use only.

Fermat’s Little Theorem, 2nC2 j q 1, namely q D 2nC2 k C 1 for some


positive integer k.

7: Assume that p  q.
When p D 2, then q D 2 satisfies the condition, .2; 2/ is a solution. If
q > 2, then q is odd and satisfies q j .1 C 2q 2 /, so

2q 2
 1 .mod q/:

By Fermat’s Little Theorem, 1  2q 2  2  2 .mod q/, so 3  0


.mod q/, therefore q D 3. By checking, .2; 3/ is a solution also.
When p > 2, 2q 1  1 .mod q/ and q j .2p C 2q / imply that 0 
2p C 2q  2p C 2 .mod q/. Therefore

2p 1
C 1  0 (mod q) ) 2p 1
 1 (mod q) ) 22.p 1/
 1 (mod q):

Let k D ordq 2, then k j 2.p 1/ but k − p 1, so k D 2sC1 m; p 1 D 2s t,


where s; t 2 N, t is odd and m j t. Since k j q 1, so in the prime
factorization of p 1, the power of 2 is less than that of q 1. By exchanging
p and q and applying the same reasoning, the power of 2 in p 1 then is
greater than that of q 1, a contradiction. Thus, there must be no solution
in case of q  p > 2.
Thus, the solutions for pairs .p; q/ are .2; 2/; .2; 3/ and .3; 2/.

8: We prove by contradiction.
Solution 1. Suppose that there is a positive integer n > 1 such that n j
2n 1, then n is odd. Let

n0 D minfn 2 N W n > 1; n j .2n 1/g:


172 Solutions to Testing Questions

Let k D ordn0 2. 2n0  1 .mod n0 / implies k j n0 , hence 1  k  n0 .


If k D 1 then 2 1  0 (mod n0 ), i.e. n0 D 1, a contradiction, therefore
1 < k. Since n0 is odd and k j '.n0 /  n0 1, therefore 1 < k < n0 .
However, 2k  1 (mod n0 ) implies n0 j .2k 1/, and hence implies k j
.2k 1/ also, which contradicts the definition of n0 .
Solution 2. Suppose that there is a positive integer n > 1 such that n j
2n 1, then n is odd. Suppose that p is an odd prime factor of n . Let
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

k D ordp 2, then
n j 2n 1 ) p j .2n 1/ ) 2n  1 (mod p);

therefore k j n. By Fermat’s Little Theorem, 2p 1


 1 (mod p), so k j
p 1, and hence k j .n; p 1/.
by 217.174.237.134 on 09/27/15. For personal use only.

Now we take p be the minimum prime factor of n, then .n; p 1/ D 1,


hence k j 1 i.e. k D 1. However, it implies 2  1 (mod p) i.e. p D 1, a
contradiction.

Testing Questions (21-B)

1: Let p be a prime factor of m with p ˛ km; ˛  1. Then there is an infinite


subset A1 of A such that all elements in A1 are not divisible by p. By
the pigeonhole principle, there exists an infinite subset A2 of A1 such that
x  a .mod mn/ for any element x 2 A2 , where a is an integer not
divisible by p.
 
mn
The condition .m; n/ D 1 yields p ˛ ; ˛ D 1. By the Chinese Remain-
p
der Theorem the system
8 1
< xa .mod p ˛ /;
mn (30.6)
: x  0 .mod ˛ /
p
has infinitely many solutions. Let x be anyone of them, and denote by Bp
the set consisting of the first x elements of A2 , and by Sp the sum of all
elements in Bp , then Sp  ax .mod mn/, and from (30.6),
mn
Sp  ax  1 .mod p ˛ /; Sp  0 .mod /:

˛
Let m D p1˛1    pk k , and suppose that corresponding to each pi (1  i 
k 1), the finite subset Bpi has selected, where Bpi  AnfBp1 [  [Bi 1g,
Lecture Notes on Mathematical Olympiad 173

such that the elements in Bpi and Spi satisfy


˛ mn
Spi  1 .mod pi i /; Spi  0 .mod ˛ /: (30.7)
pi i

k
[
Now define the set B D Bpi and the sum S of elements of B given by
i D1
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

k
X
SD Spi . Then (30.7) yields
i D1
˛
S  1 .mod pi i / for 1  i  k and S  0 .mod n/;
by 217.174.237.134 on 09/27/15. For personal use only.

hence B satisfies the requirements in question.


p4 1
2: 2550 D 2  3  52  17, we first consider the remainder of pk k modulo 2550
when pk ¤ 2; 3; 5; 17.
For pk > 5, Fermat’s Little Theorem gives 5 j .pk4 1/. Since
pk4 1 D .pk 1/.pk C 1/.pk2 C 1/
and one between the two consecutive even numbers .pk 1/ and .pk C 1/
must be divisible by 4, so 16 j .pk4 1/.
It is easy to see that
'.2/ D 1; '.3/ D 2; '.5/ D 4; '.52/ D 5  4 D 20; '.17/ D 16:
p4 1
By Euler’s Theorem, pk k  1 .mod p/ for p D 2; 3; 52; 17, so
p4 1
pk k 1 .mod 2550/:

Below we consider the cases: pk D 2; 3; 5; 17. Since 2 D p1 , so it is not


2550
X p4 1
needed to consider pk D 2 for the sum pk k .
kD2
p4 1
Since p2 D 3; p3 D 5; p7 D 17, for convenience write A D p2 2 ;B D
p4 1 p4 1
p3 3 ; C D p7 7 . Then simple calculations yield the following table of
remainders:
mod 2 mod 3 mod 52 mod 17
A 1 0 1 1
B 1 1 0 1
C 1 1 1 0
ACB CC 1 2 2 2
174 Solutions to Testing Questions

Therefore A C B C C D .3  52  17/k C 2 and k D 2m C 1 for some


k; m 2 N. Thus,

A C B C C D .2  3  52  17/m C 1277:
2550
X p4 1
Hence pk k  1277 C .2550 4/  1273 .mod 2550/.
kD2
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

3: We first prove the following lemma.


Lemma: Let p be a given odd prime number, u > 1 be an integer with
t
p − u. Let d D ordp u and p v k.ud 1/. Then p t Cv k.udmp 1/, where
m is a positive integer with.p; m/ D 1 and t is an arbitrary non-negative
by 217.174.237.134 on 09/27/15. For personal use only.

integer.
Proof of Lemma: We use induction on t. When t D 0, the definition of v
gives ud D 1 C p v k (where p − k). The Binomial expansion yields
!
m
umd D .1 C p v k/m D 1 C p v km C p 2v k 2 C
2
!
m
D 1 C p v .km C p v k 2 C    / D 1 C p v k1 ;
2

where k1 is an integer with .k1 ; p/ D 1, so the lemma is true for t D 0.


t
Assume that the lemma is true for t, i.e., udmp D 1 C p t Cv k t , where
p − k t . Then the binomial expansion yields
tC1 
udmp D .1 C p t Cv k t /p D 1 C p t C1Cv .k t C p2 p vCt 1 k 2t C    /
D 1 C p t C1Cv k t C1 ;

where p − k t C1 (Note that p is an odd prime, so p j p2 ). Thus, the lemma
is proven.
Now we return to the original problem. The conclusion is clearly true for
u D 1. For u > 1, the given equation can be written in the form

nŠ D ur .us 1/; r; s 2 N: (30.8)

Take an odd prime p with p − u. It suffices to consider the case n > p.


If p ˛ knŠ, then ˛  1. (30.8) and p − u implies that p ˛ k.us 1/, and in
particular, p j .us 1/. Let d D ordp u, then d j s. Let s D d mp t , where
t  0; p − m. Then p ˛ j .us 1/ and the Lemma implies that ˛ D t C v,
namely t D ˛ v, where p v k.ud 1/. Hence
˛ v
us 1 D udmp 1: (30.9)
Lecture Notes on Mathematical Olympiad 175

It is well known that


1    
X n n
˛D i
 > an; (30.10)
p p
i D1
v
where a is a positive constant depending p only. Write b D udp .
d; p; u; v are all fixed positive integers, so that b is a constant greater than
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

1, therefore (30.9) and (30.10) together yields


˛ v an
us 1  udp 1 > bp 1: (30.11)
It is easy to see that for n big enough,
an
bp 1 > nn 1
by 217.174.237.134 on 09/27/15. For personal use only.

(30.12)
an
(i.e., b p > nn , namely p an > n logb n). Thus, (30.9), (30.11), (30.12)
implies that us 1 > nŠ and hence ur .us 1/ > nŠ for big n. Thus, the
equation (30.8) has no solution for n big enough. On the other hand, for
each given n, the equation (30.8) has only finitely many solutions, so the
conclusion is proven.
4: As is known by us (for example, see Example 5), let p be a prime factor of
Fn , then p D 2nC1 x C 1, where x is a positive integer. Let
Fn D p1˛1 p2˛2    ps˛s ; (30.13)
then pi D 2nC1 xi C 1; i D 1; 2; : : : ; s. By (30.13) and the binomial expan-
sion,
n
22 C 1  .2nC1 C 1/.˛1 CC˛s / > 2.nC1/.˛1 CC˛s / C 1;
hence
s
X 2n
˛i < : (30.14)
nC1
i D1

On the other hand, by the binomial expansion,


˛
pi i D .2nC1 xi C 1/˛i  1 C 2nC1 ˛i xi .mod 22nC2 /:
For n  3, since 2n  2n C 2 holds, by taking mod 22nC2 to (30.13) it
follows that
s
Y s
Y
n ˛
1  22 C 1 D pi i  .1 C 2nC1 ˛i xi /
i D1 i D1
s
X
nC1
 1C2 ˛i xi .mod 22nC2 /;
i D1
176 Solutions to Testing Questions

s
X s
X
which implies that 2nC1 ˛i xi  0 .mod 22nC2 /, namely ˛i xi  0
i D1 i D1
s
X
.mod 2nC1 /, hence ˛i xi  2nC1 . Thus, there must be some xj such
i D1
that
s
X
˛i  2nC1 :
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

xj (30.15)
i D1
s
X
Combining (30.13), (30.14), (30.15), it is obtained that 2nC1  xj ˛i <
i D1
2n
by 217.174.237.134 on 09/27/15. For personal use only.

xj  , so xj > 2.n C 1/, hence


nC1

pj D 2nC1 xj C 1 > 2nC1 .2n C 2/ D 2nC2 .n C 1/;

as desired.
5: Let p be a prime number, a a positive integer, and Vp .a/ denotes the compo-
nent of p in the prime factorization of a, i.e., p ˛ ka ) Vp .a/ D ˛.
Lemma: Let p be a given odd prime number, u > 1 be an integer with
t
p − u. Let d D ordp u and p v k.ud 1/. Then p t Cv k.udmp 1/, where
m is a positive integer with.p; m/ D 1 and t is an arbitrary non-negative
integer.
Proof of Lemma: We use induction on t. Whent D 0, the definition of v
gives ud D 1 C p v k (where p − k). The binomial expansion yields
!
v 2v 2 m
umd D .1 C p v k/m D 1 C p km C p k C
2
!
v v 2 m
D 1 C p .km C p k C    / D 1 C p v k1 ;
2

where k1 is an integer with .k1 ; p/ D 1, so the lemma is true for t D 0.


t
Assume that the lemma is true for t, i.e., udmp D 1 C p t Cv k t , where
p − k t . Then the binomial expansion yields
tC1 p
 vCt
udmp D .1 C p t Cv k t /p D 1 C p t C1Cv .k t C 2
p 1 2
kt C /
D 1 C p t C1Cv k t C1 ;
p
wherep − k t C1 (Note that p is odd prime, so p j 2
). Thus, the lemma is
proven.
Lecture Notes on Mathematical Olympiad 177

Now we return to the original problem. Suppose b > 1. Write the given
equation in the form

ab 1 D b.1 C b C    C b n 1
/ ) b j ab 1:

Let p be the minimum prime factor of b, then ordp a j b. Since ordp a 


p 1 < p, so ordp a D 1. If p is odd, let p v k.a 1/; p t kb. Then the
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

Lemma gives p vCt k.ab 1/, i.e., p vCt kb.1 C b C    C b n 1 /.


On the other hand, .b; 1 C b C   C b n 1 / D 1, so p t kb.1 C b C   C b n 1/,
i.e., t D v C t, or v D 0. However, this contradicts the fact that p j .a 1/.
Thus, p is not odd.
a2 1 t
If p D 2, let 2v
by 217.174.237.134 on 09/27/15. For personal use only.

; 2 kb. b is even implies a is odd, so v > 0.


2
a2 1 1
Besides, D .a C 1/.a 1/ and .a C 1/; .a 1/ are both even
2 2
but one of them is not a multiple of 4, and the index of 2 in other factor is
v. Hence one of a 1 and a C 1 can be expressed in the form 2v m (where
2 − m).
Write b D 2t k, where 2 − k, then
tk t 1k
ab 1 D .2v m ˙ 1/2 1 D .22v m2 ˙ 2vC1 m C 1/2 1
2t 1k
D .2vC1 m1 C 1/ 1 D    D .2vCt m t C 1/k 1
! !
k .vCt /.k k
D 2.vCt /k mkt C 2 1/
mkt 1
CC 2vCt m t ;
1 k 1

where m1 ;    ; m t are all odd. Since k k 1 D k is odd, so 2vCt k.ab 1/.
Since 1 C b C    C b n 1 is odd, so 2t kb.1 C b C    C b n 1/, which yields
v D 0 again, a contradiction. Thus, we have proven that b has no prime
factor p, i.e., b D 1, and the solutions for .a; b; n/ are .a; 1; a 1/; a > 1.

Solutions to Testing Questions 22


Testing Questions (22-A)

1: It is clear that p ¤ q and we can assume that p < q.


If p D 2, then q j .q q C 5/ ) q D 5. it’s easy to verify that .2; 5/ is a
solution.
178 Solutions to Testing Questions

When p; q are both odd, then

p p C1  0 .mod q/ ) q j .p p 1
pp 2
C   pC1/; p 2p  1 .mod q/:

On the other hand, Fermat’s Little Theorem gives p q 1  1 .mod q/. If


.2p; q 1/ D 2, then p 2  1 .mod q/ so that p  1 .mod q/ or p  1
.mod q/, hence
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

0  pp 1
pp 2
C p C 1  1 or p .mod q/;

a contradiction. If .2p; q 1/ D 2p, namely q  1 .mod p/, then

0  p p C q q C 1  2 .mod p/;
by 217.174.237.134 on 09/27/15. For personal use only.

which also leads to a contradiction. Thus, the only solutions are .2; 5/ and
.5; 2/.
2: Without loss of generality we assume that a  b  c. Then

abc D 2009.a C b C c/  6027c;

namely ab  6027, so the number of pairs .a; b/ satisfying a  b  c for


at least one c 2 N and the equation

abc D 2009.a C b C c/

is finite.
On the other hand, for any given pair .a; b/, c.ab 2009/ D 2009.a C b/
implies that c is determined uniquely by .a; b/. Thus, the number of c is
finite, so the number of .a; b; c/ with a  b  c which satisfies the given
equation is finite. Thus, the conclusion is proven.
3: Let the pair fx; yg satisfy the equation

x2 2xy C 126y 2 2009 D 0: ./

If we consider () as a quadratic equation in x, then the value of its discrim-


inant
 D 4y 2 4.126y 2 2009/ D 500.42 y 2 / C 36
is a perfect square. 42 y 2  0 implies that jyj can only be 0; 1; 2; 3; 4. By
checking, jyj D 4 is the unique possible value. Then, from (),

y D 4 ) x 2 8x C 7 D 0 ) fx; yg D f1; 4g or f7; 4gI


y D 4 ) x 2 C 8x C 7 D 0 ) fx; yg D f 1; 4g or f 7; 4g:

Thus, the solutions are f1; 4g; f7; 4g; f 1; 4g; f 7; 4g.
Lecture Notes on Mathematical Olympiad 179

4: If n < m, then nŠŒm.m 1/    .n C 1/ C 1 D mn . However

.m.m 1/    .n C 1/ C 1; m/ D 1 ) mn − .mŠ C nŠ/ ) no solution:

Therefore m  n.
If m > 2, then Œ.m 2/Š.m 1/mŒ1 C .m C 1/    n D mn . Since
.m 1; m/ D 1, so there is no factor .m 1/ in mn , hence there is no
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

solution in this case. Thus, m D 1 or 2.


But if m D 1, then 1 C nŠ D 1 has no solution for n.
When m D 2, the given equation becomes 2Š C nŠ D 2n . For n  4,

nŠ D 1  2  3     n > 2  2  2     2 D 2n ;
by 217.174.237.134 on 09/27/15. For personal use only.

therefore n D 2 or 3. When n D 2, then 2Š C 2Š D 22 , so .2; 2/ is a


solution. When n D 3, then 2Š C 3Š D 23, so .2; 3/ is also a solution. Thus,
.m; n/ D .2; 2/ or .2; 3/.
1 p
5: Assume that x  y  z. If z > p
3
, then 3z C 1 < 3 34z, hence
34 3
similarly
p
3
p
3
3x C 1 < 34x and 3y C 1 < 34y:
Multiplying them up yields .3x C 1/.3y C 1/.3z C 1/ < 34xyz which
contradicts the given equation. Therefore

1
z p
3
< 5:
34 3

z D 1 ) 4.3x C 1/.3y C 1/ D 34xy ) xy C 6.x C y/ C 2 D 0, no


positive integer solution.
z D 2 ) 7.3x C 1/.3y C 1/ D 68xy ) 5xy 21.x C y/ 7 D 0
) .5x 21/.5y 21/ D 476 D 22  7  17 D 119  4 D 34  14, therefore
.x; y/ D .28; 5/ or .11; 7/.
z D 3 ) 10.3x C 1/.3y C 10/ D 102xy ) 6xy 15.x C y/ 5 D 0.
By taking modulo 3, then we have 5  0 .mod 3/, so there is no solution
in this case.
z D 4 ) 13.3x C 1/.3y C 1/ D 136xy ) 19xy 39.x C y/ 13 D 0
) .19x 39/.19y 39/ D 1768 D 23  13  17. After discussing all the
possible cases we find no solution.
Thus, .28; 5; 2/; .11; 7; 2/ and all their permutations are the solutions.
180 Solutions to Testing Questions

6: The given equation is equivalent to .2y C x/2 D 4x 3 27x 2 C 44x 12.

4x 3 27x 2 C 44x 12 D .x 2/.4x 2 19x C 6/


D .x 2/Œ.x 2/.4x 11/ 16;

implies that x D 2; y D 1 is a solution.


Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

When x ¤ 2, since .2y C x/2 is a perfect square, let x 2 D ks 2 , where s


is a positive integer, then k 2 f 2; 1; 1; 2g. In fact, if p 2mC1 kx 2, then
p j .x 2/.x 11/ 16, so p j 16, i.e. p D 2.

When k D ˙2, then 4x 2 19x C 6 D ˙2n2, where n is a positive integer,


by 217.174.237.134 on 09/27/15. For personal use only.

i.e. .8x 19/2 265 D ˙32n2. Since

˙32n2  0; ˙2 .mod 5/; .8x 19/2  0; ˙1 .mod 5/ and 25 − 265;

we obtain a contradiction.

When k D 1, then 4x 2 19x C 6 D n2 for some positive integer n, i.e.


265 D .8x 19/2 16n2 D .8x 19 4n/.8x 19 C 4n/. From
265 D 1  265 D 5  53 D . 265/  . 1/ D . 53/  . 5/, in these
four cases, only x D 6 has x 2 D s 2 being a perfect square, so n D 6.
Therefore y D 3 or y D 9.

When k D 1, then 4x 2 19x C 6 D n2 for some positive integer n, so


that 265 D .8x 19/2 C 16n2 . From 16n2  265 we obtain n  4. for
n D 1; 2, the equation 265 D .8x 19/2 C 16n2 has no integer solution,
for n D 3, x D 1 and hence y D 1 or 2 are solutions; for n D 4, x D 2 is
a solution, a contradiction.

Thus, the solutions are .2; 1/; .6; 3/; .6; 9/; .1; 1/; .1; 2/.

7: We have n2  1 .mod 3/. Thus n D 3k C 1 or 3k C 2 for some nonnegative


integer k.

(i) When n D 3k C 1, then given equation gives 2m D 3k 2 C 2k D


k.3k C 2/. Hence k and 3k C 2 are both powers of 2. It is clear that
k D 2 is a solution but k D 1 is not.
If k D 2p where p  2, then 3k C 2 D 2.3  2p 1 C 1/ is not a power
of 2, hence there are no solutions in this case.
k D 2 ) n D 7; m D 4, so n D 7; m D 4 is a solution.
Lecture Notes on Mathematical Olympiad 181

(ii) When n D 3k C 2, then the given equation yields 2m D 3k 2 C 4k C


1 D .3k C 1/.k C 1/, so both k C 1 and 3k C 1 are powers of 2.
k D 1 is an acceptable solution, so n D 5; m D 3 is a solution also.
When k D 0, 2m D 1 gives m D 0, so there is no solution in this
case.
For k > 1, since 4.k C 1/ > 33k C 1 > 2.k C 1/, if k C 1 D 2p for
some positive integer p > 1, then
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

2pC2 > 3k C 1 > 2pC1 ;

i.e., 3k C 1 must be not a power of 2. Hence there is no solution in


this case.
In summary, there are two solutions for .n; m/: .7; 4/ and .5; 3/.
by 217.174.237.134 on 09/27/15. For personal use only.

8: Note that if .x; t; y; s; v; r/ is a solution, then


.xak n ; takm ; yak n ; sakm; vak n ; rakm/; where a 2 N
is also a solution. Hence it suffices to find a fundamental solution. Note that
2 C 3 D 5 implies that
2mnC1  3mn  5mn C 2mn  3mnC1  5mn D 2mn  3mn  5mnC1 :
Since .m; n/ D 1, there exists an integer i 2 Œ1; n such that mi  1
.mod n/, so mi C 1 D nd , where d 2 N. Thus,
mn C 1 D m.n i / C mi C 1 D m.n i / C nd;
so
.2n  3n i
 5n /m  .2d /n C .2n  3n i  5n /m  .3d /n
D .2n  3n  5n i /m  .5d /n ;

i.e., .2n 3n 5n ; 2d ; 2n 3n i 5n ; 3d ; 2n 3n 5n i ; 5d / is a fundamental


solution. Thus, there are infinitely many solutions.

Testing Questions (22-B)

1: First of all we show that if x is a solution then x is a positive integer.


m2 C 7 13
Let 4x 5 7 D m2 ; 4x 13 7 D n2 (m; n 2 N0 ). Then x 5 D ;x D
2 40  2 8  42 3
n C7 x m C7 n C7
. It is clear that x > 0, so x D 39 D = 2
4 x 4 4
182 Solutions to Testing Questions

p 4p 5
Q. Let x D with p; q 2 N; .p; q/ D 1, then 5 D m2 C 7 2 N implies
q q
that q D 1 and hence x 2 N. 4x 5 D m2 C 7  7 implies x  2.
(i) x D 2 yields 4x 5 7 D 112 and 4x 13 7 D 1812, so x D 2
is a solution.
(ii) When x  3, then
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

.mn/2 D .4x 5 7/.4x 13


7/ D .4x 9 /2 7  4x 13 7  4x 5 C 49

7 4 2
 
49 8
< .4x 9 /2 13
7  4x C x D 4x 9
x : (30.16)
4 2

Below we verify
by 217.174.237.134 on 09/27/15. For personal use only.

 2
2 5 13 7 4
.mn/ D .4x 7/.4x 7/ > 4x 9 x 1 ;
2

49 8
i.e., 8x 9 x 28x 5 7x 4 C 48 > 0. In fact,
4

49 8
8x 9 x 28x 5 7x 4 C 48 > 24x 8 13x 8 28x 5 7x 4 C 48
4
 99x 6 28x 5 7x 4 C 48 > 0:
 2  2
7 4 7 4
hence 4x 9 x 1 < .mn/ < 4x 9
2
x , i.e.,
2 2
7 4 7 4
4x 9 x 1 < mn < 4x 9 x :
2 2
Hence x must be odd so that it is possible to solve mn D 4x 9
7 4 1
x . By substituting it into (30.16), it is obtained that
2 2

7 4 1 2
 
9
4x x D .4x 13 7/.4x 5 7/;
2 2

namely 4x 9 49 4
x 8 28x 5 72 x 4 C 49 14 D 0. When multiplying
both sides by 4 and then taking modulo 16, we have

x 8 C2x 4 C3  0 .mod 16/ or .x 4 C1/.x 4 3/  0 .mod 16/:

However, this contradicts x 4  1 .mod 8/. Thus, there is no solution


when x  3.
Lecture Notes on Mathematical Olympiad 183

In conclusion, x D 2 is the unique solution.

2: We prove the conclusion by contradiction. Suppose that a; b are not relatively


prime to each other, let the prime p be a common factor of a and b,and let
Vp .n/ denote the highest component of p in n.
Let .x1 ; y1 / and .x2 ; y2 / be two distinct solutions of the given equation
with x1 > x2 > 1. Then
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

a.bax1 1 ax1 1 C 1/ D b.ab y1 1 b y1 1 C 1/ ) Vp .a/ D Vp .b/:


 x1   x2 
a 1 b y1 1 a 1 b y2 1
By D D , we have
a 1 b 1 a 1 b 1
by 217.174.237.134 on 09/27/15. For personal use only.

ax1 x2 1 b y1 y2 1
ax2  D b y2  : (30.17)
a 1 b 1
!
nl 1
Since n; D 1 for any positive integer n > 1; l 2 N, (30.17)
n 1
implies x2Vp .a/ D y2 Vp .b/, hence x2 D y2 . It is then easy to see that

ax2 1 b x2 1
D )aDb
a 1 b 1
which contradicts a > b. Thus, a and b must be relatively prime.

3: Let k D 2. For any odd positive integer 2l C 1, let n1 D 5l ; n2 D 2  5l ,


then n21 C n22 D 52lC1 . For any even nonnegative integer 2l , let n1 D
3  5l ; n2 D 4  5l , then n21 C n22 D 52lC2 . Thus, there must be two positive
integers n1 ; n2 such that n21 C n22 D 5t for t 2 N.
Next, consider k D 3. Let n1 D 3a1 ; n2 D 4a1 ; n3 D 5a2 , then n21 C n22 C
n23 D 52 .a12 C a22 /. Since for any nonnegative integer m, there exist positive
integers a1 ; a2 such that a12 C a22 D 51Cm , so for any nonnegative integer
m, there must be three positive integers n1 ; n2 ; n3 such that n21 C n22 C n23 D
53Cm .
For k  3 we use mathematical induction on k. Assume that for all non-
negative integers m and all integers l with 2  l  k the equation

a12 C a22 C    C al2 D 5lCm

has a positive integer solution a1 ; a2 ; : : : ; al . Below we show that for all


nonnegative integers m, the equation

n21 C n22 C    C n2kC1 D 5kC1Cm


184 Solutions to Testing Questions

has also a positive integer solution. It is obvious that for 2  k 1<k

5kC1Cm D 5kCm C 4  5kCm :

By the induction assumption, for any nonnegative integer i , there exist pos-
itive integers a1 ; a2 ; : : : ; ak 1 satisfying

a12 C a22 C    C ak2 D 5k 1Ci


Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

1 :

Hence there exist positive integers a1 ; a2 ; : : : ; ak 1 satisfying

a12 C a22 C    C ak2 1 D 5kCm :


by 217.174.237.134 on 09/27/15. For personal use only.

We have proven above that there exist positive integers b1 ; b2 satisfying


b12 C b22 D 5kCm . Hence for any nonnegative integer m

5kC1Cm D 5kCm C 4  5kCm


D a12 C a22 C    C ak2 1
C 4.b12 C b22 /
D a12 C a22 C    C ak2 1
C .2b1 /2 C .2b2 /2 :

4: It is obvious that a  0 and b  0. Suppose that 3a C 7b D n2 , then n is a


positive even integer, and so

n2  . 1/a C . 1/b  0 .mod 4/:

It follows that (i) a is odd and b is even or (ii) a is even and b is odd.
Case (i): Let b D 2c. Then 3a D .n 7c /.n C 7c /. It cannot be the case
that 3 divides both n 7c and n C 7c . However each of these is a power of
3. It follows that n 7c D 1, and therefore 3a D 2  7c C 1. If c D 0, then
a D 1, and we obtain the solution a D 1; b D 0.
So suppose that c  1. Then 3a  1 .mod 7/. This is impossible, since
ord7 3 D 6, the value of a such that 3a  1 .mod 7/ must be a multiple of
6, so must be even, contradicting the fact that a is odd.
Case (ii): Let a D 2c. Then 7b D .n 3c /.n C 3c /. Thus each of n 3c
and n C 3c is a power of 7. But 7 cannot divide both of these, so it follows
that n 3c D 1, and therefore 7b D 2  3c C 1. If c D 1, then b D 1, and
we obtain the solution a D 2; b D 1.
Now we assume that c > 1. Then 7b  1 .mod 9/. Since ord9 7 D 3, the
integer b must be a multiple of 3. Let b D 3d , then .73 /d D 2  3c C 1.
Since 73  1 .mod 19/, so 2  3c  0 .mod 19/, a contradiction.
Thus, the solutions are .1; 0/ and .2; 1/.
Lecture Notes on Mathematical Olympiad 185

5: When x ¤ 0; y ¤ 0, let .x; y/ D d so that x D x0 d; y D y0 d with


.x0 ; y0 / D 1. Then

y03 d 3 D 8x06 d 6 C 2x03 y0 d 4 y02 d 2 ) y03 d D 8x06 d 4 C 2x03y0 d 2 y02


) d 2 j .y03 d C y02 / ) d 2 j y02 .y0 d C 1/ ) d 2 j y02 ) d j y0 :

Let y0 D dy1 , then


Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

y13 d 4 D 8x06 d 4 C 2x03 y1 d 3 y12 d 2 ) y13 d 2 D 8x06 d 2 C 2x03 y1 d y12 :

Let .d; y1 / D e; d D ed0; y1 D ey2 . The last equality implies that d j y12 ,
so ed0 j e 2 y22 ) d0 j ey22 . Since .d0 ; y2 / D 1, so d0 j e. Let e D kd0 .
Then
by 217.174.237.134 on 09/27/15. For personal use only.

.kd02 /2 .kd0 y2 /3 D 8.kd02 /2 x06 C 2kd02 x03  kd0 y2 .kd0 y2 /2


) k 3 d05 y23 D 8d02 x06 C 2d0x03 y2 y22 ) d0 j y22 :

But .d0 ; y2 / D 1, so d0 D 1, hence d D e D k; y1 D dy2 . Then

d 3 y23 D 8x06 C 2x03 y2 y22 : (30.18)

Thus, y2 j 8x06 . Then .x0 ; y2 / D 1 implies that y2 j 8.


(i) If y2 D 1, then (30.18) implies that d 3 D 8x06 C 2x03 1. Since

.2x02 C 1/3 D 8x06 C 12x04 C 6x02 C 1 > 8x06 C 2x03 C 1; and


.2x02 1/3 D 8x06 12x04 C 6x02 1 < 8x06 C 2x03 1;
) d D 2x02 ) 2x03 D 1 ) x0 … Z;

a contradiction. A similar contradiction can be obtained for y2 D 1,


so there are no solutions when y2 D ˙1.
(ii) If y2 D 2, (30.18) yields 8d 3 D 8x06 C 4x03 4, i.e., .2d /3 D
8x06 C 4x03 4, so 8x06 C 4x03 4 is a cube of an even number.
If x0 > 0, then .2x02 /3  8x06 C 4x03 4 < .2x02 C 1/3 , so 8x06 C
4x03 4 D 8x06 , i.e., x0 D 1. Then

d D x0 D 1 ) x D 1 ) y 3 D 8 C 2y y 2 ) y D 2:

Thus, .1; 2/ is a solution.


If x0 D 1, then 8d 3 D 0 ) d D 0, which is impossible. If
x0  2, then

.2x02 2/3 < 8x06 C 4x03 4 < .2x02 /3 ) x0 j 3 ) no solution:

If y2 D 2, then 8d 3 D 8x06 4x03 4. d > 0 implies 2x06 x03


1 < 0, then x0 must be 0 and d has no solution.
186 Solutions to Testing Questions

(iii) If y2 D ˙4, (30.18) yields

.dy2 /3 D 8x06 ˙ 8x03 16 < 8x06 C 12x04 C 6x02 C 1 D .2x02 C 1/3 :

If dy2 D 2x02 , then 8x03 D ˙16, but this has no integer solution for
x0 .
When jx0 j  2, then .dy2 /3 D 8x06 ˙ 8x03 16 > 8x06 12x04 C
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

6x02 1 D .2x02 1/3 , hence there is no solution for x0 .


When x0 D ˙1,then .dy2 /3 D 0 or 16, hence there is no integer
solution for y2 .
(iv) When y2 D ˙8, Then .x0 ; y2/ D 1 ) 2 − x0 ) 16 − 8x06.
However
by 217.174.237.134 on 09/27/15. For personal use only.

8x06 D .dy2 /3 2x03 y2 C y22 ) 16 j 8x06;

a contradiction.
Finally, If x D 0 then y 3 D y 2 ) y D 0 or 1, so .0; 0/ and .0; 1/ are
solutions. If y D 0, then 8x 6 D 0 implies x D 0 only. Thus, the solutions
for .x; y/ are
.0; 0/; .0; 1/; .1; 2/:

Solutions to Testing Questions 23


Testing Questions (23-A)

1: The question is equivalent to finding all Pythagorean triples .x; y; z/ of the


equation x 2 C y 2 D z 2 with z D x C 1 or z D y C 1. Without loss of
generality we only discuss the case where z D y C 1. Then

x 2 D .y C 1/2 y 2 D 2y C 1;

hence x is odd. Let x D 2m C 1 with m 2 N0 , then

y D 2m.m C 1/; z D 2m2 C 2m C 1;

where m 2 N. Thus, the required Pythagorean triples .x; y; z/ are .2m C


1; 2m.m C 1/; 2m2 C 2m C 1/ and .2m.m C 1/; 2m C 1; 2m2 C 2m C 1/,
where m 2 N.

2: If y is odd, then x 2 C 2y 2  2 or 3 (mod 4) and z 2  0 or 1 (mod 4), a


contradiction. Therefore y is even. As y is even, x and z must both be odd.
Lecture Notes on Mathematical Olympiad 187

From .x; y/ D 1 we have .x; z/ D 1. Thus, one of .z C x/=2 and .z x/=2


is odd and
2y 2 D .z x/.z C x/:
zCx
When is odd, then
2
   
zCx zCx
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

;z x D ; z D .z C x; z/ D .x; z/ D 1:
2 2
z x
When is odd, then
2
 
 z x zCx
z C x; D ; z D .z C x; z/ D .x; z/ D 1:
by 217.174.237.134 on 09/27/15. For personal use only.

2 2

zCx
Thus, when y 2 D .z x/ and .z C x/=2 is odd, we have n; m 2 N
2
where m is odd with .n; m/ D 1, such that
zCx
z x D 4n2 and D m2 :
2
Therefore x D m2 2n2 and z D m2 C 2n2.
z x
When y 2 D .z C x/ and .z x/=2 is odd, we have n; m 2 N
2
where m is odd with .n; m/ D 1, such that
z x
z C x D 4n2 and D m2 :
2
Therefore x D 2n2 m2 and z D m2 C 2n2 . Thus, x D jm2 2n2 j; z D
m2 C 2n2.
3: Suppose that x0; y0 ; z0 is a positive integer solution of the equation x 4 C
y 4 D z 4 . Then x0; y0 ; z02 is a positive integer solution of the equation
x 4 C y 4 D z 2 , which contradicts the fact that the equation x 4 C y 4 D z 2
has no positive integer solution (cf. Example 1).
4: Take t 2 N odd and t  n. Let a D 2n 1 t n ; b D .2t 1/n a, then
   
1 n 1 n 1
b D .2t/n .1 / > .2t/n 1  0;
2t 2 2t 2

i.e. b is a positive integer. It is obvious that a is even and b is odd. If p is an


odd prime factor of a, then p j t, hence b  . 1/n (mod p) which means
that p does not divide b, therefore .a; b/ D 1. It’s clear that a > b.
188 Solutions to Testing Questions

For the pair .a; b/, the primitive Pythagorean triple a2 b 2 ; 2ab; a2 C b 2
has the sum
a2 b 2 C 2ab C a2 C b 2 D 2a.a C b/ D .2t/n .2t 1/n D Œ2t.2t 1/n
which is an nth power of 2t.2t 1/.
5: Answer (A). Let the two legs of the right triangle be a and b, and the hy-
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

potenuse be c. Then
a D k.p 2 q 2 /; b D 2kpq; c D k.p 2 C q 2 /;
where k; p; q 2 N with .p; q/ D 1 and p; q are one odd and one even.
Since ab D 6.a C b C c/,
by 217.174.237.134 on 09/27/15. For personal use only.

2k 2 pq.p 2 q 2 / D 12k.p 2 C pq/;


kq.p q/ D 6:
When k D 1, then .p; q/ D .5; 2/; .7; 6/.
When k D 2, then q.p q/ D 3, and .p; q/ D .4; 1/; .4; 3/.
When k D 3, then q.p q/ D 2, and .p; q/ D .3; 2/.
When k D 6, then q.p q/ D 1, and .p; q/ D .2; 1/.
Thus, .k; p; q/ D .1; 5; 2/; .1; 7; 6/; .2; 4; 1/; .2; 4; 3/; .3; 3; 2/; .6; 2; 1/.
6: When consider the value of y1 by checking 1; 2; 3;   , we find that the fun-
damental solution is x1 D 3; y1 D 2. Therefore, by formula (23.3), all the
positive integer solutions .xn ; yn / are given by
1 p p
xn D Œ.3 C 2 2/n C .3 2 2/n ;
2
1 p p
yn D p Œ.3 C 2 2/n .3 2 2/n ;
2 2
n D 1; 2;    :
For example, for n D 1; 2; 3; 4, .x; y/ D .3; 2/; .17; 12/; .99; 70/; .577; 408/
respectively.
7: Suppose that the equation has an integer solution. It is obvious that d has a
prime factor of the form 4k C 3, say q. Taking mod q to the given equation,
we obtain
x 2  1 .mod q/:
However, by Euler’s Criterion (cf. Appendix C),
 
1
D . 1/.q 1/=2 D 1;
q
Lecture Notes on Mathematical Olympiad 189

i.e., 1 is not a quadratic residue modulo q, we have arrived at a contradic-


tion.

Testing Questions (23-B)


Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

1: Squaring the first equation and then subtracting four times the second, we
obtain
x 2 6xy C y 2 D .z u/2 ;
from which we obtain
by 217.174.237.134 on 09/27/15. For personal use only.

 2    
x x z u 2
6 C1 D : ./
y y y
p
The quadratic ! 2 6!pC 1 takes the value 0 for ! D 3 ˙ 2 2, and is
positive for ! > 3 C 2 2. Because x=y  1 and the right side of ./ p is
a square, the left side of ./ is positive, so we must have
p x=y > 3 C 2 2.
We now show thatpx=y can be made as close to 3 C 2 2 as we like, so the
desired m is 3 C 2 2. We prove this by showing that the term ..z u/=y/2
in ./ can be made as small as we like.
To this end, we first find a way to generate solutions of the system. If p is
a prime divisor of z and u, then p is a divisor of both x and y. Thus we
may assume, without loss of generality, that z and u are relatively prime.
If we square both sides of the first equation and subtract twice the second
equation, it is obtained that

.x y/2 D z 2 C u2 :

Thus .z; u; x y/ is a primitive Pythagorean triple, and we may assume


that u is even. Hence there are relatively prime positive integers a and b,
one of them even and the other odd, such that

z D a2 b2; u D 2ab; and x y D a2 C b 2 :

Combining these equations with x C y D z C u, we find that

x D a2 C ab and y D ab b2:

Observe that z u D a2 b 2 2ab D .a b/2 2b 2 . When z u D 1, we


get the Pell equation 1 D .a b/2 2b 2, which has solution a b D 3; b D
2. By well known facts, this equation has infinitely many positive integer
solutions a b and b, and both of these quantities can be made arbitrarily
190 Solutions to Testing Questions

large. It follows that y D ab b 2 can be made arbitrarily large. Hence


the right side of ./ can be made as small asp
we like, and the corresponding
value of x=y can be made as close to 3 C 2 2 as we like.
Pk
2: Consider a special case: let ai D i; i D 1; 2; : : : ; n andd bk D i D1 ai .
Then
k.k C 1/ k
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

bk D m2 , D m2 ) < m
2 2
.k C 1/.k C 2/
) bkC1 D D m2 C k C 1 < .m C 1/2 ;
2
therefore bkC1 is not a perfect square. If we interchange ak and akC1 , then
bkC1 is not a perfect square and bk D m2 C 1 is not also. By continuing
by 217.174.237.134 on 09/27/15. For personal use only.

this operation, i.e. when a term bk in the sequence fb1 ;    ; bn g is a perfect


square, interchange ak and akC1 , we can obtain a non-quadratic permu-
n.n C 1/
tation unless k D n, namely D m2 . Conversely, It is clear that
2
when n satisfies this equation, every permutation of f1;    ; ng is a quadratic
permutation.
Let x D 2n C 1; y D 2m, then x 2 2y 2 D 1, so it becomes a Pell’s
1 p
equation. From the result of the Q6 in TQ(A), xk D Œ.3 C 2 2/k C .3
p 2
2 2/k , and
p p
xk 1 .3 C 2 2/k C .3 2 2/k 2
nD D ; k D 1; 2;    :
2 4

3: Note that for each prime p, the Pell’s equation x 2 py 2 D 1 has infinitely
many positive integer solutions .x; y/. Therefore for any prime p, there
exist infinitely many positive integers s; t with s > 3 such that

s2 1 D pt 2 :

For each such pair .s; t/, let x D s 2 1; y D s C 1; z D s 1, then x; y; z


are distinct and s 2 1 D pt 2 ¤ t.
If y D s C 1 D t, then

.s 1/.s C 1/ D pt 2 D p.s C 1/2 ) s 1 D p.s C 1/ > s 1;

a contradiction.
If z D s 1 D t, then

.s 1/.s C1/ D pt 2 D p.s 1/2 ) s C1 D p.s 1/  2.s 1/ ) s  3;


Lecture Notes on Mathematical Olympiad 191

a contradiction also. Thus, x; y; z; t are distinct. With these values of


x; y; z; t,
.x 2 C s 2 1/.y 2 C s 2 1/.z 2 C s 2 1/
D .s 2 1/s 2 .s C 1/  2s  2s.s 1/ D Œ2s 2.s 2 1/2 :
The conclusion is proven.
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

4: First of all we prove a lemma as follows.


Lemma. If the equation
Ax 2 By 2 D 1 (30.19)
has positive integer solutions (where A; B are both not perfect squares). Let
by 217.174.237.134 on 09/27/15. For personal use only.

its minimum positive integer solution be .x0 ; y0 /, then the Pell’s equation
x2 ABy 2 D 1 (30.20)
has positive integer solutions. If its minimum solution is .a0 ; b0 /, then
.a0 ; b0/ satisfies the equations
a0 D Ax02 C By02 ; b0 D 2x0y0 :

Proof of Lemma. Since .x0 ; y0 / is a solution of (30.19), so Ax02 By02 D


1. Let u D Ax02 C By02 ; v D 2x0y0 . Then
u2 ABv 2 D .Ax02 C By02 /2 AB.2x0 y0 /2 D .Ax02 By02 /2 D 1;
so .u; v/ is a solution of (30.20). Let .a0 ; b0/ be the minimum solution of
(30.20). If .u; v/ ¤ .a0 ; b0 /, then u > a0 ; v > b0 . Then
p p p
a0 ABb
p 0 < .a0p ABb p0 /.a0 C pABb0 / Dpa02 ABb02 D 1
) .a0 ABb0 /.pAx0 C By0 / < Ax p0 C pBy0 p
) .a0 x0 Bb0 y0 / A C .a0 y0 Ab0 x0 / B < Ax0 C By0 :

On the other hand,


p p p p 2
a0 C ABb0 < u C p ABv D . Ax0 C pBy0 /
) .a0 x0 Bbp0 y0 / A p .a0 y0 pAb0 x0 / B
D .ap0 C ABb
p 0 /. Axp0 By
p0 / p p
< . Ax0 C By0 /2 . Ax0 By0 / D Ax0 C By0 :

Let s D a0 x0 Bb0 y0 ; t D a0 y0 Ab0 x0 . The two inequalities above can


be written as
p p p p
As C Bt < Ax0 C By0 ; (30.21)
p p p p
As Bt < Ax0 C By0 : (30.22)
192 Solutions to Testing Questions

Now
As 2 Bt 2 D A.a0 x0 Bb0 y0 /2 B.a0 y0 Ab0 x0 /2
D .a02 ABb02 /.Ax02 By02 / D 1:

Note that
s>0
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

, a0 x0 > Bb0 y0 , a02 x02 > B 2 b02 y02 , a02 x02 > Bb02 .Ax02 1/
, .a02 ABb02 /x02 > Bb02 , x02 > Bb02 ;

and the last inequality is obvious so s > 0. Since

t D0 , a0 y0 D Ab0 x0 , a02 y02 D A2 b02 x02


by 217.174.237.134 on 09/27/15. For personal use only.

, .ABb02 C 1/y02 D Ab02 .By02 C 1/ , y02 D Ab02;

so t ¤ 0 as A is not a perfect square.


If t > 0, then .s; t/ is a solution of (30.19), so s  x0 ; t  y0 , which
contradicts the inequality (30.21).
If t < 0, then .s; t/ is a solution Of (30.19), so s  x0 ; t  y0 , then it
contradicts the inequality (30.22).
In summary, we must have u D a0 ; v D b0 . The lemma is proven.
We now return to the original problem. Suppose that

ax 2 by 2 D 1 (30.23)
by 2 ax 2 D 1 (30.24)

both have positive integer solutions.


Let .m; n/ be the minimum solution of the equation x 2 aby 2 D 1, .x1 ; y1 /
be the minimum solution of the equation (30.23), and .x2 ; y2 / be the mini-
mum solution of (30.24). By the lemma it is obtained that
 
m D ax12 C by12 ; m D bx22 C ay22 ;
and
n D 2x1 y1 ; n D 2x2 y2 :

Since ax12 D by12 C 1; ay22 D bx22 1, so

ax12 C by12 D bx22 C ay22 , 2by12 C 1 D 2bx22 1 , b.x22 y12 / D 1:

This is a contradiction since b > 1.

5: The given equation is equivalent to y 2 D .x p/.x C p/x. Discuss the


following two cases separately.
Lecture Notes on Mathematical Olympiad 193

(i) p − y. Then .x; p/ D .x p; p/ D .x C p; p/ D 1, therefore


.x p; x/ D .x C p; x/ D 1.
If x is even, then .x p; x C p/ D .x; x C p/ D 1. Hence x; x p; x C p
are all perfect squares. However x C p  3 or 7 (mod 8), a contradiction.
Therefore x is odd, and hence .x p; x C p/ D 2.
Let x D r ; x p D 2s ; x C p D 2t 2 . Then t 2
2 2
s 2 D p, i.e. t D
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

pC1 p 1
;s D . However
2 2
.p 1/2 p2 C 1 .8k C 3/2 C 1
r2 D x D .x p/ C p D Cp D D
2 2 2
 5 .mod 8/;
by 217.174.237.134 on 09/27/15. For personal use only.

a contradiction. Thus, the equation has no integer solution in the case p − y.


(ii) p j y. Note that x D 0 or p or p if y D 0, so .0; 0/; .p; 0/; . p; 0/
are three solutions of the given equation.
If y > 0, then .x p; x; x C p/ D p, so p 2 j y. Canceling p 3 from both
sides of the given equation, we obtain
pb 2 D .a
1/a.a C 1/;
x y
where a D ; b D 2 . Since y > 0, thus a; a 1; a C 1 are all positive,
p p
and p divides one of them.
When p j a 1, (i) if a 1 is odd, then a; aC1 must be both perfect squares,
and forcing a to be 0, a contradiction. (ii) If a 1 is even, let a 1 D
2pm; a D 2pm C 1; a C 2 D 2.pm C 1/. Then m; 2pm C 1; pm C 1 are
relatively prime pairwise, so they are all perfect squares, which we denoted
by r 2; s 2 ; t 2 respectively. We have a 1 D 2pr 2 ; a D s 2 ; a C 1 D 2t 2 , so
s 2 D t 2 C pr 2 . Since .s; t/ D 1, p divides only one of s C t and s t.
First we prove that when p j .s C t/, the equation
pb 2 D a.a 1/.a C 1/ (30.25)
has no solution. In fact,
a C 1 D 2t 2 ) a 1 D s 2 1 is divisible by 4 ) 2 j r ) 4 j .s 2 t 2 /:
   r 2  s C t   s t 
sCt s t
Now .s; t/ D 1 gives ; D 1. As D
2p 2 2 2p 2
s Ct 2 s t 2
we can let Dm ; D n with .m; n/ D 1. Thus,
2p 2
t D pm2 n2 ; (30.26)
s D pm2 C n2 ; (30.27)
194 Solutions to Testing Questions

r D 2mn: (30.28)

Since .t; r / D 1, so m; n have different parities, hence (30.26) yields t  3


or 7 (mod 8). From a C 1 D s 2 C 1 D 2t 2 we have the Pell’s type equation

2t 2 s 2 D 1: (30.29)
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

t1 D 1; s1 D 1 and t2 D 5; s2 D 7 are two specific solutions, and we have


the recursive formula for the general solution further

tnC1 D 3tn C 2sn; (30.30)


snC1 D 4tn C 3sn : (30.31)
by 217.174.237.134 on 09/27/15. For personal use only.

Thus,
tnC2 D 6tnC1 tn : (30.32)
By induction, it is easy to find that for the sequence ftn g and k 2 N,

t4kC1  1; t4kC2  5; t4kC3  5; t4kC4  1 .mod 8/:

Therefore ti  1 or 5 (mod 8), which contradicts t  3 or 7 (mod 8). Thus,


we have proven that the equation (30.25) has no solution.
Next, we prove that when p j .s t/, the equation (30.25) also has no
solution.
t Cs s t
In this case we let D m2 ; D q 2 , then .m; q/ D 1. From (30.30)
2 2p
and (3.31) we obtain

tnC2 D 6tnC2 tn ;
snC2 D 6snC1 sn :

sn C tn
Let dn D . Then dnC2 D 6dnC1 dn with d1 D 1; d2 D 6. Solving
2
the recurrence relation yields
1 p p
dn D p Œ.3 C 2 2/n .3 2 2/n :
4 2

Below we prove that starting from the second term, all the terms of the
sequence fdn g are not perfect squares. For this we construct the sequence
of integers fcn g defined by
1 p p
cn D Œ.3 C 2 2/n C .3 2 2/n :
2
Lecture Notes on Mathematical Olympiad 195

Then cn2 8dn2 D 1. To prove our claim, it remains to show that the equation
x 2 8y 4 D 1 has no other positive integer solutions besides x D 3; y D 1.
We need to prove the following lemma first:
Lemma. The equation x 4 2y 2 D 1 has no other positive integer solu-
tion besides .x; y/ D .1; 1/.
Proof of Lemma. The given equation is equivalent to y 4 D x 4 C.y 2 1/2 .
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

From the result of Example 2, the only positive integer solution is .1; 1/.
Now we return to the original problem.
Note that x 2 8y 4 D 1 , x 2 1 D 8y 4 , .x C 1/.x 1/ D 8y 4 .
Since .x C 1; x 1/ D 2, let y D 2r uv, where .u; v/ D 1 and 2 − uv. The
x 1 xC1
D 2.2r uv/4 yields
by 217.174.237.134 on 09/27/15. For personal use only.

equality 
2 2
8̂ 8̂
xC1 xC1
< D 24r C1v 4 ; < D u4 ;
2 or 2
:̂ x 1 D u4 ; :̂ x 1 D 24r C1v 4 :
2 2
Thus,
1 D 24r C1v 4 u4 (30.33)
or
1 D u4 24r C1v 4 : (30.34)
(30.33) is also u4 24r C1v 4 D 1. From above Lemma, its only solution
is u D v D 1; r D 0, so x D 3; y D 1.
(30.34) is also .u2 /2 2.2r v/4 D 1. Let u2 D ˛; 2r v D ˇ, (30.34) then
becomes
˛2 2ˇ 4 D 1: (30.35)
Below we show that (30.35) has no integer solution. Otherwise, ˛ must
be odd. Let ˛ D 2l C 1, then 2l.l C 1/ D ˇ 4 . Let ˇ D 1 2 , where
.1 ; 2 / D 1.
If l is odd, then .2.l C1/; l / D 1, so l D 41 ; 2.l C1/ D 42 . Let 2 D 2t 3 ,
then 41 C 1 D 24t 1 43 , therefore

41 C .1 24t 2 4 2
3 / D .22t 1 2 4
3 / :

By the result of Example 2, it has no positive integer solution.


If l is even, then .2l; l C 1/ D 1, and 2l D 41 ; l C 1 D 42 . Let 1 D 2w 4 ,
then 42 D 1 C 24w 1 44 , so

42 C .22w 1 2 4
4 / D .1 C 24w 2 4 2
4 / :
196 Solutions to Testing Questions

By the result of Example 1, above equation has no positive integer solution.


Thus, we have proven that starting from the second term, the terms of fdn g
are all not perfect squares. Since d1 D 1; s1 D t1 D 1, so a D 1; b D 0,
i.e., there is no non-zero integer solution when p j .s t/.
(2) When p j .a C 1/, (i) if a C 1 is odd, similar to (1) (i) a contradiction
will be obtained.
(ii) If a C 1 is even, let a C 1 D 2px 2; a D y 2 ; a 1 D 2z 2 . a is
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

odd implies that y D 2l C 1, so a D .2l C 1/2 D 4l.l C 1/ C 1.


Therefore a C 1 D 2Œ2l.l C 1/ C 1. Hence px 2 is odd, so x is
odd. Since z 2 C 1  1 or 5 (mod 8), but px 2  3 (mod 8), which
contradicts the equality z 2 C 1 D px 2.
a
by 217.174.237.134 on 09/27/15. For personal use only.

(3) When p j a, if a ¤ 0 is even, then a 1; ; aC1 are relatively prime


p
pairwise, so they are all perfect squares, but a 1 and a C 1 cannot be
squares at the same time, so a is odd, hence .a 1; a C 1/ D 2. Let
a 1 D 2r 2; a C 1 D 2s 2. Then s 2 r 2 D 1, namely s D 1; r D 0.
Thus, a D 1 and it contradicts p j a. Hence there is no solution in
this case.
In summary, this problem has exactly three integer solutions
.0; 0/; .p; 0/; . p; 0/:

Solutions to Testing Questions 24


Testing Questions (24-A)

1: (i) For modulo 7,


j 1 2 3
r  j 2 .mod 7/ 1 3 2

Thus, 1; 2; 3; are the quadratic residues modulo 7, and 1; 2; 3 are the


quadratic non-residues modulo 7.
(ii) For modulo 11,
j 1 2 3 4 5
r  j 2 .mod 11/ 1 4 2 5 3

Thus, 1; 2; 3; 4; 5 are the quadratic residues modulo 11, and 1; 2; 3; 4,


5 are the quadratic non-residues modulo 11.
(iii) For modulo 17,
Lecture Notes on Mathematical Olympiad 197

j 1 2 3 4 5 6 7 8
r  j 2 .mod 17/ 1 4 8 1 8 2 2 4

Thus, ˙1; ˙2; ˙4; ˙8 are the quadratic residues modulo 17, and ˙3; ˙5,
˙6; ˙7 are the quadratic non-residues modulo 17.
(iv) For modulo 19,
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

j 1 2 3 4 5 6 7 8 9
r  j 2 .mod 19/ 1 4 9 3 6 2 8 7 5

Thus, 1; 2; 3; 4; 5; 6; 7; 8; 9 are the quadratic residues modulo 19, and


1; 2; 3; 4; 5; 6; 7; 8; 9 are the quadratic non-residues modulo 19.
by 217.174.237.134 on 09/27/15. For personal use only.

2: Suppose that there are finitely many primes of form 4k C 1. Denote them by
p1 ; p2 ; : : : ; pm.
Consider the number p D .2p1 p2    pm /2 C 1. Note that p cannot have
any pi as a prime factor and p  1 .mod 4/, so p is not a prime. Let p0 be
a prime factor of p, then p0 is odd and 1 is a quadratic residue modulo p0 ,
so p0  1 .mod 4/. However, p0 is different from each of p1 ; p2; : : : ; pm ,
a contradiction.
Thus, there must be infinitely many primes of form 4k C 1.
p 1
3: When 1 is a quadratic residue modulo p, then, by Euler’s Criterion, . 1/ 2 D
1, so p 2 1 D 2k for some k 2 N, hence p D 4k C 1.
p 1
Conversely, if p D 4k C 1 where k 2 N, then . 1/ 2 D . 1/2k D 1, so
by Euler’s Criterion again, 1 is a quadratic residue modulo p.
4: (i) . 2/33  .26 /5  8  . 3/5  8  1944  1 .mod 67/, therefore it
has two solutions;
(ii) 233  . 2/33  1 .mod 67/, no solution;
18
(iii) . 2/  .2 /  23  . 5/3  8 
5 3
1000  1 .mod 37/, no
solution;
(iv) Since 218 D . 2/18  1 .mod 37/, no solution;
(v) Since 221 D 13  17, and . 1/6  1 .mod 13/; . 1/8  1 .mod 17/,
so there are 2  2 D 4 solutions;
(vi) Since 427 D 761, and . 1/3  1 .mod 7/; . 1/30  1 .mod 61/,
no solution.
p 1 2
 
2 2
5: As shown in the Theorem I, 1 ; 2 ;    ; are the non-zero quadratic
2
residues modulo p, and 1 is also a quadratic residue modulo p.
198 Solutions to Testing Questions

 
p p p 1 k2
When k > , then p k < , i.e. p k  2
, and D
  2 2 p
.p k/2
, so
p
p 1
p
X1   2  
k2 X k2
D2 :
p p
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

kD1 kD1
    
b 1 b
Since D , so b is a quadratic residue modulo p if and
p p p
only if b (and therefore p b) (is a quadratic residue. )Therefore with
p 1 2
 
respect to modulo p, the set S D 12 ; 22; : : : ; is a set of the
by 217.174.237.134 on 09/27/15. For personal use only.

2
p 1
form fa1 ; p a1; a2 ; p a2 ; : : : ; a p 1 ; p a p 1 g, where 1  ai  .
4 4 2
p 1 ai
For any two integers ai and p ai with 1  ai  , since C
    2 p
p ai ai p ai
D 1, so C D 1. Therefore
p p p
p 1
2  2
X k p 1 p 1
2 D2 D :
p 4 2
kD1

6: Note that if x 2  a .mod p/ has a solution x0 with 0 < x0 < p, where


.a; p/ D 1, then x0 is also a solution, and there is no other solution x 0
with 0 < jx 0 j < p. Otherwise, let x 0 be another solution. We can assume
0 < x 0 < p (since x 0 is also a solution). Note that x 0 x0 6 0 .mod p/
and x 0 C x0 6 0 .mod p/,

x02  .x 0 /2  a .mod p/ ) .x0 x 0 /.x0 C x 0 /  0 .mod p/

which implies p j .x0 x 0 / or p j .x0 C x 0 /, a contradiction.


Let f .x/ D x 3 x. Then f .x/ is an odd function.
For p D 2, there are two desired solutions for .x; y/: .0; 0/; .1; 0/.
      
a 1 a a
For prime p with p  3 .mod 4/, since D D ,
p p p p
so between y 2  f .x/ and y 2  f .x/ exactly one has a solution and
the other has no solution. If among the equations y 2  f .x/ on x D
p 1 pC1 pC3
2; 3; : : : ; , k equations have solutions, then on x D ; ; : : :,
2 2 2
Lecture Notes on Mathematical Olympiad 199

p 3
p 2, k equations of y 2  f .x/ have solutions. In conclusion,
2
p 3
on x D 2; 3; : : : ; p 2, among the p 3 equations y 2  f .x/,
2
of them have solutions. Since an equation if has one solutions, then it has
exactly two solutions, so there are a total of 2  p 2 3 D p 3 solutions. Since
the equation has one solution on x D 0; 1 and p 1, so it has a total of p
solutions.
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

      
a 1 a a
For prime p with p  1 .mod 4/, since D D ,
p p p p
2 2
so y  f .x/ and y  f . x/ both have two solutions or both have no
solutions. If k of the equations y 2  f .x/ have two solutions each on
p C1 p C3
x D 2; 3; : : : ; p 2 1 , then k of the equations on x D
by 217.174.237.134 on 09/27/15. For personal use only.

; ; ;p
2 2
2 have two solutions each. Hence, on x D 2; 3; : : : ; p 2 the equation
y 2  f .x/ .mod p/ has a total of 4k solutions. Since the equation has
one solution on each of x D 0; 1; p 1, so y 2  f .x/ .mod p/ has a total
of 4k C 3 solutions, i.e., any p D 4k C 1 does not satisfy the requirement.
Thus, p D 2 or all primes p with p  3 .mod 4/ satisfy the requirement.

7: We first prove the proposition by induction on k: For each positive integer k,


there exists a positive integer ak such that ak2  7 .mod 2k /.
By observation, 4  2 7 D 12 ; 2  22 7 D 12 and 1  23 7 D 12 means
that a1 ; a2 ; a3 can be 1.
Assume that for some k  3 there exists a positive integer ak such that
ak2  7 .mod 2k /. Below we consider the remainder of ak2 modulo 2kC1 .
(i) If ak2 D .2n/.2k / 7 7 .mod 2kC1 /, then let akC1 D ak .
(ii) If ak2 D .2n C 1/.2k / 7  2k 7 .mod 2kC1 /, then let akC1 D
ak C 2k 1 . Since ak is odd, so
2
akC1 D ak2 C 22k 2
C 2k ak  ak2 C 2k  7 .mod 2kC1 /:

The induction proof is completed.


As ak has no upper bound, so it is possible to let ak2  2k 7, therefore fak g
contains infinitely many distinct numbers. Thus, the conclusion is proven.

Testing Questions (24-B)

1: First we need to prove two lemmas:


200 Solutions to Testing Questions

Lemma 1. If p is a prime of form 4k C 3, then x 2 C y 2  0 .mod p/ ,


x  y  0 .mod p/.
 
1 p 1
Proof of Lemma 1 Euler’s Criterion gives D . 1/ 2 D 1,
       p
d 1 d d
therefore D D for 1  d  p 1. Hence
p p p p
between d and d only one is quadratic residue modulo p. If xy 6 0
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

.mod p/, then x 2 C y 2 6 0 .mod p/, therefore x 2 C y 2  0 .mod p/ )


x  y  0 .mod p/. The inverse is obvious: x  y  0 .mod p/ )
x 2 C y 2  0 .mod p/.
Lemma 2. If p is a prime of form 4k C 3, there exist x0 ; y0 2 N such that
x02 C y02 C 1  0 .mod p/.
by 217.174.237.134 on 09/27/15. For personal use only.

   
d d
Proof of Lemma 2 Since D for 1  d  p 1, there are
p p
pC1
quadratic residue modulo p (including 0). The sets A D f0; 12; 22; : : :,
2
.p 1/2 g and B D f02 1; 12 1; : : : ; .p 1/2 1g each contains pC1 2
distinct values modulo p, so by the pigeonhole principle, there must be at
least one common value of A and B, namely there exist x02 2 A; y02 1 2
B such that
x02  y02 1 .mod p/ or equivalently; x02 C y02 C 1  0 .mod p/:
Now we return to the original problem.
By Lemma 2, take x0 ; y0 2 N such that x02 C y02  1 .mod p/. By
Lemma 1, x0 y0 6 0 .mod p/. Therefore
Œ.ix0 /2 C .iy0 /2 2  i 4 .mod p/; i D 0; 1; 2; : : : ; p 1:
pC1
Let qi  i 2 .mod p/, then there are distinct such qi . Lemma 1
2
indicates that there are no i; j 2 f1; 2; : : : ; p 1g such that qi C qj  0
pC1
.mod p/, so fq02 ; q12 ; : : : ; qp2 1 g takes values modulo p.
2
p C1
In summary, the number of different residues mod p is .
2
p 1
2: Based on Theorem I in this lecture for any odd prime p there are 1 C 2
D
pC1
2
distinct quadratic residues modulo p.
If there is integer x such that x 2 C ax C b  0 .mod 167/, then there is a
pair .x; y/ of integers which satisfies the given equation. Since
x 2 C ax C b  0 .mod 167/ , 4x 2 C 4ax C 4b  0 .mod 167/
, .2x C a/2  a2 4b .mod 167/;
Lecture Notes on Mathematical Olympiad 201

so for fixed a, b can take on any value such that a2 4b is a quadratic residue
modulo 167. Since the number of allowed distinct values for a2 4b modulo
167 C 1
167 is D 84, so each a corresponds to 84 choices for b modulo
2
167. Since 2004=167 D 12, so to a given a there are 84  12 choices for b.
Since there are 2004 choices for a, the number of the pairs .a; b/ is

2004  84  12 D 2020032:
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

p 1 p 1
3: Since .q 2 C 1; q 2 1/ D 2 for any odd number q, if there exist an
integer x and a prime number p satisfying px 2 D q p 1 1, then there
exist integers y; z which satisfy one of the following systems.
by 217.174.237.134 on 09/27/15. For personal use only.

p 1 p 1
(i) q 2 1 D 2py 2 and q 2 C 1 D 2z 2 ;
p 1 p 1
(ii) q 2 1 D 2y 2 and q 2 C 1 D 2pz 2 .

p 1
(a) Let q D 7. Since
 7 2 1 D 2y 2 ) 2y 2  6 .mod 7/ ) y 2  3
3 7 1
.mod 7/, but  3 2  1 .mod 7/, we arrive at a contradiction.
7
Hence (ii) is not satisfied.
p 1
For system (i), 6 j .7 2 1/ D 2py 2 ) 3 j py 2 . If p D 3, then
2
7 1
D 42 , so p D 3 satisfies the requirement. If p ¤ 3, then 3 j
3 ˇ
2 p 1 ˇp 1
y ) 9 j .7 2 1/ ) 3 ˇˇ . Let k D .p 1/=6, then 2z 2 D
2
73k C 1 D .7k C 1/.72k 7k C 1/. Since gcdf.7k C 1/=2; 72k 7k C 1g D
gcdf7k C 1; 72k 7k C 1g D 1, so 72k 7k C 1 is a perfect square. However

.7k 1/2 < 72k 7k C 1 < .7k /2

indicates that it is impossible. Thus, p D 3 is the unique solution for p.


p 1
(b) Let q D 11. Since11 2 C 1 D 2z 2 ) 2z 2  12 .mod 11/ )
6 11 1
z 2  6 .mod 11/, but  6 2  1 .mod 11/, we arrive at a
11
contradiction. Hence (i) is not satisfied, we only have to consider the system
(ii).
p 1 p 1
11 2 C 1 D 2pz 2 ) 11 2  1 .mod p/
p 1
) 2y 2 D 11 2 1  2 .mod p/
p 1
2
) y  1 .mod p/ ) . 1/ 2 D 1 ) p  1 .mod 4/:
202 Solutions to Testing Questions

p 1 p 1 p 1
Now 11 2 1 D 2y 2 ) .11 4 1/.11 4 C 1/ D 2y 2 , and it implies
p 1 p 1
2 2
11 4 C 1 D u or 11 4 C 1 D 2u for some u. However
p 1
11 4 C 1 D u2 ) ..u 1/; .u C 1//  11;
p 1
11 4 C 1 D 2u2 ) 2u2  1 .mod 11/ ) u2  6 .mod 11/;

11p 1
1
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

and both are impossible. Thus, there is no prime p such that is


p
a perfect square.

4: "First we prove the following lemma:


Lemma For any odd natural number n, the number 3n C 1 has no odd
by 217.174.237.134 on 09/27/15. For personal use only.

prime factor of form 3k C 2.


Proof of Lemma Let p be an odd prime factor of 3n C 1. Then
 
 nC1 2 3
3n C 1  0 .mod p/ ) 3 2  3 .mod p/ ) D 1:
p
 
1 p 1
By Euler’s Criterion, D . 1/ 2 . By the quadratic reciprocal law,
p
  
3 p 3 1 p 1 p 1
D . 1/ 2  2 D . 1/ 2 ;
p 3
so
p p   3 p   3   1 h i
p 1 2
D D D . 1/ 2 D 1:
3 3 p 3 p p
       
1 2 1 1
Since D 1 and D D D 1, so p is not of the
3 3 3 3
form 3k C 2.
We now return to the original problem.

6m j Œ.2m C 3/n C 1 , 6m j Œ.2m/n C 3n C 1



.2m/n  2 .mod 3/ ./
,
3n C 1  0 .mod 2m/: ./

(The sufficiency of the last condition is obvious: the second congruence


only holds when .m; 3/ D 1. In this case, we can apply the Chinese Re-
mainder Theorem.)
Lecture Notes on Mathematical Olympiad 203

(1) If 6m j Œ.2m C 3/n C 1, then () and () hold at the same time.
() implies that m  1 .mod 3/ and n is odd. If m is even, since n
is odd, then 3n C 1  0 .mod 4/ and 3n C 1  4 .mod 8/. There-
fore 22 k.3n C 1/. () implies that 22k2m, so 2km. Since m  1
.mod 3/, so m D 6k0 C 4 for some k0 2 N, and 12k0 C 8 D 2m j
.3n C 1/.
The Lemma indicates that all odd prime factors of 3n C 1 are of the
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

form 3k C 1, hence all odd factors of 3n C 1 are of form 3k C 1 also.


However, 3k0 C 2 is an odd factor of 3n C 1, a contradiction. Thus,
m is not even.
Since 2m j .3n C 1/ and 22 j .3n C 1/, 4m j .3n C 1/ is obtained at
once.
If 4m j .3n C 1/, then 4 j .3n C 1/ ) n is odd. If m is even, then
by 217.174.237.134 on 09/27/15. For personal use only.

(2)
8 j .3n C 1/. However 3n C 1  4 .mod 8/, so m must be odd, thus
m is of form 3k C 1. From 2m j .3n C 1/ and .2m/n  2n  2
.mod 3/,

.2m C 3/n C 1  .2m/n C 3n C 1  0 .mod 2m/ and


.2m C 3/n C 1  .2m/n C 3n C 1  0 .mod 3/;

therefore 6m j Œ.2m C 3/n C 1.


5: The conclusion is clear for n D 0. For n  1, the left hand side can be
rewritten as follows:
( ) p 1 ( )
p
X1 k 2n 2 n
1 X k2 1
C D 2 C
p 2 p 2
kD1 kD1 ! p 1$ n %!
p 1 n
X k2 1 X k2 1
D 2 C C
p 2 p 2
kD1 0 kD1 1
p 1 p 1 $ %
2 2 2n
p 1 B1 X n
X k 1 C
D C2@ k2 C A:
2 p p 2
kD1 kD1

p 1 $ % p 1
n
2
X k2 1 1 X2
n
Below we show that C D k2 .
p 2 p
kD1 kD1
$ n % $ % $ n%
2 2n
k 1 2k k2 p 1
It is easy to see that C D ;1  k  .
p 2 p p 2
$ n
%
2n 2k 2
For each k 2 f1; 2; : : : ; .p 1/=2g, write 2k D p C rk ; rk 2
p
204 Solutions to Testing Questions

f1; 2; : : : ; p 1g. Since p  7 .mod 8/, 2 is a quadratic residue modulo


p, so each rk is also a quadratic residue modulo p.
Below we show that rk ¤ rl if k ¤ l . Suppose that rk D rl , then
n
Y1
n n j j
0 D rk rl  2.k 2 l 2 /  2.k l/ .k 2 C l 2 / .mod p/:
j D0
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

Since 1  k; l  p 2 1 implies that k C l 6 0 .mod p/, and if j  1 then


j j
k 2 C l 2 6 0 .mod p/ since 1 is a quadratic non-residue modulo p  7
.mod 8/. Hence k l  0 .mod p/. However, 1  k; l  p 2 1 , so k D l ,
a contradiction.
p 1
by 217.174.237.134 on 09/27/15. For personal use only.

Thus, we have proven that frk g is the set of distinct quadratic residues
2
modulo p.
n
Similarly, the remainders rk0 of k 2 modulo p for k D 1; 2; : : : ; p 2 1 also
p 1 p 1
2
X 2
X
form a system of quadratic residues modulo p, therefore rk D rk0 .
kD1 kD1
Thus,
p 1 $ % p 1 $ % p 1 $ %
2 n 2 n 2 n
X k2 1 X 2k 2 X k2
C D
p 2 p p
kD1 kD1 kD1
p 1 p 1 p 1
2 2 2
1 X n 1 X 2n 1 X n
D .2k 2 rk / .k rk0 / D k2 :
p p p
kD1 kD1 kD1

Solutions to Testing Questions 25


Testing Questions (25-A)

p p
xC y
1: Changing the inequality to the form p  k, the problem becomes
p 2x C y
p
xC y
to find the maximum value of p when x; y > 0.
2x C y
By the Cauchy-Schwartz inequality,
   
p p 1 p p 2 1
. x C y/2 D p  2x C 1  y  C 1 .2x C y/;
2 2
Lecture Notes on Mathematical Olympiad 205

p p r p p p
xC y 3 6 6 6 1
namely p  D , so k  . If k < , x D ;y D 1
2x C y 2 2 2 2 4
then gives
p
p p 3 6 p p
xC y D D  2x C y > k 2x C y;
2 2
"p !
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

6
so the range of k is ; C1 .
2

2: The Cauchy-Schwartz inequality yields


1 1 C y C z2 1 1 C z C x2
 ;  ;
by 217.174.237.134 on 09/27/15. For personal use only.

x2 CyC1 .x C y C z/2 y2 Cz C1 .x C y C z/2


1 1 C x C y2
 :
z2 C x C 1 .x C y C z/2
Adding these inequalities together, we obtain
1 1 1 3 C x C y C z C x2 C y2 C z2
C 2 C 2  :
x2 Cy C1 y Cz C1 z Cx C1 .x C y C z/2
Denote the right hand side of the last inequality by S , then it suffices to
show that S  1. In fact,
S  1 , 3 C x C y C z  2.xy C yz C zx/ , 3  x C y C z;
.x C y C z/2
and since x CyCz D xyCyzCxz  , the needed inequality
3
is proven at once. Thus, the original inequality is proven.
a2 b2 c2 b2
3: Let A D C C ; B D C
ab 2 .4 ab/ bc 2.4 bc/ ca2 .4 ca/ ab 2 .4 ab/
c2 a2
2
C 2 , then it suffices to show that A  1 and B  1.
bc .4 bc/ ca .4 ca/
By the Cauchy-Schwartz inequality,

1 2
   
4 ab 4 bc 4 ca 1 1
C C A C C :
a b c a b c
1 1 1 k2
Let k D C C , then A  . The Cauchy-Schwartz inequality
a b c 4k 3
1 1 1 1 1 1
gives .a C b C c/ C C  9, so k D C C  3. Hence
a b c a b c
k2 .4k 3/ D .k 3/.k 1/  0 ) k 2  4k 3 ) A  1:
206 Solutions to Testing Questions

1 1 1
Since B D C C , so the Cauchy-Schwartz
a.4
ab/ b.4 bc/ c.4 ca/
1 2
   
4 ab 4 bc 4 ca 1 1
inequality gives C C B  C C D
a b c a b c
k2
k 2 . Hence B   1.
4k 3
Thus, A C 3B  4.
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

a bc 2bc 2bc
4: Note that 1 D D , and similarly,
a C bc 1 b c C bc .1 b/.1 c/
b ca 2ca c ab 2ab
1 D ;1 D , so the orig-
b C ca .1 c/.1 a/ c C ab .1 a/.1 b/
by 217.174.237.134 on 09/27/15. For personal use only.

inal inequality is equivalent to

2bc 2ca 2ab 3


C C  :
.1 b/.1 c/ .1 c/.1 a/ .1 a/.1 b/ 2

By simplification, the above inequality is equivalent to

4.bc C ca C ab 3abc/  3.bc C ca C ab C 1 a b c abc/;

1 1 1
namely ab C bc C ca  9abc, or C C  9. By the Cauchy-Schwartz
a b c
inequality,
 
1 1 1 1 1 1
C C D .a C b C c/ C C  9:
a b c a b c

n n  
X xi .2xi xi C1 xi C2 / X 2xi2
5: Note that 0, xi 0
xi C1 C xi C2 xi C1 C xi C2
i D1 i D1
n n
X xi2 1 X
,  xi ; where xnC1 D x1 ; xnC2 D x2 : ./
xi C1 C xi C2 2
i D1 i D1

By the Cauchy-Schwartz inequality,

n n n
!2
X xi2 X X
 .xi C1 C xi C2 /  xi :
xi C1 C xi C2
i D1 i D1 i D1

n
X
When both sides are divided by 2 xi , then () is obtained.
i D1
Lecture Notes on Mathematical Olympiad 207

6: By the Cauchy-Schwartz inequality, for any x1 ; x2; : : : ; xn > 0, we have the


inequality
n
1 1 X 1
Pn  2 :
i D1 xi n xi
i D1
Since a1 C a2 C    C an D 1 and n > 2,
n n
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

X 1 X 1
D Pn
ai .ai C n 2/ ai j D1; .1 aj /
i D1 i D1 j ¤i
n n n X
n
X 1 X 1 1 X 1
 D :
.n 1/2 ai .1 aj / .n 1/2 ai .1 aj /
i D1 j D1; j D1 iD1;
j ¤i i¤j
by 217.174.237.134 on 09/27/15. For personal use only.

Since 0 < ai < 1 for i D 1; 2; : : : ; n, so for any i; j 2 f1; 2; : : : ; ng; i ¤


j; a0 D an ; anC1 D a1 ,
Qn Qn
kD1 ak ak
ai  and aj C1  kD1 :
ai 1 aj aj 1 aj
n n Q n n
kD1 ak aj 1
X X X
So ai  ) .1 aj /  Qn  , namely
iD1; iD1;
ai aj kD1 ak iD1;
ai
i¤j i¤j i¤j
n
X 1 1
 Qn . Thus,
iD1;
ai .1 aj / kD1; ak
k¤j
i¤j

n n
X 1 1 X 1
 Qn ;
ai .ai C n 2/ .n 1/2 kD1; ak
i D1 j D1 k¤j

and hence
Yn
ak
n kD1; n n Pn
1 j D1 aj 1
X k¤i
Y X
D ak   D .
ai C n 2 ai .ai C n 2/ .n 1/2 .n 1/2
i D1 kD1 i D1

1 1 1
7: By the AM-GM inequality, B  C C , and
b c a
A .a C b C c/
a4 C b 4 C c 4 a2 b 2 b 2 c 2 c 2a2
D
.a C b/.b C c/.c C a/
1
D  Œ.a2 b 2 /2 C .b 2 c 2 /2 C .c 2 a2 /2   0:
2.a C b/.b C c/.c C a/
208 Solutions to Testing Questions

Thus, by the Cauchy-Schwartz inequality,


 
1 1 1
AB  .a C b C c/  C C  .1 C 1 C 1/2 D 9:
a b c

8: By the Cauchy-Schwartz inequality,


 
a4 b4 c4
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

.b 2 CcCc 2 CaCa2Cb/ 2 C 2 C 2  .a2 Cb 2 Cc 2/2 :


b Cc c Ca a Cb
Thus,
a4 b4 c4 .a2 C b 2 C c 2/2
C C  :
b2 C c c2 C a a2 C b a2 C b 2 C c 2 C 3
by 217.174.237.134 on 09/27/15. For personal use only.

1
Let a2 C b 2 C c 2 D x, then x  .a C b C c/2 D 3, hence
3
x2 3
 , 2x 2  9 C 3x , 2x 2 3x 90
3Cx 2
, .2x C 3/.x 3/  0;
which obviously holds since x  3. Thus, the original inequality is proven.
9: We may assume that x > y > z. denote x D z C a C b; y D z C b, where
a; b > 0. Then
 
1 1 1
.xy C yz C zx/ C C
.x y/2 .y z/2 .z x/2
 
1 1 1
D Œ.z C a C b/.z C b/ C z.2z C 2b C a/  2 C 2 C
a b .a C b/2
 
1 1 1
 .a C b/b 2 C 2 C ; (30.36)
a b .a C b/2
where the equality holds if and only if z D 0. It suffices to show that
 
1 1 1
.a C b/b 2 C 2 C  4: (30.37)
a b .a C b/2

Let a D b where  > 0. Then


 
1 1
.30:37/ , . C 1/ 2 C 1 C  4: (30.38)
 . C 1/2
After simplification, we find that

.30:38/ , 4 23 2 C 2 C 1  0 , .2  1/2  0;


Lecture Notes on Mathematical Olympiad 209

p
1C 5
which is obvious. Further, the equality holds if and only if  D .
2
In summary, we have proven the original
p
inequality, and the equality holds
if and only if fx; y; zg D f0; t; 1C2 5 tg, where t > 0.
10: The AM-GM inequality implies x 2 C y 2 C z 2  xy C yz C zx, so
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

1 2 1
.x C y C z/2  3.xy C yz C zx/ ) C .xy C yz C zx/  :
9 27 3
x3 y3 z3 1
Hence it suffices to show C C  .
y3 C 8 z3 C 8 x3 C 8 3
Since .x 3 C y 3 C z 3/2  3.x 3 y 3 C y 3 z 3 C z 3 x 3 /, by the Cauchy-Schwartz
by 217.174.237.134 on 09/27/15. For personal use only.

inequality and the AM-GM inequality,

x3 y3 z3
C 3 C 3
y3 C8 z C8 x C8
.x 3 C y 3 C z 3 /2
 3 3
x y C y 3 z 3 C z 3 x 3 C 8.x 3 C y 3 C z 3 /
.x 3 C y 3 C z 3 /2
 1
3
.x 3 C y 3 C z 3 /2 C 8.x 3 C y 3 C z 3 /
x3 C y3 C z3
D 1 3 :
3
.x C y 3 C z 3 / C 8

x3 C y3 C z3 1
Since 1
 , x 3 C y 3 C z 3  3, by the Cauchy-
3
.x 3 3
Cy Cz /C8 3 3
Schwartz inequality, .x C y C z/.x 3 C y 3 C z 3 /  .x 2 C y 2 C z 2 /2 and
.1 C 1 C 1/.x 2 C y 2 C z 2 /  .x C y C z/2 , so
 2
.x C y C z/2
.x C y C z/.x 3 C y 3 C z 3 /  .x 2 C y 2 C z 2 /2  D 9;
3
) x 3 C y 3 C z 3  3;

as desired.
210 Solutions to Testing Questions

Testing Questions (25-B)

X
1: From Schur’s inequality with r D 2, x 2 .x y/.x z/  0, it follows
that
X X X
x4  x 3 .y C z/ xyz x;
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

X 2 X  
x2  x.y 3 C z 3 / C x 2 .y 2 C z 2 yz/ ;
X 2 X   X
x2  x.y 2 C z 2 yz/  x: ./

1 1 1
Let x D ; y D ; z D and substitute them into (), we obtain
a b c
by 217.174.237.134 on 09/27/15. For personal use only.

X 2 X    X
1 1 1 1 1 1
2
 2
C 2
 :
a a b c bc a
Applying the Cauchy-Schwartz inequality yields
X b2c2 X b 2 bc C c 2 X 1 2
  ;
a3 .b 2 bc C c 2 / ab 2 c 2 a2
X b2c2 X1
) 3 2 2
 :
a .b bc C c / a
X  X 
1 X
It suffices to show that  ab  3 a D 3. For this we
a
have
X  X   X 
1 X  1 X 2
 ab 3 a D ab abc a
a abc
1
D Œ.ab bc/2 C .bc ca/2 C .ca ab/2   0:
2abc
2: By the Cauchy-Schwartz inequality and the AM-GM inequality,
5
y 2 .2x C z/2  y 2 .x 2 C z 2 /.22 C 12 / D 5y 2 .1 y2/  ;
4
p
5
i.e., j2xy C yzj  , so max  2.
2
p p p
10 2 10
On the other hand, letting x D ;y D ;z D , then
5 2 10
ˇ ˇ p
ˇ  1 ˇˇ 5
ˇp C p
ˇ 5 2 5 ˇ  2 ) j2 C 1j  5 )   2:

Hence max D 2.
Lecture Notes on Mathematical Olympiad 211

3: There are a few ways to prove this inequality. Here, we introduce a method
similar to that used to prove Schur’s inequality.
We first note that
x 2 C yz x2 x.y C z/ C yz x.y C z/
p D p Cp
2x 2.y C z/ 2
2x .y C z/ 2x 2 .y C z/
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

r
.x y/.x z/ yCz
D p C
2
2x .y C z/ 2
p p
.x y/.x z/ yC z
 p C : (30.39)
2x 2 .y C z/ 2
by 217.174.237.134 on 09/27/15. For personal use only.

Similarly, we have
p p
y 2 C zx .y z/.y x/ zC x
p  p C ; (30.40)
2
2y .z C x/ 2y 2 .z C x/ 2
p p
z 2 C xy .z x/.z y/ xC y
p  p C : (30.41)
2z 2 .x C y/ 2z 2 .x C y/ 2

We now add (30.39), (30.40) and (30.41) to get


x 2 C yz y 2 C zx z 2 C xy
p Cp Cp
2x 2.y C z/ 2y 2 .z C x/ 2z 2 .x C y/
.x y/.x z/ .y z/.y x/ .z x/.z y/ p p p
 p C p C p C xC yC z
2
2x .y C z/ 2
2y .z C x/ 2
2z .x C y/
.x y/.x z/ .y z/.y x/ .z x/.z y/
D p C p C p C 1.
2x 2 .y C z/ 2y 2 .z C x/ 2z 2 .x C y/

Thus, it suffices to show that


.x y/.x z/ .y z/.y x/ .z x/.z y/
p C p C p  0: (30.42)
2
2x .y C z/ 2
2y .z C x/ 2z 2 .x C y/
Now, assume without loss of generality, that x  y  z. We then have
.x y/.x z/
p 0
2x 2 .y C z/
and
.z x/.z y/ .y z/.y x/ .y z/.x z/ .y z/.x y/
p C p D p p
2
2z .x C y/ 2
2y .z C x/ 2z 2 .x C y/ 2y 2 .z C x/
212 Solutions to Testing Questions

.y z/.x y/ .y z/.x y/
 p p
2z 2 .x C y/ 2y 2 .z C x/
!
1 1
D .y z/.x y/ p p .
2z 2 .x C y/ 2y 2 .z C x/
The last quantity is non-negative due to the fact that
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

y 2 .z C x/ D y 2 z C y 2 x  yz 2 C z 2 x D z 2 .x C y/:

This completes the proof.


4: From x 2 C y 2 C z 2 D 3 and the Cauchy-Schwartz inequality,
by 217.174.237.134 on 09/27/15. For personal use only.

.x 2 C y 2 C z 2 /2 D 3.x 2 C y 2 C z 2 /  .x C y C z/2 ;
x 2 C y 2 C z 2  x C y C z: ./

By the Cauchy-Schwartz inequality, .x 2 Cy Cz/.1Cy Cz/  .x Cy Cz/2 ,


hence it suffices to show that
p p p
x 1CyCzCy 1CzCxCz 1CxCy p
 3:
xCyCz
Using another application of the Cauchy-Schwartz inequality and (),
p p p
.x 1 C y C z C y 1 C z C x C z 1 C x C y/2
p p p p p p
D . x  x C xy C zx C y  y C yz C xy C z  z C zx C yz/2
 .x C y C z/Œ.x C xy C xz/ C .y C yz C xy/ C .z C zx C yz/
D .x C y C z/Œ.x C y C z/ C 2.xy C yz C zx/
 .x C y C z/Œ.x 2 C y 2 C z 2 / C 2.xy C yz C zx/ D .x C y C z/3 ;

hence
p p p
x 1Cy CzCy 1CzCx Cz 1Cx Cy p
 x C y C z:
xCyCz
Using () again, the original inequality is obtained at once.
5: Let p; q; r be the three positive roots of '.x/. By Viete’s Theorem,

b c d
D p C q C r; D pq C qr C rp; D pqr:
a a a
Since '.0/ < 0 , d < 0, so a > 0. Label

2b 3 C 9a2 d 7abc  0; (30.43)


Lecture Notes on Mathematical Olympiad 213

then .30:43/ , 2.p C q C r /3 7.p C q C r /.pq C qr C rp/ C 9pqr  0.


Schur’s inequality yields

.p C q C r /3 4.p C q C r /.pq C qr C rp/ C 9pqr  0: (30.44)

The AM-GM inequality yields .p C q C r /2  3.pq C qr C rp/, namely


Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

.p C q C r /3 3.p C q C r /.pq C qr C rp/  0: (30.45)

Thus, .30:44/ C .30:45/ yields

2.p C q C r /3 7.p C q C r /.pq C qr C rp/ C 9pqr  0;


by 217.174.237.134 on 09/27/15. For personal use only.

as desired.

Solutions to Testing Questions 26


Testing Questions (26-A)

1: When a  b, then ap  b p and aq  b q , Hence by the rearrangement


inequality, ap  aq C b p  b q  ap b q C aq b p , and the equality holds if and
only if ap D b p or aq D b q , i.e., a D b.
When a  b, then ap  b p and aq  b q , by the rearrangement inequality,
ap  aq C b p  b q  ap b q C aq b p , and the equality holds if and only if
ap D b p or aq D b q , i.e., a D b.
2: Without loss of generality it can be assumed that a  b  c. Then
b.c C a b/ a.b C c a/ D a2 b 2 C bc ac D .a b/.a C b c/  0.
2 2
c.a C b c/ b.c C a b/ D b c C ca ab D .b c/.b C c a/  0.

Therefore a.b Cc a/  b.c Ca b/  c.aCb c/. By the rearrangement


inequality,

a2 .b C c a/ C b 2 .c C a b/ C c 2 .a C b c/
 ba.b C c a/ C cb.c C a b/ C ac.a C b c/;
a2 .b C c a/ C b 2 .c C a b/ C c 2 .a C b c/
 ca.b C c a/ C ab.c C a b/ C bc.a C b c/:

By adding these two inequalities, the desired inequality is obtained.


214 Solutions to Testing Questions

3: Assume that a  b  c. Then ac C bc C c  bc C ab C b  ab C ac C a


and
c b a
  :
ac C bc C c ab C bc C b ab C ac C a
X 1 X c
Note that D 1 , D 1, and so by
aCb C1 ac C bc C c
a;b;c a;b;c
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

Chebyshev’s inequality,
X c X X
 .ac C bc C c/  3 c
ac C bc C c
a;b;c X X a;b;c X a;b;c
X
,3 c .ac C bc C c/ , c ab:
by 217.174.237.134 on 09/27/15. For personal use only.

a;b;c a;b;c a;b;c a;b;c

4: Assume that x  y  z. Then x k  y k  z k . By Chebyshev’s inequality,

3.x kC1 C y kC1 C z kC1 /  .x C y C z/.x k C y k C z k /: (30.46)

Since 0 < z  y  x < 1 and x k 1


 yk 1
 zk 1
,

x.1 x/ y.1 y/ D x.y C z/ y.z C x/ D z.x y/  0


) x.1 x/  y.1 y/ ) x k .1 x/  y k .1 y/
) x kC1 C y k C z k  y kC1 C z k C x k ;

and similarly, y kC1 C z k C x k  z kC1 C x k C y k , therefore

x kC1 y kC1 z kC1


  :
x kC1 C y k C z k y kC1 C z k C z k z kC1 C x k C y k

By Chebyshev’s inequality again,


x kC2 y kC2 z kC2
C C
x kC1 C y k C z k y kC1 C z k C z k z kC1 C x k C y k
!
1 x kC1 y kC1 z kC1
 .xCyCz/ kC1 k k
C kC1 k k
C kC1
3 x Cy Cz y Cz Cz z C xk C yk
1 X x kC1 X 1
D kC1 k k
 .x kC1 Cy k Cz k / X X
3 x;y;z x C y C z x;y;z x kC1
C2 xk
x;y;z x;y;z

1
 .x kC1 C y kC1 C z kC1 /  X X
kC1
x C2 xk
x;y;z x;y;z
Lecture Notes on Mathematical Olympiad 215

x kC1 C y kC1 C z kC1


D
x kC1 C y kC1 C z kC1 C 2.x C y C z/.x k C y k C z k /
x kC1 C y kC1 C z kC1 1
 kC1 kC1
D .
x Cy C z kC1 C 2  3.x kC1 C y kC1 C z kC1 / 7
1
The equality holds if and only if x D y D z D .
3
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

5: Write BC D a; CA D b; AB D c; QR D p; RP D q; PQ D r . Let
1 1
AR D x; BP D y; CQ D z and s D .a C b C c/ D L. Then
2 2
xDs a; yDs b; zDs c:
by 217.174.237.134 on 09/27/15. For personal use only.

By applying the cosine rule to triangles ABC and ARQ respectively,


a2 D b 2 C c 2 2bc cos A D .b c/2 C 2bc.1 cos A/;
p 2 D 2x 2.1 cos A/ D 2.s a/2 .1 cos A/:
Eliminating 1 cos A from them gives
a2 .b c/2 4.s a/.s b/.s c/
p 2 D .s a/2 D a.s a/: (30.47)
bc abc
Note that 4.s a/.s b/ D .b C c a/.a b C c/ D c 2 .a b/2  c 2
and similarly
4.s b/.s c/  a2 ; 4.s c/.s a/  b 2 :
Multiplying the 3 inequalities together and taking square roots, we obtain
8.s a/.s b/.s c/  abc. From (30.47), this yields
 3
2 1 a p  a  32
p  a.s a/ or 2 2 ;
2 p s a
and similarly
 3   32
b p b  c 3 p  c  23
2 2 ; 2 2 :
q s b r s c
Use M to denote the left hand side of the original inequality, then by the
power mean inequality,
"   32  #
p  a  32 b c  32
M  2 2 C C
s a s b s c
p   32
2 2 a b c
 p C C : (30.48)
3 s a s b s c
216 Solutions to Testing Questions

1 1 1
We can assume that a  b  c, so   . By Cheby-
s a s b s c
shev’s inequality and the AM-GM inequality,
 
a b c 1 1 1 1
C C  .a C b C c/ C C
s a s b s c 3 s a s b s c
1
aCbCc .a C b C c/s 3
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

 1
D 1
Œ.s a/.s b/.s c/ 3 Œs.s a/.s b/.s c/ 3
 2  32
1 L
D2 3 : (30.49)
T
p
2 2 1 L2 2 L2
by 217.174.237.134 on 09/27/15. For personal use only.

By combining (30.48) and (3.49), M  p  p  Dp  .


3 2 T 3 T
6: Lemma (Young’s Inequality): For positive real numbers a and b and p; q >
1 1
1 with C D 1, the inequality
p q
1 p 1
ab  a C bq
p q
holds.
Proof of Lemma: Since f .x/ D ln x; x > 0 is a continuous concave func-
tion, by the weighted Jensen’s inequality,
 
1 p 1 q 1 p 1 q
ln.ab/ D ln a C ln b  ln a C b ;
p q p q
1 p 1
therefore ab  a C bq .
p q
n
X p
We now return to the proof of Hölder’s inequality. Let A D xi ; B D
i D1
n
X
yjq , then Young’s inequality gives
j D1

p q
xi yi 1 xi 1 y
1
 1
  C  i ; i D 1; 2;    ; n:
Ap Bq p A q B
Therefore
n n p n q
X xi yi 1 X xi 1 X yi 1 1
1
 1
 C D C D 1:
Ap Bq p A q B p q
i D1 i D1 i D1
Lecture Notes on Mathematical Olympiad 217

Thus
n n
! p1 n
! 1q
X 1 1 X X
xi yi  A  B
p q D xip  yiq :
i D1 i D1 i D1

7: (i) By using Jensen’s inequality on the convex function f .x/ D x 2 ,


 2  
.1 C x C y/ C .1 C y C z/ C .1 C x C z/ 2
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

3 C 2.x C y C z/
D
3 3
.1 C x C y/2 C .1 C y C z/2 C .1 C x C z/2
 ;
3
where the equality holds if and only if 1 C x C y D 1 C y C z D 1 C x C z,
by 217.174.237.134 on 09/27/15. For personal use only.

namely x D y D z D 1. By the AM-GM inequality,


p
3 C 2.x C y C z/  3 C 6 3 xyz  9;

so 27  .1 C x C y/2 C .1 C y C z/2 C .1 C x C z/2 .

(ii) .1 C x C y/2 C .1 C y C z/2 C .1 C x C z/2  3.x C y C z/2


, 3 C 2.x 2 C y 2 C z 2 / C 2.xy C yz C zx/ C 4.x C y C z/  3.x 2 C
y 2 C z 2 / C 6.xy C yz C zx/
, 3 C 4.x C y C z/  x 2 C y 2 C z 2 C 4.xy C yz C zx/ D .x C y C
z/2 C 2.xy C yz C zx/
, 7  .u 2/2 C 2v; where u D x C y C z; v D xy C yz C zx.
By AM-GM inequality, u  3 and v  3, so .u 2/2 C 2v  1 C 6 D 7,
and the equality holds if and only if x D y D z D 1.

Testing Questions (26-B)

1 1
1: (1) When a1 a2 Ca2 a3 C  Can a1  , since a1 ; a2 ; : : : ; an and 2 ,
n a1 C a1
1 1
;:::; 2 have reverse orders, so by the rearrangement in-
a22
C a2 an C an
equality and Cauchy-Schwartz inequality,
n n n
X ai X ai X 1
2
 2
D
ai C1 C ai C1 a C ai 1 C ai
i D1 i D1 i i D1
.1 C 1 C    C 1/2 n2
 D :
.1 C a1 / C .1 C a2 / C    C .1 C an / nC1
218 Solutions to Testing Questions

Thus,
n n
X X ai n
.ai ai C1 /   :
i D1 i D1
ai2C1 C ai C1 nC1
n
X 1
(2) When ai ai C1 < , by the rearrangement inequality and Cauchy-
n
i D1
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

Schwartz inequality,
n n
X X aj X aj
ai ai C1  D ai ai C1  2
i D1
a2
j D1 j C1
C aj C1 1i;j n
aj C1 C aj C1
!
1 X aj ai
D ai ai C1  2 C aj aj C1  2
by 217.174.237.134 on 09/27/15. For personal use only.

2 aj C1 C aj C1 ai C1 C ai C1
1i;j n !
1 X ai C1 aj C1
D ai aj C 2
2
1i;j n
aj2C1 C aj C1 ai C1 C ai C1
!
1 X aj C1 ai C1
 ai aj C 2
2
1i;j n
aj2C1 C aj C1 ai C1 C ai C1
 
1 X 1 1 X 1
D ai aj C D ai aj 
2 aj C1 C 1 ai C1 C 1 ai C1 C 1
1i;j n 1i;j n
n Pn 2
X ai . i D1 ai / 1
D  Pn D Pn
ai C1 C 1 i D1 ai .a i C1 C 1/ i D1 a i ai C1 C 1
i D1
1 n
> 1 D :
n
C1 nC1

2: Without loss of generality, we can assume that a  b  c. Then


.c a/.c b/
0
3.c C ab/
and
 
.a b/.a c/ .b a/.b c/ c.a b/2 1CaCb c
C D  0:
3.a C bc/ 3.b C ac/ 3 .a C bc/.b C ac/
X .a b/.a c/
Therefore  0. Since
3.a C bc/
a;b;c
X 1 9

a C bc 2.ab C bc C ca/
a;b;c
X 1 3
, 
a.a C b C c/ C 3bc 2.ab C bc C ca/
a;b;c
Lecture Notes on Mathematical Olympiad 219

X 3 1

, 0
2.ab C bc C ca/ a.a C b C c/ C 3bc
a;b;c
X .a b/.a c/ X .a b/.a c/
, D  0;
a.a C b C c/ C 3bc 3.a C bc/
a;b;c a;b;c
X 1 9
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

so  .
a C bc 2.ab C bc C ca/
a;b;c
On the other hand, from the AM-GM inequality,
p p
1 bCc 2.b C c/
p Dp p  p :
a.a C c/.a C b/
by 217.174.237.134 on 09/27/15. For personal use only.

2
a 2.a C bc/ 2
2a  .ab C ac/.a C bc/
r
X bCc 1 9
Hence it suffices to show   .
2a .a C c/.a C b/ 4.ab C bc C ca/
a;b;c
Since r r r
bCc aCc aCb
 
2a 2b 2c
and
1 1 1
  ;
.a C c/.a C b/ .b C c/.a C b/ .a C c/.c C b/
by Chebyshev’s inequality,
r r
X bCc 1 1 X bCc X 1
  
2a .a C c/.a C b/ 3 2a .a C c/.a C b/
a;b;c r a;b;c a;b;c
2 X bCc
D :
.a C b/.b C c/.c C a/ 2a
a;b;c
r
X b Cc 9.a C b/.b C c/.c C a/
Therefore it suffices to show that  .
2a 8.ab C bc C ca/
a;b;c
r
6 .a C b/.b C c/.c C a/
Let t D  1 (by the AM-GM inequality), then
8abc
9.a C b/.b C c/.c C a/ 27t 6
D 6 :
8.ab C bc C ca/ 8t C 1
r
X bCc
By the AM-GM inequality,  3t so
2a
a;b;c
220 Solutions to Testing Questions

27t 6
3t  , 8t 6 9t 5 C1  0 , .t 1/.8t 5 t 4 t 3 t 2 t 1/  0.
8t 6 C 1
The last inequality holds clearly when t  1. Thus, the original inequality
is proven.
r
4 .a2 C b 2 /.a2 ab C b 2 / a2 C b 2
3: It is obvious that 
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

2 aCb
, .a C b/4 .a2 ab C b 2/  2.a2 C b 2/3 , .a b/4 .a2 C ab C b 2/  0.
Thus, it suffices to show that
!
X a2 C b 2 2 X 2 X 1
 a :
by 217.174.237.134 on 09/27/15. For personal use only.

cyc
aCb 3 cyc cyc
aCb

Without loss of generality we may assume that a  b  c. Then

1 1 1
a2 C b 2  a2 C c 2  b 2 C c 2 ;   :
aCb aCc bCc

By Chebyshev’s inequality,

X a2 C b 2 1 X 2 X 1 2X 2 X 1
  .a C b 2 /  D a  ;
cyc
aCb 3 cyc cyc
aCb 3 cyc cyc
aCb

as desired.
p p p p
4: a3 C a C b 3 C b C c 3 C c  2 a C b C c
p p
, ap 3 C a.ab C bc C ca/ C b 3p
C b.ab C bc C ca/
C c 3 C c.ab C bc C ca/  2 .a C b C c/.ab C bc C ca/
p p p
, a.apC b/.c C a/ C b.a C b/.b C c/ C c.c C a/.b C c/
 2 .a C b C c/.ab C bc C ca/
s
X a .a C b C c/.ab C bc C ca/
, p 2 .
cyc a.b C c/ .a C b/.b C c/.c C a/

1
By applying the weighted Jensen’s inequality to the function f .x/ D p ,
x
x > 0, it is obtained that

a b c aCb Cc
p Cp Cp  qP :
2
a.b C c/ b.c C a/ c.a C b/ cyc a .bCc/
aCbCc
Lecture Notes on Mathematical Olympiad 221

Thus, it suffices to show that


.a C b C c/2 Œa2 .b C c/ C b 2 .c C a/ C c 2 .a C b/ C 2abc
 4.ab C bc C ca/Œa2 .b C c/ C b 2 .c C a/ C c 2 .a C b/
, .a C b C c/2 Œ.a C b C c/.ab C bc C ca/ abc
 4.ab C bc C ca/Œ.a C b C c/.ab C bc C ca/ 3abc
, .a C b C c/3 .ab C bc C ca/ abc.a C b C c/2
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

 4.a C b C c/.ab C bc C ca/2 12abc.ab C bc C ca/


P P P P
, . ab/Œ. a/3 4. a/. ab/ C 9abc
 abcŒ.a C b C c/2 3.ab C bc C ca/
P
, . ab/Œa.a b/.a c/ C b.b c/.b a/ C c.c a/.c b/
by 217.174.237.134 on 09/27/15. For personal use only.

 abcŒ.a b/.a c/ C .b a/.b c/ C .c a/.c b/


, a2 .b C c/.a b/.a c/ C b 2 .c C a/.b c/.b a/
Cc 2 .a C b/.c a/.c b/  0:
Without loss of generality we may assume that c D minfa; b; cg, then the
last inequality is equivalent to
.a b/2 .a2 b Cab 2 Ca2 c Cb 2 c ac 2 bc 2 /Cc 2 .aCb/.c a/.c b/  0;
and it is obvious.
5: Let a D y C z; b D z C x; c D x C y, then x; y; z are all positive, and
X 1 X 1 X x 2 C y 2 C z 2 C xy C zx C 3yz
BD p D p ; AD ,
cyc
2 zx cyc
2 yz cyc
2x C y C z
! !
X 1 X x 2 C y 2 C z 2 C xy C zx C 3yz
AB D p 
cyc
2 yz cyc
2x C y C z
s !2
X 1 x 2 C y 2 C z 2 C xy C zx C 3yz
 p  .
cyc
2 yz 2x C y C z

It suffices to show that each number under a square root sign is greater than
or equal to 1. Below, as an example, we show that the expression under the
first square root sign is greater than or equal to 1.
1 x 2 C y 2 C z 2 C xy C zx C 3yz
p  1
2 yz 2x C y C z
, .x C y C z C xy C 3yz C zx/  4yz.2x C y C z/2
2 2 2 2

, x 4 C y 4 C z 4 C 3x 2 y 2 C 3x 2 z 2 C 3y 2 z 2 C 2x 3y C 2xy 3 C 2x 3z
C2xz 3 C 2y 3 z C 2yz 3  8xy 2 z C 8x 2yz C 8xyz 2 : ./
222 Solutions to Testing Questions

By the power mean inequality,


1
x4 C y4 C z4  .x C y C z/4
27
 xyz.x C y C z/ D xy 2 z C x 2 yz C xyz 2 :
By the AM-GM inequality,
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

3x 2 y 2 C 3x 2 z 2 C 3y 2 z 2
 .xy C yz C xz/2  3.xy 2 z C x 2 yz C xyz 2 /:
Besides,
x 3 y C xy 3 C x 3 z C xz 3 C y 3 z C yz 3 2xyz.x C y C z/
D .x 3 y C yz 3 xyz 2 x 2yz/ C .y 3 z C x 3 z x 2 yz xy 2 z/
by 217.174.237.134 on 09/27/15. For personal use only.

C.z 3 x C xy 3 xy 2 z xyz 2 /
D y.x C z/.x z/2 C z.x C y/.x y/2 C x.y C z/.y z/2
 0:
By adding up the first two inequalities with 2 times the third inequality, ()
is obtained.

Solutions to Testing Questions 27


Testing Questions (27-A)

1: First of all, we show that


1 1 2
2
C 2
 : (30.50)
1Ca 1Cb 1 C ab

The inequality above is true because


(30.50)
, 1 C ab C b 2 C ab 3 C 1 C ab C a2 C a3 b  2 C 2a2 C 2b 2 C 2a2b 2
, ab.a2 2ab C b 2 /  a2 2ab C b 2 , .ab 1/.a b/2  0:
Since ab  1, so (30.50) is proven.
Next, by the Cauchy-Schwartz inequality and (30.50),
s   r
X 1 1 1 4 2
p  2 2
C 2
 Dp .
2
a C1 1 C a 1 C b 1 C ab 1 C ab
Thus, the desired inequality is proven.
Lecture Notes on Mathematical Olympiad 223

2: a C b C c D 1 and a2 C b 2  2ab implies that


P
. ab/2 D a2 b 2 C b 2 c 2 C c 2 a2 C 2a2 bc C 2b 2ca C 2c 2ab
D .a2 C b 2 /c 2 C a2 b 2 C 2abc.a C b C c/
 2abc 2 C a2 b 2 C 2abc

1 ab
therefore  P . Similarly,
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

ab C 2c 2 C 2c . ab/2

1 bc 1 ca
 P ;  P :
bc C 2a2 C 2a . ab/2 ca C 2b 2 C 2b . ab/2

By adding them up, the conclusion is proven.


by 217.174.237.134 on 09/27/15. For personal use only.

3: The left inequality can be obtained directly from the Power Mean inequality.
Here, we derive it by algebraic manipulations as follows:
r
aCbCc a2 C b 2 C c 2
 , .a C b C c/2  3.a2 C b 2 C c 2 /
3 3
, a2 C b 2 C c 2 C 2.ab C bc C ca/  3.a2 C b 2 C c 2 /
, 2.ab C bc C ca/  2.a2 C b 2 C c 2 /
, 0  .a b/2 C .b c/2 C .c a/2 :

The equality holds if and only if a D b D c.


To Prove the right inequality, we have
r ab bc ca
a2 C b 2 C c 2 C C X X 2
ab
 c a b , 3. 2
a /
3 3 c
a2 b 2 b2c2 c 2 a2
, a2 C b 2 C c 2  C C
c2 a2 b2
             2  2
bc ca bc ab ca ab ab bc
, C C  C C
a b a c b c c a
ab bc 2 bc ac 2 ab ac 2
 ac 2      
, C C  0.
b c a a b c b
The last inequality is clear, and the equality holds if and only if a2 D b 2 D
c 2 , i.e. a D b D c.

4: For the denominator, let a b D x; b c D y; c a D .x C y/, then


.a b/3 C .b c/3 C .c a/3 D x 3 C y 3 C z 3 D 3xy.x C y/ D
3.a b/.b c/.c a/.
224 Solutions to Testing Questions

Similarly, for the numerator we obtain


.a2 b 2 /3 C .b 2 c 2 /3 C .c 2 a2 /3 D 3.a2 b 2/.b 2 c 2 /.c 2 a2 /;
therefore, by the AM-GM inequality,
.a2 b 2 /3 .b 2 c 2/3 C .c 2 a2 /3
D .a C b/.b C c/.c C a/
.ap b/3 C p.b c/
3
p C .c a/
3
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

 2 ab  2 bc  2 ca D 8abc:

.x C 1/.y C 1/2 .y C 1/.z C 1/2 .z C 1/.x C 1/2


5: Let S D p
3
C p C p . Since
3 z2x2 C 1 3 3 x2y2 C 1 3 3 y2 z2 C 1
p
3
p p
zxCzCxC1  3 z 2 x 2 ; xyCxCy  3 3 x 2 y 2 ; yzCyCz  3 3 y 2 z 2 ,
by 217.174.237.134 on 09/27/15. For personal use only.

it follows that
.x C 1/.y C 1/2 .y C 1/.z C 1/2 .z C 1/.x C 1/2
S C C :
.z C 1/.x C 1/ .x C 1/.y C 1/ .y C 1/.z C 1/
b2 c2 a2
Let a D x C 1; b D y C 1; c D z C 1, then S  C C .
c a b
By the Cauchy-Schwartz inequality,
 2 
b c2 a2
.a C b C c/S  .a C b C c/ C C  .a C b C c/2
c a b
.a C b C c/2
)S D a C b C c D x C y C z C 3:
aCbCc
xCy
6: Let a C c b D x; a C b c D y; b C c a D z. Then a D ;b D
2
yCz zCx
;c D , and a C b C c D x C y C z. If we let K denote the left
2 2
hand side of the original inequality, then
2x 4 2y 4 2z 4
KD C C :
y.x C y/ z.y C z/ x.z C x/
By the Cauchy-Schwartz inequality,
K
Œy.x C y/ C z.y C z/ C x.z C x/  .x 2 C y 2 C z 2 /2
2
K .x 2 C y 2 C z 2 /2
)  2
2 x C y 2 C z 2 C xy C yz C zx
K .x 2 C y 2 C z 2 /2 1
)  2 2 2
D .x 2 C y 2 C z 2 /
2 2.x C y C z / 2
2 2 2 .x C y C z/2 .a C b C c/2 X
)K x Cy Cz  D  ab:
3 3
Lecture Notes on Mathematical Olympiad 225

.1 C a2 /.1 C b 2 /.1 C c 2 / Y 1 C a2
7: Since D , it is natural to localize the
.1 C a/.1 C b/.1 C c/ cyc
1Ca
1 C a2
inequality to dealing with .
1Ca
 3  
1 C a2 .1 C a2 /3 1 .1 C a3 /.1 C a/3 C .1 a3 /.1 a/3
D D
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

1Ca .1 C a/3 2 .1 C a/3


1
 .1 C a3 /;
2
where the equality holds if and only if a D 1. Similarly,
by 217.174.237.134 on 09/27/15. For personal use only.

 3  3
1 C b2 1 1 C c2 1
 .1 C b 3 /;  .1 C c 3 /;
1Cb 2 1Cc 2

where the equalities holds if and only if b D c D 1, by times up them and


using the AM-GM inequality,
" # 13 " # 13
Y 1 C a2 1 Y 1 X X
3 3 3 3 3 3 3
 .1 C a / D 1C a C a b Ca b c
cyc
1Ca 2 cyc 2 cyc cyc
1 1 1
 .1 C 3abc C 3a2 b 2 c 2 C a3 b 3 c 3 / 3 D .1 C abc/;
2 2
where the equality holds if and only if a D b D c D 1.

8: Note that

x 2 xy C y 2 1
 , 3.x 2 xy C y 2 /  x 2 C xy C y 2
x 2 C xy C y 2 3
D 2.x y/2  0;

therefore

x3 C y3 .x C y/.x 2 xy C y 2 / xCy
2 2
D 2 2
 :
x C xy C y x C xy C y 3

Similar inequalities are obtained for the other two terms also. Thus,

x3 C y3 y3 C z3 z3 C x3
C C
x 2 C xy C y 2 y 2 C yz C z 2 z 2 C zx C x 2
xCy yCz zCx 2.x C y C z/ p
 C C D  2 3 xyz D 2:
3 3 3 3
226 Solutions to Testing Questions

9: We prove the conclusion by induction on n as follows:


 6  6
6 6
For n D 6, > 6Š > , 729 > 720 > 64, the conclusion is
2 3
true.
 k
k
Assume that the conclusion is true for n D k (k  6), i.e., > kŠ >
2
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

 k
k C 1 kC1
 
k
, then for n D k C 1, to show .k C 1/Š < , it suffices to
3 2
 k  kC1  k
k kC1 1
show that .k C 1/  , i.e. 2  1 C .
2 2 k
k
!
1 k
 
by 217.174.237.134 on 09/27/15. For personal use only.

X k 1
The Binomial Expansion gives 1 C D 2C > 2, so
k i ki
i D2
k C 1 kC1
 
.k C 1/Š < is proven.
2
k C 1 kC1 1 k
   
Similarly, to prove .kC1/Š > it suffices to show 1 C 
! 3 k
k 1 1 1 1 1
3. Since  i <  D for any 2  i  n, it
i k iŠ i.i 1/ i 1 i
follows that
k
! k 
1 k
  
X k 1 X 1 1
1C D2C <2C < 3:
k i ki i 1 i
i D2 i D2

 kC1
kC1
Thus, the inequality .k C 1/Š > is proven also.
3

Testing Questions (27-B)

a2 b.b c/ b 2 c.c a/ c 2 a.a b/


1: C C 0
aCb bCc cCa
 
a2 b 2 b2c2 c 2a2 a b c
, C C  abc C C
aCb bCc cCa aCb bCc cCa
ab bc ca a b c
, C C  C C
c.a C b/ a.b C c/ b.c C a/ aCb bCc cCa
Lecture Notes on Mathematical Olympiad 227

 
1 1 1 ac
, .ab C bc C ca/ C C  C
ac C bc ab C ac bc C ab ac C bc
ab bc
C C 3.
ab C ac bc C ab
Now use substitutions as follows: let

xCz y
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

8 ˆ
ˆ ac D ;
< x D ab C ac; ˆ
< 2
xCy z xCyCz
y D bc C ba; ) ab D ; ) abCbcCca D :
:
z D ca C cb
ˆ 2 2
ˆ
ˆ yCz x
:̂ bc D
2
by 217.174.237.134 on 09/27/15. For personal use only.

Then, the original inequality is equivalent to


 
1 1 1 1 xCz y xCy z yCz x
.x C y C z/ C C  C C C3
2 x y z 2z 2x 2y
 
1 1 1 x y y z z x
, .x C y C z/ C C  C C C9
x y z z x y
y z x z x y x y y z z x
,3C C C C C C  C C C9
x x y y z z z x y
2y 2z 2x y z x
, C C  6 , C C  3.
z x y z x y

The last inequality is obtained from the AM-GM inequality at once.

a b c
2: Let D x; D y; D z. Then
a b b c c a

X  2a b
2 X X X
5, .1 C x/2  5 , 2 xC x 2  2:
cyc
a b cyc cyc cyc

1 b 1 c 1 a
Since 1D ; 1D ; 1D , so
x a y b z c
   
1 1 1 1 X 1 X1
1 1 1 D 1) C D0
x y z xyz cyc xy cyc
x
X X X X
)1 xC xy D 0 ) xy D x 1;
cyc cyc cyc cyc
228 Solutions to Testing Questions

therefore
!2
X X X X X
2
2 xC x 2,2 xC x 2 xy  2
cyc cyc cyc cyc cyc
!2 ! !2
X X X X
,2 xC x 2 x 1 2, x  0:
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

cyc cyc cyc cyc

The last inequality is clear, so the original inequality holds.


 
1 1 aCb bCc cCa
3: Let a D 1; b D ; c D 2 , then lim C C
n n n!C1 a C 2b b C 2c c C 2a
by 217.174.237.134 on 09/27/15. For personal use only.

 2 2 
1 C .1=n/ .1=n/ C .1=n / .1=n / C 1
D lim C 2
C
n!C1 1 C .2=n/ .1=n/ C ..2=n / .1=n2 / C 2
 
1 5 5
D lim 1 C 1 C D , therefore D  .
n!C1 2 2 2
aCb bCc cCa 5
Below we show that C C < for any a; b; c > 0.
a C 2b b C 2c c C 2a 2
aCb bCc cCa 5 b c a 1
C C < , C C >
a C 2b b C 2c c C 2a 2 a C 2b b C 2c c C 2a 2
1 1 1 1
, C C > :
2 C .a=b/ 2 C .b=c/ 2 C .c=a/ 2

a b c
Let D x; D y; D z. It suffices to show that if xyz D 1 then
b c a
1 1 1 1
C C > :
2Cx 2Cy 2Cz 2

1 1 1 1 1 1 z
Since C C > , C >
2Cx 2Cy 2Cz 2 2Cx 2Cy 4 C 2z
1 1 1
, C > , .4 C x C y/.2 C 4xy/ > .2 C x/.2 C y/
2Cx 2Cy 2 C 4xy
, 4 C 15xy C 4xy.x C y/ > 0, and the last inequality is obvious.
5
Thus, the minimum value of D is .
2
4: Notice that
a2 C 2 .a2 a C 1/ C .a C 1/ p p
D  .a C 1/.a2 a C 1/ D a3 C 1;
2 2
Lecture Notes on Mathematical Olympiad 229

X a2 1
hence it suffices to show that 2 2
 i.e.
.a C 2/.b C 2/ 3
X
3 a2 .c 2 C 2/  .a2 C 2/.b 2 C 2/.c 2 C 2/: (30.51)

By expanding and using the fact that abc D 8, (30.51) is equivalent to


Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

6.a2 C b 2 C c 2 / C 3.a2 b 2 C b 2 c 2 C c 2 a2 / 
a2 b 2 c 2 C 2.a2 b 2 C b 2 c 2 C c 2 a2 / C 4.a2 C b 2 C c 2 / C 8;
2.a2 C b 2 C c 2 / C a2 b 2 C b 2 c 2 C c 2 a2  72: (30.52)

By the AM-GM inequality, we have


by 217.174.237.134 on 09/27/15. For personal use only.

p
2.a2 C b 2 C c 2 /  6 3 .abc/2 D 24; (30.53)
p
2 2 2 2 2 2
a b Cb c Cc a  3 3 .abc/4 D 48; (30.54)

therefore (30.52) is proven.


5: Label the original inequality:
n n
!2
X X
ai2kC1  aik : (30.55)
i D1 i D1

First, we prove by induction on n that


n
X
2 aik  .an C 1/k an : (30.56)
i D1

For n D 1, (30.56) is clear. Assume that (30.56) is true for n D m, i.e.,


m
X
2 aik  .am C 1/k am ;
i D1

then for n D m C 1,
mC1
X m
X
2 aik D 2 aik C 2amC1
k
 .am C 1/k am C 2amC1
k

i D1 i D1
k k k
 amC1 .amC1 1/ C 2amC1 D amC1 .amC1 C 1/
 .amC1 C 1/k amC1 :

so (30.56) is true for n D m C 1.


230 Solutions to Testing Questions

Below we prove (30.55) by induction on n. The inequality is clearly true


for n D 1. Assume that (30.55) is true for n D m, i.e.,
m
!2 m
X X
k
ai  ai2kC1 :
i D1 i D1

Then for n D m C 1,
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

mC1
!2 m
!2 m
!
X X X
k
ai D aik C2 aik k
amC1 2k
C amC1
i D1 i D1 i D1 !
m
X m
X
 ai2kC1 C 2 k
aik amC1 2k
C amC1
by 217.174.237.134 on 09/27/15. For personal use only.

i D1 i D1
m
X
 ai2kC1 C .am C 1/k am amC1
k 2k
C amC1
i D1
m
X
 ai2kC1 C amC1
k k
ŒamC1 .amC1 k
1/ C amC1 
i D1
mC1
X
D ai2kC1 :
i D1

Thus, (30.55) is true for n D m C 1 also.

Solutions to Testing Questions 28


Testing Questions (28-A)

1: By using the multiplication principle, we choose the ten si according to the


order s9 ; s8;    ; s3; s2; s1; s0 , then the number of choices are
3 3
C1 ; C1 ;    ; 3 C1 ; 3; 2; 1;

respectively. Therefore the number of desired permutations is .3 C1 /7  3  2 


1 D 2  38 D 13122.
2: Let A be the set of all positive integers having required property.
In A there are 2 two digit numbers each containing one digit 3, so 3 appears
a total of 2 times in them.
In A there are 3 three digit numbers each containing two digits 3, so 3
appears a total of 6 times in them.
Lecture Notes on Mathematical Olympiad 231

In A there are 3 three digit numbers each containing one digit 3, so 3 appears
a total of 3 times in them.
In A there are 12 four digit numbers each containing one digit 3, so 3 ap-
pears a total of 12 times in them.
In A there are 5 five digit numbers each containing one digit 3, so 3 appears
a total of 5 times.
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

Thus, the digit 3 appears a total of 28 times in the numbers in A.


3: Let Ai ; i D 0; 1; 2 be the subset of S consisting by all the numbers in S
which have remainder i when divided by 3. Then

jA0 j D 16; jA1 j D 17; jA2 j D 17:


by 217.174.237.134 on 09/27/15. For personal use only.

fa; b; cg is good if and only if a; b; c all come from the same Ai or come
from distinct Ai . Thus, the number of good subsets is
! !
16 17
C2 C 16  17  17 D 6544:
3 3

4: There are 63 D 216 possible distinct products, where 53 D 125 products


do not have 5 as a factor, 33 D 27 products do not have 2 as a factor, and
23 D 8 products do not have 2 and 5 as factors, so the number of products
which are divisible by 10 is

216 125 27 C 8 D 72:

5: The number of triangles with the required property is


!
1 23
. 22 21 20/  30 D 10.253 63/ D 1900:
3 2

6: We may assume that bM D maxfb1 ; b2; : : : ; bn g and the lines A1 AM ; A2AM ,


: : : ; AbM AM are all blue. Then the lines Ai Aj where 1  i < j  bM are
all not blue, and bk  bM for k > bM , so the total number of blue lines is
less than or equal to .n bM /bM . Then the AM-GM inequality yields
 2
n bM C bM n2
.n bM /bM  D ;
2 4
so
n2 n2
b1 C b2 C    C bn  2  D :
4 2
232 Solutions to Testing Questions

7: For the first step we arrange the three music books. We have 3Š D 6 ways for
this.
Next, arrange the mathematical book and the English books.
There are 2 ways to arrange the math book when it is arranged at the left
or right side of the music books. In this case the English books must be
arranged in the two gaps between the music books, so we have 2 ways for
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

this. Therefore there are 2  2 D 4 ways to arrange the mathematical book


and the English books for this case.
If the math book is arranged in a gap between
 music books, then there are
two ways for this. Then there are 2  41 D 8 ways to arrange the English
books, so we have a total of 2  8 D 16 ways in this case.
by 217.174.237.134 on 09/27/15. For personal use only.

Thus, the number of ways satisfying the requirements is 6.4C16/ D 120.

8: By adding 6; 5; 4; 3; 2; 1 marks to the marks of Issac’s answers to the first,


second, third, fourth, fifth, and sixth questions respectively, then the se-
quence of Isaac’s marks becomes a strictly increasing sequence taking val-
ues from f1; 2; :::; 16g. This correspondence is one-to-one.
!
16
Thus, the number of possible results is D 8008.
6

9: Let the permutation of the n objects be a1 ; a2 ;    ; an . If the subset

fai1 ; ai2 ;    ; aik g

is a distant subset of capacity k, where 1  i1 < i2 <    < ik  n, then


we have ij C1 ij  2 for j D 1; 2;    ; k 1, therefore

1  i1 < i2 1 < i3 2 <    < ik .k 1/  n .k 1/;

i.e. the sequence i1 ; i2 1; i3 2;    ; ik .k 1/ is an strictly increasing


subsequence of 1; 2;    ; n k C 1. Conversely, for any strictly increasing
subsequence j1 < j2 <    < jk of the sequence 1; 2;    ; n k C 1, the
sequence
aj1 ; aj2C1 ;    ; ajk Ck 1
form a distant subset of capacity
 k. Thus, the number of distant subsets
n kC1
with capacity k is k
.

Testing Questions (28-B)


Lecture Notes on Mathematical Olympiad 233

1: First, arrange the three b’s and three c’s in a row. By symmetry, we only
consider the cases that b where b is the leftmost character. Arrangements
have the following possible cases:
(i) !
“b c b c b c”. In this case, the number of ways to insert four a’s is
7
D 35;
4
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

(ii) “b c c b c b” or
! “b c b c c b”. In this case, the number of ways to insert
6
four a’s is 2  D 40;
3
(iii) “b b c c b c” or “b c c b b c” or “b b c b c c” or!“b c b b c c”. In this
by 217.174.237.134 on 09/27/15. For personal use only.

5
case, the number of ways to insert four a’s is 4  D 40;
2
(iv) “b c c c b b” or
! “b b c c c b”. In this case, the number of ways to insert
4
four a’s is 2  D 8;
1
(v)!“b b b c c c”. In this case, the number of ways to insert four a’s is
4
D 1;
4
Thus, the total number of desired permutations is 2.35C40C40C8C1/ D
248.

2: In a plane use 100 points on a circle to denote the 100 people: A1 ; B1; A2 ; B2,
: : : ; A50; B50 , where the points Ai and Bi denote the two people from the
i th country. Use a real line segment to connect Ai and Bi .
These 100 points can be partitioned as 50 neighbor pairs. Use a dotted
line to connect the two points in a neighbor pair. Below we show that it is
possible to color these 100 points with red and blue such that the two ends
of each real segment are of distinct colors and the two ends of each dotted
line is so also. Then the points of the same color can be taken as one group.
The following operations can realize our purpose. First color A1 red and B1
blue. take A2 be the point connected with B1 by a dotted line, and color A2
red and B2 blue, and continue this process until we color the point which is
connected with A1 by a dotted line. Note that it cannot be red. Otherwise,
it is an end point of a dotted line, so it cannot be the endpoint of a dotted
line emitted from A1 also. Hence we can color it blue.
If all the 100 point have colored, the purpose is reached; if there are point
not colored yet, then start the process again from any remaining point, until
234 Solutions to Testing Questions

all the points are colored. Since two endpoints of each real segment and
each dotted segment have different colors, it satisfies the requirement.

3: Bob can win as follows.


Claim After each of his moves, Bob can ensure that in that maximum
number in each row is a square in A [ B, where
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

A D f.1I 1/I .2I 1/I .3I 1/I .1I 2/I .2I 2/I .3I 2/I .1I 3/I .2I 3/g

and

B D f.5I 3/I .4I 4/I .5I 4/I .6I 4/I .4I 5/I .5I 5/I .6I 5/I .4I 6/I .5I 6/I .6I 6/g:
by 217.174.237.134 on 09/27/15. For personal use only.

Proof. Bob pairs each square of A [ B with a square in the same row
that is not in A [ B, so that each square of the grid is in exactly one pair.
Whenever Alice plays in one square of a pair, Bob will play in the other
square of the pair on his next turn. If Alice moves with x in A [ B, Bob
writes y with y < x in the paired square. If Alice moves with x not in
A [ B, Bob writes z with z > x in the paired square in A [ B. So after
Bob’s turn, the maximum of each pair is in A [ B, and thus the maximum
of each row is in A [ B.
Thus, when all the numbers are written, the maximum square in row 6 is in
B and the maximum square in row 1 is in A. Since there is no path from B
to A that stays in A [ B, Bob wins.

4: We consider the cases n D 1; 2; 3; : : :. It’s easy to see that f .1/ D 0; f .2/ D


1; f .3/ D 5. Below we find the relation between f .n/ and f .n 1/.
f .n/ is clearly equal to f .n 1/ plus the number of those equilateral tri-
angles with 1 vertex or 2 vertices on the nth row. Let C1 !be those with two
n
vertices on the nth row, then it is obvious that jC1 j D .
2
Let C2 consist of those equilateral triangles with only 1 vertex on the nth
row. Let XY Z be the big array with X above the horizontal segment Y Z
(where Y is left to Z). If 4ABC is such a triangle with A on the nth row
and A; B; C are arranged in clockwise direction. Then the line which is
parallel to XY and passes through B and the line which is parallel to XZ
and passes through C must intersect the nth row at two points P and Q, so
the 4ABC determines an unique ordered triple .P; A; Q/ on the nth row.
Conversely, given any ordered triple .P; A; Q/ (where A is between P and
Q) on the nth row, then taking P; Q as two vertices one can form an equi-
lateral triangle inside the array first, and next by taking A as a vertex to form
Lecture Notes on Mathematical Olympiad 235

an inscribed equilateral triangle of the resulting triangle. By symmetry, the


inscribed triangle exists uniquely.
! ! !
n n n
Thus, jC2 j D , hence f .n/ D f .n 1/ C C . Using the fact
3 2 3
that f .1/ D 0,
! !!
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

n n
X i i 1X 3
f .n/ D C D .i i/
2 3 6
i D2 ! i D2
n n
1 X 3 X 1 2 1
D i i D n .n C 1/2 n.n C 1/
6 24 12
i D1 i D1
.n 1/n.n C 1/.n C 2/
by 217.174.237.134 on 09/27/15. For personal use only.

D :
24

5: Let n be the number of participants at the conference. We proceed by induc-


tion on n.
If n D 1, then we have one participant who can eat in either room; that
gives us total of 2 D 21 options.
Let n  2. The case in which some participant, P , has no friends is trivial.
In this case, P can eat in either of the two rooms, so the total number of
ways to split n participants is twice as many as the number of ways to split
.n 1/ participants besides the participant P . By induction, the latter num-
ber is a power of two, 2k , hence the number of ways to split n participants
is 2  2k D 2kC1 , also a power of two. So we assume from here on that
every participant has at least one friend.
We consider two different cases separately: the case when some participant
has an odd number of friends, and the case when each participant has an
even number of friends:
Case 1: Some participant, Z, has an odd number of friends.
Remove Z from consideration and for each pair .X; Y / of Z’s friends, re-
verse the relationship between X and Y (from friends to strangers or vice
versa).
Claim. The number of possible seatings is unchanged after removing Z
and reversing the relationship between X and Y in each pair .X; Y / of Z’s
friends.
Proof of the claim. Suppose we have an arrangement prior to Z’s depar-
ture. By assumption, Z has an even number of friends in the room with
him. If this number is 0, the room composition is clearly still valid after Z
leaves the room. If this number is positive, let X be one of Z’s friends in
236 Solutions to Testing Questions

the room with him. By assumption, person X also has an even number of
friends in the same room. Remove Z from the room; then X will have an
odd number of friends left in the room, and there will be an odd number of
Z’s friends in this room besides X. Reversing the relationship between X
and each of Z’s friends in this room will therefore restore the parity to even.
The same reasoning applies to any of Z’s friends in the other dining room.
Indeed, there will be an odd number of them in that room, hence each of
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

them will reverse relationships with an even number of individuals in that


room, preserving the parity of the number of friends present.
Moreover, a legitimate seating without Z arises from exactly one arrange-
ment including Z, because in the case under consideration, only one room
contains an even number of Z’s friends.
by 217.174.237.134 on 09/27/15. For personal use only.

Thus, we have to double the number of seatings for .n 1/ participants


which is, by the induction hypothesis, a power of 2. Consequently, for
n participants we will get again a power of 2 for the number of different
arrangements.
Case 2: Each participant has an even number of friends.
In this case, each valid split of participants in two rooms gives us an even
number of friends in either room.
Let .A; B/ be any pair of friends. Remove this pair from consideration
and for each pair .C; D/, where C is a friend of A and D is a friend of
B, change the relationship between C and D to the opposite; do the same
if C is a friend of B and D is a friend of A. Note that if C and D are
friends of both A and B, their relationship will be reversed twice, leaving it
unchanged.
Consider now an arbitrary participant X different from A and B and choose
one of the two dining rooms. [Note that in the case under consideration,
the total number of participants is at least 3, so such a triplet .A; BI X/ can
be chosen.] Let A have m friends in this room and let B have n friends
in this room; both m and n are even. When the pair .A; B/ is removed,
X’s relationship will be reversed with either n, or m, or m C n 2k (for k
the number of mutual friends of A and B in the chosen room), or 0 people
within the chosen room (depending on whether he/she is a friend of only
A, only B, both, or neither). Since m and n are both even, the parity of the
number of X’s friends in that room will be therefore unchanged in any case.
Again, a legitimate seating without A and B will arise from exactly one
arrangement that includes the pair .A; B/: just add each of A and B to the
room with an odd number of the other’s friends, and then reverse all of the
relationships between a friend of A and a friend of B. In this way we create
Lecture Notes on Mathematical Olympiad 237

a one-to-one correspondence between all possible seatings before and after


the .A; B/ removal.
Since the number of arrangements for n participants is twice as many as
that for .n 2/ participants, and that number for .n 2/ participants is,
by the induction hypothesis, a power of 2, we get in turn a power of 2 for
the number of arrangements for n participants. The problem is completely
solved.
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

Solutions to Testing Questions 29


Testing Questions (29-A)
by 217.174.237.134 on 09/27/15. For personal use only.

1: Since every n 2 persons take totally 3k times of calls, and every two persons
are in the nn 24 distinct groups of n 2 persons, therefore, if m is the total
number of calls taken by the n persons, then, from the assumptions,
n
 k 
n k
3 3 n.n 1/3k
m D n n 2 2 D n2 2 D :
n 4 2
.n 2/.n 3/

(i) When .3; n/ D 1, then .n 3; n/ D 1 and .n 3; 3k / D 1. Since


n 1
..n 1/; .n 2// D 1, we have .n 3/ j .n 1/, i.e. D
n 3
2
1C is a positive integer. Therefore n 3 j 2 i.e. n D 4 or 5.
n 3
n 2
Since 2  3, therefore n  5, hence n D 5.

(ii) When 3 j n, then 3 j n 3 and hence .3; n 2/ D 1. Since .n


2; n 1/ D 1, we have n 2 j n, hence n 2 j 2. Therefore n D 3
or 4 which contradicts n  5.

Thus n D 5 is the unique solution.


2: Consider the set A formed by all nonnegative integers whose digits are not
greater than the corresponding digits of n on each digit place. Therefore
there are only two choices (0 and 1) for the places where the digit of n is 1,
and three choices (0; 1 and 2) for the places where the digit of n is 2,    ,
and there are a total of 10 choices for the places where the digit of n is 9.
Thus, jAj D 2˛1 3˛2    9˛8 10˛9 . It is obvious that every number in A is not
greater than n, therefore jAj  n C 1, i.e.

2˛1 3˛2    9˛8 10˛9  n C 1:


238 Solutions to Testing Questions

3: If some two judges give the same judgment to some one contestant, we say
that there is a “same judgment”. Every two fixed judges can make at most
k “same judgments”, therefore


b
The total number of the “same judgments” is not greater than k 2 . ()
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

On the other hand, for a contestant i (i D 1; 2;    ; a), if there are ni and


b ni judges who give “pass” and “fail” respectively, then the total number
of “same judgments” mentioning the contestant is given by
! !
ni b ni
C
by 217.174.237.134 on 09/27/15. For personal use only.

2 2
ni .ni 1/ C .b ni /.b ni 1/ n2 C .ni b/2 b
D D i
2 2
2n2i 2ni b C b 2 b 4n2i 4ni b C b 2 C b 2 2b
D D
2 4
 
.2ni b/2 C .b 1/2 1 b 1 2
D 
4 2

since .2ni b/2  1 for odd b, therefore,


! a
" ! !#
b 1 2
 
b X ni b ni
k  C a ;
2 2 2 2
i D1
k b 1
 :
a 2b

4: Let the number of ways be an .m/, or an , for short.


(i) When n D 2, then a2 .m/ D m P2 D m.m 1/.
(ii) Find a recurrence relation. Since there are m ways to colour S1 , .m
1/ ways to colour S2 ,    , .m 1/ ways to colour Sn 1 , and if we still
use m 1 ways to color Sn , then we have m.m 1/n 1 ways to colour
S1 ; S2;    ; Sn , here S1 and Sn may be coloured with same colour.
We have an .m/ ways of colourings such that S1 and Sn are of different
colours, and when S1 and Sn have the same colour, then the number of
ways of colouring is one for colouring n 1 sectors, so there are an 1 .m/
ways for this. Hence for n  2 we have

an .m/ C an 1 .m/ D m.m 1/n 1


: (30.57)
Lecture Notes on Mathematical Olympiad 239

an
(iii) To solve for an define bn D . By .30:57/,
.m 1/n
1 m 1
bn C bn 1 D or bn .m/ 1D .bn 1 1/;
m 1 m 1 m 1
therefore
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

bn .m/ 1
  n 2 
1
m.m 1/ . 1/n
D .b2 .m/ 1/ D 1
m 1 .m 1/2 .m 1/n 2
1 . 1/n . 1/n
D  D ;
m 1 .m 1/n 2 .m 1/n 1
by 217.174.237.134 on 09/27/15. For personal use only.

) an D .m 1/ bn .m/ D . 1/ .m 1/ C .m 1/n :
n n

5: Label the 24 partition points by 1; 2;    ; 24 in that order, and arrange the 24


numbers in the table as follows:

1 4 7 10 13 16 19 22
9 12 15 18 21 24 3 6
17 20 23 2 5 8 11 14

Then the length of arc between any two adjacent numbers (including the
first and the last) in each row is 3, and the length of arc between any two ad-
jacent numbers (including the first and the last) in each column is 8. There-
fore from each column we need to select exactly one number, and any two
numbers in two adjacent columns (including the first and the columns) can-
not be in same row.
When we consider each column as a sector and each row as one colour,
then we have 8 sectors and three colours, the question becomes to find the
number of ways for colouring the 8 sectors with three colours such that any
two adjacent sectors are coloured by different colours.
From the result of Q4 above, we have

a8 .3/ D . 1/8 .3 1/ C .3 1/8 D 2 C 28 D 258:

6: For n  2 use g.n/ to denote the number of wave numbers a1 a2    an satis-


fying the condition an > an 1 . By symmetry, we have 2g.n/ D f .n/.
Use m.i / to denote the number of wave numbers a1 a2    an 1 satisfying
with an 1 D i; an 2 > an 1 , then

m.4/ D 0 and m.1/ C m.2/ C m.3/ D g.n 1/:


240 Solutions to Testing Questions

If an 1 D 1 then an 2 D 2; 3; 4, so m.1/ D g.n 2/. If an 1 D 3, then


an 2 D 4; an 3 D 1; 2; 3, so m.3/ D g.n 3/. Thus,
g.n/ D 3m.1/ C 2m.2/ C m.3/ D 2g.n 1/ C g.n 2/ g.n 3/:
It is easy to find that g.2/ D 6; g.3/ D 14; g.4/ D 31, and so from above
recursive formula, we have the results as shown in the following table.
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

n 5 6 7 8 9 10
g.n/ 70 157 353 793 1782 4004

Therefore f .10/ D 2g.10/ D 8008.


Note that the sequence of remainders of g.n/ mod 13 has the following
by 217.174.237.134 on 09/27/15. For personal use only.

pattern:
6; 1; 5; 5; 1; 2; 0; 1; 0; 1; 1; 3; 6; 1; 5; 5;    ;
so it is a periodic sequence with the minimum period 12. Therefore
g.2008/  g.4/  5 .mod 13/ ) f .2008/  10 .mod 13/:

7: Let x be the number of distances that appeared exactly once, y the number
of distances that appeared exactly twice. We want to find a lower bound for
x C y.
Let the points be P1 ; P2 ; : : : ; Pn from left to right, then P1 is the left end-
point of n 1 distinct distances. For the point P2 , it is the left endpoint
of n 2 distinct distances, where some may have appeared in the previous
n 1 distances, but this repeat can appear at most once:
If P1 Pi D P2 Pj and P1 Pk D P2 Pl , then P1 P2 D Pi Pj D Pk Pl , so it
contradicts the fact that a same distance can appear at most twice. Thus,
among the .n 2/ distinct distances starting from P2 , at least n 3 are new.
Similarly, among the n 3 distinct distances starting from P3 , at least n
3 2 D n 5 are new. Thus, a lower bound of x C y is given by
8̂ 2
n 1
< for odd n
.n 1/ C .n 3/ C .n 5/ C    D 4
2
:̂ n for even n:
4
 2  2
n n
Thus, x C y  for n 2 N, and 2x C 2y  . Since x C 2y D
4 2
n.n 1/
, so
2  2  2  j k
n n n n
x D :
2 2 2 2
Lecture Notes on Mathematical Olympiad 241

8: Let ai be the number of i -digit integers formed by some or all of the four
digits, namely, 0; 1; 2, and 3, such that these numbers contain none of the
two blocks 12 and 21, and b1i and b2i be the number of i -digit integers
formed by some or all of the four digits, such that the last digit is 1 and 2
respectively and these integers contain none of the two blocks 12 and 21.
Then, by symmetry we have b1i D b2i , which we denote by bi .
By considering the last digit of an n-digit number, we have the reduction
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

formulas: for n  3,

an D 2an 1 C 2bn and bn D 2an 2 C bn 1:

Therefore for n  3
by 217.174.237.134 on 09/27/15. For personal use only.

an 2an 1 D 2bn D 4an 2 C 2bn 1 D 4an 2 C .an 1 2an 2 /;


an D 3an 1 C 2an 2 :

It is obvious that a1 D 3 (since the first digit is not zero), a2 D 3  4 2D


10, so

n 3 4 5 6 7 8 9
an 36 128 456 1624 5784 20600 73368

9: For each convex polygon P whose vertices are in S , let c.P / be the number
of points of S which are inside P , so that a.P / C b.P / C c.P / D n, the
total number of points in S . Denoting 1 x by y,
X X
x a.P /y b.P / D x a.P /y b.P / .x C y/c.P /
P
!P
X c.P
X/ c.P /
D x a.P /Ci y b.P /Cc.P / i :
i
P i D0

View this expression as a homogeneous polynomial of degree n in two inde-


pendent variables x; y. In the expanded form, it is the sum of terms x r y n r
(0  r  n) multiplied by some nonnegative integer coefficients.
For a fixed r , the coefficient of x r y n r represents the number of ways of
choosing a convex polygon P and then choosing some of the points of S
inside P so that the number of vertices of P and the number of chosen
points inside P jointly add up to r .
This corresponds to just choosing an r -element subset of S . The correspon-
dence is bijective because every set T of points from S splits in exactly one
way into the union of two disjoint subsets, of which the first is the set of
242 Solutions to Testing Questions

vertices of a convex polygon — namely, the convex hull of T — and the


second consists of some points inside that polygon.

Thus, the coefficient of x r y n r equals nr . The desired result follows:
n
!
X X n
x a.P /y b.P / D x r y n r D .x C y/n D 1:
r D0
r
P
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

Testing Questions (29-B)

1: Use n to replace 10001, and use two ways to count the ordered triples .a; R; S /,
by 217.174.237.134 on 09/27/15. For personal use only.

where a; R; S denote a student, a club and a society such that a 2 R and


R 2 S . Such a triple is called "admissible".
Fix a student a and a society S . Then, by condition (ii), there exists a unique
club R such that the triple .a; R; S / is admissible. Since there are nk ways
to choose the ordered pair .a; S /, so there are nk admissible triples in total.
Fix a club R, and use jRj to denote the number of students in R. Then, by
jRj 1
condition (iii), R belongs to societies. Therefore there are a total of
2
jRj.jRj 1/
admissible triples containing the R. Letting M be the set of
2 P
all clubs, then the total number of all admissible triples is R2M jRj.jRj
1/=2. Therefore
X jRj.jRj 1/
nk D :
2
R2M
! !
X jRj.jRj 1/ X jRj X jRj
As D , by condition (1) we have D
2 2 2
R2M
! R2M R2M
n n 1
. Thus, nk D n.n 1/=2 i.e. k D . For n D 10001; k D 5000.
2 2
2: Let Nc be the set of good numbers of which each is the maximum value of
its column and is the median of its row. Since they are in distinct rows, so
jNc j  m.
Let a be the maximum element in Nc , and let a1 ; a2 ;    ; a n 1 be the num-
2
bers greater than a in the same row as a. Hence there are no elements of
nC1
Nc in the columns that contain some ai . Hence, jNc j  . Thus,
  2
nC1
jNc j  min m; .
2
Lecture Notes on Mathematical Olympiad 243

Similarly consider the good numbers of which each is the maximum of its
row and the median of its column. It then follows that the total number of
good numbers is not greater than
   
nC1 mC1
min m; C min n; :
2 2

Below we prove that for any odd integers m; n > 1 there must exist a
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

method to fill
 in the numbers
 such
 that the number of good numbers is
nC1 mC1
equal to min m; C min n; .
2 2
(i) When m ¤ n, without loss of generality we always assume that 1 <
m < n.
by 217.174.237.134 on 09/27/15. For personal use only.

As shown in the left figure above, partition the squares in the rectangle of
size m  n as regions 1 to 5, and then sequentially in the regions 1 to 5 write
down the numbers 1; 2; 3; : : : ; mn. Then the numbers in regions 2 and 4 are
good numbers, and the total number of such numbers is
     
nC1 mC1 nC1 mC1
min m; C D min m; C min n; :
2 2 2 2

(ii) When m D n > 3, as shown in the right figure above, write down the
numbers 1; 2; : : : ; mn sequentially in the regions 1 to 5, then the numbers
in regions 2 and 4 are good numbers, and the total number of such numbers
is
n 1 n 1
C C 2 D n C 1:
2 2
(iii) When m D n D 3, as shown in the right figure, the
filled numbers 5; 6; 7; 8 are good numbers, so the number
1 7 9
of good numbers is
  2 6 4
mC1
4 D 2 min n; : 5 3 8
2
244 Solutions to Testing Questions

   
nC1 mC1
In summary, min m; C min n; is the maximum value
2 2
we seek.

3: Solution 1 Let ni be the number of permutations of i -digits formed by some


or all of the five digits, namely, 0; 1; 2; 3, and 4, such that these permutations
contain none of the three blocks 22; 33 and 44, and n02i ; n03i ; n04i be the
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

number of i -digit integers formed by some or all of the five digits, such that
the first digit is 2; 3; 4 respectively and these integers contain none of the
three blocks 22; 33 and 44. Then, by symmetry we have n02i D n03i D n04i ,
denoted by n0i .
Let x be the number of 7-digit integers formed by some or all of the five
by 217.174.237.134 on 09/27/15. For personal use only.

digits, namely, 0; 1; 2; 3, and 4, such that these integers contain none of the
three blocks 22; 33 and 44. We have the following reduction formulas

ni C1 D 5ni 3n0i and n0i C1 D ni n0i for i D 2; 3; 4; 5:

It is clear that n2 D 52 3 D 22; n02 D 4. Therefore

x D 4n6 3n06 D 4.5n5 3n05 / 3.n5 n05 / D 17n5 9n05


D 17.5n4 3n04 / 9.n4 n04 / D 76n4 42n04
D 76.5n3 3n03 / 42.n3 n03 / D 338n3 186n03
D 338.5n2 3n02 / 186.n2 n02 / D 1504n2 828n02
D 1504  22 828  4 D 29776:

Solution 2 Let ai be the number of i -digit integers formed by some or all


of the five digits, namely, 0; 1; 2; 3, and 4, such that these numbers contain
none of the three blocks 22; 33 and 44, and b2i ; b3i ; b4i be the number of i -
digit integers formed by some or all of the five digits, such that the last digit
is 2; 3; 4 respectively and these integers contain none of the three blocks
22; 33 and 44, then, by the symmetry, we have b2i D b3i D b4i , denoted
by bi .
By considering the last digit of an n-digit number, we have the reduction
formulas: for n  3,

an D 2an 1 C 3bn and bn D 2an 2 C 2bn 1:

Therefore for n  3

an 2an 1 D 3bn D 6an 2 C 6bn 1 D 6an 2 C 2.an 1 2an 2 /;


an D 4an 1 C 2an 2 :
Lecture Notes on Mathematical Olympiad 245

It is obvious that a1 D 4; a2 D 4  5 3 D 17, so


a3 D 4  17 C 2  4 D 76;
a4 D 4  76 C 2  17 D 338;
a5 D 4  338 C 2  76 D 1504;
a6 D 4  1504 C 2  338 D 6692;
a7 D 4  6692 C 2  1504 D 29776:
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

4: For any natural number n, let an be the number of distinct codes, bn be the
number of codes such that A1 and A2 have same digit and same colour,
and cn be the number of distinct codes such that A1 and A2 have the same
digit only or same color only, and dn be the number of codes such that only
one pair of adjacent two vertices, say A1 and A2 have different digits and
by 217.174.237.134 on 09/27/15. For personal use only.

different colors. Then

an C dn D 4  3n 1
; an D bn C cn ; bn D an 1:

According to the status of the pair .A1 ; A3 /, the following relations hold:
(i) When A1 and A3 have the same digit and the same color, since A2 has
three choices in this case, the number of such codes is 3bn 1 .
(ii) When A1 and A3 have the same digit only or the same color only,
since A2 has two choices in this case, the number of such codes is 2cn 1 .
(iii) When A1 and A3 have different digits and different colors, since A2
has two choices in this case, the number of such codes is 2dn 1 .
As a result,
an D 3bn 1 C 2cn 1 C 2dn 1
D bn 1 C 2.bn 1 C cn 1 / C 2.4  3n 2
an 1/
D an 2 C 8  3n 2 :

Since a1 D 4; a2 D 43 D 12; a3 D 4C83 D 28 and a4 D 12C89 D


84, by induction, we have
 n
3 C 1; for odd n;
an D
3n C 3; for even n:

5: Let an be the number of 2  n grids with stranded black squares and bn be


the number of that with no stranded black squares. Then

an C bn D 22n D 4n and a1 D 0:

Below we use the recurrence method to find the expression of an in terms


of n.
246 Solutions to Testing Questions

According to the definition, the stranded black squares can be only on the
second row.
(1) When there is a stranded black square in the first n 1 columns, then
there must be stranded blacks when we color the two squares in the nth
column, so there are 22 an 1 D 4an 1 possible cases.
(2) When the first n 1 squares in the second row are not all black and the
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

first n 1 columns do not contain a stranded square, then the black square on
the nth column and second row is the unique stranded black square. If the
first n 1 squares in the second row are all black, then the first n 1 squares
in the first row can be arbitrarily coloured without producing a stranded
square, so they cover 2n 1 possible cases. Hence, the number of cases
where the first n 1 squares in the second row are not all black there is no
by 217.174.237.134 on 09/27/15. For personal use only.

stranded black square is

bn 1 2n 1
D 22.n 1/
an 1 2n 1
:

Thus,

an D 4an 1 C 4n 1
an 1 2n 1
D 3an 1 C 4n 1
2n 1
:

Since a1 D 0, by solving this recursive equation,

an D 4n C 2n 6  3n 1
D 4n C 2n 2  3 n ) bn D 2  3 n 2n :

Solutions to Test Questions 30


Testing Questions (30-A)

1: There are more than one function that satisfy the given equation. For example,
the function f given by

n; n  0I
f .n/ D
3n; n<0

is one such functions:


(i) When n > 0, then f .f .n/ 2n/ D f . n/ D 3n D 2f .n/ C n.
(ii) When n < 0, then f .f .n/ 2n/ D f . 5n/ D 5n D 2f .n/ C n.
(iii) When n D 0, then f .f .n/ 2n/ D f .0/ D 0 D 2f .n/ C n.
Lecture Notes on Mathematical Olympiad 247

2: Let y D f .x C 1/ in (30.18), then f .x C f . f .x C 1/// D 0, so there


exists a real number a such that f .a/ D 0.
(i) When a ¤ 1, then letting y D x C 1 in the given equation yields

f .x C f .x C 1// D x C 1 C f .x C 1/:

Let g.x/ D x C f .x C 1/, then g is continuous and f .g.x// D g.x/ C 1.


Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

Let y D a in (30.18), then f .x/ D a C f .x C 1/ or

g.x 1/ g.x/ D a 1:

Thus, g.x/ is unbounded, so the range of g is R. Then f .x/ D xC1; x 2 R.


By checking, f .x/ D x C 1; x 2 R satisfies the conditions in the question.
by 217.174.237.134 on 09/27/15. For personal use only.

(ii) When a D 1, i.e., f .1/ D 0, letting x D 0 in (30.18) yields f .f .y// D


y. Let y D f .1 x/ in (30.18), then

f .1 x/ C f .x C 1/ D f .x C f .f .1 x/// D f .x C 1 x/ D f .1/ D 0:

Let y D 1 x in (30.18), then

f .x Cf .1 x// D 1 x Cf .x C1/ D 1 x f .1 x/ D 1 .x Cf .1 x//:

Let h.x/ D x C f .1 x/, then f .h.x// D 1 h.x/. Let y D 1 and use


x to replace x in the original equation, then

f . x/ D 1 C f .1 x/;

so h.x C 1/ h.x/ D 2, i.e. h is an unbounded continuous function,


so its range is all real numbers. Thus, f .h.x// D 1 h.x/ implies that
f .x/ D 1 x; x 2 R. By checking f .x/ D 1 x satisfies the original
equation. Thus,

f .x/ D 1 C x or f .x/ D 1 x:

3: First we will show that f is injective. If a ¤ b but f .a/ D f .b/, then for
each n we have f .a/ C f .n/ j .a C n/k and f .a/ C f .n/ D f .b/ C f .n/ j
.bCn/k . Thus, f .a/Cf .n/ is a common divisor of .aCn/k and .bCn/k . If
n satisfies the condition that gcd.aCn; b Cn/ D 1 then this can not happen.
But gcd.a C n; b C n/ D .a C n; b a/ and if b a ¤ 0 there is number
a C n that is relatively prime to it. (For example, we can choose n such that
a C n is a very big prime)
Now let b be a natural number. For every n we have f .n/C f .b/ j .nC b/k
and f .n/ C f .b C 1/ j .n C b C 1/k . But .n C b/ and .n C b C 1/ are
248 Solutions to Testing Questions

relatively prime to each other, so 1 D .f .n/ C f .b/; f .n/ C f .b C 1// D


.f .n/ C f .b/; f .b C 1/ f .b//.
We want to show that f .b C 1/ f .b/ D ˙1. If it is not equal to ˙1, then
there is a prime p which divides it. Let a be such that p a > b. Now put
n D p a b. We have f .n/ C f .b/ j .n C b/k D p ak , so p j f .n/ C f .b/.
We had p j f .b C 1/ f .b/, so p j gcd.f .n/ C f .b/; f .b C 1/ f .b//
which contradicts the previous argument.
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

Hence, f .b C 1/ f .b/ D ˙1 for every number b. But since f is injective,


it is either always equal to 1 or always equal to 1. (This is because for two
consecutive b’s it cannot change sign.)
However it cannot always be equal to 1, because f takes only positive
integer values. So f .b C 1/ f .b/ D 1 for every number b. Hence there is
by 217.174.237.134 on 09/27/15. For personal use only.

a number c such that f .n/ D nCc. c is non-negative because f .1/ D 1Cc


is positive. If c is positive, then take a prime p greater than 2c. Now
f .1/ C f .p 1/ j p k which shows that p j f .1/ C f .p 1/ D p C 2c.
But this is a contradiction because 2c < p.
In conclusion, c D 0 and the function must be f .n/ D n, which obviously
satisfies the conditions of the problem statement.
4: (a) Let L1 WD f2k W k > 0g; E1 WD f0g [ f4k C 1 W k  0g; G1 WD
f4k C 3 W k  0g.
We will show that L1 D L; E1 D E, and G1 D G. It suffices to verify
that L1  L; E1  E, and G1  G because L1 ; E1 , and G1 are mutually
disjoint and L1 [ E1 [ G1 D N0 .
Firstly, if k > 0, then f .2k/ f .2k C 1/ D k < 0 and therefore L1  L.
Secondly, f .0/ D 0 and
f .4k C 1/ D 2k C 2f .2k/ D 2k C 4f .k/;
f .4k C 2/ D 2f .2k C 1/ D 2.k C 2f .k// D 2k C 4f .k/
for all k  0. Thus, E1  E.
Lastly, in order to prove G1  G, we claim that f .nC 1/ f .n/  n for all
n. (In fact, one can prove a stronger inequality : f .n C 1/ f .n/  n=2.)
This is clearly true for even n from the definition of f since for n D 2t,

f .2t C 1/ f .2t/ D t  n:

If n D 2t C 1 is odd, then (assuming inductively that the result holds for all
nonnegative m < n), we have
f .n C 1/ f .n/ D f .2t C 2/ f .2t C 1/ D 2f .t C 1/ t 2f .t/
D 2.f .t C 1/ f .t// t  2t t D t < n:
Lecture Notes on Mathematical Olympiad 249

For all k  0,
f .4k C 4/ f .4k C 3/ D f .2.2k C 2// f .2.2k C 1/ C 1/
D 4f .k C 1/ .2k C 1 C 2f .2k C 1//
D 4f .k C 1/ .2k C 1 C 2k C 4f .k//
D 4.f .k C 1/ f .k// .4k C 1/
 4k .4k C 1/ < 0:
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

This proves G1  G.

(b) Note that a0 D a1 D f .1/ D 0. Let k  2 and let Nk D f0; 1; 2; : : : ; 2k g.


First we claim that the maximum ak occurs at the largest number in G \Nk ,
that is, ak D f .2k 1/. We use mathematical induction on k to prove the
by 217.174.237.134 on 09/27/15. For personal use only.

claim. Note that a2 D f .3/ D f .22 1/.


Now let k  3. For every even number 2t with 2k 1
C 1 < 2t  2k ,
f .2t/ D 2f .t/  2ak 1 D 2f .2k 1
1/ .Ž/
by the induction hypothesis. For every odd number 2t C 1 with 2k 1
C1 
2t C 1 < 2k ,
f .2t C 1/ D t C 2f .t/  2k 1
1 C 2f .t/
 2k 1 1 C 2ak 1 D 2k 1 1 C 2f .2k 1 1/ ./
by the induction hypothesis. Combining (Ž), () and
f .2k 1/ D f .2.2k 1
1/ C 1/ D 2k 1
1 C 2f .2k 1
1/;
we may conclude that ak D f .2k 1/ as desired.
Furthermore, we obtain
ak D 2ak 1 C 2k 1
1
for all k  3. Note that this recursive formula for ak also holds for k D 1
and 2. Unwinding this recursive formula, we get
ak D 2ak 1 C 2k 1 1 D 2.2ak 2 C 2k 2 1/ C 2k 1
1
D 22 ak 2 C 2  2k 1 2 1
D 22 .2ak 3 C 3k 3 1/ C 2  2k 1 2 1
D 23 ak 3 C 3  2k 1 22 2 1
::
:
D 2k a0 C k2k 1 2k 1
2k 2
 2 1
D k2k 1 2k C 1
for all k  0.
250 Solutions to Testing Questions

5: Let v D u be any real value, then

f .2u/ D f .2u/f .0/ C f .0/f . 2u/: (30.58)

(i) If f .0/ D 0, then f .2u/ D 0 for any u 2 R, so f .u/  0 identically.


By checking, the function satisfies the requirement of problem.
(ii) If f .0/ D c ¤ 0, then (30.58) yields
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

1 c
f . 2u/ D f .2u/ for all u 2 R: (30.59)
c
1
Letting u D 0 in (30.59), then c D 1 c, i.e., c D , and f .u/ D
2
by 217.174.237.134 on 09/27/15. For personal use only.

f . u/; u 2 R. Then the given equation becomes

f .2u/ D f .u C v/f .u v/ C f .u v/f .u C v/ D 2f .u v/f .u C v/;


1
where u; v 2 R. Letting u D 0 in it then gives D 2f .v/2 , so f .v/ D
2
1
2
;v 2 R since f .v/  0 for all real v.
1
Thus, f is 0 identically or identically.
2
6: In this solution the label (30.19) means the equation (30.19) of lecture 30. Let
y D x in (30.19), we obtain

f .x 3 / D xf .x 2/: (30.60)

Substituting (30.60) into (30.19), we obtain

.x C y/f .xy/ D xf .y 2 / C yf .x 2 /: (30.61)

Let y D x in (30.19), then f .x 3 / D f . x 3 /, so

f .x/ D f . x/: (30.62)

Use y to replace y in (30.61), and by (30.62), we have

.x y/f .xy/ D xf .y 2 / yf .x 2 /: (30.63)

.30:61/ C .30:63/ gives that

yf .xy/ D xf .y 2 /: (30.64)

Letting y D 1 in (30.64), we obtain f .x/ D f .1/x. By checking f .x/ D


ax where a 2 R satisfies the equation (30.19), so it is a solutions.
Lecture Notes on Mathematical Olympiad 251

7: Let x D 2 in (30.21) of lecture 30, then 3f .1/ D 2f .2/, therefore f .1/ is


even. It is easy to see by induction that
1
f .n/ D .n C 1/f .1/; n 2 N:
2
   
C p q
For any p; q 2 Z with .p; q/ D 1, since f Df , by using (ii)
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

q p
repeatedly, it’s easy to prove by induction on q that
 
p 1
f D .p C q/f .1/:
q 2
When p > q, then
by 217.174.237.134 on 09/27/15. For personal use only.

   
p p pCq p q pCq
f D f D .p q C q/f .1/:
q q q q 2q
   
p q
When p < q, then f Df . Thus, The desired f is given by
q p
 
p
f D .p C q/m; for p; q 2 ZC ;
q
where m 2 N.
8: Let y D 0 in (30.22) of lecture 30, then f .x/ D f .x/g.0/ C f .0/, namely
f .0/
f .x/.1 g.0// D f .0/. If g.0/ ¤ 1, then f .x/ D which is
1 g.0/
a constant, contradicting the fact that f is strictly increasing. Therefore
g.0/ D 1 and f .0/ D 0.
Since f .x/g.y/C f .y/ D f .x C y/ D f .y/g.x/C f .x/ ) f .x/.g.y/
1/ D f .y/.g.x/ 1/. f is strictly increasing and f .0/ D 0 implies that
f .x/ ¤ 0 if x ¤ 0. Therefore, there is some constant C such that
g.y/ 1 g.x/ 1
D D C; x; y ¤ 0;
f .y/ f .x/
i.e., g.x/ 1 D Cf .x/ for x ¤ 0. Since g.0/ D 1; f .0/ D 0, so above
equality holds also for x D 0. Then for any x; y 2 R,

g.x C y/ D 1 C Cf .x C y/ D 1 C Cf .x/g.y/ C Cf .y/


D g.y/ C Cf .x/g.y/ D g.y/.1 C Cf .x// D g.x/g.y/:

so g.nx/ D gn .x/ for all n 2 Z. Since f is strictly monotone, so is


g.x/ D 1 C Cf .x/. Letting n D 2 and replacing x with x2 in the equation
252 Solutions to Testing Questions

x 
above, we have g.x/ D g2 > 0; x 2 R. Let g.1/ D a (a > 0), then
n
2
g.n/ D a .
1
m 1 m
g.x/ D .g.nx// n ) g D .g.m// n D a n ;
n
so g.x/ D ax for x 2 Q. Since g is strictly monotone, so g.x/ D ax ; x 2
R.
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

It is easy to verify that the function g.x/ D ax ; x 2 R with a > 0 satisfies


the condition. In fact, let f .x/ D 1 ax if 0 < a < 1; let f .x/ D x if
a D 1; and let f .x/ D ax 1 is a > 1.
9: In this solution the label (30.23) means the equation (30.23) of lecture 30.
by 217.174.237.134 on 09/27/15. For personal use only.

a
Let f .0/ D a. Let x D y D 0 in (30.23), then f D f .a/ a. In
 a
2
f .a/ 2
(30.23) let x D 21 a; y D 0, then f D 2a. In (30.23) let
  2
f .a/ C a
x D a; y D 0, then f D 2a. Since f is non-decreasing,
2
h i
f .a/ a
2 f .a/Ca
f .t/ D 2a; for all t 2 2 ; 2 ;
 a 
f .a/ C 2
therefore f D 2a. On the other hand, In (30.23) let x D y D
2
a
, then
2
 a 
f .a/ C 2
f D 2a f .a/ C f .f .a/ a/ ) f .a/ D f .f .a/ a/:
2
a
In (30.23) let x D 0; y D , then f .a/ D a C f .f .a/ a/, hence
2
a D 0, i.e., f .0/ D 0.
Now in (30.23) let x D 0, then f .y/ D f .f .y//. Again in (30.23) let
x D y, then
 
3 1
f xC f .x/ D 2x f .x/ C f .f .x// D 2x;
2 2

so f is a surjection. Thus, for any x 2 RC [ f0g,


    
3 1 3 1
2x D f x C f .x/ D f f x C f .x/ D f .2x/;
2 2 2 2

therefore f .x/ D x for any x 2 RC [ f0g.


Lecture Notes on Mathematical Olympiad 253

Test Questions (30-B)

1: Label the given equation:

f .x 2 C yf .z// D xf .x/ C zf .y/: (30.65)

Substituting x D y D 0 into (30.65) yields f .0/ D zf .0/; z 2 R, so


Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

f .0/ D 0. Substituting x D 0 into (30.65) yields

f .yf .z// D zf .y/: (30.66)

Substituting y D 1 into (30.66) yields


by 217.174.237.134 on 09/27/15. For personal use only.

f .f .z// D zf .1/; for all z 2 R: (30.67)

Substituting y D 0 into (30.65) yields

f .x 2 / D xf .x/: (30.68)

By using (30.68) and then (30.67),

f .xf .x// D f .f .x 2 // D x 2 f .1/: (30.69)

Letting y D z D x in (30.66) and using (30.69), it follows that

xf .x/ D f .xf .x// D x 2 f .1/; x 2 R ) f .x/ D f .1/x; x 2 R:

Let f .1/ D C . Substituting it into (30.65) gives C.x 2 C Cyz/ D Cx 2 C


Cyz, so C 2 D C , i.e., C D 0 or C D 1. Taking C D 1 to get the maximum
value of f .12345/, we have

max f .12345/ D 12345:


f 2S

2: First of all we show that f is a bijection. In fact, for any fixed n 2 S , if


f .m1 / D f .m2 / for some m1 ; m2 2 S , then

m21 C 2n2 D f .f 2 .m1 / C 2f 2 .n// D f .f 2 .m2 / C 2f 2 .n// D m22 C 2n2


) m21 D m22 ) m1 D m2 :

f is clearly a surjection, so f is a bijection.


Consider the identity .x C 3/2 C 2x 2 D .x 1/2 C 2.x C 2/2 ; x 2 S .
Therefore
f .f 2 .x C 3/ C 2f 2 .x// D .x C 3/2 C 2x 2 D .x 1/2 C 2.x C 2/2
D f .f 2 .x 1/ C 2f 2 .x C 2//;
254 Solutions to Testing Questions

hence
f 2 .x C 3/ C 2f 2 .x/ D f 2 .x 1/ C 2f 2 .x C 2/: (30.70)

Denote f 2 .n/; n 2 S by an , then anC3 C 2an D an 1 C 2anC2 for n  2.


By solving its characteristic equation, we obtain

f 2 .n/ D an D an2 C bn C c C . 1/n d; where a; b; c; d 2 Q:


Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

Since
f .f 2 .m/ C 2f 2 .n// D m2 C 2n2
) f 2 .f 2 .m/ C 2f 2 .n// D .m2 C 2n2/2
) f 2 .am2 C bm C 2an2 C 2bn C 3c C . 1/m d C 2. 1/n d /
by 217.174.237.134 on 09/27/15. For personal use only.

D .m2 C 2n2 /2 ;
therefore
aŒam2 C bm C 2an2 C 2bn C 3c C . 1/m d C 2. 1/n d 2
CbŒam2 C bm C 2an2 C 2bn C 3c C . 1/m d C 2. 1/n d 
2 m
Cc C . 1/am CbmCcC. 1/ d d D m4 C 4n4 C 4m2 n2 :

The equality above holds for any m; n 2 S , so it is an identity. The com-


parison of coefficients of m4 gives a D 1. Substituting it into the identity,
Œm2 C bm C 2n2 C 2bn C 3c C . 1/m d C 2. 1/n d 2
CbŒm2 C bm C 2n2 C 2bn C 3c C . 1/m d C 2. 1/n d 
2 m
Cc C . 1/m CbmCcC. 1/ d d D m4 C 4n4 C 4m2 n2 :

The comparison of the coefficients of m3 gives b D 0. Then


Œm2 C 2n2 C 3c C . 1/m d C 2. 1/n d 2
2 m
Cc C . 1/m CcC. 1/ d d D m4 C 4n4 C 4m2 n2 :

The comparison of the coefficients of m2 and the comparison of the constant


terms then gives

3c C . 1/m d C 2. 1/n d D 0;
2 m
c C . 1/m CcC. 1/ d d D 0;

for all m; n 2 S . Solving them gives c D d D 0. Thus, f 2 .n/ D n2 or


f .n/ D n. It is clear that such f satisfies all the conditions in question.
3: First we show that f is a bijection. Since f is strictly monotone on .0; C1/,
if x1 ; x2 > 0 are such that f .x1 / D f .x2 /, then

f .f .x1 // D f .f .x2 //: (30.71)


Lecture Notes on Mathematical Olympiad 255

In the given equation use x1 ; x2 to replace x; y respectively, then


 
f .x1 / f .f .x1 // f .f .x1 // f .f .x1 //
f D , f .1/ D , x2 D :
f .x2 / x2 x2 f .1/
(30.72)
Similarly, if we use x2 ; x1 to replace x; y respectively, the given equation
gives
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

f .f .x2 //
x1 D : (30.73)
f .1/
Combining (30.71), (30.72) and (30.73), we obtain x1 D x2 , so f is an
injection. It is obvious that f is surjective, so f is a bijection.
f .f .1//
In the given equation let x D y D 1, then f .1/ D or f .1/ D
by 217.174.237.134 on 09/27/15. For personal use only.

1
f .f .1//, so f .1/ D 1. Thus, f .f .x// D x; x > 0.
Let  > 0, then there exists
 > 0 such that  D f ./. Hence f ./ D
f .x/ f .f .x//
f .f .// D . Since f D and f .f .x// D x,
f .y/ y
        
f .x/ x f .x/ x x f .x/
f D )f f Df )f D :
f .y/ y f .y/ y y f .y/
 
1 1
Let x D 1, then f D ; y 2 RC .
y f .y/
   
1 1
Since f x  D f .x/  f for all x; y > 0, so
y y
f .xy/ D f .x/f .y/; x; y > 0:

Let g.u/ D ln f .e u/; u 2 R, then

g.u C v/ D ln f .e u  e v / D lnŒf .e u /  f .e v / D g.u/ C g.v/:

The monotonicity of f implies that of g on RC , so g.u/ D au; u 2 R.


Thus,

au D ln f .e u / , f .e u / D e au D .e u /a , f .x/ D x a ; x > 0:

Hence for all x > 0,


2 2
f .f .x// D x ) f .x a / D x ) x a D x ) x a D 1 ) a2 D 1 1
1
, a D ˙1 ) f .x/ D x; x > 0 or f .x/ D f .x/ D ; x > 0:
x
It is easy to verify that these two solutions satisfy the conditions in question.
256 Solutions to Testing Questions

k
‚ …„ ƒ
4: Throughout the solution, we will use the notation gk .x/ D g.g.   g.x/    //,
including g0 .x/ D x as well.
Suppose that there exists a Spanish Couple .f; g/ on the set N. From prop-
erty (i) we have f .x/  x and g.x/  x for all x 2 N.
We claim that gk .x/  f .x/ for all k  0 and all positive integers x. The
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

proof is done by induction on k. We already have the base case k D 0


since x  f .x/. For induction step from k to k C 1, apply the induction
hypothesis on g2 .x/ instead of x, then apply (ii):

g.gkC1 .x// D gk .g2 .x//  f .g2 .x// < g.f .x//:


by 217.174.237.134 on 09/27/15. For personal use only.

Since g is increasing, it follows that gkC1 .x/ < f .x/. The claim is proven.
If g.x/ D x for all x 2 N then f .g.g.x/// D f .x/ D g.f .x//, and we
have a contradiction with (ii). Therefore one can choose an x0 2 N for
which x0 < g.x0 /. Now consider the sequence x0 ; x1; : : : where xk D
gk .x0 /. The sequence is strictly increasing. Indeed, we have x0 < g.x0 / D
x1 , and xk < xkC1 implies xkC1 D g.xk / < g.xkC1 / D xkC2 .
Hence, we obtain a strictly increasing sequence x0 < x1 <    of positive
integers which has an upper bound, namely f .x0 /. This cannot happen in
the set N of positive integers, thus no Spanish Couple exists on N.
5: It is not hard to see that the two functions f .x/ D x and f .x/ D x for all
real x respectively solve the functional equation. In the remainder of the
solution, we prove that there are no further solutions.
Let f be a function satisfying the given equation. It is clear that f cannot
be a constant. Let us first show that f .0/ D 0. Suppose that f .0/ ¤ 0. For
t
any real t, substituting .x; y/ D .0; f .0/ / into the given functional equation,
we obtain
f .0/ D f .t/; (30.74)
contradicting the fact that f is not a constant function. Therefore, f .0/ D
0. Next, for any t, substituting .x; y/ D .t; 0/ and .x; y/ D .t; t/ into the
given equation, we get

f .tf .t// D f .0/ C t 2 D t 2 ;

and
f .tf .0// D f . tf .t// C t 2 ;
respectively. Therefore, we conclude that

f .tf .t// D t 2 ; f . tf .t// D t 2 ; for every real t: (30.75)


Lecture Notes on Mathematical Olympiad 257

Consequently, for every real v, there exists a real u such that f .u/ D v. We
also see that if f .t/ D 0, then 0 D f .tf .t// D t 2 so that t D 0, and thus 0
is the only real number satisfying f .t/ D 0.
We next show that for any real number s,

f . s/ D f .s/: (30.76)
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

This is clear if f .s/ D 0. Suppose now f .s/ < 0, then we can find a
number t for which f .s/ D t 2 . As t ¤ 0 implies f .t/ ¤ 0, we can also
find a number a such that af .t/ D s. Substituting .x; y/ D .t; a/ into the
given equation, we get

f .tf .t C a// D f .af .t// C t 2 D f .s/ C t 2 D 0;


by 217.174.237.134 on 09/27/15. For personal use only.

and therefore, tf .t C a/ D 0, which implies t C a D 0, and hence s D


tf .t/. Consequently, f . s/ D f .tf .t// D t 2 D . t 2 / D f .s/ holds
in this case.
Finally, suppose f .s/ > 0 holds. Then there exists a real number t ¤ 0 for
which f .s/ D t 2 . Choose a number a such that tf .a/ D s. Substituting
.x; y/ D .t; a t/ into the given equation, we get f .s/ D f .tf .a// D
f ..a t/f .t// C t 2 D f ..a t/f .t// C f .s/. Thus, we have f ..a
t/f .t// D 0, from which we conclude that .a t/f .t/ D 0. Since f .t/ ¤
0, we get a D t so that s D tf .t/ and thus we see f . s/ D f . tf .t// D
t 2 D f .s/ holds in this case also. This observation finishes the proof of
(30.76).
By substituting .x; y/ D .s; t/, .x; y/ D .t; s t/ and .x; y/ D . s t; s/
into the given equation, we obtain

f .sf .s C t/// D f .tf .s// C s 2 ;


f .tf . s// D f .. s t/f .t// C t 2 ;

and
f .. s t/f . t// D f .sf . s t// C .s C t/2 ;
respectively. Using the fact that f . x/ D f .x/ holds for all x to rewrite
the second and the third equation, and rearranging the terms, we obtain

f .tf .s// f .sf .s C t// D s 2 ;


f .tf .s// f ..s C t/f .t// D t 2 ;
f ..s C t/f .t// C f .sf .s C t// D .s C t/2 :

Adding up these three equations now yields 2f .tf .s// D 2ts, and there-
fore, we conclude that f .tf .s// D ts holds for every pair of real numbers
258 Solutions to Testing Questions

s; t. By fixing s so that f .s/ D 1, we obtain f .x/ D sx. In view of the


given equation, we see that s D ˙1. It is easy to check that both functions
f .x/ D x and f .x/ D x satisfy the given functional equation, so these
are the desired solutions.
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com
by 217.174.237.134 on 09/27/15. For personal use only.
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com
by 217.174.237.134 on 09/27/15. For personal use only.

Appendices

259
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com
by 217.174.237.134 on 09/27/15. For personal use only.

This page intentionally left blank


Appendix A
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

Theorem on Second Order Recursive Sequences


by 217.174.237.134 on 09/27/15. For personal use only.

Theorem I. For a sequence fan g given by

anC1 D pan C qan 1; n D 2; 3; 4;    ;

where a1 ; a2 are given as the initial values, if its characteristic equation t 2 D


pt C q has two real roots ˛ and ˇ, then for n  2,

(i) an D A˛ n C Bˇ n if ˛ ¤ ˇ;

(ii) an D .An C B/˛ n if ˛ D ˇ,

where A; B are constants determined by the initial values a1 and a2 .

Proof. We write the given recursive formula into the following new form:

anC1 ˛an D ˇ.an ˛an 1 /;

then it is easy to obtain anC1 ˛an D ˇ n 1 .a2 ˛a1 /.


(i) When ˛ ¤ ˇ, then ˛ˇ D q ¤ 0 implies ˛; ˇ ¤ 0. Since

an ˛an 1 D ˇ n 2 .a2 ˛a1 /;


˛.an 1 ˛an 2 / D ˛ˇ n 3 .a2 ˛a1 /;
˛ 2.an 2 ˛an 3 / D ˛ 2 ˇ n 4 .a2 ˛a1 /;
 
˛ n 2 .a2 ˛a1 / D ˛ n 2 .a2 ˛a1 /;

by adding up these equalities, we obtain

an ˛n 1
a1 D .a2 ˛a1 /.ˇ n 2
C ˛ˇ n 3
C    C ˛n 2
/;

261
262 Appendix A Theorem on Second Order Recursive Sequences

therefore
ˇn 1 ˛n 1
an D a1  ˛ n 1 C .a2 ˛a1 /
  ˇ ˛
a2 ˛a1 n 1 a2 ˛a1 n 1
D a1 ˛ C ˇ
ˇ ˛ ˇ ˛
a2 C ˇa1 n a2 ˛a1 n
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

D ˛ C ˇ :
˛.ˇ ˛/ ˇ.ˇ ˛/

(ii) When ˛ D ˇ, then

an ˛n 1
a1 D .a2 ˛a1 /.ˇ n 2
C ˛ˇ n 3 C    C ˛ n 2
/
D .a2 ˛a1 /  .n 1/˛ n 2 ;
by 217.174.237.134 on 09/27/15. For personal use only.

therefore h a
1 a2 ˛a1  a
2 ˛a1 i
an D Cn ˛ n:
˛ ˛2 ˛2
Thus, the theorem is proven. 
Appendix B
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

Proofs of Theorems On Pell’s Equation


by 217.174.237.134 on 09/27/15. For personal use only.

Theorem I. The equation


x2 dy 2 D 1; (B.1)
where d is a positive non-square integer, has at least one positive integer solution.

Lemma 1. Let ˇ be an irrational number. Then for any positive integer p > 1
there exist x; y 2 N with 1  y  p such that

1
jx yˇj < : (B.2)
p

Proof of Lemma 1. Since the p C 1 distinct numbers 0; fˇg; f2ˇg; : : : ; fpˇg


are all in the interval Œ0; 1/, so there are i; j with 0  i < j  p such that
1
0 < jfjˇg fiˇgj < , namely
p

1
j.bjˇc biˇc/ .j i /ˇj < :
p

hence it is enough to take x D bjˇc biˇc; y D j i .


Consequence 1: There are infinitely many ordered pairs .x; y/ of two posi-
tive integers such that
1
jx yˇj < : (B.3)
y
From Lemma 1, there is an ordered pair .x1 ; y1 / of two positive integers such
1 1
that (B.3) holds. Take positive integer p1 > 1 satisfying < jx1 y1 ˇj <
p1 y1
(p1 must exist since jx1 y1 ˇj is irrational), then Lemma 1 implies that there
1
exists ordered pair .x2 ; y2 / of two positive integers such that jx2 y2 ˇj < 
p1

263
264 Appendix B Proofs of Theorems On Pell’s Equation

1
. By continuing this process infinitely many times, we can get infinitely many
y2
desired pairs f.xi ; yi /g; i D 1; 2; : : :.
Lemma 2. When d is a non-square positive integer, there must exist infinitely
many ordered pairs .x; y/ of two positive integers, such that
p
jx 2 dy 2 j < 1 C 2 d :
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

Proof of Lemma 2. By Consequence 1, there exist infinitely many ordered


p 1
pairs .x; y/ of two positive integers such that jx dyj < , hence
y
p p 1 p
jx 2 dy 2 j D jx d yj  jx C d yj <  jx C dyj
y
by 217.174.237.134 on 09/27/15. For personal use only.

1 p p 1 p p
 .jx d yj C 2 d y/ < 2 C 2 d  1 C 2 d :
y y
Consequence 2. When d is pa non-square positive integer, there must exist an
integer k with 0 < jkj < 1 C 2 d , such that the Pell-type equation
x2 dy 2 D k (B.4)
has infinitely many positive integer solutions .x; y/.
p that there are only finitely many integers k with absolute value less than
Note
1 C 2 d, so there must be at least one such k such that the number of solutions
.x; y/ of (B.4) is infinite.
Proof. Consequence 2 implies that there are two solutions of (B.4), .x1 ; y1 / ¤
.x2 ; y2/, such that
x1  x2 .mod jkj/; y1  y2 .mod jkj/;
then
.x12 dy12 /.x22 dy22 / D .x1 x2 dy1 y2 /2 d.x1 y2 x2 y1 /2 D k 2 ;
and x1x2 dy1 y2  x12 dy12 D k  0; x1y2 x2y1  x1y1 x1y1  0
.mod jkj/, so there are nonnegative integers x; y such that
jx1 x2 dy1 y2 j D xjkj and jx1 y2 x2 y1 j D yjkj;
hence x 2 dy 2 D 1.
Below we show that y > 0 (and hence x > 0). If y D 0, then x1 y2 D x2 y1 .
x1 y1
Let D D q > 0, then (B.4) yields
x2 y2
k D x12 dy12 D q 2 .x22 dy22 / D q 2 k ) q D 1 ) .x1 ; y1 / D .x2 ; y2 /;
which contradicts .x1 ; y1 / ¤ .x2 ; y2 /. Thus, we have proven that (B.1) has at
least one positive integer solution. 
Lecture Notes on Mathematical Olympiad 265

Theorem II. Let .a; b/ be the minimum solution of (B.1), then .x; y/ is appositive
p solution of (B.1) if and only if there is n 2 N such that x C d y D
integer
.a C d b/n .
p p p
Proof.p Suppose that x C d y D .aC d b/n for some n 2 N, then x dy D
.a d b/n , so
p p
x 2 dy 2 D .a C d b/n  .a d b/n D .a2 db 2 /n D 1;
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

i.e., .x; y/ is a positive integer solution of (B.1).


Conversely, if .x;py/ is a positivep integer solutionpof (B.1), and
p there is no
n 2 N such that x C d y D .a p C db/n , then p x C d y >
p a C d b implies
that there is n 2 N such that .aC d b/n < x C d y < .aC d b/nC1 , therefore
by 217.174.237.134 on 09/27/15. For personal use only.

p p p
1 < .x C d y/.a d b/n < a C d b: (B.5)
p p p
Let .x C d y/.a d b/n D u C d v. It is easy to see that .u; v/ is an integer
solution of (B.1).
p p 1
Since uC d v > 1 ) 0 < u dv D p < 1 ) 2u > 1 ) u > 0.
p u C dv
Also 2 d v >p1 1 D 0 p ) v > 0, so .u; v/ is a positive integer psolution of
(B.1) and u C d v < a C d b, which contradicts the fact that a C d b is the
minimum solution of (B.1). Thus, the conclusion of the Theorem II is proven. 
Consequence 3. The Pell’s equation (B.1) must have infinitely many positive
integer solutions .x; y/. If .a; b/ is the minimum solution of (B.1), then all the
positive integer solutions .xn ; yn / are given by
8̂ 1 p p
< xn D Œ.a C d b/n C .a d b/n ;
2 (B.6)
1 p p
:̂ yn D p Œ.a C d b/n .a db/n :
2 d

Below we introduce without proof another theorem on the Pell-type equation


x2 dy 2 D 1.
Theorem III. When d is a non-square positive integer, and if the equation

x2 dy 2 D 1 (B.7)

has a positive integer solution, then equation (B.7) has infinitely many positive
integer solutions,
p and if .a; b/ is the positive integer solution with minimum value
of x C d y among all positive integer solutions .x; y/, then all the positive
integer solutions .x; y/ of (B.7) can be expressed as
p p
x C d y D .a C d b/2nC1 ;
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com
by 217.174.237.134 on 09/27/15. For personal use only.

266
Appendix B

p p
and if .x0 ; y0/ is the minimum solution of (B.1), then

x0 C d y0 D .a C d b/2 :
Proofs of Theorems On Pell’s Equation
Appendix C
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

Theorems On Quadratic Residues


by 217.174.237.134 on 09/27/15. For personal use only.

Theorem I. For any odd prime p, the numbers of non-zero quadratic residues
p 1
modulo p and quadratic non-residues modulo p are both .
2
Proof. For an integer a with .a; p/ D 1, when x 2  a (mod p) has a solution
for x, then a must be one of the following p 1 numbers modulo p:

p 1
˙1; ˙2;    ; ˙ ;
2
hence its square is one of f12; 22 ;    ; .p 1/=2/2 g. It’s obvious that each of these
.p 1/=2 numbers is a quadratic residue modulo p. Further, any two of these
.p 1/=2 numbers are not congruent modulo p: Otherwise, there are integers
1  l < k  .p 1/=2 such that l 2  k 2 (mod p), then

k2 l 2 D .k C l /.k l/  0 .mod p/:

However, 1  k l < k C l < p 1 implies p cannot divide both k C l and k l ,


a contradiction. Note that, the solution of x 2  l 2 .mod p/ and that of x 2  k 2
.mod p/ for 1  l < k  .p 1/=2 must be incongruent modulo p.
On the other hand, for each of the quadratic residues l 2 in f12 ; 22;    ; .p
1/=2/2 g, there are two solutions x0 and x0 , and x0 6 x0 .mod p/ holds:
Otherwise, 2x0  0 .mod p/ implies x0  0 .mod p/ ) l 2  0 .mod p/, a
contradiction. Hence corresponding to each of the .p 1/=2 quadratic congruence
equations of which each has two incongruent solutions, and these p 1 solutions
form a complete residue system modulo p. This means that the total number of
quadratic residues modulo p is exactly .p 1/=2.
Since there are p 1 distinct residues modulo p, from these p 1 numbers
remove the .p 1/=2 quadratic residues, the remaining .p 1/=2 numbers are
just the quadratic non-residues modulo p. 

267
268 Appendix C Theorems On Quadratic Residues

Theorem II. (Euler’s Criterion) Let p be an odd prime, a an integer with


.a; p/ D 1. Then a is a quadratic residue of p if and only if
p 1
 1 .mod p/: a 2

    
a p 1 a b
Consequence I:  a 2 .mod p/. Consequence II: D
  p p p
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

ab
.
p
Proof. If the equation x 2  a (mod p) has a solution x0 , then we can let
p 1 p 1
x0 > 0. Since .x02 ; p/ D .a; p/ D 1, a 2 D x0  1 (mod p) by Fermat’s
Little theorem.
by 217.174.237.134 on 09/27/15. For personal use only.

On the other hand, if a is a quadratic non-residue of p, namely the equation


x 2  a (mod p) has no solutions, then, for each i with 1  i  p 1, the
equation iy  a (mod p) for y has a unique solution j with 1  j  p 1 and
i ¤ j , such that ij  a (mod p). It is clear that different i correspond to different
j , so that 1; 2;    ; p 1 can be matched into .p 1/=2 such pairs. By taking
their product, it is obtained that
p 1
a 2  1  2    .p 1/  .p 1/Š  1 .mod p/;

by Wilson’s Theorem.
Consequence (I) is just Euler’s Criterion written in terms of the Legendre sym-
bol, and Consequence (II) is obtained at once from
    
ab p 1 p 1 p 1 a b
D .ab/ 2 Da 2 b 2 D :
p p p

Theorem III. (Gauss’ Lemma) For an odd prime number p and an integer a
with .a; p/ D 1, define the set S by
   
p 1
S D a; 2a; 3a;    ; a :
2
Among theremainders
 of the numbers in S mod p if n numbers are greater than
a
p=2, then D . 1/n .
p
Proof. It is clear that any two of the .p 1/=2 numbers in S are not congruent
modulo p. Let r1; r2 ;    ; rm be the remainders less than p=2 and s1 ; s2;    ; sn
be those remainders that are greater than p=2. Then 0 < ri < p=2 and p=2 <
si < p, and n C m D .p 1/=2. Therefore
r1 ; r2 ;    ; rm ; p s1 ; p s2 ;    ; p sn
Lecture Notes on Mathematical Olympiad 269

are all positive and less than p=2.


We now prove by contradiction that these .p 1/=2 values are distinct. Sup-
pose that p si D rj for some choice of i and j , then there exist integers u; v
with 1  u; v  .p 1/=2, such that

si  ua .mod p/ and rj  va .mod p/:

Hence .u C v/a  si C rj D p  0 (mod p) which implies p j .u C v/, a


Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

contradiction, since 2  u C v < p. Thus, the .p 1/=2 numbers are actually the
numbers 1; 2;    ; .p 1/=2. As a result,
 
p 1
Š
2
by 217.174.237.134 on 09/27/15. For personal use only.

D r1 r2    rm .p s1 /    .p sn /  r1    rm . s1 /    . sn / .mod p/
 . 1/n r1    rm s1    sn  . 1/n a  2a  3a    .p 1=2/a .mod p/
 
n .p 1/=2 p 1
 . 1/ a  Š .mod p/
2
 
a
Therefore a.p 1/=2  . 1/n .mod p/, i.e., D . 1/n .
p 
Theorem IV. (Quadratic Reciprocity Law) For distinct odd primes p and q,
  
p q p 1 q 1
D . 1/ 2  2 :
q p
Proof. First of all we need a lemma as follows.
Lemma. Using the notations of Gauss’ Lemma, if a is odd and p is an odd
prime with .a; p/ D 1, then
 
a P.p 1/=2
D . 1/n D . 1/ kD1 Œka=p :
p
Proof of Lemma. Using the notations of Gauss’ Lemma, for each number ka
(1  k  .p 1/=2) in the set S ,
 
ka
ka D p C tk ; 1  tk  p 1: (C.1)
p
The tk is one of r1 ; r2;    ; rm if tk < p=2, and is one of s1 ; s2;    ; sn if tk >
p=2, therefore
.p 1/=2 .p 1/=2   m n
X X ka X X
ka D pC ri C sj : (C.2)
p
kD1 kD1 i D1 j D1
270 Appendix C Theorems On Quadratic Residues

On the other hand, since r1 ;    ; rm ; p s1; p s2 ;    ; p sn is a permutation


of the first .p 1/=2 natural numbers,
.pX
1/=2 m
X n
X m
X n
X
kD ri C .p sj / D pn C ri sj : (C.3)
kD1 i D1 j D1 i D1 j D1

P.p 1/=2
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

It suffices to show n  kD1


Œka=p
(mod 2). By (C.2) (C.3), then
0 1
.pX
1/=2 .pX
1/=2   n
ka X
.a 1/ k D p@ nA C 2 sj : (C.4)
p
kD1 kD1 j D1
by 217.174.237.134 on 09/27/15. For personal use only.

P.p 1/=2 h ka i
By taking modulo 2 to both sides of (C.4), we obtain kD1 p n  0
(mod 2), i.e.
.p 1/=2  
X ka
n .mod 2/:
p
kD1

Now we return to the proof of the theorem.


Consider the rectangle in the xy-coordinate plane whose vertices are .0; 0/,

.p=2; 0/; .0; q=2/, and .p=2; q=2/. Let R denote the region inside this rectangle,
excluding its boundary lines. We count the number of lattice points inside R in
two different ways below. Since p and q are both odd, the lattice points in R
consist of all points .n; m/, where 1  n  .p 1/=2 and 1  m  .q 1/=2;
clearly, the number of such points is
p 1 q 1
 :
2 2
Lecture Notes on Mathematical Olympiad 271

Now the diagonal line ` from .0; 0/ to .p=2; q=2/ has the equation y D
.q=p/x, or equivalently, py D qx. Since gcd.p; q/ D 1, none of the lattice points
inside R will lie on `, since x must be a multiple of p and y must be a multiple
of q if the lattice point .x; y/ is on `, but there are no such points in R. Suppose
that T1 denotes the portion of R which is below the diagonal `, and T2 the portion
above `. By what we have just seen, it suffices to count the lattice points inside
each of these triangles. The number of integers y in the interval 0 < y < kq=p is
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

equal to Œkq=p. Thus, for 1  k  .p 1/=2, there are precisely Œkq=p lattice
points in T1 directly above the point .k; 0/ and below `; in other words, lying on
the vertical line segment from .k; 0/ to .k; kq=p/. It follows that the total number
of lattice points contained in T1 is
.pX
1/=2  
by 217.174.237.134 on 09/27/15. For personal use only.

kq
:
p
kD1

A similar calculation, with the roles of p and q interchanged, shows that the
number of lattice points within T2 is
.q 1/=2  
X jp
:
q
j D1

This accounts for all of the lattice points inside R, so


.pX
1/=2   .qX
1/=2  
p 1 q 1 kq jp
 D C :
2 2 p q
kD1 j D1

From Gauss’ lemma and the lemma just proven above,


  
p q P.q 1/=2 P.p 1/=2
D . 1/ j D1 Œjp=q  . 1/ kD1 Œkq=p
q p
P.q 1/=2 P.p 1/=2
Œjp=qC kD1 Œkq=p
D . 1/ j D1

p 1 q 1

D . 1/ 2 2 :

Thus, the proof of the Quadratic Reciprocity Law is complete. 


Regarding quadratic congruences with composite moduli, the following theo-
rems gives the basic results:
2 n
Theorem V. If p is an odd prime
  with .a; p/ D 1, then x  a .mod p /; n  1
a
has a solution if and only if D 1.
p
272 Appendix C Theorems On Quadratic Residues

Proof. If x2  n
 a .mod p / has a solution, then clearly so does x  a
2

a
.mod p/, so D 1.
p  
a
Conversely, suppose that D 1, we prove that x 2  a .mod p n / has a
p  
a
solution by induction on n. For n D 1, nothing to prove since D 1. Assume
p
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

that the conclusion is true for n D k (k  1), so if x0 is a solution of x 2  a


.mod p k /, then x02 D a C bp k for an appropriate choice of b. For n D k C 1, we
can construct a solution of x 2  a .mod p kC1 / by using x0 and b as follows:
First of all, we solve the linear equation (in y) 2x0 y  b .mod p/ to ob-
tain a unique solution y0 modulo p. This is possible since .2x0 ; p/ D 1. Let
by 217.174.237.134 on 09/27/15. For personal use only.

x1 D x0 C y0 p k . Then
x12 D x02 C 2x0 y0 p k C y02 p 2k D a C .b C 2x0 y0 /p k C y02 p 2k  a (mod p kC1 ).

Thus, x1 D x0 C y0 p k is a solution of x 2  a .mod p kC1 /. The inductive


proof is completed. 
Theorem VI. Let a be an integer and n a positive composite integer. When
n D p1˛1 p2˛2    pr˛r is the prime factorization of n, then a is a quadratic residue
modulo n if and only if a is a quadratic residue modulo pi for all i D 1; 2; : : : ; r.
Proof. If there is integer x such that x 2  a .mod n/, then it is clear that
x 2  a .mod pi / for i D 1; 2; : : : ; r.
When there is an integer xi such that xi2  a .mod pi / for each of i D
1; 2; : : : ; r, then, by Theorem V, there is an integer xi0 such that .xi0 /2  a
˛
.mod pi i / for i D 1; 2; : : : ; r. By the Chinese Remainder Theorem, there is
an integer x satisfying the system
˛
x  xi0 .mod pi i /; i D 1; 2; : : : ; r:

Hence
˛
x 2  .xi0 /2  a .mod pi i /; i D 1; 2; : : : ; r;
so that

x2  a .mod Œp1˛1 ; p2˛2 ;    ; pr˛r /; i.e.; x 2  a .mod n/:

Thus, a is a quadratic residue modulo n. 


Appendix D
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

Proofs of Some Important Inequalities


by 217.174.237.134 on 09/27/15. For personal use only.

Theorem I. (Cauchy-Schwartz Inequality) For any real a1 ; a2 ;    ; an and


b1 ; b2 ;    ; bn ,
.a1 b1 C a2 b2 C    C an bn /2  .a12 C a22 C    C an2 /.b12 C b22 C    C bn2 /:
Further, if a1 ; a2 ;    ; an are not all zeros, the equality holds if and only if there
exists certain constant k such that bi D kai for all i D 1; 2;    ; n.
Proof. Without loss of generality we assume that a12 C a22 C    C an2 > 0. Then
the function f .x/ given by

f .x/ D .a12 C a22 C    C an2 /x 2 2.a1 b1 C a2 b2 C    C an bn /x

C.b12 C b22 C    C bn2 /

D .a1 x b1 /2 C .a2 x b2 /2 C    C .an x bn /2


is always non-negative, so its discriminant is less than or equal to zero, that is,
 D 4.a1 b1 Ca2 b2 C  Can bn /2 4.a12 Ca22 C  Can2 /.b12 Cb22 C  Cbn2/  0:
Thus, the inequality is proven. Further, since
 D 0 , f .x/ D 0 has two equal real roots k , bi D kai for all i D 1; 2; : : : ; n;
we obtain the condition for holding the equality. 
Theorem II. (Schur’s Inequality) For all nonnegative real numbers x; y; z
and a positive number r > 0, the following inequality always holds:
x r .x y/.x z/ C y r .y z/.y x/ C z r .z x/.z y/  0;
where the equality holds if and only if (i) x D y D z or (ii) two of x; y; z are
equal and the other is zero.

273
274 Appendix D Proofs of Some Important Inequalities

Proof. Since x; y; z are symmetric in the inequality, we may assume that x 


y  z  0. Then
x r .x y/.x z/ C y r .y z/.y x/ C z r .z x/.z y/
D .x y/Œx r .x z/ y r .y z/ C z r .x z/.y z/
 .x y/y r Œ.x z/ .y z/ C z r .x z/.y z/  0:
When the equality holds, then x y D 0 and x z D 0 or z D 0, i.e., x D y D z
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

or x D y; z D 0. The inverse is clear. 


Theorem III. (Rearrangement Inequality) Let a1  a2      an and
b1  b2      bn be two groups of ordered real numbers. For a permuta-
tion .j1 ; j2;    ; jn / of .1; 2;    ; n/, the sums given by
by 217.174.237.134 on 09/27/15. For personal use only.

SO D a1 b1 C a2 b2 C    C an bn ; .ordered sum/
SM D a1 bj1 C a2 bj2 C    C an bjn ; .mixed sum/
SR D a1 bn C a2 bn 1 C    C an b1 ; .reverse sum/
must obey the inequalities : SR  SM  SO .
Furthermore, SM D SO for all SM (or SM D SR for all SM ) if and only if
a1 D a2 D    D an or b1 D b2 D    D bn .
Proof. (i) First of all we show SM  SO , i.e.,
a1 bj1 C a2 bj2 C    C an bjn  a1 b1 C a2 b2 C    C an bn : (D.1)
If jn D n, we can delete the terms an bn from both sides of (26.1), then change
n to n 1 and continue our discussion. Therefore, we assume that jn ¤ n. Let
jk D n for some 1  k  n 1. By interchanging bjn and bn , another mixed
0
sum SM is obtained:
0
SM D a1 bj1 C a2 bj2 C    C ak bjn C    C an bn :
Since
0
SM SM D .ak bjn C an bn / .ak bn C an bjn / D .an ak /.bn bjn /  0;
0
so it suffices to compare SM with SO . Starting from any arrangement .bj1 ; bj2 ; : : :,
bjn /, by continuing the above process it is always possible to obtain SO by a finite
number of exchanges as above without decreasing the value of SM . This implies
that SM  SO for all SM .
(ii) We can prove SR  SM based on the result of (i). Since bn  bn 1
     b1 and . bj1 ; bj2 ;    ; bjn / is a permutation of . bn ; bn 1 ;    ,
b1 /, by the result of (i),
n
X n
X n
X
SR D ai . bnC1 i /  ai . bji / D ai bji D SM ;
i D1 i D1 i D1
Lecture Notes on Mathematical Olympiad 275

therefore SR  SM .
(iii) "Regarding the necessary and sufficient conditions for holding the equal-
ity, it is clear that SM D SO for all SM when either a1 D a2 D    D an or
b1 D b2 D    D bn . Conversely, when SM D SO for all SM , if it is neither
a1 D a2 D    D an nor b1 D b2 D    D bn , then a1 < an and b1 < bn . Hence,
for the special mixed sum given by SM D a1 bn C a2 b2 C    C an b1 , as shown
above, we obtain that SO SM D .an a1 /.bn b1 / > 0, which contradicts
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

SM D SO for all SM .
The discussion for SM D SR is similar. Thus, the rearrangement inequality is
proven. 

Theorem IV. (Chebyshev’s Inequality) Let a1  a2      an and b1 


b2      bn be two groups of ordered real numbers. Then
by 217.174.237.134 on 09/27/15. For personal use only.

n n
! n
! n
1X 1X 1X 1X
ai bnC1 i  ai bi  ai bi :
n n n n
i D1 i D1 i D1 i D1

Proof. First of all we show the right inequality. Since


n n n n n n n
1 XX 1 XX 1 XX X
.ai bi C aj bj / D ai bi C aj bj D ai bi ;
2n 2n 2n
i D1 j D1 i D1 j D1 i D1 j D1 i D1
n n n n n n
1 XX 1 XX 1X X
.ai bj C aj bi / D ai bj D ai  bj ;
2n n n
i D1 j D1 i D1 j D1 i D1 j D1

therefore
n
! n
! n n n n
1X 1X 1X 1X X X
ai bi  ai bi , ai  bj  ai bi
n n n n
i D1 i D1 i D1 i D1 i Dj i D1
n n
1 XX
, .ai bi C aj bj ai bj aj bi /  0
2n
i D1 j D1
n n
1 XX
, .ai aj /.bi bj /  0;
2n
i D1 j D1

and the last inequality is obvious since .ai aj / and .bi bj / have same signs
for 1  i; j  n. 
Consequence 1. For x1 ; x2; : : : ; xn > 0, when pq > 0,
n n n n n n
X pCq 1X pX q X pCq 1X p X q
xi  xi  xi I and xi  xi  xi when pq < 0:
n n
i D1 i D1 i D1 i D1 i D1 i D1
276 Appendix D Proofs of Some Important Inequalities

Consequence 1 is a direct application of the Chebyshev’s inequality.


n
Y
Consequence 2. x1 ; x2 ; : : : ; xn > 0, r > s > 0 and xi D 1, then
i D1

n
X n
X
xir  xis :
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

i D1 i D1

n n n n
! n1 n n
X 1X r X Y X X
In fact, xir  xi s
 xis  x r s
 xis D xis .
n
i D1 i D1 i D1 i D1 i D1 i D1
by 217.174.237.134 on 09/27/15. For personal use only.

Consequence 3. For a1  a2      an I b1  b2      bn and


m1 ; m2 ;    mn > 0,

n n n n p
X X X p X
mi  ai bi  mi ai  mi bi :
i D1 i D1 i D1 i D1

In fact,
n n n n p n
X X X p X 1 X
mi  ai bi mi ai  mi bi D mi mj .ai aj /.bi bj /  0.
2
i D1 i D1 i D1 i D1 i;j D1

Theorem V. (Jensen’s Inequality) For a strictly convex function f .x/ defined


on I D Œa ; b (or I D .a ; b/), the inequality
 
x1 C x2 C    C xn 1
f  Œf .x1 / C f .x2 / C    C f .xn / (D.2)
n n

holds for any x1 ; x2 ;    ; xn 2 I , and the equality holds if and only if x1 D


x2 D    D xn .

Proof. We prove it by induction on n. For n D 1; 2, the conclusion is clear.


Assume the conclusion is true for n D k (k  2), then for n D k C 1, let

1
A D .x1 C x2 C    C xkC1 /;
kC1
1
B D .x1 C x2 C    C xk /;
k
xkC1 C .k 1/A
C D :
k
Lecture Notes on Mathematical Olympiad 277

B CC
We have A D and
2
 
B CC 1
f .A/ D f  Œf .B/ C f .C /
2 2
 
1 1 1
 .f .x1 / C f .x2 / C    C f .xk // C .f .xkC1 / C .k 1/f .A// ;
2 k k
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

Therefore
 
x1 C x2 C    C xkC1 1
f  Œf .x1 / C f .x2 / C    C f .xkC1 /:
kC1 kC1
Above equalities hold if and only if x1 D x2 D    D xk and B D C , which is
by 217.174.237.134 on 09/27/15. For personal use only.

equivalent to x1 D x2 D    D xk D xkC1 . 

Theorem VI. (Weighted Jensen’s Inequality) Given that f is a continuous


function defined on some interval I D Œa ; b (or I D .a ; b/). Then f is strictly
I if and only if for any positive integer n 2 N and 1 ; 2 ;    n > 0
convex on P
satisfying N i D1 i D 1,

f .1 x1 C 2 x2 C    C n xn /  1 f .x1 / C 2 f .x2 / C    C n f .xn /; (D.3)

for all x1 ;    ; xn 2 I , and the equality holds if and only if x1 D x2 D    D xn .


Proof. The sufficiency is obvious. Below we only prove the necessity by induc-
tion on n. Let f be a continuous and strictly convex function.
The conclusion is clear for n D 1.
For n D 2, If the conclusion is not true, then there exist x1; x2 2 I with
x1 < x2 and  2 Œ0; 1, such that

f . x1 C .1  /x2 / >  f .x1 / C .1  /f .x2 /:

Let F ./ D f .x1 C .1 /x2 / f .x1 / .1 /f .x2 /; 0    1. Then


F is continuous on Œ0; 1 and F .0/ D F .1/ D 0; F . / > 0. Therefore M0 D
max fF ./g > 0. Let
01

0 D inffjF ./ D M0 ; 0    1g:

Then 0 < 0 < 1. Take ı > 0 such that Œ0 ı; 0 C ı  Œ0; 1. Since

x1  x1 D .0 ı/x1 C .1 0 C ı/x2; x2 D .0 C ı/x1 C .1 0 ı/x2  x2 ;

we have  
x1 C x2 1 
f  f .x1 / C f .x2 / ;
2 2
278 Appendix D Proofs of Some Important Inequalities

i.e.,
f .0 x1 C .1 0 /x2 /
1
 2
ff ..0 ı/x1 C .1 0 C ı/x2 / C f ..0 C ı/x1 C .1 0 ı/x2 //g ;

which implies that


1
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

M0 D F .0 /  ŒF .0 ı/ C F .0 C ı/ < M0 ;


2
a contradiction. Thus, the conclusion is true for n D 2.
Assume that (D.3) is true for n  k .k  2/, then, for x1 ; x2 ;    ; xkC1 2 I
and the nonnegative numbers 1 ; 2 ;    ; kC1 with sum 1, by considering
by 217.174.237.134 on 09/27/15. For personal use only.

 
k xk kC1 xkC1
k xk CkC1 xkC1 D .k CkC1 / C D .k CkC1 /xk0 ;
k C kC1 k C kC1
k kC1
where xk0 D xk C xkC1 , then the induction assumption
k C kC1 k C kC1
gives
1
f .xk0 /  Œk f .xk / C kC1 f .xkC1 /;
k C kC1
hence
f .1 x1 C 2 x2 C    C kC1 xkC1 /
 1 f .x1 / C    C k 1 f .xk 1 / C .k C kC1 /f .xk0 /
 1 f .x1 / C 2 f .x2 / C    C k f .xk / C kC1 f .xkC1 /:

Therefore, the proposition is proven for n D k C 1 also. 


Theorem VII. (Power Mean Inequality) For any nonnegative real numbers
x1 ; x2;    ; xn and ˛; ˇ > 0 with ˛ > ˇ,

n
! ˛1 n
! ˇ1
1X ˛ 1X ˇ
xi  xi : (D.4)
n n
i D1 i D1

Proof. In (D.4) let yi D xiˇ for i D 1; 2;    ; n, then (D.4) becomes


 ˛=ˇ
1 ˛=ˇ ˛=ˇ y1 C    C yn
.y C y2 C    C yn˛=ˇ /  : (D.5)
n 1 n

Since ˛=ˇ > 1, the function f .u/ D u˛=ˇ ; u > 0 is convex, therefore (D.5) is
true by Jensen’s inequality. 
Appendix E
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

Note On Cauchy’s Problem in Functional Equations


by 217.174.237.134 on 09/27/15. For personal use only.

Theorem I. When the function f .x/ satisfies equation (30.1) in Lecture 30 and
satisfies one of the following conditions:

(A) f .x/ is bounded in an interval .a; b/ where a < b;


(B) f .x/  0 on the interval Œ0;  or f .x/  0 on Œ0; , where  > 0,
(C) f .x/ is continuous at some point x0 ,
then f .x/ D Cx, where C is a constant.

Proof of (A). From the proof in Example 1 in Lecture 30, we find that equation
(30.1) forces f to have the following properties:

f .0/ D 0I f .r / D C r for any r 2 Q:

Define g.x/ D f .x/ Cx; x 2 R. Then g.r / D 0 on Q, and for x; y 2 R

g.x C y/ D f .x C y/ C.x C y/ D .f .x/ Cx/C .f .y/ Cy/ D g.x/C g.y/:

For any given real number x, take an arbitrary rational number r in the interval
.x b; x a/, and let x1 D x r , then x1 2 .a; b/, and g.x/ D g.x1 Cr / D g.x1 /.
Hence g is a bounded function.
We now show g.x/ D 0 for any x 2 R. Suppose that there is x0 2 Qc such
that g.x0 / D d ¤ 0, then g.nx0 / D ng.x0 / D nd , therefore jg.nx0 /j D njd j !
C1 as n ! C1, a contradiction. Thus, g.x/ is equal to zero identically, i.e.
f .x/ D Cx for all x 2 R.

Proof of (B). It suffices to show that under condition (ii), f .x/ is monotone on
Œ0; . Let x; y 2 Œ0;  with x  y, then 0  y x  , therefore

f .y/ D f .x C y x/ D f .x/ C f .y x/  f .x/ if f .u/  0 on Œ0; ;

279
280 Appendix E Note On Cauchy’s Problem in Functional Equation

or

f .y/ D f .x C y x/ D f .x/ C f .y x/  f .x/ if f .u/  0 on Œ0; :

Since f . x/ D f .x/, so f is monotone on Œ ; . By the proof of the Exam-


ple 1 in Lecture 30, we have f .x/ D Cx for all x 2 R.
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

Proof of (C). Since f is continuous at x0 , there must be a < b such that x0 2


.a; b/ and f is bounded on .a; b/, so f satisfies condition (A).
by 217.174.237.134 on 09/27/15. For personal use only.
Index
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

AM-GM inequality, 4 testing questions, 125–126, 249–


arithmetic progression, 11 261
common difference of, 11
initial term of, 11 Gauss’ lemma, 70, 273
by 217.174.237.134 on 09/27/15. For personal use only.

partial sum Sn of, 11 geometric progression, 11


common ratio of, 11
Cauchy-Schwartz inequality, 75, 277 partial sum Sn of, 12
common forms of, 75 sum at infinity S1 of, 12
Cauchy-Schwartz inequality and Schur’s
inequality Jensen’ inequality, 86
testing questions, 82–84, 208–216 Jensen’s inequality, 280
Chebyshev’s inequality, 85, 279
Legendre symbol, 70
Chinese remainder Theorem, 45
Chinese remainder Theorem and order mathematical induction, 1
of an integer, 45 first induction, 1
testing questions, 51–52, 172–179 second induction, 1
complete residue system modulo m, 37 testing questions, 9–10, 129–140
least non-negative, 37 variations of, 1
convex function, 86 mathematical progressions and geomet-
strictly, 86 ric progressions, 11
testing questions, 17–18, 140–146
Euler’s Criterion, 70, 272
Mersenne numbers, 48
Euler’s phi-function, 37
Euler’s Theorem, 38 non-linear Diophantine equations, 53
testing questions, 59–60
Fermat number, 49 usual methods for solving, 53
Fermat’s Theorem, 39 note on Cauchy’s problem, 283
Fibonacci sequence, 7
Fubini’s principle, 111 order of an integer, 46
functional equation, 119 basic properties of, 46
basic methods for solving, 120
Cauchy’s equation, 120 Pell’s equation, 64
Cauchy’s method for solving, 119 existence of infinitely many posi-
Cauchy’s problem in, 120 tive integer roots of, 269

281
282 INDEX

existence of positive integer roots applications of correspondence and


of, 64 bijection, 105
proof of the theorem, 267–269 applications of Three Principles,
fundamental solution of, 65 Permutation and Combination,
minimum solution of, 65 105, 107
Pell-type equation x 2 dy 2 D 1, 269 applications of Three Principles,
power mean inequality, 87, 282 Permutations and Combina-
Lecture Notes on Mathematical Olympiad Courses Downloaded from www.worldscientific.com

primitive root modulo m, 47 tions, 103


Pythagorean triples, 61 counting in two ways, 111–113
primitive, 61, 62 recurrence method, 116
Pythagorean triples and Pell’s equations testing questions, 107–109, 116–
testing questions, 67–68, 188–199 118, 233–249
by 217.174.237.134 on 09/27/15. For personal use only.

recurrence method, 114


quadratic congruence with composite mod-some fundamental theorems on congru-
uli, 71, 275–276 ence, 37
quadratic reciprocity law, 70, 274–275 testing questions, 43–44, 163–171
quadratic residue modulo m, 69 some methods for solving inequalities,
quadratic non-residue modulo m, 93
69 algebraic manipulation, 93–94
testing questions, 73–74, 200–207 enlargement and compression, 96–
97
rearrangement inequality, 85, 278 localization, 97–98
rearrangement inequality etc. substitution of variables or expres-
testing questions, 91–92, 216–225 sions, 94–95
recursive sequence, 19 testing questions, 99–101, 225–233
characteristic equation of, 20 summation of various sequences, 29
recursive formula of, 19 testing questions, 35–36, 154–162
testing questions, 27–28, 147–153
Type I, 19 theorem on primitive Pythagorean triples,
Type II, 19 62
Type III, 20 theorems on quadratic residues, 271
Type IV, 20
weighted Jensen’ inequality, 86
Type V, 21 weighted Jensen’s inequality, 281
Type VI, 21 Wilson’s Theorem, 39
reduced class, 37
reduced system modulo m, 38
least, 38

Schur’s inequality, 75, 277


common forms of, 76
some basic methods in counting, 103,
111

You might also like