You are on page 1of 41

Korean Mathematical Olympiad

First Round 2006-2015

Translation by rkm0959, problems written by KMS.


Latex revision by Leon.

Problems 1-5 are worth 4 points, Problems 6-15 are worth 5, Problems 16-20 are worth 6.

Time limit is 4 hours.

1
KMO First Round 2006

27 May 2006

1. Let there be a circle with center O and 5 as its radius. Let P be the intersection of the diagonals of an isosceles
trapezoid inscribed in O. The diagonal is broken into two parts by P , and the length of the longer part is 6
while the length of the shorter part is 2. Calculate OP 2 .

Solution (yojan-sushi ). Clearly, the power of P wrt O is 6 · 2 = 12 = 25 − OP 2 , so OP 2 = 13

2. For a given positive integer m, m1003 ≡ 19 (mod 77). Calculate the remainder when m is divided by 77.

Solution (jh235 ). m1003 ≡ 19 (mod 77) gives m1003 ≡ 5 (mod 7) and m1003 ≡ 8 (mod 11). Then, noting
that obviously (m, 7) = (m, 11) = 1, we compute ϕ(11) = 10, ϕ(7) = 6 and apply Euler’s Theorem, so m ≡ 5
(mod 7) and m3 ≡ 8 (mod 11). Now, taking m = 0, 1, 2, 3, 4, 5, 6, 7, 8 we see that m = 2 is the only solution to
the latter congruence. Hence, we have m ≡ 5 (mod 7) and m ≡ 2 (mod 11). If we want to solve 7a+5 = 11b+2,
we find our solution to be a = 9, b = 6. We get a final answer of 68

3. Let
99 99
X 1 X 1
a= , b=
n=1
n(n + 1)2 (n + 2) n=1
n2 (n + 1)2 (n + 2)
q
For relatively prime positive integers p, q, 3a + 2b = . Calculate the remainder when q is divided by 1000.
p

Solution. We have
 
X 3n + 2 X 1 1
3a + 2b = 2 2
= −
n (n + 1) (n + 2) n2 (n + 1) (n + 1)2 (n + 2)
1 1 504999
Notice that this sum telescopes to 1·2 − 1002 ·101 = 1010000 , giving the answer of 999

4. For all arithmetic sequences an with all terms as integers, how many arithmetic sequences are there such that
{1, 1000} ⊂ {a1 , a2 , . . . , a10 }?

Solution (jh235 ). Let the statement ”1 and 1000 are 1 apart” mean that 1 and 1000 are adjacent in the
arithmetic progression, the statement that ”1 and 1000 are 2 apart” mean that they are separated by 1
element, etc. . .
It is not hard to see that 1 and 1000 can be k apart only if k|999. Hence, we will only look at when k = 1, 3, 9.
When k = 1, there are 9 · 2 arithmetic progressions (the ×2 accounting for both increasing and decreasing
progressions) and when k = 3 there are 7 · 2 and when k = 9 there are 1 · 2. Hence, the answer is

2(9 + 7 + 1) = 34

5. In 4ABC, let Q be the intersection of AC and the line parallel to BC and passing P , a point on AB. Let R
be the intersection of the line parallel to AB and passing Q and the line parallel to AC and passing P . Let
2
S = 4ABC, and let the area of the common area of 4ABC and 4P QR be T . Calculate the minimum of TS 2 .

Solution. WLOG assume BC = 1. Let P Q = a. We wish to find the maximum of T . If R is inside 4ABC,
i.e. 0 ≤ a ≤ 21 , it is trivial that R must lie on BC for T to be maximized, i.e. a = 21 . Now let’s look at
1
2 ≤ a ≤ 1. We have

T = 4ABC − 4AP Q − 4P BS − 4QT C = (1 − a2 − 2(1 − a)2 )S.


T S2
We have S = −3a2 + 4a − 1, which has maximum of 13 . Therefore, the minimum of T2 is 9

2
527
6. If m is an integer such that 3m |73 − 1, what is the maximum possible value of m?

Solution (jh235 ). By Lifting the Exponent, since 3|7 − 1,


527 527
v3 (73 − 13 ) = v3 (7 − 1) + v3 (3527 ) = 528

7. Reals x, y, z satisfies 3x + 2y + z = 1. For relatively prime positive integers p, q, let the maximum of
1 1 1
+ +
1 + |x| 1 + |y| 1 + |z|
q
be . Find p + q.
p

Solution. I claim that the maximum is 11 1


4 , giving the answer of 15 . The equality holds at x = 3 , y = z = 0.
We multiply by 4(1 + |x|)(1 + |y|)(1 + |z|) on both sides. Rearranging, we need to prove

3|x| + 2|y| + |z| + 7|xy| + 7|yz| + 7|zx| + 11|xyz| ≥ 1,

which is true since 1 = 3x + 2y + z ≤ 3|x| + 2|y| + |z|. The proof is complete.

8. Let x be the number of functions f : {1, 2, 3, 4, 5, 6, 7} → {1, 2, 3, 4, 5, 6, 7} such that the following two condition
are true:

(i) for all n, f (n) − n ≡ 1 (mod 2).


(ii) for all n, f (f (n)) 6= n.
Calculate the remainder when x is divided by 1000.

Solution. We count the functions satisfying the first condition and subtract the cases where the second condi-
tion is not true. First, the number of functions satisfying the first condition is T = 34 · 43 , since f (odd) = even
and f (even) = odd. Let Ak be the number of functions such that the number of pairs (a, b) such that f (a) = b,
f (b) = a is at least k. Clearly there can be at most 3 pairs. We need to calculate T − A1 + A2 − A3 . Let’s
calculate A1 (A2 , A3 can be calculated in a similar manner). We take one even number and one odd number for
the pair i.e. f (a) = b, f (b) = a. Then, we take other
 numbers and justrandomly assign its output. We have
A1 = 41 31 33 42 . Similarly, we have A2 = 2! 42 32 32 41 and A3 = 3! 43 33 31 40 . Now calculate. The desired


answer is 1224 ≡ 224 (mod 1000)

9. Let M1 , M2 , M3 , M4 , M5 be the midpoints of each sides of a regular pentagon, in a counterclockwise order.


Define X as the midpoint of M2 M4 and Y as the midpoint of M3 M5 . Calculate XY 2 knowing that the length
of the sides of pentagon is 40.

Solution (yojan-sushi ). Scale the problem down to a regular pentagon inscribed in the unit circle on the
complex plane. If the vertices are at 1, ω, . . . , ω 4 , where ω is a fifth root of unity, then it follows that M1 , . . . , M5
4
ω 3 +ω 4 2
+ω 3
are ω 2+1 , 1+ω2 ,..., 2 . Find the midpoints of M2 M4 and M3 M5 , we see that X = 1+ω+ω 4 and Y =
ω+ω 2 +ω 3 +ω 4
. Thus,
2 √
2 − ω4 − ω4 1 − cos 72◦ 5− 5
|XY |2 = = = .
16 8 32
When we compute the side length of our pentagon, x, we see that

2 5− 5 x
x = 2 − ω − ω = 2 − 2 cos 72 = =⇒ = 4.
2 |XY |

When we scale our pentagon up to x = 40, it follows that |XY | = 10, yielding the answer of |XY |2 = 100.

3
10. For a pair of positive integers (a, b), define

a2 b + 2ab2 − 5
Q(a, b) = .
ab + 1
n
P
Let (a1 , b1 ), (a2 , b2 ), . . . , (an , bn ) be all pairs of positive integers such that Q(a, b) is an integer. Calculate ai .
i=1

Solution. A sketch. We have Q(a, b) = a+2b− a+2b+5ab+1 , so a+2b+5 ≥ ab+1, i.e. (a−2)(b−1) ≤ 6. Therefore,
4 6
we either have a ≤ 4 or b ≤ 3. If a = 1, we have 2 + b+1 ∈ N, so b = 1 or 3. If a = 2, we have 1 + 2b+1 ∈ N, so
22 17
b = 1. If a = 3, we have 3Q = 2 + 3b+1 ∈ N, so b = 7. If a = 4, we have 2Q = 1 + 4b+1 ∈ N, so b = 4. Now
6 17
if a ≥ 5 and b ≤ 3, we have if b = 1, 1 + a+1 ∈ N, so a = 5. If b = 2, we have 2Q = 1 + 2a+1 , so a = 8. If
32
b = 3, we have 3Q = 1 + 3a+1 , so a = 5. So the solution set is (1, 1), (1, 3), (2, 1), (3, 7), (4, 4), (5, 1), (5, 5), (8, 2),
giving the answer of 1 + 1 + 2 + 3 + 4 + 5 + 5 + 8 = 29

11. Let there be a triangle T1 , with the angles of 50, 60, 70. Let T2 be a triangle with the intersections of the
circumcircle and three rays from circumcenter that meets perpendicularly to each sides of T1 . Define Tn
1
similarly. Let an be the smallest angle in Tn . Calculate the minimum of n such that 60 − an < 1000 .

Solution. Let α, β, γ be the angles of 4ABC. Let α0 , β 0 , γ 0 be the angles of the triangle we get by taking
the intersections of perpendicular bisectors of each sides in 4ABC and the circumcircle of 4ABC. We have
α0 = β+γ2 , and similarly for other angles. Now, we have β = 60, so β =
0 180−β
2 = 60. This implies that the
0 0 γ−β
angle of 60 remains. Since |β − γ | = | 2 |, the difference between 60 degrees and the smallest angle in the
triangle halves every time. Therefore, 60 − an = 21n · 20. We need 2n−1 > 10000, so we get n = 15

12. Define n as the number of 4-tuples of integers (x, y, z, w) such that |x| + |y| + |z| + |w| ≤ 10. Find the remainder
when n is divided by 1000.

Solution. Let A = 10 − |x| − |y| − |z| − |w| ≥ 0. Let there be k numbers in |x|, |y|, |z|, |w| that are 0. k varies
from 0 to 4. If there are k 0s, we have to multiply by 24−k since the sign may change on nonzero values  of
10
x, y, z, w. Also, the sum of 4 − k positive integer values and A must be 10, so we have to multiply 4−k by
stars and bars. Also there are k4 ways to choose what numbers are going to be 0. Therefore, the number of


ways possible is just


4    
X 10 k 4
·2 · = 8361 ≡ 361 (mod 1000).
k k
k=0

13. In 4ABC, AB = 2, BC = 100, ∠B = 90◦ . A point P moves around segment BC. Let D be the midpoint of
AB. Let θ be the maximum angle of ∠AP D. Calculate sin1 θ .

Solution (jh235 ). To maximize θ is to maximize sin θ (since θ is acute). Let BP have length x. Then by Law
of Sines and Pythagorean Theorem,
x
sin θ = √ √ .
x + 4 x2 + 1
2

Hence, we now just need to minimize r


1 4
= x2 + + 5.
sin θ x2
By the AM-GM inequality,
4
x2 + ≥4
x2
√ √
with equality when x = 2. Hence, the answer is 4+5= 3

4
14. How many positive integers not larger than 2006 are there such that for some integers m, n, the integer can be
written as m(5m + 4n)?

Solution. Taking m odd, we have 5m2 + 4mn is 1 (mod 4). If we let m = 1, it is easy to see that all integers
1 (mod 4) are attainable. Taking m 0 (mod 4), we have 5m2 + 4mn ≡ 0 (mod 16). Taking m = 4, it is easy
to see that all of such integers are attainable. Taking m 2 (mod 4), we have 5m2 + 4mn ≡ 4 (mod 8), and
taking m = 2 shows that all such integers are attainable. Therefore, we can write 4k + 1, 8k + 4, 16k for all
integers k. The answer is 878

15. A positive integer A can be written as (an an−1 · · · a2 a1 )8 . Also, 2A = (a1 a2 · · · an−1 an )8 . What is the sum of
all possible values of a2 ?

Solution. Denote a1 = (ABC)2 , a2 = (DEF )2 , an−1 = (def )2 , an = (abc)2 . The condition gives that
(ABCDEF · · · def abc)2 = (abcdef · · · DEF ABC0)2 . Now comparing digits give you a = B = c = 0, b = 1,
(since an 6= 0), A = C = 1, d = f = 1, E = 1, D = F = e. Now we check cases. If e = 0, we have a2 = 2,
which can be achieved. If e = 1, we have a2 = 7, which can be achieved. The answer to this problem is 9

16. Let S = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11}. How many non-empty subsets of S are there such that the sum of the
elements of the subset is 1 (mod 5)?

Solution. Denote f (x) = (1 + x)(1 + x2 ) · · · (1 + x11 ). We wish to find the sum of coefficients of x5k+1 . Let
g(x) = f (x)−1
x . We can find the sum of coefficients of x5k in g(x). By Primitive Roots of Unity Filter, we can
just calculate
1
g(w) + g(w2 ) + g(w3 ) + g(w4 ) + g(w5 )

5
where w is the fifth root of unity. We easily find the answer to be 412

17. A convex hexagon A1 A2 A3 A4 A5 A6 satisfies A1 A2 + A1 A6 = 2, and A2 A3 = 2, A1 A4 = 4. 2A2 A3 A5 A6 is a


parallelogram, and 4A3 A4 A5 is a equilateral triangle. Let the area of this hexagon be S. Find the product of
the minimum and maximum value of S.

Solution. I claim that the area must be 3 3, giving 27 as the answer. Set a point A7 inside the hexagon
such that A1 A2 A3 A7 is a parallelogram. Let A3 A7 = x, A3 A4 = y, A7 A4 = z. From the Ptolemy Inequality on
A7 A3 A4 A5 , we have xy+(2−x)y ≥ yz, so z ≤ 2. From the Triangle Inequality, we have A7 A4 +A1 A7 ≥ A1 A4 , so
z ≥ 2. Both equalities hold, so A1 , A4 , A7 are colinear and A3 , A4 , A5 , A7 are cyclic. Now we have A1 A4 k A2 A3 .
The area of the hexagon is the sum of two trapezoids √ A1 A2 A3 A4 and A1 A4 A5 A6 . The sum of the heights of

the two trapezoids
√ is (A 3 A 7 + A 5 A 7 ) sin 60 = 3. The average length for both trapezoids are 3, so the area
must be 3 3, as desired.

18. Sequence an satisfies a1 = 1 and an+1 = 3an + 1. Let bn be the remainder when an is divided by 100. Find
2015
X
bi
i=2006

Solution. Check that 310 ≡ 49 (mod 100) and 320 ≡ 1 (mod 100). Now check that a5 ≡ 50 (mod 100). Also,
check that 3100k+50 + 1 ≡ 50 (mod 100). We have that an ≡ 50 (mod 100) for n ≥ 5, so bn = 50 for all n ≥ 5.
The desired answer follows to be 500

5
19. f : [0, 6] → [−4, 4] satisfies f (0) = 0, f (6) = 4. Also, if x, y ≥ 0 and x + y ≤ 6,
1 p p 
f (x + y) = f (x) · 16 − f (y)2 + f (y) · 16 − f (x)2
4
Calculate (f (3) + 2f (1))2 .

Solution. Taking x = 3 and y = 3, we find f (3) = 2 2. Taking x = 1, y = 2 and x = y = 1, we find
1 p p 
f (3) = f (1) 16 − f (2)2 + f (2) 16 − f (1)2
4
and 2
f (1)2 − 8

2

16 − f (2) =
2
Now plugging this in, we have
f (1)
f (1)2 − 8 + 16 − f (1)2

f (3) =
8
2

If f (1) > 8, we have f (3) = f (1) = 2 2, but 4 = f (3 + 1) = f (4) = f (2 + 2) = 0, a contradiction. Therefore,
√ √
we have |f (1)2 − 8| = 8 − f (1)2 , and we calculate f (1) = 6 − 2. The desired answer is 24

20. Let there be a 3 × 3 × 3 cube ABCD − EF GH, with A = (0, 0, 0). An ant starts at point A, reaches G, and
returns to A. The ant can turn around at each lattice point by 90 degrees or head straight, but it cannot go
inside the cube. The ant uses the quickest path possible, and does not return to a point that was visited before.
Also, while going to point G, the ant does not pass inside AEHD and D, and while heading back, the ant does
not pass inside EF BA and B. Let x be the number of paths that the ant can take. Calculate the remainder
when x is divided by 1000.

Solution. A very rough sketch. Consider the net. The number of paths is
 2  2  2  2
8 7 8 7
− − + = 1568 ≡ 568 (mod 1000)
3 3 2 2

6
KMO First Round 2007

12 May 2007

1. In 4A1 A2 A3 , ∠A1 = 30◦ , ∠A2 = 70◦ , ∠A3 = 80◦ . let Bi be the intersection of the circumcircle of A1 A2 A3 and
the perpendicular bisector of Ai+1 Ai+2 (indices are taken modulo 3) that is closer to Ai . What is the largest
angle in 4B1 B2 B3 ?

Solution. Let O be the circumcenter of 4ABC. We have ∠B2 B1 B3 = 12 ∠B2 OB3 = 21 (180◦ − ∠A2 A1 A3 ) =
75◦ . Similarly, we have ∠B1 B2 B3 = 55◦ and ∠B1 B3 B2 = 50◦ , giving the answer of 75◦

φ(n) 2
2. How many positive integers are there that are less than 1000 such that = ?
n 7

Solution (jh235 ). Recall that


Yp−1
ϕ(n) = n .
p
p|n

Hence, for an n to satisfy this,


Yp−1 2
= .
p
p 7

Clearly, one of the p’s must be 7. Then,


Y p−1 1
= .
p 3
p6=7

Similarly, one of the primes must be 3. Hence,


Y p−1 1
= .
p 2
p6=7,3

This only happens when the last prime is 2. Hence, the set of n is the set of all integers of the form

2x 3y 7z , x, y, z ≥ 1.

Now we bash and get 13

3. Let the multiple of the real roots of x3 − [2x2 ] + [x] − 24 = 0 be P . Calculate the remainder when P 3 is divided
by 1000. Note: [x] denotes the smallest integer that is not less than x.

Solution. If x ≤ 72 , we have x3 + [x] ≤ x3 + x < 2x2 + 23 < [2x2 ] + 24, so no solutions. If x ≥ 11


3 , we have
x3 + [x] > x3 + x − 1 > 2x2 + 24 ≥ [2x2 ] + 24, so no solutions. Now if 72 < x < 11 , we have [x] = 3, and
49 2 242 2 2
√ 5
3 √
3
2 < 2x < 9 , so [2x ] = 24, 25, 26. If [2x ] = 24, we have 2 3 < x < , and we have x = 45, which does

5
√ 2 √
not satisfy the mentioned inequality. If [2x ] = 25, we have 2 < x < 13, and we have x = 3 46. If [2x2 ] = 26,
2 √
√ √
we have 13 < x < √96 , and we have x = 3 47. Therefore, the answer is 46 · 47 ≡ 162 (mod 1000)

4. How many 8-tuples (x1 , x2 , . . . , x8 ) are there such that {x1 , x2 , . . . , x8 } = {1, 2, . . . , 8}, x1 + x2 + x3 + x4 <
x5 + x6 + x7 + x8 , x1 < x2 < x3 < x4 , and x5 < x6 < x7 < x8 ?

Solution. There are 84 = 70 tuples that satisfy the third and the last condition. Now we can just exclude


the cases where x1 + x2 + x3 + x4 = x5 + x6 + x7 + x8 , and divide by 2. Bash out to find that there are 8 such
cases. The desired answer is 70−8
2 = 31

7
5. In 4ABC, ∠B = 75◦ , ∠A = 60◦ , AB = 8◦ . If the perpendicular bisector of BC meets the bisector of ∠A at
D, calculate DC 2 .

Solution. From BD = CD and ∠BAD = ∠DAC, we have√ABCD is cyclic. Now ∠BCD = ∠BAD = 30◦ .
60◦
By sine law on 4ABC, we calculate BC = sin
sin 45◦ · AB = 4 6. Let H be the midpoint of BC. We now have
√ CH
√ 2
CH = 2 6, and CD = cos 30◦ = 4 2. The desired answer is DC = 32

6. Find the number of (a, b, c), where a, b, c are positive integers, that
a2 + b2 − c2 b2 + c2 − a2 c2 + a2 − b2 15
+ + =2+
ab bc ca abc
Solution. We multiply abc on both sides and factor. The result of this is (a − b + c)(b − c + a)(c − a + b) = 15.
Let x = a + b − c, y = a + c − b, z = c + b − a. We have xyz = 15 and 2a = x + y, 2b = x + z, 2c = y + z.
WLOG assume a ≥ b ≥ c, so x ≥ y ≥ z. We know that x must be positive, so yz is positive. Since c = y+z 2
is positive, y and z are both positive. The possible cases are (x, y, z) = (15, 1, 1) and (x, y, z) = (5, 3, 1), so
(a, b, c) = (8, 8, 1), (4, 3, 2), giving the answer of 3 + 3! = 9

7. A complex number z satisfies z 2007 = 1 but for all positive integers n < 2007, z n 6= 1. Calculate
2006
1 Y
· (1 + z i + z 2i )
3 i=1

Solution. Since z 669 6= 1, we have


1 − z 2007
= 1 + z 669 + z 669·2 = 0
1 − x669
The answer must be 0

8. How many 9-tuples of positive integers (a1 , a2 , . . . , a9 ) are there such that a1 ≤ a2 ≤ · · · ≤ a9 , ai ≤ i for
1 ≤ i ≤ 9, and ak2 = k 2 for k = 1, 2, 3?

Solution. Divide this into two sequences - where indices are from 1 to 3, and where indices are from 4 to 8.
The possible cases for the two sequences are C3 and C5 , (where Cn is the nth Catalan number) so the desired
answer is C3 · C5 = 5 · 42 = 210

9. In 2ABCD, AB = 4, BC = 6, CD = 2, DA = 4, ∠ABC = 60◦ . Let AB ∩ CD = E. Calculate 5 · DE.

Solution. By LoC on 4ABC, we have AC 2 = 28. Let ∠ADC = θ. By LoC on 4ADC, we have cos θ = − 12 ,
so θ = 120. From ∠ABC + ∠ADC = 180, we have ABCD is cyclic. We now have 4EBC ∼ 4EDA. Set
2+y
AE = x, DE = y. We have 64 = 4+x
y = x . Solving for y gives 5y = 32

10. Find the remainder when the coefficient of x91 in (1 + x)2007 is divided by 91.
2007

Solution. We need to find 91 mod 91. We use Lucas’ Theorem and Chinese Remainder Theorem to find
the answer 5

11. Find the number of polynomials P (x) such that P (1) 6= P (−1), deg(P ) ≤ 500 and
(P (x))2 + 2P (−x) = P (x2 ) + 2
for all reals x.

Solution. We have (P (x))2 + 2P (−x) = P (x2 ) + 2 = P ((−x)2 ) + 2 = (P (−x))2 + 2P (x). Therefore, we have
(P (x) − P (−x))(P (x) + P (−x) − 2) = 0. Since P (1) 6= P (−1), we have P (x) − P (−x) 6= 0. We must have
P (x)+P (−x) = 2. From the given equation, we now have (P (x)−1)2 = P (x2 )−1. Now let P (x) = xn +Q(x)+1
and degQ < n. We have 2xn Q(x) + Q(x)2 = Q(x2 ). Comparing the degree of both sides, we have Q(x) = 0.
We have P (x) = xn + 1, and from P (x) + P (−x) = 2 we have n ≡ 1 (mod 2). The answer is 250

8
12. 401 people meet at a conference and shakes hand with each other. If the following case is not present, anyone
can shakes hands with each other. What is the maximum number of hands shaken? Case: Out of 401, people,
there exists x1 , x2 , . . . , x2n such that xi and xi+1 have shaken their hands for all 1 ≤ i ≤ 2n, where indices are
taken modulo 2n.

Solution. Lemma. If their is no circuit with an even length, two circuits share at most one vertice. The proof
is left to the reader. Now induction on the number of people gives that if there are n people, they can have at
most b 3(n−1)
2 c handshakes. The desired answer is 600 . (Someone should post a rigorous solution in the KMO
Forum)

13. In 4ABC, ∠B = 36◦ , ∠C = 76◦ . I is the incenter of 4ABC and D is the tangent of A-excircle to BC. The
circle passing through the circumcenter of 4BCD, B, C meets BI at E. Calculate ∠BEC.

Solution. We calculate ∠CBD = 72◦ , ∠BCD = 52◦ . Let O be the circumcenter of 4BCD. We have
∠BOC = 2∠BDC = 112◦ . Since ∠A = 68◦ , we have ∠A + ∠BOC = 180◦ , which gives that A, B, C, O, E are
cyclic. Therefore, ∠BEC = ∠BAC = 68◦

14. For ordered pair of positive integers (m, n), let

2m2
Q(m, n) =
3mn2− n3 + 1
How many ordered pairs (m, n) are there such that Q(m, n) ∈ Z and m ≤ 100?

Solution. Since the numerator is positive, we must have the denominator n2 (3m − n) + 1 positive. Therefore,
3m ≥ n ≥ 1. If n = 1, we have 2m 3 ∈ N, so m = 3k, i.e. (m, n) = (3k, 1). Assume that n > 1. Let
2m2
l = 3mn2 −n3 +1 . We have 2m − 3mn l + ln3 − l = 0, and this is a quadratic of m. Solving for m gives
2 2


3ln2 ± 9n4 l2 − 8ln3 + 8l
m=
4
√ 2
Let M = 9n4 l2 − 8ln3 + 8l. Since the larger solution is larger than 3ln
4 , the smaller solution must be less
ln3 −l
2n
than 2
3ln2
< 3 . If 3m − n > 0, where m is the smaller solution, we have
4

8n2
n2 + 1 < 3mn2 − n3 + 1 = n2 (3m − n) + 1 < 2m2 < ,
9
2
a contradiction. Therefore, we must have n = 3m. Now 3ln M 1
4 − 4 = 3 n. We arrange the terms and get
2 2
l = 2n9 = 2m2 . Now the other solution must be 3n2 h − 13 n = 27m4 − m. The solutions are (k, 3k) and
(27k 4 − k, 3k). Checking with m ≤ 100 gives 134 as the desired answer.

15. For positive reals x, y, z, x3 + y 3 + z 3 = 1. What is the minimum of 100 − 26x3 − 27xyz?

Solution. By AM-GM, we have x3 + 27y 3 + 27z 3 ≥ 27xyz. Therefore, we have

100 − 26x3 − 27xyz ≤ 100 − 26x3 − (x3 + 27y 3 + 27z 3 ) = 100 − 27(x3 + y 3 + z 3 ) = 73

16. Points P1 , P2 , . . . , P6 are on a line in the said order. Color each point in red, orange, yellow, or green. Also, for
1 ≤ i ≤ 5, you must color Pi and Pi+1 in the same color or have at least one of the two colored in red. How
many colorings are possible?

Solution. Let there be points p1 · · · pn . Let the number of colorings with pn colored with red be an , and
the number of colorings with pn not colored with red be bn . Let cn = an + bn . We wish to find c6 . Now
the condition gives us an = cn−1 and bn = 3an−1 + bn−1 . We can bash from here, but alternatively, we find
bn = bn−1 + 3cn−2 , and cn = cn−1 + bn . Adding them up and combining with bn = cn − cn−1 , we have
cn = 2(cn−1 + cn−2 ). We bash with c1 = 4, c2 = 10, to find the answer as 568

9
17. In a paralleogram 2ABCD, AB = 60, AD = 50. For a point X on segment CD, let Y = AX ∩ BC. Let the
center of the A-excircle of 4ABY be O1 , and let the center of A-excircle of 4AXD be O2 . If the radius of
O1 , O2 are 40, 60, calculate O1 O2 . Point O1 is at the opposite side of A with respect to BC, and O2 is at the
opposite side of A with respect to CD.

Solution. Let H1 , H2 be the foot of the perpendicular from O1 , O2 to AB, AD, respectively. Also let ∠DAO2 =
x and ∠BAO1 = y. By simple angle chasing, we have 4ABO1 ∼ 4O2 DA. Now AB · DA = O2 D · BO1 ,
so 3000 = O2 D · BO1 . Combining this with ∠O1 BC = ∠CDO2 , we have 4O1 BC ∼ 4CDO2 . Also √ from
4O1 H1 B ∼ 4O2 H2 D, we have O 2D
O1 B = 3
2 . Now we have 3000 = 3
O
2 1 B · O1 B. We get O 1 B = 20 5, and

O2 D = 30 5. Let M be the foot of the perpendicular from O2 to CM . We have DM = 30 by Pythagorean
Theorem on 4DH2 O2 . Also, tan x = HAH 2 O2
2
= 34 , so sin x = 35 . Let M 0 be the foot of the perpendicular
from A to CD. DM = 50 sin x = 30 = DM . Therefore, we have M = M 0 and AO2 ⊥ CD. We now have
0

x + 2y = 90. From 4AXM ≡ 4ADM , we have 30 = DM = XM , so 60 = DX, giving X = C. We now have


∠ADC = ∠ACD = ∠AXD = ∠BAX = 2y. From 4O2 DM ≡ 4O2 CM , ∠O2 CD = ∠O2 DC = x + y. Now
∠DCB + ∠O1 CB = ∠DCB + ∠DO2 C = 2x + 2y + 180 p − 2x − 2y = 180.√Therefore, D, C, O1 are collinear.
We have CO1 = CB = 50. Now the answer is O1 O2 = O1 M 2 + M O12 = 602 + 802 = 100

18. Let A be the set of integers with absolute value no larger than 111. Define

S = {(x, y) ∈ A × A|x2 − y 2 − 1 ≡ 0 (mod 223)}

Also, define a0 as the remainder when a is divided by 223. Let T = {(x2 )0 |(x, y) ∈ S}. Calculate |T |.

Solution. We first find |S|. Since x2 − y 2 − 1 = (x + y)(x − y) − 1, by letting (u, v) = (x + y, x − y), we have that
|S| is just the same as the number of pairs (u, v) such that uv ≡ 1 (mod 223). Therefore, we have |S| = 222.
Now for (x, y) ∈ S, let z = f (x) ≡ x2 . Now if z = 1, we have f −1 (1) = (±1, 0). If z = 0, we must have x = 0,
but since 223 ≡ 3 (mod 4), we cannot have y 2 ≡ −1 (mod 223). If z 6= 0, 1, we have f −1 (z) = (±x, ±y).
Therefore, we have |S| = 4|f (S)| − 2. We have |f (S)| = 56

19. Find the integer part of the following sum:


2007
1X 1

3 k
k=1

Solution. We bound using


1 1 1
√ √ < √ <√ √
k+1+ k 2 k k+ k−1
√ √
This gives 2008 − 1 < value < 2007, giving 29 as the answer.

20. There are seven cards, with 1, 2, 3, 4, 5, 6, 7 written on it. Two players A, B play a game. A picks a card first,
writes the number on the card down, and returns it back to the deck. If the sum of the numbers written is a
multiple of 3, the game ends and the player who went last wins the game. Let the probability that A wins be
p
q , where (p, q) = 1. Calculate p − q.

Solution. Let an be the probability that the game ends after n turns. Let bn be the probability that the sum
of the numbers is 1 (mod 3). Let cn be the probability that the sum of the numbers is 2 (mod 3). We have
a1 = c1 = 27 , b1 = 37 . Also, we have the recurrence
2 2
bn+1 = bn + c n
7 7
3 2
cn+1 = bn + cn
7 7
2 3
an+1 = bn + cn
7 7
1 4 2
Now we get cn+1 = bn+1 + 7 bn and bn+1 = 7 bn + 49 bn−1 . Solving the characteristic equation gives us
√ √ √ √
−6 + 5 6 2 + 6 n 6 + 5 6 2 − 6 n
bn = ( ) − ( )
12 7 12 7

10
Also, we have
2 3 5 3
an+1 = bn + cn = bn + bn−1
7 7 7 49
Now the desired answer is

X 2 5 26 3 49 43
a2i−1 = + · + · = ,
i=1
7 7 75 49 75 75

so the final answer is 75 − 43 = 32

11
KMO First Round 2008

24 May 2008

1
1. If we expand 13 in binary, we get 0.a1 a2 · · · ar , where ai = 0 or 1. Calculate r.

Solution. Since 2 is a primitive root modulo 13, the answer is 12

2. What is the smallest integer a such that for all positive integer n, (n!)2 · an > 2n! holds?

Solution. This is equivalent to an > 2n



n . If a = 3, we have n = 6 as a contradiction. Let us prove the
statement for a = 4. This is clearly true since
2n    
X 2n 2n
4n = 22n = >
i=0
i n

3. For a non-constant polynomial f (x), for all reals s, t,

f (s2 + f (t)) = (s − 2t)2 f (s + 2t)

Calculate |f (10)|.

Solution. Setting t = 0 and comparing the degree, we have that f (x) is a degree 2 polynomial. Since
f (s2 + f (0)) = s2 f (s), we set f (x) = ax2 + bx + c and compare the coefficient to find that f (x) = ax2
or f (x) = 12 x2 − 2. Setting s = 0, we find f (f (t)) = 4t2 f (2t). Plugging f (x) in this equation gives that
f (x) ≡ ±4x2 is the only possible function. Therefore, |f (10)| = 400

4. 10 people are sitting in a circle. Define a ’group’ as the set of people sitting next to each other. How many
ways are there to divide 10 people into more than two groups? Each person must be in a group, and only one
group. All groups has at least two people.

Solution. Place a bar each person and number it from 1 to 10. We need to take the bars so that the numbers are
not consecutive. The number of possible ways  to choose
 k 6non-consecutive numbers from the set {1, 2, 3 · · · n}
is n−k+1 9 8 7
 
k . Therefore, there are total of 2 + 3 + 4 + 5 = 133. We need to subtract the cases where both
1 and 10 are chosen, i.e. the possible ways to choose non-consecutive numbers from the set {3, 4, 5, 6, 7, 8}.
There are a total of 70 + 61 + 52 + 43 = 21. The final answer is 133 − 21 = 112
   

5. Find the maximum integer N , such that


1 3 63 1
· ··· <
2 4 64 4N
Solution. We have
1 3 63 1 3 63 2 3 64 1
( × · · · )2 < ( × · · · )( × · · · ) =
2 4 64 2 4 64 3 4 65 65

1 3 63 1 3 63 1 2 4 62 1
( × · · · )2 > ( × · · · )( × × × ) =
2 4 64 2 4 64 2 3 5 63 128

Therefore, √1 < value < √1 . The answer is 2


128 65

12
6. Find the largest prime p < 300 such that there exists integers x, y, u, v such that

p = x2 + y 2 = u2 + 7v 2

Solution. It is clear that we need ( −1 −7


p ) = 1 and ( p ) = 1. Using the quadratic reciprocity law, and a well
p−1
known lemma (( −1
p ) = (−1)
2 ) we find that p ≡ 1 (mod 4) and p ≡ 1, 2, 4 (mod 7). We must have p ≡ 1, 9, 25
(mod 28). We bash and find that p = 281 works: 281 = 52 + 162 = 132 + 7 · 42 .

7. In 2ABCD, which is inscribed in a circle O, the tangent to O at A, C and BD concur at one point. If
61
AB = 24, BC = 20, CD = 15, calculate 100 BD2 .

Solution. ABCD is harmonic, so AB · CD = BC · AD, giving AD = 18. Now LoC bashing (you probably
61
know the drill) gives you 100 BD2 = 450

8. For E = {1, 2, 3, 4, 5, 6, 7, 8}, how many bijective functions f : E → E are there such that for all n ∈ E,
f (n) − n ≡ 1 (mod 2), f (f (n)) 6= n?

Solution. See KMO 2006 P8. The solution is pretty much the same, except that now there are 4 evens and 4
odds. The answer is 242 − 16 · 62 + 72 · 22 − 96 + 24 = 216

9. Let there be a 2 × 2 × 5 rectangular prism with 2 × 2 square as its base. The four side surfaces are colored
in four different colors, so they are distinguishable. Say we want to fill this box with 10 1 × 1 × 2 rectangular
prisms that look the same. How many ways are there to do so?

Solution. We generalize this to an , the number of ways possible to fill a 2 × 2 × n box with 1 × 1 × 2 blocks.
Check a1 = 2 and a2 = 9, a3 = 32. Now an = 2an−1 + 5an−2 + 4an−3 + · · · 4a1 + 4. (why?) Plug in n − 1
instead of n and subtracting gives an = 3an−1 + 3an−2 − an−3 . Bashing the terms give you 450 as the answer.
(Work with the 2-D version of this problem first, to get an idea for the recursion)

10. For all positive integer n, 2an = 3bn = n. If ban c + bbn c = 11, how many such n are there?

Solution. The problem asks for the number of positive numbers such that blog2 nc + blog3 nc = 11. Let
blog2 nc = k. We must have 2k ≤ n ≤ 2k+1 − 1 and 311−k ≤ n ≤ 312−k − 1. Therefore, we must have
2k ≤ 312−k − 1 and 311−k ≤ 2k+1 − 1, i.e. k = 7. Now we have 128 ≤ n ≤ 255 and 81 ≤ n ≤ 242, so
128 ≤ n ≤ 242, giving 115 as the answer.

11. Define√[x] as the integer that is closest to x. If there are two closest integers, pick the larger one. For all n, let

an = [ n], and bn = [ an ]. Out of b1 , b2 , . . . , b2007 , how many are equal to b2008 ?
√ √
Solution. We easily find b2008 = 7. Now from 7 = [ an ], we have 6.5 ≤ an < 7.5, so 43 ≤ an ≤ 56.

Therefore, we need 42.5 ≤ n < 56.5, so 1807 ≤ n. We have 201 as the desired answer.

12. Let there be a pentagon ABCDE, inscribed in a circle. Let d(P, `) be the distance between point P and line
`. If d(B, AC) = 1, d(C, BD) = 2, d(D, CE) = 3, d(E, AD) = 4, AE = 16, What is the length of AB?

Solution. Lemma. If P, X, Y lie on a circle with radius R and H is the perpendicular from P to XY , we have
P H = P X·P Y
2R . Now using the lemma, we have 4 =
EA·ED R
2R , so ED = 2 . Also,
DE·EC
2R = 3, giving DC = 12.
CD·CB R BA·BC
2R = 2, giving BC = 3 . Finally, 2R = 1, giving AB = 6

13. AB is the diameter of the circle with O as the center. G, H are midpoints of AO, BO. For a point C on
circle O, ∠ACG = ∠ABC and AC < BC. Let CG meet circle O at X, and XH meet the circle O at D. If
CD2 = 336, calculate AB 2 .

Solution. Let AG = GO = OH = HB = a. We are given that CX ⊥ AB. Now XG2 = a√· 3a = 3a2 .
Let ∠HXG = θ. We have tan θ = √23 , so sin θ = √27 . We have CD = 4a sin θ = √
8a
7
= 336, giving
AB = 16a2 = 588

13
14. If the maximum area of 2OAP B such that OA ⊥ OB and AP + P B = 6 is M , calculate (2M − 9)2 .

Solution. Set AB = 2x. Since the locus of P satisfying AP + BP = 6 is a ellipse, we must√ have AP = BP = 3
for the area to be the maximum. Similarly,
√ we must have OA = OB. Now 4ABP = x 9 − x2 and 4OAB =
x2 . We need to maximize k = x2 + x √9 − x2 . Setting x2 = t, we have t(9 − t) = (k − t)2 , and the determinant
2 9+ 162
is −4k + 36k + 81 ≥ 0, giving k ≤ 2 . The answer is 162

15. Points I1 , I2 , . . . , I8 are islands, and you can build bridges between I8 and Ii for 1 ≤ i ≤ 7, and between Ii and
Ii+1 for 1 ≤ i ≤ 7. How many ways are there to build the minimum number of bridges possible to connect all
islands?

Solution. We generalize it to n + 1 islands and denote the number of possible ways as an . We find a1 = 1 and
a2 = 3. We have the recurrence an = 2an−1 + an−2 + an−3 + · · · + a1 . (why?) Now bash to find a7 = 377 .

16. In 4ABC, D ∈ AC, E ∈ AB, G ∈ BC. ` passes through A and ` k BC. Define F = BD ∩ CE. Define
GD ∩ ` = H, GF ∩ ` = K, GE ∩ ` = I. If 4EBF : 4DF C : 4F BC = 1 : 2 : 3 and BG = 7, find AI · KH.

Solution. From the area condition we can let F E = x, F C = 3x, F D = 2y, F B = 3y. Let AF ∩ BC = J.
By Gergonne’s Theorem, we have F J FD FE FJ 7
AJ + BD + CF = 1, giving AJ = 20 . Also, AE : EB = 4F AC : 4F BC =
2 7 AE KS FK AF 13
5 : 20 = 8 : 7. We have AI = BG · BE = 8. Let BF hit l at S. We have BG = GF = F J = 7 , and
HS DH AD 15
BG = DG = DC = 7 , giving KH = KS − HS = 13 − 5 = 8. The answer is 64

17. Two congruent regular hexagonal pyramid is put together by there base hexagons, forming P − ABCDEF − Q.
Consider the edges as roads. How many ways are there to start at P , reach Q, and head back to P ? You may
not cross the same vertice or edge you crossed before.

Solution. WLOG start from P and move to A. Case 1. P → A → Q There are 52 ways possible, by picking
two points X, Y and performing Q → X → · · · Y → P . Similarly, there are a total of 2 · 42 ways possible if
P → A → BorF → Q. Working similarly gives you a total of 52 + 2(42 + 32 + 22 + 12 ) = 85 different ways
possible. Since there are 6 points to go for at the start, the answer is 85 · 6 = 510

18. Find the remainder when the greatest common factor of 2008! + 22008 and 2009! − 22007 is divided by 1000.
You may use the fact that 4019 is a prime number.

Solution. Let A = 2008! + 22008 and B = 2009! − 22007 . Since 2009A − B = 4019 · 22007 , we have gcd(A, B) =
gcd(A, 4019 · 22007 ). Check that v2 (A) = 2001. Now we need to check whether A ≡ 0 (mod 4019) or not. Since
−(2009!)2 ≡ 4018! ≡ −1 (mod 4019), we have 2009! ≡ ±1 (mod 4019). Also, we have 22009 ≡ ±1 (mod 4019),
so 22007 6= ±1 (mod 4019). Therefore, A 6= 0 (mod 4019). The greatest common divisor is 22001 , which is 752
(mod 1000)

19. For positive integers n, define f (n) as the number of integers 1 ≤ a ≤ n such that (a, n) = (a + 1, n) = 1. Find
the largest integer n such that f (n) = 45.

Solution. Prove that (similar to Euler’s phi function) f (n) = n p|n (1 − p2 ). (p is prime for all equations)
Q

Now we have p|n pei i −1 (pi − 2) = 45. This implies that n can have 3, 5, 7, 11, 17, 47 as its prime factor. Divide
Q
Q
cases by the maximal prime factor. If it is 47, we find that p|n,p<47 (p − 2)|1, giving that p = 3 is possible. We
Q
have the maximum of 141 in this case. If it is 17, we have p|n,p<17 (p − 2)|3, giving that p = 3, 5 is possible.
Q
We have the maximum of 255 in this case. If it is 11, we find p|n,p<11 (p − 2)|5, giving p = 3, 7 is possible.
Q
We have the maximum of 231 in this case. If it is 7, we find p|n,p<7 (p − 2)|9, giving that p = 3, 5 is possible.
Q
The maximum for this case is 315. If it is 5, we find p|n,p<5 (p − 2)|15, so we need p = 3. We find 225 in this
case. Going over all cases, we find that the maximum value possible is 315

14
20. In a regular 36-gon A1 A2 · · · A36 , which is inscribed in circle O, the circle that is externally tangent to O at
A18 is tangent to A10 A28 at P . Also, the circle that is externally tangent to O at A30 is tangent to A21 A23 at
Q. Let R = A8 P ∩ A30 Q. Calculate ∠P RQ, where ∠P RQ ≤ 180◦ .

Solution. Lemma. Two circles O1 and O2 are externally tangent at P . A point C lies on O1 , and let the
tangent to O1 at C be l. Let l hit the circle O2 at A, B. Let the midpoint of arc AP B be D. Then C, P, D are
colinear. This is true since P is the center of homothety of O1 and O2 , and the tangent to O2 at D is parallel
to l. Now the angle we want to find is just the angle between the lines A4 A30 and A1 A8 , which we can find
easily to be 125

15
KMO First Round 2009

23 May 2009

1. Let n be the number of ways possible when 5 people sit on 9 equally spaced chairs lying on a circle. The chairs
are exactly the same as each other. Calculate the remainder when n is divided by 1000.

Solution. There are 84 = 70 ways to place the chairs between people. Now multiply (5 − 1)! = 24, which


is the number of possible ways for 5 people to sit in a circle. There are 24 · 70 = 1680 ≡ 680 (mod 1000)
ways.

2. For all reals x, define


20
X i
f (x) = x − x

i=1

f (x) reaches minimum value b, when x = a. Calculate ab.


√ √ √
Solution. We divide cases. If x ≥ 20, we have f (x) = 20x − 210 x , which is increasing. If k ≤ x ≤ k+1
for some integer 0 ≤ k ≤ 19, we have f (x) = (2k − 20)x + 210−k(k+1) x . This is decreasing when k ≤ 10 and
increasing when k ≥ 14. Now let us look at 11 ≤ k ≤ 13. Since 2k − 20 > 0 and 210 − k(k + 1) > 0 and
(2k − 20)x · 210−k(k+1)
x is fixed, we need (2k − 20)x and 210−k(k+1)
x to be as close as possible for the minimum,
q
210−k(k+1) √ √
i.e. we need x to be close to 2k−20 . When k = 11, we need x to be close to 39 > 12, so f (x) is
√ √
q If k = 12, we need x to be close to 13.5 > 13, so f (x) is decreasing.√If k = 13, we need x to be
decreasing.
close to 14 3 , so f (x) is increasing. Therefore, f (x) is decreasing when 0 < x ≤ 13, and f (x) is increasing
√ √ 106
when 13 ≤ x. The minimum is achieved when x = 13, giving the minimum of √13 , so the final answer is
106 .

3. In a rectangle ABCD, AB = 2, AD = 10. Inside this rectangle, draw a semicircle that has CD as its diameter.
The tangent to this circle from A meets the said circle at E and hits BC at F . If tan ∠EDF = pq , where p, q
are relatively prime positive integers, calculate p + q.
1
Solution. tan ∠DAM = 10 . Now note that ∠EDC = ∠DAM = ∠F M C, and

1 1
tan ∠F DC = tan ∠F M C =
2 20
. Therefore,
1 1
10 − 20 10
tan ∠EDF = tan(∠EDC − ∠F DC) = 1 1 =
1+ 10 · 20
201

giving 211 as the answer.

4. There are 6 black balls and 4 white balls in a bag. Take one ball, and do not put it back until all of the black
balls are taken. If the probability that 8 balls are taken from the bag is pq , where p, q are relatively prime
positive integers, calculate p + q.

Solution. We  need to draw 5 black balls and 2 white balls in the first seven draws, then pick a black ball.
There are 72 ways that this can happen, and there are a total of 10 4 ways to allign the ten balls. The
probability is
7

2 1
10 = 10 ,

4

giving 11 as the answer.

16
5. For different positive integers m, n, define d(m, n) as the maximum integer k such that 3k |m − n. Calculate a
three digit number x such that d(x2 , 7) ≥ 7.

Solution. Let us find the solution for x2 ≡ 7 (mod 37 ). x2 ≡ 7 (mod 9) =⇒ x ≡ ±4 (mod 9), so x = 9a ± 4.
Now (9a ± 4)2 ≡ 7 (mod 81) =⇒ a ≡ ±1 (mod 9), so a = 9b ± 1, i.e. x = 81b ± 13. Continuing this, we have
x = 37 c ± 175, giving 175 as the answer.

6. A function f (x) satisfies


1 1
f (x) + f ( )=
1−x (1 − x)2
t2
for x 6= 0, 1. Calculate the sum of all reals t 6= 1 such that f (t) = .
2
1
Solution. By plugging 1−x and x−1 1
x to the given equation, we have a linear equation with f (x), f ( 1−x ) and
f ( x−1
x ). Solving this equation gives
1 (x−1)2
x2 + (1−x)2 − x2
f (x) =
2
2
Now plugging f (t) = t2 gives t2 = (t − 1)4 . We have t = ±(t − 1)2 . We have no solutions when t = −(t − 1)2 ,
but we have two solutions when t = (t − 1)2 , and their sum is 3 by Vieta.

7. If
5
X 5
X 5
X
(a2k + 1)(b2k + 1) = 4 a k bk and 150 < (ak + 5)(bk + 5) < 250
k=1 i=1 i=1
calculate the sum of all possible values of
5
X
(ak + 2)(bk + 2)
i=1

where ai and bi are real numbers.

Solution. The given equation can be simplified to


5
X
((ak bk − 1)2 + (ak − bk )2 ) = 0
k=1

so ak bk = 1 and ak = bk . We have either ak = bk = 1 or ak = bk = −1, giving (ak + 5)(bk + 5) = 16 or 36. For


the given inequality to hold, we need to have ak = bk = 1 for all k, or ak = bk = −1 for just one k. Therefore,
the possible values of
X5
(ak + 2)(bk + 2)
k=1

is 9 · 4 + 1 = 37 or 9 · 5 = 45, giving the answer of 82 .

8. Find $ %
17 p
X 3
1000 + k2
k=1

Solution. We bound using the inequality


1 1 √ 1
1 + x − x2 ≤ 3 1 + x < 1 + x
3 9 3
This inequality can be verified easily. Now
17
$ 17 % 17
X k2 k4 Xp 3 2
X k2
10 + − ≤ 1000 + k ≤ 10 +
300 900000 300
k=1 k=1 k=1

Now we get the answer as 175 .

17
9. Pick 4 distinct points in a regular 30-gon and make a quadrilateral. Calculate how many quadrilaterals have
all four angles less than 120.

Solution. This is equivalent to finding the number of positive integers (a, b, c, d) such that a + b + c + d = 30
and a+b, b+c, c+d, d+a > 10. We use complementary counting. The number of solutions for a+b+c+d = 30
is 29

3 . If a + b ≤ 10, let a + b = m. The number of solutions will be
10
X
(m − 1)(30 − (m − 1)) = 975.
m=2

(We choose a, b, then c, d) If a + b ≤ 10, and b + c ≤ 10, we can choose b, then choose a, c according to b, then
P9
take d as 30 − a − b − c, so there are total of b=1 (10 − b)2 = 285. Therefore, by PIE, we have
 
29
− 4 · 975 + 4 · 285 = 894
3
Now we pick a point and select points a, a + b, a + b + c away from it. This quadrilateral is counted 4 times, so
the answer will be 894 · 30
4 = 6705 ≡ 705 (mod 1000).

10. Positive integers m, n, k satisfies m2 + n2 = k 2 , m2 + 82n2 = 534 . Calculate n.

Solution. We get

k 2 + (9n)2 = (532 )2 = (452 + 282 )2 = (452 − 282 )2 + (2 · 45 · 28)2 ,

giving n = 280

11. How many bijective functions f : {1, 2, . . . , 11} → {1, 2, . . . , 11} are there such that for all integers 1 ≤ n ≤ 11,
n − 1 ≤ f (n) ≤ 2n?

Solution. We use recurrences. Let the number of bijections from {1, 2, 3, . . . , m} → {1, 2, 3, . . . , m} such that
n − 1 ≤ f (n) ≤ 2n for n = 1, . . . , m be am . Let us divide cases by m (mod 2). If m is even, let m = 2k. If
f (2k) = 2k, we clearly have am−1 cases. If f (2k − 1) = 2k, we must have f (2k) = 2k − 1, so there are am−2
cases. Similarly procedding until f (k) = 2k, we have
2k−1
X
am = ai
i=k−1

If m is odd, let m = 2k − 1. Proceeding similarly with the above, we have


2k−2
X
am = ai
i=k−1

Now we have to calculate a11 . We know a1 = 1 and a2 = 2. Now bashing gives a11 = 654 .

12. Find the number of (x, y) ∈ Z2 such that x(x + 5) = y(y − 1)(y + 1)(y + 2).

Solution. We have x(x + 5) = (y 2 + y)(y 2 + y − 2). Now let y 2 + y − 2 = X. We have X(X + 2) = x(x + 5).
Multiplying by 4, we have
(2X + 2)2 − 4 = (2x + 5)2 − 25,
so (2x + 5 + 2X + 2)(2x + 5 − 2X − 2) = 21. Now bashing gives that

(x, X) ∈ {(−8, −6), (−8, 4), (3, −6), (3, 4), (0, −2), (0, 0), (−5, −2), (−5, 0)}

Now bashing again to find y, we find

(3, 2), (3, −3), (−8, 2), (−8, −3), (0, −2), (0, 1), (0, −1), (0, 0), (−5, −2), (−5, 1), (−5, −1), (−5, 0),

so there are 12 solutions.

18
13. Points A1 , A2 , A3 , A4 lies on a circle in a counterclockwise order. Let Hi be the orthocenter of triangle
Ai+1 Ai+2 Ai+3 (indices taken modulo 4). If H1 H2 = 3, H2 H3 = 4, H3 H4 = 6, H1 H4 = 7, calculate 15(A1 A3 )2 .

Solution. H1 H2 H3 H4 is congruent to A1 A2 A3 A4 . We need to calculate H2 H4 . Note that H1 H2 H3 H4 is cyclic


as well. Let H2 H4 = x. From LoC, we have

3 2 + 7 2 − x2 4 2 + 6 2 − x2
+ =0
2·3·7 2·4·6
276
Solving this gives x2 = 5 , so the answer is 828.

14. There are four circles, with centers O1 , O2 , O3 , O4 . For i = 1, 2, 3, 4, Oi and Oi+1 are externally tangent at
Ki (take indices modulo 4). Let A = K1 K3 ∩ K2 K4 . If ∠K4 O1 K1 = 140◦ , ∠K4 O4 K3 = 100◦ , K1 K2 =
K2 K3 , K4 K1 = 4K3 K4 , calculate 4AK
AK4 .
2

Solution. We chase angles. ∠K4 O1 K1 = 140◦ gives ∠O1 K4 K1 = 20◦ , and ∠K4 OK3 = 100◦ gives ∠O4 K4 K3 =
40◦ . Now we have ∠K1 K4 K3 = 120◦ . Also, we have

∠K1 K2 K3 = 180◦ − ∠K1 K2 O2 = ∠K3 K2 O3


180 − ∠K1 O2 K2 180◦ − ∠K2 O3 K3
= 180◦ − −
2 2
∠K1 O2 K2 + ∠K2 O3 K3 120◦
= = = 60◦
2 2
Now we have 4K1 K2 K√3 is equilateral and K1 K2 K3 K4 is cyclic. Now WLOG K1 K4 = 4 and K3 K4 = 1. By
LoC, we have K1 K3 = 21. Now we have
√ √
4AK2 4K1 K2 A K1 K2 · sin ∠K2 K1 K3 21 K2 K3 √ 21
=4· =4 =4· · = 21 · = 21
AK4 4AK1 K4 K1 K4 · sin ∠K4 K1 K3 4 K3 K4 1

15. For positive integers m, k and odd integer n, if

2k
 
1 n
m+ =6 +
m 2k n

calculate mn.

Solution. We first change the equation to 2k n(m2 + 1) = 6m(n2 + 4k ). Now if m is odd, we have 2-exponent
of the L.H.S to be k + 1, and the 2-exponent of the R.H.S to be 1, a contradiction. Therefore, m is even.
Now since 4k + n2 is an odd number, we have 2k ||6m, i.e. 2k−1 ||m. Set m = 2k−1 m0 . We now have
n(4k−1 m20 + 1) = 3m0 (n2 + 4k ). Now looking at this (mod n), we need n|3m0 · 4k , so n|3m0 . Since 4k−1 m20 + 1
is not a multiple of 3, we must have 3|n. Now let n = 3n0 , and m0 = n0 x. Plugging this in, we have
n20 x = 4 + 4k−135x−9 . Now since x is odd and 4x − 9 ≤ 35, we can bash. If x = 1, we have 4k−1 − 9|35, so k = 3.
We must have n20 = 9, so n0 = 3. Therefore, we have n = 9, and m = 4m0 = 12. Therefore, mn = 108. If
x = 3, there are no k satisfying 4k−1 · 3 − 9|35. If x ≥ 5, we must have k = 2, so 4x − 9|35. We must have
x = 11, but plugging this in, we have 11n20 = 5, a contradiction. We have the final answer of 108 .

16. In a professional soccer league, the match schedule is created to satisy the following. For any two teams, they
do not play each other more than once. Each team plays a match with 12 teams in total. If two teams play
a match against each other, there are 5 teams who play a match against both of them. If two teams does not
play a match against each other, there are 6 teams who play a match against both of them. Find the number
of teams in this soccer league.

Solution. Let the number of teams be n and the number of games played be m. Now for a team X, call
the teams which played with X as A1 , A2 , . . . , A12 . Now by the third condition, we have that Ai played 5
games with A1 , . . . , A12 . Now let us count the number of three teams that played against each other. Selecting
two teams that played a match, since there are 5 teams that played with both of them, there are 5m 3 such

19
combinations. Also, selecting a team, since there are 5·12
2 = 30 ways to choose the two teams out of A1 · A12 ,
there are 30n
3 = 10n such combinations. This gives us m = 6n. Now let us count (Ai , Aj , Ak ) such that Ai , Aj
didn’t play a game, but Aj , Ak and Ak , Ai did. By the last condition, there are trivially 6( n2 − x) sets. Also,
choosing Ak first, there are 12·(11−5) = 36 ways to pick Ai , Aj , so there are 36n sets. This gives us n2 − x = 6n.

2
Now solving for n, we have n = 25 .

17. In 4ABC, AB = 5, BC = 6, CA = 7. Let the incircle of 4ABC meet BC, CA, AB at X, Y, Z. If the incenter
of 4ABC is I and AI ∩ XY = P, AI ∩ XZ = Q, calculate 35(P Q)2 .

Solution. Let R = AI ∩ BC. Menelaus with 4BAR and line ZXQ, and also 4ARC and line XP Y gives
b−c b−c
P Q = P R + RQ = AR + AR
2b 2c
q
a 2
Since AR = bc(1 − ( b+c ) , we put a = 6, b = 7, c = 5 to find that 35P Q2 = 108 .

18. Let there be a board, with m horizontal lines and n vertical lines drawn. On all mn intersections, put either
a black stone or white stone, but all rectangles that has parts of horizontal lines and vertical lines as its sides
must have at least one black stone and one white stone. Let the number of such ways as P (m, n). Calculate
P7
the remainder when k=2 P (k, 7) is divided by 1000.

Solution. We begin by proving that P (3, 7) = 0. It trivially follows that P (4, 7) = P (5, 7) = P (6, 7) =
P (7, 7) = 0. Now there are 8 ways to color the 3 dots in each horizontal line. Denote 0 as white, 1 as black.
Denote the type a coloring to be the coloring with a − 1 written in binary, so for example type 5 is 1, 0, 0, since
(100)2 = 5−1 = 4. If type 1 coloring is present, we can use only type 4, 6, 7, 8 colorings, but by the Pigeonhole’s
Principle, out of the remaining 6 horizontal lines, there must be a type that appears twice. Similarly, we cannot
use type 8 coloring. Now we can use type 2, 3, 4, 5, 6, 7 colorings, but by the Pigeonhole’s Principle there must
be a type of coloring that is used twice, a contradiction. We have proved P (3, 7) = 0. Note that if two coloring
is used twice, there must be a color used at least two times in the said coloring, so there is a rectangle with one
color. Now we need to find P (2, 7). Denote type 1 coloring to be 11, type 2 coloring to be 10, type 3 coloring
to be 01, type 4 coloring to be 00. Note that type 1 and 4 can be used only once. If type 1 is used once and
type 4 is also used once, there are 7 · 6 · 25 ways to color. If type 1 is used once and type 4 is not used, there
are 7 · 26 ways to color. If type 1 is not used and type 4 is used once, there are 7 · 26 ways to color. If both
types are not used, there are 27 ways to color. The desired answer is

7 · 6 · 25 + 7 · 26 + 7 · 26 + 27 = 2368 ≡ 368 (mod 1000)

19. We define the harmonic mean of a1 , . . . , ak as


k
Pk 1

i=1 ai

If the harmonic mean of all divisors of n is 3, calculate n.


Qt Qt
Solution. We begin by setting n = i=1 pei i . Now let a1 , . . . , ak be all divisors of n. We have k = i=1 (ei +1).
Now since Pk k 1 = 3, we find
i=1 ai
Qt
(ei + 1)
Qti=1Pei 1 = 3
i=1 j=0 pj
i

Now we need to bound. We notice that


e+1
1 1
1 + + ··· +
p pe

is decreasing function of p, so
e+1 e+1 4
1 1 ≥ ≥ .
1+ p + ··· + pe 2 − 21e 3

20
Also, note that
e+1 (e + 1)3e 3
1 1 = e+1
≥ .
1 + 3 + · · · 3e 3 −1 2
Now notice that if t ≥ 3, we have Qt
(ei + 1) 4 3 3
3 = Qti=1Pei 1 > · · ,
i=1 j=0 j
3 2 2
pi

a contradiction. We now have t = 1 or t = 2. If t = 1, we have

e+1 (e + 1)(1 − p1 ) pe (p − 1)(e + 1)


= = = 3,
1 + p1 + · · · + 1
pe 1− 1
pe+1
pe+1 − 1

but this implies pe |3, so p = 3, e = 1, which fails. Now let t = 2. Now check that
e+1
1 1
1 + + ··· +
p pe

is an increasing function of e. Therefore, it is not less than


2 2p 3
1 = ≥ .
1+ p
p+1 2

Also, note that if p ≥ 3,


3 27
1 1 ≥ > 2,
1+ p + p2
13
so the exponent of a prime larger than 2 must be 1. Also if n = pq, we have
4pq
= 3,
pq + p + q + 1

but (p − 3)(q − 3) = 12, so there are no solutions that p, q are prime. Therefore, at least one of the prime’s
e+1
exponent must be larger than 1, so n must have 2 as a prime divisor. Also, since 2− 1 is an increasing function
2e
of e, if v2 (n) = e ≥ 4,
e+1 80
1 ≥ 31 .
2 − 2e
2p
Since for p ≥ 3, p+1 ≥ 23 , (e = 1 since vp (n) = 1 for p|n, p 6= 2) we have a contradiction by 80 3
31 · 2 > 3. Now the
12 2p
exponent of 2 can be 2 or 3. If v2 (n) = 2, we have 7 · p+1 = 3, so p = 7, i.e. n = 28. If v2 (n) = 3, we have
32 2p
15 · p+1 = 3, which fails. Therefore, the only solution to this problem is n = 28 .

20. For polynomials Pk (x) (k = 1, 2, 3), Pk (x) has k + 2 real roots. Let

A = {(x, y, z)|P1 (x)P2 (y)P3 (z) = P1 (y)P2 (z)P3 (x) = P1 (z)P2 (x)P3 (y) = 0}

If |A| is finite, calculate |A|.

Solution. Since |A| is finite, the three equations P1 (x) = 0, P2 (x) = 0, P3 (x) = 0 has no relative common roots.
Now let α be a root of P1 (x) = 0, β be a root of P2 (x) = 0, γ be a root of P3 (x) = 0. All elements of A must be
in the form of (α, α, α), (β, β, β), (γ, γ, γ), (α, γ, β), (β, α, γ), (γ, β, α), so there are 33 + 43 + 53 + 3 · 3 · 4 · 5 = 396
solutions.

21
KMO First Round 2010

12 June 2010


1. Point D is inside an equilateral triangle 4ABC. If DB 2 + DC 2 + BC 2 = 100, 4DBC = 5 3, calculate AD2 .
√ √
Solution. We√use coordinates. Set A(0, 3a), B(−a, 0), C(a, 0). Now let D(x, y). We have 4DBC = 5 3 =
ay =⇒ y = 5 a 3 , and

150
DB 2 + DC 2 + BC 2 = (x + a)2 + y 2 + (x − a)2 + y 2 + 4a2 = 2x2 + 2y 2 + 6a2 = 2x2 + + 6a2 = 100
a2
Now we have

2 2
√ 2 2 5 3 √ 2 75
AD = x + (y − 3a) = x + ( − 3a) = x2 + 2 + 3a2 − 30 = 50 − 30 = 20
a a

2. Judges A, B, C, D gives points 1, 2, 3, 4,or 5 to evaluate an employee. How many ways can the employee get 13
points in total?

Solution. We use complementary counting. We wish to find the number of solutions  to x1 + x2 + x3 + x4 = 13,
1 ≤ xi ≤ 5. First, the number of solutions to x1 + x2 + x3 + x4 = 13, xi ∈ N is 12 3 = 220. Since more than 2
numbers in x1 , x2 , x3 , x4 cannot be larger than 5, we just need to subtract the case where one of them is larger
than 5. WLOG x1 ≥ 6. We get (x1 − 5) + x2 + x3 + x4 = 8, so there are 73 = 35 cases. The desired answer is


220 − 4 · 35 = 80 .

3. Calculate
6155 − 5 · 6145 + 10 · 6135 − 10 · 6125 + 5 · 6115 − 6105

Solution. By finite differences,

f (a) = (a + 5)5 − 5 · (a + 4)5 + 10 · (a + 3)5 − 10 · (a + 2)5 + 5 · (a + 1)5 − a5

is a constant function. Setting a = −2 and calculating, we find the desired answer to be 120 .

4. For all positive integers n, define a0 = 2009 and


n−1
−2010 X
an = ak
n
k=0

for each n ≥ 1. Calculate the remainder when the sum


2010
X
n · 2n · an
n=1

is divided by 1000.

Solution. For n ≥ 2, we have


n−1
X
nan = −2010 ak ,
k=0

and
n−2
X
(n − 1)an−1 = −2010 ak ,
k=0

22
so
nan = (n − 1)an−1 − 2010an−1
Also, this is true for n = 1, so this is true for n ≥ 1. We have
2011 − n
an = − an−1
n
Now notice that  
2011 − n 2012 − n 2010 2010
an = (−1)n · ··· a0 = (−1)n a0
n n−1 1 n
Now we can calculate
   
2010 2009
n · 2n an = 2009 · (−2)n · n = 2010 · 2009 · (−2) · (−2)n−1 ·
n n−1
We have
2010 2010  
X
n
X
n−1 2009
n · 2 an = 2009 · 2010 · (−2) · (−2) ·
n=1 n=1
n−1
2009
X 
2009
= 2009 · 2010 · (−2) · (−2)n
n=0
n
= 2009 · 2010 · (−2) · (1 − 2)2009
= 2009 · 2010 · 2 ≡ 180 (mod 1000)

5. Integers a, b, c, d satisfy a + bd + cd2 + 3d3 = 0, |a|, |b|, |c| ≤ 400. What is the maximum of |d|?

Solution. |d| = 134 is the maximum, and it can be achieved with (a, b, c, d) = (−268, −266, −400, 134). We
know that |a| = |d||b + cd + 3d2 |. Setting |b + cd + 3d2 | = k, we have

|d||3d + c| = |b ± k|

If |d| ≥ 135, we have


|d||3d + c| ≥ |d|(|3d| − |c|) ≥ 135 · (3 · 135 − 400) = 675
Therefore,
400 + |k| ≥ |b| + |k| ≥ |b ± k| ≥ 675
and |k| ≥ 275. This contradicts
400 ≥ |a| = |d||k| ≥ 135 · · · 275
This proves our claim that the maximum is 134 .

6. Equation x11 + 11x + 1 = 0 has 10 complex solutions α1 , . . . , α10 . Define


10
X
S= αi10


i=1

Calculate the closest integer to S.

Solution. First, denote the real root of f (x) = x11 + 11x + 1 = 0 as c. Since f (− 21 ) < 0 and f (0) > 0, by
IVT, − 12 < c < 0. We have
10 10
X X 1 1
a10
i +c
10
= −121 − − = −121 + 11 = −110
i=1
a
i=1 i
c

1
by Vieta. Since 0 < c10 < 1024 , we have the answer of 110 .

23
7. For an integer x, there exist four integers a, b, c, d such that a+b+c+d = 800, (x−a)2 (x−b)(x−c)(x−d) = 420.
Calculate the differece between the maximum and the minimum value of x.

Solution. Setting x − a = p, x − b = q, x − c = r, x − d = s, we have


p+q+r+s
x = 200 + ,
4
and p2 qrs = 420. If 2|p, we have q, r, s ≡ 1 (mod 2), so p + q + r + s ≡ 1 (mod 2). Therefore, p must be ±1.
Since if q + r + s is determined, p is determined immediately, we just need to determine q, r, s. Note that p is
±1, and q + r + s is an even number, so to maximize p + q + r + s, q + r + s must be maximized as well. To
maximize q + r + s, take q = 210, r = 2, s = 1. Then p = −1, giving
210 + 2 + 1 − 1
x = 200 + = 253
4
To minimize q + r + s, take q = −210, r = −2, s = 1. Then p = −1, giving
−210 − 2 + 1 − 1
x = 200 + = 147
4

The differnce is 106 .


√ √
8. In 4ABC, AB = 2 26, AC = 2 2, BC = 8. Denote X, Y, Z as midpoints of BC, CA, AB. Let P, Q, R be
circumcenters of 4AZY, 4BXZ, 4CY X. If the circumcenters of 4XY Z, 4P QR are O1 , O2 , calculate O1 O22 .

Solution. Let O be the circumcenter of 4ABC. Let G be the centroid of 4ABC. Now since 4AZY ∼
4ZBX ∼ 4Y XC ∼ 4ABC, we have AP ∩ BQ ∩ CR = O. Also, from 4P QR ∼ 4ABC ∼ 4AZY , we have
that O2 lies on OP . Similarly, we have OP ∩ OQ ∩ OR = O2 , so O = O2 . Since 4XY Z ∼ 4ABC, with center
of homothety G, we have O1 , O2 , G colinear and O1 G = 12 O2 G. Now we have O1 O2 = 32 OG. We have

9 9
O1 O22 = OG2 = (9R2 − a2 − b2 − c2 )
4 4
Since
abc abc
R= =√ ,
4S 2a2 b2 + 2b2 c2 + 2c2 a2 − a4 − b4 − c4
we plug in the given a, b, c to find the answer of 73 .

9. Define S = {1, 2, . . . , 30}. A subset of S, A, satisfies |A| = 3 and


X X
a7 ≡ b7 (mod 31)
a∈A b∈S−A

How many different sets A are there?

Solution. PNote thatP the map x → x7 is bijective in (mod 31). Now it suffices to find the number P of sets
such that a∈A a ≡ b∈S−A b (mod 31), and |A| = 3. We need to find the number of sets thatP a∈A a ≡ 0
(mod 31), |A| = 3. Since the sum varies from 6 to 87, we just need to find the number of sets that a∈A a = 31
0
P 62. Since thePmap A = {a, b, c} → A = {31 − a, 31 − b, 31 − c} is aP
or bijection from the solution set of
a∈A a = 31 to a∈A a = 62, we just need to find the number of sets that a∈A a = 31. We find 65 such sets
by brute-force. Now the answer is just 65 · 2 = 130 .

10. An injective function f : (0, ∞) → (0, ∞) satisfies f (x)f (f (x) + x1 ) = 1. Calculate (2f (1) − 1)2 .

Solution. Denote f (1) = a. Plugging x = 1 gives af (a + 1) = 1, so f (a + 1) = a1 . Plugging x = a + 1 gives



1 1 1 1 1 1 1 1+ 5
a f ( a + a+1 ) = 1, so f ( a + a+1 ) = a = f (1). Since f is injective, we find a + a+1 = 1, so a = 2 . The
answer is 5 . (Note. This problem was also in USAMTS Year 2006 Round 3 P4)

24
11. How many 4 × 4 matrices are there such that all terms are nonnegative, and the sum of each rows and columns
are 2?

Solution. Divide the cases by how many 2’s are used. There can be at most 4. If there are 4 2’s, we just need
to find where to put the 2’s, so the number of cases is

42 · 32 · 22 · 12
= 24
4!
If there are 3 2’s, notice that we have 12 0’s immediately. The remaining box must be a 2, so there are no such
matrix. If there are 2 2’s, notice that there are 10 0’s immediately. The remaining boxes must be 1’s, so there
2 2
are 4 2·3 = 72 ways. If there are only 1 2, notice that we have 6 0’s immediately. Now we have to make a 3 × 3
square, using 0 and 1, so that all row sums and all column sums are 2. We can choose 3 boxes, in different
rows and columns, to be 0 and the remaining boxed be 1. There will be 16 · 3! = 96 ways. If there are no 2’s,
there must be 8 1’s. (Note: I think this was an AIME Problem) There are 6 ways to fill the first row. Now
bashing the other rows, we find that there are 15 ways to fill the last three rows. We have 6 · 15 = 90 ways.
The desired answer is 24 + 72 + 96 + 90 = 282 ways.

12. In 4ABC, let D be the midpoint of AB. A circle passing√through both trisectors of BC and tangent to AB
at D hits CA at P, Q. If 4P DQ = 14 4ABC and CA = 8 3, calculate AB.

Solution. The center of the circle must be the circumcenter of 4ABC, since it is on the perpendicular bisector
of AB and BC. Therefore, AQ = P C. Let AQ : QC = CP : P A = 1 : k. Now
1 k−1 1
4P DQ = · 4ABC = 4ABC
2 k+1 4

We get k = 3. From ( AB 2
2 ) =
AC
4 · 3AC
4 , (PoP) we have AB = 12 .

13. If relatively prime positive integers p, q satisfy the following, calculate p + q.


p π 2π 3π 4π
= cos10 + cos10 + cos10 + cos10
q 5 5 5 5
P4
Solution. Let w = cos 2π 2π
5 + i sin 5 . Now let S = 2
10
+ k=1 (1 + wk )10 . We calculate this sum in two ways.
First, from

2kπ 2kπ kπ 2 kπ kπ kπ kπ kπ
1 + wk = 1 + cos + i sin = 2 cos + 2i cos sin = 2 cos (cos + i sin )
5 5 5 5 5 5 5 5
we have (1 + wk )10 = 210 cos10 kπ
5 . Now we have S = 2
10
+ 210 · pq . Also, since 1 + w + w2 + w3 + w4 = 0, we
have
4 4 X10        
X X 10 nk 10 10 10
S= (1 + wk )10 = w = 5( + + ) = 1270
n=0
n 0 5 10
k=0 k=0

Therefore, 1024 + 1024 pq = 1270, so p


q = 123
512 , giving the answer of 123 + 512 = 635 .

14. Let A = {1, 2, . . . , 10}. For a bijective function f : A → A, we define


10
X
Mf = |f (k) − k|
k=1

Let the maximum of Mf be M . Calculate the remainder when the number of bijective function f which satisfies
Mf = M is divided by 1000.

Solution. This is a variant of Baltic Way 2014 P7. The solution of junioragd applies here. The answer is just

(5!)2 = 14400 ≡ 400 (mod 1000)

25
15. A circle T1 has 20 as its radius, and circle T2 has 40 as its radius. The common external tangents of two circles
meets at A, and the common internal tangent of the two circles meets T1 at P , T2 at Q. If AQ = 100, find the
length of P Q.

Solution. Let the circumcenter of T1 , T2 be O1 , O2 . Let P O1 ∩ T1 = K. We have A, K, Q are colinear,


by homothety centered in A and ratio of 20 : 40 = 1 : 2. We have AK = KQ = 12 AQ = 50. From
P Q2 + KP 2 = KQ2 and KP = 20 · 2 = 40, we have P Q = 30.

16. For a three-digit prime number p, the equation x3 + y 3 = p2 has an integer solution. Calculate p.

Solution. x, y cannot be 0. If one of them is a multiple of p, the other must be a multiple of p as well,
so the L.H.S is a multiple of p3 , a contradiction. WLOG, x ≥ y. If x, y are both positive integers, from
(x + y)(x2 − xy + y 2 ) = p3 and x + y ≥ 2, x2 − xy + y 2 ≥ 2, we have x + y = x2 − xy + y 2 = p. Now we
have x ≡ −y (mod p), so x2 − xy + y 2 ≡ 3x2 ≡ 0 (mod p), so p|x, a contradiction. Now y must be a negative
integer. Set x = a, y = −b. We have (a − b)(a2 + ab + b2 ) = p2 . Since a2 + ab + b2 ≥ 3, we must have a − b = 1
or a − b = a2 + ab + b2 = p. If a − b = p, we have a ≡ b (mod p), so a2 + ab + b2 ≡ 3a2 ≡ 0 (mod p), giving
2 2 2 2 2
√ We must have a − b = 1, and a + ab + b = p . We have p = 3b + 2b + 1. Solving
p|a, a contradiction.
−3+ 12p2 −3
for b gives b = 6 . It suffices to have 12p2 − 3 be a square for b to be an integer, since we will have
p
12p2 − 3 ≡ 3 (mod 6). Now let 12p2 − 3 = 4u2 . This is (2p − 1)(2p + 1) = 3u2 . If p ≡ 1 (mod 3), we
have 2p + 1 = 3t2 , 2p − 1 = m2 . Now bashing gives that t = 11 gives a valid answer. We have p = 181. If
p ≡ 2 (mod 3), we have 2p + 1 = m2 , 2p − 1 = 3t2 , but this gives m2 ≡ 2 (mod 3), a contradiction. We have
p = 181 .

17. For three real roots a, b, c of x3 − 3x + 1 = 0, (a < b < c), calculate 20(a2 + b2 − a − c).

Solution. Let f (x) = x3 − 3x + 1. From IVT and f (−2) = −1, f (0) = 1, f (1) = −1, f (2) = 3, we have that
all three solutions are in (−2, 2). Now let x = 2 cos t. We find
1
4 cos3 t − 3 cos t = − ,
2
so cos 3t = − 21 . Solving this gives
2π 4π 8π
t= , , ,
9 9 9
so we have
8π 4π 2π
a = 2 cos , b = 2 cos , c = 2 cos
9 9 9
Now we have
8π 4π 8π 2π 16π 8π 8π 2π
a2 +b2 −a−c = 4 cos2 +4 cos2 −2 cos −2 cos = 2(cos +1)+2(cos +1)−2 cos −2 cos = 4,
9 9 9 9 9 9 9 9
so we have 20(a2 + b2 − a − c) = 80 .

18. For a convex quadrilateral 2ABCD,


√ the circumcenter of 4ABC
√ is O. AO meets circle O at E. If ∠D =
90◦ , ∠BAE = ∠CDE, AB = 4 2, AC = CE = 5, calculate 10DE.

Solution. Let ∠BAE = ∠CDE = a and ∠ACD = b. Let the perpendicular from E to CD be K. Let
CD = x, AD = y. We have ∠ECK = 180◦ − 90◦ − b = 90◦ − b, so ∠CEK = b. We have 4CEK ≡ 4ACD.
Now we have CK = AD = y and EK = CD = x. From ∠BAE = ∠EDK, we have 4ABE ∼ 4DKE. Also,
we have BE 2 = AC 2 + CE 2 − AB 2 = 9, so BE = 3. We have
EK x BE 3
= = = ,
DK x+y AB 4

10
so x = 3y. Since AD2 + DC 2 = 25, we have 10y 2 = 25, so y = 2 . From

DE 2 = DK 2 + EK 2 = 9y 2 + 16y 2 = 25y 2 ,
√ √
we have DE = 5y = 5 210 . We find 10DE = 25 .

26
19. 5 baseball players put their glove and bat each in a box. Find the number of ways, satisfying the following
condition, the five players take the equipment. No one takes their own equipment. For all five players, the
glove and the bat the player took belongs to different players. Each player takes one bat and one glove.

Solution. We have to find the number of bijective functions f, g such that f (i) 6= i, g(i) 6= i, f (i) 6= g(i). Since
f is bijective, it is made of cycles, and since f (i) 6= i, it is either
 made of 3-cycle and a 2-cycle or a 5-cycle.
First, assume f is made of a 3-cycle and a 2-cycle. There are 53 = 10 ways to choose the three numbers in a
3-cycle, and (3 − 1)! = 2 ways to permute. So we can just let f (1) = 2, f (2) = 3, f (3) = 1, f (4) = 5, f (5) = 4
and multiply by 20 at the end. Note that {g(4), g(5)} ⊂ {1, 2, 3}. Now straightforward bashing gives that there
are 12 possible g. There are 240 solutions in this case. Now assume that f is made of a 5-cycle. We can just let
f (i) ≡ i + 1 (mod 5) and multiply by (5 − 1)! = 24 at the end. We use PIE. Define U as the set of all bijective
functions h from {1, 2, 3, 4, 5} to itself. Let pi be the case that h(i) = i (Pi will be the set of all functions in
U such that pi happens), and let qi be the case that h(i) ≡ i + 1 (mod 5) (Qi will be defined similarly). Note
that pi , qi cannot happen at the same time. Note that pi , qi−1 cannot happen at the same time as well. Now
by PIE, we have to find X X
|U | − |Xi | + |Xi ∩ Xj | · · · ,

where X is either P or Q. Now if we choose k cases from pi and qi , we chose k values of h, so there are (5 − k)!
possible functions. Align p1 , q1 , p2 , . . . , q5 on a circle. We need to choose k cases so that they are not next to
each other. This is just choosing k numbers from 1, 2, · · · 10 on a circle so that there are no numbers next to
each other on the circle. If 10 is chosen, 1, 9 cannot be chosen, so we have to choose k − 1 numbers from 7
numbers on a line so that they are not next to each other. There are 9−k k−1 such ways. If 10 is not chosen,
then there are 9 numbers in a striaght line, and we have to choose k numbers so that they are not next to each
other. There are 10−k 9−k 10−k
  
k such cases. Therefore, there are k−1 + k such cases. We now need to find

5    
X
k 9−k 10 − k
(−1) ( + ) · (5 − k)! = 13
k−1 k
k=0

Therefore, there are 24 · 13 = 312 cases. The desired answer is 240 + 312 = 552 .

20. For a positive integer n such that (n, 6) = 1, the number of integers which is relatively prime with n in
1 · 2 · 3, 2 · 3 · 4, . . . , n · (n + 1) · (n + 2) is 140. Find the maximum of such n.

Solution. is a variant of 2008 KMO P19. Let f (n) be the number of 1 ≤ k ≤ n such that
Q (k(k+1)(k+2), n) = 1.
Prove similarly that f (n) = n p|n (1 − p3 ). We need to find the largest n such that p|n piei −1 (pi − 3) = 140.
Q

Define m as the number of prime divisors of n. Since 2|(pi − 3), we have m ≤ 2. Note that m = 1 fails. Now
m = 2. WLOG p1 < p2 . Now if p1 > 7, we have e1 = e2 = 1, so (p1 − 3)(p2 − 3) = 140, which gives p1 = 13
and p2 = 17, giving n = 221. If p1 = 7, we have e1 ≤ 2. If e1 = 1, we find p2e2 −1 (p2 − 3) = 35, but L.H.S is
clearly even, a contradiction. If e2 = 2, we similarly find a contradiction by (mod 2).If p1 = 5, we have e1 ≤ 2.
If e1 = 1, we find pe22 −1 (p2 − 3) = 70. This gives p2 > 7, so e2 = 1, so p2 = 73. This gives n = 365. If e1 = 2,
we find pe22 −1 (p2 − 3) = 14. This gives p2 > 7, so e2 = 1, so p2 = 17, giving n = 425. The desired answer is
indeed 425 .

27
KMO First Round 2011

25 June 2011

1. How many ordered pairs of complex numbers (z, w) are there such that

z 2 + w2 = z 4 + w4 = z 8 + w8

Solution. Let z 2 + w2 = z 4 + w4 = z 8 + w8 = a. We have a2 − 2z 2 w2 = a and a2 − 2z 4 w4 = a, so


z 2 w2 = z 4 w4 . If zw = 0, WLOG z = 0. We now have w2 = w4 = w8 , so w = 0, 1, −1, which satisfies the
above. We have (z, w) = (0, 0), (0, 1), (0, −1), (1, 0), (−1, 0). If zw 6= 0, we have z 2 w2 = 1. We then have
a2 − 2 = a, so a = 2 or a = −1. If a = 2, we have z 2 + w2 = z 2 + z12 = 2, so z 2 = 1 and w2 = 1. We have
(z, w) = (−1, −1), (−1, 1), (1, −1), (1, 1). If a = 1, we have z 2 +w2 = z 2 + z12 = 1, so z 4 +z 2 +1 = w4 +w2 +1 = 0.
There are 4 possible values of z. Since w = ± z1 , we have 8 possible (z, w). Therefore, there are 5 + 4 + 8 = 17
possible (z, w).

2. Find the smallest positive integer n such that for all bijective functions f : {1, 2, . . . , 8} → {1, 2, . . . , 8},
f n (x) = x for 1 ≤ x ≤ 8.

Solution. Since f is bijective, it is made of cycles. The answer is clearly lcm(1, 2, 3, 4, 5, 6, 7, 8) = 840 .

3. Find the remainder when the sum of all integers k such that 1 ≤ k ≤ 449, k 224 + 448 ≡ 0 (mod 449) is divided
by 1000.

−1 k
= 449−k
  
Solution. Since 449 ≡ 1 (mod 4), we have 449 = 1. We have 449 449 . Note that k 224 ≡ −1
k
= −1 ⇐⇒ 449−k
 
(mod 449) ⇐⇒ 449 449 , so we can biject a solution k with another solution 449 − k. Since
there are 224 quadratic non-residues, we find the answer to be 449 · 112 ≡ 288 (mod 1000).

4. Error in Problem. Everyone gets 4 points.

Solution. Error in Problem

5. In a chess club with 25 members, each member plays a match against k players. Find the sum of positive
integers k such that this is possible.

Solution. Since the number of matches is 25k


2 , we have k ≡ 0 (mod 2). We can allign 25 people in a circle and
make each person play with the person 1, 2, . . . , k2 away in a clockwise or counterclockwise order. Therefore,
all even numbers work. The answer is 2 + 4 + · · · + 24 = 156 .

6. f : N → N ∪ {0} satisfies f (11) = 2. Also, if (m, n) = 1, f (mn) = f (m) + d(m)f (n), where d(m) is the number
of positive divisors of m. Calculate f (900).

Solution. We have
f (900 · 11) = f (900) + d(900)f (11) = f (900) + 54
We also have
f (11 · 900) = f (11) + d(11)f (900) = 2 + 2f (900)
Therefore, we have f (900) + 54 = 2 + 2f (900), giving f (900) = 52 .

28
7. If 12 X24
1 √

x+ + 2 = ck xk−12
x
k=0

calculate
24
X
(−1)k c2k
k=0

1
Solution. Since switching x with x in the L.H.S does not change the value of L.H.S, we have ck = c24−k . Let
z = −x. We have
24
1 √ 12 X
(−z − + 2) = ck (−z)k−12 ⇒
z
k=0
24
1 √ X
(x + − 2)12 = (−1)k ck xk−12
x
k=0

1
√ P24
Multiplying this with the original equation, of (x + x + 2)12 = k=0 ck x
k−12
, we have

1 √ 12 1 √ 1
(x + − 2) (x + + 2)12 = (x2 + 2 )12
x x x
as the L.H.S. Also, the constant term of the R.H.S is
24
X 24
X
(−1)24−k ck c24−k = (−1)k c2k
k=0 k=0

12

Since the constant term of the L.H.S is 6 = 924, the desired answer is 924 as well.

8. In 2ABCD,
√ the line passing D and parallel to BC meets segment AB at E. If AE = 10, BE = 20, CD =
CE = 5 2, ∠BAD = 2∠CED, calculate BD.

Solution. Let ∠DEC = ∠EDC = a. We have ∠EAD = 2a. Since ∠EAD + ∠ECD = 180 − 2a + 2a = 180,
A, E, D, C are cyclic. We have ∠EAC = ∠EDC = a = ∠CAD. We have 4BEC ∼ 4BCA, giving BC 2 =
BE · BA = 600. From LoC on 4BEC, we have
√ √
(5 2)2 + 600 − 202 5 3
cos a = √ √ =
600 · 5 2 · 2 12

From LoC again on 4BCD, since ∠BCD = 180 − a, we have

BD2 = BC 2 + CD2 + BC · CD · cos a = 900,

so BD = 30 .

9. Let A be the set of 7-digit numbers with each digit either 1 or 2. For S ⊂ A, which satisfies the following, what
is the maximum of |S|? For all m, n ∈ S, m + n has at least 3 digits that are 3.

Solution. For all m, n ∈ A, let d(m, n) be the number of digits of m, n that are different from another. For
example, d(1111111, 2222222) = 7. For each m ∈ A, define the set C(m) = {n|d(m, n) ≤ 1}. It is trivial that
   
7 7
|C(m)| = + =8
0 1

Now for all m, n ∈ S, we must have C(m) ∩ C(n) = ∅, since if C(m) ∩ C(n) 6= ∅, we have a x ∈ A such
that d(m, x), d(n, x) ≤ 1, implying that d(m, n) ≤ 2, a contradiction. Therefore, we must have 8|S| ≤ 27 . The
maximum possible value for |S is 16 . The construction is left to the reader. C(m) ∩ C(n) = ∅ helps to find
the construction.

29
10. For positive reals a, b, c, d, if the maximum of
ab + 4bc + cd
a2 + b2 + c2 + d2
is M , calculate 64(M − 1)6 .

Solution. From AM-GM, we have


√ √
a2 + (9 − 4 5)b2 ≥ 2( 5 − 2)ab,
√ √ √
(4 5 − 8)b2 + (4 5 − 8)c2 ≥ (8 5 − 16)bc,
√ √
(9 − 4 5)c2 + d2 ≥ 2( 5 − 2)cd

Therefore, we have

a2 + b2 + c2 + d2 ≥ 2( 5 − 2)(ab + 4bc + cd) ⇒

ab + 4bc + cd 1 5
≤ √ = +1=M
a2 + b2 + c2 + d2 2( 5 − 2) 2

We now have 64(M − 1)6 = 125 .

11. In 4ABC, ∠B is obtuse and AC = 9. Let the centroid of 4ABC be G. Let the midpoint of AD be E. AG
hits the circumcircle of 4ABC at F . EG k DF . Let AD hit the circumcircle of 4ABC at P . If BP = 2 and
the diameter of the circumcircle of 4ABC is d, calculate d2 .

Solution. From A, C, B, P cyclic we have ∠DP B = ∠C. From BP = 2, we have√ BD = 2 sin C. Also in
4ACD, we √ find AD = 9 sin C. Now from Pythagorean Theorem we have AB = 85 sin C = 2R sin C, giving
d = 2R = 85. The answer is 85 .

12. For a prime p there are 332 positive integers k such that k ≤ p−2, ( kp ) = 1, ( k+1
p ) = −1. What is the remainder
when p is divided by 1000? We define ( kp ) = 1 if k is a quadratic residue in mod p, and ( kp ) = −1 if k is not a
quadratic residue in mod p.

Solution. First, let us find the number of solutions to x2 − y 2 ≡ 1 (mod p), x, y ∈ {0, 1, 2, . . . , p − 1}. Since
(x + y)(x − y) ≡ 1 (mod p), we can set x + y ≡ k (mod p) and x − y ≡ k −1 (mod p), so x ≡ 2−1 (k + k −1 )
(mod p) and y ≡ 2−1 (k − k −1 ) (mod p). There are p − 1 solutions.
   
Now let us find the number of a such that 1 ≤ a ≤ p − 2 and ap = a+1 p = 1. We need to exclude the cases
a = 0, a = p − 1. Now notice that for all solutions of x2 − y 2 ≡ 1 (mod p), we have
 2  2   2
y y +1 x
= = =1
p p p

We need to consider all solutions in the form of (±x, ±y) as one solution. If p = 4k + 1, there exists an i such
that i2 ≡ −1 (mod p). Now we need to exclude (±1, 0) and (0, ±i) from our original 4k solutions and divide
by 4, giving k − 1 such a. If p = 4k − 1, we need to exclude (±1, 0) from our original 4k − 2 solutions and
divide by 4, giving k − 1 such a.
Finally, let’s find the number of k such that 1 ≤ k ≤ p − 2 and
   
k k+1
=− =1
p p

If p = 4k + 1, we have 2k − 1 quadratic residues, excluding 0 and p − 1. Subtracting k − 1 solutions from the


above, we have k solutions. If p = 4k − 1, we have 2k − 1 quadratic residues, excluding 0. Subtracting k − 1
solutions from the above, we have k solutions. Therefore, our prime must be 4 · 332 ± 1.
Checking gives the prime as 1327 ≡ 327 (mod 1000).

30
13. In 4ABC, AC = 48, BC = 30. Let I, O be the incenter and the circumcenter of 4ABC. If D = IO ∩ AC,
calculate DI 2 .

Solution. Let the perpendicular from I to AC√be M and O √ from AC be N . By LoC on 4ABC, √ we find
AB = 42. Also, we find r = 48+30−42
2 tan 30 = 6 3, so IM = 6 3. Also, we have R = 42
2 sin 60 = 14 3 and

302 + 422 − 482 1


cos B = =
2 · 30 · 42 7
√ √ √
We get ON = R cos B = 2 3. From IM : ON = 3 : 1, we get DI = 32 OI = 32 R2 − 2Rr = 3 21. We have
DI 2 = 189 .

14. For integers a1 , a2 , . . . , an , denote G (a1 , a2 , . . . , an ) as the greatest common factor of a1 , a2 , . . . , an . For all
integers a1 , a2 , . . . , a20 such that 1000 < a1 < a2 · · · < a20 and
20
X
ai = 105840
i=1

calculate the maximum of G(a1 , a2 , . . . , a20 ).


ai
Solution. For all 1 ≤ i ≤ 20, we let bi = G(a1 ,a2 ,...,a20 ) . We have bi ∈ N and b1 < b2 < b3 < · · · < b20 . We get
that bi ≥ i for all 1 ≤ i ≤ 20. Therefore,
20
X 20
X
105840 = ai = G(a1 , a2 , . . . , a20 ) bi ≥ (1 + 2 + · · · + 20)G(a1 , a2 , . . . , a20 ) = 210G(a1 , a2 , . . . , a20 )
i=1 i=1

giving that G(a1 , a2 , . . . , a20 ) ≤ 504.


But from the first condition, we have 504b1 ≥ G(a1 , a2 , . . . , a20 )b1 = a1 > 1000, so b1 ≥ 2. This gives bi ≥ i + 1.
Now
20
X 20
X
105840 = ai = G(a1 , a2 , . . . , a20 ) bi ≥ (2 + 3 + · · · + 21)G(a1 , a2 , . . . , a20 ) = 230G(a1 , a2 , . . . , a20 ),
i=1 i=1

giving that G(a1 , a2 , · · · a20 ) ≤ 460. Again, from the first condition, we have

460b1 ≥ G(a1 , a2 , · · · a20 )b1 = a1 > 1000,

giving that b1 ≥ 3. This gives that bi ≥ i + 2. Therefore, we have


20
X 20
X
105840 = ai = G(a1 , a2 , . . . , a20 ) bi ≥ (3 + 4 + · · · + 22)G(a1 , a2 , . . . , a20 ) = 250G(a1 , a2 , . . . , a20 ),
i=1 i=1

giving that G(a1 , a2 , . . . , a20 ) ≤ 423. The largest divisor of 105840 that is not greater than 423 is 420. Let
ai = 420(i + 2) for all 1 ≤ i ≤ 19, and a20 = 420 · 24. This satisfies the condition, so the answer is 420 .

15. For sets X, Y , define X×Y = {(x, y)|x ∈ X, y ∈ Y }. How many non-empty subsets A of {0, 1}×{0, 1, 2, 3, 4, 5, 6}
are there such that the following is true? If (a1 , b1 ), (a2 , b2 ) ∈ A, |a1 − a2 | + |b1 − b2 | =
6 1.

Solution. For i = 0, 1, . . . , 6, define the set Ai as Ai = {(x, i)|(x, i) ∈ A}. Clearly, Ai cannot be {(0, i), (1, i)},
since |0 − 1| + |i − i| = 1. Therefore, the possible sets for Ai is ∅, {(0, i)}, and {(1, i)}. Now we assign a string
of letters. Assign X for the ith letter if Ai−1 = ∅. Assign 0 for the ith letter if Ai−1 = {(0, i)}. Assign 1 for
the ith letter if Ai−1 = {(1, i)}. Now note the bijection between A and the number of strings that does not
have consecutive 0’s or 1’s. We have transformed this problem into counting the number of 7-strings made of
letters X, 0, 1 and there are no consecutive 0’s or 1’s. We proceed with recursion. Let the number of n-strings
that end with X be f (n), 0 be g(n), 1 be h(n). Note that f (1) = g(1) = h(1) = 1. Now from the condition that
there are no consecutive 0’s or 1’s, we have f (n) = f (n − 1) + g(n − 1) + h(n − 1), g(n) = f (n − 1) + h(n − 1),
h(n) = f (n − 1) + g(n − 1). Now bash and get that f (7) + g(7) + h(7) = 577. We must remove XXXXXXX,
which bijects to a empty set. The answer is 576 .

31
π
16. For all integers n, define an = (6n + 1) 18 . Calculate the remainder when

60
!2 60
!2
X X
n cos an + n sin an
n=1 n=1

is divided by 1000.

Solution. Bash. For arbitrary integer k, we have


7π 13π 19π
f (a6k+1 ) = f ( ), f (a6k+2 ) = f ( ), f (a6k+3 ) = f ( ),
18 18 18
25π 31π π
f (a6k+4 ) = f ( ), f (a6k+5 ) = f ( ), f (a6k ) = f ( ),
18 18 18
where f (x) is sin x or cos x. Let
9
X
g(n) = 6k + n = 270 + 10n
k=0

Now expanding, we have


60
X 6 X
X 9
n cos an = (6k + i) cos a6k+i =
n=1 i=1 k=0
7π 13π 19π 25π 31π π
= g(1) cos + g(2) cos + g(3) cos + g(4) cos + g(5) cos + g(6) cos
18 18 18 18 18 18
Similarly, we have
60
X 7π 13π 19π 25π 31π π
n sin an = g(1) sin + g(2) sin + g(3) sin + g(4) sin + g(5) sin + g(6) sin
n=1
18 18 18 18 18 18

Now square them and group. We have


60
X 60
X
( n cos an )2 + ( n sin an )2 =
n=1 n=1
7π 13π 19π 25π 31π π
= (g(1) cos + g(2) cos + g(3) cos + g(4) cos + g(5) cos + g(6) cos )2 +
18 18 18 18 18 18
7π 13π 19π 25π 31π π
(g(1) sin + g(2) sin + g(3) sin + g(4) sin + g(5) sin + g(6) sin )2
18 18 18 18 18 18
Now the strategy is to use cos2 θ + sin2 θ = 1, and use the difference of angles formula for the cosines. We
expand, and we use the grouping strategy to get
7π 7π π π
g(1)2 (cos2 + sin2 ) + · · · + g(6)2 (cos2 + sin2 )+
18 18 18 18
X (6i + 1)π (6j + 1)π (6i + 1)π (6j + 1)π
2 g(i)g(j)(cos cos + sin sin )=
18 18 18 18
1≤i<j≤6
6
X X (j − i)π
= g(k)2 + 2 g(i)g(j) cos
3
k=1 1≤i<j≤6

Now divide cases according to cos (j−i)π


3 to calculate the latter sum. We have the sum as
6
X 5
X 4
X 3
X 2
X
g(k)2 + g(k)g(k + 1) − g(k)g(k + 2) − 2 g(k)g(k + 3) − g(k)g(k + 4) + g(1)g(6)
k=1 k=1 k=1 k=1 k=1

Now note that we have g(i) = 270 + 10i. Thankfully, we just need to calculate (mod 1000) of the answer.
Now plug in all the numbers and find 600 as the desired answer. Darn.

32
17. A function f : N → N satisfies f (1) 6= 2. Also, f is monotonically increasing and for all positive integers n,
f (f (n)) = 5n. Calculate the remainder when f (2011) is divided by 1000.

Solution. I claim that f is injective. Indeed, if f (a) = f (b), 5a = f (f (a)) = f (f (b)) = 5b, so a = b, implying
the desired conclusion. Now if f (1) = 1, we have f (f (1)) = 1 6= 5, a contradiction. Since f (1) 6= 2, we
have f (1) ≥ 3. Note that f is strictly increasing now that we have f is injective. Therefore, if f (1) = k,
we have 5 − k = f (k) − f (1) ≥ k − 1, giving k ≤ 3. Since we have k ≥ 3 and k ≤ 3, we conclude that
k = f (1) = 3. We have f (3) = 5. From increasing condition we have f (2) = 4. Now f (4) = f (f (2)) = 10,
and f (5) = f (f (3)) = 15. We have f (15) = f (f (5)) = 25. Continuing, we have f (25) = f (f (15)) = 75,
and f (75) = f (f (25)) = 125. We start to notice a pattern, which is f (5k ) = 3 · 5k and f (3 · 5k ) = 5k+1 .
We go by induction on k. We did the base case for k = 1. Now we have f (5k+1 ) = f (f (3 · 5k )) = 3 · 5k+1
and f (3 · 5k+1 ) = f (f (5k+1 )) = 5k+2 , so the induction step is complete. Now we have f (625) = 1875 and
f (1875) = 3125. Note that 3125 − 1875 = 1875 − 625, so f (i) = i + 1250 for 625 ≤ i ≤ 1875. We have
f (761) = 2011, giving f (2011) = f (f (761)) = 3805 ≡ 805 (mod 1000).

18. A bijective function f : {1, 2, 3, 4, 5} → {1, 2, 3, 4, 5} is in A if and only if it satisfies f k (1) 6= 1 for k = 1, 2, 3, 4.
How many sets of functions (g, h) are there such that g ∈ A, h ∈ A, g ◦ h ∈ A?

Solution. Since f is bijective, it is made of cycles. If 1 is in a cycle of length k, we have f k (1) = 1, where
f k (i) is f iterated k times. Therefore, we must have k = 5, giving that f must be a 5-cycle function. We are
left to find the number of pairs of function (g, h) such that g, h, g ◦ h are all 5-cycle functions. Since there are
(5 − 1)! = 24 5-cycle functions, we fix h to be h(i) ≡ i + 1 (mod 5) and find the number of g that satisfies
the condition, then multiply by 24. Let g(h(i)) = g(i + 1) = ui , where indices are taken modulo 5. If ui = i
or ui = i + 1, we have g(h(i)) = i or g(h(i)) = h(i), so g ◦ h or g is not a 5-cycle function. We must have
ui 6= i, i + 1. There are 13 possible (u1 , u2 , u3 , u4 , u5 ). Bash them all and find that there are 8 of them that
actually works. We have 24 · 8 = 192 .

x y z
19. Positive integers x, y, z satisfies + + = 6 and (x, z) = 1. Find the maximum of x + y + z.
y z x

Solution. We expand to get xy 2 + yz 2 + zx2 = 6xyz. Looking at this (mod x), we have x|yz 2 , so from
(x, z) = 1, we have x|y. Let y = xk. We have x2 k 2 + kz 2 + zx = 6xkz. Looking at this (mod x) again,
we have x|kz 2 , so from (x, z) = 1, we have x|k, Let k = xl. We have x3 l2 + lz 2 + z = 6xlz. Now, looking
at this (mod l), we have l|z. Let z = lm. We have x3 l + l2 m2 + m = 6xlm. Looking at this (mod l), we
have l|m. Let m = lu. Now we have x3 + l3 u2 + u = 6xlu. Now concluding, we have y = x2 l, z = l2 u, and
x3 + l3 u2 + u = 6xlu. From (x, z) = 1, we have (l, x) = (u, x) = 1. Looking at the above in (mod u), we
have u|x3 . However, we know that (u, x) = 1. We must have u = 1. We now have y = x2 l, z = l2 , and
x3 + l3 + 1 = 6xl. Let us solve the equation a3 + b3 + 1 = 6ab in positive numbers. WLOG a ≥ b. If a = b, we
have 2a3 + 1 = 6a2 , so there is a contradiction in (mod 2). Now by AM-GM, we have
√ √
6ab = a3 + b3 + 1 ≥ 2 a3 b3 + 1 > 2 a3 b3

It is clear that ab < 9, so ab ≤ 8. Now bashing gives that the only possible solution is (3, 2). We have the
solution set of (3, 2), (2, 3). Therefore, we must have (x, l) = (3, 2) or (x, l) = (2, 3). Solving for each case, we
have (x, y, z) = (3, 18, 4) or (x, y, z) = (2, 12, 9). The maximum possible value of x+y+z is 3+18+4 = 25 .

20. Error in Problem. Everyone gets 6 points.

Solution. Error in Problem

33
KMO First Round 2012

23 June 2012

1. Find all subsets of {1, 2, . . . , 23} such that the number of elements is 11 and the sum of the elements is 194.
2. Find the number of (x, y) ∈ Z2 such that |x|, |y| ≤ 1000 and

4x3 − 5x2 y + 10xy 2 + 12y 3 − 108x − 81y = 0

3. Find the smallest integer n, such that there exists a function f : {1, 2, . . . , 20} → {1, 2, . . . , n} where

f (k) + f (k + 2)
f (k + 1) < , ∀k = 1, . . . , 18
2

4. In 2ABCD inscribed in a circle O, AB = 24, AD = 16, ∠BAC = ∠DAC. Let AC ∩ BD = E, then BE = 18.
If the line passing D and perpendicular to AC meets circle O at F , F C ∩ AB = K, AC ∩ DF = L, calculate
KL.
5. For bijective functions f : {1, 2, . . . , 8} → {1, 2, . . . , 8} there exists exactly one 1 ≤ i ≤ 7 such that f (i) >
f (i + 1). Find the number of such function.

6. Sequence x1 , x2 , . . . , x10 has 4 ones, 3 twos, and 3 threes. Let z1 = x1 , and define
 2
1 zn · xn+1
zn+1 = 1+ ·
n zn + xn+1
p
If the maximum possible value of z10 is , where p, q are relatively prime positive integers, calculate p + q.
q
7. Define X = {1, 2, . . . , 13}, and define g : X → X as g(x) = 14 − x. How many functions f : X → X are there
such that f ◦ f ◦ f ≡ g?

8. Three points, A, B, C are on a circle O. Also, AB = 18, ∠ABC = 59◦ , ∠CAB = 3◦ . Also, D, E lies on the
tangent to O at A and ∠DAC < 90◦ , DA = 12, AE = 18, DE = 30. Let BD ∩O = K, CE ∩O = L, KL∩DE =
P . P is also the reflection of A with respect to E. Calculate AP .
9. Define {x} = x − bxc. Calculate  
X 523i
2012
1≤i≤2012
(i,2012)=1

10. Let f (x) = x2 − 10x + p2 . If there are exactly four distinct reals such that f ◦ f ◦ f (x) = f (x), calculate p.
11. In 4ABC inscribed in a circle O, O is internally tangent to O0 at A. For D = AB ∩ O0 , let E, F = BC ∩ O0 ,
where F is closer to C. Also, the tangent to O at B intersects DF at K, and CD ∩ O0 = L. If ∠CF A =
38◦ , ∠DKB = 47◦ , ∠CLA = 60◦ , ∠CAB = x, Calculate x.
12. For positive integer k let
361984!
ak =
k!(361984 − k)!
What is the greatest common factor of a1 , a3 , a5 , . . . , a361983 ?
13. 16 students take a test with 30 questions. Each student solved at most 15 problems, and each problem was
solved by at least 8 students. For any two students A, B the number of problems solved by both A, B is a fixed
number n. What is n?

34
14. In 4ABC, ∠ABC < 90◦ , AB = 15, BC = 27. Let M be the midpoint AC. Let ` be the line passing M and
is perpendicular to BC. Let the circle with center A and passing M meet ` at P . Let there be a point O with
distance 3 from BC. Let the circle with center O and passing B, M meet ` at Q. Q is at the opposite side of
P with respect to BC. If P Q = 30, calculate the area of 4OP M .
15. What is the smallest positive integer m such that

(−1)m m!
 
1 1 1
180! + + +
181 m + 181 181 m + 181

is an integer?

16. For a sequence an with a1 = 1, a2 = 2, there exists a positive


 integer k such that an+k = an for all positive
integer n. Define bn = an+2 − an+1 + an . If bn+1 = b2n + 1 /2 for all positive integers n, calculate

60
X
ai
i=1

17. If positive integers a, b, c satisfy

a3 b3 c3
+ + = 7,
(b + 3)(c + 3) (c + 3)(a + 3) (a + 3)(b + 3)

calculate a + b + c.

18. Find the number of injective function f : {1, 2, . . . , 7} → {1, 2, . . . , 9} such that if 1 ≤ i < j ≤ 7, f (i) 6= f (j)+1.
19. For a point P outside circle ω with center O, let the intersection of P O and ω that is farther from P be A. We
have AP = 200. A line `, passing through P but not O hits ω at two points. Let the point closer to P be B
and the farther one be C. If l meets the circumcircle of 4ABO at point D and circumcircle of 4ACO at E,
E lies between B, C and AD = 250, AE = 90. Calculate the radius of ω.

20. Find the maximum of positive integer a such that there exists a positive integer b such that ab+2a = b4a .

35
KMO First Round 2013

1 June 2013

1. We want to choose 8 people out of 20 people who are sitting in a circle. We do not want to choose two people
who are next to each other. Calculate how many ways are possible.
2. Let a, b, c, n be integers such that 31024 − 21024 = 7a × 13b × 97c × n and (n, 7 × 13 × 97) = 1. Calculate
7a + 13b + 97c.
3. For all 3-tuples of reals (x, y, z) such that x2 + y 2 + z 2 = 1, if the maximum of (x2 − y 2 )(y 2 − z 2 )(z 2 − x2 ) is
M , calculate M12 .
4. In 4ABC, inscribed in a circle O, ∠AOB = ∠BOC = 20◦ . Let the midpoints of OA, OB, OC be P, Q, R, Let
D = AB ∩ OC. Then OD = 4. If x is the area of the pentagon ADRQP , calculate x2 .
5. Find the remainder when the following expression is divided by 155.
154 1000
X X
nk
n=1 k=1

6. If the maximum of positive integer k which the following holds is M and the minimum of such integer k is m,
calculate M + m. There exists a set A, B with k integers as its elements such that {a + b|a ∈ A, b ∈ B} =
{0, 1, 2, . . . , 100}.
7. In 4ABC, let the internal bisector of ∠C meet AB at D. Let the line passing B and parallel to CD meet AC
at E. AD = 4, BD = 6, BE = 15. If BE hits the external bisector of ∠A at P , calculate (P B − AB)2 .
8. Let a, b, c, d be nonnegative reals numbers such that a + b − d = −2(c − 3) and

a2 + c2 + 2a(c − 3) + bd − 12c = 0

Calculate the maximum of b.


9. In an acute triangle ∠ABC, ∠B = 70◦ . Let D, E, F be the foot of the perpendicular from A, B, C to
BC, CA, AB. Let the foot of the perpendicular from E to BC be H. Let the midpoint AE be M . Let
M D ∩ EH = K, let the line passing H and perpendicular to AB meet EF at L. If ∠KLH = 80◦ , DK = 50,
calculate LH.
10. A circle S and a point P (a, b) on S satisfies the following conditions: the tangent to S at P passes the origin,
the center of S is either in the x-axis or the fourth quadrant, S passes through (1, 0), (9, 0) and b ≥ 59 . For such
P (a, b), let be M, m, respectively the maximum and minumum of

6a2 + 5b2
a3 b + b3 a
Calculate 36M + 27m2 .
10
240k −1
P
11. For positive integer k, let ak = 41 . Let S = ai . Calculate the remainder when S is divided by 41.
i=1

12. How many 5-digit numbers are there such that all digits are either 1, 2, 3 or 4 and no two digits next to each
other differ by 1?
−→ −−→
13. For two points A, B on circle O, the tangents to O at A, B meets at C. Set points D, E on ray CA, BC
respectively such that AD = 30, BE = 60. Let P = BA ∩ DE. If DE = 66, calculate DP .
14. In a convex heptagon A1 A2 · · · A7 , we want to draw four diagonals to divide the heptagon into 5 triangle. Also,
we want all triangles to share at least one edge with the heptagon. How many ways are there to do so?

36
15. If positive reals a, b satisfies (a2 − a + 1)(b2 − b + 1) = a2 b2 , let M, m be the maximum and minimum of

2ab
a+b−1
Calculate M 2 + m2 .
n2
 
16. Find the number of positive integer n such that is a prime number less than 300.
7
17. Find the smallest positive integer n such that the following is true: for any set A with n elements that are
larger than 1 and less than 2013, there exists a, b ∈ A, a 6= b such that |(a − b)(ab − 100)| < 10ab.
18. If positive integers x, y satisfy y 2 = (x2 − 482 )(x2 − 552 ), find the remainder when x + y is divided by 1000.
19. In a isosceles triangle AB1 B2 , AB1 = AB2 = 8. Line `i passing through A intersectes the circle with center
Bi and radius 6 at Pi , Qi . (i = 1, 2) If the circumradius of 4AP1 P2 is 2 and AQ1 = 9, AQ2 = 11, find the
maximum of Q1 Q22 .
20. Find the number of 8-tuples (a1 , a2 , . . . , a8 ) such that 0 < a1 < a3 < a5 < a7 < 9, 0 < a2 < a4 < a6 < a8 < 9,
and for i = 1, 2, 3, 4, a2i−1 < a2i .

37
KMO First Round 2014

24 May 2014

1. Polynomial f (x) and reals a, b, c satisfy f (x)(x−1)20 = (x2 +ax+1)30 +(x2 +bx+c)10 . Calculate f (1)+a2 +b2 +c2 .
2. In a 2 × 6 matrix, we want to fill 1 or 2 in each term. Also, for i = 1, 2, 3, 4, 5, 6, define ci as the product of the
terms in the ith column. How many ways are there to fill the terms so that
6
X
ci ≡ 0 (mod 2)?
i=1

3. Let a be the product of all positive integers that is not a muliple of 6 and not larger than 2014. What is the
largest positive integer k such that 5k |a?
4. On segment AB, set a point S such that AS = 3, SB = 4. For a point X such that ∠XBS = ∠AXS, let d be
the distance between X and AB. Find the maximum of d2 .

5. In the set {1, 2, 3, . . . , 8}, how many subsets are there such that contains 4 consecutive integers?
6. A monic polynomial f (x) of degree 4 satisfies f (2n + 1) = 8n + 1 for n = 1, 2, 3, 4. Calculate f (1).
7. In 4ABC, AB = 5, BC = 7, CA = 8. There are many points such that are 3 away from AB and 2 away rom
BC. For all of such points, the sum of their distance from CA is x. Calculate x2 .

8. Find the largest integer n such that n is not a cube of an integer, and n2 is a multiple of [ 3 n]5 .
9. In 4ABC with I as its incenter, the incircle meets BC, CA, AB at D, E, F . EF ∩BC = J, BJ = 100, CJ = 60.
Let the A-excircle hit BC at K. IK passes through L, a point that internally divides segment CA by 5 : 3. If
the inradius of 4ABC is r, calculate r2 .
10. In a regular 20-gon with 1 as the length of all sides, pick 5 points to make a pentagon. How many pentagons
have all of its sides larger than 2? If two pentagons are same when rotated, they are still considered to be
different.
11. Find the least odd positive integer m such that (m + 164)(m2 + 1642 ) is a square number.
12. What is the largest real number a such that

x100 − ax51 + ax49 ≥ 1, ∀x > 1

13. Calculate the maximum of the perimeter of the hexagon that satisfies the following conditions. The length of
all sides are positive integers, and all angles of the hexagon is 120. If two sides of the hexagon are parallel,
their lengths are the same. If two sides of the√hexagon are adjacent, their lengths are different from each other.
The area of the hexagon is no larger than 12 3.

14. Let f (m) = 6m . If we simplify


20
X xf (n) (1 − xf (20n) )
n=1
1 − xf (n)

we have an integer polynomial. What is the coefficient of x20! ?


15. For a sequence ai , for all m, n, k ≥ 0, 0 < am+n+k ≤ 3 max[am , an , ak ]. Calculate the maximum of
a 201
P
ik
k=1

max[ai1 , . . . , ai201 ]

38
16. For positive integers m, n (m < n), denote [m, n] as the set of integers that are not less than m and not greater
than n. If we choose a1 , a2 , a3 , b1 , b2 , b3 from positive integers not greater than 8, find how many ways are there
to pick them so that a1 < a2 < a3 and no sets in [a1 , b1 ], [a2 , b2 ], [a3 , b3 ] are not subsets of each other.
17. For a polynomial f (x), for all −1 ≤ x ≤ 1, 0 ≤ f (x) ≤ 1. Find the maximum possible value of the coefficient
of x6 in f (x).

18. In 4ABC with ∠A < 90, the internal bisector of ∠B hits AC at D, and the internal bisector of ∠C hits AB
at E. Let the midpoint of DE be F . Also, let the foot of the perpendicular from F to AB, BC be J, K. If
AD = 30, F J = 12, F K = 20, calculate DE 2 .
19. Define a sequence an as the following. a1 = 1, and
1
an+1 =
2[an ] − an + 1
q
If a2014 = , where p, q are relatively prime positive integers, calculate p + q.
p
20. How many ways are there to tile the following using 1 × 1, 1 × 2 tiles?

39
KMO First Round 2015

16 May 2015

1. A real degree 5 polynomial f (x) has all of its coefficients nonnegative. If for x 6= 0, f (x) = x6 f ( x1 ) and
f (2) = 10f (1), what is the closest integer to ff (2)
(3)
?

2. Find the number of 10-tuples (a1 , a2 , . . . , a10 ) such that ai ∈ {1, 2, 3} for 1 ≤ i ≤ 10, ai < ai+1 if i = 1, 3, 5, 7, 9,
and ai > ai+1 if i = 2, 4, 6, 8.
3. Let there be a semicircle with AB as a diameter. Let C lie on arc AB. Let M be the midpoint of segment BC.
A circle is tangent to BC at M , and to arc BC at D. Let AD ∩ BC = E. If AB = 20, AC = 5, calculate CE 2 .
4. For positive integers m, n, if the following is true, calculate the minimum of m + n. There exists a positive
integer k such that k 3 − mk 2 − nk + 2015 = 0.
5. Find the sum of all prime numbers p such that the following is true. The number of positive divisors of p4 + 119
is no larger than 20.
6. Find the smallest positive integer n such that
2015  
X
k 2015
(−1) · (n · k 2015 − 1) ≡ 1 (mod 2017)
k
k=2

You may use the fact that 2017 is a prime number.


7. Find the number of 5-tuples of positive integers (x1 , x2 , x3 , x4 , x5 ) such that x1 = x5 , xi 6= xi+1 for i = 1, 2, 3, 4,
xi + xi+1 ≤ 6 for i = 1, 2, 3, 4.
8. In 4ABC, AB = 5, BC = 12, CA = 13. When P moves around the plance, calculate the minimum possible
value of 5 · P A · P B + 12 · P B · P C + 13 · P C · P A.
P7 P7 P7
9. Reals x1 , x2 , . . . , x7 satisfy i=1 xi = 0 and i=1 |xi | = 1. If the maximum of i=1 xi |xi | is pq , where p, q are
relatively prime positive integers, calculate p + q.
10. Find the number of functions f : {1, 2, 3, 4, 5} → {1, 2, 3, 4, 5} such that for k = 1, 2, 3, 4, f (k + 1) ≤ f (k) + 1.
11. In 4ABC, the incircle and the A-excircle hits BC at D, E. If AE intersects the incircle at P, Q, (AP < AQ),
and P Q = 40, EQ = 5. Calculate DQ2 .
12. Let q(n) be the number of ways to express n as a sum of two positive integers, using each of them at least
once. For example, since 5 = 4 + 1 = 3 + 2 = 3 + 1 + 1 = 2 + 2 + 1 = 2 + 1 + 1 + 1, we have q(5) = 5. Find the
number of positive integers n such that n ≤ 100, n ≡ 3 (mod 4), and q(n) ≡ 0 (mod 2).
13. Reals a, b, c satisfy a3 + 2b3 + 4c3 = 6abc. If 0 ≤ a ≤ 1, the maximum of 4bc − a2 − b − c is m. Calculate b32mc.
14. We want to write down 1, 2, · · · 10 on vertices of a 10-gon. We have to write down different numbers on differnet
vertices. Also, numbers on adjacent vertices should be relatively prime to each other. How many ways can we
write down the numbers?
15. In 4ABC, ∠B > 90. Let the orthocenter and the circumcenter of 4ABC be H, O, whit AO = 8, AH = 12.
Let the foot of the perpendicular from C to AB be D, B to AC be E. If a point P on segment AE satisfies
EP = EO and D, E, O are collinear, calculate HP 2 .
16. Find the smallest positive integer such that n4 + 1 ≡ 0 (mod 274).
17. Sequence an satisfies the following. a1 = a2 = a3 = 1, and an an−3 − an−1 an−2 = 4n for n ≥ 4. Calculate
a2016 + 4a2014
a2015

40
18. For a set S with integers as its elements, define S +1 = {k+1|k ∈ S}. For non-empty subsets K of {1, 2, . . . , 10},
how many of them satisfy the following? There exists a set S such that K = S ∪ (S + 1).
19. In 4ABC, (∠B < ∠C), let the trisectors of AC be D, E, where D is closer to C. Let the circumcircle of
4BCE meet AB at F , and AF = 2. Let K = EF ∩ BC, L = AK ∩ BE, M = DL ∩ BC, then CM = 1. If
DK passes through the midpoint of AB, calculate AK 2 .

20. Let S be the set of positive integers with more than 4 positive divisors. For an element of S, n, find the
sum of n such that the following holds. n < 2015, and if we let the five smallest divisors of n as 1, a, b, c, d,
(1 < a < b < c < d), we have n = 12ac + 7d2 .

41

You might also like