You are on page 1of 634

A Corner of Mathematical

Olympiad and Competition


Book V
(Selection Problems from Europe)

1. Baltic Way Mathematics Competition Contest


2. Mathematical Olympiad in Europe
3. International Mathematical Competition for University
Students

Problems with Solutions

Phnom Penh, October 24, 2014


Prepare by: Keo Sodara
Contact: cambodara@gmail.com
cambodia.math@gmail.com
www.facebook.com/aprissigi
(+855) 0967308278
Baltic Way Mathematics
Competition Contest

1990-2012
Baltic Way 1990

Riga, November 24, 1990

Problems and solutions

1. Integers 1, 2, . . . , n are written (in some order) on the circumference of a circle. What is the smallest
possible sum of moduli of the differences of neighbouring numbers?
Solution. Let a1 = 1, a2 , . . . , ak = n, ak+1 , . . . , an be the order in which the numbers 1, 2, . . . , n are
written around the circle. Then the sum of moduli of the differences of neighbouring numbers is
|1 − a2 | + |a2 − a3 | + · · · + |ak − n| + |n − ak+1 | + · · · + |an − 1|
≥ |1 − a2 + a2 − a3 + · · · + ak − n| + |n − ak+1 + · · · + an − 1|
= |1 − n| + |n − 1| = 2n − 2.
This minimum is achieved if the numbers are written around the circle in increasing order.
2. The squares of a squared paper are enumerated as follows:

n
...
4 10 14
3 6 9 13
2 3 5 8 12
1 1 2 4 7 11
1 2 3 4 5 ... m

Devise a polynomial p(m, n) of two variables m, n such that for any positive integers m and n the number
written in the square with coordinates (m, n) will be equal to p(m, n).
Solution. Since the square with the coordinates (m, n) is nth on the (n + m − 1)-th diagonal, it contains
the number
X
n+m−2
(n + m − 1)(n + m − 2)
P (m, n) = i +n= + n.
i=1
2

3. Let a0 > 0, c > 0 and


an + c
an+1 = , n = 0, 1, . . . .
1 − an c
Is it possible that the first 1990 terms a0 , a1 , . . . , a1989 are all positive but a1990 < 0?
Solution. Obviously we can find angles 0 < α, β < 90◦ such that tan α > 0, tan (α + β) > 0, . . . ,
tan (α + 1989β) > 0 but tan (α + 1990β) < 0. Now it suffices to note that if we take a0 = tan α and
c = tan β then an = tan (α + nβ).
4. Prove that, for any real a1 , a2 , . . . , an ,
X
n
ai aj
≥ 0.
i,j=1
i+j−1

Pn
Solution. Consider the polynomial P (x) = a1 + a2 x + · · · + an xn−1 . Then P 2 (x) = ak al xk+l−2 and
R1 2 Pn ak al
k,l=1

0
P (x) dx = k,l=1 k+l−1 .
5. Let ∗ denote an operation, assigning a real number a ∗ b to each pair of real numbers (a, b) (e.g., a ∗ b =
a + b2 − 17). Devise an equation which is true (for all possible values of variables) provided the operation ∗
is commutative or associative and which can be false otherwise.
Solution. A suitable equation is x ∗ (x ∗ x) = (x ∗ x) ∗ x which is obviously true if ∗ is any commutative or
associative operation but does not hold in general, e.g., 1 − (1 − 1) 6= (1 − 1) − 1.

1
6. Let ABCD be a quadrangle, |AD| = |BC|, ∠A + ∠B = 120◦ and let P be a point exterior to the quadrangle
such that P and A lie at opposite sides of the line DC and the triangle DP C is equilateral. Prove that the
triangle AP B is also equilateral.
Solution. Note that ∠ADC + ∠CDP + ∠BCD + ∠DCP = 360◦ (see Figure 1). Thus ∠ADP = 360◦ −
∠BCD − ∠DCP = ∠BCP . As we have |DP | = |CP | and |AD| = |BC|, the triangles ADP and BCP are
congruent and |AP | = |BP |. Moreover, ∠AP B = 60◦ since ∠DP C = 60◦ and ∠DP A = ∠CP B.
7. The midpoint of each side of a convex pentagon is connected by a segment with the intersection point of
the medians of the triangle formed by the remaining three vertices of the pentagon. Prove that all five such
segments intersect at one point.
Solution. Let A, B, C, D and E be the vertices of the pentagon (in order), and take any point O as origin.
Let M be the intersection point of the medians of the triangle CDE, and let N be the midpoint of the
segment AB. We have

OM = 13 (OC + OD + OE)

and

ON = 12 (OA + OB).

The segment N M may be written as

ON + t(OM − ON ), 0 ≤ t ≤ 1.
3
Taking t = 5 we get the point

P = 51 (OA + OB + OC + OD + OE),

the centre of gravity of the pentagon. Choosing a different side of the pentagon, we clearly get the same
point P , which thus lies on all such line segments.
Remark. The problem expresses the idea of subdividing a system of five equal masses placed at the vertices
of the pentagon into two subsystems, one of which consists of the two masses at the endpoints of the side
under consideration, and one consisting of the three remaining masses. The segment mentioned in the
problem connects the centres of gravity of these two subsystems, and hence it contains the centre of gravity
of the whole system.
8. Let P be a point on the circumcircle of a triangle ABC. It is known that the base points of the perpendiculars
drawn from P onto the lines AB, BC and CA lie on one straight line (called a Simson line). Prove that
the Simson lines of two diametrically opposite points P1 and P2 are perpendicular.
Solution. Let O be the circumcentre of the triangle ABC and ∠B be its maximal angle (so that ∠A and ∠C
are necessarily acute). Further, let B1 and C1 be the base points of the perpendiculars drawn from the
point P to the sides AC and AB respectively and let α be the angle between the Simson line l of point P
and the height h of the triangle drawn to the side AC. It is sufficient to prove that α = 12 ∠P OB. To
show this, first note that the points P , C1 , B1 , A all belong to a certain circle. Now we have to consider
several sub-cases depending on the order of these points on that circle and the location of point P on the
circumcircle of triangle ABC. Figure 2 shows one of these cases — here we have α = ∠P B1 C1 = ∠P B1 C1 =
∠P AB = 12 ∠P OB. The other cases can be treated in a similar manner.

P B
l P
C1
·
D h O
C · ·
C B1 A
A B

Figure 1 Figure 2 Figure 3

9. Two equal triangles are inscribed into an ellipse. Are they necessarily symmetrical with respect either to
the axes or to the centre of the ellipse?
Solution. No, not necessarily (see Figure 3 where the two ellipses are equal).

2
10. A segment AB of unit length is marked on the straight line t. The segment is then moved on the plane so
that it remains parallel to t at all times, the traces of the points A and B do not intersect and finally the
segment returns onto t. How far can the point A now be from its initial position?
Solution. The point A can move any distance from its initial position — see Figure 4 and note that we can
make the height h arbitrarily small.

A B
t t
h

Figure 4

11. Prove that the modulus of an integer root of a polynomial with integer coefficients cannot exceed the
maximum of the moduli of the coefficients.
Solution. For a non-zero polynomial P (x) = an xn + · · · + a1 x + a0 with integer coefficients, let k be the
smallest index such that ak 6= 0. Let c be an integer root of P (x). If c = 0, the statement is obvious. If
c 6= 0, then using P (c) = 0 we get ak = −x(ak+1 + ak+2 x + · · · + an xn−k−1 ). Hence c divides ak , and since
ak 6= 0 we must have |c| ≤ |ak |.
12. Let m and n be positive integers. Prove that 25m + 3n is divisible by 83 if and only if 3m + 7n is divisible
by 83.
Solution. Use the equality 2 · (25x + 3y) + 11 · (3x + 7y) = 83x + 83y.
13. Prove that the equation x2 − 7y 2 = 1 has infinitely many solutions in natural numbers.
Solution. For any solution (m, n) of the equation we have m2 − 7n2 = 1 and

1 = (m2 − 7n2 )2 = (m2 + 7n2 )2 − 7 · (2mn)2 .

Thus (m2 + 7n2 , 2mn) is also a solution. Therefore it is sufficient to note that the equation x2 − 7y 2 = 1
has at least one solution, for example x = 8, y = 3.
14. Do there exist 1990 relatively prime numbers such that all possible sums of two or more of these numbers
are composite numbers?
Solution. Such numbers do exist. Let M = 1990! and consider the sequence of numbers 1 + M , 1 + 2M ,
1 + 3M , . . . . For any natural number 2 ≤ k ≤ 1990, any sum of exactly k of these numbers (not necessarily
different) is divisible by k, and hence is composite. number. It remains to show that we can choose
1990 numbers a1 , . . . , a1990 from this sequence which are relatively prime. Indeed, let a1 = 1 + M ,
a2 = 1 + 2M and for a1 , . . . , an already chosen take an+1 = 1 + a1 · · · · · an · M .
15. Prove that none of the numbers
n
Fn = 22 + 1, n = 0, 1, 2, . . . ,

is a cube of an integer.
n
Solution. Assume there exist such natural numbers k and n that 22 + 1 = k 3 . Then k must be an odd
n
number and we have 22 = k 3 − 1 = (k − 1)(k 2 + k + 1). Hence k − 1 = 2s and k 2 + k + 1 = 2t where s and t
are some positive integers. Now 22s = (k − 1)2 = k 2 − 2k + 1 and 2t − 22s = 3k. But 2t − 22s is even while
3k is odd, a contradiction.
16. A closed polygonal line is drawn on squared paper so that its links lie on the lines of the paper (the sides
of the squares are equal to 1). The lengths of all links are odd numbers. Prove that the number of links is
divisible by 4.
Solution. There must be an equal number of horizontal and vertical links, and hence it suffices to show that
the number of vertical links is even. Let’s pass the whole polygonal line in a chosen direction and mark each
vertical link as “up” or “down” according to the direction we pass it. As the sum of lengths of the “up” links
is equal to that of the “down” ones and each link is of odd length, we have an even or odd number of links
of both kinds depending on the parity of the sum of their lengths.

3
17. In two piles there are 72 and 30 sweets respectively. Two students take, one after another, some sweets
from one of the piles. Each time the number of sweets taken from a pile must be an integer multiple of the
number of sweets in the other pile. Is it the beginner of the game or his adversary who can always assure
taking the last sweet from one of the piles?
Solution. Note that one of the players must have a winning strategy. Assume that it is the player making
the second move who has it. Then his strategy will assure taking the last sweet also in the case when the
beginner takes 2 · 30 sweets as his first move. But now, if the beginner takes 1 · 30 sweets then the second
player has no choice but to take another 30 sweets from the same pile, and hence the beginner can use the
same strategy to assure taking the last sweet himself. This contradiction shows that it must be the beginner
who has the winning strategy.
18. Positive integers 1, 2, . . . , 100, 101 are written in the cells of a 101 × 101 square grid so that each number
is repeated 101 times. Prove that there exists either a column or a row containing at least 11 different
numbers.
Solution. Let ak denote the total number of rows and columns containing the number k at least once.
As i · (20 − i) < 101 for any natural number i, we have ak ≥ 21 for all k = 1, 2, . . . , 101. Hence
a1 + · · · + a101 ≥ 21 · 101 = 2121. On the other hand, assuming any row and any column contains no more
than 10 different numbers we have a1 + · · · + a101 ≤ 202 · 10 = 2020, a contradiction.
19. What is the largest possible number of subsets of the set {1, 2, . . . , 2n + 1} such that the intersection of any
two subsets consists of one or several consecutive integers?
Solution. Consider any subsets A1 , . . . , As satisfying the condition of the problem and let Ai =
{ai1 , . . . , ai,ki } where ai1 < · · · < ai,ki . Replacing each Ai by A′i = {ai1 , ai1 + 1, . . . , ai,ki − 1, ai,ki }
(i.e., adding to it all “missing” numbers) yields a collection of different subsets A′1 , . . . , A′s which also
satisfies the required condition. Now, let bi and ci be the smallest and largest elements of the sub-
set A′i , respectively. Then min1≤i≤s ci ≥ max1≤i≤sTbi , as otherwise some subsets A′k and A′l would
not intersect. Hence there exists an element a ∈ 1≤i≤s A′i . As the number of subsets of the set
{1, 2, . . . , 2n + 1} containing a and consisting of k consecutive integers does not exceed min (k, 2n + 2 − k)
we have s ≤ (n + 1) + 2 · (1 + 2 + · · · + n) = (n + 1)2 . This maximum will be reached if we take a = n + 1.

4
Baltic Way 1991

Tartu, December 14, 1991

Problems and solutions

1. Find the smallest positive integer n having the property: for any set of n distinct integers a1 , a2 , . . . , an
the product of all differences ai − aj , i < j is divisible by 1991.
Q
Solution. Let S = (ai − aj ). Note that 1991 = 11 · 181. Therefore S is divisible by 1991 if and only
1≤i<j≤n
if it is divisible by both 11 and 181. If n ≤ 181 then we can take the numbers a1 , . . . , an from distinct
congruence classes modulo 181 so that S will not be divisible by 181. On the other hand, if n ≥ 182 then
according to the pigeonhole principle there always exist ai and aj such that ai − aj is divisible by 181 (and
of course there exist ak and al such that ak − al is divisible by 11).
2. Prove that there are no positive integers n and m > 1 such that 1021991 + 1031991 = nm .
Solution. Factorizing, we get

1021991 + 1031991 = (102 + 103)(1021990 − 1021989 · 103 + 1021988 · 1032 − · · · + 1031990 ),

where 102 + 103 = 205 = 5 · 41. It suffices to show that the other factor is not divisible by 5. Let
ak = 102k · 1031990−k , then ak ≡ 4 (mod 5) if k is even and ak ≡ −4 (mod 5) if k is odd. Thus the whole
second factor is congruent to 4 · 1991 ≡ 4 (mod 5).
3. There are 20 cats priced from $12 to $15 and 20 sacks priced from 10 cents to $1 for sale (all prices are
different). Prove that each of two boys, John and Peter, can buy a cat in a sack paying the same amount
of money.
Solution. The number of different possibilities for buying a cat and a sack is 20 · 20 = 400 while the number
of different possible prices is 1600 − 1210 + 1 = 391. Thus by the pigeonhole principle there exist two
combinations of a cat and a sack costing the same amount of money. Note that the two cats (and also the
two sacks) involved must be different as otherwise the two sacks (respectively, cats) would have equal prices.
4. Let p be a polynomial with integer coefficients such that p(−n) < p(n) < n for some integer n. Prove that
p(−n) < −n.
Solution. As an − bn = (a − b)(an−1 + an−2 b + · · · + bn−1 ), then for any distinct integers a, b and for any
polynomial p(x) with integer coefficients p(a) − p(b) is divisible by a − b. Thus, p(n) − p(−n) 6= 0 is divisible
by 2n and consequently p(−n) ≤ p(n) − 2n < n − 2n = −n.
5. For any positive numbers a, b, c prove the inequalities
1 1 1 2 2 2 9
+ + ≥ + + ≥ .
a b c a+b b+c c+a a+b+c

2
  2
Solution. To prove the first inequality, note that a+b ≤ 12 a1 + 1b and similarly b+c
2
≤ 21 1b + 1c , c+a ≤
  
1 1 1 3 1 1 1 1
2 c + a . For the second part, use the inequality x+y+z ≤ 3 x + y + z for x = a + b, y = b + c and
z = c + a.
6. Let [x] be the integer part of a number x, and {x} = x − [x]. Solve the equation

[x] · {x} = 1991x.

Solution. Let f (x) = [x] · {x}. Then we have to solve the equation f (x) = 1991x. Obviously, x = 0 is a
solution. For any x > 0 we have 0 ≤ [x] ≤ x and 0 ≤ {x} < 1 which imply f (x) < x < 1991x. For x ≤ −1
we have 0 > [x] > x − 1 and 0 ≤ {x} < 1 which imply f (x) > x − 1 > 1991x. Finally, if −1 < x < 0, then
[x] = −1, {x} = x − [x] = x + 1 and f (x) = −x − 1. The only solution of the equation −x − 1 = 1991x is
1
x = − 1992 .
7. Let A, B, C be the angles of an acute-angled triangle. Prove the inequality

sin A + sin B > cos A + cos B + cos C.

1

Solution. In an acute-angled triangle we have A + B > π2 . Hence we have sin A > sin π2 − B = cos B and
sin B > cos A. Using these inequalities we get (1 − sin A)(1 − sin B) < (1 − cos A)(1 − cos B) and

sin A + sin B > cos A + cos B − cos A cos B + sin A sin B


= cos A + cos B − cos(A + B) = cos A + cos B + cos C.

8. Let a, b, c, d, e be distinct real numbers. Prove that the equation

(x − a)(x − b)(x − c)(x − d)


+ (x − a)(x − b)(x − c)(x − e)
+ (x − a)(x − b)(x − d)(x − e)
+ (x − a)(x − c)(x − d)(x − e)
+ (x − b)(x − c)(x − d)(x − e) = 0

has 4 distinct real solutions.


Solution. On the left-hand side of the equation we have the derivative of the function

f (x) = (x − a)(x − b)(x − c)(x − d)(x − e)

which is continuous and has five distinct real roots.


9. Find the number of solutions of the equation aex = x3 .
Solution. Studying the graphs of the functions aex and x3 it is easy to see that the equation always has
one solution if a ≤ 0 and can have 0, 1 or 2 solutions if a > 0. Moreover, in the case a > 0 the number of
solutions can only decrease as a increases and we have exactly one positive value of a for which the equation
has one solution — this is the case when the graphs of aex and x3 are tangent to each other, i.e., there exists
x0 such that aex0 = x30 and aex0 = 3x20 . From these two equations we get x0 = 3 and a = 27 e3 . Summarizing:
the equation aex = x3 has one solution for a ≤ 0 and a = 27 27
e3 , two solutions for 0 < a < e3 and no solutions
for a > 27
e3 .

10. Express the value of sin 3◦ in radicals.


Solution. We use the equality

sin 3◦ = sin (18◦ − 15◦ ) = sin 18◦ cos 15◦ + cos 18◦ sin 15◦

where
r √ √
◦ 30◦ 1 − cos 30◦ 6− 2
sin 15 = sin = =
2 2 4
and
p √ √
6+ 2
cos 15◦ = 1 − sin2 15◦ = .
4
To calculate cos 18◦ and sin 18◦ note that cos (3 · 18◦ ) = sin (2 · 18◦ ). As cos 3x = cos3 x − 3 cos x sin2 x =
cos x(1 − 4 sin2 x) and sin 2x = 2 sin x cos x we get 1 − 4 sin2 18◦ = 2 sin 18◦ . √
Solving this quadratic equation
√ √ √
5−1 − 5−1 10+2 5
yields sin 18◦ = 4 (we discard 4 which is negative) and cos 18◦ = 4 .
11. All positive integers from 1 to 1 000 000 are divided into two groups consisting of numbers with odd or even
sums of digits respectively. Which group contains more numbers?
Solution. Among any ten integers a1 . . . an 0, a1 . . . an 1, . . . , a1 . . . an 9 there are exactly five numbers with
odd digit sum and five numbers with even digit sum. Thus, among the integers 0, 1, . . . , 999 999 we have
equally many numbers of both kinds. After substituting 1 000 000 instead of 0 we shall have more numbers
with odd digit sum.
12. The vertices of a convex 1991-gon are enumerated with integers from 1 to 1991. Each side and diagonal of
the 1991-gon is coloured either red or blue. Prove that, for an arbitrary renumeration of vertices, one can
find integers k and l such that the line connecting vertices with numbers k and l before the renumeration
has the same colour as the line between the vertices having these numbers after the renumeration.

2
Solution. Assume there exists a renumeration such that for any numbers 1 ≤ k < l ≤ n the segment
connecting vertices numbered k and l before the renumeration has a different colour than the segment
connecting vertices with the same numbers after the renumeration. Then there has to be an equal number
of red and blue segments,
 and thus the total number of segments must be even. However, the number of
segments is 1991
2 = 995 · 1991, an odd number.
13. An equilateral triangle is divided into 25 congruent triangles enumerated with numbers from 1 to 25. Prove
that one can find two triangles having a common side and with the difference of the numbers assigned to
them greater than 3.
Solution. Define the distance between two small triangles to be the minimal number of steps one needs
to move from one of the triangles to the other (a step here means transition from one triangle to another
having a common side with it). The maximum distance between two small triangles is 8 and this maximum
is achieved if and only if one of these lies at a corner of the big triangle and the other lies anywhere at the
opposite side of it. Assume now that we have assigned the numbers 1, . . . , 25 to the small triangles so that
the difference of the numbers assigned to any two adjacent triangles does not exceed 3. Then the distance
between the triangles numbered 1 and 25; 1 and 24; 2 and 25; 2 and 24 must be equal to 8. However, this is
not possible since it implies that either the numbers 1 and 2 or 24 and 25 are assigned to the same “corner”
triangle.
14. A castle has a number of halls and n doors. Every door leads into another hall or outside. Every hall has at
least two doors. A knight enters the castle. In any hall, he can choose any door for exit except the one he
just used to enter that hall. Find a strategy allowing the knight to get outside after visiting no more than
2n halls (a hall is counted each time it is entered).
Solution. The knight can use the following strategy: exit from any hall through the door immediately to
the right of the one he used to enter that hall. Then, knowing which door was passed last and in which
direction we can uniquely restore the whole path of the knight up to that point. Therefore, he will not be
able to pass any door twice in the same direction unless he has been outside the castle in between.
15. In each of the squares of a chess board an arbitrary integer is written. A king starts to move on the board.
As the king moves, 1 is added to the number in each square it “visits”. Is it always possible to make the
numbers on the chess board:

(a) all even;


(b) all divisible by 3;
(c) all equal?
Solution. Figure 1 demonstrates a possible king’s path passing through each square exactly once and finally
returning to the initial square. Thus, it suffices to prove part (c) as we can always increase the numbers in
all the squares by 1 or 2 if necessary. Moreover, note that for any given square it is possible to modify the
path shown in Figure 1 in such a way that this particular square will be passed twice while any other square
will still be passed exactly once. Repeating this procedure a suitable number of times for each square we
can make all the numbers on the chess board equal.
16. Let two circles C1 and C2 (with radii r1 and r2 ) touch each other externally, and let l be their common
tangent. A third circle C3 (with radius r3 < min(r1 , r2 )) is externally tangent to the two given circles and
tangent to the line l. Prove that
1 1 1
√ = √ +√ .
r3 r1 r2

Solution. Let O1 , O2 , O3 be the centres of the circles C1 , C2 , C3 , respectively. Let P1 , P2 , P3 be the


perpendicular projections of O1 , O2 , O3 onto the line l and let Q be the perpendicular projection of O3 onto
the line P1 O1 (see Figure 2). Then |P1 P3 |2 = |QO3 |2 = |O1 O3 |2 − |QO1 |2 = (r1 + r3 )2 − (r1 − r3 )2 = 4r1 r3 .

Similarly we get |P1 P2 |2 = 4r1 r2 and |P2 P3 |2 = 4r2 r3 . Since |P1 P2 | = |P1 P3 | + |P2 P3 | we have r1 r2 =
√ √
r1 r3 + r2 r3 , which implies the required equality.

3
y
O2 q 6
O1 q O3 A
· q
j C
· · · B
P1 P3 P2 l -
O x
Figure 1 Figure 2 Figure 3

17. Let the coordinate planes have the reflection property. A beam falls onto one of them. How does the final
direction of the beam after reflecting from all three coordinate planes depend on its initial direction?
Solution. Let the velocity vector of the beam be ~v = (α, β, γ). Reflection from each of the coordinate planes
changes the sign of exactly one of the coordinates α, β and γ, and thus the final direction will be opposite
to the initial one.
1
18. Is it possible to put two tetrahedra of volume 2 without intersection into a sphere with radius 1?
Solution. No, it is not. Any tetrahedron that does not contain the centre of the sphere as an internal point
has a height drawn to one of its faces less than or equal to the radius of the sphere. As each of the

faces of
the tetrahedron is contained in a circle with radius not greater than 1, its area cannot exceed 3 4 3 . Thus,
√ √
the volume of such a tetrahedron must be less or equal than 13 · 1 · 3 4 3 = 43 < 12 .
19. Let’s expand a little bit three circles, touching each other externally, so that three pairs of intersection points
appear. Denote by A1 , B1 , C1 the three so obtained “external” points and by A2 , B2 , C2 the corresponding
“internal” points. Prove the equality

|A1 B2 | · |B1 C2 | · |C1 A2 | = |A1 C2 | · |C1 B2 | · |B1 A2 |.

Solution. First, note that the three straight lines A1 A2 , B1 B2 and C1 C2 intersect in a single point O.
Indeed, each of the lines is the locus of points from which the tangents to two of the circles are of equal
length (it is easy to check that this locus has the form of a straight line and obviously it contains the two
intersection points of the circles). Now, we have |OA1 | · |OA2 | = |OB1 | · |OB2 | (as both of these products are
equal to |OT |2 where OT is a tangent line to the circle containing A1 , A2 , B1 , B2 , and T is the corresponding
point of tangency). Hence |OA 1| |OB1 |
|OB2 | = |OA2 | which implies that the triangles OA1 B2 and OB1 A2 are similar
|A1 B2 | |B1 C2 | |C1 A2 |
and |A 2 B1 |
= |OA 1|
|OB1 | . Similarly we get |B2 C1 | = |OB1 |
|OC1 | and |C2 A1 | = |OC1 |
|OA1 | . Multiplying these three equalities
gives the desired result.

20. Consider two points A(x1 , y1 ) and B(x2 , y2 ) on the graph of the function y = x1 such that 0 < x1 < x2 and
|AB| = 2 · |OA| (O is the reference point, i.e., O(0, 0)). Let C be the midpoint of the segment AB. Prove
that the angle between the x-axis and the ray OA is equal to three times the angle between x-axis and the
ray OC.
  
Solution. We have A x1 , x11 , B x2 , x12 and C x1 +x 2
2
, 2x1 1 + 2x1 2 . Computing the coordinates of v̄ =
|OC| · AC + |AC| · OC we find that the vector v̄ — and hence also the bisector of the angle ∠OCA —
is parallel to the x-axis. Since |OA| = |AC| this yields ∠AOC = ∠ACO = 2 · ∠COx (see Figure 3) and
∠AOx = ∠AOC + ∠COx = 3 · ∠COx.

4
Baltic Way 1992

Vilnius, November 7, 1992

Problems and solutions

1. Let p and q be two consecutive odd prime numbers. Prove that p + q is a product of at least three positive
integers greater than 1 (not necessarily different).
Solution. Since q − p = 2k is even, we have p + q = 2(p + k). It is clear that p < p + k < p + 2k = q.
Therefore p + k is not prime and, consequently, is a product of two positive integers greater than 1.

2. Denote by d(n) the number of all positive divisors of a positive integer n (including 1 and n). Prove that
n
there are infinitely many n such that d(n) is an integer.
n −1
Solution. Consider numbers of the form pp where p is an arbitrary prime number and n = 1, 2, . . . .
3. Find an infinite non-constant arithmetic progression of positive integers such that each term is neither a
sum of two squares, nor a sum of two cubes (of positive integers).
Solution. For any natural number n, we have n2 ≡ 0 or n2 ≡ 1 (mod 4) and n3 ≡ 0 or n3 ≡ ±1 (mod 9).
Thus {36n + 3 | n = 1, 2, . . . } is a progression with the required property.
4. Is it possible to draw a hexagon with vertices in the knots of an integer lattice so that the squares of the
lengths of the sides are six consecutive positive integers?
Solution. The sum of any six consecutive positive integers is odd. On the other hand, the sum of the squares
of the lengths of the sides of the hexagon is equal to the sum of the squares of their projections onto the
two axes. But this number has the same parity as the sum of the projections themselves, the latter being
obviously even.
5. Given that a2 + b2 + (a + b)2 = c2 + d2 + (c + d)2 , prove that a4 + b4 + (a + b)4 = c4 + d4 + (c + d)4 .
2 
Solution. Use the identity a2 + b2 + (a + b)2 = 2 a4 + b4 + (a + b)4 .
k3 −1
6. Prove that the product of the 99 numbers of the form k3 +1 where k = 2, 3, . . . , 100, is greater than 23 .
Solution. Note that
k3 − 1 (k − 1)(k 2 + k + 1) (k − 1)(k 2 + k + 1)
= = .
k3 + 1 (k + 1)(k 2 − k + 1) (k + 1) (k − 1)2 + (k − 1) + 1

After obvious cancellations we get

Y
100 3
k −1 1 · 2 · (1002 + 100 + 1) 2
3
= 2
> .
k +1 100 · 101 · (1 + 1 + 1) 3
k=2

1992

7. Let a = 1992. Which number is greater:
·a
o
·
a· 1992
aa

or 1992?
Solution. The first of these numbers is less than
·1992
o ·1992
o
·
· ·
·
aa 1992 aa 1991
a =a = . . . = 1992.

8. Find all integers satisfying the equation 2x · (4 − x) = 2x + 4.


Solution. Since 2x must be positive, we have 2x+4
4−x > 0 yielding −2 < x < 4. Thus it suffices to check the
points −1, 0, 1, 2, 3. The three solutions are x = 0, 1, 2.

1
9. A polynomial f (x) = x3 + ax2 + bx + c is such that b < 0 and ab = 9c. Prove that the polynomial has three
different real roots.
Solution. Consider the derivative f ′ (x) = 3x2 + 2ax + b. Since b < 0, it has two real roots x1 and x2 .
Since f (x) → ±∞ as x → ±∞, it is sufficient to check that f (x1 ) and f (x2 ) have different signs, i.e.,
f (x1 )f (x2 ) < 0. Dividing f (x) by f ′ (x) and using the equality ab = 9c we find that the remainder is equal
to x( 23 b − 29 a2 ). Now, as x1 x2 = 3b < 0 we have f (x1 )f (x2 ) = x1 x2 ( 23 b − 29 a2 )2 < 0.
10. Find all fourth degree polynomials p(x) such that the following four conditions are satisfied:
(i) p(x) = p(−x) for all x.
(ii) p(x) ≥ 0 for all x.
(iii) p(0) = 1.
(iv ) p(x) has exactly two local minimum points x1 and x2 such that |x1 − x2 | = 2.
Solution. Let p(x) = ax4 + bx3 + cx2 + dx + e with a 6= 0. From (i)–(iii) we get b = d = 0, a > 0 and e = 1.
From (iv ) it follows that p′ (x) = 4ax3 + 2cx p has at least two different real roots. Since a > 0, we have

c < 0 and
p p (x) has three
p roots x = 0, x = ± −c/(2a). The minimum points mentioned in (iv ) must be
x = ± −c/(2a), so 2 −c/(2a) = 2 and c = −2a. Finally, by (ii) we have p(x) = a(x2 − 1)2 + 1 − a ≥ 0
for all x, which implies 0 < a ≤ 1. It is easy to check that every such polynomial satisfies the conditions
(i)–(iv ).
11. Let Q+ denote the set of positive rational numbers. Show that there exists one and only one function
f : Q+ → Q+ satisfying the following conditions:
q

(i) If 0 < q < 12 then f (q) = 1 + f 1−2q .
(ii) If 1 < q ≤ 2 then f (q) = 1 + f (q − 1).

(iii) f (q) · f 1q = 1 for all q ∈ Q+ .

Solution. By condition (iii) we have f (1) = 1. Applying condition (iii) to each of (i) and (ii) gives two
new conditions (i ′ ) and (ii ′ ) taking care of q > 2 and 12 ≤ q < 1 respectively. Now, for any rational number
a ′ ′ a
 a′
 ′ ′
b 6= 1 we can use (i), (i ), (ii) or (ii ) to express f b in terms of f b′ where a + b < a + b. The recursion
therefore finishes in a finite number of steps, when we can use f (1) = 1. Thus we have established that such
a function f exists, and is uniquely determined by the given conditions.
Remark. Initially it was also required to determine all fixed points of the function f , i.e., all solutions q
of the equation f (q) = q, but the Jury of the contest decided to simplify the problem. Here we present
a solution. First note that if q is a fixed point, then so is 1q . By (i), if 0 < q < 12 is a fixed point, then
q

f 1−2q = q − 1 < 0 which is impossible, so there are no fixed points 0 < q < 12 or q > 2. Now, for a fixed
point 1 < ab ≤ 2 (ii) easily gives us that ab − 1 = a−b b
b and a−b are fixed points too. It is easy to see that
b b
1 ≤ a−b ≤ 2 (the latter holds because a−b is a fixed point). As the sum of the numerator and denominator
of the new fixed point is strictly less than a + b we can continue in this manner until, in a finite number of
steps, we arrive at the fixed point 1. By reversing the process, any fixed point q > 1 can be constructed by
repeatedly using the condition that if ab > 1 is a fixed point then so is a+ba , starting with a = b = 1. It is
now an easy exercise to see that these fixed points have the form FFn+1 n
where {Fn }n∈N is the sequence of
Fibonacci numbers.
12. Let N denote the set of positive integers. Let ϕ : N → N be a bijective function and assume that there exists
a finite limit
ϕ(n)
lim = L.
n→∞ n
What are the possible values of L?
Solution. In this solution we allow L to be ∞ as well. We show that L = 1 is the only possible value.
Assume that L > 1. Then there exists a number N such that for any n ≥ N we have ϕ(n) n > 1 and thus
ϕ(n) ≥ n + 1 ≥ N + 1. But then ϕ cannot be bijective, since the numbers 1, 2, . . . , N − 1 cannot be
bijectively mapped onto 1, 2, . . . , N .
Now assume that L < 1. Since ϕ is bijective we clearly have ϕ(n) → ∞ as n → ∞. Then
ϕ−1 (n) ϕ−1 (ϕ(n)) n 1
lim = lim = lim = > 1,
n→∞ n n→∞ ϕ(n) n→∞ ϕ(n) L

2
ϕ−1 (n) 1
i.e., lim n > 1, which is a contradiction since ϕ−1 is also bijective. (When L = 0 we interpret L
n→∞
as ∞).
13. Prove that for any positive x1 , x2 , . . . , xn and y1 , y2 , . . . , yn the inequality
Xn
1 4n2
≥ P
n
xy
i=1 i i (xi + yi )2
i=1

holds.
Solution. Since (xi + yi )2 ≥ 4xi yi , it is sufficient to prove that
Xn
1 X
n 
xi yi ≥ n2 .
xy
i=1 i i i=1

1
This can easily be done by induction using the fact that a + a ≥ 2 for any a > 0. It also follows directly
from the Cauchy-Schwarz inequality.
14. There is a finite number of towns in a country. They are connected by one direction roads. It is known
that, for any two towns, one of them can be reached from the other one. Prove that there is a town such
that all the remaining towns can be reached from it.
Solution. Consider a town A from which a maximal number of towns can be reached. Suppose there is a
town B which cannot be reached from A. Then A can be reached from B and so one can reach more towns
from B than from A, a contradiction.

15. Noah has to fit 8 species of animals into 4 cages of the ark. He plans to put species in each cage. It turns
out that, for each species, there are at most 3 other species with which it cannot share the accommodation.
Prove that there is a way to assign the animals to their cages so that each species shares a cage with
compatible species.
Solution. Start assigning the species to cages in an arbitrary order. Since for each species there are at most
three species incompatible with it, we can always add it to one of the four cages.
Remark. Initially the problem was posed as follows: “. . . He plans to put two species in each cage. . . ”
Because of a misprint the word “two” disappeared, and the problem became trivial. We give a solution to
the original problem. Start with the distribution obtained above. If in some cage A there are more than
three species, then there is also a cage B with at most one species and this species is compatible with at
least one species in cage A, which we can then transfer to cage B. Thus we may assume that there are at
most three species in each cage. If there are two cages with 3 species, then we can obviously transfer one of
these 6 species to one of the remaining two cages. Now, assume the four cages contain 1, 2, 2 and 3 species
respectively. If the species in the first cage is compatible with one in the fourth cage, we can transfer that
species to the first cage, and we are done. Otherwise, for an arbitrary species X in the fourth cage there
exists a species compatible with it in either the second or the third cage. Transfer the other species from
that cage to the first cage, and then X to that cage.
16. All faces of a convex polyhedron are parallelograms. Can the polyhedron have exactly 1992 faces?
Solution. No, it cannot. Let us call a series of faces F1 , F2 , . . . , Fk a ring if the pairs (F1 , F2 ), (F2 , F3 ), . . . ,
(Fk−1 , Fk ), (Fk , F1 ) each have a common edge and all these common edges are parallel. It is not difficult
to see that any two rings have exactly two common faces and, conversely, each face  belongs to exactly two
rings. Therefore, if there are n rings then the total number of faces must be 2 n2 = n(n − 1). But there is
no positive integer n such that n(n − 1) = 1992.
Remark. The above solution, which is the only one proposed that is known to us, is not correct. For
a counterexample, consider a cube with side 2 built up of four unit cubes, and take the polyhedron with
24 faces built up of the faces of the unit cubes that face the outside. This polyhedron has rings that do not
have any faces in common. Moreover, by subdividing faces into rectangles sufficiently many times, we can
obtain a polyhedron with 1992 faces.
17. Quadrangle ABCD is inscribed in a circle with radius 1 in such a way that one diagonal, AC, is a diameter
of the circle, while the other diagonal, BD, is as long as AB. The diagonals intersect in P . It is known that
the length of P C is 52 . How long is the side CD?

3
B B
B Ap
p
C1 C2
p p
A C K L D t E
P O
D C pp
A M C F1 F2
Figure 1 Figure 2 Figure 3

Solution. Let ∠ACD = 2α (see Figure 1). Then ∠CAD = π2 − 2α, ∠ABD = 2α, ∠ADB = π
2 − α and
∠CDB = α. The sine theorem applied to triangles DCP and DAP yields

|DP | 2
=
sin 2α 5 sin α
and
|DP | 8
π
= π
.
sin 2 − 2α 5 sin 2 −α

Combining these equalities we have


2 sin 2α 8 cos 2α
= ,
5 sin α 5 cos α
1
which gives 4 sin α cos2 α = 8 cos 2α sin α and cos 2α + 1 = 4 cos 2α. So we get cos 2α = 3 and |CD| =
2 cos 2α = 32 .
18. Show that in a non-obtuse triangle the perimeter of the triangle is always greater than two times the diameter
of the circumcircle.
Solution. Let K, L, M be the midpoints of the sides AB, BC, AC of a non-obtuse triangle ABC (see
Figure 2). Note that the centre O of the circumcircle is inside the triangle KLM (or at one of its vertices if
ABC is a right-angled triangle). Therefore |AK|+|KL|+|LC| > |AO|+|OC| and hence |AB|+|AC|+|BC| >
2(|AO| + |OC|) = 2d, where d is the diameter of the circumcircle.
19. Let C be a circle in the plane. Let C1 and C2 be non-intersecting circles touching C internally at points
A and B respectively. Let t be a common tangent of C1 and C2 , touching them at points D and E
respectively, such that both C1 and C2 are on the same side of t. Let F be the point of intersection of
AD and BE. Show that F lies on C.
Solution. Let F1 be the second intersection point of the line AD and the circle C (see Figure 3). Consider
the homothety with centre A which maps D onto F1 . This homothety maps the circle C1 onto C and the
tangent line t of C1 onto the tangent line of the circle C at F1 . Let us do the same with the circle C2 and the
line BE: let F2 be their intersection point and consider the homothety with centre B, mapping E onto F2 ,
C2 onto C and t onto the tangent of C at point F2 . Since the tangents of C at F1 and F2 are both parallel
to t, they must coincide, and so must the points F1 and F2 .
20. Let a ≤ b ≤ c be the sides of a right triangle, and let 2p be its perimeter. Show that

p(p − c) = (p − a)(p − b) = S,

where S is the area of the triangle.


Solution. By straightforward computation, we find:
1  ab
p(p − c) = (a + b)2 − c2 = = S,
4 2
1  ab
(p − a)(p − b) = c2 − (a − b)2 = = S.
4 2

4
Baltic Way 1993

Riga, November 13, 1993

Problems and solutions

1. a1 a2 a3 and a3 a2 a1 are two three-digit decimal numbers, with a1 , a3 being different non-zero digits. The
squares of these numbers are five-digit numbers b1 b2 b3 b4 b5 and b5 b4 b3 b2 b1 respectively. Find all such three-
digit numbers.
Solution. Assume a1 > a3 > 0. As the square of a1 a2 a3 must be a five-digit number we have a1 ≤ 3. Now
a straightforward case study shows that a1 a2 a3 can be 301, 311, 201, 211 or 221.
2. Do there exist positive integers a > b > 1 such that for each positive integer k there exists a positive
integer n for which an + b is a kth power of a positive integer?
Solution. Let a = 6, b = 3 and denote xn = an + b. Then we have xl · xm = x6lm+3(l+m)+1 for any natural
numbers l and m. Thus, any powers of the numbers xn belong to the same sequence.
3. Let’s call a positive integer “interesting” if it is a product of two (distinct or equal) prime numbers. What
is the greatest number of consecutive positive integers all of which are “interesting”?
Solution. The three consecutive numbers 33 = 3 · 11, 34 = 2 · 17 and 35 = 5 · 7 are all “interesting”. On the
other hand, among any four consecutive numbers there is one of the form 4k which is “interesting” only if
k = 1. But then we have either 3 or 5 among the four numbers, neither of which is “interesting”.
4. Determine all integers n for which
s r s r
25 625 25 625
+ −n+ − −n
2 4 2 4
is an integer.
Solution. Let
s r s r q
25 625 25 625 √
p= + −n+ − − n = 25 + 2 n.
2 4 2 4
2 2
Then n = p −25 2 and obviously p is an odd number not less than 5. If p ≥ 9 then n > 625
4 and the
initial expression would be undefined. The two remaining values p = 5 and p = 7 give n = 0 and n = 144
respectively.
5. Prove that for any odd positive integer n, n12 − n8 − n4 + 1 is divisible by 29 .
Solution. Factorizing the expression, we get
n12 − n8 − n4 + 1 = (n4 + 1)(n2 + 1)2 (n − 1)2 (n + 1)2 .
Now note that one of the two even numbers n − 1 and n + 1 is divisible by 4.
6. Suppose two functions f (x) and g(x) are defined for all x such that 2 < x < 4 and satisfy 2 < f (x) < 4,
2 < g(x) < 4, f (g(x)) = g(f (x)) = x and f (x) · g(x) = x2 for all such values of x. Prove that f (3) = g(3).
f (x) x2 x f (x)
Solution. Let h(x) = x . Then we have g(x) = f (x) = h(x) and g(f (x)) = h(f (x)) = x which yields
f (x) (k)
h(f (x)) = x= h(x). Using induction we easily get h(f (x)) = h(x) for any natural number k where
f (k) (x) denotes f (f (. . . f (x) . . .)). Now
| {z }
k

f (k+1) (x) = f (f (k) (x)) = f (k) (x) · h(f (k) (x)) = f (k) (x) · h(x)
f (k+1) (x)
and f (k) (x)
= h(x) for any natural number k. Thus

f (k) (x) f (k) (x) f (x)


= (k−1) · ···· = (h(x))k
x f (x) x
(k) 
and f 3(3) = (h(3))k ∈ 23 , 43 for all k. This is only possible if h(3) = 1 and thus f (3) = g(3) = 3.

1
7. Solve the system of equations in integers:
 x

 z =y
2x

2z = 4x


x + y + z = 20.

Solution. From the second and third equation we find z = 2x and x = 20−y 3 . Substituting these into
40−2y x
 2 x 0
the first equation yields 3 = (y ) . As x 6= 0 (otherwise we have 0 in the first equation which is
usually considered undefined) we have y 2 = ± 40−2y 3 (the ‘−’ case occurring only if x is even). The equation
y 2 = − 40−2y
3 has no integer solutions; from y 2
= 40−2y
3 we get y = −4, x = 8, z = 16 (the other solution
y = 10
3 is not an integer).
Remark. If we accept the definition 00 = 1, then we get the additional solution x = 0, y = 20, z = 0.
Defining 00 =0 gives no additional solution.
8. Compute the sum of all positive integers whose digits form either a strictly increasing or a strictly decreasing
sequence.
Solution. Denote by I and D the sets of all positive integers with strictly increasing (respectively, decreasing)
sequence of digits. Let D0 , D1 , D2 and D3 be the subsets of D consisting of all numbers starting with 9,
not starting with 9, ending in 0 and not ending in 0, respectively. Let S(A) denote the sum of all numbers
belonging to a set A. All numbers in I are obtained  from the number 123456789 by deleting some of its
digits. Thus, for any k = 0, 1, . . . , 9 there are k9 k-digit numbers in I (here we consider 0 a 0-digit number).
Every k-digit number a ∈ I can be associated with a unique number b0 ∈ D0 , b1 ∈ D1 and b3 ∈ D3 such
that
a + b0 = 999 . . . 9 = 10k+1 − 1,
a + b1 = 99 . . . 9 = 10k − 1,
10
a + b3 = 111 . . . 10 = (10k − 1).
9
Hence we have
X9  
9
S(I) + S(D0 ) = (10k+1 − 1) = 10 · 119 − 29 ,
k
k=0
X9  
9
S(I) + S(D1 ) = (10k − 1) = 119 − 29 ,
k
k=0
10
S(I) + S(D3 ) = (119 − 29 ).
9

Noting that S(D0 ) + S(D1 ) = S(D2 ) + S(D3 ) = S(D) and S(D2 ) = 10S(D3 ) we obtain the system of
equations

 2S(I) + S(D) = 1110 − 210
 S(I) + 1 S(D) = 10 (119 − 29 )
11 9
which yields
80 35 10
S(I) + S(D) = · 1110 − ·2 .
81 81
This sum contains all one-digit numbers twice, so the final answer is
80 35 10
· 1110 − · 2 − 45 = 25617208995.
81 81
9. Solve the system of equations:
 5

 x = y + y5


 y5 = z + z 5

 z 5 = t + t5


 5
t = x + x5 .

2
Solution. Adding all four equations we get x + y + z + t = 0. On the other hand, the numbers x, y, z, t are
simultaneously positive, negative or equal to zero. Thus, x = y = z = t = 0 is the only solution.

10. Let a1 , a2 , . . . , an and b1 , b2 , . . . , bn be two finite sequences consisting of 2n different real numbers.
Rearranging each of the sequences in the increasing order we obtain a′1 , a′2 , . . . , a′n and b′1 , b′2 , . . . , b′n . Prove
that

max |ai − bi | ≥ max |a′i − b′i |.


1≤i≤n 1≤i≤n

Solution. Let m be such index that |a′m − b′m | = max1≤i≤n |a′i − b′i | = c. Without loss of generality we may
assume a′m > b′m . Consider the numbers a′m , a′m+1 , . . . , a′n and b′1 , b′2 , . . . , b′m . As there are n + 1 numbers
altogether and only n places in the initial sequence there must exist an index j such that we have aj among
a′m , a′m+1 , . . . , a′n and bj among b′1 , b′2 , . . . , b′m . Now, as bj ≤ b′m < a′m ≤ aj we have |aj −bj | ≥ |a′m −b′m| = c
and max1≤i≤n |ai − bi | ≥ c = max1≤i≤n |a′i − b′i |.
11. An equilateral triangle is divided into n2 congruent equilateral triangles. A spider stands at one of the
vertices, a fly at another. Alternately each of them moves to a neighbouring vertex. Prove that the spider
can always catch the fly.
Solution. Assume that the big triangle lies on one of its sides. Then a suitable strategy for the spider will
be as follows:
(1) First, move to the lower left vertex of the big triangle.
(2) Then, as long as the fly is higher than the spider, move upwards along the left side of the big triangle.
(3) After reaching the horizontal line where the fly is, retain this situation while moving to the right (more
precisely: move “right”, “right and up” or “right and down” depending on the last move of the fly).
12. There are 13 cities in a certain kingdom. Between some pairs of cities two-way direct bus, train or plane
connections are established. What is the least possible number of connections to be established in order
that choosing any two means of transportation one can go from any city to any other without using the
third kind of vehicle?
Solution. An example for 18 connections is shown in Figure 1 (where single, double and dashed lines denote
the three different kinds of transportation). On the other hand, a connected graph with 13 vertices has at
least 12 edges, so the total number of connections for any two kinds of vehicle is at least 12. Thus, twice
the total number of all connections is at least 12 + 12 + 12 = 36.
c
c c
c c
t
c c c t
t
t
c c t
t
c c t
c
Figure 1 Figure 2

13. An equilateral triangle ABC is divided into 100 congruent equilateral triangles. What is the greatest number
of vertices of small triangles that can be chosen so that no two of them lie on a line that is parallel to any
of the sides of the triangle ABC?
Solution. An example for 7 vertices is shown in Figure 2. Now assume we have chosen 8 vertices satisfying
the conditions of the problem. Let the height of each small triangle be equal to 1 and denote by ai , bi , ci
the distance of the ith point from the three sides of the big triangle. For any i = 1, 2, . . . , 8 we then have
ai , bi , ci ≥ 0 and ai + bi + ci = 10. Thus, (a1 + a2 + · · · + a8 ) + (b1 + b2 + · · · + b8 ) + (c1 + c2 + · · · + c8 ) = 80.
On the other hand, each of the sums in the brackets is not less than 0 + 1 + · · · + 7 = 28, but 3 · 28 = 84 > 80,
a contradiction.

3
14. A square is divided into 16 equal squares, obtaining the set of 25 different vertices. What is the least number
of vertices one must remove from this set, so that no 4 points of the remaining set are the vertices of any
square with sides parallel to the sides of the initial square?
Remark. The proposed solution to this problem claimed that it is enough to remove 7 vertices but the
example to demonstrate this appeared to be incorrect. Below we show that removing 6 vertices is not
sufficient but removing 8 vertices is. It seems that removing 7 vertices is not sufficient but we currently
know no potential way to prove this, apart from a tedious case study.
Solution. The example in Figure 3a demonstrates that it suffices to remove 8 vertices to “destroy” all
squares. Assume now that we have managed to do that by removing only 6 vertices. Denote the horizontal
and vertical lines by A, B, . . . , E and 1, 2, . . . , 5 respectively. Obviously, one of the removed vertices must
be a vertex of the big square — let this be vertex A1. Then, in order to “destroy” all the squares shown in
Figure 3b–e we have to remove vertices B2, C3, D4, D2 and B4. Thus we have removed 6 vertices without
having any choice but a square shown in Figure 3f is still left intact.

1 2 3 4 5
A b b b b b b
B b b b r b b b r b b
C b b r b b b
D b b r r b b b
E
a b c d e f
Figure 3

15. On each face of two dice some positive integer is written. The two dice are thrown and the numbers on the
top faces are added. Determine whether one can select the integers on the faces so that the possible sums
are 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, all equally likely?
Solution. We can write 1, 2, 3, 4, 5, 6 on the sides of one die and 1, 1, 1, 7, 7, 7 on the sides of the other.
Then each of the 12 possible sums appears in exactly 3 cases.
16. Two circles, both with the same radius r, are placed in the plane without intersecting each other. A
line in the plane intersects the first circle at the points A, B and the other at the points C, D so that
|AB| = |BC| = |CD| = 14 cm. Another line intersects the circles at points E, F and G, H respectively, so
that |EF | = |F G| = |GH| = 6 cm. Find the radius r.
Solution. First, note that the centres O1 and O2 of the two circles lie on different sides of the line EH —
otherwise we have r < 12 and AB cannot be equal to 14. Let P be the intersection point of EH and O1 O2
(see Figure 4). Points A and D lie on the same side of the line O1 O2 (otherwise the three lines AD, EH
and O1 O2 would intersect in P and |AB| = |BC| = |CD|, |EF | = |F G| = |GH| would imply |BC| = |F G|,
a contradiction). It is easy to see that |O1 O2 | = 2 · |O1 P | = |AC| = 28 cm. Let h = |O1 T | be the height
of triangle O1 EP . Then we have h2 = 142 − 62 = 160 from triangle O1 T P and r2 = h2 + 32 = 169 from
triangle O1 T F . Thus r = 13 cm.

A
q
B
qq
C
q
D
q r


E ·q T
q F q q+P q
O1
qG
O2 r r
qH
J
J
^
Figure 4 Figure 5

17. Let’s consider three pairwise non-parallel straight lines in the plane. Three points are moving along these
lines with different non-zero velocities, one on each line (we consider the movement as having taken place
for infinite time and continuing infinitely in the future). Is it possible to determine these straight lines, the
velocities of each moving point and their positions at some “zero” moment in such a way that the points
never were, are or will be collinear?
Solution. Yes, it is. First, place the three points at the vertices of an equilateral triangle at the “zero”
moment and let them move with equal velocities along the straight lines determined by the sides of the

4
triangle as shown in Figure 5. Then, at any moment in the past or future, the points are located at the
vertices of some equilateral triangle, and thus cannot be collinear. Finally, to make the velocities of the
points also differ, take any non-zero constant vector such that its projections on the three lines have different
lengths and add it to each of the velocity vectors. This is equivalent to making the whole picture “drift”
across the plane with constant velocity, so the non-collinearity of our points is preserved (in fact, they are
still located at the vertices of an equilateral triangle at any given moment).
18. In the triangle ABC we have |AB| = 15, |BC| = 12 and |AC| = 13. Let the median AM and bisector BK
intersect at point O, where M ∈ BC, K ∈ AC. Let OL⊥AB, where L ∈ AB. Prove that ∠OLK = ∠OLM .
|AP | |AK|
Solution. Let the line OC intersect AB in point P . As AM is a median, we have |P B| = |KC| (this
obviously holds if |AB| = |AC| and the equality is preserved under uniform compression of the plane
|AP | |AK| |AB| 5
along BK). Applying the sine theorem to the triangles ABK and BCK we obtain |P B| = |KC| = |BC| = 4
25 20 2 2
(see Figure 6). As |AP | + |P B| = |AB| = 15, we have |AP | = 3 and |P B| = 3 . Thus |AC| − |BC| =
25 = |AP |2 − |BP |2 and |AC|2 − |AP |2 = |BC|2 − |BP |2 . Applying now the cosine theorem to the triangles
AP C and BP C we get cos ∠AP C = cos ∠BP C, i.e., P = L. As above, we can use a compression of the
plane to show that KP k BC and therefore ∠OP K = ∠OCB. As |BM | = |M C| and ∠BP C = 90◦ we have
∠OCB = ∠OP M . Combining these equalities, we get ∠OLK = ∠OP K = ∠OCB = ∠OP M = ∠OLM .

B B B

P
O M ·· O
A C
O C
A
·
A K C D D
Figure 6 Figure 7 Figure 8

19. A convex quadrangle ABCD is inscribed in a circle with the centre O. The angles ∠AOB, ∠BOC, ∠COD
and ∠DOA, taken in some order, are of the same size as the angles of quadrangle ABCD. Prove that
ABCD is a square.
Solution. As the quadrangle ABCD is inscribed in a circle, we have ∠ABC + ∠CDA = ∠BCD + ∠DAB =
180◦ . It suffices to show that if each of these angles is equal to 90◦ , then each of the angles AOB, BOC,
COD and DOA is also equal to 90◦ and thus ABCD is a square. We consider the two possible situations:
(a) At least one of the diagonals of ABCD is a diameter — say, ∠AOB + ∠BOC = 180◦ . Then ∠ABC =
∠CDA = 90◦ and at least two of the angles AOB, BOC, COD and DOA must be 90◦ : say, ∠AOB =
∠BOC = 90◦ . Now, ∠COD = ∠DAB and ∠DOA = ∠BCD (see Figure 7). Using the fact that
1 ◦ ◦
2 ∠DOA = ∠DCA = ∠BCD − 45 we have ∠BCD = ∠DAB = 90 .
(b) None of the diagonals of the quadrangle ABCD is a diameter. Then ∠AOB + ∠COD = ∠BOC +
∠DOA = 180◦ and no angle of the quadrangle ABCD is equal to 90◦ . Consequently, none of the angles
AOB, BOC, COD and DOA is equal to 90◦ . Without loss of generality we assume that ∠AOB > 90◦ ,
∠BOC > 90◦ (see Figure 8). Then ∠ABC < 90◦ and thus ∠ABC = ∠COD or ∠ABC = ∠DOA.
As ∠COD + ∠DOA = ∠AOC = 2∠ABC, we have ∠COD = ∠DOA and ∠AOB + ∠DOA = 180◦, a
contradiction.
20. Let Q be a unit cube. We say a tetrahedron is “good” if all its edges are equal and all its vertices lie on the
boundary of Q. Find all possible volumes of “good” tetrahedra.
Solution. Clearly, the volume of a regular tetrahedron contained in a sphere reaches its maximum value
if and only if all four vertices of the tetrahedron lie on the surface of the sphere. Therefore, a “good”
tetrahedron with maximum volume must have its vertices at the vertices of the cube (for a proof, inscribe
the cube in a sphere). There are exactly two such tetrahedra, their volume being equal to 1 − 4 · 16 = 13 .
On the other hand, one can find arbitrarily small “good” tetrahedra by applying homothety to the maximal
tetrahedron, with the centre of the homothety in one of its vertices.

5
Baltic Way 1994

Tartu, November 11, 1994

Problems and solutions

1. Let a ◦ b = a + b − ab. Find all triples (x, y, z) of integers such that (x ◦ y) ◦ z + (y ◦ z) ◦ x + (z ◦ x) ◦ y = 0.


Solution. Note that

(x ◦ y) ◦ z = x + y + z − xy − yz − xz + xyz = (x − 1)(y − 1)(z − 1) + 1.

Hence

(x ◦ y) ◦ z + (y ◦ z) ◦ x + (z ◦ x) ◦ y = 3 (x − 1)(y − 1)(z − 1) + 1 .

Now, if the required equality holds we have (x − 1)(y − 1)(z − 1) = −1. There are only four possible
decompositions of −1 into a product of three integers. Thus we have four such triples, namely (0, 0, 0),
(0, 2, 2), (2, 0, 2) and (2, 2, 0).
2. Let a1 , a2 , . . . , a9 be any non-negative numbers such that a1 = a9 = 0 and at least one of the numbers
is non-zero. Prove that for some i, 2 ≤ i ≤ 8, the inequality ai−1 + ai+1 < 2ai holds. Will the statement
remain true if we change the number 2 in the last inequality to 1.9?
Solution. Suppose we have the opposite inequality ai−1 + ai+1 ≥ 2ai for all i = 2, . . . , 8. Let ak = max ai .
1≤i≤9
Then we have ak−1 = ak+1 = ak , ak−2 = ak−1 = ak , etc. Finally we get a1 = ak , a contradiction.
Suppose now ai−1 + ai+1 ≥ 1.9ai , i.e., ai+1 ≥ 1.9ai − ai−1 for all i = 2, . . . , 8, and let ak = max ai . We
1≤i≤9
can multiply all numbers a1 , . . . , a9 by the same positive constant without changing the situation in any
way, so we assume ak = 1. Then we have ak−1 + ak+1 ≥ 1.9 and hence 0.9 ≤ ak−1 , ak+1 ≤ 1. Moreover,
at least one of the numbers ak−1 , ak+1 must be greater than or equal to 0.95 — let us assume ak+1 ≥ 0.95.
Now, we consider two sub-cases:
(a) k ≥ 5. Then we have

1 ≥ ak+1 ≥ 0.95 > 0,


1 ≥ ak+2 ≥ 1.9ak+1 − ak ≥ 1.9 · 0.95 − 1 = 0.805 > 0,
ak+3 ≥ 1.9ak+2 − ak+1 ≥ 1.9 · 0.805 − 1 = 0.5295 > 0,
ak+4 ≥ 1.9ak+3 − ak+2 ≥ 1.9 · 0.5295 − 1 = 0.00605 > 0.

So in any case we have a9 > 0, a contradiction.


(b) k ≤ 4. In this case we obtain

1 ≥ ak−1 ≥ 0.9 > 0,


ak−2 ≥ 1.9ak−1 − ak ≥ 1.9 · 0.9 − 1 = 0.71 > 0,
ak−3 ≥ 1.9ak−2 − ak−1 ≥ 1.9 · 0.71 − 1 = 0.349 > 0,

and hence a1 > 0, contrary to the condition of the problem.


3. Find the largest value of the expression
p p p
xy + x 1 − y 2 + y 1 − x2 − (1 − x2 )(1 − y 2 ).

Solution. The expression is well-defined only for |x|, |y| ≤ 1 and we can assume that x, y ≥ 0. Let x = cos α
and y = cos β for some 0 ≤ α, β ≤ π2 . This reduces the expression to

cos α cos β + cos α sin β + cos β sin α − sin α sin β = cos(α + β) + sin(α + β) = 2 · sin (α + β + π4 )
√ π π π
which does not exceed 2. The equality holds when α + β + 4 = 2, for example when α = 4 and β = 0,

i.e., x = 22 and y = 1.

1
√ √
4. Is there an integer n such that n−1+ n + 1 is a rational number?
Solution. Inverting the relation gives
√ √ √ √
q 1 n+1− n−1 n+1− n−1
= √ √ = √ √ √ √ = .
p n+1+ n−1 ( n + 1 + n − 1)( n + 1 − n − 1) 2

Hence we get the system of equations


√ √ p

 n+1+ n−1=
 q

 √ √ 2q
 n+1− n−1= .
p
√ 2q2 +p2
Adding these equations and dividing by 2 gives n+1= 2pq . This implies 4np2 q 2 = 4q 4 + p4 .
Suppose now that n, p and q are all positive integers with p and q relatively prime. The relation 4np2 q 2 =
4q 4 + p4 shows that p4 , and hence p, is divisible by 2. Letting p = 2P we obtain 4nP 2 q 2 = q 4 + 4P 4 which
shows that q must also be divisible by 2. This contradicts the assumption that p and q are relatively prime.
5. Let p(x) be a polynomial with integer coefficients such that both equations p(x) = 1 and p(x) = 3 have
integer solutions. Can the equation p(x) = 2 have two different integer solutions?
Solution. Observe first that if a and b are two different integers then p(a)− p(b) is divisible by a− b. Suppose
now that p(a) = 1 and p(b) = 3 for some integers a and b. If we have p(c) = 2 for some integer c, then
c − b = ±1 and c − a = ±1, hence there can be at most one such integer c.
6. Prove that any irreducible fraction pq , where p and q are positive integers and q is odd, is equal to a fraction
n
2k −1
for some positive integers n and k.
Solution. Since the number of congruence classes modulo q is finite, there exist two non-negative integers
i and j with i > j which satisfy 2i ≡ 2j (mod q). Hence, q divides the number 2i − 2j = 2j (2i−j − 1). Since
q is odd, q has to divide 2i−j − 1. Now it suffices to multiply the numerator and denominator of the fraction
p 2i−j −1
q by q .
m
7. Let p > 2 be a prime number and 1 + 213 + 313 + · · · + (p−1)
1
3 = n where m and n are relatively prime. Show
that m is a multiple of p.
Solution. The sum has an even number of terms; they can be joined in pairs in such a way that the sum is
the sum of the terms
1 1 p3 − 3p2 k + 3pk 2
+ = .
k3 (p − k)3 k 3 (p − k)3
The sum of all terms of this type has a denominator in which every prime factor is less than p while the
numerator has p as a factor.
8. Show that for any integer a ≥ 5 there exist integers b and c, c ≥ b ≥ a, such that a, b, c are the lengths of
the sides of a right-angled triangle.
Solution. We first show this for odd numbers a = 2i + 1 ≥ 3. Put c = 2k + 1 and b = 2k. Then
c2 − b2 = (2k + 1)2 − (2k)2 = 4k + 1 = a2 . Now a = 2i + 1 and thus a2 = 4i2 + 4i + 1 and k = i2 + i.
Furthermore, c > b = 2i2 + 2i > 2i + 1 = a.
Since any multiple of a Pythagorean triple (i.e., a triple of integers (x, y, z) such that x2 + y 2 = z 2 ) is also
a Pythagorean triple we see that the statement is also true for all even numbers which have an odd factor.
Hence only the powers of 2 remain. But for 8 we have the triple (8, 15, 17) and hence all higher powers of 2
are also minimum values of such a triple.
9. Find all pairs of positive integers (a, b) such that 2a + 3b is the square of an integer.
Solution. Considering the equality 2a + 3b = n2 modulo 3 it is easy to see that a must be even. Obviously
n is odd so we may take a = 2x, n = 2y + 1 and write the equality as 4x + 3b = (2y + 1)2 = 4y 2 + 4y + 1.
Hence 3b ≡ 1 (mod 4) which implies b = 2z for some positive integer z. So we get 4x + 9z = (2y + 1)2 and
4x = (2y + 1 − 3z )(2y + 1 + 3z ). Both factors on the right-hand side are even numbers but at most one of
them is divisible by 4 (since their sum is not divisible by 4). Hence 2y + 1 − 3z = 2 and 2y + 1 + 3z = 22x−1 .
These two equalities yield 2 · 3z = 22x−1 − 2 and 3z = 4x−1 − 1. Clearly x > 1 and a simple argument

2
modulo 10 gives z = 4d + 1, x − 1 = 2e + 1 for some non-negative integers d and e. Substituting, we get
34d+1 = 42e+1 − 1 and 3 · (80 + 1)d = 42e+1 − 1. If d ≥ 1 then e ≥ 1, a contradiction (expanding the left-hand
expression and moving everything to the left we find that all summands but one are divisible by 42 ). Hence
e = d = 0, z = 1, b = 2, x = 2 and a = 4, and we obtain the classical 24 + 32 = 42 + 32 = 52 .
10. How many positive integers satisfy the following three conditions:
(i) All digits of the number are from the set {1, 2, 3, 4, 5};
(ii) The absolute value of the difference between any two consecutive digits is 1;
(iii) The integer has 1994 digits?
Solution. Consider all positive integers with 2n digits satisfying conditions (i) and (ii) of the problem. Let
the number of such integers beginning with 1, 2, 3, 4 and 5 be an , bn , cn , dn and en , respectively. Then, for
n = 1 we have a1 = 1 (integer 12), b1 = 2 (integers 21 and 23), c1 = 2 (integers 32 and 34), d1 = 2 (integers
43 and 45) and e1 = 1 (integer 54). Observe that c1 = a1 + e1 .
Suppose now that n > 1, i.e., the integers have at least four digits. If an integer begins with the digit 1 then
the second digit is 2 while the third can be 1 or 3. This gives the relation

an = an−1 + cn−1 . (1)

Similarly, if the first digit is 5, then the second is 4 while the third can be 3 or 5. This implies

en = cn−1 + en−1 . (2)

If the integer begins with 23 then the third digit is 2 or 4. If the integer begins with 21 then the third digit
is 2. From this we can conclude that

bn = 2bn−1 + dn−1 . (3)

In the same manner we can show that

dn = bn−1 + 2dn−1 . (4)

If the integer begins with 32 then the third digit must be 1 or 3, and if it begins with 34 the third digit is
3 or 5. Hence

cn = an−1 + 2cn−1 + en−1 . (5)

From (1), (2) and (5) it follows that cn = an + en , which is true for all n ≥ 1. On the other hand, adding
the relations (1)–(5) results in

an + bn + cn + dn + en = 2an−1 + 3bn−1 + 4cn−1 + 3dn−1 + 2en−1

and, since cn−1 = an−1 + en−1 ,

an + bn + cn + dn + en = 3(an−1 + bn−1 + cn−1 + dn−1 + en−1 ).

Thus the number of integers satisfying conditions (i) and (ii) increases three times when we increase the
number of digits by 2. Since the number of such integers with two digits is 8, and 1994 = 2 + 2 · 996, the
number of integers satisfying all three conditions is 8 · 3996 .
11. Let N S and EW be two perpendicular diameters of a circle C. A line l touches C at point S. Let A and B
be two points on C, symmetric with respect to the diameter EW . Denote the intersection points of l with
the lines N A and N B by A′ and B ′ , respectively. Show that |SA′ | · |SB ′ | = |SN |2 .
Solution. We have ∠N AS = ∠N BS = 90◦ (see Figure 1). Thus, the triangles N A′ S and N SA are similar.
Also, the triangles B ′ N S and SN B are similar and the triangles N SA and SN B are congruent. Hence,

the triangles N A′ S and B ′ N S are similar which implies SA SN ′ ′ 2
SN = SB ′ and SA · SB = SN .

3
N

W E

B
l

S B′ A′

Figure 1
12. The inscribed circle of the triangle A1 A2 A3 touches the sides A2 A3 , A3 A1 and A1 A2 at points S1 , S2 , S3 ,
respectively. Let O1 , O2 , O3 be the centres of the inscribed circles of triangles A1 S2 S3 , A2 S3 S1 and A3 S1 S2 ,
respectively. Prove that the straight lines O1 S1 , O2 S2 and O3 S3 intersect at one point.
Solution. We shall prove that the lines S1 O1 , S2 O2 , S3 O3 are the bisectors of the angles of the triangle
S1 S2 S3 . Let O and r be the centre and radius of the inscribed circle C of the triangle A1 A2 A3 . Further,
let P1 and H1 be the points where the inscribed circle of the triangle A1 S2 S3 (with the centre O1 and
radius r1 ) touches its sides A1 S2 and S2 S3 , respectively (see Figure 2). To show that S1 O1 is the bisector of
the angle ∠S3 S1 S2 it is sufficient to prove that O1 lies on the circumference of circle C, for in this case the
arcs O1 S2 and O1 S3 will obviously be equal. To prove this, first note that as A1 S2 S3 is an isosceles triangle
the point H1 , as well as O1 , lies on the straight line A1 O. Now, it suffices to show that |OH1 | = r − r1 .
Indeed, we have
r − r1 r1 |O1 P1 | |P1 A1 | |S2 A1 | − |P1 A1 |
=1− =1− =1− =
r r |OS2 | |S2 A1 | |S2 A1 |
|S2 P1 | |S2 H1 | |OH1 | |OH1 |
= = = = .
|S2 A1 | |S2 A1 | |OS2 | r
A2
S3
S1
O
H1 r r
O1 r

A1 P1 S2 A3

Figure 2

13. Find the smallest number a such that a square of side a can contain five disks of radius 1 so that no two of
the disks have a common interior point.
Solution. Let P QRS be a square which has the property described in the problem. Clearly, a > 2.
Let P ′ Q′ R′ S ′ be the square inside P QRS whose sides are at distance 1 from the sides of P QRS, and,
consequently, are of length a − 2. Since all the five disks are inside P QRS, their centres are inside P ′ Q′ R′ S ′ .
Divide P ′ Q′ R′ S ′ into four congruent squares of side length a2 − 1. By the pigeonhole principle, at least two
√ 
of the five centres are in the same small square. Their distance, then, is at most 2 a2 − 1 . Since the
√ √
distance has to be at least 2, we have a ≥ 2 + 2 2. On the other hand, if a = 2 + 2 2, we can place the five
disks in such a way that one is centred at the centre of P QRS and the other four have centres at P ′ , Q′ ,
R′ and S ′ .
14. Let α, β, γ be the angles of a triangle opposite to its sides with lengths a, b and c, respectively. Prove the
inequality
       
1 1 1 1 1 1 a b c
a· + +b· + +c· + ≥2· + + .
β γ γ α α β α β γ

4
Solution. Clearly, the inequality a > b implies α > β and similarly a < b implies α < β, hence (a−b)(α−β) ≥
0 and aα + bβ ≥ aβ + bα. Dividing the last equality by αβ we get
a b a b
+ ≥ + . (6)
β α α β
Similarly we get
a c a c
+ ≥ + (7)
γ α α γ
and
b c b c
+ ≥ + . (8)
γ β β γ

To finish the proof it suffices to add the inequalities (6)–(8).


15. Does there exist a triangle such that the lengths of all its sides and altitudes are integers and its perimeter
is equal to 1995?
Solution. Consider a triangle ABC with all its sides and heights having integer lengths. From the cosine
theorem we conclude that cos ∠A, cos ∠B and cos ∠C are rational numbers. Let AH be one of the heights
of the triangle ABC, with the point H lying on the straight line determined by the side BC. Then |BH|
and |CH| must be rational and hence integer (consider the Pythagorean theorem for the triangles ABH
and ACH). Now, if |BH| and |CH| have different parity then |AB| and |AC| also have different parity and
|BC| is odd. If |BH| and |CH| have the same parity then |AB| and |AC| also have the same parity and
|BC| is even. In both cases the perimeter of triangle ABC is an even number and hence cannot be equal
to 1995.
Remark. In the solution we only used the fact that all three sides and one height of the triangle ABC are
integers.

A Hedgehog 1

120◦ 120◦
1 1
120◦

Figure 3

16. The Wonder Island is inhabited by Hedgehogs. Each Hedgehog consists of three segments of unit length
having a common endpoint, with all three angles between them equal to 120◦ (see Figure 3). Given that
all Hedgehogs are lying flat on the island and no two of them touch each other, prove that there is a finite
number of Hedgehogs on Wonder Island.
Solution. It suffices to prove that if the distance between the centres of two Hedgehogs is less than 0.2, then
these Hedgehogs intersect. To show this, consider two Hedgehogs with their centres at points O and M ,
respectively, such that |OM | < 0.2. Let A, B and C be the endpoints of the needles of √ the first Hedgehog
(see Figure 4) and draw a straight line l parallel to AC through the point M . As |AC| = 3 implies |KL| ≤
0.2
0.5 |AC| < 1 and the second Hedgehog has at least one of its needles pointing inside the triangle OKL, this
needle intersects the first Hedgehog.
Remark. If the Hedgehogs can move their needles so that the angles between them can take any positive
value then there can be an infinite number of Hedgehogs on the Wonder Island.

5
A

1 K
l
qM
O L
1 1
B C
Figure 4

17. In a certain kingdom, the king has decided to build 25 new towns on 13 uninhabited islands so that on each
island there will be at least one town. Direct ferry connections will be established between any pair of new
towns which are on different islands. Determine the least possible number of these connections.
Solution. Let a1 , . . . , a13 be the numbers of towns on each island. Suppose there exist numbers i and j such
that ai ≥ aj > 1 and consider an arbitrary town A on the j-th island. The number of ferry connections
from town A is equal to 25 − aj . On the other hand, if we “move” town A to the i-th island then there will
be 25 − (ai + 1) connections from town A while no other connections will be affected by this move. Hence,
the smallest number of connections will be achieved if there are 13 towns on one island and one town on
each of the other 12 islands. In this case there will be 13 · 12 + 12·11
2 = 222 connections.
18. There are n lines (n > 2) given in the plane. No two of the lines are parallel and no three of them intersect
at one point. Every point of intersection of these lines is labelled with a natural number between 1 and n−1.
Prove that, if and only if n is even, it is possible to assign the labels in such a way that every line has all
the numbers from 1 to n − 1 at its points of intersection with the other n − 1 lines.
Solution. Suppose we have assigned the labels in the required manner. When a point has label 1 then there
can be no more occurrences of label 1 on the two lines that intersect at that point. Therefore the number
of intersection points labelled with 1 has to be exactly n2 , and so n must be even. Now, let n be an even
number and denote the n lines by l1 , l2 , . . . , ln . First write the lines li in the following table:
l3 l4 . . . ln/2+1
l1 l2
ln ln−1 . . . ln/2+2
and then rotate the picture n − 1 times:
l2 l3 . . . ln/2
l1 ln
ln−1 ln−2 . . . ln/2+1

ln l2 . . . ln/2−1
l1 ln−1
ln−2 ln−3 . . . ln/2

etc.
According to these tables, we can join the lines in pairs in n − 1 different ways — l1 with the line next to
it and every other line with the line directly above or under it. Now we can assign the label i to all the
intersection points of the pairs of lines shown in the ith table.
19. The Wonder Island Intelligence Service has 16 spies in Tartu. Each of them watches on some of his colleagues.
It is known that if spy A watches on spy B then B does not watch on A. Moreover, any 10 spies can be
numbered in such a way that the first spy watches on the second, the second watches on the third, . . . , the
tenth watches on the first. Prove that any 11 spies can also be numbered in a similar manner.
Solution. We call two spies A and B neutral to each other if neither A watches on B nor B watches on A.
Denote the spies A1 , A2 , . . . , A16 . Let ai , bi and ci denote the number of spies that watch on Ai , the
number of that are watched by Ai and the number of spies neutral to Ai , respectively. Clearly, we have
ai + bi + ci = 15,
ai + ci ≤ 8,
b i + ci ≤ 8

6
for any i = 1, . . . , 16 (if any of the last two inequalities does not hold then there exist 10 spies who cannot
be numbered in the required manner). Combining the relations above we find ci ≤ 1. Hence, for any spy,
the number of his neutral colleagues is 0 or 1.
Now suppose there is a group of 11 spies that cannot be numbered as required. Let B be an arbitrary spy
in this group. Number the other 10 spies as C1 , C2 , . . . , C10 so that C1 watches on C2 , . . . , C10 watches
on C1 . Suppose there is no spy neutral to B among C1 , . . . , C10 . Then, if C1 watches on B then B cannot
watch on C2 , as otherwise C1 , B, C2 , . . . , C10 would form an 11-cycle. So C2 watches on B, etc. As some
of the spies C1 , C2 , . . . , C10 must watch on B we get all of them watching on B, a contradiction. Therefore,
each of the 11 spies must have exactly one spy neutral to him among the other 10 — but this is impossible.
20. An equilateral triangle is divided into 9 000 000 congruent equilateral triangles by lines parallel to its sides.
Each vertex of the small triangles is coloured in one of three colours. Prove that there exist three points of
the same colour being the vertices of a triangle with its sides parallel to the sides of the original triangle.
Solution. Consider the side AB of the big triangle ABC as “horizontal” and suppose the statement of the
problem does not hold. The side AB contains 3001 vertices A = A0 , A1 , . . . , A3000 = B of 3 colours.
Hence, there are at least 1001 vertices of one colour, e.g., red. For any two red vertices Ak and An there
exists a unique vertex Bkn such that the triangle Bkn Ak An is equilateral. That vertex Bkn cannot  be red.
For different pairs (k, n) the corresponding vertices Bkn are different, so we have at least 10012 > 500000
vertices of type Bkn that cannot be red. As all these vertices are situated on 3000 horizontal lines, there
exists a line L which contains more than 160 vertices of type Bkn , each of them coloured in one of the two
remaining colours. Hence there exist at least 81 vertices of the same colour, e.g., blue, on line L. For every
two blue vertices Bkn and Bml on line L there exists a unique vertex Cknml such that:
(i) Cknml lies above the line L;
(ii) The triangle Cknml Bkn Bml is equilateral;
(iii) Cknml = Bpq where p = min(k, m) and q = max(n, l).
Different
 pairs of vertices Bkn belonging to line L define different vertices Cknml . So we have at least
81
2 > 3200 vertices of type Cknml that can be neither blue nor red. As the number of these vertices exceeds
the number of horizontal lines, there must be two vertices Cknml and Cpqrs on one horizontal line. Now,
these two vertices define a new vertex Dknmlpqrs that cannot have any of the three colours, a contradiction.
Remark. The minimal size of the big triangle that can be handled by this proof is 2557.

7
Baltic Way 1995

Västerås (Sweden), November 12, 1995

Problems and solutions

1. Find all triples (x, y, z) of positive integers satisfying the system of equations
( 2
x = 2(y + z)
x6 = y 6 + z 6 + 31(y 2 + z 2 ).

Solution. From the first equation it follows that x is even. The second equation implies x > y and x > z.
Hence 4x > 2(y + z) = x2 , and therefore x = 2 and y + z = 2, so y = z = 1. It is easy to check that the
triple (2, 1, 1) satisfies the given system of equations.
2. Let a and k be positive integers such that a2 + k divides (a − 1)a(a + 1). Prove that k ≥ a.
Solution. We have (a − 1)a(a + 1) = a(a2 + k) − (k + 1)a. Hence a2 + k divides (k + 1)a, and thus k + 1 ≥ a,
or equivalently, k ≥ a.
3. The positive integers a, b, c are pairwise relatively prime, a and c are odd and the numbers satisfy the
equation a2 + b2 = c2 . Prove that b + c is a square of an integer.
Solution. Since a and c are odd, b must be even. We have a2 = c2 −b2 = (c+b)(c−b). Let d = gcd(c+b, c−b).
Then d divides (c + b) + (c − b) = 2c and (c + b) − (c − b) = 2b. Since c + b and c − b are odd, d is odd,
and hence d divides both b and c. But b and c are relatively prime, so d = 1, i.e., c + b and c − b are also
relatively prime. Since (c + b)(c − b) = a2 is a square, it follows that c + b and c − b are also squares. In
particular, b + c is a square as required.
4. John is older than Mary. He notices that if he switches the two digits of his age (an integer), he gets Mary’s
age. Moreover, the difference between the squares of their ages is the square of an integer. How old are
Mary and John?
Solution. Let John’s age be 10a + b where 0 ≤ a, b ≤ 9. Then Mary’s age is 10b + a, and hence a > b. Now
(10a + b)2 − (10b + a)2 = 9 · 11(a + b)(a − b).
Since this is the square of an integer, a + b or a − b must be divisible by 11. The only possibility is clearly
a + b = 11. Hence a − b must be a square. A case study yields the only possibility a = 6, b = 5. Thus John
is 65 and Mary 56 years old.
5. Let a < b < c be three positive integers. Prove that among any 2c consecutive positive integers there exist
three different numbers x, y, z such that abc divides xyz.
Solution. First we show that among any b consecutive numbers there are two different numbers x and y
such that ab divides xy. Among the b consecutive numbers there is clearly a number x′ divisible by b, and
a number y ′ divisible by a. If x′ 6= y ′ , we can take x = x′ and y = y ′ , and we are done. Now assume that
x′ = y ′ . Then x′ is divisible by e, the least common multiple of a and b. Let d = gcd(a, b). As a < b, we
have d ≤ 12 b. Hence there is a number z ′ 6= x′ among the b consecutive numbers such that z ′ is divisible
by d. Hence x′ z ′ is divisible by de. But de = ab, so we can take x = x′ and y = z ′ .
Now divide the 2c consecutive numbers into two groups of c consecutive numbers. In the first group, by the
above reasoning, there exist distinct numbers x and y such that ab divides xy. The second group contains
a number z divisible by c. Then abc divides xyz.
6. Prove that for positive a, b, c, d
a+c b+d c+a d+b
+ + + ≥ 4.
a+b b+c c+d d+a
Solution. The inequality between the arithmetic and harmonic mean gives
a+c c+a 4 a+c
+ ≥ a+b c+d
=4· ,
a+b c+d a+c + c+a
a+b+c+d
b+d d+b 4 b+d
+ ≥ b+c d+a
=4· ,
b+c d+a b+d + d+b
a+b+c+d
and adding these inequalities yields the required inequality.

1
7. Prove that sin3 18◦ + sin2 18◦ = 1/8.
Solution. We have
sin3 18◦ + sin2 18◦ = sin2 18◦ (sin 18◦ + sin 90◦ ) = sin2 18◦ · 2 sin 54◦ cos 36◦ = 2 sin2 18◦ cos2 36◦
2 sin2 18◦ cos2 18◦ cos2 36◦ sin2 36◦ cos2 36◦ sin2 72◦ 1
= = = = .
cos2 18◦ 2 cos2 18◦ 8 cos2 18◦ 8

8. The real numbers a, b and c satisfy the inequalities |a| ≥ |b + c|, |b| ≥ |c + a| and |c| ≥ |a + b|. Prove that
a + b + c = 0.
Solution. Squaring both sides of the given inequalities we get
 2 2

 a ≥ (b + c)
b2 ≥ (c + a)2

 2
c ≥ (a + b)2 .

Adding these three inequalities and rearranging, we get (a + b + c)2 ≤ 0. Clearly equality must hold, and
we have a + b + c = 0.

9. Prove that
1995 1994 1993 2 1 1 3 1995
− + − ···− + = + + ···+ .
2 3 4 1995 1996 999 1000 1996

Solution. Denote the left-hand side of the equation by L, and the right-hand side by R. Then

X
1996  1997  X
1996
1 X
1996
1
k+1 k+1
L= (−1) − 1 = 1997 · (−1) · = 1997 · (−1)k · + 1996,
k+1 k+1 k
k=1 k=1 k=1
998 
X 1997  X
998
2k + 1996 1
R= − = 1996 − 1997 · .
998 + k 998 + k k + 998
k=1 k=1

P1996 k−1 1 P998 1


We must verify that k=1 (−1) · k = k=1 k+998 . But this follows from the calculation

X
1996
1 X1
1996 X
998
1 X
998
1
(−1)k−1 · = −2· = .
k k 2k k + 998
k=1 k=1 k=1 k=1

10. Find all real-valued functions f defined on the set of all non-zero real numbers such that:
(i) f (1) = 1,
 1  1 1
(ii) f =f +f for all non-zero x, y, x + y,
x+y x y
(iii) (x + y)f (x + y) = xyf (x)f (y) for all non-zero x, y, x + y.
Solution. Substituting x = y = 21 z in (ii) we get

f ( z1 ) = 2f ( 2z ) (1)
1
for all z 6= 0. Substituting x = y = z in (iii) yields

2 2 1
2
z f(z ) = z2 f ( 1z )

for all z 6= 0, and hence


2
2f ( z2 ) = 1
z f ( 1z ) . (2)

From (1) and (2) we get


2
f ( z1 ) = 1
z f ( 1z ) ,

2
or, equivalently,
2
f (x) = x f (x) (3)

for all x 6= 0. If f (x) = 0 for some x, then by (iii) we would have


 
f (1) = x + (1 − x) f x + (1 − x) = (1 − x)f (x)f (1 − x) = 0,

which contradicts the condition (i). Hence f (x) 6= 0 for all x, and (3) implies xf (x) = 1 for all x, and thus
f (x) = x1 . It is easily verified that this function satisfies the given conditions.
11. In how many ways can the set of integers {1, 2, . . . , 1995} be partitioned into three nonempty sets so that
none of these sets contains two consecutive integers?
Solution. We construct the three subsets by adding the numbers successively, and disregard at first the
condition that the sets must be non-empty. The numbers 1 and 2 must belong to two different subsets, say
A and B. We then have two choices for each of the numbers 3, 4, . . . , 1995, and different choices lead to
different partitions. Hence there are 21993 such partitions, one of which has an empty part. The number of
partitions satisfying the requirements of the problem is therefore 21993 − 1.
12. Assume we have 95 boxes and 19 balls distributed in these boxes in an arbitrary manner. We take six new
balls at a time and place them in six of the boxes, one ball in each of the six. Can we, by repeating this
process a suitable number of times, achieve a situation in which each of the 95 boxes contains an equal
number of balls?
Solution. Since 6 · 16 = 96, we can put 16 times 6 balls in the boxes so that the number of balls in one of
the boxes increases by two, while in all other boxes it increases by one. Repeating this procedure, we can
either diminish the difference between the number of balls in the box which has most balls and the number
of balls in the box with the least number of balls, or diminish the number of boxes having the least number
of balls, until all boxes have the same number of balls.
13. Consider the following two person game. A number of pebbles are situated on the table. Two players make
their moves alternately. A move consists of taking off the table x pebbles where x is the square of any
positive integer. The player who is unable to make a move loses. Prove that there are infinitely many initial
situations in which the second player can win no matter how his opponent plays.
Solution. Suppose that there is an n such that the first player always wins if there are initially more than
n pebbles. Consider the initial situation with n2 + n + 1 pebbles. Since (n + 1)2 > n2 + n + 1, the first
player can take at most n2 pebbles, leaving at least n + 1 pebbles on the table. By the assumption, the
second player now wins. This contradiction proves that there are infinitely many situations in which the
second player wins no matter how the first player plays.
14. There are n fleas on an infinite sheet of triangulated paper. Initially the fleas are in different small triangles,
all of which are inside some equilateral triangle consisting of n2 small triangles (see Figure 1 for a possible
initial configuration with n = 5). Once a second each flea jumps from its triangle to one of the three small
triangles as indicated in the figure. For which positive integers n does there exist an initial configuration
such that after a finite number of jumps all the n fleas can meet in a single small triangle?

Figure 1

3
Solution. The small triangles can be coloured in four colours as shown in Figure 2. Then each flea can
only reach triangles of a single colour. Moreover, number the horizontal rows are numbered as in Figure 2,
and note that with each move a flea jumps from a triangle in an even-numbered row to a triangle in an
odd-numbered row, or vice versa. Hence, if all the fleas are to meet in one small triangle, then they must
initially be located in triangles of the same colour and in rows of the same parity. On the other hand, if
these conditions are met, then the fleas can end up all in some designated triangle (of the right colour and
parity). When a flea reaches this triangle, it can jump back and forth between the designated triangle and
one of its neighbours until the other fleas arrive.
It remains to find the values of n for which the big triangle contains at least n small triangles of one colour,
in rows of the same parity. For any odd n there are at least 1 + 2 + · · · + n+1 1 2
2 = 8 (n + 4n + 3) ≥ n such
n 1
triangles. For even n ≥ 6 we also have at least 1 + 2 + · · · + 2 = 8 (n2 + 2n) ≥ n triangles of the required
kind. Finally, it is easy to check that for n = 2 and n = 4 the necessary set of small triangles cannot be
found.
Hence it is possible for the fleas to meet in one small triangle for all n except 2 and 4.

d b d b d
7 a c a c
6 d c b ad c bad c
b b d
5 a c d a c a b c
4 c b a c a dc ba d
d b
d a bc d a b
3 cd a b c
2 a d c b ad c ba d c b
1 d b d b
a c a c dabc

Figure 2

15. A polygon with 2n + 1 vertices is given. Show that it is possible to label the vertices and midpoints of the
sides of the polygon, using all the numbers 1, 2, . . . , 4n + 2, so that the sums of the three numbers assigned
to each side are all equal.
Solution. First, label the midpoints of the sides of the polygon with the numbers 1, 2, . . . , 2n + 1, in
clockwise order. Then, beginning with the vertex between the sides labelled by 1 and 2, label every second
vertex in clockwise order with the numbers 4n + 2, 4n + 1, . . . , 2n + 2.
16. In the triangle ABC, let l be the bisector of the external angle at C. The line through the midpoint O
of the segment AB parallel to l meets the line AC at E. Determine |CE|, if |AC| = 7 and |CB| = 4.
Solution. Let F be the intersection point of l and the line AB. Since |AC| > |BC|, the point E lies on the
segment AC, and F lies on the ray AB. Let the line through B parallel to AC meet CF at G. Then the
triangles AF C and BF G are similar. Moreover, we have ∠BGC = ∠BCG, and hence the triangle CBG
|F A| |AC| |AC| 7 |AO| 3 3
is isosceles with |BC| = |BG|. Hence |F B| = |BG| = |BC| = 4 . Therefore |AF | = 2 /7 = 14 . Since the
|AE| |AO| 3 3 11
triangles ACF and AEO are similar, |AC| = |AF | = 14 , whence |AE| = 2 and |EC| = 2 .

17. Prove that there exists a number α such that for any triangle ABC the inequality

max(hA , hB , hC ) ≤ α · min(mA , mB , mC )

holds, where hA , hB , hC denote the lengths of the altitudes and mA , mB , mC denote the lengths of the
medians. Find the smallest possible value of α.
Solution. Let h = max(hA , hB , hC ) and m = min(mA , mB , mC ). If the longest height and the shortest
median are drawn from the same vertex, then obviously h ≤ m. Now let the longest height and shortest
median be AD and BE, respectively, with |AD| = h and |BE| = m. Let F be the point on the line BC
such that EF is parallel to AD. Then m = |EB| ≥ |EF | = h2 , whence h ≤ 2m. For an example with
h = 2m, consider a triangle where D lies on the ray CB with |CB| = |BD|. Hence the smallest such value
is α = 2.
18. Let M be the midpoint of the side AC of a triangle ABC and let H be the foot point of the altitude from
B. Let P and Q be the orthogonal projections of A and C on the bisector of angle B. Prove that the four
points M , H, P and Q lie on the same circle.

4
Solution. If |AB| = |BC|, the points M , H, P and Q coincide and the circle degenerates to a point. We
will assume that |AB| < |BC|, so that P lies inside the triangle ABC, and Q lies outside of it.
Let the line AP intersect BC at P1 , and let CQ intersect AB at Q1 . Then |AP | = |P P1 | (since △AP B ∼
=
△P1 P B), and therefore M P k BC. Similarly, M Q k AB. Therefore ∠AM Q = ∠BAC. We have two cases:
(i) ∠BAC ≤ 90◦ . Then A, H, P and B lie on a circle in this order. Hence ∠HP Q = 180◦ − ∠HP B =
∠BAC = ∠HM Q. Therefore H, P , M and Q lie on a circle.
(ii) ∠BAC > 90◦ . Then A, H, B and P lie on a circle in this order. Hence ∠HP Q = 180◦ − ∠HP B =
180◦ − ∠HAB = ∠BAC = ∠HM Q, and therefore H, P , M and Q lie on a circle.

C3

C2

C1

Figure 3

19. The following construction is used for training astronauts: A circle C2 of radius 2R rolls along the inside of
another, fixed circle C1 of radius nR, where n is an integer greater than 2. The astronaut is fastened to a
third circle C3 of radius R which rolls along the inside of circle C2 in such a way that the touching point of
the circles C2 and C3 remains at maximum distance from the touching point of the circles C1 and C2 at all
times (see Figure 3).
How many revolutions (relative to the ground) does the astronaut perform together with the circle C3 while
the circle C2 completes one full lap around the inside of circle C1 ?
Solution. Consider a circle C4 with radius R that rolls inside C2 in such a way that the two circles always
touch in the point opposite to the touching point of C2 and C3 . Then the circles C3 and C4 follow each
other and make the same number of revolutions, and so we will assume that the astronaut is inside the
circle C4 instead. But the touching point of C2 and C4 coincides with the touching point of C1 and C2 .
Hence the circles C4 and C1 always touch each other, and we can disregard the circle C2 completely.
Suppose the circle C4 rolls inside C1 in counterclockwise direction. Then the astronaut revolves in clockwise
direction. If the circle C4 had rolled along a straight line of length 2πnR (instead of the inside of C1 ),
the circle C4 would have made n revolutions during its movement. As the path of the circle C4 makes a
360◦ counterclockwise turn itself, the total number of revolutions of the astronaut relative to the ground
is n − 1.
Remark: The radius of the intermediate circle C2 is irrelevant. Moreover, for any number of intermediate
circles the answer remains the same, depending only on the radii of the outermost and innermost circles.
20. Prove that if both coordinates of every vertex of a convex pentagon are integers, then the area of this
pentagon is not less than 25 .
Solution. There are two vertices A1 and A2 of the pentagon that have their first coordinates of the parity,
and their second coordinates of the same parity. Therefore the midpoint M of A1 A2 has integer coordinates.
There are two possibilities:
(i) The considered vertices are not consecutive. Then M lies inside the pentagon (because it is convex)
and is the common vertex of five triangles having as their bases the sides of the pentagon. The area
of any one of these triangles is not less than 12 , so the area of the pentagon is at least 52 .

5
(ii) The considered vertices are consecutive. Since the pentagon is convex, the side A1 A2 is not simultane-
ously parallel to A3 A4 and A4 A5 . Suppose that the segments A1 A2 and A3 A4 are not parallel. Then
the triangles A2 A3 A4 , M A3 A4 and A−1A3 A4 have different areas, since their altitudes dropped onto
the side A3 A4 form a monotone sequence. At least one of these triangles has area not less than 32 ,
and the pentagon has area not less than 52 .

6
Baltic Way 1996

Valkeakoski (Finland), November 3, 1996

Problems and solutions

1. Let α be the angle between two lines containing the diagonals of a regular 1996-gon, and let β 6= 0 be
another such angle. Prove that α/β is a rational number.
Solution. Let O be the circumcentre of the 1996-gon. Consider two diagonals AB and CD. There is a
rotation around O that takes the point C to A and D to a point D′ . Clearly the angle of this rotation is a
multiple of 2ϕ = 2π/1996.
The angle BAD′ is the inscribed angle on the arc BD′ , and hence is an integral multiple of ϕ, the inscribed
angle on the arc between any two adjacent vertices of the 1996-gon. Hence the angle between AB and CD
is also an integral multiple of ϕ.
Since both α and β are integral multiples of ϕ, α/β is a rational number.
2. In the figure below, you see three half-circles. The circle C is tangent to two of the half-circles and to the
line P Q perpendicular to the diameter AB. The area of the shaded region is 39π, and the area of the
circle C is 9π. Find the length of the diameter AB.
..............................
............. . . . . . . . .............
......... ....................................
Q
...................................................
.
..
....................................................................... .............
.
. .
..... .............................................. .... ......
............ ............................................................................ ....................
..... . .......... . ....................... ......................
.................. .................... ......... .......
................... ............... ... ...
. .. .............. ....
........... ............ ...
....... ......
......
.
... .......
..........
..... .... C . ............
...........
........ . .
. ..
..... ................................ ..........
.... ... ........... ........ ..
... .. ..... ..... ..
.. .. ... .....
.. ...... ........
.... ..
. ... .
A P B
Figure 1

Solution. Let r and s be the radii of the half-circles with diameters AP and BP . Then we have
π 
39π = (r + s)2 − r2 − s2 − 9π,
2
hence rs = 48. Let M be the midpoint of the diameter AB, N be the midpoint of P B, O be the centre
of the circle C, and let F be the orthogonal projection of O on AB. Since the radius of C is 3, we have
|M O| = r + s − 3, |M F | = r − s + 3, |ON | = s + 3, and |F N | = s − 3.
Applying the Pythagorean theorem to the triangles M F O and N F O yields

(r + s − 3)2 − (r − s + 3)2 = |OF |2 = (s + 3)2 − (s − 3)2 ,

which implies r(s − 3) = 3s, so that 3(r + s) = rs = 48. Hence |AB| = 2(r + s) = 32.
3. Let ABCD be a unit square and let P and Q be points in the plane such that Q is the circumcentre
of triangle BP C and D is the circumcentre of triangle P QA. Find all possible values of the length of
segment P Q.
Solution. As Q is the circumcentre of triangle BP C, we have |P Q| = |QC| and Q lies on the perpendicular
bisector s of BC. On the other hand, as D is the circumcentre of triangle P QA, Q lies on the circle centred
at D and passing through A. Thus Q must be one of the two intersection points Q1 and Q2 of this circle
and the line s. We may choose Q1 to lie inside, and Q2 outside of the square ABCD.
Let E and√
F be the midpoints√of AD and BC, respectively. We have |AQ1 | = |DQ1 | = |DA| = 1. Hence
|EQ1 | = 23 and |F Q1 | = 1 − 23 . The Pythagorean theorem applied to the triangle CF Q1 now yields
  √ 2 √
1 2
|CQ1 |2 = |CF |2 + |F Q1 |2 = 2 + 1− 2
3
=2− 3,
p √ √
and hence |CQ1 | = 2 − 3. Similarly, |Q2 E| = 23 , and the Pythagorean theorem applied to the trian-
gle CF Q2 now yields
2  √ 2 √
|CQ2 |2 = |CF |2 + |F Q2 |2 = 12 + 1 + 23 = 2 + 3,

1
p √ p √
and
p hence |CQ2 | = 2 + 3. Hence the possible values of the length of the segment P Q are 2 − 3 and

2 + 3.
Remark. The actual location of the point P is unimportant for us. Note however that the point P exists
because P and C are the two intersection points of the circle centred at D passing through A and the circle
centred at Q passing through C.
4. ABCD is a trapezium (AD k BC). P is the point on the line AB such that ∠CP D is maximal. Q is
the point on the line CD such that ∠BQA is maximal. Given that P lies on the segment AB, prove that
∠CP D = ∠BQA.
Solution. The property that ∠CP D is maximal is equivalent to the property that the circle CP D touches
the line AB (at P ). Let O be the intersection point of the lines AB and CD, and let ℓ be the bisector
of ∠AOD. Let A′ , B ′ and Q′ be the points symmetrical to A, B and Q, respectively, relative to the line ℓ.
Then the circle AQB is symmetrical to the circle A′ Q′ B ′ that touches the line AB at Q′ . We have

|OD| |OD| |OC| |OC|



= = = .
|OA | |OA| |OB| |OB ′ |

Hence the homothety with centre O and coefficient |OD|/|OA| takes A′ to D, B ′ to C, and Q′ to a
point Q′′ such that the circle CQ′′ D touches the line AB, and thus Q′′ coincides with P . Therefore
∠AQB = ∠A′ Q′ B ′ = ∠CQ′′ D = ∠CP D as required.
5. Let ABCD be a cyclic convex quadrilateral and let ra , rb , rc , rd be the radii of the circles inscribed in the
triangles BCD, ACD, ABD, ABC respectively. Prove that ra + rc = rb + rd .
Solution. For a triangle M N K with in-radius r and circumradius R, the equality
r
cos ∠M + cos ∠N + cos ∠K = 1 +
R
hold; this follows from the cosine theorem and formulas for r and R.
We have ∠ACB = ∠ADB, ∠BDC = ∠BAC, ∠CAD = ∠CBD and ∠DBA = ∠DCA. Denoting these
angles by α, β, γ and δ, respectively, we get ra = (cos β + cos γ + cos (α + δ) − 1)R and rc = (cos α + cos δ +
cos (β + γ) − 1)R. Since cos (α + δ) = − cos (β + γ), we get

ra + rc = (cos α + cos β + cos γ + cos δ − 2)R.

Similarly,

rb + rd = (cos α + cos β + cos γ + cos δ − 2)R,

where R is the circumradius of the quadrangle ABCD.


6. Let a, b, c, d be positive integers such that ab = cd. Prove that a + b + c + d is not prime.
Solution 1. As ab = cd, we get a(a + b + c + d) = (a + c)(a + d). If a + b + c + d were a prime, then it would
be a factor in either a + c or a + d, which are both smaller than a + b + c + d.
Solution 2. Let r = gcd(a, c) and s = gcd(b, d). Let a = a′ r, b = b′ s, c = c′ r and d = d′ s. Then a′ b′ = c′ d′ .
But gcd(a′ , c′ ) = 1 and gcd(b′ , d′ ) = 1, so we must have a′ = d′ and b′ = c′ . This gives

a + b + c + d = a′ r + b′ s + c′ r + d′ s = a′ r + b′ s + b′ r + a′ s = (a′ + b′ )(r + s).

Since a′ , b′ , r and s are positive integers, a + b + c + d is not a prime.


7. A sequence of integers a1 , a2 , . . . , is such that a1 = 1, a2 = 2 and for n ≥ 1
(
5an+1 − 3an if an · an+1 is even,
an+2 =
an+1 − an if an · an+1 is odd.

Prove that an 6= 0 for all n.


Solution. Considering the sequence modulo 6 we obtain 1, 2, 1, 5, 4, 5, 1, 2, . . . . The conclusion follows.

2
8. Consider the sequence

x1 = 19,
x2 = 95,
xn+2 = lcm(xn+1 , xn ) + xn ,

for n > 1, where lcm(a, b) means the least common multiple of a and b. Find the greatest common divisor
of x1995 and x1996 .
Solution. Let d = gcd(xk , xk+1 ). Then lcm(xk , xk+1 ) = xk xk+1 /d, and
 
gcd(xk+1 , xk+2 ) = gcd xk+1 , xk xdk+1 + xk = gcd xk+1 , xdk (xk+1 + d) .

Since xk+1 and xk /d are relatively prime, this equals gcd(xk+1 , xk+1 + d) = d. It follows by induction that
gcd(xn , xn+1 ) = gcd(x1 , x2 ) = 19 for all n ≥ 1. Hence gcd(x1995 , x1996 ) = 19.
9. Let n and k be integers, 1 < k ≤ n. Find an integer b and a set A of n integers satisfying the following
conditions:
(i) No product of k − 1 distinct elements of A is divisible by b.
(ii) Every product of k distinct elements of A is divisible by b.
(iii) For all distinct a, a′ in A, a does not divide a′ .
Solution. Let p1 , . . . , pn be the first n odd primes. Then we can take A = {2p1 , 2p2 , . . . , 2pn } and b = 2k .
It is easily seen that the conditions are satisfied.
10. Denote by d(n) the number of distinct positive divisors of a positive integer n (including 1 and n). Let
a > 1 and n > 0 be integers such that an + 1 is a prime. Prove that

d(an − 1) ≥ n.

Solution. First we show that n = 2s for some integer s ≥ 0. Indeed, if n = mp where p is an odd prime,
then an + 1 = amp + 1 = (am + 1)(am(p−1) − am(p−2) + · · · − a + 1), a contradiction.
s s
Now we use induction on s to prove that d(a2 − 1) ≥ 2s . The case s = 0 is obvious. As a2 − 1 =
s−1 s−1 s−1 s−1 s
(a2 − 1)(a2 + 1), then for any divisor q of a2 − 1, both q and q(a2 + 1) are divisors of a2 − 1.
s−1 s−1 s s−1
Since the divisors of the form q(a2 +1) are all larger than a2 −1 we have d(a2 −1) ≥ 2·d(a2 −1) = 2s .
11. The real numbers x1 , x2 , . . . , x1996 have the following property: for any polynomial W of degree 2 at least
three of the numbers W (x1 ), W (x2 ), . . . , W (x1996 ) are equal. Prove that at least three of the numbers
x1 , x2 , . . . , x1996 are equal.
Solution. Let m = min {x1 , . . . , x1996 }. Then the polynomial W (x) = (x − m)2 is strictly increasing for
x ≥ m. Hence if W (xi ) = W (xj ) we must have xi = xj , and the conclusion follows.
12. Let S be a set of integers containing the numbers 0 and 1996. Suppose further that any integer root of any
non-zero polynomial with coefficients in S also belongs to S. Prove that −2 belongs to S.
Solution. Consider the polynomial W (x) = 1996x + 1996. As W (−1) = 0 we conclude that −1 ∈ S. Now
consider the polynomial U (x) = −x1996 − x1995 − · · · − x2 − x + 1996. As U (1) = 0 we have 1 ∈ S. Finally,
let T (x) = −x10 + x9 − x8 + x7 − x6 + x3 − x2 + 1996. Then −2 ∈ S since T (−2) = 0.
13. Consider the functions f defined on the set of integers such that

f (x) = f (x2 + x + 1),

for all integers x. Find


(a) all even functions,
(b) all odd functions of this kind.
Solution.
 
(a) For f even, we have f (x−1) = f (x−1)2 +(x−1)+1 = f (x2 −x+1) = f (−x)2 −x+1 = f (−x) = f (x)
for any x ∈ Z. Hence f has a constant value; any constant will do.

3
(b) For f odd, a similar computation yields f (x − 1) = −f (x). Since f (0) = 0, we see that f (x) = 0 for
all x ∈ Z.
14. The graph of the function f (x) = xn + an−1 xn−1 + · · · + a1 x + a0 (where n > 1), intersects the line y = b
at the points B1 , B2 , . . . , Bn (from left to right), and the line y = c (c 6= b) at the points C1 , C2 , . . . , Cn
(from left to right). Let P be a point on the line y = c, to the right to the point Cn . Find the sum
cot ∠B1 C1 P + · · · + cot ∠Bn Cn P .
Solution. Let the points Bi and Ci have the coordinates (bi , b) and (ci , c), respectively, for i = 1, 2, . . . , n.
Then we have

1 X
n
cot ∠B1 C1 P + · · · + cot ∠Bn Cn P = (bi − ci ).
b − c i=1

The numbers bi and ci are the solutions of f (x) − b = 0 and f (x) − c = 0, respectively. As n ≥ 2,P it follows
n
from
Pn the relationships between the roots and coefficients of a polynomial (Viète’s relations) that i=1 bi =
i=1 c i = −a n−1 regardless of the values of b and c, and hence cot ∠B1 C1 P + · · · + cot ∠B n Cn P = 0.
15. For which positive real numbers a, b does the inequality

x1 · x2 + x2 · x3 + · · · + xn−1 · xn + xn · x1 ≥ xa1 · xb2 · xa3 + xa2 · xb3 · xa4 + · · · + xan · xb1 · xa2

hold for all integers n > 2 and positive real numbers x1 , x2 , . . . , xn ?


Solution. Substituting xi = x easily yields that 2a + b = 2. Now take n = 4, x1 = x3 = x and x2 = x4 = 1.
2a b 2a b
This
√ gives 2x ≥ x + x . But the inequality between the arithmetic and geometric mean yields x + x ≥
2a b 2a b
2 x x = 2x. Here equality must hold, and this implies that x = x , which gives 2a = b = 1.

On the other hand, if b = 1 and a = 12 , we let yi = xi xi+1 for 1 ≤ i ≤ n, with xn+1 = x1 . The inequality
then takes the form

y12 + · · · + yn2 ≥ y1 y2 + y2 y3 + · · · + yn y1 . (1)

But the inequality between the arithmetic and geometric mean yields
1 2 2
2 (yi + yi+1 ) ≥ yi yi+1 , 1 ≤ i ≤ n,

where yn+1 = yn . Adding these n inequalities yields the inequality (1).


The inequality (1) can also be obtained from the Cauchy-Schwarz inequality, which implies that
Pn 2
Pn 2
Pn 2
i=1 yi i=1 yi+1 ≥ i=1 yi yi+1 , which is exactly the stated inequality.

16. On an infinite checkerboard, two players alternately mark one unmarked cell. One of them uses ×, the
other ◦. The first who fills a 2 × 2 square with his symbols wins. Can the player who starts always win?
Solution. Divide the plane into dominoes in the way indicated by the thick lines in Figure 2. The second
player can respond by marking the other cell of the same domino where the first player placed his mark.
Since every 2 × 2 square contains one whole domino, the first player cannot win.

Figure 2

17. Using each of the eight digits 1, 3, 4, 5, 6, 7, 8 and 9 exactly once, a three-digit number A, two two-
digit numbers B and C, B < C, and a one-digit number D are formed. The numbers are such that
A + D = B + C = 143. In how many ways can this be done?
Solution. From A = 143 − D and 1 ≤ D ≤ 9, it follows that 134 ≤ A ≤ 142. The hundreds digit of A is
therefore 1, and the tens digit is either 3 or 4. If the tens digit of A is 4, then the sum of the units digits of

4
A and D must be 3, which is impossible, as the digits 0 and 2 are not among the eight digits given. Hence
the first two digits of A are uniquely determined as 1 and 3. The sum of the units digits of A and D must
be 13. This can be achieved in six different ways as 13 = 4 + 9 = 5 + 8 = 6 + 7 = 7 + 6 = 8 + 5 = 9 + 4.
The sum of the units digits of B and C must again be 13, and as B + C = 143, this must also be true for
the tens digits. For each choice of the numbers A and D, the remaining four digits form two pairs, both
with the sum 13. The units digits of B and C may then be chosen in four ways. The tens digits are then
uniquely determined by the remaining pair and the relation B < C. The total number of possibilities is
therefore 6 · 4 = 24.

18. The jury of an olympiad has 30 members in the beginning. Each member of the jury thinks that some of his
colleagues are competent, while all the others are not, and these opinions do not change. At the beginning
of every session a voting takes place, and those members who are not competent in the opinion of more
than one half of the voters are excluded from the jury for the rest of the olympiad. Prove that after at most
15 sessions there will be no more exclusions. (Note that nobody votes about his own competence.)
Solution. First we note that if nobody is excluded in some session, then the situation becomes stable and
nobody can be excluded in any later session.
We use induction to prove the slightly more general claim that if the jury has 2n members, n ≥ 2, then
after at most n sessions nobody will be excluded anymore. For n = 2 the claim is obvious, since if some
members are excluded in the first two sessions, there are at most two members left, and hence nobody is
excluded in the third session.
Now assuming that the claim is true for n ≤ k − 1, suppose the jury has 2k members, and consider the first
session. If nobody is excluded, we are done. If a positive and even number of members are excluded, there
will be 2r members left with r < k, and by the induction hypotheses the jury will stabilize after at most
r more sessions, giving a total of at most r + 1 ≤ k sessions, as required.
Finally suppose that an odd number of members are excluded in the first session. There are three alterna-
tives:
(i) An even number of members are excluded in each of the next m sessions, after which nobody is
excluded. Then the number of members left is at most 2k − 1 − 2m. Hence 2k − 1 − 2m ≥ 1, so that
k ≥ m + 1. Hence the number of sessions is at most k.
(ii) An even number of members are excluded in each of the next m sessions, after which an odd number
of members greater than 1 are excluded. Then there are at most 2k − 1 − 2m − 3 members left, and
by the induction hypotheses, the jury will stabilize in no more than k − m − 2 sessions. The total
number of sessions is therefore 1 + m + 1 + (k − m − 2) = k.
(iii) An even number of members are excluded in each of the next m sessions, followed by a session where
precisely one member M is excluded. In this session, there were 2r + 1 members present for some r,
and r + 1 of these voted for the exclusion of M . But then any member other than M was thought
to be incompetent by at most r others. In the next session the jury will have 2r members, and since
the members do not change their sympathies, nobody can be excluded. Hence the situation is stable
after m + 2 sessions, and at least 1 + 2m + 1 = 2m + 2 members have been excluded. But there must
be at least 3 members left, for one member cannot be excluded from a jury of 2 members. Hence
2m + 2 ≤ 2k − 3, whence m + 2 ≤ k.
Thus the claim holds for n = k also. We conclude that the claim holds for all n ≥ 2.
19. Four heaps contain 38, 45, 61, and 70 matches respectively. Two players take turns choosing any two of
the heaps and take some non-zero number of matches from one heap and some non-zero number of matches
from the other heap. The player who cannot make a move, loses. Which one of the players has a winning
strategy?
Solution. The first player wins by making moves so that the opponent must face positions of the form
(a, a, a, b), where a ≤ b.
20. Is it possible to partition all positive integers into disjoint sets A and B such that
(i) no three numbers of A form arithmetic progression,
(ii) no infinite non-constant arithmetic progression can be formed by numbers of B?

5
Solution. Let N denote the set of positive integers. There is a bijective function f : N → N × N. Let a0 = 1,
and for k ≥ 1, let ak be the least integer of the form m + tn for some integer t ≥ 0 where f (k) = (m, n),
such that ak ≥ 2ak−1 . Let A = {a0 , a1 , . . . } and let B = N\A. We now show that A and B satisfy the
given conditions.
(i) For any non-negative integers i < j < k, we have ak ≥ aj+1 ≥ 2aj , and hence ak − aj ≥ aj > aj − ai .
Thus ai , aj and ak do not form an arithmetic progression, since this would mean that ak −aj = aj −ai .
Hence no three numbers in A form an arithmetic progression.
(ii) Consider an infinite arithmetic progression m, m + n, m + 2n, . . . , with m, n ∈ N. Then m + nt = ak
for some integer t ≥ 0, where k = f −1 (m, n). Thus ak belongs to the arithmetic progression, but
ak 6∈ B. Hence B does not contain any infinite non-constant arithmetic progression.

6
Baltic Way 1997

Copenhagen, November 9, 1997

Problems

1. Determine all functions f from the real numbers to the real numbers, dif-
ferent from the zero function, such that f (x)f (y) = f (x − y) for all real
numbers x and y .

2. Given a sequence a1 , a2 , a3 , . . . of positive integers in which every posi-


tive integer occurs exactly once. Prove that there exist integers ` and m ,
1 < ` < m , such that a1 + am = 2a` .
jx k
n
3. Let x1 = 1 and xn+1 = xn + + 2 for n = 1, 2, 3, . . . , where bxc
n
denotes the largest integer not greater than x . Determine x1997 .

4. Prove that the arithmetic mean a of x1 , . . . , xn satisfies

1
(x1 − a)2 + · · · + (xn − a)2 6 (|x1 − a| + · · · + |xn − a|)2 .
2

5. In a sequence u0 , u1 , . . . of positive integers, u0 is arbitrary, and for any


non-negative integer n ,

 1u for even un ,
n
un+1 = 2

a + un for odd un ,

where a is a fixed odd positive integer. Prove that the sequence is periodic
from a certain step.

6. Find all triples (a, b, c) of non-negative integers satisfying a > b > c and
1·a3 + 9·b2 + 9·c + 7 = 1997 .

7. Let P and Q be polynomials with integer coefficients. Suppose that the


integers a and a + 1997 are roots of P , and that Q(1998) = 2000 . Prove
that the equation Q(P (x)) = 1 has no integer solutions.

1
8. If we add 1996 and 1997 , we first add the unit digits 6 and 7 . Obtaining
13 , we write down 3 and “carry” 1 to the next column. Thus we make a
carry. Continuing, we see that we are to make three carries in total:

1 1 1
1996
+ 1997
3993

Does there exist a positive integer k such that adding 1996 · k to 1997 · k
no carry arises during the whole calculation?

9. The worlds in the Worlds’ Sphere are numbered 1, 2, 3, . . . and connected


so that for any integer n > 1 , Gandalf the Wizard can move in both di-
rections between any worlds with numbers n , 2n and 3n + 1 . Starting his
travel from an arbitrary world, can Gandalf reach every other world?

10. Prove that in every sequence of 79 consecutive positive integers written


in the decimal system, there is a positive integer whose sum of digits is
divisible by 13 .

11. On two parallel lines, the distinct points A1 , A2 , A3 , . . . respectively B1 ,


B2 , B3 , . . . are marked in such a way that |Ai Ai+1 | = 1 and |Bi Bi+1 | = 2
for i = 1, 2, . . . (see Figure). Provided that 6 A1 A2 B1 = α , find the infinite
sum 6 A1 B1 A2 + 6 A2 B2 A3 + 6 A3 B3 A4 + . . . .

B1 B2 B3 B4 B5
r r r r r

r r r r r r r r r r
A1A2A3A4A5A6

12. Two circles C1 and C2 intersect in P and Q . A line through P intersects C1


and C2 again in A and B , respectively, and X is the midpoint of AB . The
line through Q and X intersects C1 and C2 again in Y and Z , respectively.
Prove that X is the midpoint of Y Z .

13. Five distinct points A , B , C , D and E lie on a line with

|AB| = |BC| = |CD| = |DE| .

2
The point F lies outside the line. Let G be the circumcentre of trian-
gle ADF and H be the circumcentre of triangle BEF . Show that lines GH
and F C are perpendicular.

A B C D E

14. In the triangle ABC , |AC|2 is the arithmetic mean of |BC|2 and |AB|2 .
Show that cot2 B > cot A cot C .

15. In the acute triangle ABC , the bisectors of 6 A , 6 B and 6 C intersect the
circumcircle again in A1 , B1 and C1 , respectively. Let M be the point
of intersection of AB and B1 C1 , and let N be the point of intersection of
BC and A1 B1 . Prove that M N passes through the incentre of triangle
ABC .

16. On a 5 × 5 chessboard, two players play the following game. The first
player places a knight on some square. Then the players alternately move
the knight according to the rules of chess, starting with the second player.
It is not allowed to move the knight to a square that has been visited
previously. The player who cannot move loses. Which of the two players
has a winning strategy?

17. A rectangle can be divided into n equal squares. The same rectangle can
also be divided into n + 76 equal squares. Find all possible values of n .

18. a) Prove the existence of two infinite sets A and B , not necessarily disjoint,
of non-negative integers such that each non-negative integer n is uniquely
representable in the form n = a + b with a ∈ A , b ∈ B .
b) Prove that for each such pair (A, B) , either A or B contains only mul-
tiples of some integer k > 1 .

19. In a forest each of n animals (n > 3) lives in its own cave, and there is
exactly one separate path between any two of these caves. Before the elec-
tion for King of the Forest some of the animals make an election campaign.
Each campaign-making animal visits each of the other caves exactly once,

3
uses only the paths for moving from cave to cave, never turns from one path
to another between the caves and returns to its own cave in the end of its
campaign. It is also known that no path between two caves is used by more
than one campaign-making animal.
a) Prove that for any prime n , the maximum possible number of
n−1
campaign-making animals is ;
2
b) Find the maximum number of campaign-making animals for n = 9 .

20. Twelve cards lie in a row. The cards are of three kinds: with both sides
white, both sides black, or with a white and a black side. Initially, nine
of the twelve cards have a black side up. The cards 1–6 are turned, and
subsequently four of the twelve cards have a black side up. Now cards 4–9
are turned, and six cards have a black side up. Finally, the cards 1–3 and
10–12 are turned, after which five cards have a black side up. How many
cards of each kind are there?

Solutions

1. Answer : f (x) ≡ 1 is the only such function.


Since f is not the zero function, there is an x0 such that f (x0 ) 6= 0 .
From f (x0 )f (0) = f (x0 − 0) = f (x0 ) we then get f (0) = 1 . Then by
f (x)2 = f (x)f (x) = ³ xf´(x − x)
³ = fx(0)
´ we have
³ x ´ f (x) 6= 0 for any real x .
Finally from f (x)f = f x− = f we get f (x) = 1 for any
2 2 2
real x . It is readily verified that this function satisfies the equation.

2. Let ` be the least index such that a` > a1 . Since 2a` − a1 is a positive
integer larger than a1 , it occurs in the given sequence beyond a` . In other
words, there exists an index m > ` such that am = 2a` −a1 . This completes
the proof.

Remarks. The problem was proposed in the slightly more general form
where the first term of the arithmetic progression has an arbitary index.
The remarks below refer to this version. The problem committee felt that
no essential new aspects would arise from the generalization.
1. A generalization of this problem is to ask about an existence of an
s -term arithmetic subsequence of the sequence (an ) (such a subsequence

4
always exists for s = 3 , as shown above). It turns out that for s = 5 such
a subsequence may not exist. The proof can be found in [1]. The same
problem for s = 4 is still open!
2. The present problem ( s = 3 ) and the above solution is also taken from [1].

Reference. [1] J. A. Davis, R. C. Entringer, R. L. Graham and G. J. Sim-


mons, On permutations containing no long arithmetic progressions, Acta
Arithmetica 1(1977), pp. 81–90.

3. Answer : x1997 = 23913 .


Note that if xn = an + b with 0 6 b < n , then

xn+1 = xn + a + 2 = a(n+1) + b + 2 .

Hence if xN = AN for some positive integers A and N , then for


i = 0, 1, . . . , N we have xN +i = A(N + i) + 2i , and x2N = (A + 1) · 2N .
Since for N = 1 the condition xN = AN holds with A = 1 , then for
N = 2k (where k is any non-negative integer) it also holds with A = k + 1 .
Now for N = 210 = 1024 we have A = 11 and xN +i = A(N + i) + 2i ,
which for i = 973 makes x1997 = 11 · 1997 + 2 · 973 = 23913 .

4. Denote yi = xi − a . Then y1 + y2 + · · · + yn = 0 . We can assume


y1 6 y2 6 · · · 6 yk 6 0 6 yk+1 6 · · · 6 yn . Let y1 + y2 + · · · + yk = −z ,
then yk+1 + · · · + yn = z and
2
y12 + y22 + · · · + yn2 = y12 + y22 + · · · + yk2 + yk+1 + · · · + yn2 6
6 (y1 + y2 + · · · + yk )2 + (yk+1 + · · · + yn )2 = 2z 2 =
1 1
= (2z)2 = (|y1 | + |y2 | + · · · + |yn |)2 .
2 2
Alternative solution. The case n = 1 is trivial (then x1 − a = 0 and we
get the inequality 0 6 0 ). Suppose now that n > 2 . Consider a square
of side length |x1 − a| + |x2 − a| + . . . + |xn − a| and construct squares of
side lengths |x1 −a|, |x2 −a|, . . . , |xn −a| side by side inside it as shown on
Figure 1. Since none of the side lengths of the small squares exceeds half of
the side length of the large square, then all the small squares are contained
within the upper half of the large square, i.e. the sum of their areas does
not exceed half of the area of the large square, q.e.d.
1
5. Suppose un > a . Then, if un is even we have un+1 = un < un , and if
2

5
1
un is odd we have un+1 = a + un < 2un and un+2 = un+1 < un . Hence
2
the iteration results in un 6 a in a finite number of steps. Thus for any
non-negative integer m , some non-negative integer n > m satisfies un 6 a ,
and there must be an infinite set of such integers n .
Since the set of natural numbers not exceeding a is finite and such values
arise in the sequence (un ) an infinite number of times, there exist non-
negative integers m and n with n > m such that un = um . Starting from
um the sequence is then periodic with a period dividing n − m .

|x1 −a| |x2 −a| ... |xn −a|

|x1 −a| + |x2 −a| + . . . + |xn −a|


Figure 1

6. Answer: (10, 10, 10) is the only such triple.


The equality immediately implies a3 + 9b2 + 9c = 1990 ≡ 1 (mod 9) . Hence
a3 ≡ 1 (mod 9) and a ≡ 1 (mod 3) . Since 133 = 2197 > 1990 then the
possible values for a are 1, 4, 7, 10 .
On the other hand, if a 6 7 then by a > b > c we have

a3 + 9b2 + 9c2 6 73 + 9 · 72 + 9 · 7 = 847 < 1990 ,

a contradiction. Hence a = 10 and 9b2 + 9c = 990 , whence by c 6 b 6 10


we have c = b = 10 .

7. Suppose b is an integer such that Q(P (b)) = 1 . Since a and a + 1997


are roots of P we have P (x) = (x − a)(x − a − 1997)R(x) where R is a
polynomial with integer coefficients. For any integer b the integers b−a and

6
b−a−1997 are of different parity and hence P (b) = (b−a)(b−a−1997)R(b)
is even. Since Q(1998) = 2000 then the constant term in the expansion of
Q(x) is even (otherwise Q(x) would be odd for any even integer x ), and
Q(c) is even for any even integer c . Hence Q(P (b)) is also even and cannot
be equal to 1 .

8. Answer : yes.
The key to the proof is noting that if we add two positive integers and the
result is an integer consisting only of digits 9 then the process of addition
must have gone without any carries. Therefore it is enough to prove that
there exists an integer k such that 3993k is of the form 999...9 .
Consider the first 3994 positive integers consisting only of digits 9 :

9, 99, 999, . . . , 999


| {z. . . 9} .
3994

By the pigeonhole principle some two of these give the same remainder upon
division by 3993 , so their difference

|99 {z
. . . 9} |00 {z
. . . 0} = 99 . . . 9} · 10r
| {z
n r n

is divisible by 3993 . Since 10 and 3993 are coprime we get an integer


consisting only of digits 9 and divisible by 3993 .

Remarks.
1. The existence of an integer 10` − 1 consisting only of digits 9 and divis-
ible by 3993 may also be demonstrated quite elegantly by means of Euler’s
Theorem. The numbers 10 and 3993 are coprime, so 10ϕ(3993) − 1 is divis-
ible by 3993 . Thus we may take ` = ϕ(3993) .
2. By a computer search it can be found that the smallest integer k satis-
fying the condition of the problem is k = 162 . Then 1996 · 162 = 323352 ;
1997 · 162 = 323514 and
3 2 3 3 5 2
+ 3 2 3 5 1 4
6 4 6 8 6 6

9. Answer : yes.
For any two given worlds, Gandalf can move between them either in both

7
directions or none. Hence, it suffices to show that Gandalf can move to the
world 1 from any given world n . For that, it is sufficient for him to be able
to move from any world n > 1 to some world m such that m < n . We
consider three possible cases:
a) If n = 3k + 1 , then Gandalf can move directly from the world n to the
world k < n .
b) If n = 3k + 2 , then Gandalf can move from the world n to the
world 2n = 6k + 4 = 3 · (2k + 1) + 1 and further to the world 2k + 1 < n .
c) If n = 3k then Gandalf can move from the world n to the world
3n + 1 = 9k + 1 , further from there to the worlds 2 · (9k + 1) = 18k + 2 ,
2 · (18k + 2) = 36k + 4 = 3 · (12k + 1) + 1 , 12k + 1 , 4k and finally to the
world 2k < n .

10. Among the first 40 numbers in the sequence, four are divisible by 10 and
at least one of these has its second digit from the right less than or equal
to 6 . Let this number be x and let y be its sum of digits. Then the
numbers x, x + 1, x + 2, . . . , x + 39 all belong to the sequence, and each
of y, y + 1, . . . , y + 12 appears at least once among their sums of decimal
digits. One of these is divisible by 13 .

Remark : there exist 78 consecutive natural numbers, none of which has its
sum of digits divisible by 13 — e.g. 859999999961 through 860000000038 .

B1 B2 B3 B4 B5
C1 C2 C3 C4 C5 C6 C7 C8 C9 C10
s s s s s s s s s s

s s s s s s s s s s
A1 A2 A3 A4 A5 A6
Figure 2

11. Answer : π − α .
Let C1 , C2 , C3 , . . . be points on the upper line such that |Ci Ci+1 | = 1 and
Bi = C2i for each i = 1, 2, . . . (see Figure 2). Then for any i = 1, 2, . . . we
have

6 Ai Bi Ai+1 = 6 Ai C2i Ai+1 = 6 A1 Ci+1 A2 = 6 Ci+1 A2 Ci+2 .

8
Hence
6 A1 B1 A2 + 6 A2 B2 A3 + 6 A3 B3 A4 + . . . =
= 6 C2 A 2 C3 + 6 C3 A 2 C4 + 6 C4 A 2 C5 + . . . = π − α .

12. Depending on the radii of the circles, the distance between their centres
and the choice of the line through P we have several possible arrangements
of the points A, B, P and Y, Z, Q . We shall show that in each case the
triangles AXY and BXZ are congruent, whence |Y X| = |XZ| .
(a) Point P lies within segment AB and point Q lies within segment Y Z
(see Figure 3). Then
6 AY X = 6 AY Q = π − 6 AP Q = 6 BP Q = 6 BZQ = 6 BZX .

Since also 6 AXY = 6 BXZ and |AX| = |XB| , triangles AXY


and BXZ are congruent.
(b) Point P lies outside of segment AB and point Q lies within seg-
ment Y Z (see Figure 4). Then

frag replacements 6 AY X = 6 AY Q = 6 AP Q = 6 BP Q = 6 BZQ = 6 BZX .


Z
A C1 C2
C1 C2
P
P X
A
X
Q Q
Y B
Y
B

Figure 3 Figure 4

(c) Point P lies outside of segment AB and point Q lies outside of seg-
ment Y Z (see Figure 5). Then
6 AY X = π − 6 AY Q = 6 AP Q = 6 BP Q = 6 BZQ = 6 BZX .

(d) Point P lies within segment AB and point Q lies outside of seg-
ment Y Z . This case is similar to (b): exchange the roles of points
P and Q , A and Y , B and Z .

9
PSfrag replacements

C2
C1 P
X Z
A
Q Y B

Figure 5

13. Let O , H 0 and G0 be the circumcentres of the triangles BDF , BCF


and CDF , respectively (see Figure 6). Then O , G and G0 lie on the
perpendicular bisector of the segment DF , while O , H and H 0 lie on the
perpendicular bisector of the segment BF . Moreover, G and H 0 lie on the
perpendicular bisector of BC , O lies on the perpendicular bisector of BD ,
H and G0 lie on the perpendicular bisector of CD and C is the midpoint
of BD . Hence H 0 and G0 are symmetric to H and G , respectively, relative
to point O . Hence triangles OGH 0 and OG0 H are congruent, and GHG0 H 0
is a parallelogram.
Since CF is the common side of triangles BCF and CDF , the line G0 H 0
connecting their circumcentres is perpendicular to CF . Therefore GH is
also perpendicular to CF .

H0 r
Gr0
O
r
r
G r
A B C H D E

Figure 6

Alternative solution. Note that the diagonals of a quadrangle XY ZW are


perpendicular to each other if and only if |XY |2 −|ZY |2 = |XW |2 −|ZW |2 .
Applying this to the quadrangle GF HC it is sufficient to prove that
|GF |2 −|HF |2 = |GC|2 −|HC|2 . Denote |AB| = |BC| = |CD| = |DE| = a ,
6 GAC = α and 6 HEC = β , and let R1 , R2 be the circumradii of tri-
angles ADF and BEF , respectively (see Figure 7). Applying the cosine
law to triangles CGA and CHE , we have |GC|2 = R12 + 4a2 − 4aR1 cos α

10
replacements
A
B
X 3a
and |HC|2 = R22 + 4a2 − 4aR2 cos β . Together with cos α = and
Y 2R1
Z 3a
Pcos β = this yields |GC|2 − |HC|2 = R12 − R22 . Since |GF | = R1 and
2R2
Q
|HF | = R2 , we also have |GF |2 − |HF |2 = R12 − R22 .
C1
C2
F F

              
              
  
   
         G       G
          H      H
α β
A B C D E A B C D E

Figure 7 Figure 8

Another solution. We shall use the following fact that can easily be de-
rived from the properties of the power of a point: Let a line s intersect
two circles at points K, L and M, N , respectively, and let these circles in-
tersect each other at P and Q . A point X on the line s lies also on the
line P Q (i.e. is the intersection point of the lines s and P Q ) if and only
if |KX| · |LX| = |M X| · |N X| .
The line AE intersects the circumcircles of triangles ADF and BEF
at A, D and B, E , respectively. Since point C lies on line AE and
|AC| · |DC| = |BC| · |EC| , then line CF passes through the second inter-
section point of these circles (see Figure 8) and hence is perpendicular to
the segment GH connecting the centres of these circles.

14. Denote |BC| = a , |CA| = b and |AB| = c , then we have 2b2 = a2 + c2 .


Applying the cosine and sine laws to triangle ABC we have:

cos B (a2 + c2 − b2 ) · 2R (a2 + c2 − b2 ) · R


cot B = = = ,
sin B 2ac · b abc
cos A (b2 + c2 − a2 ) · R
cot A = = ,
sin A abc

11
cos C (a2 + b2 − c2 ) · R
cot C = = ,
sin C abc

where R is the circumradius of triangle ABC . To finish the proof it hence


suffices to show that (a2 + c2 − b2 )2 > (b2 + c2 − a2 )(a2 + b2 − c2 ) . Indeed,
Sfrag replacements
fromAthe AM-GM inequality we get
B
(b2 + c2 − a2 + a2 + b2 − c2 )2
(b2X+ c2 − a2 )(a2 + b2 − c2 ) 6 = b4 =
Y 4
Z = (2b2 − b2 )2 = (a2 + c2 − b2 )2 .
P
Q
B
C1
C2
C1

A1

I
M N
Q
P
A C
B1

Figure 9

15. Let I be the incenter of triangle ABC (the intersection point of the angle
bisectors AA1 , BB1 and CC1 ), and let B1 C1 intersect the side AC and
the angle bisector AA1 at P and Q , respectively (see Figure 9). Then
1 _ _ 1 ³ 1 _ 1 _ 1 _´
6 AQC1 = (AC1 + A1 B1 ) = · AB + BC + CA = 90◦ .
2 2 2 2 2

Since 6 AC1 B1 = 6 B1 C1 C (as their supporting arcs are of equal size), then
C1 B1 is the bisector of angle AC1 I . Moreover, since AI and C1 B1 are
perpendicular, then C1 B1 is also the bisector of angle AM I . Similarly we
can show that B1 C1 bisects the angles AB1 I ja AP I . Hence the diago-
nals of the quadrangle AM IP are perpendicular and bisect its angles, i.e.

12
AM IP is a rhombus and M I is parrallel to AC . Similarly we can prove
that N I is parallel to AC , i.e. points M , I and N are collinear, q.e.d.

16. Answer : the first player has a winning strategy.


Divide all the squares of the board except one in pairs so that the squares
of each pair are accessible from each other by one move of the knight (see
Figure 10 where the squares of each pair are marked with the same number,
and the remaining square is marked by X ). The winning strategy for the
first player will be to place the knight on the square X in the beginning
and further make each move from a square to the other square paired with
it.

X 12 8 3 11 7 1 7 12 23 18 1
5 3 11 1 7 8 22 17 8 13 24
12 8 6 10 4 6 2 11 6 25 2 19
2 5 9 7 1 4 9 16 21 4 9 14
9 6 2 4 10 5 3 5 10 15 20 3

Figure 10 Figure 11 Figure 12

Alternative solution. If the first player places the knight on the square
marked by 1 on Figure 11, then the second player will have two possible
moves which are symmetric to each other relative to a diagonal of the board.
Suppose w.l.o.g. that he makes a move to the square marked by 2 , then the
first player can make his move to the square marked by 3 . At this point,
the second player can only make a move to the square marked by 4 , and
the first player can make his next move to the square marked by 5 ; then
the second player can only make a move to the square marked by 6 , etc.,
until the first player will make a move to the square marked by 9 . Now
the second player will again have two possible moves, but since these two
squares are symmetric relative to a diagonal of the board (and the set of
squares already used is symmetric to that diagonal as well) we can assume
w.l.o.g. that he makes a move to the square marked by 10 . Now the first
player can make his moves until the end of the game so that the second
player will have no choice for his subsequent moves (these moves will be to
the squares marked by 11 through 25 , in this order). We see that the first

13
player will be the one to make the last move, and hence the winner.

17. Answer : n = 324 .


Let ab = n and cd = n+76 , where a, b and c, d are the numbers of squares
in each direction for the partitioning of the rectangle into n and n + 76
a b
squares, respectively. Then = , or ad = bc . Denote u = gcd(a, c)
c d
ja v = gcd(b, d) , then there exist positive integers x and y such that
gcd(x, y) = 1 , a = ux , c = uy and b = vx , d = vy . Hence we have

cd − ab = uv(y 2 − x2 ) = uv(y − x)(y + x) = 76 = 22 · 19 .

Since y − x and y + x are positive integers of the same parity and


gcd(x, y) = 1 , we have y − x = 1 and y + x = 19 as the only possibility,
yielding y = 10 , x = 9 and uv = 4 . Finally we have n = ab = x2 uv = 324 .

18. a) Let A be the set of non-negative integers whose only non-zero decimal
digits are in even positions counted from the right, and B the set of non-
negative integers whose only non-zero decimal digits are in odd positions
counted from the right. It is obvious that A and B have the required
property.
b) Since the only possible representation of 0 is 0 + 0 , we have 0 ∈ A ∩ B .
The only possible representations of 1 are 1 + 0 and 0 + 1 . Hence 1 must
belong to at least one of the sets A and B . Let 1 ∈ A , and let k be the
smallest positive integer such that k 6∈ A . Then k > 1 . If any number b
with 0 < b < k belonged to B , it would have the two representations b + 0
and 0 + b . Hence no such number belongs to B . Also, in k = a + b with
a ∈ A and b ∈ B the number b cannot be 0 since then a = k , contradicting
the assumption that k 6∈ A . Hence b = k , and k ∈ B .
Consider the decomposition of A into the union A1 ∪A2 ∪· · · of its maximal
subsets A1 , A2 , . . . of consecutive numbers, where each element of A1 is
less than each element of A2 etc. In particular, A1 = {0, 1, . . . , k − 1} .
By our assumption the set of all non-negative integers is the union of non-
intersecting sets An + b = {a + b | a ∈ An } with n ∈ N and b ∈ B , each of
these consisting of some number of consecutive integers. We will show that
each subset An has exactly k elements. Indeed, suppose m is the smallest
index for which the number l of elements in Am is different from k , then
l < k since Am + 0 and Am + k do not overlap. Denoting by c the smallest
element of Am , we have c + k − 1 6∈ A , so c + k − 1 = a + b with a ∈ A

14
and 0 6= b ∈ B . Hence, b > k and a < c . Suppose a ∈ An , then n < m
and the subset An has k elements. But then An + b overlaps with either
Am + 0 or Am + k , a contradiction.
Hence, the set of non-negative integers is the union of non-intersecting sets
An + b with n ∈ N and b ∈ B , each of which consists of k consecutive
integers. The smallest element of each of these subsets is a multiple of k .
Since each integer b ∈ B is the smallest element of A1 + b , it follows that
each b ∈ B is a multiple of k .

19. Answer : b) 4 .
a) As each campaign-making animal uses exactly n paths and the total
n(n − 1)
number of paths is , the number of campaign-making animals
2
n−1
cannot exceed . Labeling the caves by integers 0, 1, 2, . . . , n−1 , we
2
n−1
can construct non-intersecting campaign routes as follows:
2

0 → 1 → 2 → 3 → ... → n → 0
0 → 2 → 4 → 6 → . . . → n−1 → 0
0 → 3 → 6 → 9 → . . . → n−2 → 0
···············
n−1 n+1
0→ → n−1 → . . . → →0
2 2

n−1
(As each of these cyclic routes passes through any cave, the
2
campaign-making animals can be chosen arbitrarily).
b) As noted above, the number of campaign-making animals cannot exceed
9−1
= 4 . The 4 non-intersecting campaign routes can be constructed as
2
follows:

0→1→2→8→3→7→4→6→5→0
0→2→3→1→4→8→5→7→6→0
0→3→4→2→5→1→6→8→7→0
0→4→5→3→6→2→7→1→8→0

15
Remark. In fact it can be proved that the maximal number of non-
intersecting Hamiltonian cycles in a complete graph ¹ on nº vertices (that
n−1
is what the problem actually asks for) is equal to for any inte-
2
ger n . The proof uses a construction similar to the one shown in part b) of
the above solution.

20. Answer : there are 9 cards with one black and one white side and 3 cards
with both sides white.
Divide the cards into four types according to the table below.

Type Initially up Initially down


A black white
B white black
C white white
D black black

When the cards 1–6 were turned, the number of cards with a black side up
decreased by 5. Hence among the cards 1–6 there are five of type A and
one of type C or D . The result of all three moves is that cards 7–12 have
been turned over, hence among these cards there must be four of type A ,
and the combination of the other two must be one of the following:
(a) one of type A and one of type B ;
(b) one of type C and one of type D ;
(c) both of type C ;
(d) both of type D .
Hence the unknown card among the cards 1–6 cannot be of type D , since
this would make too many cards having a black side up initially. For the
same reason, the alternatives (a), (b) and (d) are impossible. Hence there
were nine cards of type A and three cards of type C .

Alternative solution. Denote by a1 , a2 , . . . , a12 the sides of each card that


are initially visible, and by b1 , b2 , . . . , b12 the initially invisible sides —
each of these is either white or black. The conditions of the problem imply
the following:
(a) there are 9 black and 3 white sides among a1 , a2 , a3 , a4 , a5 , a6 ,
a7 , a8 , a9 , a10 , a11 , a12 ;
(b) there are 4 black and 8 white sides among b1 , b2 , b3 , b4 , b5 , b6 , a7 ,
a8 , a9 , a10 , a11 , a12 ;

16
(c) there are 6 black and 6 white sides among b1 , b2 , b3 , a4 , a5 , a6 , b7 ,
b8 , b9 , a10 , a11 , a12 ;
(d) there are 5 black and 7 white sides among a1 , a2 , a3 , a4 , a5 , a6 , b7 ,
b8 , b9 , b10 , b11 , b12 .

Cases (b) and (d) together enumerate each of the sides ai and bi exactly
once — hence there are 9 black and 15 white sides altogether. Therefore,
all existing black sides are enumerated in (a), implying that we have 9 cards
with one black and one white side, and the remaining 3 cards have both
sides white.

17
Baltic Way 1998

Warsaw, November 8, 1998

Problems

1. Let Z+ be the set of all positive integers. Find all functions f : Z+ → Z+


satisfying the following conditions for all x, y ∈ Z+ :

f (x, x) = x ,
f (x, y) = f (y, x) ,
(x + y)f (x, y) = yf (x, x+y) .

2. A triple of positive integers (a, b, c) is called quasi-Pythagorean if there


exists a triangle with lengths of the sides a , b , c and the angle opposite
to the side c equal to 120◦ . Prove that if (a, b, c) is a quasi-Pythagorean
triple then c has a prime divisor greater than 5 .

3. Find all pairs of positive integers x , y which satisfy the equation

2x2 + 5y 2 = 11(xy − 11) .

4. Let P be a polynomial with integer coefficients. Suppose that for


n = 1, 2, 3, . . . , 1998 the number P (n) is a three-digit positive integer.
Prove that the polynomial P has no integer roots.

5. Let a be an odd digit and b an even digit. Prove that for every positive
integer n there exists a positive integer, divisible by 2n , whose decimal
representation contains no digits other than a and b .

6. Let P be a polynomial of degree 6 and let a , b be real numbers such that


0 < a < b . Suppose that P (a) = P (−a) , P (b) = P (−b) and P 0 (0) = 0 .
Prove that P (x) = P (−x) for all real x .

7. Let R be the set of all real numbers. Find all functions f : R → R satisfying
for all x, y ∈ R the equation

f (x) + f (y) = f (f (x)f (y)) .

1
8. Let Pk (x) = 1 + x + x2 + · · · + xk−1 . Show that
n µ ¶ ³1 + x´
X n
Pk (x) = 2n−1 Pn
k 2
k=1

for every real number x and every positive integer n .


9. Let the numbers α , β satisfy 0 < α < β < π/2 and let γ and δ be the
numbers defined by the conditions:
(i) 0 < γ < π/2 , and tan γ is the arithmetic mean of tan α and tan β ;
1 1 1
(ii) 0 < δ < π/2 , and is the arithmetic mean of and .
cos δ cos α cos β
Prove that γ < δ .
10. Let n > 4 be an even integer. A regular n -gon and a regular (n−1) -gon
are inscribed into the unit circle. For each vertex of the n -gon consider the
distance from this vertex to the nearest vertex of the (n−1) -gon, measured
along the circumference. Let S be the sum of these n distances. Prove that
S depends only on n , and not on the relative position of the two polygons.
11. Let a , b and c be the lengths of the sides of a triangle with circumradius R .
Prove that
a2 + b 2
R> √ .
2 2a2 + 2b2 − c2
When does equality hold?
12. In a triangle ABC , 6 BAC = 90◦ . Point D lies on the side BC and
satisfies 6 BDA = 26 BAD . Prove that
µ ¶
1 1 1 1
= + .
|AD| 2 |BD| |CD|
13. In a convex pentagon ABCDE , the sides AE and BC are parallel and
6 ADE = 6 BDC . The diagonals AC and BE intersect at P . Prove that
6 EAD = 6 BDP and 6 CBD = 6 ADP .

14. Given a triangle ABC with |AB| < |AC| . The line passing through B and
parallel to AC meets the external bisector of angle BAC at D . The line
passing through C and parallel to AB meets this bisector at E . Point F
lies on the side AC and satisfies the equality |F C| = |AB| . Prove that
|DF | = |F E| .

2
15. Given an acute triangle ABC . Point D is the foot of the perpendicular
from A to BC . Point E lies on the segment AD and satisfies the equation
|AE| |CD|
= .
|ED| |DB|
Point F is the foot of the perpendicular from D to BE . Prove that
6 AF C = 90◦ .

16. Is it possible to cover a 13 × 13 chessboard with forty-two tiles of size 4 × 1


so that only the central square of the chessboard remains uncovered? (It is
assumed that each tile covers exactly four squares of the chessboard, and
the tiles do not overlap.)

17. Let n and k be positive integers. There are nk objects (of the same size)
and k boxes, each of which can hold n objects. Each object is coloured
in one of k different colours. Show that the objects can be packed in the
boxes so that each box holds objects of at most two colours.

18. Determine all positive integers n for which there exists a set S with the
following properties:
(i) S consists of n positive integers, all smaller than 2n−1 ;
(ii) for any two distinct subsets A and B of S , the sum of the elements
of A is different from the sum of the elements of B .

19. Consider a ping-pong match between two teams, each consisting of 1000
players. Each player played against each player of the other team exactly
once (there are no draws in ping-pong). Prove that there exist ten players,
all from the same team, such that every member of the other team has lost
his game against at least one of those ten players.

20. We say that an integer m covers the number 1998 if 1, 9, 9, 8 appear in


this order as digits of m . (For instance, 1998 is covered by 215993698 but
not by 213326798 .) Let k(n) be the number of positive integers that cover
1998 and have exactly n digits (n > 5) , all different from 0 . What is the
remainder of k(n) in division by 8 ?

Solutions

1. Answer: f (x, y) = lcm (x, y) is the only such function.

3
We first show that there is at most one such function f . Let z > 2 be
an integer. Knowing the values f (x, y) for all x, y with 0 < x, y < z , we
compute f (x, z) for 0 < x < z using the third equation (with y = z − x );
then from the first two equations we get the values f (z, y) for 0 < y 6 z .
Hence, if f exists then it is unique.
Experimenting a little, we can guess that f (x, y) is the least common multi-
ple of x and y . It remains to verify that the least-common-multiple function
satisfies the given equations. The first two are clear, and for the third one:

xy x(x + y)
(x + y) · lcm (x, y) = (x + y) · =y· =
gcd(x, y) gcd(x, x + y)
= y · lcm (x, x + y) .

2. By the cosine law, a triple of positive integers (a, b, c) is quasi-Pythagorean


if and only if

c2 = a2 + ab + b2 . (1)

If a triple (a, b, c) with a common divisor d > 1 satisfies (1), then so


³a b c ´
does the reduced triple , , . Hence it suffices to prove that in every
d d d
irreducible quasi-Pythagorean triple the greatest term c has a prime divisor
greater than 5 . Actually, we will show that in that case every prime divisor
of c is greater than 5 .
Let (a, b, c) be an irreducible triple satisfying (1). Note that then a , b and
c are pairwise coprime. We have to show that c is not divisible by 2 , 3
or 5 .
If c were even, then a and b (coprime to c ) should be odd, and (1) would
not hold.
Suppose now that c is divisible by 3 , and rewrite (1) as

4c2 = (a + 2b)2 + 3a2 . (2)

Then a + 2b must be divisible by 3 . Since a is coprime to c , the number


3a2 is not divisible by 9 . This yields a contradiction since the remaining
terms in (2) are divisible by 9 .
Finally, suppose c is divisible by 5 (and hence a is not). Again we get a
contradiction with (2) since the square of every integer is congruent to 0 ,

4
1 or −1 modulo 5 ; so 4c2 − 3a2 ≡ ±2 (mod 5) and it cannot be equal to
(a + 2b)2 . This completes the proof.
Remark. A yet stronger claim is true: If a and b are coprime, then every
prime divisor p > 3 of a2 + ab + b2 is of the form p = 6k + 1 . (Hence
every prime divisor of c in an irreducible quasi-Pythagorean triple (a, b, c)
has such a form.)
This stronger claim can be proved by observing that p does not divide a
and the number g = (a + 2b)a(p−3)/2 is an integer whose square satisfies

g 2 = (a + 2b)2 ap−3 = (4(a2 + ab + b2 ) − 3a2 )ap−3 ≡ −3ap−1 ≡


≡ −3 (mod p) .
Hence −3 is a quadratic residue modulo p . This is known to be true only
for primes of the form 6k+1 ; proofs can be found in many books on number
theory, e.g. [1].
Reference. [1] K. Ireland, M. Rosen, A Classical Introduction to Modern
Number Theory, Second Edition, Springer-Verlag, New York 1990.
3. Answer: x = 14 , y = 27 .
Rewriting the equation as 2x2 − xy + 5y 2 − 10xy = −121 and factoring we
get:
(2x − y) · (5y − x) = 121 .
Both factors must be of the same sign. If they were both negative, we would
x
have 2x < y < , a contradiction. Hence the last equation represents
5
the number 121 as the product of two positive integers: a = 2x − y and
b = 5y −x , and (a, b) must be one of the pairs (1, 121) , (11, 11) or (121, 1) .
Examining these three possibilities we find that only the first one yields
integer values of x and y , namely, (x, y) = (14, 27) . Hence this pair is the
unique solution of the original equation.
4. Let m be an arbitrary integer and define n ∈ {1, 2, . . . , 1998} to be such
that m ≡ n (mod 1998) . Then P (m) ≡ P (n) (mod 1998) . Since P (n) as a
three-digit number cannot be divisible by 1998, then P (m) cannot be equal
to 0 . Hence P has no integer roots.
5. If b = 0 , then N = 10n a meets the demands. For the sequel, suppose
b 6= 0 .

5
Let n be fixed. We prove that if 1 6 k 6 n , then we can find a positive
integer mk < 5k such that the last k digits of mk 2n are all a or b . Clearly,
for k = 1 we can find m1 with 1 6 m1 6 4 such that m1 2n ends with
b
the digit b . (This corresponds to solving the congruence m1 2n−1 ≡
2
modulo 5 .) If n = 1 , we are done. Hence let n > 2 .
Assume that for a certain k with 1 6 k < n we have found the integer mk .
Let c be the (k+1) -st digit from the right of mk 2n (i.e., the coefficient
of 10k in its decimal representation). Consider the number 5k 2n : it ends
with precisely k zeros, and the last non-zero digit is even; call it d . For
any r , the corresponding digit of the number mk 2n + r5k 2n will be c + rd
modulo 10 . By a suitable choice of r 6 4 we can make this digit be either
a or b , according to whether c is odd or even. (As before, this corresponds
d a−c d b−c
to solving one of the congruences r · ≡ or r · ≡ modulo 5 .)
2 2 2 2
Now, let mk+1 = mk + r5k . The last k+1 digits of mk+1 2n are all a or b .
As mk+1 < 5k +4·5k = 5k+1 , we see that mk+1 has the required properties.
This process can be continued until we obtain a number mn such that the
last n digits of N = mn 2n are a or b . Since mn < 5n , the number N has
at most n digits, all of which are a or b .

Alternative solution. The case b = 0 is handled as in the first solution.


Assume that b 6= 0 . We prove the statement by induction on n , postulating,
in addition, that N (the integer we are looking for) must be an n -digit
number.
For n = 1 we take the one-digit number b . Assume the claim is true for a
certain n > 1 , with N ≡ 0 (mod 2n ) having exactly n digits, all a or b ;
thus N < 10n . Define
½ n
10 b + N if N ≡ 0 (mod 2n+1 ) ,
N∗ =
10n a + N if N ≡ 2n (mod 2n+1 ) .

Clearly, N ∗ is an (n+1) -digit number, satisfying


½
0 + 0 (mod 2n+1 ) in the first case,
N∗ ≡
2n + 2n (mod 2n+1 ) in the second case.

In both cases N ∗ is divisible by 2n+1 , and we have the induction claim.


The result follows.

6
6. The polynomial Q(x) = P (x) − P (−x), of degree at most 5 , has roots at
−b , −a , 0 , a and b ; these are five distinct numbers. Moreover, Q0 (0) = 0 ,
showing that Q has a multiple root at 0 . Thus Q must be the constant 0 ,
i.e. P (x) = P (−x) for all x .

7. Answer: f (x) ≡ 0 is the only such function.


Choose an arbitrary real number x0 and denote f (x0 ) = c . Setting
x = y = x0 in the equation we obtain f (c2 ) = 2c . For x = y = c2 the
equation now gives f (4c2 ) = 4c . On the other hand, substituting x = x0
and y = 4c2 we obtain f (4c2 ) = 5c . Hence 4c = 5c , implying c = 0 . As
x0 was chosen arbitrarily, we have f (x) = 0 for all real numbers x .
Obviously, the function f (x) ≡ 0 satisfies the equation. So it is the only
solution.

8. Let A and B be the left- and right-hand side of the claimed formula,
respectively. Since

(1 − x)Pk (x) = 1 − xk ,

we get
n µ ¶ n µ ¶
X n X n
(1 − x) · A = (1 − xk ) = (1 − xk ) = 2n − (1 + x)n
k k
k=1 k=0

and
µ ¶ µ ¶
1+x n−1 1+x
(1 − x) · B = 2 1 − ·2 Pn =
2 2
µ µ ¶n ¶
1+x
= 2n 1 − = 2n − (1 + x)n .
2

Thus A = B for all real numbers x 6= 1 . Since both A and B are polyno-
mials, they coincide also for x = 1 .

Remark. The desired equality can be also proved without multiplication by


(1 − x) , just via regrouping the terms of the expanded Pk ’s and some more
manipulation; this approach is more cumbersome.
p
9. Let f (t) = 1 + t2 . Since f 00 (t) = (1 + t2 )−3/2 > 0 , the function f (t) is

7
strictly convex on (0, ∞) . Consequently,
q µ ¶
1 tan α + tan β
= 1 + tan2 γ = f (tan γ) = f <
cos γ 2
µ ¶
f (tan α) + f (tan β) 1 1 1 1
< = + = ,
2 2 cos α cos β cos δ

and hence γ < δ .

Remark. The use of calculus can be avoided. We only need the midpoint-
convexity of f , i.e., the inequality
s
1 1p 1p
1 + (u + v)2 < 1 + u2 + 1 + v2
4 2 2

for u, v > 0 and u 6= v , which is equivalent (via squaring) to


p
1 + uv < (1 + u2 )(1 + v 2 ) .

The latter inequality reduces (again by squaring) to 2uv < u2 + v 2 , holding


trivially.

Alternative solution. Draw a unit segment OP in the plane and take points
A and B on the same side of line OP so that 6 P OA = 6 P OB = 90◦ ,
6 OP A = α and 6 OP B = β (see Figure 1). Then we have |OA| = tan α ,
1 1
|OB| = tan β , |P A| = and |P B| = .
cos α cos β

β P

N α

B C

A O

Q
Figure 1

8
Let C be the midpoint of the segment AB . By hypothesis, we have
tan α + tan β 1
|OC| = = tan γ , hence 6 OP C = γ and |P C| = .
2 cos γ
Let Q be the point symmetric to P with respect to C . The quadrilateral
1
P AQB is a parallelogram, and therefore |AQ| = |P B| = . Eventu-
cos β
ally,
2 1 1 2
= + = |P A| + |AQ| > |P Q| = 2 · |P C| = ,
cos δ cos α cos β cos γ
and hence δ > γ .
α+β α−β
Another solution. Set x = and y = , then α = x+y , β = x−y
2 2
and
1
cos α cos β = (cos 2x + cos 2y) =
2
1 1 (3)
= (1 − 2 sin2 x) + (2 cos2 y − 1) = cos2 y − sin2 x .
2 2
By the conditions of the problem,
1 ³ sin α sin β ´ 1 sin(α + β) sin x cos x
tan γ = + = · =
2 cos α cos β 2 cos α cos β cos α cos β
and
1 1³ 1 1 ´ 1 cos α + cos β cos x cos y
= + = · = .
cos δ 2 cos α cos β 2 cos α cos β cos α cos β

Using (3) we hence obtain

1 cos2 x cos2 y − sin2 x cos2 x


tan2 δ − tan2 γ = − 1 − tan 2
γ = −1=
cos2 δ cos2 α cos2 β
cos2 x(cos2 y − sin2 x) cos2 x
= 2 − 1 = −1=
(cos2 y − sin x)2 cos2 y − sin2 x
cos2 x − cos2 y + sin2 x sin2 y
= = >0,
cos2 y − sin2 x cos α cos β

showing that δ > γ .

9
10. For simplicity, take the length of the circle to be 2n(n − 1) rather than
2π . The vertices of the (n−1) -gon A0 A1 . . . An−2 divide it into n−1 arcs
of length 2n . By the pigeonhole principle, some two of the vertices of the
n -gon B0 B1 . . . Bn−1 lie in the same arc. Assume w.l.o.g. that B0 and B1
lie in the arc A0 A1 , with B0 closer to A0 and B1 closer to A1 , and that
|A0 B0 | 6 |B1 A1 | .
Consider the circle as the segment [0, 2n(n−1)] of the real line, with both of
its endpoints identified with the vertex A0 and the numbers 2n, 4n, 6n, . . .
identified accordingly with the vertices A1 , A2 , A3 , . . . .
For k = 0, 1, . . . , n−1 , let xk be the “coordinate” of the vertex Bk of the
n -gon. Each arc Bk Bk+1 has length 2(n − 1) . By the choice of labelling,
we have

0 6 x0 < x1 = x0 + 2(n − 1) 6 2n

and, moreover, x0 − 0 6 2n − x1 . Hence 0 6 x0 6 1 .


Clearly, xk = x0 + 2k(n − 1) for k = 0, 1, . . . , n−1 . It is not hard to see
n
that (2k − 1)n 6 xk 6 2kn if 1 6 k 6 , and (2k − 2)n 6 xk 6 (2k − 1)n
2
n
if < k 6 n − 1 . These inequalities are verified immediately by inserting
2
xk = x0 + 2k(n − 1) and taking into account that 0 6 x0 6 1 .
Summing up, we have:
n
1) if 1 6 k 6 , then Bk lies between Ak−1 and Ak , closer to Ak ;
2
recalling that Ak has “coordinate” 2kn , we see that the distance in
question is equal to 2kn − xk = 2k − x0 ;
n
2) if < k 6 n − 1 , then Bk lies between Ak−1 and Ak , closer to Ak−1 ;
2
the distance in question is equal to xk − (2k − 2)n = x0 − 2k + 2n ;
3) for B0 , the distance in question is x0 .
The sum of these distances evaluates to
n/2 n−1
X X
x0 + (2k − x0 ) + (x0 − 2k + 2n)
k=1 k=n/2+1

Note that here x0 appears half of the times with a plus sign and half of the
times with a minus sign. Thus, eventually, all terms x0 cancel out, and the
value of S does not depend on anything but n .

10
11. Answer: equality holds if a = b or the angle opposite to c is equal to 90 ◦ .
Denote the angles opposite to the sides a , b , c by A , B , C , respectively.
By the law of sines we have a = 2R sin A , b = 2R sin B , c = 2R sin C .
Hence, the given inequality is equivalent to each of the following:

4R2 (sin2 A + sin2 B)


R> q ,
2 8R2 (sin2 A + sin2 B) − 4R2 sin2 C

2(sin2 A + sin2 B) − sin2 C > (sin2 A + sin2 B)2 ,


(sin2 A + sin2 B)(2 − sin2 A − sin2 B) > sin2 C ,
(sin2 A + sin2 B)(cos2 A + cos2 B) > sin2 C .

The last inequality follows from the Cauchy–Schwarz inequality:

(sin2 A + sin2 B)(cos2 B + cos2 A) >


> (sin A · cos B + sin B · cos A)2 = sin2 C .

Equality requires that sin A = λ cos B and sin B = λ cos A for a certain
real number λ , implying that λ is positive and A , B are acute angles.
From these two equations we conclude that sin 2A = sin 2B . This means
that either 2A = 2B or 2A + 2B = π ; in other words, a = b or C = 90◦ .
In each of these two cases the inequality indeed turns into equality.
C
PSfrag replacements

O a

A c M B

Figure 2

Alternative solution. Let A , B , C be the respective vertices of the triangle,


O be its circumcentre and M be the midpoint of AB (see Figure 2). The
length mc = |CM | of the median drawn from C is expressed by the well-

11
known formula

4m2c = 2a2 + 2b2 − c2 .

Hence the inequality of the problem can be rewritten as 4Rmc > a2 + b2 ,


or 8Rmc > 4m2c + c2 . The last inequality is equivalent to
p
|mc − R| 6 R2 − (c/2)2 ,
¯ ¯
or ¯|M C| − |OC|¯ 6 |OM | , which is the triangle inequality for triangle
COM .
Equality holds if and only if the points C , O , M are collinear. This
happens if and only if a = b or 6 C = 90◦ .
abc
Remark. Yet another solution can be obtained by setting R =
PSfrag replacements (where S
4S
A area of the triangle) and expressing S by Heron’s formula. After
denotes the
squaringBboth sides, cross-multiplying and cancelling a lot, the inequality
C (a2 −b2 )2 (a2 +b2 −c2 )2 > 0 , with equality if a = b or a2 +b2 = c2 .
reduces to
O
M E
a C
b
c D

A B

Figure 3

12. Let O be the circumcentre of triangle ABC (i.e., the midpoint of BC )


and let AD meet the circumcircle again at E (see Figure 3). Then
6 BOE = 26 BAE = 6 CDE , showing that |DE| = |OE| . Triangles ADC
|AD| |CD| |AD| |BD|
and BDE are similar; hence = , = and finally
|BD| |DE| |CD| |DE|

|AD| |AD| |CD| |BD| |BC| |BC|


+ = + = = =2
|BD| |CD| |DE| |DE| |DE| |OE|

12
which is equivalent to the equality we have to prove.
Sfrag replacements
Alternative
A solution. Let 6 BAD = α and 6 CAD = β . By the conditions

of the
B problem, α + β = 90 (hence sin β = cos α ), 6 BDA = 2α and
6 CDA = 2β . By the law of sines,
C
O
|AD| sin 3α
M = = 3 − 4 sin2 α
|BD| sin α
a
and b
c
|AD|
A = sin 3β = 3 − 4 sin2 β = 3 − 4 cos2 α .
|CD|
B sin β
C
Adding
O these two equalities we get the claimed one.
D C1
E C2
D
E C

A B
F

Figure 4

13. Let C1 and C2 be the circumcircles of triangles AED and BCD , respec-
tively. Let DP meet C2 for the second time at F (see Figure 4). Since
6 ADE = 6 BDC , the ratio of the lengths of the segments EA and BC
is equal to the ratio of the radii of C1 and C2 . Thus the homothety with
centre P that takes AE to CB , also transforms C1 onto C2 . The same
homothety transforms the arc DE of C1 onto the arc F B of C2 . Therefore
6 EAD = 6 BDF = 6 BDP . The second equality is proved similarly.

14. Since the lines BD and AC are parallel and since AD is the external
bisector of 6 BAC , we have 6 BAD = 6 BDA ; denote their common size
by α (see Figure 5). Also 6 CAE = 6 CEA = α , implying |AB| = |BD|
and |AC| = |CE| . Let B 0 , C 0 , F 0 be the feet of the perpendiculars from

13
E
C0 α
0
F
A
B0 α
D α
α
F

B C
Figure 5

the points B , C , F to line DE . From |F C| = |AB| we obtain


|B 0 F 0 | = (|AB| + |AF |) cos α = |AC| cos α = |AC 0 | = |C 0 E|
and
|DB 0 | = |BD| cos α = |F C| cos α = |F 0 C 0 | ,
Thus |DF 0 | = |F 0 E| , whence |DF | = |F E| .

A P

F E

B D C
Figure 6

15. Complete the rectangle ADCP (see Figure 6). In view of


|AE| |CD| |AP |
= = ,
|ED| |DB| |DB|

14
the points B , E , P are collinear. Therefore 6 DF P = 90◦ , and so F
lies on the circumcircle of the rectangle ADCP with diameter AC ; hence
6 AF C = 90◦ .

16. Answer: no.


Label the horizontal rows by integers from 1 to 13 . Assume that the tiling
is possible, and let ai be the number of vertical tiles with their outer squares
in rows i and i+3 . Then bi = ai + ai−1 + ai−2 + ai−3 is the number of
vertical tiles intersecting row i (here we assume aj = 0 if j 6 0 ). Since
there are 13 squares in each row, and each horizontal tile covers four (i.e.
an even number) of these, then bi must be odd for all 1 6 i 6 13 except
for b7 , which must be even.
We now get that a1 = b1 is odd, a2 is even (since b2 = a2 + a1 is odd),
and similarly a3 and a4 are even. Since b5 = a5 + a4 + a3 + a2 is odd, then
a5 must be odd. Continuing this way we find that a6 is even, a7 is odd
(since b7 is even), a8 is odd, a9 is odd and a10 is even. Obviously ai = 0
for i > 10 , as no tile is allowed to extend beyond the edge of the board.
But then b13 = a10 must be both even and odd, a contradiction.

Alternative solution. Colour the squares of the board black and white in
the following pattern. In the first (top) row, let the two leftmost squares
be black, the next two be white, the next two black, the next two white,
and so on (at the right end there remains a single black square). In the
second row, let the colouring be reciprocal to that of the first row (two
white squares, two black squares, and so on). If the rows are labelled by 1
through 13 , let all the odd-indexed rows be coloured as the first row, and
all the even-indexed ones as the second row (see Figure 7).
Note that there are more black squares than white squares in the board.
Each 4 × 1 tile, no matter how placed, covers two black squares and two
white squares. Thus if a tiling leaves a single square uncovered, this square
must be black. But the central square of the board is white. Hence such a
tiling is impossible.

Another solution. Colour the squares in four colours as follows: colour all
squares in the 1-st column green, all squares in the 2-nd column black, all
squares in the 3-rd column white, all squares in the 4-th column red, all
squares in the 5-th column green, all squares in the 6-th column black etc.,
leaving only the central square uncoloured (see Figure 8). Altogether we
have 3 · 13 = 39 black squares and 3 · 13 − 1 = 38 white squares. Since

15
each 4 × 1 tile covers either one square of each colour or all four squares
of the same colour, then the difference of the numbers of black and white
squares must be divisible by 4 . Since 39 − 38 = 1 is not divisible by 4 , the
required tiling does not exist.
G BWR G BWR G BWR G

Figure 7 Figure 8

17. If k = 1 , it is obvious how to do the packing. Now assume k > 1 . There


are not more than n objects of a certain colour — say, pink — and also
not fewer than n objects of some other colour — say, grey. Pack all pink
objects into one box; if there is space left, fill the box up with grey objects.
Then remove that box together with its contents; the problem gets reduced
to an analogous one with k−1 boxes and k−1 colours. Assuming induc-
tively that the task can be done in that case, we see that it can also be done
for k boxes and colours. The general result follows by induction.

18. Answer: all integers n > 4 .


Direct search shows that there is no such set S for n = 1, 2, 3 . For
n = 4 we can take S = {3, 5, 6, 7} . If, for a certain n > 4 we have a
set S = {a1 , a2 , . . . , an } as needed, then the set S ∗ = {1, 2a1 , 2a2 , . . . , 2an }
satisfies the requirements for n + 1 . Hence a set with the required proper-
ties exists if and only if n > 4 .

19. We start with the following observation: In a match between two teams (not
necessarily of equal sizes), there exists in one of the teams a player who won
his games with at least half of the members of the other team.

16
Indeed: suppose there is no such player. If the teams consist of m and
n
n members then the players of the first team jointly won less than m ·
2
n
games, and the players of the second team jointly won less than m ·
2
games — this is a contradiction since the total number of games played is
mn , and in each game there must have been a winner.
Returning to the original problem (with two equal teams of size 1000 ),
choose a player who won his games with at least half of the members of
the other team — such a player exists, according to the observation above,
and we shall call his team “first” and the other team “second” in the sequel.
Mark this player with a white hat and remove from further consideration
all those players of the second team who lost their games to him. Applying
the same observation to the first team (complete) and the second team
truncated as explained above, we again find a player (in the first or in the
second team) who won with at least half of the other team members. Mark
him with a white hat, too, and remove the players who lost to him from
further consideration.
We repeat this procedure until there are no players left in one of the teams;
say, in team Y . This means that the white-hatted players of team X
constitute a group with the required property (every member of team Y
has lost his game to at least one player from that group). Each time when a
player of team X was receiving a white hat, the size of team Y was reduced
at least by half; and since initially the size was a number less than 210 , this
could not happen more than ten times.
Hence the white-hatted group from team X consists of not more than ten
players. If there are fewer than ten, round the group up to ten with any
players.

20. Answer: 1 .
Let 1 6 g < h < i < j 6 n be fixed integers. Consider all n -digit numbers
a = a1 a2 . . . an with all digits non-zero, such that ag = 1 , ah = 9 , ai = 9 ,
aj = 8 and this quadruple 1998 is the leftmost one in a ; that is,


 al 6= 1 if l < g ;

 al 6= 9 if g < l < h ;


 al 6= 9 if h < l < i ;

al 6= 8 if i < l < j .

17
There are kghij (n) = 8g−1 · 8h−g−1 · 8i−h−1 · 8j−i−1 · 9n−j such numbers a .
Obviously, kghij (n) ≡ 1 (mod 8) for g = 1 , h = 2 , i = 3 , j = 4 , and
kghij (n) ≡ 0 (mod 8) in all other cases. Since k(n) is obtained by sum-
ming up the values of kghij (n) over all possible choicecs of g, h, i, j , the
remainder we are looking for is 1 .

18
Baltic Way 1999

Reykjavı́k, November 6, 1999

Problems

1. Determine all real numbers a, b, c, d that satisfy the following system of


equations.


 abc + ab + bc + ca + a + b + c = 1

bcd + bc + cd + db + b + c + d = 9

 cda + cd + da + ac + c + d + a = 9

dab + da + ab + bd + d + a + b = 9

2. Determine all positive integers n with the property that the third root of
n is obtained by removing the last three decimal digits of n .

3. Determine all positive integers n > 3 such that the inequality

a1 a2 + a2 a3 + · · · + an−1 an + an a1 6 0

holds for all real numbers a1 , a2 , . . . , an which satisfy a1 + · · · + an = 0 .

4. For all positive real numbers x and y let


³ y ´
f (x, y) = min x, 2 2
.
x +y

Show that there exist x0 and y0 such that f (x, y) 6 f (x0 , y0 ) for all positive
x and y , and find f (x0 , y0 ) .

5. The point (a, b) lies on the circle x2 + y 2 = 1 . The tangent to the circle
at this point meets the parabola y = x2 + 1 at exactly one point. Find all
such points (a, b) .

6. What is the least number of moves it takes a knight to get from one corner
of an n × n chessboard, where n > 4 , to the diagonally opposite corner?

7. Two squares on an 8 × 8 chessboard are called adjacent if they have a


common edge or common corner. Is it possible for a king to begin in some

1
square and visit all squares exactly once in such a way that all moves except
the first are made into squares adjacent to an even number of squares already
visited?

8. We are given 1999 coins. No two coins have the same weight. A machine
is provided which allows us with one operation to determine, for any three
coins, which one has the middle weight. Prove that the coin that is the
1000 -th by weight can be determined using no more than 1 000 000 op-
erations and that this is the only coin whose position by weight can be
determined using this machine.

9. A cube with edge length 3 is divided into 27 unit cubes. The numbers
1, 2, . . . , 27 are distributed arbitrarily over the unit cubes, with one number
in each cube. We form the 27 possible row sums (there are nine such sums
of three integers for each of the three directions parallel to the edges of the
cube). At most how many of the 27 row sums can be odd?

10. Can the points of a disc of radius 1 (including its circumference) be parti-
tioned into three subsets in such a way that no subset contains two points
separated by distance 1 ?

11. Prove that for any four points in the plane, no three of which are collinear,
there exists a circle such that three of the four points are on the circum-
ference and the fourth point is either on the circumference or inside the
circle.

12. In a triangle ABC it is given that 2|AB| = |AC| + |BC| . Prove that the
incentre of ABC , the circumcentre of ABC , and the midpoints of AC and
BC are concyclic.

13. The bisectors of the angles A and B of the triangle ABC meet the
sides BC and CA at the points D and E , respectively. Assuming that
|AE| + |BD| = |AB| , determine the size of angle C .

14. Let ABC be an isosceles triangle with |AB| = |AC| . Points D and E lie
on the sides AB and AC , respectively. The line passing through B and
parallel to AC meets the line DE at F . The line passing through C and
parallel to AB meets the line DE at G . Prove that

[DBCG] |AD|
= ,
[F BCE] |AE|

2
where [P QRS] denotes the area of the quadrilateral P QRS .

15. Let ABC be a triangle with 6 C = 60◦ and |AC| < |BC| . The point D
lies on the side BC and satisfies |BD| = |AC| . The side AC is extended
to the point E where |AC| = |CE| . Prove that |AB| = |DE| .

16. Find the smallest positive integer k which is representable in the form
k = 19n − 5m for some positive integers m and n .

17. Does there exist a finite sequence of integers c1 , . . . , cn such that all the
numbers a + c1 , . . . , a + cn are primes for more than one but not infinitely
many different integers a ?

18. Let m be a positive integer such that m ≡ 2 (mod 4) . Show that there
exists at most one factorization
q m = ab where a and b are positive integers

satisfying 0 < a − b < 5 + 4 4m + 1 .

19. Prove that there exist infinitely many even positive integers k such that for
every prime p the number p2 + k is composite.

20. Let a , b , c and d be prime numbers such that a > 3b > 6c > 12d and
a2 − b2 + c2 − d2 = 1749 . Determine all possible values of a2 + b2 + c2 + d2 .

Solutions

3

3
1. Answer: a = b = c = 2 − 1 , d = 5 2 − 1 .
Substituting A = a + 1 , B = b + 1 , C = c + 1 , D = d + 1 , we obtain

ABC = 2 (1)
BCD = 10 (2)
CDA = 10 (3)
DAB = 10 (4)

Multiplying (1), (2), (3) gives C 3 (ABD)2 = 200 , which together with (4)
implies C 3 = 2 . Similarly we find
√ A3 = B 3 = 2√and D 3 = 250 . Therefore
3 3
the only solution is a = b = c = 2 − 1 , d = 5 2 − 1 .

2. Answer: 32768 is the only such integer.

3
If n = m3 is a solution, then m satisfies 1000m 6 m3 < 1000(m + 1) .
From the first inequality, we get m2 > 1000 , or m > 32 . By the second
inequality, we then have

m+1 33 1000
m2 < 1000 · 6 1000 · = 1000 + 6 1032 ,
m 32 32

or m 6 32 . Hence, m = 32 and n = m3 = 32768 is the only solution.

3. Answer: n = 3 and n = 4 .
For n = 3 we have

(a1 + a2 + a3 )2 − (a21 + a32 + a23 )


a1 a2 + a 2 a3 + a 3 a1 = 6
2
(a1 + a2 + a3 )2
6 =0.
2

For n = 4 , applying the AM-GM inequality we have

a1 a2 + a2 a3 + a3 a4 + a4 a1 = (a1 + a3 )(a2 + a4 ) 6
(a1 + a2 + a3 + a4 )2
6 =0.
4

For n > 5 take a1 = −1 , a2 = −2 , a3 = a4 = · · · = an−2 = 0 , an−1 = 2 ,


an = 1 . This gives

a1 a2 + a2 a3 + . . . + an−1 an + an a1 = 2 + 2 − 1 = 3 > 0 .
³ 1 1 ´ 1
4. Answer: the maximum value is f √ , √ = √ .
2 2 2
y
We shall make use of the inequality x2 + y 2 > 2xy . If x 6 , then
x2 + y 2

y y 1
x6 6 = ,
x2 + y 2 2xy 2x

1 1
implying x 6 √ , and the equality holds if and only if x = y = √ .
2 2

4
1
If x > √ , then
2

y y 1 1
6 = <√ .
x2 +y 2 2xy 2x 2

y 1
Hence always at least one of x and does not exceed √ . Conse-
+yx2 2
2
1 1
quently f (x, y) 6 √ , with an equality if and only if x = y = √ .
2 2
³ 2√ 6 √
1´ ³2 6 1´
5. Answer: (−1, 0) , (1, 0) , (0, 1) , − ,− , ,− .
5 5 5 5

Since any non-vertical line intersecting the parabola y = x2 + 1 has exactly


two intersection points with it, the line mentioned in the problem must be
either vertical or a common tangent to the circle and the parabola. The only
vertical lines with the required property are the lines x = 1 and x = −1 ,
which meet the circle in the points (1, 0) and (−1, 0) , respectively.
Now, consider a line y = kx + l . It touches the circle if and only if the
system of equations
½ 2
x + y2 = 1
(5)
y = kx + l

has a unique solution, or equivalently the equation x2 + (kx + l)2 = 1 has


unique solution, i.e. if and only if

D1 = 4k 2 l2 − 4(1 + k 2 )(l2 − 1) = 4(k 2 − l2 + 1) = 0 ,

or l2 − k 2 = 1 . The line is tangent to the parabola if and only if the system


½
y = x2 + 1
y = kx + l

has a unique solution, or equivalently the equation x2 = kx + l − 1 has


unique solution, i.e. if and only if

D2 = k 2 − 4(1 − l) = k 2 + 4l − 4 = 0 .

5
From the system of equations
½ 2
l − k2 = 1
k 2 + 4l − 4 = 0

we have l2 + 4l − 5 = 0 , which has two solutions l = 1 and l = −5 . Hence √


the last system of equations has the solutions k =√0 , l = 1 and k = ±2 6 ,
³ 2 6 1´
l = −5 . From (5) we now have (0, 1) and ± ,− as the possible
5 5
points of tangency on the circle.
jn + 1k
6. Answer: 2 · .
3
Label the squares by pairs of integers (x, y), x, y = 1, . . . , n , and consider a
sequence of moves that takes the knight from square (1, 1) to square (n, n) .
The total increment of x+y is 2(n−1) , and the maximal increment in each
move is 3. Furthermore, the parity of x + y shifts in each move, and 1 + 1
and n + n are both even. Hence, the number of moves is even and larger
2 · (n − 1)
than or equal to . If N = 2m is the least integer that satisfies
3
n−1
these conditions, then m is the least integer that satisfies m > , i.e.
3
jn + 1k
m= .
3

replacements

n=4 n=5 n=6

Figure 1
For n = 4 , n = 5 and n = 6 the sequences of moves are easily found that
take the knight from square (1, 1) to square (n, n) in 2 , 4 and 4 moves,

6
respectively (see Figure 1). In particular, the knight may get from square
(k, k) to square (k + 3, k + 3) in 2 moves. Hence, by simple induction, for
any n the knight can get from square (1, 1) to square (n, n) in a number
n+1
of moves equal to twice the integer part of , which is the minimal
3
possible number of moves.

7. Answer: No, it is not possible.


Consider the set S of all (non-ordered) pairs of adjacent squares. Call an
element of S treated if the king has visited both its squares. After the first
move there is one treated pair. Each subsequent move creates a further even
number of treated pairs. So after each move the total number of treated
pairs is odd. If the king could complete his tour then the total number
of pairs of adjacent squares (i.e. the number of elements of S ) would have
to be odd. But the number of elements of S is even as can be seen by
the following argument. Rotation by 180 degrees around the centre of the
board induces a bijection of S onto itself. This bijection leaves precisely
two pairs fixed, namely the pairs of squares sharing only a common corner
at the middle of the board. It follows that the number of elements of S is
even.

8. It is possible to find the 1000 -th coin (i.e. the medium one among the 1999
coins). First we exclude the lightest and heaviest coin — for this we use
1997 weighings, putting the medium-weighted coin aside each time. Next
we exclude the 2 -nd and 1998 -th coins using 1995 weighings, etc. In total
we need

1997 + 1995 + 1993 + . . . + 3 + 1 = 999 · 999 < 1000000

weighings to determine the 1000 -th coin in such a way.


It is not possible to determine the position by weight of any other coin,
since we cannot distinguish between the k -th and (2000−k) -th coin. To
prove this, label the coins in some order as a1 , a2 , . . . , a1999 . If a procedure
for finding the k -th coin exists then it should work as follows. First we
choose some three coins ai1 , aj1 , ak1 , find the medium-weighted one among
them, then choose again some three coins ai2 , aj2 , ak2 (possibly using the
information obtained from the previous weighing) etc. The results of these

7
weighings can be written in a table like this:

Coin 1 Coin 2 Coin 3 Medium


ai 1 a j1 ak1 a m1
ai 2 a j2 ak2 a m2
... ... ... ...
ai n a jn akn a mn

Suppose we make a decision “ ak is the k -th coin” based on this table. Now
let us exchange labels of the lightest and the heaviest coins, of the 2 -nd and
1998 -th (by weight) coins etc. It is easy to see that, after this relabeling,
each step in the procedure above gives the same result as before — but if
ak was previously the k -th coin by weight, then now it is the (2000−k) -th
coin, so the procedure yields a wrong coin which gives us the contradiction.

9. Answer: 24 .
Since each unit cube contributes to exactly three of the row sums, then the
total of all the 27 row sums is 3 · (1 + 2 + . . . + 27) = 3 · 14 · 27 , which is
even. Hence there must be an even number of odd row sums.

+ + + + − − + + − + + − − − −
− + + − + + − − −
+ − + + − + − + −
(a) (b) I II III
Figure 2 Figure 3

We shall prove that if one of the three levels of the cube (in any given
direction) contains an even row sum, then there is another even row sum
within that same level — hence there cannot be 26 odd row sums. Indeed,
if this even row sum is formed by three even numbers (case (a) on Figure 2,
where + denotes an even number and − denotes an odd number), then
in order not to have even column sums (i.e. row sums in the perpendicular
direction), we must have another even number in each of the three columns.
But then the two remaining rows contain three even and three odd numbers,
and hence their row sums cannot both be odd. Consider now the other case
when the even row sum is formed by one even number and two odd numbers
(case (b) on Figure 2). In order not to have even column sums, the column

8
containing the even number must contain another even number and an odd
number, and each of the other two columns must have two numbers of the
same parity. Hence the two other row sums have different parity, and one
of them must be even.
It remains to notice that we can achieve 24 odd row sums (see Figure 3,
where the three levels of the cube are shown).

10. Answer: no.


Let O denote the centre of the disc, and P1 , . . . , P6 the vertices of an
inscribed regular hexagon in the natural order (see Figure 4).

If the required partitioning exists, then {O} , {P1 , P3 , P5 } and {P2 , P4 , P6 }


are contained in different subsets. Now consider√the circles of radius 1 cen-
tered in P1 , P3 and P5 . The circle of radius 1/ 3 centered in O intersects
these three circles in the vertices A1 , A2 , A3 of an equilateral triangle of
side length 1 . The vertices of this triangle belong to different subsets, but
none of them can belong to the same subset as P1 — a contradiction. Hence
PSfrag replacements
the required partitioning does not exist.
n=4
n=5 P4
n=6

 P 
 5 A2  P 3

O
A1

P6 A3 P2

P1

Figure 4

11. Consider a circle containing all these four points in its interior. First, de-
crease its radius until at least one of these points (say, A ) will be on the
circle. If the other three points are still in the interior of the circle, then
rotate the circle around A (with its radius unchanged) until at least one of
the other three points (say, B ) will also be on the circle. The centre of the
circle now lies on the perpendicular bisector of the segment AB — moving

9
n=4
n=5
n=6
P1
P2
the
P3 centre along that perpendicular bisector (and changing its radius at the
P4 time, so that points A and B remain on the circle) we arrive at a
same
situation
P5 where at least one of the remaining two points will also be on the
circle
P6 (see Figure 5).
A1

     #$ #$


A2
A3
 
  
g replacements D C D C

O D C
n=4 O O O
   
 
n=5
n=6
P1 A B
A A
!"  

P2 B B
P3
P4 Figure 5
P5
Alternative
P6 solution. The quadrangle with its vertices in the four points can
be
A1 convex or non-convex.
A2the quadrangle is non-convex, then one of the points lies in the interior
If
A3the triangle defined by the remaining three points (see Figure 6) – the
of
circumcircle
O of that triangle has the required property.
A
B C D0
C
D

)(
'()'
O D

A
&% D A
O
C

B B

Figure 6 Figure 7

Assume now that the quadrangle ABCD (where A, B, C, D are the four
points) is convex. Then it has a pair of opposite angles, the sum of which
is at least 180◦ — assume these are at vertices B and D (see Figure 7).
We shall prove that point D lies either in the interior of the circumcircle
of triangle ABC or on that circle. Indeed, let the ray drawn from the

10
g replacements
n= 4
circumcentre O of triangle ABC through point D intersect the circumcircle
n=in5D0 : since 6 B + 6 D0 = 180◦ and 6 B + 6 D > 180◦ , then D cannot lie
n= in6the exterior of the circumcircle.
P1
12. LetP2 N be the midpoint of BC and M the midpoint of AC . Let O
be
P3 the circumcentre of ABC and I its incentre (see Figure 8). Since
6 PCM O = 6 CN O = 90◦ , the points C , N , O and M are concyclic (re-
4
gardless
P5 of whether O lies inside the triangle ABC ). We now have to
show
P6 that the points C , N , I and M are also concyclic, i.e I lies on
the
A1 same circle as C , N , O and M . It will be sufficient to show that
6 AN CM + 6 N IM = 180◦ in the quadrilateral CN IM . Since
2
A3
|AC| + |BC|
O|AB| = = |AM | + |BN | ,
2
A
we B can choose a point D on the side AB such that |AD| = |AM | and
C = |BN | . Then triangle AIM is congruent to triangle AID , and
|BD|
D
similarly triangle BIN is congruent to triangle BID . Therefore
O

A6 N CM + 6 N IM = 6 N CM + (360 − 26 AID − 26 BID) =
B = 6 BCA + 360◦ − 26 AIB =
C ³ 6 BAC 6 ABC ´
= 6 BCA + 360◦ − 2 · 180◦ − − =
D 2 2
0
D = 6 BCA + 6 ABC + 6 CAB = 180◦ .
O
C C
e~1 e~2

G
M N M N
H
O I O
I

A B A K B

Figure 8 Figure 9

Alternative solution. Let O be the circumcentre of ABC and I its in-

11
centre, and let G , H and K be the points where the incircle touches
the sides BC , AC and AB of the triangle, respectively. Also, let N be
the midpoint of BC and M the midpoint of AC (see Figure 9). Since
6 CM O = 6 CN O = 90◦ , points M and N lie on the circle with diam-
eter OC . We will show that point I also lies on that circle. Indeed, we
have
|AC| + |BC|
|AH| + |BG| = |AK| + |BK| = |AB| = = |AM | + |BN | ,
2

implying |M H| = |N G| . Since M H and N G are the perpendicular pro-


jections of OI to the lines AC and BC , respectively, then IO must be
either parallel or perpendicular to the bisector CI of angle ACB . (To
formally prove this, consider unit vectors e~1 and e~2 defined by the rays
CA and CB , and show that the condition |M H| = |N G| is equivalent to
−→
(e~1 ± e~2 ) · IO = 0 .)
If IO is perpendicular to CI , then 6 CIO = 90◦ and we are done. If
IO is parallel to CI , the the circumcentre O of triangle ABC lies on
the bisector CI of angle ACB , whence |AC| = |BC| and the condition
2|AB| = |AC| + |BC| implies that ABC is an equilateral triangle. Hence
in this case points O and I coincide and the claim of the problem holds
trivially.

13. Answer: 60◦ .


Let F be the point of the side AB such that |AF | = |AE| and |BF | = |BD|
(see Figure 10). The line AD is the angle bisector of 6 A in the isosce-
les triangle AEF . This implies that AD is the perpendicular bisector
of EF , whence |DE| = |DF | . Similarly we show that |DE| = |EF | .
This proves that the triangle DEF is equilateral, i.e. 6 EF D = 60◦ .
Hence 6 AF E + 6 BF D = 120◦ , and also 6 AEF + 6 BDF = 120◦ . Thus
6 CAB + 6 CBA = 120◦ and finally 6 C = 60◦ .

Alternative solution. Let I be the incenter of triangle ABC , and let G ,


H , K be the points where its incircle touches the sides BC , AC , AB
respectively (see Figure 11). Then

|AE| + |BD| = |AB| = |AK| + |BK| = |AH| + |BG| ,

implying |DG| = |EH| . Hence the triangles DIG ja EIH are congruent,

12
M
N
K
H
G
I
and
e~1
e~26 DIE = 6 GIH = 180◦ − 6 C .
O
C C

D G
E E D
I H I

A F B A K B

Figure 10 Figure 11
On the other hand,
6 A+6 B
6 DIE = 6 AIB = 180◦ − .
2
Hence
6 A+6 B 6 C
6 C= = 90◦ − ,
2 2
which gives 6 C = 60◦ .
14. The quadrilaterals DBCG and F BCE are trapeziums. The area of a
trapezium is equal to half the sum of the lengths of the parallel sides multi-
plied by the distance between them. But the distance between the parallel
sides is the same for both of these trapeziums, since the distance from B
to AC is equal to the distance from C to AB . It therefore suffices to show
that
|BD| + |CG| |AD|
=
|CE| + |BF | |AE|
(see Figure 12). Now, since the triangles BDF , ADE and CGE are
similar, we have
|BD| |CG| |AD|
= = ,
|BF | |CE| |AE|

13
D
E
F
K
H
G
which implies the required equality.
I
F0
G G
C
C
E E
A A M
D D
B B
G0
F F
Figure 12 Figure 13

Alternative solution. As in the first solution, we need to show that


|BD| + |CG| |AD|
= .
|BF | + |CE| |AE|

Let M be the midpoint of BC , and let F 0 and G0 be the points symmetric


to F and G , respectively, relative to M (see Figure 13). Since CG is
parallel to AB , then point G0 lies on the line AB , and |BG0 | = |CG| .
Similarly point F 0 lies on the line AC , and |CF 0 | = |BF | . It remains to
show that
|DG0 | |AD|
0
= ,
|EF | |AE|

which follows from DE and F 0 G0 being parallel.

Another solution. Express the areas of the quadrilaterals as

[DBCG] = [ABC] − [ADE] + [ECG]

and

[F BCE] = [ABC] − [ADE] + [DBF ] .

The required equality can now be proved by direct computation.

15. Consider a point F on BC such that |CF | = |BD| (see Figure 14). Since
6 ACF = 60◦ , triangle ACF is equilateral. Therefore |AF | = |AC| = |CE|

14
I
A
B
C
D
and 6 AFEB = 6 ECD = 120◦ . Moreover, |BF | = |CD| . This implies that
trianglesFAF B and ECD are congruent, and |AB| = |DE| .
G
F0 E
G0
M

C
60◦
F D

A B

Figure 14

Alternative solution. The cosine law in triangle ABC implies

|AB|2 = |AC|2 + |BC|2 − 2 · |AC| · |BC| · cos 6 ACB =


= |AC|2 + |BC|2 − |AC| · |BC| =
= |AC|2 + (|BD| + |DC|)2 − |AC| · (|BD| + |DC|) =
= |AC|2 + (|AC| + |DC|)2 − |AC| · (|AC| + |DC|) =
= |AC|2 + |DC|2 + |AC| · |DC|

On the other hand, the cosine law in triangle CDE gives

|DE|2 = |DC|2 + |CE|2 − 2 · |DC| · |CE| · cos 6 DCE =


= |DC|2 + |CE|2 + |DC| · |EC| =
= |DC|2 + |AC|2 + |DC| · |AC| .

Hence |AB| = |DE| .

16. Answer: 14 .
Assume that there are integers n, m such that k = 19n − 5m is a positive
integer smaller than 191 − 51 = 14 . For obvious reasons, n and m must be
positive.
Case 1: Assume that n is even. Then the last digit of k is 6 . Consequently,
we have 19n − 5m = 6 . Considering this equation modulo 3 implies that m

15
must be even as well. With n = 2n0 and m = 2m0 the above equation can
0 0 0 0
be restated as (19n + 5m )(19n − 5m ) = 6 which evidently has no solution
in positive integers.
Case 2: Assume that n is odd. Then the last digit of k is 4 . Consequently,
we have 19n − 5m = 4 . On the other hand, the remainder of 19n − 5m
modulo 3 is never 1 , a contradiction.
17. Answer: yes.
Let n = 5 and consider the integers 0, 2, 8, 14, 26 . Adding a = 3 or a = 5
to all of these integers we get primes. Since the numbers 0 , 2 , 8 , 14 and
26 have pairwise different remainders modulo 5 then for any integer a the
numbers a + 0 , a + 2 , a + 8 , a + 14 and a + 26 have also pairwise different
remainders modulo 5 ; therefore one of them is divisible by 5 . Hence if the
numbers a + 0 , a + 2 , a + 8 , a + 14 and a + 26 are all primes then one of
them must be equal to 5 , which is only true for a = 3 and a = 5 .

18. Squaring the second inequality gives (a − b)2 < 5 + 4 4m + 1 . Since
m = ab , we have
√ √
(a + b)2 < 5 + 4 4m + 1 + 4m = ( 4m + 1 + 2)2 ,
implying

a+b< 4m + 1 + 2 .
Since a > b , different factorizations m = ab will give different values for
the sum a + b ( ab = m, a + b = k, a > b has at most one solution in (a, b) ).
Since m ≡ 2 (mod 4) , we see that a and b must have different parity, and
a + b must be odd. Also note that
√ √
a + b > 2 ab = 4m .
Since 4m cannot be a square we have

a + b > 4m + 1 .
√ √
Since a + b is odd and the interval [ 4m + 1, 4m + 1 + 2 ) contains ex-
actly one odd integer, then there can be at most
q one pair (a, b) such that
√ √
a + b < 4m + 1 + 2 , or equivalently a − b < 5 + 4 4m + 1 .

19. Note that the square of any prime p 6= 3 is congruent to 1 modulo 3 . Hence
the numbers k = 6m + 2 will have the required property for any p = 6 3 , as

16
p2 + k will be divisible by 3 and hence composite.
In order to have 32 +k also composite, we look for such values of m for which
k = 6m + 2 is congruent to 1 modulo 5 — then 32 + k will be divisible
by 5 and hence composite. Taking m = 5t + 4 , we have k = 30t + 26 ,
which is congruent to 2 modulo 3 and congruent to 1 modulo 5 . Hence
p2 + (30t + 26) is composite for any positive integer t and prime p .

20. Answer: the only possible value is 1999 .


Since a2 − b2 + c2 − d2 is odd, one of the primes a , b , c and d must be 2 ,
and in view of a > 3b > 6c > 12d we must have d = 2 . Now

1749 = a2 − b2 + c2 − d2 > 9b2 − b2 + 4d2 − d2 = 8b2 − 12 ,

b
implying b 6 13 . From 4 < c < we now have c = 5 and b must be either
2
11 or 13 . It remains to check that 1749 + 22 − 52 + 132 = 1897 is not a
square of an integer, and 1749 + 22 − 52 + 112 = 1849 = 432 . Hence b = 11 ,
a = 43 and

a2 + b2 + c2 + d2 = 432 + 112 + 52 + 22 = 1999 .

17
Baltic Way 2000

Oslo, November 4, 2000

Problems

1. Let K be a point inside the triangle ABC . Let M and N be points such
that M and K are on opposite sides of the line AB , and N and K are on
opposite sides of the line BC . Assume that
6 M AB = 6 M BA = 6 N BC = 6 N CB = 6 KAC = 6 KCA .

Show that M BN K is a parallelogram.

2. Given an isosceles triangle ABC with 6 A = 90◦ . Let M be the midpoint


of AB . The line passing through A and perpendicular to CM intersects
the side BC at P . Prove that 6 AM C = 6 BM P .

3. Given a triangle ABC with 6 A = 90◦ and |AB| 6= |AC| . The points
D , E , F lie on the sides BC , CA , AB , respectively, in such a way that
AF DE is a square. Prove that the line BC , the line F E and the line
tangent at the point A to the circumcircle of the triangle ABC intersect
in one point.

4. Given a triangle ABC with 6 A = 120◦ . The points K and L lie on


the sides AB and AC , respectively. Let BKP and CLQ be equilateral
triangles constructed outside the triangle ABC . Prove that

3
|P Q| > · (|AB| + |AC|) .
2

|BC| |AB| + |BC|


5. Let ABC be a triangle such that = . Determine
|AB| − |BC| |AC|
the ratio 6 A : 6 C.

6. Fredek runs a private hotel. He claims that whenever n > 3 guests visit
the hotel, it is possible to select two guests who have equally many acquain-
tances among the other guests, and who also have a common acquaintance
or a common unknown among the guests. For which values of n is Fredek
right?

1
(Acquaintance is a symmetric relation.)

7. In a 40 × 50 array of control buttons, each button has two states: ON and


OFF. By touching a button, its state and the states of all buttons in the
same row and in the same column are switched. Prove that the array of
control buttons may be altered from the all-OFF state to the all-ON state
by touching buttons successively, and determine the least number of touches
needed to do so.

8. Fourteen friends met at a party. One of them, Fredek, wanted to go to bed


early. He said goodbye to 10 of his friends, forgot about the remaining
3 , and went to bed. After a while he returned to the party, said goodbye
to 10 of his friends (not necessarily the same as before), and went to bed.
Later Fredek came back a number of times, each time saying goodbye to
exactly 10 of his friends, and then went back to bed. As soon as he had said
goodbye to each of his friends at least once, he did not come back again. In
the morning Fredek realised that he had said goodbye a different number of
times to each of his thirteen friends! What is the smallest possible number
of times that Fredek returned to the party?

9. There is a frog jumping on a 2k ×p2k chessboard, composed of unit squares.


The frog’s jumps are of length 1 + k 2 and they carry the frog from the
center of a square to the center of another square. Some m squares of the
board are marked with an × , and all the squares into which the frog can
jump from an × ’d square (whether they carry an × or not) are marked
with an ◦ . There are n ◦ ’d squares. Prove that n > m .

10. Two positive integers are written on the blackboard. Initially, one of them
is 2000 and the other is smaller than 2000 . If the arithmetic mean m of
the two numbers on the blackboard is an integer, the following operation is
allowed: one of the two numbers is erased and replaced by m . Prove that
this operation cannot be performed more than ten times. Give an example
where the operation can be performed ten times.

11. A sequence of positive integers a1 , a2 , . . . is such that for each m and n


the following holds: if m is a divisor of n and m < n , then am is a divisor
of an and am < an . Find the least possible value of a2000 .

12. Let x1 , x2 , . . . , xn be positive integers such that no one of them is an initial


fragment of any other (for example, 12 is an initial fragment of 12 , 125 and

2
12405 ). Prove that
1 1 1
+ + ··· + <3.
x1 x2 xn

13. Let a1 , a2 , . . . , an be an arithmetic progression of integers such that i


divides ai for i = 1, 2, . . . , n − 1 and n does not divide an . Prove that n
is a power of a prime.

14. Find all positive integers n such that n is equal to 100 times the number
of positive divisors of n .

15. Let n be a positive integer not divisible by 2 or 3 . Prove that for all
integers k , the number (k + 1)n − k n − 1 is divisible by k 2 + k + 1 .

16. Prove that for all positive real numbers a , b , c we have


p p p
a2 − ab + b2 + b2 − bc + c2 > a2 + ac + c2 .

17. Find all real solutions to the following system of equations:




 x + y + z + t = 5

xy + yz + zt + tx = 4
 xyz + yzt + ztx + txy = 3


xyzt = −1

18. Determine all positive real numbers x and y satisfying the equation
1 1 √ p
x+y+ + + 4 = 2 · ( 2x + 1 + 2y + 1) .
x y
1
19. Let t > be a real number and n a positive integer. Prove that
2

t2n > (t − 1)2n + (2t − 1)n .

20. For every positive integer n , let

(2n + 1) · (2n + 3) · · · · · (4n − 1) · (4n + 1)


xn = .
2n · (2n + 2) · · · · · (4n − 2) · 4n
1 √ 2
Prove that < xn − 2 < .
4n n

3
Solutions

1. Denote 6 M AB = 6 M BA = · · · = α . Then
6 M AK = α + (6 BAC − α) = 6 BAC ,

|AM | 1 |AK| 1
= and = (see Figure 1). Hence the tri-
|AB| 2 cos α |AC| 2 cos α
|BC|
angles M AK and BAC are similar, implying |M K| = . Since
2 cos α
|BC|
|BN | = , we have |M K| = |BN | . Similarly we can show that
2 cos α
|BM | = |N K| , and the result follows.

C K
C

α α N
N
α P
α K

A α α B
M A M B
Figure 1 Figure 2

2. Choose the point K such that ABKC is a square. Let N be the point of
intersection of AP and BK (see Figure 2). Since the lines AN and CM
are perpendicular, N is the midpoint of BK . Moreover, triangles AM C
and BN A are congruent, which gives
6 AM C = 6 BN A . (1)

Since |BM | = |BN | and 6 M BP = 6 N BP , it follows that triangles M BP


and N BP are congruent. This implies that
6 BM P = 6 BN P . (2)

Combining (1) ja (2) yields the required equality.

4
3. Let BC and F E meet at P (see Figure 3). It suffices to show that the line
AP is tangent to the circumcircle of the triangle ABC .

F
PSfrag replacements
E
B P
D C

Figure 3

Since F E is the axis of symmetry of the square AF DE , we have


6 AP E = 6 BP F . Moreover, 6 AEP = 135◦ = 6 BF P . Hence triangles
AP E and BP F are similar, and 6 CAP = 6 ABC , i.e. the line AP is
tangent to the circumcircle of ABC .

4. Since 6 ABC + 6 ACB = 60◦ , the lines BP and CQ are parallel. Let X
and Y be the feet of perpendiculars
√ from A to BP and √ CQ , respectively
3 3
(see Figure 4). Then |AX| = |AB| and |AY | = |AC| . Since the
2 2
points X , A and Y are collinear, we get

3
|P Q| > |XY | = (|AB| + |AC|) .
2

A Y
X
P 120◦ L
K

B C
Figure 4

5
5. Answer: 1 : 2 .
a c+a
Denote |BC| = a , |AC| = b , |AB| = c . The condition =
c−a b
implies c2 = a2 + ab and
c a
= .
a+b c
a
Let D be a point on AB such that |BD| = · c (see Figure 5). Then
a+b

|BD| c a |BC|
= = = ,
|BC| a+b c |BA|
so triangles BCD and BAC are similar, implying 6 BCD = 6 BAC . Also,
|AC| |AD| |BC| |AC|
= yields = , and hence by the bisector theorem
|BC| |BD| |BD| |AD|
CD is the bisector of 6 BCA . So the ratio asked for is 1 : 2 .

B
D
c a

A b C
Figure 5

6. Answer: Fredek is right for all n 6= 4 .


Suppose that any two guests of Fredek having the same number of acquain-
tances have neither a common acquaintance nor a common unknown. From
the set K of Fredek’s guests choose any two guests A and B having the
same number of acquaintances (the existence of such two guests follows
from the pigeonhole principle). It then follows from our assumption that A
1 1
and B have both either n or n − 1 acquaintances in K , depending on
2 2
whether A and B are acquainted or not. This proves in particular that for
any odd n Fredek is right.
Assume now that n is even, and n > 6 . Choose from K \ {A, B} two

6
guests C , D with the same number of acquaintances in K \ {A, B} . Since
every guest in K \ {A, B} is acquaintance either with A or with B but not
with both, C and D have the same number of acquaintances in K , which
1 1
implies that they both have either n or n − 1 acquaintances in K .
2 2
Finally, choose from K \ {A, B, C, D} two guests E , F with the same num-
ber of acquaintances in K \ {A, B, C, D} (this is possible as n > 6 ). Since
every guest in K \ {A, B, C, D} has exactly two acquaintances in the set
{A, B, C, D} , the guests E and F have the same number of acquaintances
1 1
in K , which means that they both have either n or n − 1 acquaintances
2 2
in K . Thus at least four people among A , B , C , D , E , F have the same
number of acquaintances in K . Select any three of these four guests – then
one of these three is either a common acquaintance or a common unknown
for the other two.
For n = 4 Fredek is not right. The diagram on Figure 6 gives the coun-
terexample (where points indicate guests and lines show acquaintances).

A B
u u

u u

Figure 6

7. Answer: 2000 .
Altering the state from all-OFF to all-ON requires that the state of each
button is changed an odd number of times. This is achieved by touching
each button once. We prove that the desired result cannot be achieved if
some button is never touched. In order to turn this button ON, the total
number of touches of the other buttons in its row and column must be odd.
Hence either the other buttons in its row or in its column — say, in its
row — must be touched an odd number of times altogether. In order to
change the state of each of these (odd number of) buttons an odd number
of times, the total number of touches of all the other buttons on the panel
(i.e. outside of the selected row) must be even. But then we have an even

7
total number of state changes for the (odd number of) other buttons in the
selected column, whereas an odd number is required to alter the state of all
these buttons. Hence the minimal number of touches is 40 · 50 = 2000 .
8. Answer: Fredek returned at least 32 times.
Assume Fredek returned k times, i.e. he was saying good-bye k + 1 times
to his friends. There exists a friend of Fredek, call him X13 , about whom
Fredek forgot k times in a row, starting from the very first time – otherwise
Fredek would have come back less than k times.
Consider the remaining friends of Fredek: X1 , X2 , . . . , X12 . Assume that
Fredek forgot xj times about each friend Xj . Since Fredek forgot a different
number of times about each of his friends, so we can assume w.l.o.g. that
xj > j − 1 for j = 1, 2, . . . , 12 . Since X13 was forgotten by Fredek k times,
and since Fredek forgot about exactly three of his friends each time, we
have
3(k + 1) = x1 + x2 + x3 + . . . + x12 + k >
> 0 + 1 + 2 + 3 + . . . + 11 + k =
= 66 + k .
Therefore 2k > 63 , which gives k > 32 .
It is possible that Fredek returned 32 times, i.e. he was saying good-bye
33 times to his friends. The following table shows this. The i -th column
displays the three friends Fredek forgot while saying good-bye for the i -th
time (i.e. before his i -th return). For simplicity we write j in place of Xj .

13 ... 13 13 13 . . . 13 13 ... 13 13 13 13 13 13 13 13 11
11 ... 11 11 8 . . . 8 7 ... 7 7 4 4 4 4 3 3 3
10
| .{z
.. 10} 9 9| .{z
.. 9} 6| .{z
.. 6} 5 5 5 5 5 2 2 1
10 8 6

9. Label the squares by pairs of integers (i, j) where 1 6 i, j 6 2k . Let L be


the set of all such pairs. Define a function f : L → L by

 (i + 1, j + k) for i odd and j 6 k,

(i − 1, j + k) for i even and j 6 k,
f (i, j) =
 + 1, j − k) for i odd and j > k,
 (i
(i − 1, j − k) for i even and j > k.
It is easy to see that f is one-to-one. Let X ⊂ L be the set of × ’d
squares and O ⊂ L the set of ◦ ’d squares. Since the distance from (i, j) to

8
p
(i ± 1, j ± k) is 1 + k 2 , we have f (i, j) ∈ O for every (i, j) ∈ X . Now,
since f is one-to-one, the number of elements in f (S) is the same as the
number of elements in S . As f (X) ⊂ O , the number of elements in X is
at most the number of elements in O , or m 6 n .
10. Each time the operation is performed, the difference between the two num-
bers on the blackboard will become one half of its previous value (regardless
of which number was erased). The mean value of two integers is an integer if
and only if their difference is an even number. Suppose the initial numbers
were a = 2000 and b . It follows that the operation can be performed n
times if and only if a − b is of the form 2n u . This shows that n 6 10 since
211 > 2000 . Choosing b = 976 so that a − b = 1024 = 210 , the operation
can be performed 10 times.
11. Answer: 128 .
Let d denote the least possible value of a2000 . We shall prove that d = 128 .
Clearly the sequence defined by a1 = 1 and an = 2α1 +α2 +···+αk for
αk
n = pα 1 α2
1 p2 · · · · · p k has the required property. Since 2000 = 24 · 53 ,
4+3
we have a2000 = 2 = 128 and therefore d 6 128 .
Note that in the sequence 1 < 5 < 25 < 125 < 250 < 500 < 1000 < 2000
each term is divisible by the previous one. As a1 > 1 it follows that

a2000 > 2 · a1000 > 22 · a500 > 23 · a250 > . . . > 27 · a1 > 27 = 128 .

12. Let {y1 , . . . , yk } ⊂ {x1 , . . . , xn } be a subset of numbers with the maximal


number of digits, and differing from one another only by their last dig-
its: y1 = yα1 , y2 = yα2 , . . . , yk = yαk (here yαi denotes the number
consisting of y as its initial fragment and αi as its last digit). Then we
have
1 1 1 1 1 1
+ ... + 6 + ... + < 10 · = .
y1 yk y0 y9 y0 y
Let’s replace all numbers y1 , y2 , . . . , yk by a single y in the set {x1 , . . . , xn } .
Then the obtained set of numbers still has the property mentioned in the
statement of the problem, and the sum of their reciprocals does not decrease.
Continuing to reduce the given set of numbers in the same way, we finally
obtain
1 1 1 1 1 1
+ + ··· + 6 + + ... + < 3.
x1 x2 xn 1 2 9

9
13. Assume ai = k + di for i = 1, 2, . . . , n . Then k is a multiple of every
i ∈ {1, 2, . . . , n − 1} but not a multiple of n . If n = ab with a, b > 1 and
gcd(a, b) = 1 , then k is divisible by both a and b , but not by n , which is
a contradiction. Hence, n has only one prime factor.

14. Answer: 2000 is the only such integer.


Let d(n) denote the number of positive divisors of n and p . n denote
the exponent of the prime p in the canonical representation of n . Let
n
δ(n) = . Using this notation, the problem reformulates as follows:
d(n)
Find all positive integers n such that δ(n) = 100 .
Lemma: Let n be an integer and m its proper divisor. Then δ(m) 6 δ(n)
and the equality holds if and only if m is odd and n = 2m .
Proof. Let n = mp for a prime p . By the well-known formula
Y
d(n) = (1 + p . n)
p

we have
δ(n) n d(m) 1+p.m p.n 1
= · =p· =p· > 2 · = 1,
δ(m) m d(n) 1+p.n 1+p.n 2

hence δ(m) 6 δ(n) . It is also clear that equality holds if and only if p = 2
and p . n = 1 , i.e. m is odd and n = 2m .
For the general case n = ms where s > 1 is an arbitrary positive integer,
represent s as a product of primes. By elementary induction on the num-
ber of factors in the representation we prove δ(m) 6 δ(n) . The equality
can hold only if all factors are equal to 2 and the number m as well as
any intermediate result of multiplying it by these factors is odd, i.e. the
representation of s consists of a single prime 2 , which gives n = 2m . This
proves the lemma.
Now assume that δ(n) = 100 for some n , i.e. n = 100 · d(n) = 22 · 52 · d(n) .
In the following, we estimate the exponents of primes in the canonical rep-
resentation of n , using the fact that 100 is a divisor of n .
25 · 100 3200
(1) Observe that δ(27 · 52 ) = = > 100 . Hence 2 . n 6 6 , since
8·3 24
otherwise 27 · 52 divides n and, by the lemma, δ(n) > 100 .

10
52 · 100 2500
(2) Observe that δ(22 · 54 ) = = > 100 . Hence 5 . n 6 3 , since
3·5 15
2 4
otherwise 2 · 5 divides n and, by the lemma, δ(n) > 100 .
34 · 100 8100
(3) Observe that δ(22 · 52 · 34 ) = = > 100 . Hence 3 . n 6 3 ,
3·3·5 45
since otherwise 22 · 52 · 34 divides n and, by the lemma, δ(n) > 100 .
(4) Take a prime q > 5 and an integer k > 4 . Then

22 · 5 2 · q k 22 · 5 2 · q k 22 · 5 2 · 3 k
δ(22 · 52 · q k ) = = > =
d(22 · 52 · q k ) d(22 · 52 · 3k ) d(22 · 52 · 3k )
= δ(22 · 52 · 3k ) > 100.

Hence, similarly to the previous cases, we get q . n 6 3 .


(5) If a prime q > 7 divides n , then q divides d(n) . Thus q divides
1 + p . n for some prime p . But this is impossible because, as the previous
cases showed, p . n 6 6 for all p . So n is not divisible by primes greater
than 7 .
(6) If 7 divides n , then 7 divides d(n) and hence divides 1 + p . n for
some prime p . By (1)–(4), this implies p = 2 and 2 . n = 6 . At the same
time, if 2 . n = 6 , then 7 divides d(n) and n . So 7 divides n if and only
24 · 7 · 100 11200
if 2 . n = 6 . Since δ(26 · 52 · 7) = = > 100 , both of
7·3·2 42
these conditions cannot hold simultaneously. So n is not divisible by 7 and
2 . n 6 5.
(7) If 5 . n = 3 , then 5 divides d(n) and hence divides 1 + p . n for some
prime p . By (1)–(4), this implies p = 2 and 2 . n = 4 . At the same time,
if 2 . n = 4 , then 5 divides d(n) , 53 divides n and, by (2), 5 . n = 3 . So
22 · 5 · 100
5 . n = 3 if and only if 2 . n = 4 . Since δ(24 · 53 ) = = 100 , we
5·4
find that n = 24 · 53 = 2000 satisfies the required condition. On the other
hand, if 2 . n = 4 and 5 . n = 3 for some n 6= 2000 , then n = 2000s for
some s > 1 and, by the lemma, δ(n) > 100 .
(8) The case 5 . n = 2 has remained. By (7), we have 2 . n 6= 4 , so
2 . n ∈ {2, 3, 5} . The condition 5 . n = 2 implies that 3 divides d(n)
and n , thus 3 . n ∈ {1, 2, 3} . If 2 . n = 3 , then d(n) is divisible by 2
but not by 4 . At the same time 2 . n = 3 implies 3 + 1 = 4 divides
d(n) , a contradiction. Thus 2 . n ∈ {2, 5} , and 32 divides d(n) and n , i.e.

11
3 . n ∈ {2, 3} . Now 3 . n = 2 would imply that 33 divides d(n) and n , a
contradiction; on the other hand 3 . n = 3 would imply 3 . d(n) = 2 and
hence 3 . n = 2 , a contradiction.

15. Note that n must be congruent to 1 or 5 modulo 6 , and proceed by


induction on bn/6c . It can easily be checked that the assertion holds for
n ∈ {1, 5} . Let n > 6 , and put t = k 2 + k + 1 . The claim follows by:
¡ ¢
(k + 1)n − k n − 1 = (t + k)(k + 1)n−2 − t − (k + 1) k n−2 − 1
≡ k(k + 1)n−2 + (k + 1)k n−2 − 1
¡ ¢
≡ (t − 1) (k + 1)n−3 + k n−3 − 1
≡ −(k + 1)n−3 − k n−3 − 1
¡ ¢
≡ −(t + k)(k + 1)n−5 − t − (k + 1) k n−5 − 1
≡ −k(k + 1)n−5 + (k + 1)k n−5 − 1
¡ ¢
≡ −(t − 1) (k + 1)n−6 − k n−6 − 1
≡ (k + 1)n−6 − k n−6 − 1 (mod t).

Alternative solution. Let P (k) = (k + 1)n − k n − 1 , and let ω1 , ω2 be


the two roots of the quadratic polynomial k 2 + k + 1 . The problem is then
equivalent to showing that P (ω1 ) = P (ω2 ) = 0 when gcd(n, 6) = 1 , which
is easy to check.

b
A
C
a 60◦ 60◦ c

Figure 7

16. If |OA| = a , |OB| = b , |OC| = c (see Figure 7), then the inequality follows
from |AC| 6 |AB|+|BC| by applying the cosine theorem to triangles AOB ,

12
BOC and AOC . The same argument holds if the quadrangle OABC is
concave.
√ √ √
1± 2 1∓ 2 1± 2
17. Answer : x = , y = 2, z = , t = 2 or x = 2 , y = ,
√2 2 2
1∓ 2
z = 2, t = .
2
Let A = x + z and B = y + t . Then the system of equations is equivalent
to


 A+B = 5

AB = 4

 Bxz + Ayt = 3

(Bxz) · (Ayt) = −4 .

The first two of these equations imply {A, B} = {1, 4} and the last two
give {Bxz, Ayt} = {−1, 4} . Once A = x + z , B = y + t , Bxz and Ayt
are known, it is easy to find the corresponding values of x , y , z and t .
The solutions are shown in the following table.
A B Bxz Ayt x, z y, t

1± 2
1 4 -1 4 2
2
1 4 4 -1 - -
4 1 -1 4 - -√
1± 2
4 1 4 -1 2
2

18. Answer : x = y = 1 + 2.
Note that

1 √ x2 + 2x + 1 − 2x 2x + 1 1 √
x + + 2 − 2 2x + 1 = = (x − 2x + 1)2 .
x x x
Hence the original equation can be rewritten as
1³ √ ´2 1 ³ p ´2
x − 2x + 1 + y − 2y + 1 = 0 .
x y
√ p
For x, y > 0 this gives x − 2x + 1 = 0 and y − 2y + 1 . It follows that

the only solution is x = y = 1 + 2 .

13
19. Use induction. For n = 1 the inequality reads t2 > (t − 1)2 + (2t − 1) which
is obviously true. To prove the induction step it suffices to show that

t2 (t − 1)2n + t2 (2t − 1)n > (t − 1)2n+2 + (2t − 1)n+1 .

1
This easily follows from t2 > (t−1)2 (which is true for t > ) and t2 > 2t−1
2
(which is true for any real t ).

Alternative solution. Note that


¡ ¢n
t2n = (t2 )n = (t − 1)2 + (2t − 1) .

Applying the binomial formula to the right-hand side we obtain a sum


containing both summands of the right-hand side of the given equality and
other summands each of which is clearly non-negative.

20. Squaring both sides of the given equality and applying x(x + 2) 6 (x + 1) 2
to the numerator of the obtained fraction and cancelling we have

(2n + 1) · (4n + 1) 2
x2n 6 <2+ .
(2n)2 n

Similarly (applying x(x + 2) 6 (x + 1)2 to the denominator and cancelling)


we get

(4n + 1)2 1
x2n > >2+ .
2n · 4n n

Hence
1 2
< x2n − 2 <
n n

and
1 √ 2
√ < xn − 2 < √ .
n(xn + 2) n(xn + 2)

From the first chain of inequalities we get xn > 2 and xn < 2 . The result
then follows from the second chain of inequalities.

14
Comment. These inequalities can easily be improved. For example, the
inequalities in the solution involving x2n can immediately be replaced by
3 2
< x2n − 2 < .
2n n

15
Baltic Way 2001

Hamburg, November 4, 2001

Problems

1. A set of 8 problems was prepared for an examination. Each student was


given 3 of them. No two students received more than one common problem.
What is the largest possible number of students?

2. Let n > 2 be a positive integer. Find whether there exist n pairwise


nonintersecting nonempty subsets of {1, 2, 3, . . .} such that each positive
integer can be expressed in a unique way as a sum of at most n integers,
all from different subsets.

3. The numbers 1, 2, . . . , 49 are placed in a 7 × 7 array, and the sum of the


numbers in each row and in each column is computed. Some of these 14
sums are odd while others are even. Let A denote the sum of all the odd
sums and B the sum of all even sums. Is it possible that the numbers were
placed in the array in such a way that A = B ?

4. Let p and q be two different primes. Prove that


jpk j 2p k j 3p k j (q − 1)p k 1
+ + + ... + = (p − 1)(q − 1) .
q q q q 2

(Here bxc denotes the largest integer not greater than x .)

5. Let 2001 given points on a circle be colored either red or green. In one
step all points are recolored simultaneously in the following way: If both
direct neighbors of a point P have the same color as P , then the color of P
remains unchanged, otherwise P obtains the other color. Starting with the
first coloring F1 , we obtain the colorings F2 , F3 , . . . after several recoloring
steps. Prove that there is a number n0 6 1000 such that Fn0 = Fn0 +2 . Is
the assertion also true if 1000 is replaced by 999 ?

6. The points A , B , C , D , E lie on the circle c in this order and satisfy


AB k EC and AC k ED . The line tangent to the circle c at E meets the
line AB at P . The lines BD and EC meet at Q . Prove that |AC| = |P Q| .

1
7. Given a parallelogram ABCD . A circle passing through A meets the line
segments AB , AC and AD at inner points M , K , N , respectively. Prove
that

|AB| · |AM | + |AD| · |AN | = |AK| · |AC| .

8. Let ABCD be a convex quadrilateral, and let N be the midpoint of BC .


Suppose further that 6 AN D = 135◦ . Prove that
1
|AB| + |CD| + √ · |BC| > |AD| .
2

9. Given a rhombus ABCD , find the locus of the points P lying inside the
rhombus and satisfying 6 AP D + 6 BP C = 180◦ .

10. In a triangle ABC , the bisector of 6 BAC meets the side BC at the point
D . Knowing that |BD| · |CD| = |AD|2 and 6 ADB = 45◦ , determine the
angles of triangle ABC .

11. The real-valued function f is defined for all positive integers. For any
integers a > 1 , b > 1 with d = gcd(a, b) , we have
µ ³ ´ ³ b ´¶
a
f (ab) = f (d) · f +f ,
d d

Determine all possible values of f (2001) .


n
X
12. Let a1 , a2 , . . . , an be positive real numbers such that a3i = 3 and
i=1
n n
X X 3
a5i = 5 . Prove that ai > .
i=1 i=1
2

13. Let a0 , a1 , a2 , . . . be a sequence of real numbers satisfying a0 = 1 and


an = ab7n/9c + abn/9c for n = 1, 2, . . . . Prove that there exists a positive
k
integer k with ak < .
2001!
(Here bxc denotes the largest integer not greater than x .)

14. There are 2n cards. On each card some real number x , 1 6 x 6 2 , is


written (there can be different numbers on different cards). Prove that

2
the cards can be divided into two heaps with sums s1 and s2 so that
n s1
6 6 1.
n+1 s2
15. Let a0 , a1 , a2 , . . . be a sequence of positive real numbers satisfying
i · a2i > (i + 1) · ai−1 ai+1 for i = 1, 2, . . . . Furthermore, let x and y
be positive reals, and let bi = xai + yai−1 for i = 1, 2, . . . . Prove that the
inequality i · b2i > (i+1) · bi−1 bi+1 holds for all integers i > 2 .

16. Let f be a real-valued function defined on the positive integers satisfying


the following condition: For all n > 1 there exists a prime divisor p of n
such that
³n´
f (n) = f − f (p) .
p

Given that f (2001) = 1 , what is the value of f (2002) ?

17. Let n be a positive integer. Prove that at least 2n−1 + n numbers can be
chosen from the set {1, 2, 3, . . . , 2n } such that for any two different chosen
numbers x and y , x + y is not a divisor of x · y .
n n m m
18. Let a be an odd integer. Prove that a2 + 22 and a2 + 22 are relatively
prime for all positive integers n and m with n 6= m .

19. What is the smallest positive odd integer having the same number of positive
divisors as 360 ?

20. From a sequence of integers (a, b, c, d) each of the sequences

(c, d, a, b), (b, a, d, c), (a+nc, b+nd, c, d), (a+nb, b, c+nd, d) ,

for arbitrary integer n can be obtained by one step. Is it possible to obtain


(3, 4, 5, 7) from (1, 2, 3, 4) through a sequence of such steps?

Solutions

1. Answer: 8 .
Denote the problems by A , B , C , D , E , F , G , H , then 8 possible
problem sets are ABC , ADE , AF G , BDG , BF H , CDH , CEF , EGH .
Hence, there could be 8 students.

3
Suppose that some problem (e.g., A ) was given to 4 students. Then each
of these 4 students should receive 2 different “supplementary” problems,
and there should be at least 9 problems — a contradiction. Therefore each
problem was given to at most 3 students, and there were at most 8 · 3 = 24
“awardings” of problems. As each student was “awarded” 3 problems, there
were at most 8 students.

2. Answer: yes.
Let A1 be the set of positive integers whose only non-zero digits may be
the 1 -st, the (n + 1) -st, the (2n + 1) -st etc. from the end; A2 be the set of
positive integers whose only non-zero digits may be the 2 -nd, the (n + 2) -
nd, the (2n + 2) -nd etc. from the end, and so on. The sets A1 , A2 , . . . , An
have the required property.

Remark. This problem is quite similar to problem 18 from Baltic Way 1997.

3. Answer: no.
If this were possible, then 2 · (1 + . . . + 49) = A + B = 2B . But B is even
since it is the sum of even numbers, whereas 1 + . . . + 49 = 25 · 49 is odd.
This is a contradiction.
p
4. The line y = x contains the diagonal of the rectangle with vertices (0, 0) ,
q
(q, 0) , (q, p) and (0, p) and passes through no points with integer coordi-
nates in the interior of that rectangle. For k = 1, 2, . . . , q−1 the summand
j kp k
counts the number of interior points of the rectangle lying below the
q
p
diagonal y = x and having x -coordinate equal to k . Therefore the sum
q
in consideration counts all interior points with integer coordinates below
the diagonal, which is exactly half the number of all points with integer
1
coordinates in the interior of the rectangle, i.e. · (p − 1)(q − 1) .
2

Remark. The integers p and q need not be primes: in the solution we only
used the fact that they are coprime.

5. Answer: no.
Let the points be denoted by 1, 2, . . . , 2001 such that i, j are neighbors if
|i − j| = 1 or {i, j} = {1, 2001} . We say that k points form a monochro-
matic segment of length k if the points are consecutive on the circle and if

4
they all have the same color. For a coloring F let d(F ) be the maximum
length of a monochromatic segment. Note that d(Fn ) > 1 for all n since
2001 is odd. If d(F1 ) = 2001 then all points have the same color, hence
F1 = F2 = F3 = . . . and we can choose n0 = 1 . Thus, let 1 < d(F1 ) < 2001 .
Below we shall prove the following implications:

If 3 < d(Fn ) < 2001, then d(Fn+1 ) = d(Fn ) − 2 ; (1)


If d(Fn ) = 3, then d(Fn+1 ) = 2 ; (2)
If d(Fn ) = 2, then d(Fn+1 ) = d(Fn ) and Fn+2 = Fn ; (3)

From (1) and (2) it follows that d(F1000 ) 6 2 , hence by (3) we have
F1000 = F1002 . Moreover, if F1 is the coloring where 1 is colored
red and all other points are colored green, then d(F1 ) = 2000 and
thus d(F1 ) > d(F2 ) > . . . > d(F1000 ) = 2 which shows that, for all
n < 1000, Fn 6= Fn+2 and thus 1000 cannot be replaced by 999 .
It remains to prove (1)–(3). Let (i + 1, . . . , i + k) be a longest monochro-
matic segment for Fn (considering the labels of the points modulo 2001 ).
Then (i + 2, . . . , i + k − 1) is a monochromatic segment for Fn+1 and
thus d(Fn+1 ) > d(Fn ) − 2 . Moreover, if (i + 1, . . . , i + k) is a longest
monochromatic segment for Fn+1 where k > 3 , then (i, . . . , i + k + 1) is a
monochromatic segment for Fn . From this and Fn+1 > 1 the implications
(1) and (2) clearly follow. For proof of (3) note that if d(Fn ) 6 2 then
Fn+1 is obtained from Fn by changing the colour of all points.

D
PSfrag replacements
Q C
E

P
A B

Figure 1

6. The arcs BC and AE are of equal length (see Figure 1). Also, since

5
AB k EC and ED k AC , we have 6 CAB = 6 DEC and the arcs DC
and BC are of equal length. Since P E is tangent to c and |AE| = |DC| ,
then 6 P EA = 6 DBC = 6 QBC . As ABCD is inscribed in c , we have
6 QCB = 180◦ − 6 EAB = 6 P AE . Also, ABCD is an isosceles trapezium,
whence |AE| = |BC| . So the triangles AP E and CQB are congruent, and
|QC| = |P A| . Now P ACQ is a quadrilateral with a pair of opposite sides
equal and parallel. So P ACQ is a parallelogram, and |P Q| = |AC| .

7. Let X be the point on segment AC such that 6 ADX = 6 AKN , then

6 AXD = 6 AN K = 180◦ − 6 AM K

(see Figure 2). Triangles N AK and XAD are similar, having two pairs of
|AN | · |AD|
equal angles, hence |AX| =
PSfrag replacements . Since triangles M AK and XCD
|AK|
A |AM | · |CD| |AM | · |AB|
are also B
similar, we have |CX| = = and
|AK| |AK|
C
|AM | D
· |AB|+|AN | · |AD| = (|AX|+|CX|) · |AK| = |AC| · |AK| .
E
Q D C
P

X
K

A M B

Figure 2

8. Let X be the point symmetric to B with respect to AN , and let Y be the


point symmetric to C with respect to DN (see Figure 3). Then

6 XN Y = 180◦ − 2 · (180◦ − 135◦ ) = 90◦

|BC| |BC|
and |N X| = |N Y | = . Therefore, |XY | = √ . Moreover, we have
2 2

6
|AX| = |AB| and |DY | = |DC| . Consequently,

|BC|
|AD| 6 |AX| + |XY | + |Y D| = |AB| + √ + |DC| .
2

A D
replacements Y
A X
B
C B N C
D Figure 3
E
9. Q
Answer: the locus of the points P is the union of the diagonals AC and
BD .
P
A Q be a point such that P QCD is a parallelogram (see Figure 4). Then
Let
ABQP is also a parallelogram. From the equality 6 AP D + 6 BP C = 180◦
B
it follows that 6 BQC + 6 BP C = 180◦ , so the points B , Q , C , P lie
C
D
on a common circle. Therefore, 6 P BC = 6 P QC = 6 P DC , and since
M|BC| = |CD| , we obtain that 6 CP B = 6 CP D or 6 CP B + 6 CP D = 180◦ .
N
Hence, the point P lies on the segment AC or on the segment BD .
K
X D C D C
P Q
P Q

A A
B B
Figure 4

Conversely, any point P lying on the diagonal AC satisfies the equation


6 BP C = 6 DP C . Therefore, 6 AP D + 6 BP C = 180◦ . Analogously, we
show that the last equation holds if the point P lies on the diagonal BD .

10. Answer: 6 BAC = 60◦ , 6 ABC = 105◦ and 6 ACB = 15◦ .


Suppose the line AD meets the circumcircle of triangle ABC at A and E
(see Figure 5). Let M be the midpoint of BC and O the circumcentre of
triangle ABC . Since the arcs BE and EC are equal, then the points O ,
M , E are collinear and OE is perpendicular to BC . From the equality

7
P
A
B
C
D
6 CDE M = 6 ADB = 45◦ it follows that 6 AEO = 45◦ . Since |AO| = |EO| ,
N
we have 6 AOE = 90◦ and AO k DM .
K 2
From theX equality |BD| · |CD| = |AD| we obtain |AD| = |DE| , which im-
plies that
A |OM | = |M E| . Therefore |BO| = |BE| and also |BO| = |EO| .
Hence the triangle BOE is equilateral. This gives 6 BAE = 30◦ , so
B
6 BAC = 60◦ . Summing up the angles of the triangle ABD we obtain
C
6 ABC = 105◦ and from this 6 ACB = 15◦ .
D
P
Q

A O

D
B M C

Figure 5
1
11. Answer: 0 and .
2
1
Obviously the constant functions f (n) = 0 and f (n) =provide solutions.
2
We show that there are no other solutions. Assume f (2001) 6= 0 . Since
2001 = 3 · 667 and gcd(3, 667) = 1 , then
f (2001) = f (1) · (f (3) + f (667)) ,
and f (1) 6= 0 . Since gcd(2001, 2001) = 2001 then

f (20012 ) = f (2001)(2 · f (1)) 6= 0 .

Also gcd(2001, 20013 ) = 2001 , so

f (20014 ) = f (2001) · (f (1) + f (20012 )) = f (1)f (2001)(1 + 2f (2001)) .

On the other hand, gcd(20012 , 20012 ) = 20012 and

f (20014 ) = f (20012 ) · (f (1)+f (1)) = 2f (1)f (20012 ) = 4f (1)2 f (2001) .


1
So 4f (1) = 1 + 2f (2001) and f (2001) = 2f (1) − . Exactly the same
2

8
argument starting from f (20012 ) 6= 0 instead of f (2001) shows that
1
f (20012 ) = 2f (1) − . So
2
1 ³ 1´
2f (1) − = 2f (1) 2f (1) − .
2 2
1 1
Since 2f (1) − = f (2001) 6= 0 , we have f (1) = , which implies
2 2
1 1
f (2001) = 2f (1) − = .
2 2
12. By Hölder’s inequality,
n
X n
X n
µX n
¶3/5 µX ¶2/5
3 5/3
a = (ai · a2i ) 6 ai · 2 5/2
(ai ) .
i=1 i=1 i=1 i=1

We will show that


Xn µX n ¶5/3
5/3
ai 6 ai . (4)
i=1 i=1

n
X
Let S = ai , then (4) is equivalent to
i=1

n ³ n
X ai ´5/3 X ai
61= ,
i=1
S i=1
S

ai 5 ³ a ´5/3 ai
i
which holds since 0 < 6 1 and > 1 yield 6 . So,
S 3 S S
n
X µ n
X ¶ µ X n ¶ 2/5
a3i 6 ai · a5i ,
i=1 i=1 i=1

n
X 3 3
which gives ai > > , since 25 > 52 and hence 2 > 52/5 .
i=1
52/5 2

13. Consider the equation


³ 7 ´x ³ 1 ´x
+ =1.
9 9

9
s s √
1 7 1 7+1 7 1
It has a root < α < 1 , because + = > 1 and + < 1 .
2 9 9 3 9 9

We will prove that an 6 M · nα for some M > 0 — since will be
n
arbitrarily small for large enough n , the claim follows from this immediately.
We choose M so that the inequality an 6 M · nα holds for 1 6 n 6 8 ;
since for n > 9 we have 1 < [7n/9] < n and 1 6 [n/9] < n , it follows by
induction that
h 7n iα h n iα
an = a[7n/9] + a[n/9] 6 M · +M · 6
9 9
³ 7n ´α ³ n ´α µ³ ´ ¶
7 α ³ 1 ´α
6 M· +M · = M · nα · + = M · nα .
9 9 9 9

14. Let the numbers be x1 6 x2 6 . . . 6 x2n−1 6 x2n . We will show that the
choice s1 = x1 + x3 + x5 + · · · + x2n−1 and s2 = x2 + x4 + · · · + x2n solves
s1
the problem. Indeed, the inequality 6 1 is obvious and we have
s2

s1 x1 + x3 + x5 + . . . + x2n−1 (x3 + x5 + . . . + x2n−1 ) + x1


= = >
s2 x2 + x4 + x6 + . . . + x2n (x2 + x4 + . . . + x2n−2 ) + x2n
(x3 + x5 + . . . + x2n−1 ) + 1 (x2 + x4 + . . . + x2n−2 ) + 1
> > =
(x2 + x4 + . . . + x2n−2 ) + 2 (x2 + x4 + . . . + x2n−2 ) + 2
1 1 n
= 1− >1− = .
(x2 + x4 + . . . + x2n−2 ) + 2 (n − 1) + 2 n+1

15. Let i > 2 . We are given the inequalities

(i − 1) · a2i−1 > i · ai ai−2 (5)

and

i · a2i > (i + 1) · ai+1 ai−1 . (6)

Multiplying both sides of (6) by x2 , we obtain

i · x2 · a2i > (i + 1) · x2 · ai+1 ai−1 . (7)

10
By (5),

a2i−1 i 1 1 i+1
> =1+ >1+ = ,
ai ai−2 i−1 i−1 i i

which implies

i · y 2 · a2i−1 > (i + 1) · y 2 · ai ai−2 . (8)

Multiplying (5) and (6), and dividing both sides of the resulting inequality
by iai ai−1 , we get

(i − 1) · ai ai−1 > (i + 1) · ai+1 ai−2 .

Adding (i + 1)ai ai−1 to both sides of the last inequality and multiplying
both sides of the resulting inequality by xy gives

i · 2xy · ai ai−1 > (i + 1) · xy · (ai+1 ai−2 + ai ai−1 ) . (9)

Finally, adding up (7), (8) and (9) results in

i · (xai + yai−1 )2 > (i + 1) · (xai+1 + yai )(xai−1 + yai−2 ) ,

which is equivalent to the claim.

16. Answer: 2 .
f (1)
For any prime p we have f (p) = f (1) − f (p) and thus f (p) = .
2
If n is a product of two primes p and q , then f (n) = f (p) − f (q) or
f (n) = f (q) − f (p) , so f (n) = 0 . By the same reasoning we find that if n
is a product of three primes, then there is a prime p such that
³n´ f (1)
f (n) = f − f (p) = −f (p) = − .
p 2

By simple induction we can show that if n is the product of k primes,


f (1)
then f (n) = (2 − k) · . In particular, f (2001) = f (3 · 23 · 29) = 1 so
2
f (1) = −2 . Therefore, f (2002) = f (2 · 7 · 11 · 13) = −f (1) = 2 .

17. We choose the numbers 1, 3, 5, . . . , 2n − 1 and 2, 4, 8, 16, . . . , 2n , i.e. all


odd numbers and all powers of 2 . Consider the three possible cases.

11
(1) If x = 2a−1 and y = 2b−1 , then x+y = (2a−1)+(2b−1) = 2(a+b−1)
is even and does not divide xy = (2a − 1)(2b − 1) which is odd.
(2) If x = 2k and y = 2m where k < m , then x + y = 2k (2m−k + 1) has
an odd divisor greater than 1 and hence does not divide xy = 2a+b .
(3) If x = 2k and y = 2b − 1 , then x + y = 2k + (2b − 1) > (2b − 1) is odd
and hence does not divide xy = 2k (2b − 1) which has 2b − 1 as its largest
odd divisor.
n n n n n
18. Rewriting a2 + 22 = a2 − 22 + 2 · 22 and making repeated use of the
identity
n n n−1 n−1 n−1 n−1
a2 − 22 = (a2 − 22 ) · (a2 + 22 )

we get
n n n−1 n−1 n−2 n−2 m m
a2 + 22 = (a2 + 22 ) · (a2 + 22 ) · . . . · (a2 + 22 ) · . . .
n
. . . · (a2 + 22 ) · (a + 2) · (a − 2) + 2 · 22 .
n n m m
For n > m , assume that a2 + 22 and a2 + 22 have a common divisor
n
d > 1 . Then an odd integer d divides 2 · 22 , a contradiction.

19. Answer: 31185 .


An integer with the prime factorization pr11 · pr22 · . . . · prkk (where p1 , p2 , . . . ,
pk are distinct primes) has precisely (r1 + 1) · (r2 + 1) · . . . · (rk + 1) distinct
positive divisors. Since 360 = 23 · 32 · 5 , it follows that 360 has 4 · 3 · 2 = 24
positive divisors. Since 24 = 3 · 2 · 2 · 2 , it is easy to check that the smallest
odd number with 24 positive divisors is 32 · 5 · 7 · 11 = 31185 .

20. Answer: no.


Under all transformations (a, b, c, d) → (a0 , b0 , c0 , d0 ) allowed in the problem
we have |ad − bc| = |a0 d0 − b0 c0 | , but |1 · 4 − 2 · 3| = 2 6= 1 = |3 · 7 − 4 · 5| .

Remark. The transformations allowed in the problem are in fact the ele-
mentary transformations of the determinant
¯ ¯
¯a b¯
¯ ¯
¯c d¯

and the invariant |ad − bc| is the absolute value of the determinant which
is preserved under these transformations.

12
Baltic Way 2002 mathematical team contest

Tartu, November 2, 2002


Problems and solutions

1. Solve the system of equations


 3
 a + 3ab2 + 3ac2 − 6abc = 1
b3 + 3ba2 + 3bc2 − 6abc = 1
 3
c + 3ca2 + 3cb2 − 6abc = 1

in real numbers.
Answer: a = 1, b = 1, c = 1 .
Solution. Denoting the left hand sides of the given equations as A , B and C , the following equalities
can easily be seen to hold:

−A + B + C = (−a + b + c)3 ,
A − B + C = (a − b + c)3 ,
A + B − C = (a + b − c)3 .

Hence, the system of equations given in the problem is equivalent to the following one:

 (−a + b + c)3 = 1
(a − b + c)3 = 1 ,
(a + b − c)3 = 1

which gives

 −a + b + c = 1
a−b+c = 1 .

a+b−c = 1

The unique solution of this system is (a, b, c) = (1, 1, 1) .

2. Let a, b, c, d be real numbers such that

a + b + c + d = −2 ,
ab + ac + ad + bc + bd + cd = 0 .

Prove that at least one of the numbers a, b, c, d is not greater than −1 .


Solution. We can assume that a is the least among a, b, c, d (or one of the least, if some of them are
equal), there are n > 0 negative numbers among a, b, c, d , and the sum of the positive ones is x .
Then we obtain

−2 = a + b + c + d > na + x . (1)

Squaring we get

4 = a 2 + b2 + c 2 + d2

which implies

4 6 n · a 2 + x2 (2)

as the square of the sum of positive numbers is not less than the sum of their squares.

1
Combining inequalities (1) and (2) we obtain

na2 + (na + 2)2 > 4 ,


na2 + n2 a2 + 4na > 0 ,
a2 + na2 + 4a > 0 .

As n 6 3 (if all the numbers are negative, the second condition of the problem cannot be satisfied), we
obtain from the last inequality that

4a2 + 4a > 0 ,
a(a + 1) > 0 .

As a < 0 it follows that a 6 −1 .


Alternative solution. Assume that a, b, c, d > −1 . Denoting A = a + 1 , B = b + 1 , C = c + 1 , D = d + 1
we have A, B, C, D > 0 . Then the first equation gives

A + B + C + D = 2. (3)

We also have

ab = (A − 1)(B − 1) = AB − A − B + 1.

Adding 5 similar terms to the last one we get from the second equation

AB + AC + AD + BC + BD + CD − 3(A + B + C + D) + 6 = 0.

In view of (3) this implies

AB + AC + AD + BC + BD + CD = 0,

a contradiction as all the unknowns A, B, C, D were supposed to be positive.


Another solution. Assume that the conditions of the problem hold:

a + b + c + d = −2 (4)
ab + ac + ad + bc + bd + cd = 0. (5)

Suppose that

a, b, c, d > −1. (6)

If all of a, b, c, d were negative, then (5) could not be satisfied, so at most three of them are nega-
tive. If two or less of them were negative, then (6) would imply that the sum of negative numbers,
and hence also the sum a + b + c + d , is greater than 2 · (−1) = −2 , which contradicts (4). So ex-
actly three of a, b, c, d are negative and one is nonnegative. Let d be the nonnegative one. Then
d = −2 − (a + b + c) < −2 − (−1 − 1 − 1) = 1 . Obviously |a|, |b|, |c|, |d| < 1 . Squaring (4) and subtracting
2 times (5), we get

a2 + b2 + c2 + d2 = 4,

but

a2 + b2 + c2 + d2 = |a|2 + |b|2 + |c|2 + |d|2 < 4,

a contradiction.

2
3. Find all sequences a0 6 a1 6 a2 6 . . . of real numbers such that
am2 +n2 = a2m + a2n
for all integers m, n > 0 .
1
Answer: an ≡ 0 , an ≡ and an = n .
2
Solution. Denoting f (n) = an we have

f (m2 + n2 ) = f 2 (m) + f 2 (n) . (7)


1
Substituting m = n = 0 into (7) we get f (0) = 2f 2 (0) , hence either f (0) = or f (0) = 0 . We consider
2
these cases separately.
1 1
(1) If f (0) = then substituting m = 1 and n = 0 into (7) we obtain f (1) = f 2 (1) + , whence
µ ¶2 2 4
1 1
f (1) − = 0 and f (1) = . Now,
2 2

1
f (2) = f (12 + 12 ) = 2f 2 (1) = ,
2
1
f (8) = f (22 + 22 ) = 2f 2 (2) = ,
2
1 1
etc, implying that f (2i ) = for arbitrarily large natural i and, due to monotonity, f (n) = for every
2 2
natural n .
(2) If f (0) = 0 then by substituting m = 1 , n = 0 into (7) we obtain f (1) = f 2 (1) and hence, f (1) = 0
or f (1) = 1 . This gives two subcases.
(2a) If f (0) = 0 and f (1) = 0 then by the same technique as above we see that f (2 i ) = 0 for arbitrarily
large natural i and, due to monotonity, f (n) = 0 for every natural n .
(2b) If f (0) = 0 and f (1) = 1 then we compute

f (2) = f (12 + 12 ) = 2f 2 (1) = 2 ,


f (4) = f (22 + 02 ) = f 2 (2) = 4 ,
f (5) = f (22 + 12 ) = f 2 (2) + f 2 (1) = 5 .

Now,
f 2 (3) + f 2 (4) = f (25) = f 2 (5) + f 2 (0) = 25 ,

hence f 2 (3) = 25 − 16 = 9 and f (3) = 3 . Further,

f (8) = f (22 + 22 ) = 2f 2 (2) = 8 ,


f (9) = f (32 + 02 ) = f 2 (3) = 9 ,
f (10) = f (32 + 12 ) = f 2 (3) + f 2 (1) = 10 .

From the equalities

f 2 (6) + f 2 (8) = f 2 (10) + f 2 (0) ,


f 2 (7) + f 2 (1) = f 2 (5) + f 2 (5)

we also conclude that f (6) = 6 and f (7) = 7 . It remains to note that

(2k + 1)2 + (k − 2)2 = (2k − 1)2 + (k + 2)2 ,


(2k + 2)2 + (k − 4)2 = (2k − 2)2 + (k + 4)2 ,

and by induction it follows that f (n) = n for every natural n .

3
4. Let n be a positive integer. Prove that
n µ ¶2
X
2 1
xi (1 − xi ) 6 1−
i=1
n

for all nonnegative real numbers x1 , x2 , . . . , xn such that


x1 + x 2 + · · · + x n = 1 .
Solution. Expanding the expressions at both sides we obtain the equivalent inequality
X X 2 1
− x3i + 2 x2i − + 2 >0.
i i
n n

It is easy to check that the left hand side is equal to


Xµ 2
¶µ
1
¶2
2 − − xi xi −
i
n n

and hence is nonnegative.


Alternative solution. First note that for n = 1 the required condition holds trivially, and for n = 2 we
have
µ ¶2 µ ¶2
x + (1 − x) 1 1
x(1 − x)2 + (1 − x)x2 = x(1 − x) 6 = = 1− .
2 4 2

So we may further consider the case n > 3 .


2
Assume first that for each index i the inequality xi < holds. Let f (x) = x(1 − x)2 = x − 2x2 + x3 ,
3 · ¸
00 2
then f (x) = 6x − 4 . Hence, the function f is concave in the interval 0, . Thus, from Jensen’s
3
inequality we have
n n µ ¶ µ ¶
X X x1 + . . . + x n 1
xi (1 − xi )2 = f (xi ) 6 n · f =n·f =
i=1 i=1
n n
µ ¶2 µ ¶2
1 1 1
=n· 1− = 1− .
n n n

2
If some xi > then we have
3
µ ¶2
2 2 1
xi (1 − xi ) 6 1 · 1 − = .
3 9

For the rest of the terms we have


X X 1
xj (1 − xj )2 6 xj = 1 − x i 6 .
3
j6=i j6=i

Hence,
n µ ¶2
X 1 124 1
xi (1 − xi ) 6 + = 6 1−
i=1
9 3 9 n

as n > 3 .
5. Find all pairs (a, b) of positive rational numbers such that
√ q
√ √
a+ b= 2+ 3.

4
µ ¶ µ ¶
1 3 3 1
Answer: (a, b) = , or (a, b) = , .
2 2 2 2

Solution. Squaring both sides of the equation gives


√ √
a + b + 2 ab = 2 + 3 (8)

√ √ √
so 2 √ab = r + 3 for some rational number r . Squaring both sides of this gives 4ab = r 2 + 3 + 2r 3 ,
so 2r 3 is rational, which implies µ
r = 0 . ¶Hence ab = 3/4
µ and¶substituting this into (8) gives a + b = 2 .
1 3 3 1
Solving for a and b gives (a, b) = , or (a, b) = , .
2 2 2 2

6. The following solitaire game is played on an m×n rectangular board, m, n > 2 , divided into unit squares.
First, a rook is placed on some square. At each move, the rook can be moved an arbitrary number of
squares horizontally or vertically, with the extra condition that each move has to be made in the 90 ◦
clockwise direction compared to the previous one (e.g. after a move to the left, the next one has to be
done upwards, the next one to the right etc). For which values of m and n is it possible that the rook
visits every square of the board exactly once and returns to the first square? (The rook is considered to
visit only those squares it stops on, and not the ones it steps over.)

Answer: m, n ≡ 0 mod 2 .

Solution. First, consider any row that is not the row where the rook starts from. The rook has to visit
all the squares of that row exactly once, and on its tour around the board, every time it visits this row,
exactly two squares get visited. Hence, m must be even; a similar argument for the columns shows that
n must also be even.

It remains to prove that for any even m and n such a tour is possible. We will show it by an induction-
like argument. Labelling the squares with pairs of integers (i, j) , where 1 6 i 6 m and 1 6 j 6 n , we
start moving from the square (m/2 + 1, 1) and first cover all the squares of the top and bottom rows in
the order shown in the figure below, except for the squares (m/2 − 1, n) and (m/2 + 1, n) ; note that we
finish on the square (m/2 − 1, 1) .

3 7 8 4

2 6 10 1 9 5

The next square to visit will be (m/2 − 1, n − 1) and now we will cover the rows numbered 2 and n − 1 ,
except for the two middle squares in row 2 . Continuing in this way we can visit all the squares except
for the two middle squares in every second row (note that here we need the assumption that m and n
are even):

3 7 8 4
15 19 11 20 16 12
23 27 28 24
35 39 31 40 36 32
34 38 37 33
22 26 30 21 29 25
14 18 17 13
2 6 10 1 9 5

5
The rest of the squares can be visited easily:

3 7 47 48 8 4
15 19 11 20 16 12
23 27 43 44 28 24
35 39 31 40 36 32
34 38 42 41 37 33
22 26 30 21 29 25
14 18 46 45 17 13
2 6 10 1 9 5

7. We draw n convex quadrilaterals in the plane. They divide the plane into regions (one of the regions is
infinite). Determine the maximal possible number of these regions.
Answer: The maximal number of regions is 4n2 − 4n + 2 .
Solution. One quadrilateral produces two regions. Suppose we have drawn k quadrilaterals Q 1 , . . . , Qk
and produced ak regions. We draw another quadrilateral Qk+1 and try to evaluate the number of regions
ak+1 now produced. Our task is to make ak+1 as large as possible. Note that in a maximal configuration,
no vertex of any Qi can be located on the edge of another quadrilateral as otherwise we could move this
vertex a little bit to produce an extra region.
Because of this fact and the convexity of the Qj ’s, any one of the four sides of Qk+1 meets at most two
sides of any Qj . So the sides of Qk+1 are divided into at most 2k + 1 segments, each of which potentially
grows the number of regions by one (being part of the common boundary of two parts, one of which is
counted in ak ).
But if a side of Qk+1 intersects the boundary of each Qj , 1 6 j 6 k twice, then its endpoints (vertices
of Qk+1 ) are in the region outside of all the Qj -s, and the the segments meeting at such a vertex are
on the boundary of a single new part (recall that it makes no sense to put vertices on edges of another
quadrilaterals). This means that ak+1 − ak 6 4(2k + 1) − 4 = 8k . By considering squares inscribed in a
circle one easily sees that the situation where ak+1 − ak = 8k can be reached.
It remains to determine the expression for the maximal ak . Since the difference ak+1 − ak is lin-
ear in k , ak is a quadratic polynomial in k , and a0 = 2 . So ak = Ak 2 + Bk + 2 . We have
8k = ak+1 − ak = A(2k + 1) + B for all k . This implies A = 4 , B = −4 , and an = 4n2 − 4n + 2 .

8. Let P be a set of n > 3 points


µ in ¶ the plane, no three of which are on a line. How many possibilities are
n−1
there to choose a set T of triangles, whose vertices are all in P , such that each triangle in T
2
has a side that is not a side of any other triangle in T ?
Answer: There is one possibility for n = 3 and n possibilities for n > 4 .
Solution. For a fixed pointµ x ∈ P¶, let Tx be the set of all triangles with vertices in P which have x as
n−1
a vertex. Clearly, |Tx | = , and each triangle in Tx has a side which is not a side of any other
2
triangle in Tx . For any x, y ∈ P such that x 6= y , we have Tx 6= Ty if and only if n > 4 . We will show
that any possible set T is equal to Tx for some x ∈ P , i.e. that the answer is 1 for n = 3 and n for
n > 4.
Let
½ µ ¶¾ ½ µ ¶¾
n−1 n−1
T = ti : i = 1, 2, . . . , , S= si : i = 1, 2, . . . ,
2 2

such that T is a set of triangles whose vertices are all µ in¶ P , and si is a side of ti but not of any tj ,
n
j 6= i . Furthermore, let C be the collection of all the triangles whose vertices are in P . Note that
3
µ ¶ µ ¶ µ ¶
n n−1 n−1
|C \ T | = − = .
3 2 3

6
Let m be the number of pairs (s, t) such that s ∈ S is a side of t ∈ C \ T . Since every s ∈ S is a side
of exactly n − 3 triangles from C \ T , we have
µ ¶ µ ¶
n−1 n−1
m = |S| · (n − 3) = · (n − 3) = 3 · = 3 · |C \ T | .
2 3

On the other hand, every t ∈ C \ T has at most three sides from S . By the above equality, for every
t ∈ C \ T , all its sides must be in S .
Assume that for p ∈ P there is a side s ∈ S such that p is an endpoint of s . Then p is also a vertex
of each of the n − 3 triangles in C \ T which have s as a side. Consequently, p is an endpoint of n − 2
sides in S . Since every side in S has exactly 2 endpoints, the number of points p ∈ P which occur as a
vertex of some s ∈ S is
µ ¶
2 · |S| 2 n−1
= · =n−1.
n−2 n−2 2

Consequently, there is an x ∈ P which is not an endpoint of any s ∈ S , and hence T must be equal to
Tx .
9. Two magicians show the following trick. The first magician goes out of the room. The second magician
takes a deck of 100 cards labelled by numbers 1, 2, . . . , 100 and asks three spectators to choose in turn
one card each. The second magician sees what card each spectator has taken. Then he adds one more
card from the rest of the deck. Spectators shuffle these 4 cards, call the first magician and give him these
4 cards. The first magician looks at the 4 cards and “guesses” what card was chosen by the first spectator,
what card by the second and what card by the third. Prove that the magicians can perform this trick.
Solution. We will identify ourselves with the second magician. Then we need to choose a card in such a
manner that another magician will be able to understand which of the 4 cards we have chosen and what
information it gives about the order of the other cards. We will reach these two goals independently.
Let a , b , c be remainders of the labels of the spectators’ three cards modulo 5. There are three possible
cases.
1) All the three remainders coincide. Then choose a card with a remainder not equal to the remainder
of spectators’ cards. Denote this remainder d .
Note that we now have 2 different remainders, one of them in 3 copies (this will be used by the first
magician to distinguish betwwen the three cases). To determine which of the cards is chosen by us is
now a simple exercise in division by 5. But we must also encode the ordering of the spectators’ cards.
These cards have a natural ordering by their labels, and they are also ordered by their belonging to
the spectators. Thus, we have to encode a permutation of 3 elements. There are 6 permutations of 3
elements, let us enumerate them somehow. Then, if we want to inform the first magician that spectators
form a permutation number k with respect to the natural ordering, we choose the card number 5k + d .
2) The remainders a , b , c are pairwise different. Then it is clear that exactly one of the following
possibilities takes place:

either |b − a| = |a − c|, or |a − b| = |b − c|, or |a − c| = |c − b| (9)

(the equalities are considered modulo 5). It is not hard to prove it by a case study, but one could also
imagine choosing three vertices of a regular pentagon — these vertices always form an isosceles, but not
an equilateral triangle.
Each of these possibilities has one of the remainders distinguished from the other two remainders (these
distinguished remainders are a , b , c , respectively). Now, choose a card from the rest of the deck
having the distinguished remainder modulo 5. Hence, we have three different remainders, one of them
distinguished by (9) and presented in two copies. Let d be the distinguished remainder and s = 5m + d
be the spectator’s card with this remainder.
Now we have to choose a card r with the remainder d such that the first magician would be able to
understand which of the cards s and r was chosen by us and what permutation of spectators it implies.
This can be done easily: if we want to inform the first magician that spectators form a permutation
number k with respect to the natural ordering, we choose the card number s + 5k (mod 100) .

7
The decoding procedure is easy: if we have two numbers p and q that have the same remainder modulo 5,
calculate p − q (mod 100) and q − p (mod 100) . If p − q (mod 100) > q − p (mod 100) then r = q is our
card and s = p is the spectator’s card. (The case p − q (mod 100) = q − p (mod 100) is impossible since
the sum of these numbers is equal to 100 , and one of them is not greater than 6 · 5 = 30 .)
3) Two remainders (say, a and b ) coincide. Let us choose a card with the remainder d = (a+c)/2 mod 5 .
Then |a − d| = |d − c| mod 5 , so the remainder d is distinguished by (9). Hence we have three different
remainders, one of them distinguished by (9) and one of the non-distinguished remainders presented in
two copies. The first magician will easily determine our card, and the rule to choose the card in order to
enable him also determine the order of spectators is similar to the one in the 1-st case.
Alternative solution. This solution gives a non-constructive proof that the trick is possible. For this,
we need to show there is an injective mapping from the set of ordered triples to the set of unordered
quadruples that additionally respects inclusion.
To prove that the desired mapping exists, let’s consides a bipartite graph such that the set of ordered
triples T and the set of unordered quadruples Q form the two disjoint sets of vertices and there is an
edge between a triple and a quadruple if and only if the triple is a subset of the quadruple.
For each triple t ∈ T , we can add any of the remaining 97 cards to it, and thus we have 97 different
quadruples connected to each triple in the graph. Conversely, for each quadruple q ∈ Q , we can remove
any of the 4 cards from it, and reorder the remaining 3 cards in 3! = 6 different ways, and thus we have
24 different triples connected to each quadruple in the graph.
According to the Hall’s theorem, a bipartite graph G = (T, Q, E) has a perfect matching if and only if
for each subset T 0 ⊆ T the set of neighbours of T 0 , denoted N (T 0 ) , satisfies |N (T 0 )| > |T 0 | .
To prove that this condition holds for our graph, consider any subset T 0 ⊆ T . Because we have 97
quadruples for each triple, and there can be at most 24 copies of each of them in the multiset of neighbours,
97 0
we have |N (T 0 )| > |T | > 4|T 0 | , which is even much more than we need.
24
Thus, the desired mapping is guaranteed to exist.
Another solution. Let the three chosen numbers be (x1 , x2 , x3 ) . At least one of the sets {1, 2, . . . , 24} ,
{25, 26, . . . , 48} , {49, 50, . . . , 72} and {73, 74, . . . , 96} should contain none of x 1 , x2 and x3 , let S be
such set. Next we split S into 6 parts: S = S1 ∪ S2 ∪ . . . ∪ S6 so that 4 first elements of S are in S1 ,
four next in S2 , etc. Now we choose i ∈ {1, 2, . . . , 6} corresponding to the order of numbers x 1 , x2 and
x3 (if x1 < x2 < x3 then i = 1 , if x1 < x3 < x2 then i = 2 , . . . ,if x3 < x2 < x1 then i = 6 ). At last
let j be the number of elements in {x1 , x2 , x3 } that are greater than elements of S (note that any xk ,
k ∈ {1, 2, 3} , is either greater or smaller than all the elements of S ). Now we choose x 4 ∈ Si so that
x1 + x2 + x3 + x4 ≡ j mod 4 and add the card number x4 to those three cards.
Decoding of {a, b, c, d} is straightforward. We first put the numbers into increasing order and then
calculate a+b+c+d mod 4 showing the added card. The added card belongs to some S i ( i ∈ {1, 2, . . . , 6} )
for some S and i shows us the initial ordering of cards.

10. Let N be a positive integer. Two persons play the following game. The first player writes a list of
positive integers not greater than 25, not necessarily different, such that their sum is at least 200. The
second player wins if he can select some of these numbers so that their sum S satisfies the condition
200 − N 6 S 6 200 + N . What is the smallest value of N for which the second player has a winning
strategy?
Answer: N = 11 .
Solution. If N = 11 , then the second player can simply remove numbers from the list, starting with the
smallest number, until the sum of the remaining numbers is less than 212 . If the last number removed
was not 24 or 25 , then the sum of the remaining numbers is at least 212 − 23 = 189 . If the last
number removed was 24 or 25 , then only 24 -s and 25 -s remain, and there must be exactly 8 of them
since their sum must be less than 212 and not less than 212 − 24 = 188 . Hence their sum S satisfies
8 · 24 = 192 6 S 6 8 · 25 = 200 . In any case the second player wins.
On the other hand, if N 6 10 , then the first player can write 25 two times and 23 seven times. Then
the sum of all numbers is 211 , but if at least one number is removed, then the sum of the remaining ones
is at most 188 — so the second player cannot win.

8
11. Let n be a positive integer. Consider n points in the plane such that no three of them are collinear and
no two of the distances between them are equal. One by one, we connect each point to the two points
nearest to it by line segments (if there are already other line segments drawn to this point, we do not
erase these). Prove that there is no point from which line segments will be drawn to more than 11 points.
Solution. Suppose there exists a point A such that A is connected to twelve points. Then there exist
three points B , C and D such that ∠BAC 6 60◦ , ∠BAD 6 60◦ and ∠CAD 6 60◦ .
We can assume that |AD| > |AB| and |AD| > |AC| . By the cosine law we have

|BD|2 = |AD|2 + |AB|2 − 2|AD||AB| cos ∠BAD


< |AD|2 + |AB|2 − 2|AB|2 cos ∠BAD
= |AD|2 + |AB|2 (1 − 2 cos ∠BAD)
6 |AD|2

since 1 6 2 cos(∠BAD) . Hence |BD| < |AD| . Similarly we get |CD| < |AD| . Hence A and D should
not be connected which is a contradiction.
Comment. It would be interesting to know whether 11 can be achieved or the actual bound is lower.
12. A set S of four distinct points is given in the plane. It is known that for any point X ∈ S the remaining
points can be denoted by Y , Z and W so that

|XY | = |XZ| + |XW |.

Prove that all the four points lie on a line.


Solution. Let S = {A, B, C, D} and let AB be the longest of the six segments formed by these four
points (if there are several longest segments, choose any of them). If we choose X = A then we must also
choose Y = B . Indeed, if we would, for example, choose Y = C , we should have |AC| = |AB| + |AD|
contradicting the maximality of AB . Hence we get

|AB| = |AC| + |AD| . (10)

Similarly, choosing X = B we must choose Y = A and we obtain

|AB| = |BC| + |BD| . (11)

On the other hand, from the triangle inequality we know that

|AB| 6 |AC| + |BC| ,


|AB| 6 |AD| + |BD| ,

where at least one of the inequalities is strict if all the four points are not on the same line. Hence, adding
the two last inequalities we get

2|AB| < |AC| + |BC| + |AD| + |BD| .

On the other hand, adding (10) and (11) we get

2|AB| = |AC| + |AD| + |BC| + |BD| ,

a contradiction.
13. Let ABC be an acute triangle with ∠BAC > ∠BCA , and let D be a point on side AC such that
|AB| = |BD| . Furthermore, let F be a point on the circumcircle of triangle ABC such that line F D
is perpendicular to side BC and points F , B lie on different sides of line AC . Prove that line F B is
perpendicular to side AC .
Solution. Let E be the other point on the circumcircle of triangle ABC such that |AB| = |EB| . Let
D0 be the point of intersection of side AC and the line perpendicular to side BC , passing through E .
Then ∠ECB = ∠BCA and the triangle ECD 0 is isosceles. As ED 0 ⊥ BC , the triangle BED 0 is also
isosceles and |BE| = |BD 0 | implying D = D 0 . Hence, the points E , D , F lie on one line. We now have

∠EF B + ∠F DA = ∠BCA + ∠EDC = 90◦ .

9
The required result now follows.

PSfrag replacements E

A D C

14. Let L , M and N be points on sides AC , AB and BC of triangle ABC , respectively, such that BL
is the bisector of angle ABC and segments AN , BL and CM have a common point. Prove that if
∠ALB = ∠M N B then ∠LN M = 90◦ .

Solution. Let P be the intersection point of lines M N and AC . Then ∠P LB = ∠P N B and the
quadrangle P LN B is cyclic. Let ω be its circumcircle. It is sufficient to prove that P L is a diameter
of ω .

Let Q denote the second intersection point of the line AB and ω . Then ∠P QB = ∠P LB and

∠QP L = ∠QBL = ∠LBN = ∠LP N ,

and the triangles P AQ and BAL are similar. Therefore,

|P Q| |BL|
= . (12)
|P A| |BA|

We see that the line P L is a bisector of the inscribed angle N P Q . Now in order to prove that P L is
a diameter of ω it is sufficient to check that |P N | = |P Q| .

The triangles N P C and LBC are similar, hence

|P N | |BL|
= . (13)
|P C| |BC|

Note also that

|AB| |AL|
= . (14)
|BC| |CL|

by the properties of a bisector. Combining (12), (13) and (14) we have

|P N | |AL| |CP |
= · .
|P Q| |AP | |CL|

We want to prove that the left hand side of this equality equals 1. This follows from the fact that the
quadruple of points (P, A, L, C) is harmonic, as can be proven using standard methods (e.g. considering
the quadrilateral M BN S , where S = M C ∩ AN ).

10
PSfrag replacements
A
B B
C N
D M
E
F

C P
L A

Q
15. A spider and a fly are sitting on a cube. The fly wants to maximize the shortest path to the spider
along the surface of the cube. Is it necessarily best for the fly to be at the point opposite to the spider?
(“Opposite” means “symmetric with respect to the center of the cube”.)
Answer: no.
Solution. Suppose that the side of the cube is 1 and the spider sits at the middle of one of the edges.
Then the shortest path to the middle of the opposite edge has length 2 . However, if the fly goes to a
point on this edge at distance s from the middle, then the length of the shortest path is
 s 
µ ¶2
p 9 3
min  4 + s2 , + −s  .
4 2

If 0 < s < (3 − 7)/2 then this expression is greater than 2 .
16. Find all nonnegative integers m such that
¡ ¢2
am = 22m+1 + 1
is divisible by at most two different primes.
Answer: m = 0, 1, 2 are the only solutions.
Solution. Obviously m = 0, 1, 2 are solutions as a0 = 5 , a1 = 65 = 5 · 13 , and a2 = 1025 = 25 · 41 . We
show that these are the only solutions.
Assume that m > 3 and that am contains at most two different prime factors. Clearly, am = 42m+1 + 1
is divisible by 5 , and
¡ ¢ ¡ ¢
am = 22m+1 + 2m+1 + 1 · 22m+1 − 2m+1 + 1 .
The two above factors are relatively prime as they are both odd and their difference is a power of 2 .
Since both factors are larger than 1 , one of them must be a power of 5 . Hence,
2m+1 · (2m ± 1) = 5t − 1 = (5 − 1) · (1 + 5 + · · · + 5t−1 )
for some positive integer t , where ± reads as either plus or minus. For odd t the right hand side is not
divisible by 8 , contradicting m > 3 . Therefore, t must be even and

2m+1 · (2m ± 1) = (5t/2 − 1) · (5t/2 + 1) .

Clearly, 5t/2 + 1 ≡ 2 ( mod 4) . Consequently, 5t/2 − 1 = 2m · k for some odd k , and 5t/2 + 1 = 2m · k + 2
divides 2(2m ± 1) , i.e.

2m−1 · k + 1 | 2m ± 1 .
This implies k = 1 , finally leading to a contradiction since
2m−1 + 1 < 2m ± 1 < 2(2m−1 + 1)
for m > 3 .

11
17. Show that the sequence
µ ¶ µ ¶ µ ¶
2002 2003 2004
, , ,... ,
2002 2002 2002
considered modulo 2002, is periodic.
Solution. Define
µ ¶
n
xkn =
k
and note that
µ ¶ µ ¶ µ ¶
n+1 n n
xkn+1 − xkn = − = = xnk−1 .
k k k−1

Let m be any positive integer. We will prove by induction on k that the sequence {x kn }∞n=k is periodic
modulo m . For k = 1 it is obvious that xkn = n is periodic modulo m with period m . Therefore it
will suffice to show that the following is true: the sequence {xn } is periodic modulo m if its difference
sequence, dn = xn+1 − xn , is periodic modulo m .
Furthermore, if t then the period of {xn } is equal to ht where h is the smallest positive integer such
that h(xt − x0 ) ≡ 0 modulo m .
Indeed, let t be the period of {dn } and h be the smallest positive integer such that h(xt − x0 ) ≡ 0
modulo m . Then
 
n+ht−1
X n−1
X t−1
X
xn+ht = x0 + dj = x 0 + dj + h  dj  =
j=0 j=0 j=0

= xn + h(xt − x0 ) ≡ xn (mod m)

for all n , so the sequence {xn } is in fact periodic modulo m (with a period dividing ht ).
18. Find all integers n > 1 such that any prime divisor of n6 − 1 is a divisor of (n3 − 1)(n2 − 1) .
Solution. Clearly n = 2 is such an integer. We will show that there are no others.
Consider the equality
n6 − 1 = (n2 − n + 1)(n + 1)(n3 − 1) .

The integer n2 − n + 1 = n(n − 1) + 1 clearly has an odd divisor p . Then p | n3 + 1 . Therefore, p does
not divide n3 − 1 and consequently p | n2 − 1 . This implies that p divides (n3 + 1) + (n2 − 1) = n2 (n + 1) .
As p does not divide n , we obtain p | n + 1 . Also, p | (n2 − 1) − (n2 − n + 1) = n − 2 . From p | n + 1
and p | n − 2 it follows that p = 3 , so n2 − n + 1 = 3r for some positive integer r .
The discriminant of the quadratic n2 − n + (1 − 3r ) must be a square of an integer, hence

1 − 4(1 − 3r ) = 3(4 · 3r−1 − 1)

must be a squareof an integer. Since for r > 2 the number 4 · 3r−1 − 1 is not divisible by 3 , this is
possible only if r = 1 . So n2 − n − 2 = 0 and n = 2 .
19. Let n be a positive integer. Prove that the equation
1 1
x+y+ + = 3n
x y
does not have solutions in positive rational numbers.
p r
Solution. Suppose x = and y = satisfy the given equation, where p, q, r, s are positive integers
q s
and gcd(p, q) = 1 , gcd(r, s) = 1 . We have
p r q s
+ + + = 3n ,
q s p r

12
or

(p2 + q 2 )rs + (r 2 + s2 )pq = 3npqrs ,

so rs | (r 2 + s2 )pq . Since gcd(r, s) = 1 , we have gcd(r 2 + s2 , rs) = 1 and rs | pq . Analogously pq | rs ,


so rs = pq and hence there are either two or zero integers divisible by 3 among p, q, r, s . Now we have

(p2 + q 2 )rs + (r 2 + s2 )rs = 3n(rs)2 ,


p2 + q 2 + r2 + s2 = 3nrs ,

but 3nrs ≡ 0 (mod 3) and p2 + q 2 + r2 + s2 is congruent to either 1 or 2 modulo 3 , a contradiction.

20. Does there exist an infinite non-constant arithmetic progression, each term of which is of the form a b ,
where a and b are positive integers with b > 2 ?
Answer: no.
Solution. For an arithmetic progression a1 , a2 , . . . with difference d the following holds:

1 1 1 1 1 1
Sn = + + ... + = + + ... + >
a1 a2 an+1 a1 a1 + d a1 + nd
µ ¶
1 1 1 1
> + + ... + ,
m 1 2 n+1

where m = max(a1 , d) . Therefore Sn tends to infinity when n increases.


On the other hand, the sum of reciprocals of the powers of a natural number x 6= 1 is
1
1 1 x2 1
+ 3 + ... = = .
x2 x 1 x(x − 1)
1−
x
Hence, the sum of reciprocals of the terms of the progression required in the problem cannot exceed
µ ¶
1 1 1 1 1 1 1
+ + + ... = 1 + − + − + ... = 2 ,
1 1·2 2·3 1 2 2 3

a contradiction.
Alternative solution. Let ak = a0 + dk , k = 0, 1, . . . . Choose a prime number p > d and set
k 0 ≡ (p − a0 )d−1 mod p2 . Then ak0 = a0 + k 0 d ≡ p mod p2 and hence, ak0 can not be a power of
a natural number.
√ √
Another solution. There can be at most b nc squares in the set {1, 2, . . . , n} , at most b 3 nc cubes in
the same set, etc. The greatest power that can occur in the set {1, 2, . . . , n} is blog 2 nc and thus there
are no more than
√ √ √
b nc + b 3 nc + . . . + b blog2 nc nc

powers among the numbers 1, 2, . . . , n . Now we can estimate this sum above:
√ √ √ √
b nc + b 3 nc + . . . + b blog2 nc nc 6 b nc(blog2 nc − 1) <

< b nc · blog2 nc = o(n).

This means that every arithmetic progression grows faster than the share of powers.

13
Baltic Way 2003
Riga, November 2, 2003

Problems and solutions

1. Let Q+ be the set of positive rational numbers. Find all functions f : Q+ → Q+ which for all
x ∈ Q+ fulfil

(1) f ( 1x ) = f ( x )
(2) (1 + 1x ) f ( x ) = f ( x + 1)
f (x)
Solution: Set g( x ) = f (1)
. Function g fulfils (1), (2) and g(1) = 1. First we prove that if
p
g exists then it is unique. We prove that g is uniquely defined on x = q by induction
on max( p, q). If max( p, q) = 1 then x = 1 and g(1) = 1. If p = q then x = 1 and g( x )
is unique. If p 6= q then we can assume (according to (1)) that p > q. From (2) we get
p q p−q
g( q ) = (1 + p−q ) g( q ). The induction assumption and max( p, q) > max( p − q, q) ≥ 1
p
now give that g( q ) is unique.
p
Define the function g by g( q ) = pq where p and q are chosen such that gcd( p, q) = 1.
It is easily seen that g fulfils (1), (2) and g(1) = 1. All functions fulfilling (1) and (2) are
p
therefore f ( q ) = apq, where gcd( p, q) = 1 and a ∈ Q+ .
2. Prove that any real solution of

x3 + px + q = 0

satisfies the inequality 4qx ≤ p2 .


Solution: Let x0 be a root of the qubic, then x3 + px + q = ( x − x0 )( x2 + ax + b) =
x3 + ( a − x0 ) x2 + (b − ax0 ) x − bx0 . So a = x0 , p = b − ax0 = b − x02 , −q = bx0 . Hence
p2 = b2 − 2bx02 + x04 . Also 4x0 q = −4x02 b. So p2 − 4x0 q = b2 + 2bx02 + x04 = (b + x02 )2 ≥ 0.
Solution 2: As the equation x0 x2 + px + q = 0 has a root (x = x0 ), we must have
D ≥ 0 ⇔ p2 − 4qx0 ≥ 0. (Also the equation x2 + px + qx0 = 0 having the root x = x02
can be considered.)
3. Let x, y and z be positive real numbers such that xyz = 1. Prove that
r r r
3 y 3 z x
(1 + x )(1 + y)(1 + z) ≥ 2 1 + + + 3 .
x y z
Solution: Put a = bx, b = cy and c = az. The given inequality then takes the form
r r r
a  b  c 2 2 2
3 b 3 c 3 a
 
1+ 1+ 1+ ≥ 2 1+ + +
b c a ac ab bc
 a + b + c
= 2 1+ √ 3
.
3 abc
By the AM-GM inequality we have
 a  b  c a+b+c a+b+c a+b+c
1+ 1+ 1+ = + + −1
b c a a b c
a + b + c a+b+c  a + b + c
≥3 √ 3
− 1 ≥ 2 √3
+ 3 − 1 = 2 1 + √
3
.
abc abc abc

1
Solution 2: Expanding the left side we obtain
q q q 
1 y z x
x+y+z+ x + 1y + 1
z ≥2 3
x + 3
y + 3
z .
q
y 1 1

As 3
x ≤ 3 y+ x + 1 etc., it suffices to prove that
1
+ 1y + 1 2 1
+ y1 + 1

x+y+z+ x z ≥ 3 x+y+z+ x z + 2,

which follows from a + 1a ≥ 2.


4. Let a, b, c be positive real numbers. Prove that
2a 2b 2c a b c
+ 2 + 2 ≤ + + .
a2 + bc b + ca c + ab bc ca ab
Solution: First we prove that
2a 11 1
≤ + ,
a2 + bc 2 b c
which is equivalent to 0 ≤ b( a − c)2 + c( a − b)2 , and therefore holds true. Now we turn
to the inequality
1 1 1  2a b c 
+ ≤ + + ,
b c 2 bc ca ab
which by multiplying by 2abc is seen to be equivalent to 0 ≤ ( a − b)2 + ( a − c)2 . Hence
we have proved that
2a 1  2a b c 
≤ + + .
a2 + bc 4 bc ca ab
Analogously we have
2b 1  2b c a
≤ + + ,
b2 + ca 4 ca ab bc
2c 1  2c a b
≤ + +
c2 + ab 4 ab bc ca
and it suffices to sum the above three inequalities.

Solution 2: As a2 + bc ≥ 2a bc etc., it is sufficient to prove that
1 1 1 a b c
√ +√ +√ ≤ + + ,
bc ac ab bc ca ab
1
which can be obtained by “inserting” + 1b + 1c between the left side and the right side.
a

5. A sequence ( an ) is defined as follows: a1 = 2, a2 = 2, and an+1 = an a2n−1 for n ≥ 2. Prove
that for every n ≥ 1 we have

(1 + a1 )(1 + a2 ) · · · (1 + an ) < (2 + 2) a1 a2 · · · an .
n −2 −1
Solution: First we prove inductively that for n ≥ 1, an = 22 . We have a1 = 22 ,
0
a2 = 22 and
n −2 n −3 n −2 n −2 n −1
a n + 1 = 22 · (22 ) 2 = 22 · 22 = 22 .

2

Since 1 + a1 = 1 + 2, we must prove, that

(1 + a2 )(1 + a3 ) · · · (1 + an ) < 2a2 a3 · · · an .

The right-hand side is equal to


0 +21 +···+2n−2 n −1
21+2 = 22

and the left-hand side


0 1 n −2
(1 + 22 )(1 + 22 ) · · · (1 + 22 )
20 21 20 +21 2 0 +21 +···+2n−2
= 1+2 +2 +2 + 22 + · · · + 22
n −1 − 1
= 1 + 2 + 22 + 23 + · · · + 22
n −1
= 22 − 1.

The proof is complete.


6. Let n ≥ 2 and d ≥ 1 be integers with d | n, and let x1 , x2 , . . . , xn be real numbers
−1
such that x1 + x2 + · · · + xn = 0. Prove that there are at least (nd− 1 ) choices of d indices
1 ≤ i1 < i2 < · · · < id ≤ n such that xi1 + xi2 + · · · + xid ≥ 0.
Solution: Put m = n/d and [n] = {1, 2, . . . , n}, and consider all partitions [n] = A1 ∪
A2 ∪ · · · ∪ Am of [n] into d-element subsets Ai , i = 1, 2, . . . , m. The number of such
partitions is denoted by t. Clearly, there are exactly (nd) d-element subsets of [n] each
of which occurs in the same number of partitions. Hence, every A ⊆ [n] with | A| = d
occurs in exactly s := tm/(nd) partitions. On the other hand, every partition contains at
least one d-element set A such that ∑i∈ A xi ≥ 0. Consequently, the total number of sets
−1
with this property is at least t/s = (nd)/m = nd (nd) = (nd− 1 ).
7. Let X be a subset of {1, 2, 3, . . . , 10000} with the following property: If a, b ∈ X, a 6= b, then
a·b ∈ / X. What is the maximal number of elements in X?
Answer: 9901.
Solution: If X = {100, 101, 102, . . . , 9999, 10000}, then for any two selected a and b, a 6= b,
a · b ≥ 100 · 101 > 10000, so a · b 6∈ X. So X may have 9901 elements.
Suppose that x1 < x2 < · · · < xk are all elements of X that are less than 100. If there
are none of them, no more than 9901 numbers can be in the set X. Otherwise, if x1 = 1
no other number can be in the set X, so suppose x1 > 1 and consider the pairs

200 − x1 , (200 − x1 ) · x1
200 − x2 , (200 − x2 ) · x2
..
.
200 − xk , (200 − xk ) · xk

Clearly x1 < x2 < · · · < xk < 100 < 200 − xk < 200 − xk−1 < · · · < 200 − x2 <
200 − x1 < 200 < (200 − x1 ) · x1 < (200 − x2 ) · x2 < · · · < (200 − xk ) · xk . So all numbers
in these pairs are different and greater than 100. So at most one from each pair is in the
set X. Therefore, there are at least k numbers greater than 100 and 99 − k numbers less
than 100 that are not in the set X, together at least 99 numbers out of 10000 not being in
the set X.

3
8. There are 2003 pieces of candy on a table. Two players alternately make moves. A move consists
of eating one candy or half of the candies on the table (the “lesser half” if there is an odd number
of candies); at least one candy must be eaten at each move. The loser is the one who eats the last
candy. Which player – the first or the second – has a winning strategy?
Answer: The second.
Solution: Let us prove inductively that for 2n pieces of candy the first player has a
winning strategy. For n = 1 it is obvious. Suppose it is true for 2n pieces, and let’s
consider 2n + 2 pieces. If for 2n + 1 pieces the second is the winner, then the first eats
1 piece and becomes the second in the game starting with 2n + 1 pieces. So suppose
that for 2n + 1 pieces the first is the winner. His winning move for 2n + 1 is not eating 1
piece (according to the inductive assumption). So his winning move is to eat n pieces,
leaving the second with n + 1 pieces, when the second must lose. But the first can leave
the second with n + 1 pieces from the starting position with 2n + 2 pieces, eating n + 1
pieces; so 2n + 2 is a winning position for the first.
Now if there are 2003 pieces of candy on the table, the first must eat either 1 or 1001
candies, leaving an even number of candies on the table. So the second player will be the
first player in a game with even number of candies and therefore has a winning strategy.
In general, if there is an odd number N of candies, write N = 2m r + 1, where r is
odd. Then the first player wins if m is even, and the second player wins if m is odd: At
each move, the player must avoid leaving the other with an even number of candies, so
he must eat half of the candies. But this means that the number of candies descend as
2m r + 1, 2m−1 r + 1, . . . , 2r + 1, r + 1, and eventually there is an even number of candies.
9. It is known that n is a positive integer, n ≤ 144. Ten questions of type “Is n smaller than
a?” are allowed. Answers are given with a delay: The answer to the i’th question is given only
after the (i + 1)’st question is asked, i = 1, 2, . . . , 9. The answer to the tenth question is given
immediately after it is asked. Find a strategy for identifying n.
Solution: Let the Fibonacci numbers be denoted F0 = 1, F1 = 2, F2 = 3 etc. Then
F10 = 144. We will prove by induction on k that using k questions subject to the
conditions of the problem, it is possible to determine any positive integer n ≤ Fk . First,
for k = 0 it is trivial, since without asking we know that n = 1. For k = 1, we simply ask
if n is smaller than 2. For k = 2, we ask if n is smaller than 3 and if n is smaller than 2;
from the two answers we can determine n.
Now, in general, our first two questions will always be “Is n smaller than Fk−1 + 1?”
and “Is n smaller than Fk−2 + 1”. We then receive the answer to the first question. As long
as we receive affirmative answers to the i − 1’st question, the i + 1’st question will be “Is
n smaller than Fk−(i+1) + 1?”. If at any point, say after asking the j’th question, we receive
a negative answer to the j − 1’st question, we then know that Fk−( j−1) + 1 ≤ n ≤ Fk−( j−2) ,
so n is one of Fk−( j−2) − Fk−( j−1) = Fk− j consecutive integers, and by induction we may
determine n using the remaining k − j questions. Otherwise, we receive affirmative
answers to all the questions, the last being “Is n smaller than Fk−k + 1 = 2?”; so n = 1 in
that case.
10. A lattice point in the plane is a point whose coordinates are both integral. The centroid of
y +y +y +y
four points ( xi , yi ), i = 1, 2, 3, 4, is the point ( x1 + x2 +4 x3 + x4 , 1 2 4 3 4 ). Let n be the largest
natural number with the following property: There are n distinct lattice points in the plane such
that the centroid of any four of them is not a lattice point. Prove that n = 12.
Solution: To prove n ≥ 12, we have to show that there are 12 lattice points ( xi , yi ),
i = 1, 2, . . . , 12, such that no four determine a lattice point centroid. This is guaranteed if
we just choose the points such that xi ≡ 0 (mod 4) for i = 1, . . . , 6, xi ≡ 1 (mod 4) for

4
i = 7, . . . , 12, yi ≡ 0 (mod 4) for i = 1, 2, 3, 10, 11, 12, yi ≡ 1 (mod 4) for i = 4, . . . , 9.
Now let Pi , i = 1, 2, . . . , 13, be lattice points. We have to show that some four of
them determine a lattice point centroid. First observe that, by the Pigeonhole Principle,
among any five of the points we find two such that their x-coordinates as well as their
y-coordinates have the same parity. Consequently, among any five of the points there are
two whose midpoint is a lattice point. Iterated application of this observation implies
that among the 13 points in question we find five disjoint pairs of points whose midpoint
is a lattice point. Among these five midpoints we again find two, say M and M0 , such
that their midpoint C is a lattice point. Finally, if M and M0 are the midpoints of Pi Pj
and Pk P` , respectively, {i, j, k, `} ⊆ {1, 2, . . . , 13}, then C is the centroid of Pi , Pj , Pk , P` .
11. Is it possible to select 1000 points in a plane so that at least 6000 distances between two of
them are equal?
Answer: Yes.
Solution: Let’s start with configuration of 4 points and 5 distances equal to d, like in this
figure:
d
(α)

Now take (α) and two copies of it obtainable by parallel shifts along vectors ~a and
~b, |~a| = |~b| = d and ∠(~a,~b) = 60◦ . Vectors ~a and ~b should be chosen so that no two
vertices of (α) and of the two copies coincide. We get 3 · 4 = 12 points and 3 · 5 + 12 = 27
distances. Proceeding in the same way, we get gradually

• 3 · 12 = 36 points and 3 · 27 + 36 = 117 distances;


• 3 · 36 = 108 points and 3 · 117 + 108 = 459 distances;
• 3 · 108 = 324 points and 3 · 459 + 324 = 1701 distances;
• 3 · 324 = 972 points and 3 · 1701 + 972 = 6075 distances.

12. Let ABCD be a square. Let M be an inner point on side BC and N be an inner point on side
CD with ∠ MAN = 45◦ . Prove that the circumcentre of AMN lies on AC.
Solution: Draw a circle ω through M, C, N; let it intersect AC at O. We claim that O is
the circumcentre of AMN.
Clearly ∠ MON
√ = 180◦ − ∠ MCN ◦
√ = 90 . If the radius of ω is R, then OM =

2R sin 45 = R 2; similarly√ON = R 2. Hence we get that OM = ON. Then the circle
with centre O and radius R 2 will pass through A, since ∠ MAN = 12 ∠ MON.
B M C

O
N

A D

13. Let ABCD be a rectangle and BC = 2 · AB. Let E be the midpoint of BC and P an arbitrary
inner point of AD. Let F and G be the feet of perpendiculars drawn correspondingly from A to
BP and from D to CP. Prove that the points E, F, P, G are concyclic.
Solution: From rectangular triangle BAP we have BP · BF = AB2 = BE2 . Therefore the
circumference through F and P touching the line BC between B and C touches it at E.

5
Analogously, the circumference through P and G touching the line BC between B and
C touches it at E. But there is only one circumference touching BC at E and passing
through P.
B E C
F

A P D

14. Let ABC be an arbitrary triangle and AMB, BNC, CKA regular triangles outward of
ABC. Through the midpoint of MN a perpendicular to AC is constructed; similarly through the
midpoints of NK resp. KM perpendiculars to AB resp. BC are constructed. Prove that these three
perpendiculars intersect at the same point.
Solution: Let O be the midpoint of MN, and let E and F be the midpoints of AB and BC,
respectively. As triangle MBC transforms into triangle ABN when rotated 60◦ around B
we get MC = AN (it is also a well-known fact). Considering now the quadrangles AMBN
and CMBN we get OE = OF (from Eiler’s formula a2 + b2 + c2 + d2 = e2 + f 2 + 4 · PQ2
or otherwise). As EF k AC we get from this that the perpendicular to AC through O
passes through the circumcentre of EFG, as it is the perpendicular bisector of EF. The
same holds for the other two perpendiculars.
B
B1 N

B M
O N

M C1
E F A1 A C

A G C K
First solution Second solution
Solution 2: Let us denote the midpoints of the segments MN, NK, KM by B1 , C1 , A1 ,
respectively. It is easy to see that triangle A1 B1 C1 is homothetic to triangle NKM via
the homothety centered at the intersection of the medians of triangle N MK and dilation
− 12 . The perpendiculars through M, N, K to AB, BC, CA, respectively, are also the
perpendicular bisectors of these sides, so they intersect in the circumcentre of triangle
ABC. The desired result follows now from the homothety, and we find that that the
common point of intersection is the circumcentre of the image of triangle ABC under the
homothety; that is, the circumcentre of the triangle with vertices the midpoints of the
sides AB, BC, CA.

15. Let P be the intersection point of the diagonals AC and BD in a cyclic quadrilateral. A circle
through P touches the side CD in the midpoint M of this side and intersects the segments BD
and AC in the points Q and R, respectively. Let S be a point on the segment BD such that
BS = DQ. The parallel to AB through S intersects AC at T. Prove that AT = RC.
Solution: With reference to the figure below we have CR · CP = DQ · DP = CM2 = DM2 ,
· DP AP· DQ
which is equivalent to RC = DQCP . We also have AT AP AT
BS = BP = DQ , so AT = BP . Since
ABCD is cyclic the result now comes from the fact that DP · BP = AP · CP (due to a
well-known theorem).

6
A D
Q
T
P M
S
R

C
B

16. Find all pairs of positive integers ( a, b) such that a − b is a prime and ab is a perfect square.
p +1 p −1
Answer: Pairs ( a, b) = (( 2 )2 , ( 2 )2 ), where p is a prime greater than 2.
Solution: Let p be a prime such that a − b = p and let ab = k2 . Insert a = b + p in the
equation ab = k2 . Then

p 2 p2
k2 = ( b + p ) b = ( b + ) −
2 4
which is equivalent to

p2 = (2b + p)2 − 4k2 = (2b + p + 2k )(2b + p − 2k ).

Since 2b + p + 2k > 2b + p − 2k and p is a prime, we conclude 2b + p + 2k = p2


p2 +1
and 2b + p − 2k = 1. By adding these equations we get 2b + p = 2 and then
p −1 p +1
b = ( 2 )2 , so a = b + p = ( 2 )2 . By checking we conclude that all the solutions are
( a, b) = (( p+2 1 )2 , ( p−2 1 )2 ) with p a prime greater than 2.
Solution 2: Let p be a prime such that a − b = p and let ab = k2 . We have (b + p)b = k2 ,
so gcd(b, b + p) = gcd(b, p) is equal either to 1 or p. If gcd(b, b + p) = p, let b = b1 p.
Then p2 b1 (b1 + 1) = k2 , b1 (b1 + 1) = m2 , but this equation has no solutions.
Hence gcd(b, b + p) = 1, and

b = u2 b + p = v2

so that p = v2 − u2 = (v + u)(v − u). This in turn implies that v − u = 1 and v + u = p,


p +1  2 p −1  2
from which we finally obtain a = 2 ,b= 2 , where p must be an odd prime.
17. All the positive divisors of a positive integer n are stored into an array in increasing order.
Mary has to write a program which decides for an arbitrarily chosen divisor d > 1 whether it is a
prime. Let n have k divisors not greater than d. Mary claims that it suffices to check divisibility
of d by the first dk/2e divisors of n: If a divisor of d greater than 1 is found among them, then d
is composite, otherwise d is prime. Is Mary right?
Answer: Yes, Mary is right.
Solution: Let d > 1 be a divisor of n. Suppose Mary’s program outputs “composite” for
d. That means it has found a divisor of d greater than 1. Since d > 1, the array contains
at least 2 divisors of d, namely 1 and d. Thus Mary’s program does not check divisibility
of d by d (the first half gets complete before reaching d) which means that the divisor
found lays strictly between 1 and d. Hence d is composite indeed.
Suppose now d being composite. Let p be its smallest prime divisor; then dp ≥ p
or, equivalently, d ≥ p2 . As p is a divisor of n, it occurs in the array. Let a1 , . . . , ak all
divisors of n smaller than p. Then pa1 , . . . , pak are less than p2 and hence less than d.

7
As a1 , . . . , ak are all relatively prime with p, all the numbers pa1 , . . . , pak divide n. The
numbers a1 , . . . , ak , pa1 , . . . , pak are pairwise different by construction. Thus there are at
least 2k + 1 divisors of n not greater than d. So Mary’s program checks divisibility of d
by at least k + 1 smallest divisors of n, among which it finds p, and outputs “composite”.
18. Every integer is coloured with exactly one of the colours blue, green, red, yellow.
Can this be done in such a way that if a, b, c, d are not all 0 and have the same colour, then
3a − 2b 6= 2c − 3d?
Answer: Yes.
Solution: A colouring with the required property can be defined as follows. For a
non-zero integer k let k∗ be the integer uniquely defined by k = 5m · k∗ , where m is a
nonnegative integer and 5 - k∗ . We also define 0∗ = 0. Two non-zero integers k1 , k2
receive the same colour if and only if k∗1 ≡ k∗2 (mod 5); we assign 0 any colour.
Assume a, b, c, d has the same colour and that 3a − 2b = 2c − 3d, which we rewrite as
3a − 2b − 2c + 3d = 0. Dividing both sides by the largest power of 5 which simultaneously
divides a, b, c, d (this makes sense since not all of a, b, c, d are 0), we obtain
3 · 5 A · a∗ − 2 · 5B · b∗ − 2 · 5C · c∗ + 3 · 5D · d∗ = 0,
where A, B, C, D are nonnegative integers at least one of which is equal to 0. The above
equality implies
3 ( 5 A · a ∗ + 5 B · b ∗ + 5C · c ∗ + 5 D · d ∗ ) ≡ 0 (mod 5).
Assume a, b, c, d are all non-zero. Then a∗ ≡ b∗ ≡ c∗ ≡ d∗ 6≡ 0 (mod 5). This implies
5 A + 5 B + 5C + 5 D ≡ 0 (mod 5) (1)
which is impossible since at least one of the numbers A, B, C, D is equal to 0. If one or
more of a, b, c, d are 0, we simply omit the corresponding terms from (1), and the same
conclusion holds.
19. Let a and b be positive integers. Prove that if a3 + b3 is the square of an integer, then a + b is
not a product of two different prime numbers.
Solution: Suppose a + b = pq, where p 6= q are two prime numbers. We may assume
that p 6= 3. Since
a3 + b3 = ( a + b)( a2 − ab + b2 )
is a square, the number a2 − ab + b2 = ( a + b)2 − 3ab must be divisible by p and q,
whence 3ab must be divisible by p and q. But p 6= 3, so p | a or p | b; but p | a + b, so
p | a and p | b. Write a = pk, b = p` for some integers k, `. Notice that q = 3, since
otherwise, repeating the above argument, we would have q | a, q | b and a + b > pq). So
we have
3p = a + b = p(k + `)
and we conclude that a = p, b = 2p or a = 2p, b = p. Then a3 + b3 = 9p3 is obviously
not a square, a contradiction.
20. Let n be a positive integer such that the sum of all the positive divisors of n (except n) plus
the number of these divisors is equal to n. Prove that n = 2m2 for some integer m.
Solution: Let t1 < t2 < · · · < ts be all positive odd divisors of n, and let 2k be the
maximal power of 2 that divides n. Then the full list of divisors of n is the following:
t1 , . . . , ts , 2t1 , . . . , 2ts , . . . , 2k t1 , . . . , 2k ts .

8
Hence,

2n = (2k+1 − 1)(t1 + t2 + · · · + ts ) + (k + 1)s − 1.

The right-hand side can be even only if both k and s are odd. In this case the number
n/2k has an odd number of divisors and therefore it is equal to a perfect square r2 .
Writing k = 2a + 1, we have n = 2k r2 = 2(2a r )2 .

9
Baltic Way 2004
Vilnius, November 7, 2004

Problems and solutions


1. Given a sequence a1 , a2 , a3 , . . . of non-negative real numbers satisfying the conditions
(1) an + a2n ≥ 3n
p
(2) an+1 + n ≤ 2 an · (n + 1)
for all indices n = 1, 2 . . ..
(a) Prove that the inequality an ≥ n holds for every n ∈ N.
(b) Give an example of such a sequence.
Solution: (a) Note that the inequality
a n +1 + n √
≥ a n +1 · n
2
holds, which together with the second condition of the problem gives
√ q
a n +1 · n ≤ a n · ( n + 1 ).

This inequality simplifies to


a n +1 n+1
≤ .
an n
Now, using the last inequality for the index n replaced by n, n + 1, . . . , 2n − 1 and
multiplying the results, we obtain
a2n 2n
≤ =2
an n
or 2an ≥ a2n . Taking into account the first condition of the problem, we have
3an = an + 2an ≥ an + a2n ≥ 3n
which implies an ≥ n. (b) The sequence defined by an = n + 1 satisfies all the conditions
of the problem.
2. Let P( x ) be a polynomial with non-negative coefficients. Prove that if P( 1x ) P( x ) ≥ 1 for
x = 1, then the same inequality holds for each positive x.
Solution: For x > 0 we have P( x ) > 0 (because at least one coefficient is non-zero). From
the given condition we have ( P(1))2 ≥ 1. Further, let’s denote P( x ) = an x n + an−1 x n−1 +
· · · + a0 . Then
P( x ) P( 1x ) = ( an x n + · · · + a0 )( an x −n + · · · + a0 )
n n i −1
= ∑ a2i + ∑ ∑ (ai− j a j )(xi + x−i )
i =0 i =1 j =0
n
≥ ∑ a2i + 2 ∑ ai a j
i =0 i> j
2
= ( P(1)) ≥ 1.

1
3. Let p, q, r be positive real numbers and n ∈ N. Show that if pqr = 1, then

1 1 1
+ n + n ≤ 1.
pn + q + 1 q + r + 1 r + pn + 1
n n

Solution: The key idea is to deal with the case n = 3. Put a = pn/3 , b = qn/3 , and
c = r n/3 , so abc = ( pqr )n/3 = 1 and
1 1 1 1 1 1
p n + q n +1 + q n +r n +1 + r n + p n +1 = a3 + b3 +1
+ b3 + c3 +1
+ c3 + a3 +1
.

Now
1 1 1 1
a3 + b3 +1
= ( a+b)( a2 − ab+b2 )+1
= ( a+b)(( a−b)2 + ab)+1
≤ ( a+b) ab+1
.

Since ab = c−1 ,
1 1 c
a3 + b3 +1
≤ ( a+b) ab+1
= a+b+c .

Similarly we obtain
1 a 1 b
b3 + c3 +1
≤ a+b+c and c3 + a3 +1
≤ a+b+c .

Hence
1 1 1 c a b
a3 + b3 +1
+ b3 + c3 +1
+ c3 + a3 +1
≤ a+b+c + a+b+c + a+b+c = 1,

which was to be shown.


4. Let x1 , x2 , . . . , xn be real numbers with arithmetic mean X. Prove that there is a positive
integer K such that the arithmetic mean of each of the lists { x1 , x2 , . . . , xK }, { x2 , x3 , . . . , xK },
. . . , { xK−1 , xK }, { xK } is not greater than X.
Solution: Suppose the conclusion is false. This means that for every K ∈ {1, 2, . . . , n},
there exists a k ≤ K such that the arithmetic mean of xk , xk+1 , . . . , xK exceeds X. We
now define a decreasing sequence b1 ≥ a1 > a1 − 1 = b2 ≥ a2 > · · · as follows: Put
b1 = n, and for each i, let ai be the largest largest k ≤ bi such that the arithmetic mean
of x ai , . . . , xbi exceeds X; then put bi+1 = ai − 1 and repeat. Clearly for some m, am = 1.
Now, by construction, each of the sets { x am , . . . , xbm }, { x am−1 , . . . , xbm−1 }, . . . , { x a1 , . . . , xb1 }
has arithmetic mean strictly greater than X, but then the union { x1 , x2 , . . . , xn } of these
sets has arithmetic mean strictly greater than X; a contradiction.
5. Determine the range of the function f defined for integers k by

f (k ) = (k )3 + (2k )5 + (3k )7 − 6k,

where (k )2n+1 denotes the multiple of 2n + 1 closest to k.


Solution: For odd n we have
n−1  n − 1
(k )n = k + − k+ ,
2 2 n
where [m]n denotes the principal remainder of m modulo n. Hence we get

f (k ) = 6 − [k + 1]3 − [2k + 2]5 − [3k + 3]7 .

2
The condition that the principal remainders take the values a, b and c, respectively, may
be written

k+1 ≡ a (mod 3),


2k + 2 ≡ b (mod 5),
3k + 3 ≡ c (mod 7)

or
k ≡ a−1 (mod 3),
k ≡ −2b − 1 (mod 5),
k ≡ −2c − 1 (mod 7).

By the Chinese Remainder Theorem, these congruences have a solution for any set of
a, b, c. Hence f takes all the integer values between 6 − 2 − 4 − 6 = −6 and 6 − 0 − 0 − 0 =
6. (In fact, this proof also shows that f is periodic with period 3 · 5 · 7 = 105.)
6. A positive integer is written on each of the six faces of a cube. For each vertex of the cube we
compute the product of the numbers on the three adjacent faces. The sum of these products is
1001. What is the sum of the six numbers on the faces?
Solution: Let the numbers on the faces be a1 , a2 , b1 , b2 , c1 , c2 , placed so that a1 and a2
are on opposite faces etc. Then the sum of the eight products is equal to

( a1 + a2 )(b1 + b2 )(c1 + c2 ) = 1001 = 7 · 11 · 13.


Hence the sum of the numbers on the faces is a1 + a2 + b1 + b2 + c1 + c2 = 7 + 11 + 13 =
31.
7. Find all sets X consisting of at least two positive integers such that for every pair m, n ∈ X,
where n > m, there exists k ∈ X such that n = mk2 .
Answer: The sets {m, m3 }, where m > 1.
Solution: Let X be a set satisfying the condition of the problem and let n > m be the
two smallest elements in the set X. There has to exist a k ∈ X so that n = mk2 , but as
m ≤ k ≤ n, either k = n or k = m. The first case gives m = n = 1, a contradiction; the
second case implies n = m3 with m > 1.
Suppose there exists a third smallest element q ∈ X. Then there also exists k0 ∈ X,
such that q = mk20 . We have q > k0 ≥ m, but k0 = m would imply q = n, thus
k0 = n = m3 and q = m7 . Now for q and n there has to exist k1 ∈ X such that q = nk21 ,
which gives k1 = m2 . Since m2 6∈ X, we have a contradiction.
Thus we see that the only possible sets are those of the form {m, m3 } with m > 1,
and these are easily seen to satisfy the conditions of the problem.
8. Let f be a non-constant polynomial with integer coefficients. Prove that there is an integer n
such that f (n) has at least 2004 distinct prime factors.
Solution: Suppose the contrary. Choose an integer n0 so that f (n0 ) has the highest
number of prime factors. By translating the polynomial we may assume n0 = 0. Setting
k = f (0), we have f (wk2 ) ≡ k (mod k2 ), or f (wk2 ) = ak2 + k = ( ak + 1)k. Since
gcd( ak + 1, k ) = 1 and k alone achieves the highest number of prime factors of f , we
must have ak + 1 = ±1. This cannot happen for every w since f is non-constant, so we
have a contradiction.
9. A set S of n − 1 natural numbers is given (n ≥ 3). There exists at least two elements in this
set whose difference is not divisible by n. Prove that it is possible to choose a non-empty subset of
S so that the sum of its elements is divisible by n.

3
Solution: Suppose to the contrary that there exists a set X = { a1 , a2 , . . . , an−1 } violating
the statement of the problem, and let an−2 6≡ an−1 (mod n). Denote Si = a1 + a2 +
· · · + ai , i = 1, . . . , n − 1. The conditions of the problem imply that all the numbers Si
must give different remainders when divided by n. Indeed, if for some j < k we had
S j ≡ Sk (mod n), then a j+1 + a j+2 + · · · + ak = Sk − S j ≡ 0 (mod n). Consider now the
sum S0 = Sn−3 + an−1 . We see that S0 can not be congruent to any of the sums Si (for
i 6= n − 2 the above argument works and for i = n − 2 we use the assumption an−2 6≡ an−1
(mod n)). Thus we have n sums that give pairwise different remainders when divided
by n, consequently one of them has to give the remainder 0, a contradiction.
10. Is there an infinite sequence of prime numbers p1 , p2 , . . . such that | pn+1 − 2pn | = 1 for each
n ∈ N?
Answer: No, there is no such sequence.
Solution: Suppose the contrary. Clearly p3 > 3. There are two possibilities: If p3 ≡ 1
(mod 3) then necessarily p4 = 2p3 − 1 (otherwise p4 ≡ 0 (mod 3)), so p4 ≡ 1 (mod 3).
Analogously p5 = 2p4 − 1, p6 = 2p5 − 1 etc. By an easy induction we have

p n +1 − 1 = 2n −2 ( p 3 − 1 ), n = 3, 4, 5, . . . .

If we set n = p3 + 1 we have p p3 +2 − 1 = 2 p3 −1 ( p3 − 1), from which

p p3 +2 ≡ 1 + 1 · ( p 3 − 1 ) = p 3 ≡ 0 (mod p3 ),

a contradiction. The case p3 ≡ 2 (mod 3) is treated analogously.


11. An m × n table is given, in each cell of which a number +1 or −1 is written. It is known
that initially exactly one −1 is in the table, all the other numbers being +1. During a move, it is
allowed to choose any cell containing −1, replace this −1 by 0, and simultaneously multiply all
the numbers in the neighboring cells by −1 (we say that two cells are neighboring if they have a
common side). Find all (m, n) for which using such moves one can obtain the table containing
zeroes only, regardless of the cell in which the initial −1 stands.
Answer: Those (m, n) for which at least one of m, n is odd.
Solution: Let us erase a unit segment which is the common side of any two cells in
which two zeroes appear. If the final table consists of zeroes only, all the unit segments
(except those which belong to the boundary of the table) are erased. We must erase a
total of

m(n − 1) + n(m − 1) = 2mn − m − n

such unit segments.


On the other hand, in order to obtain 0 in a cell with initial +1 one must first
obtain −1 in this cell, that is, the sign of the number in this cell must change an odd
number of times (namely, 1 or 3). Hence, any cell with −1 (except the initial one) has
an odd number of neighboring zeroes. So, any time we replace −1 by 0 we erase an
odd number of unit segments. That is, the total number of unit segments is congruent
modulo 2 to the initial number of +1’s in the table. Therefore 2mn − m − n ≡ mn − 1
(mod 2), implying that (m − 1)(n − 1) ≡ 0 (mod 2), so at least one of m, n is odd.
It remains to show that if, for example, n is odd, we can obtain a zero table. First,
if −1 is in the i’th row, we may easily make the i’th row contain only zeroes, while its
one or two neighboring rows contain only −1’s. Next, in any row containing only −1’s,
we first change the −1 in the odd-numbered columns (that is, the columns 1, 3, . . . , n)
to zeroes, resulting in a row consisting of alternating 0 and −1 (since the −1’s in the

4
even-numbered columns have been changed two times), and we then easily obtain an
entire row of zeroes. The effect of this on the next neighboring row is to create a new
row of −1’s, while the original row is clearly unchanged. In this way we finally obtain a
zero table.
12. There are 2n different numbers in a row. By one move we can interchange any two numbers
or interchange any three numbers cyclically (choose a, b, c and place a instead of b, b instead of c
and c instead of a). What is the minimal number of moves that is always sufficient to arrange the
numbers in increasing order?
Solution: If a number y occupies the place where x should be at the end, we draw an
arrow x → y. Clearly at the beginning all numbers are arranged in several cycles: Loops

• , binary cycles •  • and “long” cycles (at least three numbers). Our aim is

to obtain 2n loops.
Clearly each binary cycle can be rearranged into two loops by one move. If there is a
long cycle with a fragment · · · → a → b → c → · · · , interchange a, b, c cyclically so that

at least two loops, a , b , appear. By each of these moves, the number of loops increase
by 2, so at most n moves are needed.
On the other hand, by checking all possible ways the two or three numbers can
be distributed among disjoint cycles, it is easy to see that each of the allowed moves
increases the number of disjoint cycles by at most two. Hence if the initial situation is
one single loop, at least n moves are needed.
13. The 25 member states of the European Union set up a committee with the following rules:
(1) the committee should meet daily; (2) at each meeting, at least one member state should
be represented; (3) at any two different meetings, a different set of member states should be
represented; and (4) at the n’th meeting, for every k < n, the set of states represented should
include at least one state that was represented at the k’th meeting. For how many days can the
committee have its meetings?
Answer: At most 224 = 16777216 days.
Solution: If one member is always represented, rules 2 and 4 will be fulfilled. There are
224 different subsets of the remaining 24 members, so there can be at least 224 meetings.
Rule 3 forbids complementary sets at two different meetings, so the maximal number
of meetings cannot exceed 12 · 225 = 224 . So the maximal number of meetings for the
committee is exactly 224 = 16777216.
14. We say that a pile is a set of four or more nuts. Two persons play the following game. They
start with one pile of n ≥ 4 nuts. During a move a player takes one of the piles that they have
and split it into two non-empty subsets (these sets are not necessarily piles, they can contain an
arbitrary number of nuts). If the player cannot move, he loses. For which values of n does the first
player have a winning strategy?
Answer: The first player has a winning strategy when n ≡ 0, 1, 2 (mod 4); otherwise the
second player has a winning strategy.
Solution: Let n = 4k + r, where 0 ≤ r ≤ 3. We will prove the above answer by induction
on k; clearly it holds for k = 1. We are also going to need the following useful fact:
If at some point there are exactly two piles with 4s + 1 and 4t + 1 nuts,
s + t ≤ k, then the second player to move from that point wins.
This holds vacuously when k = 1.
Now assume that we know the answer when the starting pile consists of at most
4k − 1 nuts, and that the useful fact holds for s + t ≤ k. We will prove the answer is

5
correct for 4k, 4k + 1, 4k + 2 and 4k + 3, and that the useful fact holds for s + t ≤ k + 1.
For the sake of bookkeeping, we will refer to the first player as A and the second player
as B.
If the pile consists of 4k, 4k + 1 or 4k + 2 nuts, A simply makes one pile consisting
of 4k − 1 nuts, and another consisting of 1, 2 or 3 nuts, respectively. This makes A the
second player in a game starting with 4k − 1 ≡ 3 (mod 4) nuts, so A wins.
Now assume the pile contains 4k + 3 nuts. A can split the pile in two ways: Either
as (4p + 1, 4q + 2) or (4p, 4q + 3). In the former case, if either p or q is 0, B wins by the
above paragraph. Otherwise, B removes one nut from the 4q + 2 pile, making B the
second player in a game where we may apply the useful fact (since p + q = k), so B wins.
If A splits the original pile as (4p, 4q + 3), B removes one nut from the 4p pile, so the
situation is two piles with 4( p − 1) + 3 and 4q + 3 nuts. Then B can use the winning
strategy for the second player just described on each pile seperately, ultimately making B
the winner.
It remains to prove the useful fact when s + t = k + 1. Due to symmetry, there are
two possibilities for the first move: Assume the first player moves (4s + 1, 4t + 1) →
(4s + 1, 4p, 4q + 1). The second player then splits the middle pile into (4p − 1, 1), so the
situation is (4s + 1, 4q + 1, 4p − 1). Since the second player has a winning strategy both
when the initial situtation is (4s + 1, 4q + 1) and when it is 4p − 1, he wins (this also
holds when p = 1).
Now assume the first player makes the move (4s + 1, 4t + 1) → (4s + 1, 4p + 2, 4q + 3).
If p = 0, the second player splits the third pile as 4q + 3 = (4q + 1) + 2 and wins by the
useful fact. If p > 0, the second player splits the second pile as 4p + 2 = (4p + 1) + 1,
and wins because he wins in each of the situations (4s + 1, 4p + 1) and 4q + 3.

15. A circle is divided into 13 segments, numbered consecutively from 1 to 13. Five fleas called
A, B, C, D and E are sitting in the segments 1, 2, 3, 4 and 5. A flea is allowed to jump to an
empty segment five positions away in either direction around the circle. Only one flea jumps at
the same time, and two fleas cannot be in the same segment. After some jumps, the fleas are back
in the segments 1, 2, 3, 4, 5, but possibly in some other order than they started. Which orders are
possible?
Solution: Write the numbers from 1 to 13 in the order 1, 6, 11, 3, 8, 13, 5, 10, 2, 7, 12, 4,
9. Then each time a flea jumps it moves between two adjacent numbers or between the
first and the last number in this row. Since a flea can never move past another flea, the
possible permutations are
1 3 5 2 4 1 2 3 4 5
A C E B D A B C D E
D A C E B D E A B C
or equivalently
B D A C E B C D E A
E B D A C E A B C D
C E B D A C D E A B

that is, exactly the cyclic permutations of the original order.

16. Through a point P exterior to a given circle pass a secant and a tangent to the circle. The
secant intersects the circle at A and B, and the tangent touches the circle at C on the same side of
the diameter thorugh P as A and B. The projection of C on the diameter is Q. Prove that QC
bisects ∠ AQB.
Solution: Denoting the centre of the circle by O, we have OQ · OP = OA2 = OB2 .
Hence 4OAQ ∼ 4OPA and 4OBQ ∼ 4OPB. Since 4 AOB is isosceles, we have

6
∠OAP + ∠OBP = 180◦ , and therefore
∠ AQP + ∠ BQP = ∠ AOP + ∠OAQ + ∠ BOP + ∠OBQ
= ∠ AOP + ∠OPA + ∠ BOP + ∠OPB
= 180◦ − ∠OAP + 180◦ − ∠OBP
= 180◦ .
Thus QC, being perpendicular to QP, bisects ∠ AQB.
17. Consider a rectangle with side lengths 3 and 4, and pick an arbitrary inner point on each side.
Let x, y, z and u denote the side lengths of the quadrilateral spanned by these points. Prove that
25 ≤ x2 + y2 + z2 + u2 ≤ 50.
Solution: Let a, b, c and d be the distances of the chosen points from the midpoints of
the sides of the rectangle (with a and c on the sides of length 3). Then
x2 + y2 + z2 + u2 = ( 23 + a)2 + ( 32 − a)2 + ( 32 + c)2 + ( 32 − c)2
+ (2 + b )2 + (2 − b )2 + (2 + d )2 + (2 − d )2
= 4 · ( 32 )2 + 4 · 22 + 2( a2 + b2 + c2 + d2 )
= 25 + 2( a2 + b2 + c2 + d2 ).
Since 0 ≤ a2 , c2 ≤ (3/2)2 , 0 ≤ b2 , d2 ≤ 22 , the desired inequalities follow.
18. A ray emanating from the vertex A of the triangle ABC intersects the side BC at X and the
1 1 4
circumcircle of ABC at Y. Prove that AX + XY ≥ BC .
Solution: From the GM-HM inequality we have
1 1 2
+ ≥√ . (1)
AX XY AX · XY
As BC and AY are chords intersecting at X we have AX · XY = BX · XC. Therefore (1)
transforms into
1 1 2
+ ≥√ . (2)
AX XY BX · XC
We also have
√ BX + XC BC
BX · XC ≤ = ,
2 2
so from (2) the result follows.
19. D is the midpoint of the side BC of the given triangle ABC. M is a point on the side BC
such that ∠ BAM = ∠ DAC. L is the second intersection point of the circumcircle of the triangle
CAM with the side AB. K is the second intersection point of the circumcircle of the triangle
BAM with the side AC. Prove that KL k BC.
Solution: It is sufficient to prove that CK : LB = AC : AB.
The triangles ABC and MKC are similar beacuse they have common angle C and
∠CMK = 180◦ − ∠ BMK = ∠KAB (the latter equality is due to the observation that
∠ BMK and ∠KAB are the opposite angles in the insecribed quadrilateral AKMB).
By analogous reasoning the triangles ABC and MBL are similar. Therefore the
triangles MKC and MBL are also similar and we have
AM sin KAM BD sin BDA
CK KM sin AKM sin KAM sin DAB AB AC
= = AM sin MAB
= = = CD sin CDA
= .
LB BM sin MBA
sin MAB sin DAC AC
AB

7
The second equality is due to the sinus theorem for triangles AKM and ABM; the third
is due to the equality ∠ AKM = 180◦ − ∠ MBA in the inscribed quadrilateral AKMB; the
fourth is due to the definition of the point M; and the fifth is due to the sinus theorem
for triangles ACD and ABD.
20. Three circular arcs w1 , w2 , w3 with common endpoints A and B are on the same side of
the line AB; w2 lies between w1 and w3 . Two rays emanating from B intersect these arcs at
M1 , M2 , M3 and K1 , K2 , K3 , respectively. Prove that M1 M2 K1 K2
M2 M3 = K2 K3 .
Solution: From inscribed angles we have ∠ AK1 B = ∠ AM1 B and ∠ AK2 B = ∠ AM2 B.
From this it follows that 4 AK1 K2 ∼ 4 AM1 M2 , so

K1 K2 AK2
= .
M1 M2 AM2
Similarly 4 AK2 K3 ∼ 4 AM2 M3 , so

K2 K3 AK2
= .
M2 M3 AM2
K1 K2 K2 K3
From these equations we get M1 M2 = M2 M3 , from which the desired property follows.
K3
w3
w2 K2
M3
M2
w1
M1 K1

A B

8
Baltic Way 2005
Stockholm, November 5, 2005

Problems and solutions

1. Let a0 be a positive integer. Define the sequence an , n ≥ 0, as follows: If


j
an = ∑ ci 10i
i =0

where ci are integers with 0 ≤ ci ≤ 9, then

an+1 = c2005
0 + c2005
1 + · · · + c2005
j .

Is it possible to choose a0 so that all the terms in the sequence are distinct?
Answer: No, the sequence must contain two equal terms.
Solution: It is clear that there exists a smallest positive integer k such that

10k > (k + 1) · 92005 .

We will show that there exists a positive integer N such that an consists of less than k + 1
decimal digits for all n ≥ N. Let ai be a positive integer which consists of exactly j + 1
digits, that is,

10 j ≤ ai < 10 j+1 .

We need to prove two statements:


• ai+1 has less than k + 1 digits if j < k; and
• ai > ai+1 if j ≥ k.
To prove the first statement, notice that

ai+1 ≤ ( j + 1) · 92005 < (k + 1) · 92005 < 10k

and hence ai+1 consists of less than k + 1 digits. To prove the second statement, notice
that ai consists of j + 1 digits, none of which exceeds 9. Hence ai+1 ≤ ( j + 1) · 92005 and
because j ≥ k, we get ai ≥ 10 j > ( j + 1) · 92005 ≥ ai+1 , which proves the second statement.
It is now easy to derive the result from this statement. Assume that a0 consists of k + 1 or
more digits (otherwise we are done, because then it follows inductively that all terms of
the sequence consist of less than k + 1 digits, by the first statement). Then the sequence
starts with a strictly decreasing segment a0 > a1 > a2 > · · · by the second statement, so
for some index N the number a N has less than k + 1 digits. Then, by the first statement,
each number an with n ≥ N consists of at most k digits. By the Pigeonhole Principle,
there are two different indices n, m ≥ N such that an = am .
2. Let α, β and γ be three angles with 0 ≤ α, β, γ < 90◦ and sin α + sin β + sin γ = 1. Show
that
3
tan2 α + tan2 β + tan2 γ ≥ .
8
Solution: Since tan2 x = 1/ cos2 x − 1, the inequality to be proved is equivalent to
1 1 1 27
+ + ≥ .
cos2 α cos2 β cos2 γ 8

1
The AM-HM inequality implies

3 cos2 α + cos2 β + cos2 γ


1 1 1

+ + 3
cos2 α cos2 β cos2 γ

3 − (sin2 α + sin2 β + sin2 γ)


=
3
 sin α + sin β + sin γ 2
≤ 1−
3
8
=
9
and the result follows.
3. Consider the sequence ak defined by a1 = 1, a2 = 12 ,

1 1
a k +2 = a k + a k +1 + for k ≥ 1.
2 4ak ak+1

Prove that
1 1 1 1
+ + +···+ < 4.
a1 a3 a2 a4 a3 a5 a98 a100

Solution: Note that


1 2 2
< − ,
a k a k +2 a k a k +1 a k +1 a k +2

because this inequality is equivalent to the inequality

1
a k +2 > a k + a k +1 ,
2
which is evident for the given sequence. Now we have

1 1 1 1
+ + +···+
a1 a3 a2 a4 a3 a5 a98 a100
2 2 2 2
< − + − +···
a1 a2 a2 a3 a2 a3 a3 a4
2
< = 4.
a1 a2

4. Find three different polynomials P( x ) with real coefficients such that P( x2 + 1) = P( x )2 + 1


for all real x.
Answer: For example, P( x ) = x, P( x ) = x2 + 1 and P( x ) = x4 + 2x2 + 2.
Solution: Let Q( x ) = x2 + 1. Then the equation that P must satisfy can be written
P( Q( x )) = Q( P( x )), and it is clear that this will be satisfied for P( x ) = x, P( x ) = Q( x )
and P( x ) = Q( Q( x )).
Solution 2: For all reals x we have P( x )2 + 1 = P( x2 + 1) = P(− x )2 + 1 and consequently,
( P( x ) + P(− x ))( P( x ) − P(− x )) = 0. Now one of the three cases holds:

(a) If both P( x ) + P(− x ) and P( x ) − P(− x ) are not identically 0, then they are non-
constant polynomials and have a finite numbers of roots, so this case cannot hold.

2
(b) If P( x ) + P(− x ) is identically 0 then obviously, P(0) = 0. Consider the infinite
sequence of integers a0 = 0 and an+1 = a2n + 1. By induction it is easy to see that
P( an ) = an for all non-negative integers n. Also, Q( x ) = x has that property, so
P( x ) − Q( x ) is a polynomial with infinitely many roots, whence P( x ) = x.
(c) If P( x ) − P(− x ) is identically 0 then

P( x ) = x2n + bn−1 x2n−2 + · · · + b1 x2 + b0 ,

for some integer n since P( x ) is even and it is easy to see that the coefficient of
x2n must be 1. Putting n = 1 and n = 2 yield the solutions P( x ) = x2 + 1 and
P( x ) = x4 + 2x2 + 2.

Remark: For n = 3 there is no solution, whereas for n = 4 there is the unique solution
P( x ) = x8 + 6x6 + 8x4 + 8x2 + 5.
5. Let a, b, c be positive real numbers with abc = 1. Prove that

a b c
+ 2 + 2 ≤ 1.
a2 +2 b +2 c +2
Solution: For any positive real x we have x2 + 1 ≥ 2x. Hence

a b c a b c
+ 2 + 2 ≤ + +
a2 +2 b +2 c +2 2a + 1 2b + 1 2c + 1
1 1 1
= + + =: R.
2 + 1/a 2 + 1/b 2 + 1/c
R ≤ 1 is equivalent to

2 + 1b 2 + 1c + 2 + 1a 2 + 1c + 2 + 1a 2 + 1b ≤ 2 + 1a 2 + 1b 2 + 1c
        

1 1 1 1
and to 4 ≤ ab + ac + bc + abc . By abc = 1 and by the AM-GM inequality
r
1 1 1 3 1 2
+ + ≥3 =3
ab ac bc abc
the last inequality follows. Equality appears exactly when a = b = c = 1.
6. Let K and N be positive integers with 1 ≤ K ≤ N. A deck of N different playing cards is
shuffled by repeating the operation of reversing the order of the K topmost cards and moving these
to the bottom of the deck. Prove that the deck will be back in its initial order after a number of
operations not greater than 4 · N 2 /K2 .
Solution: Let N = q · K + r, 0 ≤ r < K, and let us number the cards 1, 2, . . . , N, starting
from the one at the bottom of the deck. First we find out how the cards 1, 2, . . . K are
moving in the deck.
If i ≤ r then the card i is moving along the cycle

i → K + i → 2K + i → · · · → qK + i → (r + 1 − i ) →
K + (r + 1 − i ) → · · · → qK + (r + 1 − i ),

because N − K < qK + i ≤ N and N − K < qK + (r + 1 − i ) ≤ N. The length of this cycle


is 2q + 2. In the special case of i = r + i − 1, it actually consists of two smaller cycles of
length q + 1.

3
If r < i ≤ K then the card i is moving along the cycle

i → K + i → 2K + i → · · · → (q − 1)K + i →
K + r + 1 − i → K + (K + r + 1 − i) →
2K + (K + r + 1 − i ) → · · · → (q − 1)K + (K + r + 1 − i ),

because N − K < (q − 1)K + i ≤ N and N − K < (q − 1)K + (K + r + 1 − i ) ≤ N. The


length of this cycle is 2q. In the special case of i = K + r + 1 − i, it actually consists of
two smaller cycles of length q.
Since these cycles cover all the numbers 1, . . . , N, we can say that every card returns
to its initial position after either 2q + 2 or 2q operations. Therefore, all the cards are
simultaneously at their initial position after at most lcm(2q + 2, 2q) = 2 lcm(q + 1, q) =
2q(q + 1) operations. Finally,

N 2
2q(q + 1) ≤ (2q)2 = 4q2 ≤ 4

K ,

which concludes the proof.


7. A rectangular array has n rows and six columns, where n > 2. In each cell there is
written either 0 or 1. All rows in the array are different from each other. For each pair of rows
( x1 , x2 , . . . , x6 ) and (y1 , y2 , . . . , y6 ), the row ( x1 y1 , x2 y2 , . . . , x6 y6 ) can also be found in the
array. Prove that there is a column in which at least half of the entries are zeroes.
Solution: Clearly there must be rows with some zeroes. Consider the case when
there is a row with just one zero; we can assume it is (0, 1, 1, 1, 1, 1). Then for each
row (1, x2 , x3 , x4 , x5 , x6 ) there is also a row (0, x2 , x3 , x4 , x5 , x6 ); the conclusion follows.
Consider the case when there is a row with just two zeroes; we can assume it is
(0, 0, 1, 1, 1, 1). Let nij be the number of rows with first two elements i, j. As in the first
case n00 ≥ n11 . Let n01 ≥ n10 ; the other subcase is analogous. Now there are n00 + n01
zeroes in the first column and n10 + n11 ones in the first column; the conclusion follows.
Consider now the case when each row contains at least three zeroes (except (1, 1, 1, 1, 1, 1),
if such a row exists). Let us prove that it is impossible that each such row contains exactly
three zeroes. Assume the opposite. As n > 2 there are at least two rows with zeroes; they
are different, so their product contains at least four zeroes, a contradiction. So there are
more then 3(n − 1) zeroes in the array; so in some column there are more than (n − 1)/2
zeroes; so there are at least n/2 zeroes.
8. Consider a grid of 25 × 25 unit squares. Draw with a red pen contours of squares of any size
on the grid. What is the minimal number of squares we must draw in order to colour all the lines
of the grid?
Answer: 48 squares.
Solution: Consider a diagonal of the square grid. For any grid vertex A on this diagonal
denote by C the farthest endpoint of this diagonal. Let the square with the diagonal AC
be red. Thus, we have defined the set of 48 red squares (24 for each diagonal). It is clear
that if we draw all these squares, all the lines in the grid will turn red.
In order to show that 48 is the minimum, consider all grid segments of length 1
that have exactly one endpoint on the border of the grid. Every horizontal and every
vertical line that cuts the grid into two parts determines two such segments. So we have
4 · 24 = 96 segments. It is evident that every red square can contain at most two of these
segments.

4
9. A rectangle is divided into 200 × 3 unit squares. Prove that the number of ways of splitting
this rectangle into rectangles of size 1 × 2 is divisible by 3.
Solution: Let us denote the number of ways to split some figure into dominos by a
small picture of this figure with a sign #. For example, # = 2.

Let Nn = # (n rows) and γn = # (n − 2 full rows and one row with two cells).
We are going to find a recurrence relation for the numbers Nn .
Observe that

# =# +# +# = 2# +#

# =# +# =# +#

We can generalize our observations by writing the equalities

Nn = 2γn + Nn−2 ,
2γn−2 = Nn−2 − Nn−4 ,
2γn = 2γn−2 + 2Nn−2 .

If we sum up these equalities we obtain the desired recurrence

Nn = 4Nn−2 − Nn−4 .

It is easy to find that N2 = 3, N4 = 11. Now by the recurrence relation it is trivial to


check that N6k+2 ≡ 0 (mod 3).
10. Let m = 30030 = 2 · 3 · 5 · 7 · 11 · 13 and let M be the set of its positive divisors which have
exactly two prime factors. Determine the minimal integer n with the following property: for any
choice of n numbers from M, there exist three numbers a, b, c among them satisfying a · b · c = m.
Answer: n = 11.
Solution: Taking the 10 divisors without the prime 13 shows that n ≥ 11. Consider the
following partition of the 15 divisors into five groups of three each with the property
that the product of the numbers in every group equals m.

{2 · 3, 5 · 13, 7 · 11}, {2 · 5, 3 · 7, 11 · 13}, {2 · 7, 3 · 13, 5 · 11},


{2 · 11, 3 · 5, 7 · 13}, {2 · 13, 3 · 11, 5 · 7}.

If n = 11, there is a group from which we take all three numbers, that is, their product
equals m.
11. Let the points D and E lie on the sides BC and AC, respectively, of the triangle ABC,
satisfying BD = AE. The line joining the circumcentres of the triangles ADC and BEC meets
the lines AC and BC at K and L, respectively. Prove that KC = LC.
Solution: Assume that the circumcircles of triangles ADC and BEC meet at C and P.
The problem is to show that the line KL makes equal angles with the lines AC and BC.
Since the line joining the circumcentres of triangles ADC and BEC is perpendicular to
the line CP, it suffices to show that CP is the angle-bisector of ∠ ACB.

5
C

E L

K D

A B
P
Since the points A, P, D, C are concyclic, we obtain ∠EAP = ∠ BDP. Analogously, we
have ∠ AEP = ∠ DBP. These two equalities together with AE = BD imply that triangles
APE and DPB are congruent. This means that the distance from P to AC is equal to the
distance from P to BC, and thus CP is the angle-bisector of ∠ ACB, as desired.
12. Let ABCD be a convex quadrilateral such that BC = AD. Let M and N be the midpoints
of AB and CD, respectively. The lines AD and BC meet the line MN at P and Q, respectively.
Prove that CQ = DP.
Solution: Let A0 , B0 , C 0 , D 0 be the feet of the perpendiculars from A, B, C, D, respectively,
onto the line MN. Then

AA0 = BB0 and CC 0 = DD 0 .

Denote by X, Y the feet of the perpendiculars from C, D onto the lines BB0 , AA0 ,
respectively. We infer from the above equalities that AY = BX. Since also BC = AD, the
right-angled triangles BXC and AYD are congruent. This shows that

∠C 0 CQ = ∠ B0 BQ = ∠ A0 AP = ∠ D 0 DP.

Therefore, since CC 0 = DD 0 , the triangles CC 0 Q and DD 0 P are congruent. Thus CQ =


DP.
P
Q

D D0
C
N
C0

Y A0
A M B
X
B0

13. What is the smallest number of circles of radius 2 that are needed to cover a rectangle

(a) of size 6 × 3?
(b) of size 5 × 3?

Answer: (a) Six circles, (b) five circles.


Solution: (a) Consider the four corners and the two midpoints of the sides of length 6.
The distance between any two of these six points is 3 or more, so one circle cannot cover
two of these points, and at least six circles are needed.

6
On the other hand one circle will cover a 2 × 2 square, and it is easy to see that six
such squares can cover the rectangle.

(b) Consider the four corners and the centre of the rectangle. The 5/3
minimum distance between any two of these points √ is the distance
2
between the centre and one of the corners,
√ which
√ is 34/2. This is
greater than the diameter of the circle ( 34/4 > 32/4), so one circle 1
cannot cover two of these points, and at least five circles are needed. 5/2
Partition the rectangle into three rectangles of size 5/3 × 2 and two rectangles of size
5/2 × √1 as shown on the right. It is easy to check that each has a diagonal of length less
than 2 2, so five circles can cover the five small rectangles and hence the 5 × 3 rectangle.
14. Let the medians of the triangle ABC meet at M. Let D and E be different points on the
line BC such that DC = CE = AB, and let P and Q be points on the segments BD and BE,
respectively, such that 2BP = PD and 2BQ = QE. Determine ∠ PMQ.
Answer: ∠ PMQ = 90◦ .
Solution: Draw the parallelogram ABCA0 , with AA0 k BC. Then M lies on BA0 , and
BM = 13 BA0 . So M is on the homothetic image (centre B, dilation 1/3) of the circle with
centre C and radius AB, which meets BC at D and E. The image meets BC at P and Q.
So ∠ PMQ = 90◦ .
A A0

B P Q D C E
15. Let the lines e and f be perpendicular and intersect each other at O. Let A and B lie on e and
C and D lie on f , such that all the five points A, B, C, D and O are distinct. Let the lines b and
d pass through B and D respectively, perpendicularly to AC; let the lines a and c pass through A
and C respectively, perpendicularly to BD. Let a and b intersect at X and c and d intersect at Y.
Prove that XY passes through O.
Solution: Let A1 be the intersection of a with BD, B1 the intersection of b with AC, C1
the intersection of c with BD and D1 the intersection of d with AC. It follows easily by
the given right angles that the following three sets each are concyclic:

• A, A1 , D, D1 , O lie on a circle w1 with diameter AD.


• B, B1 , C, C1 , O lie on a circle w2 with diameter BC.
• C, C1 , D, D1 lie on a circle w3 with diameter DC.

We see that O lies on the radical axis of w1 and w2 . Also, Y lies on the radical axis of w1
and w3 , and on the radical axis of w2 and w3 , so Y is the radical centre of w1 , w2 and
w3 , so it lies on the radical axis of w1 and w2 . Analogously we prove that X lies on the
radical axis of w1 and w2 .

7
C
X
b

c w3
B1
w2

D1
A e
B
w1 D C1

A1 f d Y

16. Let p be a prime number and let n be a positive integer. Let q be a positive divisor of
(n + 1) p − n p . Show that q − 1 is divisible by p.
Solution: It is sufficient to show the statement for q prime. We need to prove that

( n + 1) p ≡ n p (mod q) =⇒ q ≡ 1 (mod p).

It is obvious that gcd(n, q) = gcd(n + 1, q) = 1 (as n and n + 1 cannot be divisible by q


simultaneously). Hence there exists a positive integer m such that mn ≡ 1 (mod q). In
fact, m is just the multiplicative inverse of n (mod q). Take s = m(n + 1). It is easy to
see that
s p ≡ 1 (mod q).

Let t be the smallest positive integer which satisfies st ≡ 1 (mod q) (t is the order of
s (mod q)). One can easily prove that t divides p. Indeed, write p = at + b where
0 ≤ b < t. Then
a
1 ≡ s p ≡ s at+b ≡ st · sb ≡ sb (mod q).

By the definition of t, we must have b = 0. Hence t divides p. This means that t = 1 or


t = p. However, t = 1 is easily seen to give a contradiction since then we would have

m ( n + 1) ≡ 1 (mod q) or n+1 ≡ n (mod q).

Therefore t = p, and p is the order of s (mod q). By Fermat’s little theorem,


sq−1 ≡ 1 (mod q).

Since p is the order of s (mod q), we have that p divides q − 1, and we are done.
17. A sequence ( xn ), n ≥ 0, is defined as follows: x0 = a, x1 = 2 and xn = 2xn−1 xn−2 −
xn−1 − xn−2 + 1 for n > 1. Find all integers a such that 2x3n − 1 is a perfect square for all
n ≥ 1.
(2m−1)2 +1
Answer: a = 2 where m is an arbitrary positive integer.

8
Solution: Let yn = 2xn − 1. Then

yn = 2(2xn−1 xn−2 − xn−1 − xn−2 + 1) − 1


= 4xn−1 xn−2 − 2xn−1 − 2xn−2 + 1
= (2xn−1 − 1)(2xn−2 − 1) = yn−1 yn−2

when n > 1. Notice that yn+3 = yn+2 yn+1 = y2n+1 yn . We see that yn+3 is a perfect square
if and only if yn is a perfect square. Hence y3n is a perfect square for all n ≥ 1 exactly
(2m−1)2 +1
when y0 is a perfect square. Since y0 = 2a − 1, the result is obtained when a = 2
for all positive integers m.
18. Let x and y be positive integers and assume that z = 4xy/( x + y) is an odd integer. Prove
that at least one divisor of z can be expressed in the form 4n − 1 where n is a positive integer.
Solution: Let x = 2s x1 and y = 2t y1 where x1 and y1 are odd integers. Without loss of
generality we can assume that s ≥ t. We have

2s + t +2 x 1 y 1 2s +2 x 1 y 1
z= = .
2t (2s − t x 1 + y 1 ) 2s − t x 1 + y 1
If s 6= t, then the denominator is odd and therefore z is even. So we have s = t
and z = 2s+2 x1 y1 /( x1 + y1 ). Let x1 = dx2 , y1 = dy2 with gcd( x2 , y2 ) = 1. So z =
2s+2 dx2 y2 /( x2 + y2 ). As z is odd, it must be that x2 + y2 is divisible by 2s+2 ≥ 4, so
x2 + y2 is divisible by 4. As x2 and y2 are odd integers, one of them, say x2 is congruent
to 3 modulo 4. But gcd( x2 , x2 + y2 ) = 1, so x2 is a divisor of z.
19. Is it possible to find 2005 different positive square numbers such that their sum is also a
square number?
Answer: Yes, it is possible.
Solution: Start with a simple Pythagorian identity such as 32 + 42 = 52 . Multiply it by 52

32 · 52 + 42 · 52 = 52 · 52

and insert the identity for the first

32 · (32 + 42 ) + 42 · 52 = 52 · 52
which gives
32 · 32 + 32 · 42 + 42 · 52 = 52 · 52 .

Multiply again by 52

32 · 32 · 52 + 32 · 42 · 52 + 42 · 52 · 52 = 52 · 52 · 52

and split the first term

32 · 32 · (32 + 42 ) + 32 · 42 · 52 + 42 · 52 · 52 = 52 · 52 · 52

that is

32 · 32 · 32 + 32 · 32 · 42 + 32 · 42 · 52 + 42 · 52 · 52 = 52 · 52 · 52 .

This (multiplying by 52 and splitting the first term) can be repeated as often as needed,
each time increasing the number of terms by one.
Clearly, each term is a square number and the terms are strictly increasing from left
to right.

9
20. Find all positive integers n = p1 p2 · · · pk which divide ( p1 + 1)( p2 + 1) · · · ( pk + 1), where
p1 p2 · · · pk is the factorization of n into prime factors (not necessarily distinct).
Answer: All numbers 2r 3s where r and s are non-negative integers and s ≤ r ≤ 2s.
Solution: Let m = ( p1 + 1)( p2 + 1) · · · ( pk + 1). We may assume that pk is the largest
prime factor. If pk > 3 then pk cannot divide m, because if pk divides m it is a prime factor
of pi + 1 for some i, but if pi = 2 then pi + 1 < pk , and otherwise pi + 1 is an even number
with factors 2 and 12 ( pi + 1) which are both strictly smaller than pk . Thus the only primes
that can divide n are 2 and 3, so we can write n = 2r 3s . Then m = 3r 4s = 22s 3r which is
divisible by n if and only if s ≤ r ≤ 2s.

10
Baltic Way 2006
Turku, November 3, 2006

Problems and solutions

1. For a sequence a1 , a2 , a3 , . . . of real numbers it is known that

a n = a n −1 + a n +2 for n = 2, 3, 4, . . . .

What is the largest number of its consecutive elements that can all be positive?
Answer: 5.
Solution: The initial segment of the sequence could be 1; 2; 3; 1; 1; −2; 0. Clearly it is
enough to consider only initial segments. For each sequence the first 6 elements are a1 ; a2 ;
a3 ; a2 − a1 ; a3 − a2 ; a2 − a1 − a3 . As we see, a1 + a5 + a6 = a1 + ( a3 − a2 ) + ( a2 − a1 − a3 ) =
0. So all the elements a1 , a5 , a6 can not be positive simultaneously.
2. Suppose that the real numbers ai ∈ [−2, 17], i = 1, 2, . . . , 59, satisfy a1 + a2 + · · · + a59 = 0.
Prove that

a21 + a22 + · · · + a259 ≤ 2006.

Solution: For convenience denote m = −2 and M = 17. Then


 m + M 2  M − m 2
ai − ≤ ,
2 2
because m ≤ ai ≤ M. So we have
59  m + M 2  m + M 2
∑ ai −
2
= ∑ a2i + 59 · 2
− ( m + M ) ∑ ai
i =1 i i
 M − m 2
≤ 59 · ,
2
and thus
M − m 2  m + M 2
 
∑ a2i ≤ 59 ·
2

2
= −59 · m · M = 2006.
i

3. Prove that for every polynomial P( x ) with real coefficients there exist a positive integer m and
polynomials P1 ( x ), P2 ( x ), . . . , Pm ( x ) with real coefficients such that
3 3 3
P( x ) = P1 ( x ) + P2 ( x ) + · · · + Pm ( x ) .

Solution: We will prove by induction on the degree of P( x ) that all polynomials can be
represented as a sum of cubes. This is clear for constant polynomials. Now we proceed
to the inductive step. It is sufficient to show that if P( x ) is a polynomial of degree n,
then there exist polynomials Q1 ( x ), Q2 ( x ), . . ., Qr ( x ) such that the polynomial

P( x ) − ( Q1 ( x ))3 − ( Q2 ( x ))3 − · · · − ( Qr ( x ))3

has degree at most n − 1. Assume that the coefficient√of x n in P( x ) is equal to c. We


consider three cases: If n = 3k, we put r = 1, Q1 ( x ) = 3 cx k ; if n = 3k + 1 we put r = 3,
r r r
3 c k 3 c k c
Q1 ( x ) = x ( x − 1), Q2 ( x ) = x ( x + 1), Q 3 ( x ) = − 3 x k +1 ;
6 6 3

1
and if n = 3k + 2 we put r = 2 and
r r
3 c k c k +1
Q1 ( x ) = x ( x + 1), Q2 ( x ) = − 3 x .
3 3

This completes the induction.


4. Let a, b, c, d, e, f be non-negative real numbers satisfying a + b + c + d + e + f = 6. Find
the maximal possible value of

abc + bcd + cde + de f + e f a + f ab

and determine all 6-tuples ( a, b, c, d, e, f ) for which this maximal value is achieved.
Answer: 8.
Solution: If we set a = b = c = 2, d = e = f = 0, then the given expression is equal to 8.
We will show that this is the maximal value. Applying the inequality between arithmetic
and geometric mean we obtain
 ( a + d ) + ( b + e ) + ( c + f ) 3
8= ≥ ( a + d)(b + e)(c + f )
3
= ( abc + bcd + cde + de f + e f a + f ab) + ( ace + bd f ),

so we see that abc + bcd + cde + de f + e f a + f ab ≤ 8 and the maximal value 8 is achieved
when a + d = b + e = c + f (and then the common value is 2 because a + b + c + d +
e + f = 6) and ace = bd f = 0, which can be written as ( a, b, c, d, e, f ) = ( a, b, c, 2 − a, 2 −
b, 2 − c) with ac(2 − b) = b(2 − a)(2 − c) = 0. From this it follows that ( a, b, c) must
have one of the forms (0, 0, t), (0, t, 2), (t, 2, 2), (2, 2, t), (2, t, 0) or (t, 0, 0). Therefore the
maximum is achieved for the 6-tuples ( a, b, c, d, e, f ) = (0, 0, t, 2, 2, 2 − t), where 0 ≤ t ≤ 2,
and its cyclic permutations.
5. An occasionally unreliable professor has devoted his last book to a certain binary operation ∗.
When this operation is applied to any two integers, the result is again an integer. The operation is
known to satisfy the following axioms:

(a) x ∗ ( x ∗ y) = y for all x, y ∈ Z;


(b) ( x ∗ y) ∗ y = x for all x, y ∈ Z.

The professor claims in his book that

(C1) the operation ∗ is commutative: x ∗ y = y ∗ x for all x, y ∈ Z.


(C2) the operation ∗ is associative: ( x ∗ y) ∗ z = x ∗ (y ∗ z) for all x, y, z ∈ Z.

Which of these claims follow from the stated axioms?


Answer: (C1) is true; (C2) is false.
Solution: Write ( x, y, z) for x ∗ y = z. So the axioms can be formulated as

( x, y, z) =⇒ ( x, z, y) (1)
( x, y, z) =⇒ (z, y, x ). (2)

(2) (1) (2)


(C1) is proved by the sequence ( x, y, z) =⇒ (z, y, x ) =⇒ (z, x, y) =⇒ (y, x, z).
A counterexample for (C2) is the operation x ∗ y = −( x + y).

2
6. Determine the maximal size of a set of positive integers with the following properties:
(1) The integers consist of digits from the set {1, 2, 3, 4, 5, 6}.
(2) No digit occurs more than once in the same integer.
(3) The digits in each integer are in increasing order.
(4) Any two integers have at least one digit in common (possibly at different positions).
(5) There is no digit which appears in all the integers.
Answer: 32.
Solution: Associate with any ai the set Mi of its digits. By (??), (??) and (??) the numbers
are uniquely determined by their associated subsets of {1, 2, . . . , 6}. By (??) the sets are
intersecting. Partition the 64 subsets of {1, 2, . . . , 6} into 32 pairs of complementary sets
( X, {1, 2, . . . , 6} − X ). Obviously, at most one of the two sets in such a pair can be a Mi ,
since the two sets are non-intersecting. Hence, n ≤ 32. Consider the 22 subsets with at
least four elements and the 10 subsets with three elements containing 1. Hence, n = 32.
7. A photographer took some pictures at a party with 10 people. Each of the 45 possible pairs of
people appears together on exactly one photo, and each photo depicts two or three people. What is
the smallest possible number of photos taken?
Answer: 19.
Solution: Let x be the number of triplet photos (depicting three people, that is, three
pairs) and let y be the number of pair photos (depicting two people, that is, one pair).
Then 3x + y = 45.
Each person appears with nine other people, and since 9 is odd, each person appears
on at least one pair photo. Thus y ≥ 5, so that x ≤ 13. The total number of photos is
x + y = 45 − 2x ≥ 45 − 2 · 13 = 19.
On the other hand, 19 photos will suffice. We number the persons 0, 1, . . . , 9, and will
proceed to specify 13 triplet photos. We start with making triplets without common pairs
of the persons 1–8:
123, 345, 567, 781
Think of the persons 1–8 as arranged in order around a circle. Then the persons in each
triplet above are separated by at most one person. Next we make triplets containing 0,
avoiding previously mentioned pairs by combining 0 with two people among the persons
1–8 separated by two persons:
014, 085, 027, 036
Then we make triplets containing 9, again avoiding previously mentioned pairs by
combining 9 with the other four possibilities of two people among 1–8 being separated
by two persons:
916, 925, 938, 947
Finally, we make our last triplet, again by combining people from 1–8: 246. Here 2 and
4, and 4 and 6, are separated by one person, but those pairs were not accounted for in
the first list, whereas 2 and 6 are separated by three persons, and have not been paired
before. We now have 13 photos of 39 pairs. The remaining 6 pairs appear on 6 pair
photos.
Remark: This problem is equivalent to asking how many complete 3-graphs can be
packed (without common edges) into a complete 10-graph.

3
8. The director has found out that six conspiracies have been set up in his department, each of
them involving exactly three persons. Prove that the director can split the department in two
laboratories so that none of the conspirative groups is entirely in the same laboratory.
Solution: Let the department consist of n persons. Clearly n > 4 (because (43) < 6). If
n = 5, take three persons who do not make a conspiracy and put them in one laboratory,
the other two in another. If n = 6, note that (63) = 20, so we can find a three-person set
such that neither it nor its complement is a conspiracy; this set will form one laboratory.
If n ≥ 7, use induction. We have (n2 ) ≥ (72) = 21 > 6 · 3, so there are two persons A and B
who are not together in any conspiracy. Replace A and B by a new person AB and use
the inductive hypothesis; then replace AB by initial persons A and B.
9. To every vertex of a regular pentagon a real number is assigned. We may perform the following
operation repeatedly: we choose two adjacent vertices of the pentagon and replace each of the two
numbers assigned to these vertices by their arithmetic mean. Is it always possible to obtain the
position in which all five numbers are zeroes, given that in the initial position the sum of all five
numbers is equal to zero?
Answer: No.
Solution: We will show that starting from the numbers − 51 , − 15 , − 15 , − 15 , 45 we cannot
get five zeroes. By adding 15 to all vertices we see that our task is equivalent to showing
that beginning from numbers 0, 0, 0, 0, 1 and performing the same operations we can
never get five numbers 15 . This we prove by noticing that in the initial position all the
numbers are “binary rational” – that is, of the form 2km , where k is an integer and m is
a non-negative integer – and an arithmetic mean of two binary rationals is also such a
number, while the number 51 is not of such form.
10. 162 pluses and 144 minuses are placed in a 30 × 30 table in such a way that each row and
each column contains at most 17 signs. (No cell contains more than one sign.) For every plus we
count the number of minuses in its row and for every minus we count the number of pluses in its
column. Find the maximum of the sum of these numbers.
Answer: 1296 = 72 · 18.
Solution: In the statement of the problem there are two kinds of numbers: “horizontal”
(that has been counted for pluses) and “vertical” (for minuses). We will show that the
sum of numbers of each type reaches its maximum on the same configuration.
We restrict our attention to the horizontal numbers only. Consider an arbitrary row.
Let it contains p pluses and m minuses, m + p ≤ 17. Then the sum that has been counted
for pluses in this row is equal to mp. Let us redistribute this sum between all signs in the
row. More precisely, let us write the number mp/(m + p) in every nonempty cell in the
row. Now the whole “horizontal” sum equals to the sum of all 306 written numbers.
Now let us find the maximal possible contribution of each sign in this sum. That is, we
ask about maximum of the expression f (m, p) = mp/(m + p) where m + p ≤ 17. Remark
that f (m, p) is an increasing function of m. Therefore if m + p < 17 then increasing of m
will also increase the value of f (m, p). Now if m + p = 17 then f (m, p) = m(17 − m)/17
and, obviously, it has maximum 72/17 when m = 8 or m = 9.
So all the 306 summands in the horizontal sum will be maximal if we find a config-
uration in which every non-empty row contains 9 pluses and 8 minuses. The similar
statement holds for the vertical sum. In order to obtain the desired configuration take
a square 18 × 18 and draw pluses on 9 generalized diagonals and minuses on 8 other
generalized diagonals (the 18th generalized diagonal remains empty).
11. The altitudes of a triangle are 12, 15 and 20. What is the area of the triangle?
Answer: 150.

4
Solution: Denote the sides of the triangle by a, b and c and its altitudes by h a , hb and
hc . Then we know that h a = 12, hb = 15 and hc = 20. By the well known relation
a : b = hb : h a it follows b = hhba a = 12 4 ha
15 a = 5 a. Analogously, c = hc a = 20
12
a = 53 a. Thus
half of the triangle’s circumference is s = 21 ( a + b + c) = 12 a + 45 a + 35 a = 65 a. For the


area ∆ of the triangle we have ∆ = 12 ah a = 21 a 12 = 6a, and also by the well known Heron
q q
62 4
formula ∆ = s(s − a)(s − b)(s − c) = 6 1 2 3 6 2
p
5 a · 5 a · 5 a · 5 a = 54
a = 25 a . Hence,
6a = 25 a , and we get a = 25 (b = 20, c = 15) and consequently ∆ = 150.
6 2

12. Let ABC be a triangle, let B1 be the midpoint of the side AB and C1 the midpoint of the
side AC. Let P be the point of intersection, other than A, of the circumscribed circles around the
triangles ABC1 and AB1 C. Let P1 be the point of intersection, other than A, of the line AP with
the circumscribed circle around the triangle AB1 C1 . Prove that 2AP = 3AP1 .
Solution: Since ∠ PBB1 = ∠ PBA = 180◦ − ∠ PC1 A = ∠ PC1 C and ∠ PCC1 = ∠ PCA =
180◦ − ∠ PB1 A = ∠ PB1 B it follows that 4 PBB1 is similar to 4 PC1 C. Let B2 and C2
be the midpoints of BB1 and CC1 respectively. It follows that ∠ BPB2 = ∠C1 PC2 and
hence ∠ B2 PC2 = ∠ BPC1 = 180◦ − ∠ BAC, which implies that AB2 PC2 lie on a circle. By
similarity it is now clear that AP/AP1 = AB2 /AB1 = AC2 /AC1 = 3/2.
C
P
C2
C1
P1

A B1 B2 B

13. In a triangle ABC, points D, E lie on sides AB, AC respectively. The lines BE and CD
intersect at F. Prove that if

BC2 = BD · BA + CE · CA,

then the points A, D, F, E lie on a circle.


Solution: Let G be a point on the segment BC determined by the condition BG · BC =
BD · BA. (Such a point exists because BD · BA < BC2 .) Then the points A, D, G, C lie on
a circle. Moreover, we have

CE · CA = BC2 − BD · BA = BC · ( BG + CG ) − BC · BG = CB · CG,

hence the points A, B, G, E lie on a circle as well. Therefore

∠ DAG = ∠ DCG, ∠EAG = ∠EBG,

which implies that

∠ DAE + ∠ DFE = ∠ DAG + ∠EAG + ∠ BFC


= ∠ DCG + ∠EBG + ∠ BFC.

But the sum on the right side is the sum of angles in 4 BFC. Thus ∠ DAE + ∠ DFE = 180◦ ,
and the desired result follows.

5
14. There are 2006 points marked on the surface of a sphere. Prove that the surface can be cut into
2006 congruent pieces so that each piece contains exactly one of these points inside it.
Solution: Choose a North Pole and a South Pole so that no two points are on the same
parallel and no point coincides with either pole. Draw parallels through each point.
Divide each of these parallels into 2006 equal arcs so that no point is the endpoint of
any arc. In the sequel, “to connect two points” means to draw the smallest arc of the
great circle passing through these points. Denote the points of division by Ai,j , where
i is the number of the parallel counting from North to South (i = 1, 2, . . . , 2006), and
Ai,1 , Ai,2 , . . . , Ai,2006 are the points of division on the i’th parallel, where the numbering
is chosen such that the marked point on the i’th parallel lies between Ai,i and Ai,i+1 .
Consider the lines connecting gradually

N − A1,1 − A2,1 − A3,1 − · · · − A2006,1 − S


N − A1,2 − A2,2 − A3,2 − · · · − A2006,2 − S
..
.
N − A1,2006 − A2,2006 − A3,2006 − · · · − A2006,2006 − S

These lines divide the surface of the sphere into 2006 parts which are congruent by
rotation; each part contains one of the given points.

15. Let the medians of the triangle ABC intersect at the point M. A line t through M intersects
the circumcircle of ABC at X and Y so that A and C lie on the same side of t. Prove that
BX · BY = AX · AY + CX · CY.
Solution: Let us start with a lemma: If the diagonals of an inscribed quadrilateral ABCD
AB· BC BO
intersect at O, then AD · DC = OD . Indeed,

1
AB · BC 2 AB · BC · sin B area( ABC ) h BO
= 1
= = 1 = .
AD · DC 2 AD · DC · sin D
area( ADC ) h2 OD

B B

h1
O S Y
A C M
h2 R
X
D A C
AX · AY AR CX ·CY CS
Now we have (from the lemma) =
BX · BYand RB = BX · BY SB ,
so we have to prove
AR
RB + CSSB = 1.
Suppose at first that the line RS is not parallel to AC. Let RS intersect AC at K
and the line parallel to AC through B at L. So AR AK CS CK
RB = BL and SB = BL ; we must prove
BM
that AK + CK = BL. But AK + CK = 2KB1 , and BL = MB 1
· KB1 = 2KB1 , completing the
proof.

6
B
L

S
M
R
K
A B1 C
If RS k AC, the conclusion is trivial.
16. Are there four distinct positive integers such that adding the product of any two of them to
2006 yields a perfect square?
Answer: No, there are no such integers.
Solution: Suppose there are such integers. Let us consider the situation modulo 4. Then
each square is 0 or 1. But 2006 ≡ 2 (mod 4). So the product of each two supposed
numbers must be 2 (mod 4) or 3 (mod 4). From this it follows that there are at least
three odd numbers (because the product of two even numbers is 0 (mod 4)). Two of
these odd numbers are congruent modulo 4, so their product is 1 (mod 4), which is a
contradiction.
17. Determine all positive integers n such that 3n + 1 is divisible by n2 .
Answer: Only n = 1 satisfies the given condition.
Solution: First observe that if n2 | 3n + 1, then n must be odd, because if n is even, then
3n is a square of an odd integer, hence 3n + 1 ≡ 1 + 1 = 2 (mod 4), so 3n + 1 cannot be
divisible by n2 which is a multiple of 4.
Assume that for some n > 1 we have n2 | 3n + 1. Let p be the smallest prime divisor
of n. We have shown that p > 2. It is also clear that p 6= 3, since 3n + 1 is never divisible
by 3. Therefore p ≥ 5. We have p | 3n + 1, so also p | 32n − 1. Let k be the smallest
positive integer such that p | 3k − 1. Then we have k | 2n, but also k | p − 1 by Fermat’s
theorem. The numbers 31 − 1, 32 − 1 do not have prime divisors other than 2, so p ≥ 5
implies k ≥ 3. This means that gcd(2n, p − 1) ≥ k ≥ 3, and therefore gcd(n, p − 1) > 1,
which contradicts the fact that p is the smallest prime divisor of n. This completes the
proof.
n
18. For a positive integer n let an denote the last digit of n(n ) . Prove that the sequence ( an ) is
periodic and determine the length of the minimal period.
Solution: Let bn and cn denote the last digit of n and nn , respectively. Obviously, if
bn = 0, 1, 5, 6, then cn = 0, 1, 5, 6 and an = 0, 1, 5, 6, respectively.
If bn = 9, then nn ≡ 1 (mod 2) and consequently an = 9. If bn = 4, then nn ≡ 0
(mod 2) and consequently an = 6.
If bn = 2, 3, 7, or 8, then the last digits of nm run through the periods: 2 − 4 − 8 − 6,
3 − 9 − 7 − 1, 7 − 9 − 3 − 1 or 8 − 4 − 2 − 6, respectively. If bn = 2 or bn = 8, then nn ≡ 0
(mod 4) and an = 6.
In the remaining cases bn = 3 or bn = 7, if n ≡ ±1 (mod 4), then so is nn .
If bn = 3, then n ≡ 3 (mod 20) or n ≡ 13 (mod 20) and nn ≡ 7 (mod 20) or nn ≡ 13
(mod 20), so an = 7 or an = 3, respectively.
If bn = 7, then n ≡ 7 (mod 20) or n ≡ 17 (mod 20) and nn ≡ 3 (mod 20) or nn ≡ 17
(mod 20), so an = 3 or an = 7, respectively.
Finally, we conclude that the sequence ( an ) has the following period of length 20:
1−6−7−6−5−6−3−6−9−0−1−6−3−6−5−6−7−6−9−0

7
19. Does there exist a sequence a1 , a2 , a3 , . . . of positive integers such that the sum of every n
consecutive elements is divisible by n2 for every positive integer n?
Answer: Yes. One such sequence begins 1, 3, 5, 55, 561, 851, 63253, 110055,. . ..
Solution: We will show that whenever we have positive integers a1 , . . . , ak such that
n2 | ai+1 + · · · + ai+n for every n ≤ k and i ≤ k − n, then it is possible to choose ak+1 such
that n2 | ai+1 + · · · + ai+n for every n ≤ k + 1 and i ≤ k + 1 − n. This directly implies the
positive answer to the problem because we can start constructing the sequence from any
single positive integer.
To obtain the necessary property, it is sufficient for ak+1 to satisfy

ak+1 ≡ −( ak−n+2 + · · · + ak ) (mod n2 )

for every n ≤ k + 1. This is a system of k + 1 congruences.


Note first that, for any prime p and positive integer l such that pl ≤ k + 1, if the
congruence with module p2l is satisfied then also the congruence with module p2(l −1)
is satisfied. To see this, group the last pl elements of a1 , . . . , ak+1 into p groups of
pl −1 consecutive elements. By choice of a1 , . . . , ak , the sums computed for the first
p − 1 groups are all divisible by p2(l −1) . By assumption, the sum of the elements in
all p groups is divisible by p2l . Hence the sum of the remaining pl −1 elements, that is
ak− pl −1 +2 + · · · + ak+1 , is divisible by p2(l −1) .
Secondly, note that, for any relatively prime positive integers c, d such that cd ≤ k + 1,
if the congruences both with module c2 and module d2 hold then also the congruence
with module (cd)2 holds. To see this, group the last cd elements of a1 , . . . , ak+1 into d
groups of c consecutive elements, as well as into c groups of d consecutive elements.
Using the choice of a1 , . . . , ak and the assumption together, we get that the sum of the
last cd elements of a1 , . . . , ak+1 is divisible by both c2 and d2 . Hence this sum is divisible
by (cd)2 .
The two observations let us reject all congruences except for the ones with module
being the square of a prime power pl such that pl +1 > k + 1. The resulting system
has pairwise relatively prime modules and hence possesses a solution by the Chinese
Remainder Theorem.
20. A 12-digit positive integer consisting only of digits 1, 5 and 9 is divisible by 37. Prove that
the sum of its digits is not equal to 76.
Solution: Let N be the initial number. Assume that its digit sum is equal to 76.
The key observation is that 3 · 37 = 111, and therefore 27 · 37 = 999. Thus we have
a divisibility test similar to the one for divisibility by 9: for x = an 103n + an−1 103(n−1) +
· · · + a1 103 + a0 , we have x ≡ an + an−1 + · · · + a0 (mod 37). In other words, if we take
the digits of x in groups of three and sum these groups, we obtain a number congruent
to x modulo 37.
The observation also implies that A = 111 111 111 111 is divisible by 37. Therefore
the number N − A is divisible by 37, and since it consists of the digits 0, 4 and 8, it is
divisible by 4. The sum of the digits of N − A equals 76 − 12 = 64. Therefore the number
1
4 ( N − A ) contains only the digits 0, 1, 2; it is divisible by 37; and its digits sum up to 16.
Applying our divisibility test to this number, we sum four three-digit groups consisting
of the digits 0, 1, 2 only. No digits will be carried, and each digit of the sum S is at
most 8. Also S is divisible by 37, and its digits sum up to 16. Since S ≡ 16 ≡ 1 (mod 3)
and 37 ≡ 1 (mod 3), we have S/37 ≡ 1 (mod 3). Therefore S = 37(3k + 1), that is, S
is one of 037, 148, 259, 370, 481, 592, 703, 814, 925; but each of these either contains the
digit 9 or does not have a digit sum of 16.

8
Baltic Way 2007
Version: English
Copenhagen, November 3, 2007

Time allowed: 4 1/2 hours.


During the first 30 minutes, questions may be asked.
Tools for writing and drawing are the only ones allowed.

1. For a positive integer n consider any partition of the set {1, 2, . . . , 2n} into n two-element subsets
P1 , P2 , . . . , Pn . In each subset Pi , let pi be the product of the two numbers in Pi . Prove that
1 1 1
+ + ··· + < 1.
p1 p2 pn

2. A sequence of integers a1 , a2 , a3 , . . . is called exact if a2n − a2m = an−m an+m for any n > m.
Prove that there exists an exact sequence with a1 = 1, a2 = 0, and determine a2007 .
3. Suppose that F , G, H are polynomials of degree at most 2n + 1 with real coefficients such that:
(1) For all real x we have

F (x) ≤ G(x) ≤ H(x).

(2) There exist distinct real numbers x1 , x2 , . . ., xn such that

F (xi ) = H(xi ) for i = 1, 2, . . . , n.

(3) There exists a real number x0 different from x1 , x2 , . . ., xn such that

F (x0 ) + H(x0 ) = 2G(x0 ).

Prove that F (x) + H(x) = 2G(x) for all real numbers x.


4. Let a1 , a2 , . . . , an be positive real numbers, and let S = a1 + a2 + · · · + an . Prove that
√ √ √ 2
(2S + n)(2S + a1 a2 + a2 a3 + · · · + an a1 ) ≥ 9 a1 a2 + a2 a3 + · · · + an a1 .

5. A function f is defined on the set of all real numbers except 0 and takes all real values except 1. It is also
known that

f (xy) = f (x)f (−y) − f (x) + f (y)

for any x, y 6= 0, and that


1
f (f (x)) =
f ( x1 )

for any x 6∈ {0, 1}. Determine all such functions f .


6. Freddy writes down numbers 1, 2, . . . , n in some order. Then he makes a list of all pairs (i, j) such that
1 ≤ i < j ≤ n and the ith number is bigger than the jth number in his permutation. After that, Freddy
repeats the following action while possible: choose a pair (i, j) from the current list, interchange the ith
and the jth number in the current permutation, and delete (i, j) from the list. Prove that Freddy can
choose pairs in such an order that, after the process finishes, the numbers in the permutation are ordered
ascendingly.
7. A squiggle is composed of six regular triangles with side length 1 as shown in the figure below. Determine
all possible integers n such that a regular triangle with side length n can be fully covered with squiggles
(rotations and reflections of squiggles are allowed, overlappings are not).

— 1 —
8. Call a set A of integers non-isolated, if for every a ∈ A at least one of the numbers a − 1 and a + 1 also
belongs to A. Prove that the number of five-element non-isolated subsets of {1, 2, . . . , n} is (n − 4)2 .
9. A society has to elect a board of governors. Each member of the society has chosen 10 candidates for the
board, but he will be happy if at least one of them will be on the board. For each six members of the society
there exists a board consisting of two persons making all of these six members happy. Prove that a board
consisting of 10 persons can be elected making every member of the society happy.
10. We are given an 18 × 18 table, all of whose cells may be black or white. Initially all the cells are coloured
white. We may perform the following operation: choose one column or one row and change the colour of all
cells in this column or row. Is it possible by repeating the operation to obtain a table with exactly 16 black
cells?
11. In triangle ABC let AD, BE and CF be the altitudes. Let the points P , Q, R and S fulfil the following
requirements:
(1) P is the circumcentre of triangle ABC.
(2) All the segments P Q, QR and RS are equal to the circumradius of triangle ABC.
(3) The oriented segment P Q has the same direction as the oriented segment AD. Similarly, QR has the
same direction as BE, and RS has the same direction as CF .
Prove that S is the incentre of triangle ABC.
˜ of the circumcircle of the triangle ABC which does not contain C. Suppose
12. Let M be a point on the arc AB
that the projections of M onto the lines AB and BC lie on the sides themselves, not on their extensions.
Denote these projections by X and Y , respectively. Let K and N be the midpoints of AC and XY ,
respectively. Prove that ∠M N K = 90◦ .
13. Let t1 , t2 , . . . , tk be different straight lines in space, where k > 1. Prove that points Pi on ti , i = 1, . . . , k,
exist such that Pi+1 is the projection of Pi on ti+1 for i = 1, . . . , k − 1, and P1 is the projection of Pk on t1 .
14. In a convex quadrilateral ABCD we have ∠ADC = 90◦ . Let E and F be the projections of B onto the lines
AD and AC, respectively. Assume that F lies between A and C, that A lies between D and E, and that
the line EF passes through the midpoint of the segment BD. Prove that the quadrilateral ABCD is cyclic.
15. The incircle of the triangle ABC touches the side AC at the point D. Another circle passes through D and
touches the rays BC and BA, the latter at the point A. Determine the ratio AD/DC.
16. Let a and b be rational numbers such that s = a + b = a2 + b2 . Prove that s can be written as a fraction
where the denominator is relatively prime to 6.
y+1
17. Let x, y, z be positive integers such that x+1
y + z +
z+1
x is an integer. Let d be the greatest common

divisor of x, y and z. Prove that d ≤ 3 xy + yz + zx.
18. Let a, b, c, d be non-zero integers, such that the only quadruple of integers (x, y, z, t) satisfying the equation

ax2 + by 2 + cz 2 + dt2 = 0

is x = y = z = t = 0. Does it follow that the numbers a, b, c, d have the same sign?


19. Let r and k be positive integers such that all prime divisors of r are greater than 50.
A positive integer, whose decimal representation (without leading zeroes) has at least k digits, will be called
nice if every sequence of k consecutive digits of this decimal representation forms a number (possibly with
leading zeroes) which is a multiple of r.
Prove that if there exist infinitely many nice numbers, then the number 10k − 1 is nice as well.
20. Let a and b be positive integers, b < a, such that a3 + b3 + ab is divisible by ab(a − b). Prove that ab is a
perfect cube.

— 2 —
Baltic Way 2007
Version: English
Copenhagen, November 3, 2007

Suggested solutions

1. We first prove the lemma that if x1 > · · · > x2n then the grouping

{{x1 , x2 }, . . . , {x2n−1 , x2n }} (1)

gives the largest sum of products of pairs of these numbers.


Let a be the largest and b the second largest among the numbers xi . Consider a grouping of these numbers
into pairs such that a is paired with some c, and b is paired with some d, where c 6= b. Then a 6= d (otherwise
a would be together with b). Furthermore, b > c since otherwise the choice of b implies a = c or b = c which
are both excluded. Now

ab + cd = ac + a(b − c) + bd − (b − c)d
= ac + bd + (a − d)(b − c) > ac + bd,

that is, replacing the pairs {a, c} and {b, d} by the pairs {a, b} and {c, d} makes the sum larger. If the
two largest numbers are paired already, we can do the same to the remaining numbers. So whenever the
grouping is different from (1), the sum of the products of pairs can be made larger.
1 1 1 1
Now it suffices to prove that an = 1 · 2 + ··· + 2n−1 · 2n < 1. We have
1 1 1
an = 1·2 + 3·4 + ··· + (2n−1)·(2n)
2−1 4−3 2n−(2n−1)
= 1·2 ++ · · · + (2n−1)·(2n)
3·4
     
= 11 − 12 + 13 − 14 + · · · + 2n−1
1 1
− 2n
≤ 11 − 12 + 21 − 13 + 13 − 14 + · · · + 2n−11 1
   
+ 2n
1
=1− 2n
< 1.

2. Assume that such an exact sequence exists. Then by induction we must have a22k = a22k−2 + a4k−2 a2 =
a22k−2 = 0.
Next we prove by induction that a2n+1 = (−1)n . We have a3 = a22 − a21 = −1 and

a4k+1 = a22k+1 − a22k = 1,


a4k+3 = a22k+2 − a22k+1 = −1,

when k ≥ 1. This shows that if such a sequence exists, necessarily a2007 = −1.
It remains to show that the sequence defined by an = 0 for n even, an = 1 when n ≡ 1 (mod 4) and an = −1
when n ≡ 3 (mod 4) is exact:
If n and m have the same parity, then n − m and n + m are both even, and then clearly a2n − a2m = 0 =
an−m an+m .
If n is odd and m is even, n − m ≡ n + m (mod 4), so a2n − a2m = 1 = an−m an+m , since both factors are
either −1 or +1.
Finally, if n is even and m is odd, n − m 6≡ n + m (mod 4), so a2n − a2m = −1 = an−m an+m , since exactly
one factor is −1 and one factor is +1.

— 1 —
3. Consider the polynomial P (x) = G(x) − F (x). It has degree at most 2n + 1. By the condition (1) we
have P (x) ≥ 0 for all real x. By the condition (2) the numbers x1 , x2 , . . ., xn are roots of P . Since P is
non-negative, each of these roots must have even multiplicity, and therefore P must be divisible by (x − xi )2
for i = 1, 2, . . . , n. In other words,
P (x) = Q(x)(x − x1 )2 (x − x2 )2 · · · (x − xn )2
for some polynomial Q. Calculating degrees we see that deg Q = deg P − 2n ≤ 1. On the other hand, we
have Q(x) ≥ 0 for all real x. This can be possible only if Q is constant. Hence
G(x) − F (x) = a(x − x1 )2 (x − x2 )2 · · · (x − xn )2
for some real constant a ≥ 0. Similarly we prove that
H(x) − F (x) = b(x − x1 )2 (x − x2 )2 · · · (x − xn )2
for some b ≥ 0. Now we compute that
F (x) + H(x) − 2G(x) = (b − 2a)(x − x1 )2 (x − x2 )2 · · · (x − xn )2 .
By the assumption (3) the above number is equal to 0 for some value of x = x0 different from x1 , x2 , . . .,
xn . Looking at the right-hand side we see that this forces b − 2a = 0, so the expression becomes identically
zero. In other words, we have F (x) + H(x) − 2G(x) = 0 for all real x, which is what we wanted.
4. Rewrite the two factors on the left-hand side:
2S + n = (a1 + a2 + · · · + an ) + (a2 + a3 + · · · a1 ) + 1 + · · · + 1
2S + a1 a2 + a2 a3 + · · · + an a1 = (a2 + a3 + · · · + a1 ) + (a1 + a2 + · · · an ) + a1 a2 + a2 a3 + · · · + an a1
Applying the Cauchy-Schwarz inequality to the 3n-vectors
√ √ √ √ √ √ √ √ √ √
( a1 , . . . , an , a2 , . . . , a1 , 1, . . . , 1) and ( a2 , . . . , a1 , a1 , . . . an , a1 a2 , . . . , an a1 )
we obtain
n
X √ 2
(2S + n)(2S + a1 a2 + a2 a3 + · · · an a1 ) ≥ 3 ai ai+1
i=1

with an+1 = a1 .
5. Set y = 1 in the first equation. This gives f (x) = f (x)f (−1) − f (x) + f (1), that is, f (x)(2 − f (−1)) = f (1).
Since f is not constant, we must have f (−1) = 2 and f (1) = 0. Substituting −x instead of x and y = −1 in
the first equation gives f (x) = f (−x)f (1) − f (−x) + f (−1) = −f (−x) + 2. If we let g(x) = 1 − f (x), this
means that g is an odd function.
Rewriting the first equation in terms of g gives
g(xy) = 1 − f (xy) = 1 − ((1 − g(x))(1 − g(−y)) − (1 − g(x)) + (1 − g(y)))
= −g(x)g(−y) + g(−y) + g(y) = g(x)g(y).
Now the second equation gives (since g(1) = −g(−1) = 1)
1 1 g(x)
1 − g(1 − g(x)) = = = ,
1 − g(1/x) 1 − 1/g(x) g(x) − 1
that is,
1
g(1 − g(x)) = .
1 − g(x)

Since f takes all values except 1, g takes all values except 0. By setting y = 1 − g(x) it follows that
g(y) = 1/y for all y 6= 0, that is, f (x) = 1 − g(x) = 1 − 1/x.
It is easily verified that this function satisfies the conditions of the problem.

— 2 —
6. First note that, whenever the numbers are not ordered ascendingly, there exists a pair (i, j) (not necessarily
in the list) such that 1 ≤ i < j ≤ n and the ith number is exactly 1 greater than the jth number. For
proving it, let i be the least number such that the ith number is not i; then the permutation starts with
1, . . . , i − 1. Thus the ith number is greater than i; let it be k. As k − 1 ≥ i, the number k − 1 does not
occur at positions 1 to i in the permutation. Let j be the position of k − 1. Then (i, j) meets the required
condition.
Suppose Freddy chooses such a pair (i, j) on his first move. Obviously, the interchange of the ith and the
jth element does not affect the greater/smaller relationships between elements at other positions. It also
does not affect the greater/smaller relationship between the number at either the ith or the jth position
and numbers at other positions since the number at any other position is either greater than both numbers
interchanged or smaller than both of them. Consequently, the only greater/smaller relationship that changed
is between the ith and the jth position. Hence, after Freddy has completed the action first time, the list
consists of precisely those pairs (i, j) which would have been there if he started the whole process from the
new permutation.
Using this as the loop invariant, one easily deduces that when the pairs in the list are all gone then the
numbers are ordered increasingly.

7. The regular triangle with side length n can be divided into n2 regular triangles with side length 1 having
sides parallel with the original triangle. It is clear that every squiggle must cover exactly six of these smaller
triangles. Thus we get that 6 | n2 , which implies that 6 | n.
Assume now that n is divisible by 6, but not with 12, i.e. n = 12k + 6 for some non-negative integer k.
Colour the large triangle in a “triangular chessboard” fashion with black triangles on the boundary so that
no adjacent triangles have the same colour. Then each squiggle covers either two or four black triangles.
The total number of black triangles is then

(12k + 7)(12k + 6)
n + (n − 1) + · · · + 1 = = (12k + 7)(6k + 3),
2
which is an odd number and hence a covering is impossible to achieve.
It remains to prove that when 12 | n the required division is possible. It is enough to give an example
for n = 12, since triangles with side length 12m can be composed of these for any integer m. A suitable
construction is shown in the figure below.

8. We may associate with each five-element subset of {1, 2, . . . , n} a sequence a1 , a2 , . . ., an such that exactly
five of the ai s are ones and the rest are zeros. In particular, the non-isolated five-element sets correspond
to sequences, where two of the ones are adjacent and three other ones are adjacent. The number of such
sequences can be computed by considering the number of sequences b1 , b2 , . . ., bn−3 , where one of the bi s is
2, one is 3, and the rest are zeroes. The number of such sequences is (n − 3)(n − 4). But here sequences with
bi = 2, bi+1 = 3 and bi = 3 and bi+1 = 2 correspond to the same subset (having all the elements consecutive).
This means that subsets with all the numbers consecutive have been counted twice. The number of such
subsets equals n − 4. So the total number of non-isolated subsets is (n − 3)(n − 4) − (n − 4) = (n − 4)2 .

— 3 —
9. Let a be any member of the society and A the board consisting of the candidates chosen by a. If everybody
is happy with A, we are too. Otherwise there is a member b such that the board B consisting of all his
candidates has an empty intersection with A. Let’s divide A = A1 ∪ A2 and B = B1 ∪ B2 , each of A1 , A2 ,
B1 , B2 consisting of five persons. We claim that at least one of the boards A1 ∪ B1 , A1 ∪ B2 , A2 ∪ B1 ,
A2 ∪ B2 will make everybody happy. Suppose, on the contrary, that x1 isn’t happy with A1 ∪ B1 , x2 isn’t
happy with A1 ∪ B2 , x3 isn’t happy with A2 ∪ B1 , and x4 isn’t happy with A2 ∪ B2 . Notice that some xi s
may coincide. It’s easy to check that there isn’t a board consisting of two persons making all the members
a, b, x1 , x2 , x3 , x4 happy – a contradiction.

10. No, it is not possible.


To prove this, note first that for any choice of 16 cells in the 18 × 18 table there exists a 2 × 2 square
containing exactly one of these cells. Indeed, there are more rows in the table than the chosen cells, so we
can choose two neighboring rows R1 , R2 such that R1 contains none of the chosen cells and R2 contains
some of them (but not the whole row, since there are 18 cells in this row and only 16 chosen cells). Thus
there are two neighbouring cells A, B in the row R2 , of which exactly one is chosen. Take also two cells
C, D in the row R1 in the same columns as A, B. Then the numbers A, B, C, D form a 2 × 2 square, in
which exactly one of the cells is among the chosen cells.
Thus if the answer to the problem is positive, it is in particular possible to have exactly one black cell in
some 2 × 2 square. However, it is not hard to see that changing colours of all cells in one column or all cells
in one row in the whole table does not change the parity of the number of black cells in this 2 × 2 square (it
either remains the same if there were two cells of opposite colour in the chosen column or row, or changes
by 2 if these two cells had the same colour). Initially every 2 × 2 square contains an even number of black
cells (namely, zero). Hence it is not possible to have exactly one black cell in any such square after a series
of operations.

11. If P is the circumcentre then Q is the intersection different from A of the circumcircle and the bisector of
∠BAC. If triangle A0 B 0 C 0 is obtained from triangle ABC by a 90◦ rotation in the direction ACB then the
oriented segment EB and hence RQ has the same direction as the oriented segment A0 C 0 , and CF and
hence RS has the same direction as A0 B 0 . The bisector of ∠QRS is then parallel to or coincident with the
bisector of ∠C 0 A0 B 0 and hence perpendicular to the bisector of ∠CAB. Since RQ = RS, the line QS is
then parallel to or coincident with the bisector, and since Q lies on the bisector, S then does so as well.
Let T be the point such that P QRT is a parallelogram. Since P T = QR and T R = P Q, the segments P T
and T R are both equal to the circumradius of triangle ABC. Furthermore, P T has the same direction as
QR and hence BE, end T R has the same direction as P Q and hence AD. From an argument analogous to
that above (interchange A and Q with B and T , respectively) it then follows that S lies on the bisector of
∠CBA. Thus S is the incentre of triangle ABC.
Alternative solution: Let O and I denote the circumcentre and incentre, respectively, of triangle ABC.
Let the bisectors of ∠BAC, ∠ABC and ∠ACB intersect the circumcircle again at K, L and M , respectively.
−−→ −−→ −→ −−→ −−→ −→ −−→ −→ −−→ −→
Then OK = P Q, OL = QR and OM = RS, so we must prove OK + OL + OM = OI. Without
−→ −→ −→ −−→
loss of generality assume ∠ABC ≥ ∠ACB. From ∠(OA, OL) = ∠ABC and ∠(OA, OM ) = ∠ACB
−→ −→ −−→ −→ −→ −−→ −−→ −→ −−→
we get ∠(OA, OL + OM ) = (∠ABC − ∠ACB)/2, whence ∠(OA, OL + OM ) + ∠(OK, OL + OM ) =
−→ −−→ −−→ −−→ −→ −−→ −−→
2×(∠ABC−∠ACB)/2+2×∠ACB+∠BAC = π. Thus we have OL+OM k AK, so if OK+OL+OM = OX,
the point X lies on the bisector of ∠BAC. Similarly X lies on the bisector of ∠ABC, so X = I.

12. Triangles AM X and CM Y are similar: ∠M XA = ∠M Y C = 90◦ and ∠M AX = ∠M CY as inscribed


angles. Therefore there exists a spiral homothety H that brings X to A and Y to C: Its centre is M , its
AM CM −−→ 1 −−→ −−→
angle is ∠XM A = ∠Y M C, and its coefficient is M X = M Y . By the definition M N = 2 (M X + M Y )
−−→ −−→ −−→ −−→ −−→ −−→
and M K = 12 (M A + M C). As H is a linear transformation we get H(M N ) = 12 (H(M X) + H(M Y )) =
1 −−→ −−→ −−→
2 (M A + M C) = M K, from which the desired follows.

13. If all the lines are parallel to each other, choose some plane perpendicular to them. Then the points may be
chosen to be the intersections of the lines with this plane.

— 4 —
Otherwise, denote the acute or right angle between ti and ti+1 by αi , i = 1, . . . , k − 1, and the acute or
right angle between tk and t1 by αk . At least one of these angles is not 0, so cos α1 cos α2 · · · cos αk < 1.
Clearly, Pi , i = 2, . . . , k, is determined by a choice of P1 , so let Pk+1 be the projection of Pk on t1 . We must
prove that P1 may be chosen such that P1 and Pk+1 coincide.
If P1 moves along t1 with constant speed v, then Pk+1 moves along t1 with constant speed v · cos α1 ·
cos α2 · · · cos αk < v. Hence at some moment P1 and Pk+1 coincide.

14. The triangle DEB is right-angled (∠DEB = 90◦ ). Hence if the line EF passes through the midpoint of the
hypotenuse BD, we must have ∠F EB = ∠DBE. On the other hand, the lines BE and DC are parallel
and we have ∠DBE = ∠CDB. Thus ∠F EB = ∠CDB. But since ∠AEB = ∠AF B = 90◦ , the points
A, E, F , B lie on a circle and ∠F EB = ∠F AB = ∠CAB. Hence we see that ∠CDB = ∠CAB, and the
assertion follows.
D C

E B

15. Let B1 = D, and similarly let the incircle touch the sides AB and BC at the points C1 and A1 , respectively.
Let the second circle touch the ray BC at the point M . Let x = B1 C, y = AB1 . Obviously, A1 M = C1 A =
AB1 = y and A1 C = B1 C = x. Hence

CM = A1 M − A1 C = y − x.

On the other hand, CM is a tangent and CA is a secant to the second circle. Therefore, by powers with
respect to this circle,

CM 2 = CB1 · CA = x(x + y).

So we have the equation

(y − x)2 = x(x + y).

From this equation, we get y/x = 3.

16. Let a = m n
k and b = k where k is the least positive common denominator of a and b. Then k, m, n are
relatively prime, otherwise we could obtain a smaller positive common denominator by dividing them all by
their greatest common divisor.
m+n m2 +n2
By the conditions of the problem, s = k = k2 , giving

(m + n)k = m2 + n2 . (2)

This representation shows that each prime that divides both k and m divides also n and therefore would be
a common divisor of k, m, n. Analogous consideration can be made about primes dividing both k and n.
Thus there cannot be such primes, i.e., gcd(k, m) = gcd(k, n) = 1.
As the denominator in the representation of s as an irreducible fraction obviously divides k, it suffices to
prove that gcd(k, 6) = 1. For that, we prove that 3 - k and 2 - k.

— 5 —
Suppose that 3 | k. Then 3 - m and 3 - n, giving m2 ≡ n2 ≡ 1 (mod 3). Hence the left-hand side of
equation (2) is divisible by 3 while the right-hand side is not, a contradiction.
Suppose that 2 | k. Then 2 - m and 2 - n, giving both 2 | m + n and m2 ≡ n2 ≡ 1 (mod 4). Hence the
left-hand side of equation (2) is divisible by 4 while the right-hand side is not, a contradiction.

17. If we denote x = dx1 , y = dy1 , z = dz1 , we get that


x+1 y+1 z+1
S= + +
y z x
d3 (x1 y12 + y1 z12 + z1 x21 ) + d2 (x1 y1 + y1 z1 + z1 x1 )
= .
d3 x1 y1 z1
xy+yz+zx
As S is an integer d is a divisor of x1 y1 + y1 z1 + z1 x1 . Therefore d ≤ d2 , from which the desired
follows.

18. No. Indeed, if integers x, y, z, t satisfy x2 + y 2 − 3z 2 − 3t2 = 0, then x2 + y 2 is a multiple of 3. But squares
are congruent to 0 or 1 modulo 3, so this is possible only if both x, y are divisible by 3. Then the number
x2 + y 2 = 3(z 2 + t2 ) is divisible by 9, the number z 2 + t2 is divisible by 3, and analogously we see that z,
t are divisible by 3. Hence any integer solution to the equation x2 + y 2 − 3z 2 − 3t2 = 0 has all variables
divisible by 3, and since the equation is homogeneous, this implies x = y = z = t = 0.

19. There exist infinitely many nice numbers, so we can find a nice number with at least 10k + 1 digits in its
decimal representation. Let c1 , c2 , . . ., c10k+1 be consecutive digits of this nice number.
By the definition of a nice number, the following two numbers are divisible by r:

a = 10k−1 c1 + 10k−2 c2 + · · · + 10ck−1 + ck ,


b = 10k−1 c2 + 10k−2 c3 + · · · + 10ck + ck+1 .

It follows that the number

10a − b = 10k c1 − ck+1

is divisible by r as well. If we denote di = cik+1 (i = 0, 1, . . . , 10), then by similar calculations we obtain


the divisibilities

r | 10k di − di+1 for i = 0, 1, . . . , 9. (3)

Observe that d0 , d1 , . . ., d10 is a sequence of 11 digits, so some of them must be equal. Consequently,
there exist indices 0 ≤ i < j ≤ 10 such that the digits di , di+1 , . . ., dj−1 are pairwise different and di = dj .
Therefore using (3) we see that the number

(10k di − di+1 ) + (10k di+1 − di+2 ) + · · · + (10k dj−1 − dj )


= (10k di − di+1 ) + (10k di+1 − di+2 ) + · · · + (10k dj−1 − di )
= (10k − 1)(di + di+1 + · · · + dj−1 )

is divisible by r. But the factor di + di+1 + · · · + dj−1 is a sum of distinct digits, so it does not exceed
0 + 1 + 2 + · · · + 9 = 45. Hence this factor is relatively prime to r. This proves that the k-digit number
10k − 1 is divisible by r, and it is therefore a nice number.

20. It it is sufficient to check that for any prime p the maximal power of p that divides ab equals p3m .
Let pk be a maximal power of p that divides a, and p` be a maximal power of p that divides b.

(1) If k = ` then a3 + b3 + ab is divisible by at most p2k , and ab(a − b) is divisible by at least p3k . Therefore,
this case is impossible.

— 6 —
(2) If k > ` then ab(a − b) is divisible by at least pk+2` . The three summands in the first number is
divisible by p3k , p3` and pk+` . Since 3` and k + ` are less than k + 2`, the divisibility of the given
numbers is possible if and only if k + ` = 3` (in this case the sum b3 + ab could be divisible by a power
of p greater than pk+` ). Therefore, we have k = 2`, and hence the maximal power of p that divides ab
is p3` .

— 7 —
Baltic Way 2008
Gdańsk, November 8, 2008
Problems and solutions

Problem 1. Determine all polynomials p(x) with real coefficients such that

p((x + 1)3 ) = (p(x) + 1)3

and

p(0) = 0.

Answer: p(x) = x .

Solution: Consider the sequence defined by


(
a0 = 0
a n+1 = (a n + 1)3 .

It follows inductively that p(a n ) = a n . Since the polynomials p and x agree on infinitely many points, they
must be equal, so p(x) = x .

Problem 2. Prove that if the real numbers a , b and c satisfy a 2 + b 2 + c 2 = 3 then

a2 b2 c2 (a + b + c)2
+ + ≥ .
2 + b + c 2 2 + c + a2 2 + a + b2 12
When does equality hold?

Solution: pLet 2 + b + c 2 = u , 2 + c + a 2 = v , 2 + a + b 2 = w . We note that it follows from a 2 + b 2 + c 2 = 3 that


a, b, c ≥ − 3 > −2. Therefore, u , v and w are positive. From the Cauchy-Schwartz inequality we get then
µ ¶
a p b p c p 2
(a + b + c)2 = p u+p v+p w
u v w
µ 2 2 2¶
a b c
≤ + + (u + v + w) .
u v w

Here,

u + v + w = 6 + a + b + c + a2 + b2 + c 2 = 9 + a + b + c .

Invoking once more the Cauchy-Schwartz inequality, we get

(a + b + c)2 = (a · 1 + b · 1 + c · 1)2 ≤ (a 2 + b 2 + c 2 )(1 + 1 + 1) = 9 ,

whence a + b + c ≤ 3 and u + v + w ≤ 12. The proposed inequality follows.

In the second application above of the Cauchy-Schwartz inequality, equality requires a = b = c . If this is
satified, u + v + w = 12, which is equivalent to a + b + c = 3, requires a = b = c = 1. It is seen by a direct
check that equality holds in the proposed inequality in this case.

Problem 3. Does there exist an angle α ∈ (0, π/2) such that sin α, cos α, tan α and cot α, taken in some order,
are consecutive terms of an arithmetic progression?

Answer: No.

1
π
Solution: Suppose that there is an x such that 0 < x < and sin x , cos x , tan x , cot x in some order are
2
consecutive terms of an arithmetic progression.

π π π sin x
Suppose x ≤ . Then sin x ≤ sin = cos ≤ cos x < 1 ≤ cot x and sin x < = tan x ≤ 1 ≤ cot x , hence
4 4 4 cos x
sin x is the least and cot x is the greatest among the four terms. Thereby, sin x < cot x , therefore equalities
do not occur.

Independently on whether the order of terms is sin x < tan x < cos x < cot x or sin x < cos x < tan x < cot x ,
we have cos x − sin x = cot x − tan x . As
cos x sin x cos2 x − sin2 x (cos x − sin x)(cos x + sin x)
cot x − tan x = − = = ,
sin x cos x cos x sin x cos x sin x
(cos x − sin x)(cos x + sin x)
we obtain cos x − sin x = . As cos x > sin x , we can reduce by cos x − sin x and
cos x sin x
get

cos x + sin x 1 1
1= = + .
cos x sin x sin x cos x
1 1
But 0 < sin x < 1 and 0 < cos x < 1, hence and are greater than 1 and their sum cannot equal 1,
sin x cos x
a contradiction.
π π π π
If x > then 0 < − x < . As the sine, cosine, tangent and cotangent of − x are equal to the sine,
4 2 4 2
cosine, tangent and cotangent of x in some order, the contradiction carries over to this case, too.

π
Solution 2: The case x ≤ can also be handled as follows. Consider two cases according to the order of the
4
intermediate two terms.

If the order is sin x < tan x < cos x < cot x then using AM-GM gives
tan x + cot x p p
cos x = > tan x · cot x = 1 = 1
2
which is impossible.

Suppose the other case, sin x < cos x < tan x < cot x . From equalities

sin x + tan x cos x + cot x


= cos x and = tan x,
2 2
one gets

tan x(cos x + 1) = 2 cos x,


cot x(sin x + 1) = 2 tan x,

respectively. By multiplying the corresponding sides, one obtains (cos x + 1)(sin x + 1) = 4 sin x , leading to
cos x sin x + cos x + 1 = 3 sin x . On the other hand, using cos x > sin x and AM-GM gives

cos x sin x + cos x + 1 > sin2 x + sin x + 1 ≥ 2 sin x + sin x = 3 sin x,

a contradiction.

Problem 4. The polynomial P has integer coefficients and P (x) = 5 for five different integers x . Show that
there is no integer x such that −6 ≤ P (x) ≤ 4 or 6 ≤ P (x) ≤ 16.

Solution: Assume P (x k ) = 5 for different integers x 1 , x 2 , . . . , x 5 . Then

Y
5
P (x) − 5 = (x − x k )Q(x),
k=1

2
where Q is a polynomial with integral coefficients. Assume n satisfies the condition in the problem. Then
|n −5| ≤ 11. If P (x 0 ) = n for some integer x 0 , then n −5 is a product of six non-zero integers, five of which are
different. The smallest possible absolute value of a product of five different non-zero integers is 12 ·22 ·3 = 12.

Problem 5. Suppose that Romeo and Juliet each have a regular tetrahedron to the vertices of which some
positive real numbers are assigned. They associate each edge of their tetrahedra with the product of the two
numbers assigned to its end points. Then they write on each face of their tetrahedra the sum of the three
numbers associated to its three edges. The four numbers written on the faces of Romeo’s tetrahedron turn
out to coincide with the four numbers written on Juliet’s tetrahedron. Does it follow that the four numbers
assigned to the vertices of Romeo’s tetrahedron are identical to the four numbers assigned to the vertices of
Juliet’s tetrahedron?

Answer: Yes.

Solution: Let us prove that this conclusion can in fact be drawn. For this purpose we denote the numbers
assigned to the vertices of Romeo’s tetrahedron by r 1 , r 2 , r 3 , r 4 and the numbers assigned to the vertices of
Juliette’s tetrahedron by j 1 , j 2 , j 3 , j 4 in such a way that

r2r 3 + r3r 4 + r4r 2 = j2 j3 + j3 j4 + j4 j2 (1)


r1r 3 + r3r 4 + r4r 1 = j1 j3 + j3 j4 + j4 j1 (2)
r1r 2 + r2r 4 + r4r 1 = j1 j2 + j2 j4 + j4 j1 (3)
r1r 2 + r2r 3 + r3r 1 = j1 j2 + j2 j3 + j3 j1 (4)

We intend to show that r 1 = j 1 , r 2 = j 2 , r 3 = j 3 and r 4 = j 4 , which clearly suffices to establish our claim.
Now let

R = {i | r i > j i }

denote the set indices where Romeo’s corresponding number is larger and define similarly

J = {i | r i < j i }.

If we had |R| > 2, then w.l.o.g. {1, 2, 3} ⊆ R , which easily contradicted (4). Therefore |R| ≤ 2, so let us suppose
for the moment that |R| = 2. Then w.l.o.g. R = {1, 2}, i.e. r 1 > j 1 , r 2 > j 2 , r 3 ≤ j 3 , r 4 ≤ j 4 . It follows that
r 1 r 2 − r 3 r 4 > j 1 j 2 − j 3 j 4 , but (1) + (2) − (3) − (4) actually tells us that both sides of this strict inequality are
equal. This contradiction yields |R| ≤ 1 and replacing the roles Romeo and Juliet played in the argument just
performed we similarly infer |J | ≤ 1. For these reasons at least two of the four desired equalities hold, say
r 1 = 11 and r 2 = j 2 . Now using (3) and (4) we easily get r 3 = j 3 and r 4 = j 4 as well.

Problem 6. Find all finite sets of positive integers with at least two elements such that for any two numbers
b2
a , b (a > b ) belonging to the set, the number belongs to the set, too.
a−b

Answer: X = {a, 2a}, where a is an arbitrary nonnegative integer.

Solution: Let X be a set we seek for, and a be its minimal element. For each other element b we have
a2
≥ a , hence b ≤ 2a . Therefore all the elements of X belong to the interval [a, 2a]. So the quotient of
b−a
any two elements of X is at most 2.

c2
Now consider two biggest elements d and c , c < d . Since d ≤ 2c we conclude that ≥ c . Hence
d −c
c2 c2
= d or = c . The first case is impossible because we obtain an equality (c/d )2 + (c/d ) − 1 = 0,
d −c d −c
which implies that c/d is irrational. Therefore we have the second case and c 2 = dc − c 2 , i.e. c = d /2. Thus
the set X could contain only one element except d , and this element should be equal to d /2. It is clear that
all these sets satisfy the condition of the problem.

3
Problem 7. How many pairs (m, n) of positive integers with m < n fulfill the equation

3 1 1
= + ?
2008 m n

Answer: 5.

Solution: Let d be the greatest common divisor of m and n , and let m = d x and n = d y . Then the equation
is equivalent to

3d x y = 2008(x + y).

The numbers x and y are relatively prime and have no common divisors with x + y and hence they are both
divisors of 2008. Notice that 2008 = 8 · 251 and 251 is a prime. Then x and y fulfil:
1) They are both divisors of 2008.
2) Only one of them can be even.
3) The number 251 can only divide none or one of them.
4) x < y .

That gives the following possibilities of (x, y):

(1, 2), (1, 4), (1, 8), (1, 251), (1, 2 · 251), (1, 4 · 251), (1, 8 · 251), (2, 251), (4, 251), (8, 251).

The number 3 does not divide 2008 and hence 3 divides x + y . That shortens the list down to

(1, 2), (1, 8), (1, 251), (1, 4 · 251), (4, 251).

2008 x + y
For every pair (x, y) in the list determine the number d = · . It is seen that x y divides 2008 for all
xy 3
(x, y) in the list and hence d is an integer. Hence exactly 5 solutions exist to the equation.

Problem 8. Consider a set A of positive integers such that the least element of A equals 1001 and the product
of all elements of A is a perfect square. What is the least possible value of the greatest element of A?

Answer: 1040.

Solution: We first prove that max A has to be at least 1040.

As 1001 = 13 · 77 and 13 - 77, the set A must contain a multiple of 13 that is greater than 13 · 77. Consider
the following cases:

• 13 · 78 ∈ A. But 13 · 78 = 132 · 6, hence A must also contain some greater multiple of 13.

• 13 · 79 ∈ A. As 79 is a prime, A must contain another multiple of 79, which is greater than 1040 as
14 · 79 > 1040 and 12 · 79 < 1001.

• 13 · k ∈ A for k ≥ 80. As 13 · k ≥ 13 · 80 = 1040, we are done.

Now take A = {1001, 1008, 1012, 1035, 1040}. The prime factorizations are 1001 = 7 · 11 · 13, 1008 = 7 · 24 · 32 ,
1012 = 22 · 11 · 23, 1035 = 5 · 32 · 23, 1040 = 24 · 5 · 13. The sum of exponents of each prime occurring in these
representations is even. Thus the product of elements of A is a perfect square.

Problem 9. Suppose that the positive integers a and b satisfy the equation

a b − b a = 1008.

Prove that a and b are congruent modulo 1008.

4
Solution: Observe that 1008 = 24 · 32 · 7. First we show that a and b cannot both be even. For suppose the
largest of them were equal to 2x and the smallest of them equal to 2y , where x ≥ y ≥ 1. Then

±1008 = (2x)2y − (2y)2x ,

so that 22y divides 1008. It follows that y ≤ 2. If y = 2, then ±1008 = (2x)4 − 42x , and

±63 = x 4 − 42x−2 = (x 2 + 4x−1 )(x 2 − 4x−1 ).

But x 2 − 4x−1 is easily seen never to divide 63; already at x = 4 it is too large. Suppose that y = 1. Then
±1008 = (2x)2 − 22x , and

±252 = x 2 − 22x−2 = (x + 2x−1 )(x − 2x−1 ).

This equation has no solutions. Clearly x must be even. x = 2, 4, 6, 8 do not work, and when x ≥ 10, then
x + 2x−1 > 252.

We see that a and b cannot both be even, so they must both be odd. They cannot both be divisible by 3, for
then 1008 = a b − b a would be divisible by 27; therefore neither of them is. Likewise, none of them is divisible
by 7.

Everything will now follow from repeated use of the following fact, where ϕ denotes Euler’s totient function:

If n | 1008, a and b are relatively prime to both n and ϕ(n), and a ≡ b mod ϕ(n), then also a ≡ b mod n .

To prove the fact, use Euler’s Totient Theorem: a ϕ(n) ≡ b ϕ(n) ≡ 1 mod n . From a ≡ b ≡ d mod ϕ(n), we get

0 ≡ 1008 = a b − b a ≡ a d − b d mod n,

and since d is invertible modulo ϕ(n), we may deduce that a ≡ b mod n .

Now begin with a ≡ b ≡ 1 mod 2. From ϕ(4) = 2, ϕ(8) = 4 and ϕ(16) = 8, we get congruence of a and b
modulo 4, 8 and 16 in turn. We established that a and b are not divisible by 3. Since ϕ(3) = 2, we get a ≡ b
mod 3, then from ϕ(9) = 6, deduce a ≡ b mod 9. Finally, since a and b are not divisible by 7, and ϕ(7) = 6,
infer a ≡ b mod 7.

Consequently, a ≡ b mod 1008. We remark that the equation possesses at least one solution, namely
10091 − 11009 = 1008. It is unknown whether there exist others.

Problem 10. For a positive integer n , let S(n) denote the sum of its digits. Find the largest possible value of
S(n)
the expression .
S(16n)

Answer: 13

Solution: It is obvious that S(ab) ≤ S(a)S(b) for all positive integers a and b . From here we get

S(n) = S(n · 10000) = S(16n · 625) ≤ S(16n) · 13;


S(n)
so we get ≤ 13.
S(16n)

For n = 625 we have an equality. So the largest value is 13.

Problem 11. Consider a subset A of 84 elements of the set {1, 2, . . . , 169} such that no two elements in the
set add up to 169. Show that A contains a perfect square.

Solution: If 169 ∈ A, we are done. If not, then

[
84
A⊂ {k, 169 − k}.
k=1

5
Since the sum of the numbers in each of the sets in the union is 169, each set contains at most one element
of A; on the other hand, as A has 84 elements, each set in the union contains exactly one element of A. So
there is an a ∈ A such that a ∈ {25, 144}. a is a perfect square.

Problem 12. In a school class with 3n children, any two children make a common present to exactly one
other child. Prove that for all odd n it is possible that the following holds:

For any three children A, B and C in the class, if A and B make a present to C then A and C make a present
to B .

Solution: Assume there exists a set S of sets of three children such that any set of two children is a subset of
exactly one member of S , and assume that the children A and B make a common present to C if and only
if {A, B, C } ∈ S . Then it is true that any two children A and B make a common present to exactly one other
child C , namely the unique child such that {A, B, C } ∈ S . Because {A, B, C } = {A, C , B } it is also true that if A
and B make a present to C then A and C make a present to B . We shall construct such a set S .

Let A 1 , . . . , A n , B 1 , . . . B n , C 1 , . . . , C n be the children, and let the following sets belong to S . (1) {A i , B i , C i }
for 1 ≤ i ≤ n . (2) {A i , A j , B k }, {B i , B j , C k } and {C i , C j , A k } for 1 ≤ i < j ≤ n , 1 ≤ k ≤ n and i + j ≡ 2k (mod n).
We note that because n is odd, the congruence i + j ≡ 2k (mod n) has a unique solution with respect to k
in the interval 1 ≤ k ≤ n . Hence for 1 ≤ i < j ≤ n the set {A i , A j } is a subset of a unique set {A i , A j , B k } ∈ S ,
and similarly the sets {B i , B j } and {C i , C j }. The relations i + j ≡ 2i (mod n) and i + j ≡ 2 j (mod n) both
imply i ≡ j (mod n), which contradicts 1 ≤ i < j ≤ n . Hence for 1 ≤ i ≤ n , the set {A i , B i , C i } is the only
set in S of which any of the sets {A i , B i } {A i , C i } and {B i , C i } is a subset. For i 6= k , the relations i + j ≡ 2k
(mod n) and 1 ≤ j ≤ n determine j uniquely, and we have i 6= j because otherwise i + j ≡ 2k (mod n)
implies i ≡ k (mod n), which contradicts i 6= k . Thus {A i , B k } is a subset of the unique set {A i , A j , B k } ∈ S .
Similarly {B i , C k } and {A i , C k }. Altogether, each set of two children is thus a subset of a unique set in S .

Problem 13. For an upcoming international mathematics contest, the participating countries were asked to
choose from nine combinatorics problems. Given how hard it usually is to agree, nobody was surprised that
the following happened:

• Every country voted for exactly three problems.


• Any two countries voted for different sets of problems.
• Given any three countries, there was a problem none of them voted for.

Find the maximal possible number of participating countries.

Answer: 56

Solution: Certainly, the 56 three-element subsets of the set {1, 2, . . . , 8} would do. Now we prove that 56 is
the maximum. Assume we have a maximal configuration. Let Y be the family of the three-element subsets,
which were chosen by the participating countries and N be the family à ! of the three-element subsets, which
9
were not chosen by the participating countries. Then |Y | + |N | = = 84. Consider an x ∈ Y . There are
3
à !
6
= 20 three-element subsets disjoint to x , which can be partitioned into 10 pairs of complementary sub-
3
sets. At least one of the two sets of those pairs of complementary sets have to belong to N , otherwise these
two together with x have the whole sets as union, i.e., three countries would have voted for all problems.
Therefore, to any x ∈ Y there are associated at least 10 sets of N . On the other hand, a set y ∈ N can be asso-
ciated not more than to 20 sets, since there are exactly 20 disjoint sets to y . Together we have 10·|Y | ≤ 20·|N |
and
2 1 2 2 2 2
|Y | = |Y | + |Y | ≤ |Y | + |N | = (|Y | + |N |) = · 84 = 56.
3 3 3 3 3 3

Remark: The set of the 84 three-element subsets can be partitioned into 28 triples of pairwise disjoint sets.
From any of those triples at most two can be chosen. The partition is not obvious, but possible.

6
Problem 14. Is it possible to build a 4 × 4 × 4 cube from blocks of the following shape consisting of 4 unit
cubes?

Answer: Yes.

Solution: It is possible to put two blocks together to form a new block that covers an area of shape

whereby the part marked with crosses has two layers.

From two such new blocks, one can build figure

Taking two such figures, turning one of them upside down and rotating 90 degrees, leads to a 4 × 4 × 2 block.
Finally, two such blocks together form the desired cube.

Problem 15. Some 1 × 2 dominoes, each covering two adjacent unit squares, are placed on a board of size
n × n so that no two of them touch (not even at a corner). Given that the total area covered by the dominoes
is 2008, find the least possible value of n .

Answer: 77

Solution: Following the pattern from the figure, we have space for
156 · 13
6 + 18 + 30 + . . . + 150 = = 1014
2
dominoes, giving the area 2028 > 2008.

7
The square 76 × 76 is not enough. If it was, consider the "circumferences" of the 1004 dominoes of size 2 × 3,
see figure; they should fit inside 77 × 77 square without overlapping. But 6 · 1004 = 6024 > 5929 = 77 · 77.

Problem 16. Let ABC D be a parallelogram. The circle with diameter AC intersects the line B D at points
P and Q . The perpendicular to the line AC passing through the point C intersects the lines AB and AD at
points X and Y , respectively. Prove that the points P , Q , X and Y lie on the same circle.

Solution: If the lines B D and X Y are parallel the statement is trivial. Let M be the intersection point of B D
and X Y .

By Intercept Theorem M B /M D = MC /M Y and M B /M D = M X /MC , hence MC 2 = M X · M Y . By the


circle property MC 2 = M P · MQ (line MC is tangent and line M P is secant to the circle). Therefore we have
M X · M Y = M P · MQ and the quadrilateral PQY X is inscribed.

Problem 17. Assume that a , b , c and d are the sides of a quadrilateral inscribed in a given circle. Prove that
the product (ab + cd )(ac + bd )(ad + bc) acquires its maximum when the quadrilateral is a square.

Solution: Let ABC D be the quadrilateral, and let AB = a , BC = b , C D = c , AD = d , AC = e , B D = f .


Ptolemy’s Theorem gives ac + bd = e f . Since the area of triangle ABC is abe/4R , where R is the circumra-
dius, and similarly the area of triangle AC D , the product (ab + cd )e equals 4R times the area of quadrilateral
ABC D . Similarly, this is also the value of the product f (ad + bc), so (ab + cd )(ac + bd )(ad + bc) is maximal
1
when the quadrilateral has maximal area. Since the area of the quadrilateral is equal to e f sin u , where u
2
is one of the angles between the diagonals AC and B D , it is maximal when all the factors of the product
d e sin u are maximal. The diagonals d and e are maximal when they are diagonals of the circle, and sin u is
maximal when u = 90◦ . Thus, (ab + cd )(ac + bd )(ad + bc) is maximal when ABC D is a square.

Problem 18. Let AB be a diameter of a circle S , and let L be the tangent at A. Furthermore, let c be a
fixed, positive real, and consider all pairs of points X and Y lying on L , on opposite sides of A, such that
|AX | · |AY | = c . The lines B X and B Y intersect S at points P and Q , respectively. Show that all the lines PQ
pass through a common point.

Solution: Let S be the unit circle in the x y -plane with origin O , put A = (1, 0), B = (−1, 0), take L as the line
c
x = 1, and suppose X = (1, 2p) and Y = (1, −2q), where p and q are positive real numbers with pq = . If
4
α = ∠ AB P and β = ∠ ABQ , then tan α = p and tan β = q .

Let PQ intersect the x -axis in the point R . By the Inscribed Angle Theorem, ∠ROP = 2α and ∠ROQ = 2β.
The triangle OPQ is isosceles, from which ∠OPQ = ∠OQP = 90◦ − α − β, and ∠ORP = 90◦ − α + β. The Law
of Sines gives

OR OP
= ,
sin ∠OP R sin ∠ORP
which implies

sin ∠OP R sin(90◦ − α − β) cos(α + β)


OR = = =
sin ∠ORP sin(90◦ − α + β) cos(α − β)
cos α cos β − sin α sin β 1 − tan α tan β
= =
cos α cos β + sin α sin β 1 + tan α tan β
c
1 − pq 1− 4 4−c
= = c = .
1 + pq 1+ 4 4+c

8
Hence the point R lies on all lines PQ .

Solution 2: Perform an inversion in the point B . Since angles are preserved under inversion, the problem
transforms into the following: Let S be a line, let the circle L be tangent to it at point A, with ∞ as the
diametrically opposite point. Consider all points X and Y lying on L , on opposite sides of A, such that if
c
α = ∠ AB X and β = ∠ AB Y , then tan α tan β = . The lines X ∞ and Y ∞ will intersect S in points P and Q ,
4
respectively. Show that all the circles PQ∞ will pass through a common point.

To prove this, draw the line through A and ∞, and define R as the point lying on this line, opposite to ∞,
cr
and at distance from A, where r is the radius of L . Since
2

|AP | |AQ|
tan α = , tan β = ,
2r 2r

we have

c |AP ||AQ|
= tan α tan β = ,
4 4r 2

cr 2
so that |AP | = , whence
|AQ|

cr 2
|AP | |AQ| 2r
tan ∠∞RP = = cr = = tan ∠∞QP.
|AR| 2 |AQ|

Consequently, ∞, P , Q , and R are concyclic.

Problem 19. In a circle of diameter 1, some chords are drawn. The sum of their lengths is greater than 19.
Prove that there is a diameter intersecting at least 7 chords.

Solution: For each hord consider the smallest arc subtended by it and the symmetric image of this arc ac-
38
cordingly to the center. The sum of lengths of all these arcs is more than 19 · 2 = 38. As > 12, there is a
π·1
12
point on the circumference belonging to > original arcs, so it belongs to ≥ 7 original arcs. We can take a
2
diameter containing this point.

Problem 20. Let M be a point on BC and N be a point on AB such that AM and C N are angle bisectors of
the triangle ABC . Given that

∠B N M ∠B M N
= ,
∠M NC ∠N M A
prove that the triangle ABC is isosceles.

I
γ δ
N ε φ M

O β
α
α β
A C

9
Solution: Let O and I be the incentres of ABC and N B M , respectively; denote angles as in the figure. We
get

α + β = ε + ϕ, γ + δ = 2α + 2β, γ = k · ε, δ = k · ϕ.

From here we get k = 2. Therefore 4N I M = 4NOM , so I O ⊥ N M . In the triangle N B M the bisector


coincides with the altitude, so B N = B M . So we get

AB · BC BC · AB
=
AC + BC AB + AC

and AB = BC .

10
English
009
Baltic
Trondh
Way 2
eim, No
rway Baltic Way 2009
Trondheim, 7. november 2009
Time allowed: 4 12 hours.
Questions may be asked during the first 30 minutes.

Problem 1. A polynomial p(x) of degree n ≥ 2 has exactly n real roots, counted with multiplicity.
We know that the coefficient of xn is 1, all the roots are less than or equal to 1, and p(2) = 3n .
What values can p(1) take?
Problem 2. Let a1 , a2 , . . . , a100 be nonnegative integers satisfying the inequality

a1 · (a1 − 1) · . . . · (a1 − 20) + a2 · (a2 − 1) · . . . · (a2 − 20) +


. . . + a100 · (a100 − 1) · . . . · (a100 − 20) ≤ 100 · 99 · 98 · . . . · 79.

Prove that a1 + a2 + . . . + a100 ≤ 9900.


Problem 3. Let n be a given positive integer. Show that we can choose numbers ck ∈ {−1, 1}
(1 ≤ k ≤ n) such that
∑n
0≤ ck · k 2 ≤ 4.
k=1

Problem 4. Determine all integers n > 1 for which the inequality

x21 + x22 + . . . + x2n ≥ (x1 + x2 + . . . + xn−1 )xn

holds for all real x1 , x2 , . . . , xn .


Problem 5. Let f0 = f1 = 1 and fi+2 = fi+1 + fi (i ≥ 0). Find all real solutions of the equation

x2010 = f2009 · x + f2008 .

Problem 6. Let a and b be integers such that the equation x3 − ax2 − b = 0 has three integer
roots. Prove that b = dk 2 , where d and k are integers and d divides a.
Problem 7. Suppose that for a prime number p and integers a, b, c the following holds:

6 | p + 1, p | a + b + c, p | a4 + b4 + c4 .

Prove that p | a, b, c.
Problem 8. Determine all positive integers n for which there exists a partition of the set

{n, n + 1, n + 2, . . . , n + 8}

into two subsets such that the product of all elements of the first subset is equal to the product
of all elements of the second subset.
Problem 9. Determine all positive integers n for which 2n+1 − n2 is a prime number.
Problem 10. Let d(k) denote the number of positive divisors of a positive integer k. Prove that
there exist infinitely many positive integers M that cannot be written as
( √ )2
2 n
M=
d(n)
for any positive integer n.
Problem 11. Let M be the midpoint of the side AC of a triangle ABC, and let K be a point on
the ray BA beyond A. The line KM intersects the side BC at the point L. P is the point on the
segment BM such that P M is the bisector of the angle LP K. The line ℓ passes through A and is
parallel to BM . Prove that the projection of the point M onto the line ℓ belongs to the line P K.
Problem 12. In a quadrilateral ABCD we have AB ∥ CD and AB = 2CD. A line ℓ is
perpendicular to CD and contains the point C. The circle with centre D and radius DA intersects
the line ℓ at points P and Q. Prove that AP ⊥BQ.
Problem 13. The point H is the orthocentre of a triangle ABC, and the segments AD, BE,
CF are its altitudes. The points I1 , I2 , I3 are the incentres of the triangles EHF, F HD, DHE,
respectively. Prove that the lines AI1 , BI2 , CI3 intersect at a single point.
Problem 14. For which n ≥ 2 is it possible to find n pairwise non-similar triangles A1 , A2 , . . . , An
such that each of them can be divided into n pairwise non-similar triangles, each of them similar
to one of A1 , A2 , . . . , An ?
Problem 15. A unit square is cut into m quadrilaterals Q1 , . . . , Qm . For each i = 1, . . . , m let
Si be the sum of the squares of the four sides of Qi . Prove that

S1 + . . . + Sm ≥ 4.

Problem 16. A n-trønder walk is a walk starting


at (0, 0), ending at (2n, 0) with no self intersection
and not leaving the first quadrant, where every
step is one of the vectors (1, 1), (1, −1) or (−1, 1).
(The figure shows the possible 2-trønder walks.)
Find the number of n-trønder walks.
Problem 17. Find the largest integer n for which there exist n different integers such that none
of them are divisible by either of 7, 11, and 13, but the sum of any two of them is divisible by at
least one of 7, 11, and 13.
Problem 18. Let n > 2 be an integer. In a country there are n cities and every two of them are
connected by a direct road. Each road is assigned an integer from the set {1, 2, . . . , m} (different
roads may be assigned the same number). The priority of a city is the sum of the numbers assigned
to roads which lead to it. Find the smallest m for which it is possible that all cities have a different
priority.
Problem 19. In a party of eight persons, each pair of persons either know each other or do not
know each other. Each person knows exactly three of the others. Determine whether the following
two conditions can be satisfied simultaneously:

– for any three persons, at least two do not know each other;

– for any four persons there are at least two who know each other.

Problem 20. In the future city Baltic Way there are sixteen hospitals. Every night exactly four
of them must be on duty for emergencies. Is it possible to arrange the schedule in such a way that
after twenty nights every pair of hospitals have been on common duty exactly once?
English

BALTIC WAY 2010  SOLUTIONS

REYKJAVIK, NOVEMBER 6TH 2010

Time allowed: 4 12 hours.


Questions may be asked during the rst 30 minutes.
The only tools allowed are a ruler and a compass.
Each problem is worth 5 points.

Problem 1. Find all quadruples of real numbers (a, b, c, d) satisfying the system of equations


(b + c + d)2010 = 3a
(a + c + d)2010 = 3b


(a + b + d)2010 = 3c

(a + b + c)2010 = 3d.

Solution. There are two solutions: (0, 0, 0, 0) and ( 13 , 13 , 31 , 13 ).


If (a, b, c, d) satises the equations, then we may as well assume a ≤ b ≤ c ≤ d. These are
non-negative because an even power of a real number is always non-negative. It follows that
b+c+d≥a+c+d≥a+b+d≥a+b+c
and since x 7→ x2010 is increasing for x ≥ 0 we have that
3a = (b + c + d)2010 ≥ (a + c + d)2010 ≥ (a + b + d)2010 ≥ (a + b + c)2010 = 3d.
We conclude that a = b = c = d and all the equations take the form (3a)2010 = 3a, so a = 0 or
3a = 1. Finally, it is clear that a = b = c = d = 0 and a = b = c = d = 13 solve the system.
Problem 2. Let x be a real number such that 0 < x < π2 . Prove that
cos2 (x) cot(x) + sin2 (x) tan(x) ≥ 1.

Solution. The geometric-arithmetic inequality gives


cos2 x + sin2 x 1
cos x sin x ≤ = .
2 2
It follows that
1 = (cos2 x + sin2 x)2 = cos4 x + sin4 x + 2 cos2 x sin2 x ≤ cos4 x + sin4 x + 1
2

so
cos4 x + sin4 x ≥ 1
2 ≥ cos x sin x.
The required inequality follows.
Problem 3. Let x1 , x2 , . . ., xn (n ≥ 2) be real numbers greater than 1. Suppose that
|xi − xi+1 | < 1 for i = 1, 2, . . . , n − 1. Prove that
x1 x2 xn−1 xn
+ + ... + + < 2n − 1.
x2 x3 xn x1
2 BALTIC WAY 2010

Solution.The proof is by induction on n.


We establish rst the base case n = 2. Suppose that x1 > 1, x2 > 1, |x1 − x2 | < 1 and
moreover x1 ≤ x2 . Then
x1 x2 x2 x1 + 1 1
+ ≤1+ <1+ =2+ < 2 + 1 = 2 · 2 − 1.
x2 x1 x1 x1 x1
Now we proceed to the inductive step, and assume that the numbers x1 , x2 , . . ., xn , xn+1 > 1
are given such that |xi − xi+1 | < 1 for i = 1, 2, . . . , n − 1, n. Let
x1 x2 xn−1 xn x1 x2 xn−1 xn xn+1
S= + + ... + + , S0 = + + ... + + + .
x2 x3 xn x1 x2 x3 xn xn+1 x1
The inductive assumption is that S < 2n − 1 and the goal is that S 0 < 2n + 1. From the above
relations involving S and S 0 we see that it suces to prove the inequality
xn xn+1 − xn
+ ≤ 2.
xn+1 x1
We consider two cases. If xn ≤ xn+1 , then using the conditions x1 > 1 and xn+1 − xn < 1 we
obtain
xn xn+1 − xn xn+1 − xn 1
+ ≤1+ <1+ < 2,
xn+1 x1 x1 x1
and if xn > xn+1 , then using the conditions xn < xn+1 + 1 and xn+1 > 1 we get
xn xn+1 − xn xn xn+1 + 1 1
+ < < =1+ < 1 + 1 = 2.
xn+1 x1 xn+1 xn+1 xn+1
The induction is now complete.
Problem 4. Find all polynomials P (x) with real coecients such that
(x − 2010)P (x + 67) = xP (x)
for every integer x.
Solution. Taking x = 0 in the given equality leads to −2010P (67) = 0, implying P (67) = 0.
Whenever i is an integer such that 1 ≤ i < 30 and P (i · 67) = 0, taking x = i · 67 leads to
(i · 67 − 2010)P ((i + 1) · 67) = 0; as i · 67 < 2010 for i < 30, this implies P ((i + 1) · 67) = 0.
Thus, by induction, P (i · 67) = 0 for all i = 1, 2, . . . , 30. Hence
P (x) ≡ (x − 67)(x − 2 · 67) . . . (x − 30 · 67)Q(x)
where Q(x) is another polynomial.
Substituting this expression for P in the original equality, one obtains
(x − 2010) · x(x − 67) . . . (x − 29 · 67)Q(x + 67) = x(x − 67)(x − 2 · 67) . . . (x − 30 · 67)Q(x)
which is equivalent to
(1) x(x − 67)(x − 2 · 67) . . . (x − 30 · 67)(Q(x + 67) − Q(x)) = 0.
By conditions of the problem, this holds for every integer x. Hence there are innitely many
roots of polynomial Q(x + 67) − Q(x), implying that Q(x + 67) − Q(x) ≡ 0. Let c = Q(0); then
Q(i · 67) = c for every integer i by easy induction. Thus polynomial Q(x) − c has innitely many
roots whence Q(x) ≡ c.
Consequently, P (x) = c(x − 67)(x − 2 · 67) . . . (x − 30 · 67) for some real number c. As equation
(1) shows, all such polynomials t.
BALTIC WAY 2010  SOLUTIONS 3

Problem 5. Let R denote the set of real numbers. Find all functions f : R → R such that
f (x2 ) + f (xy) = f (x)f (y) + yf (x) + xf (x + y)
for all x, y ∈ R.
Solution. Setting x = 0 in the equation we get f (0)f (y) = (2 − y)f (0). If f (0) 6= 0, then
f (y) = 2 − y and it is easy to verify that this is a solution to the equation.
Now assume f (0) = 0. Setting y = 0 in the equation we get f (x2 ) = xf (x). Interchanging x
and y and subtracting from the original equation we get
xf (x) − yf (y) = yf (x) − xf (y) + (x − y)f (x + y)
or equivalently
(x − y)(f (x) + f (y)) = (x − y)f (x + y).
For x 6= y we therefore have f (x + y) = f (x) + f (y). Since f (0) = 0 this clearly also holds for
x = 0, and for x = y 6= 0 we have
f (2x) = f ( x3 ) + f ( 5x x 2x
3 ) = f ( 3 ) + f ( 3 ) + f (x) = f (x) + f (x).
Setting x = y in the original equation, using f (x2 ) = xf (x) and f (2x) = 2f (x) we get
0 = f (x)2 + xf (x) = f (x)(f (x) + x).
So for each x, either f (x) = 0 or f (x) = −x. But then
or
(
0
f (x) + f (y) = f (x + y) =
−(x + y)
and we conclude that f (x) = −x if and only if f (y) = −y when x, y 6= 0. We therefore have
either f (x) = −x for all x or f (x) = 0 for all x. It is easy to verify that both are solutions to
the original equation.
Problem 6. An n × n board is coloured in n colours such that the main diagonal (from top-left
to bottom-right) is coloured in the rst colour; the two adjacent diagonals are coloured in the
second colour; the two next diagonals (one from above and one from below) are coloured in the
third colour, etc.; the two corners (top-right and bottom-left) are coloured in the n-th colour.
It happens that it is possible to place on the board n rooks, no two attacking each other and
such that no two rooks stand on cells of the same colour. Prove that n ≡ 0 (mod 4) or n ≡ 1
(mod 4).
Solution. Use the usual coordinate system for which the cells of the main diagonal have coor-
dinates (k, k), where k = 1, . . . , n. Let (k, f (k)) be the coordinates of the k-th rook. Then by
color restrictions for rooks we have
n n−1
X X n(n − 1)(2n − 1)
(f (k) − k)2 = i2 = .
6
k=1 i=0
Since the rooks are non-attacking we have
n n
X
2
X n(n + 1)(2n + 1)
(f (k)) = i2 = .
6
k=1 i=1
By subtracting these equalities we obtain
n
X n(2n2 + 9n + 1)
kf (k) = .
12
k=1
Now it is trivial to check that the last number is integer if and only if n ≡ 0 or 1 (mod 4).
4 BALTIC WAY 2010

Problem 7. There are some cities in a country; one of them is the capital. For any two cities
A and B there is a direct ight from A to B and a direct ight from B to A, both having the
same price. Suppose that all round trips with exactly one landing in every city have the same
total cost. Prove that all round trips that miss the capital and with exactly one landing in every
remaining city cost the same.
Solution. Let C be the capital and C1 , C2 , . . ., Cn be the remaining cities. Denote by d(x, y)
the price of the connection between the cities x and y , and let σ be the total price of a round
trip going exactly once through each city.
Now consider a round trip missing the capital and visiting every other city exactly once; let
s be the total price of that trip. Suppose Ci and Cj are two consecutive cities on the route.
Replacing the ight Ci → Cj by two ights: from Ci to the capital and from the capital to Cj , we
get a round trip through all cities, with total price σ . It follows that σ = s+d(C, Ci )+d(C, Cj )−
d(Ci , Cj ), so it remains to show that the quantity α(i, j) = d(C, Ci ) + d(C, Cj ) − d(Ci , Cj ) is the
same for all 2-element subsets {i, j} ⊂ {1, 2, . . . , n}.
For this purpose, note that α(i, j) = α(i, k) whenever i, j , k are three distinct indices; indeed,
this equality is equivalent to d(Cj , C) + d(C, Ci ) + d(Ci , Ck ) = d(Cj , Ci ) + d(Ci , C) + d(C, Ck ),
which is true by considering any trip from Ck to Cj going through all cities except C and Ci
exactly once and completing this trip to a round trip in two ways: Cj → C → Ci → Ck and
Cj → Ci → C → Ck . Therefore the values of α coincide on any pair of 2-element sets sharing
a common element. But then clearly α(i, j) = α(i, j 0 ) = α(i0 , j 0 ) for all indices i, j , i0 , j 0 with
i 6= j , i0 6= j 0 , and the solution is complete.
Problem 8. In a club with 30 members, every member initially had a hat. One day each
member sent his hat to a dierent member (a member could have received more than one hat).
Prove that there exists a group of 10 members such that no one in the group has received a hat
from another one in the group.
Solution. Let S be the given group of 30 people. Consider all subsets A ⊂ S such that no
member of A received a hat from a member of A. Among such subsets, let T be a subset of
maximal cardinality. The assertion of the problem is that |T | ≥ 10.
Let U ⊂ S consist of all people that have received a hat from a person belonging to T . Now
consider any member x ∈ S \ (T ∪ U ). Since x 6∈ U , no member of T sent his hat to x. It follows
that no member of T sent a hat to a person from T ∪ {x}. But the maximality of T implies that
some person from T ∪ {x} sent his hat to a person from the same subset. This means that x
sent his hat to a person from T . Consequently, all members of the subset S \ (T ∪ U ) sent their
hats to people in T . In particular, S \ (T ∪ U ) has the property described in the beginning. The
maximality of T gives |S \ (T ∪ U )| ≤ |T |. Finally, we obviously have |U | ≤ |T |, so
|T | ≥ |S \ (T ∪ U )| = |S| − |T | − |U | ≥ |S| − 2|T |,
or |T | ≥ 31 |S| = 10, as desired.
Problem 9. There is a pile of 1000 matches. Two players each take turns and can take 1 to
5 matches. It is also allowed at most 10 times during the whole game to take 6 matches, for
example 7 exceptional moves can be done by the rst player and 3 moves by the second and
then no more exceptional moves are allowed. Whoever takes the last match wins. Determine
which player has a winning strategy.
Solution.The second player wins.
Let r be the number of the remaining exceptional moves in the current position (at the
beginning of the game r = 10 and r decreases during the game). The winning strategy of the
BALTIC WAY 2010  SOLUTIONS 5

second player is the following. After his move the number of matches in the pile must have the
form 6n + r, where n > r, or 7n, where n ≤ r (observe that 6n + r = 7n for n = r).
At the beginning of the game the initial number of matches 1000 = 6 · 165 + 10 agrees with
this strategy.
What happens during two consecutive moves?
Consider the case n > r rst. If the rst player takes k = 1, 2, . . . 5 matches (and hence r is
not changing during his move) then the second player takes 6 − k matches. So players take 6
matches together and the pile contains now 6(n − 1) + r matches.
If the rst player takes 6 matches, then r decreases by 1. The second player takes 1 match.
After his turn the pile contains 6(n − 1) + (r − 1) matches as he wish.
Now consider the case n ≤ r. In this situation we have much enough exceptional moves, and
we may assume that now each move the players can take up to 6 matches. Then if the rst
player takes k matches, the second player takes 7 − k matches.
Problem 10. Let n be an integer with n ≥ 3. Consider all dissections of a convex n-gon into
triangles by n − 3 non-intersecting diagonals, and all colourings of the triangles with black and
white so that triangles with a common side are always of a dierent colour. Find the least
possible number of black triangles.
The answer is n−1 .
 
Solution 1. 3
Let f (n) denote the minimum number of black triangles in an n-gon. It is clear that f (3) = 0
and that f (n) is at least 1 for n = 4, 5, 6. It is easy to see that for n = 4, 5, 6 there is a coloring
with only one black triangle, so f (n) = 1 for n = 4, 5, 6.
First we prove by induction that f (n) ≤ b n−1 3 c. The case for n = 3, 4, 5 has already been
established. Given an (n + 3)-gon, draw a diagonal that splits it into an n-gon and a 5-gon.
Color the n-gon with at most b n−1 3 c black triangles. We can then color the 5-gon compatibly
with only one black triangle so f (n + 3) ≤ b n−1 3 c+1=b
n+3−1
3 c.
Now we prove by induction that f (n) ≥ b 3 c. The case for n = 3, 4, 5 has already been
n−1

established. Given an (n + 3)-gon, we color it with f (n + 3) black triangles and pick one of the
black triangles. It separates theree polygons from the (n + 3)-gon, say an (a + 1)-gon, (b + 1)-gon
and a (c + 1)-gon such that n + 3 = a + b + c. We write rm for the remainder of the integer m
when divided by 3. Then
f (n + 3) ≥ f (a + 1) + f (b + 1) + f (c + 1) + 1
jak  b  j c k
≥ + + +1
3 3 3
a − ra b − rb c − rc
= + + +1
3 3 3
n + 3 − 1 − rn 4 + rn − (ra + rb + rc )
= +
 3  3
n+3−1 4 + rn − (ra + rb + rc )
= + .
3 3
Since 0 ≤ rn , ra , rb , rc ≤ 2, we have that 4 + rn − (ra + rb + rc ) ≥ 4 + 0 − 6 = −2. But since this
number is divisible by 3, it is in fact ≥ 0. This completes the induction.
Solution 2. Call two triangles neighbours if they have a common side. Let the dissections of
convex n-gons together with appropriate colourings be called n-colourings.
Observe that all triangles of an arbitrary n-colouring can be listed, starting with an arbitrary
triangle and always continuing the list by a triangle that is a neighbour to some triangle already
6 BALTIC WAY 2010

in the list. Indeed, suppose that some triangle ∆ is missing from the list. Choose a point A
inside a triangle in the list, as well as a point D inside ∆. By convexity, the line segment AD
is entirely inside the polygon. As the vertices of the triangles are vertices of the polygon, AD
crosses the sides of the triangles only outside their vertices. Hence any consecutive triangles
that AD passes through are neighbours. The rst triangle that ray AD visits and that is not in
the list is one that the list can be continued with.
Consider such a list of all triangles that starts with a white triangle. Each triangle has at
most three neighbours and each black triangle has at least one neighbour occurring in the list
before it. Thus at most two neighbours of any black triangle are following it in the list. Each
white triangle except for the rst one is a neighbour of some triangle preceding it in the list,
and according to the construction, that triangle is black. Hence among all triangles except
for the rst one, there are at most twice as many white triangles as there are black triangles.
Altogether, this means w ≤ 2b + 1 where b and w are the numbers of black and white triangles
in the construction, respectively. Observe that this formula holds also if there are no white
triangles.
Hence there  are at most 3b + 1 triangles altogether, i.e., n − 2 ≤ 3b + 1. In integers, this
implies b ≥ n3 − 1 which is equivalent to b ≥ n−1 .
 
3
This number of black triangles can be achieved as follows. Number all vertices of the polygon
by 0 through n − 1.
If n = 3k, k ∈ N+ , then draw diagonals (0, 3i − 1), (3i − 1, 3i + 1), (3i + 1, 0) for all
i = 1, . . . , k − 1. Colour black every triangle whose vertices are 0, 3i − 1 and 3i + 1 for some
i = 1, . . . , k − 1.
If n = 3k − 1 or n = 3k − 2 then take a described 3k-colouring and cut out 1 or 2 white
triangles, respectively (e.g., triangles with vertices 0, 1, 2 and 0, n − 1, n − 2).
Problem 11. Let ABCD be a square and let S be the point of intersection of its diagonals
AC and BD. Two circles k , k 0 go through A, C and B , D; respectively. Furthermore, k and k 0
intersect in exactly two dierent points P and Q. Prove that S lies on P Q.
Solution. It is clear that P Q is the radical axis of k and k . The power of S with respect to k is
0

−|AS| · |CS| and the power of S with respect to k 0 is −|BS| · |DS|. Because ABCD is a square,
these two numbers are clearly the same. Thus, S has the same power with respect to k and k0
and lies on the radical axis P Q of k and k0 .
Problem 12. Let ABCD be a convex quadrilateral with precisely one pair of parallel sides.
a) Show that the lengths of its sides AB , BC , CD, DA (in this order) do not form an
arithmetic progression.
b) Show that there is such a quadrilateral for which the lengths of its sides AB , BC , CD,
DA form an arithmetic progression after the order of the lengths is changed.
Solution. Assume that the lengths of the sides form an arithmetic progression with the rst
term a and the dierence d. Suppose that sides AB and CD are parallel, |AB| > |CD| and
let E be a point on AB such that |BE| = |CD|. Then |DE| = |CB| as opposite sides of a
parallelogram, so |AD| and |DE| are two non-consequent terms of the arithmetic progression
and |AD| − |DE| = ±2d. Further, |AE| = |AB| − |DC| = 2d. We get a contradiction to the
triangle inequality |AE| > ||AD| − |DE||.
We take a triangle with sides 3, 3, 2 and add a parallelogram with sides 1 and 2 on the side of
length 2 to obtain a trapezoid. Then the lengths of the sides are 1, 2, 4, 3.
Problem 13. In an acute triangle ABC , the segment CD is an altitude and H is the orthocentre.
Given that the circumcentre of the triangle lies on the line containing the bisector of the angle
DHB , determine all possible values of ∠CAB .
BALTIC WAY 2010  SOLUTIONS 7

Solution. The value is ∠CAB = 60◦ .


Denote by ` the line containing the angle bisector of DHB , and let E be the point where
the ray CD→ intersects the circumcircle of the triangle ABC again. The rays HD→ and HB →
are symmetric with respect to ` by the denition of `. On the other hand, if the circumcenter
of ABC lies on `, then the circumcircle is symmetric with respect to `. It follows that the
intersections of the rays HD→ and HB → with the circle, which are E and B , are symmetric
with respect to `. Moreover, since H ∈ `, we conclude that HE = HB .
However, as E lies on the circumcircle of ABC , we have
∠ABE = ∠ACE = 90◦ − ∠CAB = ∠HBA.
This proves that the points H and E are symmetric with respect to the line AB . Thus HB = EB
and the triangle BHE is equilateral. Finally, ∠CAB = ∠CEB = 60◦ .
Obviously the value ∠CAB = 60◦ is attained for an equilateral triangle ABC .
Problem 14. Assume that all angles of a triangle ABC are acute. Let D and E be points on
the sides AC and BC of the triangle such that A, B, D, and E lie on the same circle. Further
suppose the circle through D, E , and C intersects the side AB in two points X and Y . Show
that the midpoint of XY is the foot of the altitude from C to AB .
Solution. We write the power of the point A with respect to the circle γ trough D, E , and C :
|AX||AY | = |AD||AC| = |AC|2 − |AC||CD|.
Similarly, if we calculate the power of B with respect to γ we get
|BX||BY | = |BC|2 − |BC||CE|.
We have also that |AC||CD| = |BC||CE|, the power of the point C with respect to the circle
through A, B, D, and E . Further if M is the middle point of XY then
|AX||AY | = |AM |2 − |XM |2 and |BX||BY | = |BM |2 − |XM |2 .
Combining the four displayed identities we get
|AM |2 − |BM |2 = |AC|2 − |BC|2 .
By the theorem of Pythagoras the same holds for the point H on AB such that CH is the
altitude of the triangle ABC . Then since H lies on the side AB we get
|AB|(|AM |−|BM |) = |AM |2 −|BM |2 = |AC|2 −|BC|2 = |AH|2 −|BH|2 = |AB|(|AH|−|BH|).
We conclude that M = H .
Problem 15. The points M and N are chosen on the angle bisector AL of a triangle ABC
such that ∠ABM = ∠ACN = 23◦ . X is a point inside the triangle such that BX = CX and
∠BXC = 2∠BM L. Find ∠M XN .
Solution. Answer: ∠M XN = 2∠ABM = 46◦ .
Let ∠BAC = 2α. The triangles ABM and ACN are similar, therefore ∠CN L = ∠BM L =
α + 23◦ . Let K be the midpoint of the arc BC of the circumcircle of the triangle ABC . Then
K belongs to the the line AL and ∠KBC = α. Both X and K belong to the perpendicular
bisector of the segment BC , hence ∠BXK = 12 ∠BXC = ∠BM L, so the quadrilateral BM XK
is inscribed. Then
∠XM N = ∠XBK = ∠XBC + ∠KBC = (90◦ − ∠BM L) + α = 90◦ − (∠BM L − α) = 67◦ .
Analogously we have ∠CXK = 12 ∠BXC = ∠CN L, therefore the quadrilateral CXN K
is inscribed also and ∠XN M = ∠XCK = 67◦ . Thus, the triangle M XN is equilateral and
8 BALTIC WAY 2010

∠M XN = 180◦ − 2 · 67◦ = 46◦ .


A

M X

N
B C
L

Problem 16. For a positive integer k, let d(k) denote the number of divisors of k (e.g. d(12) = 6)
and let s(k) denote the digit sum of k (e.g. s(12) = 3). A positive integer n is said to be amusing
if there exists a positive integer k such that d(k) = s(k) = n. What is the smallest amusing odd
integer greater than 1?
Solution.The answer is 9. For every k we have s(k) ≡ k (mod 9). Calculating remainders
modulo 9 we have the following table
m 0 1 2 3 4 5 6 7 8
m2 0 1 4 0 7 7 0 4 1
m6 0 1 1 0 1 1 0 1 1

If d(k) = 3, then k = p2 with p a prime, but p2 ≡ 3 (mod 9) is impossible. This shows that
3 is not an amusing number. If d(k) = 5, then k = p4 with p a prime, but p4 ≡ 5 (mod 9) is
impossible. This shows that 5 is not an amusing number. If d(k) = 7, then k = p6 with p a
prime, but p6 ≡ 7 (mod 9) is impossible. This shows that 7 is not an amusing number. To see
that 9 is amusing, note that d(36) = s(36) = 9.
Problem 17. Find all positive integers n such that the decimal representation of n2 consists of
odd digits only.
Solution. The only such numbers are n = 1 and n = 3.
If n is even, then so is the last digit of n2 . If n is odd and divisible by 5, then n = 10k + 5 for
some integer k ≥ 0 and the second-to-last digit of n2 = (10k + 5)2 = 100k2 + 100k + 25 equals 2.
Thus we may restrict ourselves to numbers of the form n = 10k ± m, where m ∈ {1, 3}. Then
n2 = (10k ± m)2 = 100k 2 ± 20km + m2 = 20k(5k ± m) + m2
and since m2 ∈ {1, 9}, the second-to-last digit of n2 is even unless the number 20k(5k − m) is
equal to zero. We therefore have n2 = m2 so n = 1 or n = 3. These numbers indeed satisfy the
required condition.
Problem 18. Let p be a prime number. For each k, 1 ≤ k ≤ p − 1, there exists a unique integer
denoted by k−1 such that 1 ≤ k−1 ≤ p − 1 and k−1 · k ≡ 1 (mod p). Prove that the sequence
1−1 , 1−1 + 2−1 , 1−1 + 2−1 + 3−1 , ..., 1−1 + 2−1 + · · · + (p − 1)−1
(addition modulo p) contains at most (p + 1)/2 distinct elements.
BALTIC WAY 2010  SOLUTIONS 9

Solution.Calculating modulo p we have that (p − k)k−1 = −1 so (p − k)−1 = −k−1 . If p is odd,


2 and it follows that
we set m = p−1
p−1
X m
X
k −1 = k −1 + (p − k)−1 = 0.


k=1 k=1
For ` such that m < ` < p − 1 we calculate the `-th term in the sequence
`
X `
X p−1
X p−1
X p−`−1
X p−`−1
X
−1 −1 −1 −1 −1
k = k − k =− k =− (p − k) = k −1
k=1 k=1 k=1 k=`+1 k=1 k=1
and see that it is equal to one of the rst m − 1 terms in the sequence. We conclude that there
are at most m + 1 = p+1 2 distinct terms in the sequence (the rst m and the last one).
If p is the even prime 2, then the sequence contains only one term 1, and 1 < (2 + 1)/2.
Problem 19. For which k do there exist k pairwise distinct primes p1 , p2 , . . . , pk such that
p21 + p22 + · · · + p2k = 2010?
Solution.We show that it is possible only if k = 7.
The 15 smallest prime squares are:
4, 9, 25, 49, 121, 169, 289, 361, 529, 841, 961, 1369, 1681, 1849, 2209.
Since 2209 > 2010 we see that k ≤ 14.
Now we note that p2 ≡ 1 mod 8 if p is an odd prime. We also have that 2010 ≡ 2 mod 8. If
all the primes are odd, then writing the original equation modulo 8 we get
k·1≡2 mod 8
so either k = 2 or k = 10.
k = 2 : As 2010 ≡ 0 mod 3 and x2 ≡ 0 or x2 ≡ 1 mod 3 we conclude that p1 ≡ p2 ≡ 0
mod 3. But that is impossible.
k = 10 : The sum of rst 10 odd prime squares is already greater than 2010 (961 + 841 +
529 + · · · > 2010) so this is impossible.
Now we consider the case when one of the primes is 2. Then the original equation modulo 8
takes the form
4 + (k − 1) · 1 ≡ 2 mod 8
so k ≡ 7 mod 8 and therefore k = 7.
For k = 7 there are 4 possible solutions:
4 + 9 + 49 + 169 + 289 + 529 + 961 = 2010,
4 + 9 + 25 + 121 + 361 + 529 + 961 = 2010,
4 + 9 + 25 + 49 + 121 + 841 + 961 = 2010,
4 + 9 + 49 + 121 + 169 + 289 + 1369 = 2010.
Finding them should not be too hard. We are already asuming that 4 is included. Considera-
tions modulo 3 show that 9 must also be included. The square 1681 together with the 6 smallest
prime squares gives a sum already greater than 2010, so only prime squares up to 372 = 1369 can
be considered. If 25 is included, then for the remaining 4 prime squares considerations modulo
10 one can see that 3 out of 4 prime squares from {121, 361, 841, 961} have to be used and two of
four cases are successful. If 25 is not included, then for the remaining 5 places again from con-
siderations modulo 10 one can see, that 4 of them will be from the set {49, 169, 289, 529, 1369}
and two out of ve cases are successful.
10 BALTIC WAY 2010

Problem 20. Determine all positive integers n for which there exists an innite subset A of
the set N of positive integers such that for all pairwise distinct a1 , . . . , an ∈ A the numbers
a1 + · · · + an and a1 · · · an are coprime.
Solution. For n = 1 the statement is obviously false. We assert that it is true for all n > 1.
We rst consider the sequence x0 , x1 , . . . of positive integers which is recursively dened by
x0 = n and xk+1 = (x0 + · · · + xk )! + 1 for k ≥ 0. We claim that the set A := {xk | k ≥ 1}
satises the condition.
Suppose the contrary that there exist 1 ≤ i1 < · · · < in such that xi1 + · · · + xin and xi1 · · · xin
have a common prime factor p. Then there exist a j ∈ {1, . . . , n} such that p | xij . From the
denition of the sequence (x1 , x2 , . . . ) we get xk ≡ 1 (mod p) for every integer k > ij . This
implies p | xi1 + . . . xij−1 + n − j =: S . Because of S > 0 and S ≤ x0 + · · · + xij −1 we have
p | (x0 + · · · + xij −1 )! = xij − 1 which contradicts p | xij .
Thus, for every pairwise distinct a1 , . . . , an ∈ A the numbers a1 + · · · + an and a1 · · · an are
indeed coprime.
Baltic Way 2011 Algebra A-1
Algebra
A-1 DEN
The real numbers x1 , . . . , x2011 satisfy

x1 + x2 = 2x′1 , x2 + x3 = 2x′2 , ..., x2011 + x1 = 2x′2011

where x′1 , x′2 , . . . , x′2011 is a permutation of x1 , x2 , . . . , x2011 . Prove that x1 = x2 = · · · = x2011 .

Solution 1 For convenience we call x2011 also x0 . Let k be the largest of the numbers
x1 , . . . , x2011 , and consider an equation xn−1 + xn = 2k, where 1 ≤ n ≤ 2011. Hence we
get 2 max(xn−1 , xn ) ≥ xn−1 + xn = 2k, so either xn−1 or xn , say xn−1 , satisfies xn−1 ≥ k. Since
also xn−1 ≤ k, we then have xn−1 = k, and then also xn = 2k − xn−1 = 2k − k = k. That is,
in such an equation both variables on the left equal k. Now let E be the set of such equations,
and let S be the set of subscripts on the left of these equations. From xn = k ∀n ∈ S we get
|S| ≤ |E|. On the other hand, since the total number of appearances of these subscripts is 2|E|
and each subscript appears on the left in no more than two equations, we have 2|E| ≤ 2|S|.
Thus 2|E| = 2|S|, so for each n ∈ S the set E contains both equations with the subscript n
on the left. Now assume 1 ∈ S without loss of generality. Then the equation x1 + x2 = 2k
belongs to E, so 2 ∈ S. Continuing in this way we find that all subscripts belong to S, so
x1 = x2 = · · · = x2011 = k.

Solution 2 Again we call x2011 also x0 . Taking the square on both sides of all the equations
and adding the results, we get

X
2011 X
2011 X
2011
2
(xn−1 + xn ) = 4 x′2
n =4 x2n ,
n=1 n=1 n=1

which can be transformed with some algebra into

X
2011
(xn−1 − xn )2 = 0 .
n=1

Hence the assertion follows.

7
Baltic Way 2011 Algebra A-2
A-2 NOR
Let f : Z → Z be a function such that, for all integers x and y, the following holds:

f (f (x) − y) = f (y) − f (f (x)).

Show that f is bounded, i.e. that there is a constant C such that

−C < f (x) < C

for all integers x.

First, setting y = f (x) one obtains f (0) = 0. Secondly y = 0 yields f (f (x)) = 0 for all x, thus

f (f (x) − y) = f (y).

Setting x = 0 yields f (−y) = f (y), and finally y := −z yields

f (f (x) + z) = f (−z) = f (z).

If f (x) = 0 for all x, then f is obviously bounded. If on the other hand there exists an x0 such
that f (x0 ) 6= 0, then, with x = x0 , the last equality gives that f is periodic with period |f (x0 )|,
and thus f must be bounded.

8
Baltic Way 2011 Algebra A-3
A-3 NOR
A sequence a1 , a2 , a3 , . . . of non-negative integers is such that an+1 is the last digit of ann + an−1
for all n > 2. Is it always true that for some n0 the sequence an0 , an0 +1 , an0 +2 , . . . is periodic?

Since for n > 2, we actually consider the sequence mod 10, and ϕ(10) = 4, we have that the
recursive formula itself has a period of 4. Furthermore, the subsequent terms of the sequence
are uniquely determined by two consecutive terms. Therefore if there exist integers n0 > 2 and
k > 0 such that an0 = an0 +4k and an0 +1 = an0 +4k+1 , then the sequence is periodic from an0 on
with period 4k. Consider the pairs (a2+4j , a3+4j ) for 0 ≤ j ≤ 100. Since there are at most 100
possible different amongst these, there have to exist 0 ≤ j1 < j2 ≤ 100 such that a2+4j1 = a2+4j2
and a3+4j1 = a3+4j2 . Choosing n0 := 2 + 4j1 we are done.
Remark: Note, that if a1 , a2 both are between 0 and 9, then the recursion is invertible and the
sequence can be extended to the left. By invertibility it then follows that the original sequence
is actually periodic with the choice n0 = 1. Similar arguments show, that in general, n0 can be
chosen to be 3.

9
Baltic Way 2011 Algebra A-4
A-4 RUS
Let a, b, c, d be non-negative reals such that a + b + c + d = 4. Prove the inequality

a b c d 4
+ 3 + 3 + 3 ≤ .
a3 +8 b +8 c +8 d +8 9


By the means inequality we have a3 + 2 = a3 + 1 + 1 ≥ 3 a3 · 1 · 1 = 3a. Therefore it is
3

sufficient to prove the inequality

a b c d 4
+ + + ≤ .
3a + 6 3b + 6 3c + 6 3d + 6 9

We can write the last inequality in the form

1 1 1 1 4
+ + + ≥ .
a+2 b+2 c+2 d+2 3

Now it follows by the harmonic and arithmetic means inequality:

1 1 1 1 1  4 4 1
+ + + ≥ = = .
4 a+2 b+2 c+2 d+2 (a + 2) + (b + 2) + (c + 2) + (d + 2) 4+2+2+2+2 3

10
Baltic Way 2011 Algebra A-5
A-5 SAF
Let f : R → R be a function such that

f (f (x)) = x2 − x + 1

for all real numbers x. Determine f (0).

Let f (0) = a and f (1) = b.


Then f (f (0)) = f (a).
But f (f (0)) = 02 − 0 + 1 = 1. So f (a) = 1. (1)
Also f (f (1)) = f (b).
But f (f (1)) = 12 − 1 + 1 = 1. So f (b) = 1. (2)
From (1), f (f (a)) = f (1).
But f (f (a)) = a2 − a + 1. So a2 − a + 1 = b. (3)
From (2), f (f (b)) = f (1), giving b2 − b + 1 = b. So b = 1.
Putting b = 1 in (3) gives a = 0 or 1.
But a = 0 ⇒ f (0) = 0 ⇒ f (f (0)) = 0, contradicting (1).
So a = 1, i.e. f (0) = 1.

11
Baltic Way 2011 Combinatorics C-1
Combinatorics
C-1 FIN
Let n be a positive integer. Prove that the number of lines which go through the origin and
2
precisely one other point with integer coordinates (x, y), 0 ≤ x, y ≤ n, is at least n4 .

Let n′ = [n/2] be the largest integer satisfying n′ ≤ n/2. We solve the problem with n2 − 3n′2
instead of n2 /4, which is exactly what we are supposed to do if n is even and slighly better
than our original goal if n is odd.

A point is called relevant if both of its coordinates are integers between 1 and n, inclusively. A
relevant point is called tiny if both of its coordinates are at most n′ and large otherwise. Note
that there are n′2 tiny points. A line through the origin is called vicious if contains at least two
relevant points.

Consider any vicious line ℓ. Suppose that ℓ passes through exactly k vicious points and that
P = (x, y) is that one among them that is closest to the origin. Defining Pi = (x · i, y · i) for all
integers i, the relevant points on ℓ are P1 , P2 , . . . , Pk . Since k ≥ 2, it follows that P = P1 itself
is tiny. Now let k ′ denote that positive integer for which P1 , P2 , . . . , Pk′ are the tiny points on ℓ,
whereasPk′ +1 , . . . , Pk are the large points on ℓ. Since Pk′ +1 is not tiny, the point P2(k′ +1) cannot
be relevant, for which reason k ≤ 2k ′ + 1; in particular, it follows that k ≤ 3k ′ .

Summing the inequality just obtained over all vicious lines, we learn that the number of all
relevant points lying on vicious lines is at most three times the number of all tiny points, i.e.
at most 3n′2 . Thus there are at least n2 − 3n′2 relevant points not belonging to any vicious line.
As expained in the beginning, this solves the problem.

12
Baltic Way 2011 Combinatorics C-2
C-2 GER
Let T denote the 15-element set {10a + b : a, b ∈ Z, 1 ≤ a < b ≤ 6}. Let S be a subset of T in
which all six digits 1, 2, . . . , 6 appear and in which no three elements together use all these six
digits. Determine the largest possible size of S.

Consider the numbers of T , which contain 1 or 2. Certainly, no 3 of them can contain all 6
digits and all 6 digits appear. Hence n ≥ 9.
Consider the partitions:
12, 36, 45,

13, 24, 56,

14, 26, 35,

15, 23, 46,

16, 25, 34.

Since every row is a partition of {1, 2, . . . , 6}, it contains all 6 digits, S can contain at most two
numbers of each of the 5 rows, i.e. n ≤ 10.
Now we will prove that n = 9 is the correct number. Therefore we assume that n = 10 and
will exclude this case by contradiction. Certainly, there is a digit, say 1, which does not appear
at least twice (otherwise at most 3 numbers are missing in S) and at most 4 times (otherwise
this digit does not appear in the members of S at all). Obviously, every row of the above set of
partitions contains exactly 2 members of S. W.l.o.g. assume that 12, 13 6∈ S and 16 ∈ S. Then
consider the following partitions, where bold-faced numbers are members of S and numbers in
italics are not:
12 , 36, 45,

13 , 24, 56,

14, 26, 35,

15, 23, 46,

16, 25, 34.

By 16, 45 ∈ S it follows 23 6∈ S and by 24, 36 ∈ S it follows 15 6∈ S. Now S is missing at least


2 members (15,23) of the partition 15, 23, 46, which is a contradiction.

13
Baltic Way 2011 Combinatorics C-3
C-3 GER
In Greifswald there are three schools called A, B and C, each of which is attended by at least
one student. Among any three students, one from A, one from B and one from C, there are two
knowing each other and two not knowing each other. Prove that at least one of the following
holds:
• Some student from A knows all students from B.
• Some student from B knows all students from C.
• Some student from C knows all students from A.

Assume the contrary and let a be a student from A knowing as many students from B as
possible. As a does not know all students from B, there is a student b from B not known to
a. Similarly, we may pick a student c from C not known to b and then a student a′ from A
not known to c. Applying the assumption to the sets of students {a, b, c} and {a′ , b, c}, we
learn that a and c know each other other, and so do a′ and b. As b knows a′ but not a, we
have a 6= a′ . Moreover, the maximality condition imposed on a tells us that some student b′
from B is known to a but not to a′ . Now if b′ and c knew each other, then any two students
from {a, b′ , c} would know one another, which is not possible. Thus b′ and c do not know each
other, but this means that no two students from {a′ , b′ , c} know one another, which is likewise
impossible. Thereby the problem is solved.

14
Baltic Way 2011 Combinatorics C-4
C-4 GER
Given a rectangular grid, split into m × n squares, a colouring of the squares in two colours
(black and white) is called valid if it satisfies the following conditions:
• All squares touching the border of the grid are coloured black.
• No four squares forming a 2 × 2-square are coloured in the same colour.
• No four squares forming a 2 × 2-square are coloured in such a way that only diagonally
touching squares have the same colour.
Which grid sizes m × n (with m, n ≥ 3) have a valid colouring?

There exist a valid colouring iff n or m is odd.


Proof. If, without loss of generality, the number of rows is odd, colour every second row black,
as well as the boundary, and all other squares white. It is easy to check that this coloring is
valid.
If both n and m are even, there is no valid coloring. To prove this, consider the following graph
G: The vertices are the squares, and edges are drawn between two diagonally adjacent squares
A and B iff the two other squares touching both A and B at a side have the same color.
This graph of a valid coloring has the following properties:
• The corner squares have degree 1.
• Squares at a side of the grid have degree 0 or 2.
• Squares in the middle have degree 0, 2 or 4.
• The “forbidden patterns” are equivalent to the statement that no two edges of the graph
are intersecting.
• If you put a checkboard pattern on the grid, no edge connects squares of different colours.
• Hence, if m and n are even, the corner squares sharing a side of the grid are in different
connected components of the graph.
• Since the sum of degrees in each connected component is even, the opposing corner-squares
have to be in the same connected component.
• Hence, there is a path from each corner to the opposing one.
But those two paths can not exist without intersecting, thus some forbidden pattern exists
always, i.e. there is no valid colouring.

15
Baltic Way 2011 Combinatorics C-5
C-5 RUS
Two persons play the following game with integers. The initial number is 20112011 . The players
move in turns. Each move consists of subtraction of an integer between 1 and 2010 inclusive,
or division by 2011, rounding down to the closest integer when necessary. The player who first
obtains a non-positive integer wins. Which player has a winning strategy?

Answer: the second player wins.


Though the problem is taken from the recent article (A. Guo. Winning strategies for aperiodic
subtraction games // arXiv: 1108.1239v2), it could be known for the smaller numbers, say, for
2 instead of 2011.
The initial numbers N for which the second player has a winning strategy are those ones that
have odd numbers of trailing 0’s in base 2011 (i.e. if the biggest power of 2011 that divides N
is odd). The main difficulty of the problem is to invent this answer. The proof is trivial: each
move of the first player makes this biggest power to be even, and after that the second player
can make this power odd by a suitable move.

16
Baltic Way 2011 Geometry G-1
Geometry
G-1 FIN
Let AB and CD be two diameters of the circle C. For an arbitrary point P on C, let R and S
be the feet of the perpendiculars from P to AB and CD, respectively. Show that the length of
RS is independent of the choice of P .

Solution. Let O be the centre of C. Then P , R, S, and O are points on a circle C ′ with diameter
OP , equal to the radius of C. The segment RS is a chord in this circle subtending the angle
BOD or a supplementary angle. Since the angle as well as radius of C ′ are independent of P ,
so is RS.

D b b
P

S b

b b b b

A O R B

17
Baltic Way 2011 Geometry G-2
G-2 DEN
Let P be a point inside a square ABCD such that P A : P B : P C is 1 : 2 : 3. Determine the
angle ∠BP A.

First Solution. Rotate the triangle ABP by 90◦ around B such that A goes to C and P is
mapped to a new point Q. Then ∠P BQ = ∠P BC + ∠CBQ = ∠P BC + ∠ABP = 90◦ . Hence
the triangle P BQ is an isosceles right-angled triangle, and ∠BQP = 45◦ . By Pythagoras
P Q2 = 2P B 2 = 8AP 2 . Since CQ2 + P Q2 = AP 2 + 8AP 2 = 9AP 2 = P C 2 , by the converse
Pythagoras P QC is a right-angled triangle, and hence

∠BP A = ∠BQC = ∠BQP + ∠P QC = 45◦ + 90◦ = 135◦ .

A B
b b

P 45◦

b
Q

b b

D C

Second Solution. Let X and Y be the feet of the perpendiculars drawn from A and C to P B.
Put x = AX and y = XP . Suppose without loss of generality that P A = 1, P B = 2, and
P C = 3. Since the right angled triangles ABX and BCY are congruent, we have BY = x and
CY = 2 + y. Applying Pythagoras’ Theorem to the triangles AP X and P Y C, we get

x2 + y 2 = 1 and (2 − x)2 + (2 + y)2 = 9.

Substituting the former equation into the latter, we infer x = y, which in turn discloses
∠BP A = 135◦ .

A B
b b
b
x x
b
b
Y
yP
X

b b

D C

18
Baltic Way 2011 Geometry G-3
G-3 DEN
Let E be an interior point of the convex quadrilateral ABCD. Construct triangles △ABF ,
△BCG, △CDH and △DAI on the outside of the quadrilateral such that the similarities
△ABF ∼ △DCE, △BCG ∼ △ADE, △CDH ∼ △BAE and △DAI ∼ △CBE hold. Let P ,
Q, R and S be the projections of E on the lines AB, BC, CD and DA, respectively. Prove
that if the quadrilateral P QRS is cyclic, then

EF · CD = EG · DA = EH · AB = EI · BC .

Solution. We consider oriented angles modulo 180◦ . From the cyclic quadrilaterals AP ES,
BQEP , P QRS, CREQ, DSER and △DCE ∼ △ABF we get

∠AEB = ∠EAB + ∠ABE = ∠ESP + ∠P QE


= ∠ESR + ∠RSP + ∠P QR + ∠RQE
= ∠ESR + ∠RQE = ∠EDC + ∠DCE
= ∠DEC = ∠AF B ,

so the quadrilateral AEBF is cyclic. By Ptolemy we then have

EF · AB = AE · BF + BE · AF .

This transforms by AB : BF : AF = DC : CE : DE into

EF · CD = AE · CE + BE · DE .
F

A
P
B

E
S Q G

I
C
R
D

Since the expression on the right of this equation is invariant under cyclic permutation of the
vertices of the quadrilateral ABCD, the asserted equation follows immediately.

19
Baltic Way 2011 Geometry G-4
G-4 POL
The incircle of a triangle ABC touches the sides BC, CA, AB at D, E, F , respectively. Let
G be a point on the incircle such that F G is a diameter. The lines EG and F D intersect at
H. Prove that CH k AB.

Solution. We work in the opposite direction. Suppose that H ′ is the point where DF intersect
the line through C parallel to AB. We need to show that H ′ = H. For this purpose it suffices
to prove that E, G, H ′ are collinear, which reduces to showing that if G′ 6= E is the common
point of EH ′ and the incircle, then G′ = G.
6
C H

E D

A F B

Note that H ′ and B lie on the same side of AC. Hence CH ′ k AB gives ∠ACH ′ = 180◦ −∠BAC.
Also, some homothety with center D maps the segment BF to the segment CH ′ . Thus the
equality BD = BF implies that CH ′ = CD = CE, i.e. the triangle ECH ′ is isosceles and

∠H ′ EC = 12 (180◦ − ∠ECH ′ ) = 12 ∠BAC.

But G′ and H ′ lie on the same side of AC, so ∠G′ EC = ∠H ′ EC and consequently

∠G′ F E = ∠G′ EC = ∠H ′ EC = 12 ∠BAC

so that
∠G′ F A = ∠G′ F E + ∠EF A = 12 ∠BAC + 12 (180◦ − ∠F AE) = 90◦ .

Hence F G′ is a diameter of the incircle and the desired equality G′ = G follows.

Remark. A similar proof also works in the forward direction: one may compute ∠EHD =
1
2
∠ACB. Hence H lies on the circle centred at C that passes through D and E. Consequently
the triangle EHC is isosceles, wherefore

∠ECH = 180◦ − 2∠GEC = 180◦ − ∠BAC.

Thus the lines AB and CH are indeed parallel.

20
Baltic Way 2011 Geometry G-5
G-5 POL
Let ABCD be a convex quadrilateral such that ∠ADB = ∠BDC. Suppose that a point E on
the side AD satisfies the equality

AE · ED + BE 2 = CD · AE.

Show that ∠EBA = ∠DCB.

Solution. Let F be the point symmetric to E with respect to the line DB. Then the equality
∠ADB = ∠BDC shows that F lies on the line DC, on the same side of D as C. Moreover, we
have AE · ED < CD · AE, or F D = ED < CD, so in fact F lies on the segment DC.

D
F

E
C

A B

Note now that triangles DEB and DF B are congruent (symmetric with respect to the line
DB), so ∠AEB = ∠BF C. Also, we have

BE 2 = CD · AE − AE · ED = AE · (CD − ED) = AE · (CD − F D) = AE · CF.

Therefore
BE CF CF
= = .
AE BE BF
This shows that the triangles BEA and CF B are similar, which gives ∠EBA = ∠F CB =
∠DCB, as desired.

21
Baltic Way 2011 Number Theory N-1
Number Theory
N-1 DEN
Let a be any integer. Define the sequence x0 , x1 , . . . by x0 = a, x1 = 3 and

xn = 2xn−1 − 4xn−2 + 3 for all n > 1.

Determine the largest integer ka for which there exists a prime p such that pka divides x2011 − 1.

Let yn = xn − 1. Hence

yn = xn −1 = 2(yn−1 +1)−4(yn−2 +1)+3−1 = 2yn−1 −4yn−2 = 2(2yn−2 −4yn−3 )−4yn−2 = −8yn−3

for all n > 2. Hence

x2011 − 1 = y2011 = −8y2008 = · · · = (−8)670 y1 = 22011 .

Hence k = 2011.

22
Baltic Way 2011 Number Theory N-2
N-2 DEN
Determine all positive integers d such that whenever d divides a positive integer n, d will also
divide any integer obtained by rearranging the digits of n.

Answer: d = 1, d = 3 or d = 9. It is known that 1, 3 and 9 have the given property. Assume


that d is a k digit number such that whenever d divides an integer n, d will also divide any
integer m having the same digits as n . Then there exists a k + 2 digit number 10a1 a2 . . . ak
which is divisible by d. Hence a1 a2 · · · ak 10 and a1 a2 · · · ak 01 are also divisible by d. Since
a1 a2 · · · ak 10 − a1 a2 · · · ak 01 = 9, d divides 9, and hence d = 1, d = 3 or d = 9 as stated.

23
Baltic Way 2011 Number Theory N-3
N-3 GER
Determine all pairs (p, q) of primes for which both p2 + q 3 and q 2 + p3 are perfect squares.

Answer. There is only one such pair, namely (p, q) = (3, 3).

Proof. Let the pair (p, q) be as described in the statement of the problem.

1.) First we show that p 6= 2. Otherwise, there would exist a prime q for which q 2 + 8 and
q 3 + 4 are perfect squares. Because of q 2 < q 2 + 8, the second condition gives (q + 1)2 6 q 2 + 8
and hence q 6 3. But for q = 2 or q = 3 the expression q 3 + 4 fails to be a perfect square.
Hence indeed p 6= 2 and due to symmetry we also have q 6= 2.

2.) Next we consider the special case p = q. Then p2 (p + 1) is a perfect square, for which
reason there exists an integer n satisfying p = n2 − 1 = (n + 1)(n − 1). Since p is prime, this
factorization yields n = 2 and thus p = 3. This completes the discussion of the case p = q.

3.) So from now on we may suppose that p and q are distinct odd primes. Let a be a positive
integer such that p2 + q 3 = a2 , i.e. q 3 = (a + p)(a − p). If both factors a + p and a − p were
divisible by q, then so were their difference 2p, which is absurd. So by uniqueness of prime
factorization we have a+p = q 3 and a−p = 1. Subtracting these equations we learn q 3 = 2p+1.
Due to symmetry we also have p3 = 2q + 1. Now if p < q, then q 3 = 2p + 1 < 2q + 1 = p3 ,
which gives a contradiction, and the case q < p is excluded similarly.

Thereby the problem is solved.

24
Baltic Way 2011 Number Theory N-4
N-4 FIN
Let p 6= 3 be a prime number. Show that there is a non-constant arithmetic sequence of positive
integers x1 , x2 , . . . , xp such that the product of the terms of the sequence is a cube.

Let a1 , a2 , . . . , ap be any arithmetic sequence of positive integers and let P be the product of
the terms of this sequence. For any n, the sequence P n a1 , P n a2 , . . . , P n ap is also arithmetic,
and the product of terms is P np+1 . Now either p ≡ 1 mod 3 or p ≡ −1 mod 3. In the former
case, 2p + 1 = 3q for some q and in the latter case, 1p + 1 = 3q for some q. So we can choose
either xi = P 2 ai or xi = P ai to obtain the sequence we are looking for.

25
Baltic Way 2011 Number Theory N-5
N-5 POL
An integer n ≥ 1 is called balanced if it has an even number of distinct prime divisors. Prove
that there exist infinitely many positive integers n such that there are exactly two balanced
numbers among n, n + 1, n + 2 and n + 3.

We argue by contradiction. Choose N so large that no n ≥ N obeys this property. Now we


partition all integers ≥ N into maximal blocks of consecutive numbers which are either all
balanced or not. We delete the first block from the following considerations, now starting from
N ′ > N . Clearly, by assumption, there cannot meet two blocks with length ≥ 2. It is also
impossible that there meet two blocks of length 1 (remember that we deleted the first block).
Thus all balanced or all unbalanced blocks have length 1. All other blocks have length 3, at
least.

Case 1: All unbalanced blocks have length 1.


We take an unbalanced number u > 2N ′ + 3 with u ≡ 1 (mod 4) (for instance u = p2 for an
odd prime p). Since all balanced blocks have length ≥ 3, u − 3, u − 1, and u + 1 must be
balanced. This implies that (u − 3)/2 is unbalanced, (u − 1)/2 is balanced, and (u + 1)/2 is
again unbalanced. Thus {(u − 1)/2} is an balanced block of length 1 — contradiction.

Case 2: All balanced blocks have length 1.


Now we take a balanced number b > 2N ′ + 3 with b ≡ 1 (mod 4) (for instance b = p2 q 2 for dis-
tinct odd primes p, q). By similar arguments, (b − 3)/2 is balanced, (b − 1)/2 is unbalanced, and
(b + 1)/2 is again balanced. Now the balanced block {(b − 1)/2} gives the desired contradiction.

26
Problems and Solutions
Problem 1 –SPB–
The numbers from 1 to 360 are partitioned into 9 subsets of consecutive integers and
the sums of the numbers in each subset are arranged in the cells of a 3 × 3 square.
Is it possible that the square turns out to be a magic square?
Remark: A magic square is a square in which the sums of the numbers in each
row, in each column and in both diagonals are all equal.

Answer: Yes.
Solution 1. If the numbers a1 , a2 , . . . , a9 form a 3 × 3 magic square, then the
numbers a1 + d, a2 + d, . . . , a9 + d form a 3 × 3 magic square, too. Hence it is
sufficient to divide all the numbers into parts with equal numbers of elements: i.e.
from 40k + 1 to 40(k + 1), k = 0, 1, . . . , 8. Then we need to arrange the least
numbers of these parts (i.e. the numbers 1, 41, 81, . . . , 321) in the form of a magic
square (we omit here an example, it is similar to the magic square with numbers 1,
2, . . . , 9). After that all other numbers 1 + s, 41 + s, . . . , 321 + s will also form a
magic square (s = 1, . . . , 39), and so do the whole sums.
Solution 2. Distribute the numbers into nine parts 40k + 1, 40k + 2, . . . , 40k + 40,
k = 0, 2, . . . , 8. Note that the sums of these parts form an arithmetic progression:
the sums are (40k + 1 + 40k + 40) · 20 = 1600k + 820, k = 0, 1, . . . , 8. It remains
to construct a magic square of the numbers of the progression 820, 2420, . . . , 13620
as follows. Start from an initial magic square with 0, 1, . . . , 8 (or similar), multiply
all members by 1600 (this is again a magic square) and add 820 to every member
(again a magic square).

Problem 2 –FIN–
Let a, b, c be real numbers. Prove that
1
ab + bc + ca + max{|a − b|, |b − c|, |c − a|} ≤ 1 + (a + b + c)2 .
3

Solution 1. We may assume a ≤ b ≤ c, whence max{|a−b|, |b−c|, |c−a|} = c−a.


The initial inequality is equivalent to
1
c − a ≤ 1 + (a2 + b2 + c2 − ab − bc − ac)
3
which in turn is equivalent to
1
(a − c)2 + (b − c)2 + (a − b)2 .

c−a≤1+
6
q
(c−b)2 +(b−a)2 c−a
Since 2
≥ 2
, we have

3
(a − c)2 + (b − c)2 + (a − b)2 ≥ (c − a)2
2
6
Baltic Way 2012 Problems and Solutions

and hence
1 1
(a − c)2 + (b − c)2 + (a − b)2 ≥ 1 + (c − a)2 ≥ c − a

1+
6 4
as desired.
Solution 2. Assume a ≤ b ≤ c. By the well-known inequality xy + yz + zx ≤
x2 + y 2 + z 2 (it can be shown by 2xy ≤ x2 + y 2 , etc., and adding all three such
inequalities) we have

ab + bc + ca − a + c − 1 = (a + 1)b + b(c − 1) + (a + 1)(c − 1) ≤ (a + 1)2 + b2 + (c − 1)2


= a2 + b2 + c2 + 2(a − c + 1) = (a + b + c)2 − 2(ab + bc + ca + c − a − 1) (2)

or
1
ab + bc + ca + c − a ≤ 1 + (a + b + c)2 .
3
Solution 3. Assume a ≤ b ≤ c and take c = a + x, b = a + y, where x ≥ y ≥ 0.
The inequality 3(ab + bc + ca + c − a − 1) ≤ (a + b + c)2 then reduces to

x2 − xy + y 2 + 3 ≥ 3x.

The latter inequality is equivalent to the inequality


x 2 3
− y + x2 − 3x + 3 ≥ 0
2 4
which in turn is equivalent to the inequality
4 x 2
− y + (x − 2)2 ≥ 0.
3 2
Remark 1. The inequality x2 − 3x − xy + y 2 + 3 ≥ 0 can also be proven by
noticing that the discriminant of the LHS, (y + 3)2 − 4(y 2 + 3) = −3(y − 1)2 , is
non-positive. Since the quadratic polynomial in x has positive leading coefficient,
its all values are non-negative.
Remark 2. Another way to prove the inequality x2 − 3x − xy + y 2 + 3 ≥ 0 is, by
AM-GM, the following:
√ 2  3 2
√ + √y
s
√ 2  3 y
2 2x + 2 2
3x + xy = 2x √ +√ ≤
2 2 2
9 3 y2 3
= x2 + + y + = 3 + x2 + y 2 − (y − 1)2 ≤ 3 + x2 + y 2 .
4 2 4 4
Solution 4. Assume a ≤ b ≤ c and take a = b − k, c = b + l, where k, l ≥ 0. The
inequality 3(ab + bc + ca + c − a − 1) ≤ (a + b + c)2 then reduces to

k 2 + l2 + kl − 3l − 3k + 3 ≥ 0.

This is equivalent to

(k − 1)2 + (l − 1)2 + (k − 1)(l − 1) ≥ 0,

7
Problems and Solutions Baltic Way 2012

which holds, since x2 + y 2 + xy ≥ 0 for all real numbers x, y.


Remark. The inequality k 2 + l2 + kl − 3l − 3k + 3 ≥ 0 can also be proven by
separating perfect squares as
1 3
(k − l)2 + (k + l)2 − 3 · (k + l) + 3 ≥ 0
4 4
which is in turn similar to

(k − l)2 + 3(k + l − 2)2 ≥ 0.

Solution 5. Assume a ≤ b ≤ c. Expand the inequality 3(ab+bc+ca+c−a−1) ≤


(a + b + c)2 fully to obtain a2 + b2 + c2 − ab − ac − bc + 3a − 3c + 3 ≥ 0. Now fix
α ∈ R and consider the set

γ = {(a, b, c) : a2 + b2 + c2 − ab − ac − bc + 3a − 3c + 3 + α = 0}.

Note that γ is a quadric. Its invariants are


1 −1 −1 3

1 −1 −1

1 2 2 2
1 − 12 1 −1 9

2 2 − 0
δ = − 21 1 − 12 = 0, ∆ = 21 1 3 = 0, S = 3 · 1 2 = ,
− 1 − 1 1 −32 − 2 13 − 2 −2 1 4
2 2 0 − 2 3 + α
2

and
1 −1 3 1 −1 3 1 −1

0
1 2 2 1 2 2 2 9α
K = − 2 1 0 + − 2 1 − 32 + − 12 1 − 23 = .
3 3 − 3 3 + α 0 − 3 3 + α 4
2
0 3 + α 2 2 2

In the case α > 0, it is known from the theory of quadrics that the surface γ is an
imaginary elliptic cylinder (δ = ∆ = 0, S > 0, and K > 0) and therefore contains
no real points. Hence the condition a2 + b2 + c2 − ab − ac − bc + 3a − 3c + 3 + α = 0
implies that α ≤ 0, therefore

a2 + b2 + c2 − ab − ac − bc + 3a − 3c + 3 = −α ≥ 0,

as desired.
Solution 6. We start as in Solution 5: construct the quadric

γ = {(a, b, c) : a2 + b2 + c2 − ab − ac − bc + 3a − 3c + 3 + α = 0}.

Now note that the substitution



 a = 2x − y + 2z,
b= 2y + 2z,
c = −2x − y + 2z

gives (in the new coordinate system)

γ = {(x, y, z) : 12x2 + 9y 2 + 12x + 3 + α = 0}.

8
Baltic Way 2012 Problems and Solutions

 
2 −1 2
(The columns of the coefficient matrix C =  0 2 2 of the substitution are
−2 −1 2
1 − 12 − 21
 

in fact the orthogonalized eigenvectors of − 12 1 − 21 .) Since


− 12 − 21 1

12x2 + 9y 2 + 12x + 3 + α = 3(2x + 1)2 + 9y 2 + α,

it is clear that in the case α > 0, the set γ is void.


Remark 1. Solutions 5 and 6 are presented here for instructive purposes only.
Remark 2. Solutions 3, 4, and 6 suggest also general substitutions in the initial
equation that directly leave the inequality in the form of sum of squares. Let these
substitutions be mentioned here.
• Solution 3 suggests T = a−2b+c 2
, U = c − a − 2, and reduces the original
inequality to 34 T 2 + U 2 ≥ 0;

• solution 4 together with its remark suggests T = 2b − a − c, U = c − a − 2,


and reduces the original inequality to T 2 + 3U 2 ≥ 0;

• solution 6 suggests U = a−c


2
+ 1, T = −a+2b−c
6
, and reduces the original in-
2 2
equality to 3U + 9T ≥ 0.
Hence, up to scaling, all these three solutions are essentially the same.

Problem 3 –DEN–
a) Show that the equation
⌊x⌋(x2 + 1) = x3 , (3)
where ⌊x⌋ denotes the largest integer not larger than x, has exactly one real solution
in each interval between consecutive positive integers.
b) Show that none of the positive real solutions of this equation is rational.

Solution. a) Let k = ⌊x⌋ and y = x − k. Then the equation becomes

k((k + y)2 + 1) = (k + y)3 ,

which reduces to
y(k + y)2 = k .
The function f (y) = y(k + y)2 is strictly increasing in [0, 1] and continuous in the
same interval. As f (0) = 0 < k and f (1) = (k + 1)2 > k, there exists exactly one
y0 ∈ (0, 1) such that f (y0 ) = k.
b) The equation (1) has no positive integral solutions. Assume that x = k + y is
rational and let x = n/d, where n and d are relatively prime positive integers. The
given equation then becomes

k(n2 + d2 ) n3
= ,
d2 d3
9
Problems and Solutions Baltic Way 2012

or
dk(n2 + d2 ) = n3 .
Since x is not an integer, d has at least one prime divisor. It follows from the last
equation that this prime divisor also divides n, a contradiction.
Remark. In a), one can also consider the function g(y) = y(k + y)2 − k, perhaps
expand it, and, using its derivative in (0, 1), prove that g is strictly increasing in
[0, 1].

Problem 4 –POL–
Prove that for infinitely many pairs (a, b) of integers the equation

x2012 = ax + b

has among its solutions two distinct real numbers whose product is 1.

Solution 1. Observe first that for any integer m > 2 the quadratic polynomial
2
x − mx + 1 has two distinct positive roots whose product equals 1.
Moreover, for any integer m > 2 there exists a pair of integers (am , bm ) such
that the polynomial x2012 − am x − bm is divisible by the polynomial x2 − mx + 1.
Indeed, dividing the monomial x2012 by the monic polynomial x2 − mx + 1 we get a
remainder Rm (x) which is a polynomial with integer coefficients and degree at most
1. Thus Rm (x) = am x + bm for some integers am and bm , which clearly meet our
demand.
Now, for a fixed m > 2, any root of the polynomial x2 − mx + 1 is also a root
of the polynomial x2012 − am x − bm . Therefore the set of solutions of the equation
x2012 = am x + bm contains the two distinct roots of the polynomial x2 − mx + 1,
whose product is equal to 1. This means that the pair (a, b) = (am , bm ) has the
required property.
It remains to show that when m ranges over all integers greater than 2, we get
infinitely many distinct pairs (am , bm ). To this end, note that for m1 6= m2 the
roots of the polynomial x2 − m1 x + 1 are distinct from the roots of the polynomial
x2 − m2 x + 1, since a common root of them would be a root of their difference
(m2 − m1 )x, and so it would be equal to zero, which is not a root of any x2 − mx + 1.
As the polynomial x2012 − ax − b has at most 2012 distinct roots, it is divisible by
x2 − mx + 1 for at most 1006 values of m. Hence the same pair (am , bm ) can be
obtained for at most 1006 values of m, which concludes the proof.
Solution 2. Observe first that for any integer c > 2 the equations x = x − 0 and
2
x = cx − 1 have two common distinct positive solutions whose product equals 1.
Let those solutions be x1 and x2 .
Define a sequence (fn ) by f0 = 0, f1 = 1, and fn+2 = cfn+1 − fn , n ≥ 0. Suppose
that x1 and x2 are also common solutions of the equations xn = fn x − fn−1 and
xn+1 = fn+1 x − fn , then the following equalities hold for x = x1 and x = x2 :

xn+2 − fn+2 x + fn+1 = xn+2 − (cfn+1 − fn )x + (cfn − fn−1 )


= xn+2 − c(fn+1 x − fn ) + (fn x − fn−1 ) = xn+2 − cxn+1 + xn = xn (x2 − cx + 1) = 0,

10
Baltic Way 2012 Problems and Solutions

which shows that x1 and x2 are solutions of xn+2 = fn+2 x − fn+1 as well.
Now note that for different integers c, all corresponding members of the sequences
(fn ) are different. At first note that these sequences (fn ) are strictly increasing: by
inductive argument we have

fn+2 − fn+1 = (c − 1)fn+1 − fn > fn+1 − fn > 0.

This also shows that all members are positive.


Now, let us have integers c and c′ with c′ ≥ c + 1 > 3 and let the corresponding
sequences be (fn ) and (fn′ ). Then again by induction
′ ′
fn+2 ≥ (c + 1)fn+1 − fn′ = cfn+1
′ ′
+ (fn+1 − fn′ ) > cfn+1

> cfn+1 > cfn+1 − fn = fn+2 .

We have shown that for all integers c > 2, the respective pairs (f2012 , −f2011 ) are
different, as desired.
Solution
√ 3. Consider any even integer 2c > 2. The roots of x2 − 2cx + 1 are
c ± c2 − 1 and their product is 1. Now consider the expansion
√ √  √ 
(c + c2 − 1)2012 = α + β c2 − 1 = β c + c2 − 1 + (α − βc)

where α and β are some integers. Denote a = β and b = α − βc, then c + c2 − 1
is a solution of x2012 = ax + b.
Simple calculation shows that
√ 2012
√  √ 
2
(c − c − 1) 2 2
= α − β c − 1 = β c − c − 1 + (α − βc),

yielding that also c − c2 − 1 is a solution of x2012 = ax + b.
To complete the proof, it remains to point out that a = β ≥ 2012 · c2011 which
means that the number a can be chosen arbitrarily large.
Solution 4. Note that the function f : (1, ∞) → R, f (x) = x + x−1 , is strictly
increasing (it can be easily shown by derivative) and achieves all values of (2, ∞).
Hence let us have an arbitrary integer c > 2 where c = λ + λ−1 for some real λ > 1.
Define
λ2012 − λ−2012 −λ2011 + λ−2011
a= , b = .
λ − λ−1 λ − λ−1
Then it is easy to verify that λ and λ−1 are solutions of x2012 = ax + b.
Note that a and b are integers. Indeed: for any positive integer k, we have
  k−2 k−1 
λk − (λ−1 )k = λ − λ−1 · λk−1 + λk−2 · λ−1 + . . . + λ · λ−1 + λ−1 ,

where the rightmost factor is a symmetric polynomial with integral coefficients in two
variables and therefore can be expressed as a polynomial with integral coefficients
in symmetric fundamental polynomials λ + λ−1 and λ · λ−1 = 1, hence is an integer.
If there were only a finite number of integer pairs (a, b) for which x2012 − ax − b
has two distinct roots whose product is 1, the number of all such roots would also
be finite. This would be a contradiction since by the construction above, there are
infinitely many such numbers λ for which λ + λ−1 ∈ {3, 4, . . .} and that λ, λ−1 are
roots of some x2012 − ax − b where a, b are integers.

11
Problems and Solutions Baltic Way 2012

Problem 5 –EST–
Find all functions f : R → R for which

f (x + y) = f (x − y) + f (f (1 − xy))

holds for all real numbers x and y.

Answer: f (x) ≡ 0.
Solution. Substituting y = 0 gives f (x) = f (x) + f (f (1)), hence f (f (1)) = 0.
Using this after substituting x = 0 into the original equation gives f (y) = f (−y)
for all y, i.e., f is even.
Substituting x = 1 into the original equation gives f (1 + y) = f (1 − y) +
f (f (1 − y)). By f being even, also f (−1 − y) = f (1 − y) + f (f (1 − y)). Hence
f (f (1 − y)) = f (1 − y − 2) − f (1 − y). As 1 − y covers all real values, one can
conclude that
f (f (z)) = f (z − 2) − f (z) (4)
for all real numbers z.
Substituting −z for z into (4) and simplifying the terms by using that f is even,
one obtains f (f (z)) = f (z + 2) − f (z). Together with (4), this implies

f (z + 2) = f (z − 2) (5)

for all real numbers z.


Now taking y = 2 in the original equation followed by applying (5) leads to
f (f (1 − 2x)) = 0 for all real x. As 1 − 2x covers all real values, one can conclude
that
f (f (z)) = 0 (6)
for all real numbers z. Thus the original equation reduces to

f (x + y) = f (x − y).

Taking x = y here gives f (2x) = f (0), i.e., f is constant, as 2x covers all real
numbers. As 0 must be among the values of f by (6), f (x) ≡ 0 is the only possibility.

Problem 6 –SPB–
There are 2012 lamps arranged on a table. Two persons play the following game.
In each move the player flips the switch of one lamp, but he must never get back
an arrangement of the lit lamps that has already been on the table. A player who
cannot move loses. Which player has a winning strategy?

Answer: the first player has a winning strategy.


Solution 1. The first player can pick one lamp and keep switching it on and off
during the whole game. The second player cannot switch this particular lamp, he
always has to switch some other lamp so that the arrangement of the other lamps
becomes different from any that has already been on the table. So the first player
always has a move, and the second player eventually runs out of the possible moves.

12
Baltic Way 2012 Problems and Solutions

Solution 2. Note that the parity of the lit lamps changes with each move. So all
the possible states can be divided into two disjoint sets, one with odd number of of
the lamps lit and the other with even number of the lamps lit. We get a bipartite
graph where the vertices are the states and two states are connected with an edge
if it is possible to get from one state to another by switching one lamp off or on.
We want to use Hall’s marriage theorem to get a perfect matching of the states.
The assumption of the theorem is the following: for every subset A of the states in
one set there is at least as many neighboring states in the second set. Let the number
of states in A be n, and let B be the set of neighboring states of A, containing m
states. Since each state in A has exactly 2012 neighbors and all these neighbors
belong to the set B, there are exactly 2012n edges between A and B. Since each
state in B has exactly 2012 neighbors (some of them may not belong to A), there is
at most 2012m edges between A and B. Hence 2012n ≤ 2012m, or n ≤ m, i.e. the
assumption of the theorem is satisfied.
Now the Hall’s theorem states that there is a perfect matching. On every move
the first player has to switch the lamp which changes the state into it’s partner
in the perfect matching. Any lamp the second player can switch results in a state
whose partner has not been used yet, so the first player always has a move, and the
secod player eventually loses.

Problem 7 –SPB–
On a 2012 × 2012 board, some cells on the top-right to bottom-left diagonal are
marked. None of the marked cells is in a corner. Integers are written in each cell of
this board in the following way. All the numbers in the cells along the upper and
the left sides of the board are 1’s. All the numbers in the marked cells are 0’s. Each
of the other cells contains a number that is equal to the sum of its upper neighbour
and its left neighbour. Prove that the number in the bottom right corner is not
divisible by 2011.

Solution 1. Let a peg go on the board, stepping from a cell to the neighbor cell
right or below. Then the number in the bottom right corner of the board is equal to
the number of paths of the peg from the top left corner to the bottom right corner,
which do not visit the marked cells.
The total  number of paths (including those that pass through the marked cells)
4022
equals 2011 ; this number is not divisible by 2011, because 2011 is a prime number.
2
The number of paths that pass through the k-th cell of the diagonal equals 2011 k
,
because in order to visit this cell starting from the corner the peg should make 2011
steps, k of which are horizontal, and others are vertical; and after the visit it also
should make 2011 steps, k of which is vertical. Since k 6= 0, 2011 (because the
marked cells are not in the corner) this number is divisible by 2011.
So the number in the low right corner equals the difference of the number that
is not divisible by 2011 and several numbers that are divisible by 2011.
Solution 2. Turning the board 45◦ so that the upper left corner is on the top
we notice that the numbers written on the board constitute the Pascal’s triangle.
If there were no marked cells on the board, then the number on the bottom cell

13
Problems and Solutions Baltic Way 2012

would be 4022

2011
, which is not divisible by 2011. All the cells on the diagonal that is
now horizontal, would be of the form 2011

k
; all of them, except the numbers in the
corners, would be divisible by 2011. If we substitute the numbers on the diagonal
with their remainders modulo 2011, then all the numbers on the diagonal are 0’s,
independent of whether they were marked or not, except in the corners there are
1’s. After this change all numbers below the diagonal get substituted with their
remainders modulo 2011. All the numbers below the diagonal are now 0’s, except
along the sides are 1’s and in the bottom corner there is 2. Hence the remainder of
the number written in the bottom corner modulo 2012 is 2.

Problem 8 –SPB–
A directed graph does not contain directed cycles. The number of edges in any
directed path does not exceed 99. Prove that it is possible to colour the edges of
the graph in 2 colours so that the number of edges in any single-coloured directed
path in the graph will not exceed 9.

Solution. Label each vertex by the number from 0 to 99, that is equal to the
length of the longest directed path that ends in this vertex. Then every edge goes
from a vertex with a smaller label to a vertex with a larger label. Now colour this
edge in red if the digit of tens in the larger label is greater than the digit of tens
in the smaller label. Otherwise colour this edge in blue. Since the number of tens
is the same in all vertices on a blue path, the length of the path cannot exceed 9.
Since the number of tens is different in all vertices on a red path, the length of the
path also cannot exceed 9.

Problem 9 –DEN–
Zeroes are written in all cells of a 5 × 5 board. We can take an arbitrary cell and
increase by 1 the number in this cell and all cells having a common side with it. Is
it possible to obtain the number 2012 in all cells simultaneously?

Answer: No.
Solution 1. Let a(i,j) be the number written in the cell in the row i and column
j. To prove that it is not possible to get 2012 written in each cell, we choose a factor
c(i,j) for each cell, such that
X
S= c(i,j) · a(i,j)
1≤i, j≤5

increases by the same number each time a cell is chosen. If we choose the factors
c(i,j) as shown in Figure 1, then S increases by 22 each time a cell is chosen. Hence
S is divisible by 22 at all times. The sum of all the c(i,j) is 138, hence if 2012 is
written in each cell, then

S = 138 · 2012 = 23 · 3 · 23 · 503,

which cannot be reached, since it is not divisible by 22.

14
Baltic Way 2012 Problems and Solutions

Solution 2. Divide all cells into six disjoint sets as follows: the set A consists
of all corner cells, the set B consists of all cells, having a common side with the
corner cells, the set C consists of all diagonal neighbors of the corner cells, the set
D consists of all middle cells of the sides of the board, the set E consists of all
cells having a common side with the center cell, and the set F has only the center
cell in it. Suppose we choose a times a cell from the set A, b times from the set
B etc. Suppose that after a number of steps we get the number s written in each
cell. Since only the cells from the sets A and B contribute to the numbers written
in the cells of the set A and each choice from these sets contributes exactly 1 to the
sum of the numbers written in the cells of the set A, we have a + b = 4s. Similarly,
considering the sum of the numbers written in the cells of the set B, we see that
choosing a cell from the set A contributes 2 to the sum, choosing a cell from the
set B contributes 1, a cell from C contributes 2 and a cell from D contributes 2,
hence 2a + b + 2c + 2d = 8s. Continuing, we get b + c + 2e = 4s, b + d + e = 4s,
2c + d + e + 4f = 4s, and e + f = s. Eliminating a, b, d, e, and f from these
equations we get 11c = 4s. This is only possible if s is divisible by 11. Since 2012
is not divisible by 11, it is not possible to get 2012 written in each cell.
Remark. For every positive s divisible by 11 it is possible to get s written in
each cell. For s = 11 Figure 2 shows how many times one has to choose each cell. If
s is larger than 11, we can simply repeat these steps as many times as needed. The
same figure can also be used for choosing factors as in Solution 1.

Problem 10 –DEN–
Two players A and B play the following game. Before the game starts, A chooses
1000 not necessarily different odd primes, and then B chooses half of them and writes
them on a blackboard. In each turn a player chooses a positive integer n, erases
some primes p1 , p2 , . . ., pn from the blackboard and writes all the prime factors of
p1 p2 . . . pn − 2 instead (if a prime occurs several times in the prime factorization of
p1 p2 . . . pn − 2, it is written as many times as it occurs). Player A starts, and the
player whose move leaves the blackboard empty loses the game. Prove that one of
the two players has a winning strategy and determine who.
Remark: Since 1 has no prime factors, erasing a single 3 is a legal move.

Solution. Player A has a winning strategy.

8 7 5 7 8 4 3 3 4 3

7 2 3 2 7 4 1 1 1 4

5 3 10 3 5 2 2 5 1 3

7 2 3 2 7 3 1 2 1 3

8 7 5 7 8 5 3 2 4 4

Figure 1 Figure 2

15
Problems and Solutions Baltic Way 2012

Let player A choose 1000 primes all congruent to 1 modulo 4. Then there are 500
primes congruent to 1 modulo 4 when the game begins. Let P denote the parity of
the number of primes congruent to 3 modulo 4 on the blackboard. When the game
starts, P is even. Remember that the number of primes congruent to 3 modulo 4 in
the prime factorization of a number is even if the number is congruent to 1 modulo
4, and odd if the number is congruent to 3 modulo 4. In each turn the parity of P
changes, because the number of primes congruent to 3 modulo 4 among p1 , p2 , . . . ,
pn and in the prime factorization of p1 p2 . . . pn − 2 is of different parity. Hence P is
odd after each of A’s turns and even after each of B’s turns, so A cannot lose. Since
the product of all the primes on the blackboard decreases with each turn, the game
eventually ends, hence A wins.

Problem 11 –SPB–
Let ABC be a triangle with ∠A = 60◦ . The point T lies inside the triangle in such a
way that ∠AT B = ∠BT C = ∠CT A = 120◦ . Let M be the midpoint of BC. Prove
that T A + T B + T C = 2AM.

Solution 1. Rotate the triangle ABC by 60◦ around the point A (Figure 3).
Let T ′ and C ′ be the images of T and C, respectively. Then the triangle AT T ′
is equilateral and ∠AT ′ C ′ = 120◦ , meaning that B, T , T ′ , C ′ are collinear and
T A + T B + T C = BC ′ . Let A′ be a point such that ABA′ C is a parallelogram.
Then 2AM = AA′ . It remains to observe that the triangles BAC ′ and ABA′ are
equal, since BA is common, ∠BAC ′ = 120◦ = ∠A′ BA, and AC ′ = BA′ .

C′ C A′

T′

M
T

A B

Figure 3

Remark. The rotation used here is the same as that used in finding a point P in
the triangle such that the total distance from the three vertices of the triangle to P
is the minimum possible (Fermat point); this is exactly the point T in the problem.
Solution 2. Let A′ be a point such that ABA′ C is a parallelogram. Since
∠BA′ C = 60◦ and ∠BT C = 120◦ , the point T lies on the circumcircle of A′ BC. Let
X be the second intersection point of AT with this circumcircle and let Y be the
midpoint of A′ X. The triangle BCX is equilateral, since ∠BXC = ∠BA′ C = 60◦
and ∠BCX = ∠BT X = 180◦ − ∠BT A = 60◦ . Therefore T B + T C = T X. So it is
sufficient to show that AX = AA′ .

16
Baltic Way 2012 Problems and Solutions

C A′
K

T
M

A B

Figure 4

Let K be the intersection point of the medians of BCX. Since XM is a median


for both BCX and AA′ X, it follows that K is also the intersection point of the
medians of AA′ X. Thus K lies on the median AY . Since the triangle KA′ X is
equilateral, we have KY ⊥ A′ X, so AY is both the height and the median of AA′ X.
Consequently, T A + T B + T C = AX = AA′ = 2AM.
Solution 3. Let A′ be a point such that ABA′ C is a parallelogram (Figure 5).
Use notations AB = c, AC = b, 2AM = AA′ = d, T A = x, T B = y, T C = z. From
∠ABT = 60◦ − ∠BAT = ∠CAT = 60◦ − ∠ACT one gets △ABT ∼ △CAT . So
y : x = c : b, and we have totally △ABT ∼ △CAT ∼ △A′ AB, giving x = b· dc = c· db ,
y = c · dc , z = b · db . By applying the law of cosines in triangle A′ AB, we finally get

bc + c2 + b2 d2
x+y+z = = = d.
d d

C A′

z
b T M
d
x
y

A c B

Figure 5

17
Problems and Solutions Baltic Way 2012

Problem 12 –DEN–
Let P0 , P1 , . . . , P8 = P0 be successive points on a circle and Q be a point inside the
polygon P0 P1 . . . P7 such that ∠Pi−1 QPi = 45◦ for i = 1, . . . , 8. Prove that the sum
8
X
Pi−1 Pi 2
i=1

is minimal if and only if Q is the centre of the circle.

Solution. By the cosine law we have (Figure 6)



Pi−1 Pi 2 = QPi−1 2 + QPi 2 − 2 · QPi−1 · QPi .

Hence, using the AM-GM inequality,


8 8 8
X X √ √ X
Pi−1 Pi 2 = (2 · QPi 2 − 2 · QPi−1 · QPi ) ≥ (2 − 2) QPi 2 .
i=1 i=1 i=1

The equality holds if and only if all distances QPi are equally large, i.e. Q is the
centre of the circle. So it remains to show that the sum in the last expression is
independent of Q. Indeed, by the Pythagorean theorem,
8
X
QPi 2 = (P0 P2 2 + P4 P6 2 ) + (P1 P3 2 + P5 P7 2 ) = 2d2 ,
i=1

where d is the diameter of the circle. The last equality follows form the fact that
P0 P2 P4 P6 is a cyclic quadrilateral with perpendicular diagonals, so P0 P2 2 + P4 P6 2 =
d2 .
Remark. The sum 8i=1 QPi 2 = 4i=1 QP2i−1 2 + 4i=1 QP2i 2 can also be com-
P P P
puted easily using coordinates, e.g. expressing each term by the coordinates of Q.

P2
P3
P1

P4 P0
Q

P7
P5

P6

Figure 6

18
Baltic Way 2012 Problems and Solutions

HC

HB
H

B C

HA

Figure 7

Problem 13 –NOR–
Let ABC be an acute triangle, and let H be its orthocentre. Denote by HA , HB
and HC the second intersection of the circumcircle with the altitudes from A, B
and C respectively. Prove that the area of △HA HB HC does not exceed the area of
△ABC.

Solution 1. We know that the points HA , HB and HC are in fact the reflection of
H on the sides (Figure 7). Since ABC is acute (i.e. H lies in the interior of ABC), we
have SAHC BHA CHB = 2SABC . We thus have to show that 2SHA HB HC ≤ SAHC BHA CHB ,
which is equivalent to
SHA HB HC ≤ SHA CHB + SHB AHC + SHC BHA .

Notice that the triangles on the RHS are isosceles (e.g. HA C = HC = HB C). If
now for example ∠HA HB HC ≥ 90◦ , then obviously already SHA HB HC ≤ SHA BHC . It
may therefore be supposed that HA HB HC is acute-angled. Denote by M its ortho-
centre, which then lies inside the triangle. Denote by MA , MB and MC the reflections
of the orthocentre on the sides HB HC , HC HA and HA HB , respectively. These lie on
the circumcircle, and therefore we have SHB MA HC ≤ SHB AHC , SHC MB HA ≤ SHC BHA
and SHA MC HB ≤ SHA CHB . Since
SH A H B H C = SH B M A H C + SH C M B H A + SH A M C H B ,
we arrive to the required result.
Solution 2. Let the angles of ABC be denoted by α, β and γ, the radius of the
circumcircle by R. Then
SABC = 2R2 sin α sin β sin γ.
By peripheric angles we get
∠HA HB HC = ∠HA HB B + ∠BHB HC = ∠HA AB + ∠BCHC = 180◦ − 2β,

19
Problems and Solutions Baltic Way 2012

G
E

A F B
H

Figure 8

and correspondingly ∠HB HC HA = 180◦ − 2γ and ∠HC HA HB = 180◦ − 2α. Thus

SHA HB HC = 2R2 sin(180◦ − 2β) sin(180◦ − 2γ) sin(180◦ − 2α)


= 2R2 sin(2β) sin(2γ) sin(2α) = 8SABC cos α cos β cos γ
 3
cos α + cos β + cos γ
≤ 8SABC ≤ SABC ,
3
where the last inequality follows from Jensen’s inequality for the cosine function.
Remark. There are also other solutions that combine the ideas appearing in
Solutions 1 and 2 in different way.

Problem 14 –POL–
Given a triangle ABC, let its incircle touch the sides BC, CA, AB at D, E, F ,
respectively. Let G be the midpoint of the segment DE. Prove that ∠EF C =
∠GF D.

Solution 1. Let ω be the circumcircle of the triangle CEF and let H be the
second point of intersection of the circle ω with the line CG (Figure 8). Assume
also, without loss of generality, that AC < BC. (If AC = BC, the whole problem
becomes trivial due to symmetry.) Then the points G, H, B lie on the same side
of the line CF and the vertex A lies on the opposite side. The points E, F , H, C
lie on the circle ω while the points E and D are symmetric with respect to the line
CH. Hence
∠EF C = ∠EHC = ∠CHD. (∗)
The line AC is tangent to the incircle of ABC at E, so we have ∠GDF =
∠EDF = ∠AEF = 180◦ − ∠CEF . Now, using the circle ω, we see that ∠CEF =

20
Baltic Way 2012 Problems and Solutions

C
Q P

D
G

A F B

Figure 9

180◦ − ∠CHF = 180◦ − ∠GHF . Combining the above relations we conclude that
∠GDF = ∠GHF , so that the points G, F , H, D lie on a circle. Therefore ∠CHD =
∠GHD = ∠GF D, which together with (∗) proves the assertion of the problem.
Remark. This problem is trivial for those who rely on the following known result:
a symmedian through one of the vertices of a triangle passes through the point of in-
tersection of the tangents to the circumcircle at the other two vertices (http://www.
cut-the-knot.org/Curriculum/Geometry/Symmedian.shtml#explanation). Ap-
plying this result to triangle DEF and the symmedian through F gives that the
symmedian coincides with F C. Now use the definition of symmedian.

Solution 2. We show that the ray from a triangle vertex F though the intersection
C of the tangents to the circumcircle at the two other vertices D and E is the
symmedian of triangle DF E: Let the circle with centre C and radius CD = CE
meet the rays F D and F E again in P and Q (Figure 9). Then
∠DP C = ∠P DC = ∠F DB = ∠F ED = 180◦ − ∠QED = ∠QP D,
whence P , C, Q are collinear. Thus P Q is a diameter of circle DEQP . Triangles
F DE and F QP are similar and have a common angle at F . Consequently, the
desired result follows since G is the midpoint of DE and C is the midpoint of QP .

Problem 15 –LAT–
The circumcentre O of a given cyclic quadrilateral ABCD lies inside the quadrilat-
eral but not on the diagonal AC. The diagonals of the quadrilateral intersect at I.

21
Problems and Solutions Baltic Way 2012

The circumcircle of the triangle AOI meets the sides AD and AB at points P and
Q, respectively; the circumcircle of the triangle COI meets the sides CB and CD
at points R and S, respectively. Prove that P QRS is a parallelogram.

Solution. Assume w.l.o.g. that angle ABC is obtuse (otherwise switch B and D,
Figure 10). As A, I, O and P are concyclic, we get ∠QAI = ∠QOI; similarly
∠RCI = ∠ROI. Hence

∠QOR = ∠QOI + ∠ROI = ∠QAI + ∠RCI = ∠BAC + ∠BCA


= 180◦ − ∠ABC = 180◦ − ∠QBR.

It follows that points Q, O, R and B are concyclic.


Furthermore, ∠P AI = 180◦ − ∠P OI and ∠SCI = 180◦ − ∠SOI imply

∠P OS = 360◦ − ∠P OI − ∠SOI = ∠P AI + ∠SCI = ∠DAC + ∠DCA


= 180◦ − ∠ADC = 180◦ − ∠P DS.

Hence also points P , O, S and D are concyclic.


As O is the circumcentre of ABCD, we have AO = OB and ∠BAO = ∠OBA.
These are inscribed angles in circumcircles of AP Q and BQR, respectively, and
both of them are based on the same chord OQ. Therefore the radii of these two
circumcircles are equal. Similarly, the radii of circumcircles of BQR, CRS and DSP
are also equal.
As ∠QAP = ∠BAD = 180◦ − ∠BCD = 180◦ − ∠RCS and radii of the circum-
circles of AQOP and ORCS are equal, the chords QP and RS have equal lengths;
similarly also QR and P S have equal lengths. Thus P QRS is a parallelogram.
Remark. In the case of O lying in the diagonal AC, the necessary triangles AOI
and COI are degenerate and have no circumcircle. The statement of the problem still
holds if the circumcentre of ABCD does not lie inside the quadrilateral (Figure 11)
and even if the circumcircles of AOI and COI meet prolongations of sides.

R C
B
C
R B I S
D
Q Q
I
P
A O A O
P S

Figure 10 Figure 11

22
Baltic Way 2012 Problems and Solutions

Problem 16 –FIN–
Let n, m and k be positive integers satisfying (n − 1)n(n + 1) = mk . Prove that
k = 1.

Solution. Since gcd(n, (n − 1)(n + 1)) = 1, if (n − 1)n(n + 1) is a k-th power for


k ≥ 1, then n and (n − 1)(n + 1) = n2 − 1 must be k-th powers as well. Then n = mk1
k
and n2 − 1 = mk2 = (m21 ) − 1. But the difference of two positive k-th powers can
never be 1, if k > 1. So k = 1.

Problem 17 –DEN–
Let d(n) denote the number of positive divisors of n. Find all triples (n, k, p), where
n and k are positive integers and p is a prime number, such that

nd(n) − 1 = pk .

Solution. Note first that nd(n) is always a square: if d(n) is an even number this
is clear; but d(n) is odd exactly if n is a square, and then its power nd(n) is also a
square.
Let nd(n) = m2 , m > 0. Then

(m + 1)(m − 1) = m2 − 1 = nd(n) − 1 = pk .

There is no solution for m = 1. If m = 2, we get (n, k, p) = (2, 1, 3). If m > 2, we


have m−1, m+ 1 > 1 and because both factors divide pk , they are both powers of p.
The only possibility is m−1 = 2, m+1 = 4. Hence m = 3 and nd(n) = m2 = 9. This
leads to the solution (n, k, p) = (3, 3, 2). So the only solutions are (n, k, p) = (2, 1, 3)
and (n, k, p) = (3, 3, 2).

Problem 18 –NOR–
Find all triples (a, b, c) of integers satisfying a2 + b2 + c2 = 20122012.

Solution. First consider the equation modulo 4. Since a square can only be
congruent to 0 or 1 modulo 4, and 20122012 is divisible by 4, we can conclude that
all of a, b and c have to be even. Substituting a = 2a1 , b = 2b1 , c = 2c1 the equation
turns into a21 + b21 + c21 = 5030503.
If we now consider the remaining equation modulo 8, we can see that the right
side is congruent to 7, whilst the only quadratic residues modulo 8 are 0, 1 and 4,
and hence the left hand side can never be congruent to 7.
We therefore conclude that the original equation has no integer solutions.

Problem 19 –POL–
Show that nn + (n + 1)n+1 is composite for infinitely many positive integers n.

23
Problems and Solutions Baltic Way 2012

Solution. We will show that for any positive integer n ≡ 4 (mod 6) the number
n + (n + 1)n+1 is divisible by 3 and hence composite. Indeed, for any such n we
n

have n ≡ 1 (mod 3) and hence nn + (n + 1)n+1 ≡ 1n + 2n+1 = 1 + 2n+1 (mod 3).


Moreover, the exponent n + 1 is odd, which implies that 2n+1 ≡ 2 (mod 3). It
follows that nn + (n + 1)n+1 ≡ 1 + 2 ≡ 0 (mod 3), as claimed.

Problem 20 –LAT–
Find all integer solutions of the equation 2x6 + y 7 = 11.

Solution. There are no solutions. The hardest part of the problem is to determine
a modulus m that would yield a contradiction. There should be few sixth and seventh
powers modulo m, hence, a natural choice is 6 · 7 + 1 = 43. Luckily, it is a prime.
Now, just write out sixth powers (0, 1, 4, 11, 16, 21, 35, 41) and seventh powers
(0, 1, 6, 7, 36, 37, 42) modulo 43, and see that they can’t be combined to give 11.
Indeed,

2x6 mod 43 ∈ {0, 2, 8, 22, 27, 32, 39, 42},


11 − y 7 mod 43 ∈ {4, 5, 10, 11, 12, 17, 18},

and these sets do not intersect.


Remark. To find the sixth and seventh powers modulo 43, we can note that 3
is a primitive root modulo 43. So the nonzero sixth powers are exactly the powers
of 36 ≡ 41 ≡ −2 and the nonzero seventh powers are the powers of 37 ≡ 37 ≡ −6
(mod 43).

24
Mathematical
Olympiad in Europe

1. Junior Balkan and Balkan Mathematical Olympiad


(JBMO 2012-2014 and BMO 2008, 2011-2012, 2014)
2. Benelux Mathematical Olympiad 2010-2012
3. European Girls’ Mathematical Olympiad
(UKMOG 2011 and EGMO 2012-2014)
4. Middle European Mathematical Olympiad
2010-2013
5. South Eastern European Mathematical Olympiad
for University Students (SEEMOUS 2008-2013)
Solutions of JBMO 2012
Wednesday, June 27, 2012

Problem 1
Let a, b and c be positive real numbers such that a + b + c = 1 . Prove that
a b b c c a ⎛ 1− a 1− b 1− c ⎞
+ + + + + + 6 ≥ 2 2 ⎜⎜ + + ⎟
b a c b a c ⎝ a b c ⎟⎠
When does equality hold?

Solution
Replacing 1 − a,1 − b,1 − c with b + c, c + a, a + b respectively on the right hand side,
the given inequality becomes
b+c c+a a+b ⎛ b+c c+a a+b ⎞
+ + + 6 ≥ 2 2 ⎜⎜ + + ⎟
a b c ⎝ a b c ⎟⎠
and equivalently

⎛b+c b+c ⎞ ⎛c+a c+a ⎞ ⎛ a+b a+b ⎞


⎜⎜ −2 2 + 2 ⎟⎟ + ⎜⎜ −2 2 + 2 ⎟⎟ + ⎜⎜ −2 2 + 2 ⎟⎟ ≥ 0
⎝ a a ⎠ ⎝ b b ⎠ ⎝ c c ⎠

which can be written as


2 2 2
⎛ b+c ⎞ ⎛ c+a ⎞ ⎛ a+b ⎞
⎜⎜ − 2 ⎟⎟ + ⎜⎜ − 2 ⎟⎟ + ⎜⎜ − 2 ⎟⎟ ≥ 0 ,
⎝ a ⎠ ⎝ b ⎠ ⎝ c ⎠
which is true.
The equality holds if and only if
b+c c+a a+b
= = ,
a b c
1
which together with the given condition a + b + c = 1 gives a = b = c = .
3
Problem 2
Let the circles k1 and k 2 intersect at two distinct points Α and Β , and let t be a
common tangent of k1 and k 2 , that touches k1 and k 2 at Μ and Ν , respectively. If
t ⊥ AM and ΜΝ = 2ΑΜ , evaluate ∠NMB .

Solution 1
Let P be the symmetric of A with respect to M (Figure 1). Then AM = MP and
t ⊥ AP , hence the triangle APN is isosceles with AP as its base, so ∠NAP = ∠NPA .
We have ∠BAP = ∠BAM = ∠BMN and ∠BAN = ∠BNM .
Thus we have
1800 − ∠NBM = ∠BNM + ∠BMN = ∠BAN + ∠BAP = ∠NAP = ∠NPA
so the quadrangle MBNP is cyclic (since the points B and P lie on different sides of
MN ). Hence ∠APB = ∠MPB = ∠MNB and the triangles APB and MNB are
congruent ( ΜΝ = 2ΑΜ = ΑΜ + ΜΡ = ΑΡ ). From that we get AB = MB , i.e. the
triangle AMB is isosceles, and since t is tangent to k1 and perpendicular to AM, the
centre of k1 is on AM, hence AMB is a right-angled triangle. From the last two
statements we infer ∠AMB = 450 , and so ∠NMB = 90D − ∠AMB = 450 .

Figure 1

Solution 2
Let C be the common point of MN, AB (Figure 2). Then CN 2 = CB ⋅ CA and
CM 2 = CB ⋅ CA . So CM = CN . But MN = 2 AM , so CM = CN = AM , thus the right
triangle ACM is isosceles, hence ∠NMB = ∠CMB = ∠BCM = 450 .

Figure 2
Problem 3
On a board there are n nails each two connected by a string. Each string is colored in
one of n given distinct colors. For each three distinct colors, there exist three nails
connected with strings in these three colors. Can n be
a) 6? b) 7?
Solution. (a) The answer is no.
Suppose it is possible. Consider some color, say blue. Each blue string is the side of 4
⎛ 5 ⎞ 5·4
triangles formed with vertices on the given points. As there exist ⎜ ⎟ = = 10 pairs
⎝2⎠ 2
of colors other than blue, and for any such pair of colors together with the blue color
there exists a triangle with strings in these colors, we conclude that there exist at least
3 blue strings (otherwise the number of triangles with a blue string as a side would be
at most 2·4 = 8 , a contradiction). The same is true for any color, so altogether there
⎛ 6 ⎞ 6·5
exist at least 6·3 = 18 strings, while we have just ⎜ ⎟ = = 15 of them.
⎝2⎠ 2
(b) The answer is yes
Put the nails at the vertices of a regular 7-gon and color each one of its sides in a
different color. Now color each diagonal in the color of the unique side parallel to it.
It can be checked directly that each triple of colors appears in some triangle (because
of symmetry, it is enough to check only the triples containing the first color).

Remark. The argument in (a) can be applied to any even n. The argument in (b) can
be applied to any odd n = 2k + 1 as follows: first number the nails as 0,1, 2 …, 2k
and similarly number the colors as 0,1, 2 …, 2k . Then connect nail x with nail y by a
string of color x + y (modn) . For each triple of colors ( p, q, r ) there are vertices
x, y, z connected by these three colors. Indeed, we need to solve (mod n) the system
(*) ( x + y ≡ p, x + z ≡ q, y + z ≡ r )
Adding all three, we get 2(x+ y + z) ≡ p + q + r and multiplying by k + 1 we get
x+ y + z ≡ (k +1)(p + q + r) . We can now find x, y, z from the identities (*) .
Problem 4
Find all positive integers x, y, z and t such that
2 x ·3y + 5z = 7t .

Solution
Reducing modulo 3 we get 5z ≡ 1 , therefore z is even, z = 2c, c ∈ ` .
Next we prove that t is even:
Obviously, t ≥ 2 . Let us suppose that t is odd, say t = 2d + 1, d ∈ ` . The equation
becomes 2 x ·3y + 25c = 7·49d. If x ≥ 2 , reducing modulo 4 we get 1 ≡ 3 , a
contradiction. And if x = 1 , we have 2·3 y + 25c = 7·49d and reducing modulo 24 we
obtain
2·3 y + 1 ≡ 7 ⇒ 24 | 2(3 y − 3) , i.e. 4 | 3 y −1 − 1
which means that y − 1 is even. Then y = 2b + 1, b ∈ ` . We obtain 6·9b + 25c = 7·49d ,
and reducing modulo 5 we get ( −1)b ≡ 2·( −1) d , which is false for all b, d ∈ ` . Hence
t is even, t = 2d , d ∈ ` , as claimed.
Now the equation can be written as
2 x ·3 y + 25d = 49d ⇔ 2 x ·3 y = ( 7d − 5c )( 7d + 5c ) .
As gcd ( 7d − 5c ,7d + 5c ) = 2 and 7d + 5c > 2 , there exist exactly three possibilities:
⎧⎪7d − 5d = 2 x −1 ⎧⎪7d − 5d = 2·3y ⎧⎪7d − 5d = 2
(1) ⎨ d d ; (2) ⎨ d d x −1
; (3) ⎨ d d x −1 y
⎪⎩7 + 5 = 2·3 ⎪⎩7 + 5 = 2 ⎩⎪7 + 5 = 2 ·3
y

Case (1)
We have 7d = 2 x −2 + 3 y and reducing modulo 3, we get 2 x −2 ≡ 1(mod 3) , hence x − 2
is even, i.e. x = 2a + 2, a ∈ ` , where a > 0 , since a = 0 would mean 3 y + 1 = 7d ,
which is impossible (even = odd).
We obtain
mod 4
7d − 5d = 2·4a ⇒ 7d ≡ 1(mod 4) ⇒ d = 2e, e ∈ ` .
Then we have
mod 8
49e − 5d = 2·4a ⇒ 5c ≡ 1(mod 8) ⇒ c = 2 f , f ∈ ` .
mod 3
We obtain 49e − 25 f = 2·4a ⇒ 0 ≡ 2( mod 3) , false. In conclusion, in this case there
are no solutions to the equation.

Case (2)
From 2 x −1 = 7d + 5c ≥ 12 we obtain x ≥ 5 . Then 7d + 5c ≡ 0(mod 4) , i.e.
3 + 1 ≡ 0(mod 4) , hence d is odd. As 7 = 5 + 2·3 ≥ 11 , we get d ≥ 2 , hence
d d c y

d = 2e + 1, e ∈ ` .
As in the previous case, from 7d = 2 x −2 + 3 y reducing modulo 3 we obtain x = 2a + 2
with a ≥ 2 (because x ≥ 5 ). We get 7d = 4a + 3 y i.e. 7·49e = 4a + 3 y , hence, reducing
modulo 8 we obtain 7 ≡ 3 y which is false, because 3 y is congruent either to 1 (if y is
even) or to 3 (if y is odd). In conclusion, in this case there are no solutions to the
equation.
Case (3)
From 7d = 5c + 2 it follows that the last digit of 7d is 7, hence d = 4k + 1, k ∈ ` .

If c ≥ 2 , from 74 k +1 = 5c + 2 reducing modulo 25 we obtain 7 ≡ 2( mod 25) which is


false. For c = 1 we get d = 1 and the solution x = 3, y = 1, z = t = 2 .
Language: English

Sunday, June 23, 2013

a3 b − 1
Problem 1. Find all ordered pairs (a, b) of positive integers for which the numbers
a+1
b3 a + 1
and are both positive integers.
b−1

Problem 2. Let ABC be an acute triangle with AB < AC and O be the center of its
circumcircle ω . Let D be a point on the line segment BC such that ∠BAD = ∠CAO. Let E
be the second point of intersection of ω and the line AD. If M , N and P are the midpoints
of the line segments BE , OD and AC , respectively, show that the points M , N and P are
collinear.

Problem 3. Show that


  
2 2
a + 2b + b + 2a + ≥ 16
a+1 b+1
for all positive real numbers a and b such that ab ≥ 1.

Problem 4. Let n be a positive integer. Two players, Alice and Bob, are playing the following
game:
• Alice chooses n real numbers, not necessarily distinct
• Alice writes all pairwise sums on a sheet of paper and gives it to Bob (there are n(n−1)
2
such sums, not necessarily distinct)
• Bob wins if he nds correctly the initial n numbers chosen by Alice with only one guess
Can Bob be sure to win for the following cases?
a. n=5 b. n=6 c. n=8
Justify your answer(s).
[For example, when n = 4, Alice may choose the numbers 1, 5, 7, 9, which have the same
pairwise sums as the numbers 2, 4, 6, 10, and hence Bob cannot be sure to win.]

Each problem is worth 10 points.

Time allowed: 4 hours and 30 minutes.


Problem 1.

Solution. As a3 b − 1 = b(a3 + 1) − (b + 1) and a + 1 | a3 + 1, we have a + 1 | b + 1.


As b3 a + 1 = a(b3 − 1) + (a + 1) and b − 1 | b3 − 1, we have b − 1 | a + 1.
So b − 1 | b + 1 and hence b − 1 | 2.

• If b = 2, then a + 1 | b + 1 = 3 gives a = 2. Hence (a, b) = (2, 2) is the only solution in


this case.
• If b = 3, then a + 1 | b + 1 = 4 gives a = 1 or a = 3. Hence (a, b) = (1, 3) and (3, 3) are
the only solutions in this case.

To summarize, (a, b) = (1, 3), (2, 2) and (3, 3) are the only solutions.
Problem 2.

Solution. We will show that M OP D is a parallelogram. From this it follows that M , N , P


are collinear.
Since ∠BAD = ∠CAO = 90◦ − ∠ABC , D is the foot of the perpendicular from A to side
BC . Since M is the midpoint of the line segment BE , we have BM = M E = M D and hence
∠M DE = ∠M ED = ∠ACB .
Let the line M D intersect the line AC at D1 . Since ∠ADD1 = ∠M DE = ∠ACD, M D is
perpendicular to AC . On the other hand, since O is the center of the circumcircle of triangle
ABC and P is the midpoint of the side AC , OP is perpendicular to AC . Therefore M D and
OP are parallel.
Similarly, since P is the midpoint of the side AC , we have AP = P C = DP and hence
∠P DC = ∠ACB . Let the line P D intersect the line BE at D2 . Since ∠BDD2 = ∠P DC =
∠ACB = ∠BED, we conclude that P D is perpendicular to BE . Since M is the midpoint of
the line segment BE , OM is perpendicular to BE and hence OM and P D are parallel.
Problem 3.

Solution 1. By the AM-GM Inequality we have:


a+1 2
+ ≥2
2 a+1
Therefore
2 a+3
a + 2b + ≥ + 2b .
a+1 2
and, similarly,
2 b+3
b + 2a + ≥ 2a + .
b+1 2

On the other hand,


√ √
(a + 4b + 3)(b + 4a + 3) ≥ ( ab + 4 ab + 3)2 ≥ 64

by the Cauchy-Schwarz Inequality as ab ≥ 1, and we are done.

Since ab ≥ 1, we have a + b ≥ a + 1/a ≥ 2 a · (1/a) = 2.


p
Solution 2.

Then
2 2
a + 2b + = b + (a + b) +
a+1 a+1
2
≥b+2+
a+1
b+1 b+1 2
= + +1+
2
s 2 a+1
(b + 1)2
≥44
2(a + 1)

by the AM-GM Inequality. Similarly,


s
2 (a + 1)2
b + 2a + ≥44 .
b+1 2(b + 1)
Now using these and applying the AM-GM Inequality another time we obtain:
   r
2 2 (a + 1)(b + 1)
4
a + 2b + b + 2a + ≥ 16
a+1 b+1 4
s
√ √
4 (2 a)(2 b)
≥ 16
4

8
= 16 ab
≥ 16

Solution 3. We have

     
2 2 2 2
a + 2b + b + 2a + = (a + b) + b + (a + b) + a +
a+1 b+1 a+1 b+1
!2
√ 2
≥ a+b+ ab + p
(a + 1)(b + 1)

by the Cauchy-Schwarz Inequality.


On the other hand,
2 4
p ≥
(a + 1)(b + 1) a+b+2

by the AM-GM Inequality and

√ 2 4 (a + b + 1)(a + b − 2)
a+b+ ab + p ≥a+b+1+ = +4≥4
(a + 1)(b + 1) a+b+2 a+b+2


as a + b ≥ 2 ab ≥ 2, nishing the proof.
Problem 4.

Solution. a. Yes. Let a ≤ b ≤ c ≤ d ≤ e be the numbers chosen by Alice. As each number


appears in a pairwise sum 4 times, by adding all 10 pairwise sums and dividing the result by
4, Bob obtains a + b + c + d + e. Subtracting the smallest and the largest pairwise sums a + b
and d + e from this he obtains c. Subtracting c from the second largest pairwise sum c + e he
obtains e. Subtracting e from the largest pairwise sum d + e he obtains d. He can similarly
determine a and b.

b. Yes. Let a ≤ b ≤ c ≤ d ≤ e ≤ f be the numbers chosen by Alice. As each number appears


in a pairwise sum 5 times, by adding all 15 pairwise sums and dividing the result by 5, Bob
obtains a + b + c + d + e + f . Subtracting the smallest and the largest pairwise sums a + b and
e + f from this he obtains c + d.
Subtracting the smallest and the second largest pairwise sums a + b and d + f from a + b + c +
d + e + f he obtains c + e. Similarly he can obtain b + d. He uses these to obtain a + f and
b + e.
Now a+d, a+e, b+c are the three smallest among the remaining six pairwise sums. If Bob adds
these up, subtracts the known sums c + d and b + e from the result and divides the dierence
by 2, he obtains a. Then he can determine the remaining numbers.

c. No. If Alice chooses the eight numbers 1, 5, 7, 9, 12, 14, 16, 20, then Bob cannot be sure to
guess these numbers correctly as the eight numbers 2, 4, 6, 10, 11, 15, 17, 19 also give exactly the
same 28 pairwise sums as these numbers.
Problems and Solutions, JBMO 2014

Problem 1. Find all distinct prime numbers p , q and r such that


3p 4 - 5q 4 - 4r 2 = 26 .

Solution. First notice that if both primes q and r differ from 3 , then q 2 º r 2 º 1(mod 3) ,
hence the left hand side of the given equation is congruent to zero modulo 3, which is
impossible since 26 is not divisible by 3 . Thus, q = 3 or r = 3 . We consider two cases.
Case 1. q = 3 .
The equation reduces to 3p 4 - 4r 2 = 431 (1) .
If p ¹ 5, by Fermat’s little theorem, p 4 º 1 (mod 5) , which yields
3 - 4r 2 º 1 (mod 5) , or equivalently, r 2 + 2 º 0 (mod 5) . The last congruence is
impossible in view of the fact that a residue of a square of a positive integer belongs to the
set { 0, 1, 4 } . Therefore p = 5 and r = 19 .
Case 2. r = 3 .
The equation becomes 3p 4 - 5q 4 = 62 (2) .
Obviously p ¹ 5 . Hence, Fermat’s little theorem gives p 4 º 1 (mod 5) . But then
5q 4 º 1 (mod 5) , which is impossible .
Hence, the only solution of the given equation is p = 5 , q = 3 , r = 19 .
Problem 2. Consider an acute triangle ABC with area S. Let CD ^ AB ( D Î AB ),
DM ^ AC ( M Î AC ) and DN ^ BC ( N Î BC ). Denote by H 1 and H 2 the
orthocentres of the triangles MNC and MND respectively. Find the area of the
quadrilateral AH 1BH 2 in terms of S.

Solution 1. Let O, P, K, R and T be the C


mid-points of the segments CD, MN, R
CN, CH 1 and MH 1 , respectively. From H1 K
1 N
DMNC we have that PK = MC and O
2 T
P
PK  MC . Analogously, from DMH 1C
M
1
we have that TR = MC and
2 A B
D
TR  MC . Consequently, PK = TR and
H2
PK  TR . Also OK  DN (from
DCDN ) and since DN ^ BC and MH 1 ^ BC , it follows that TH 1  OK . Since O is the
circumcenter of DCMN , OP ^ MN . Thus, CH 1 ^ MN implies OP  CH 1 . We conclude
DTRH 1 @ DKPO (they have parallel sides and TR = PK ), hence RH 1 = PO , i.e.
CH 1 = 2PO and CH 1  PO .

Analogously, DH 2 = 2PO and DH 2  PO . From CH 1 = 2PO = DH 2 and

CH 1  PO  DH 2 the quadrilateral CH 1H 2D is a parallelogram, thus H 1H 2 = CD and


H 1H 2  CD . Therefore the area of the quadrilateral AH 1BH 2 is
AB ⋅ H 1H 2 AB ⋅ CD
= =S .
2 2
Solution 2. Since MH 1  DN and NH 1  DM , MDNH 1 is a parallelogram. Similarly,
NH 2  CM and MH 2  CN imply MCNH 2 is a parallelogram . Let P be the midpoint of
the segment MN . Then sP (D ) = H 1 and sP (C ) = H 2 , thus CD  H 1H 2 and CD = H 1H 2 .
1
From CD ^ AB we deduce AAH BH = AB ⋅ CD = S .
1 2
2
Problem 3. Let a, b, c be positive real numbers such that abc = 1 . Prove that
2 2 2
æ 1ö æ 1ö æ 1ö
ççça + ÷÷÷ + çççb + ÷÷÷ + çççc + ÷÷÷ ³ 3 (a + b + c + 1) .
è b ÷ø è c ÷ø è a ø÷
When does equality hold?
Solution 1. By using AM-GM ( x 2 + y 2 + z 2 ³ xy + yz + zx ) we have
2 2 2
æ ö æ ö æ ö æ öæ ö æ öæ ö æ öæ ö
çça + 1 ÷÷ + ççb + 1 ÷÷ + ççc + 1 ÷÷ ³ çça + 1 ÷÷ ççb + 1 ÷÷ + ççb + 1 ÷÷ ççc + 1 ÷÷ + ççc + 1 ÷÷ çça + 1 ÷÷
çè b ÷÷ø çè c ÷÷ø çè a ÷÷ø çè b ÷÷øèç c ÷÷ø èç ÷÷ ç
c øè a ø÷÷ èç ÷÷ ç
a øè b ø÷÷
æ a ö æ b ö æ c ö
= çççab + 1 + + a ÷÷÷ + çççbc + 1 + + b ÷÷÷ + çççca + 1 + + c ÷÷÷
è c ÷ø è a ÷ø è b ÷ø
a c b
= ab + bc + ca +
+ + + 3 +a +b +c.
c b a
b c a
Notice that by AM-GM we have ab + ³ 2b, bc + ³ 2c, and ca + ³ 2a .
a b c
Thus ,
2 2 2
æ ö æ ö æ ö æ ö æ ö æ ö
çça + 1 ÷÷ + ççb + 1 ÷÷ + ççc + 1 ÷÷ ³ ççab + b ÷÷ + ççbc + c ÷÷ + ççca + a ÷÷ + 3 + a + b + c ³ 3(a + b + c + 1).
çè b ÷ø÷ èç c ø÷÷ èç a ø÷÷ èç a ø÷÷ èç b ø÷÷ èç c ø÷÷

The equality holds if and only if a = b = c = 1.

Solution 2. From QM-AM we obtain

(a + ) + (b + c1 ) + (c + a1 )
2 2 2
1
b a + b1 + b + c1 + c + a1
³ 
3 3
(a + b1 + b + c1 + c + a1 )
2 2 2 2
æ ö æ ö æ ö÷
çça + 1 ÷÷ + ççb + 1 ÷÷ 1
+ çççc + ÷÷ ³ (1)
çè b ø÷÷ èç c ø÷÷ è a ø÷ 3
1 1 1 1
From AM-GM we have + + ³ 33 = 3 , and substituting in (1) we get
a b c abc

çça + 1 ÷÷ + ççb + 1 ÷÷ + ççc + 1 ÷÷ ³ (


a + b1 + b + c1 + c + a1 ) (a + b + c + 3)
2 2 2 2 2
æ ö æ ö æ ö
³ =
çè b ÷÷ø çè c ÷÷ø çè a ÷÷ø 3 3
(a + b + c )(a + b + c ) + 6 (a + b + c ) + 9 (a + b + c ) 3 3 abc + 6 (a + b + c ) + 9
= ³ =
3 3
9 (a + b + c ) + 9
= = 3 (a + b + c + 1).
3
The equality holds if and only if a = b = c = 1.

Solution 3.
By using x 2 + y 2 + z 2 ³ xy + yz + zx
2 2 2
æ ö æ ö æ ö
çça + 1 ÷÷ + ççb + 1 ÷÷ + ççc + 1 ÷÷ = a 2 + b 2 + c 2 + 1 + 1 + 1 + 2a + 2b + 2c ³
çè b ÷÷ø çè c ÷÷ø çè a ÷÷ø b2 c2 a 2 b c a
1 1 1 2a 2b 2c
³ ab + ac + bc + + + + + + .
bc ca ab b c a

Clearly
1 1 1 abc abc abc
+ + = + + = a +b +c,
bc ca ab bc ca ab
a b c
ab + + bc + + ca + ³ 2a + 2b + 2c,
b c a
a b c a b c
+ + ³ 3 3 ⋅ ⋅ = 3.
b c a b c a
Hence
2 2 2
æ ö æ ö æ ö æ ö æ ö æ ö
çça + 1 ÷÷ + ççb + 1 ÷÷ + ççc + 1 ÷÷ ³ ççab + a ÷÷ + ççac + c ÷÷ + ççbc + b ÷÷ + a + b + c + a + b + c ³
çè b ÷ø÷ çè c ø÷÷ èç a ø÷÷ èç b ø÷÷ èç a ø÷÷ èç c ø÷÷ b c a
³ 2a + 2b + 2c + a + b + c + 3 = 3 (a + b + c + 1).

The equality holds if and only if a = b = c = 1.

x y z
Solution 4. a = ,b= ,c=
y z x
2 2 2
æx z ö æy x ö æz y ö æx y z ö
ççç + ÷÷÷ + ççç + ÷÷÷ + ççç + ÷÷÷ ³ 3 ççç + + + 1÷÷÷
è y y ÷ø è z z ø÷ è x x ø÷ èy z x ø÷
(x + z )2 x 2z 2 + (y + x )2 y 2x 2 + (z + y )2 z 2y 2 ³ 3xyz (x 2z + y 2x + z 2y + xyz )
x 4z 2 + 2x 3z 3 + x 2z 4 + x 2y 4 + 2x 3y 3 + x 4y 2 + y 2z 4 + 2y 3z 3 + y 4z 2 ³ 3x 3yz 2 + 3x 2y 3z + 3xy 2z 3 + 3x 2y 2z 2
1)x 3y 3 + y 3z 3 + z 3x 3 ³ 3x 2y 2z 2 .
2)x 4z 2 + z 4x 2 + x 3y 3 ³ 3x 3z 2y üïï
ï
3)x 4y 2 + y 4x 2 + y 3z 3 ³ 3y 3x 2z ïý
ï
4)z 4y 2 + y 4z 2 + x 3z 3 ³ 3z 3y 2x ïïï
þ
Equality holds when x = y = z , i.e., a = b = c = 1 .
1
Solution 5. å (a + b ) 2
³ 3å a + 3
cyc cyc

a æ 1 ö
 2å + å çça 2 + 2 - 3a - 1÷÷÷ ³ 0
cyc b
ç
cyc è a ÷ø

a abc
2å ³ 63 =6 (1)
cyc b bca
1 3
"a > 0, a 2 +
2
- 3a ³ - 4
a a
4 3 2
 a - 3a + 4a - 3a + 1 ³ 0

(
 (a - 1) a 2 - a + 1 ³ 0 )
2

æ 1 ö÷ 1 1
å çèçça 2
+
a 2
- 3a - 1÷÷÷ ³ 3å a - 15 ³ 9 abc - 15 = -6
ø
3 (2)
cyc cyc

Using (1) and (2) we obtain


a æ 1 ö
2å + å ççça 2 + 2 - 3a - 1÷÷÷ ³ 6 - 6 = 0
cyc b è a ø÷
Equality holds when a = b = c = 1 .
Problem 4. For a positive integer n , two players A and B play the following game: Given
a pile of s stones, the players take turn alternatively with A going first. On each turn the
player is allowed to take either one stone, or a prime number of stones, or a multiple of n
stones. The winner is the one who takes the last stone. Assuming both A and B play
perfectly, for how many values of s the player A cannot win?

Solution. Denote by k the sought number and let {s1, s2 ,..., sk } be the corresponding values
for s . We call each si a losing number and every other nonnegative integer a winning
numbers.

Clearly every multiple of n is a winning number.

Suppose there are two different losing numbers si > s j , which are congruent modulo n .
Then, on his first turn of play, player A may remove si - s j stones (since n si - s j ),
leaving a pile with s j stones for B. This is in contradiction with both si and s j being
losing numbers.

Hence, there are at most n - 1 losing numbers, i.e. k £ n - 1 .

Suppose there exists an integer r Î {1,2,..., n - 1} , such that mn + r is a winning number


for every m Î  0 . Let us denote by u the greatest losing number (if k > 0 ) or 0 (if
k = 0 ), and let s = LCM (2, 3,..., u + n + 1) . Note that all the numbers s + 2 , s + 3 , …,
s +u +n +1 are composite. Let m ' Î 0, be such that
s + u + 2 £ m ' n + r £ s + u + n + 1 . In order for m ' n + r to be a winning number, there
must exist an integer p , which is either one, or prime, or a positive multiple of n , such
that m ' n + r - p is a losing number or 0, and hence lesser than or equal to u . Since
s + 2 £ m ' n + r - u £ p £ m ' n + r £ s + u + n + 1 , p must be a composite, hence p is a
multiple of n (say p = qn ). But then m ' n + r - p = (m '- q ) n + r must be a winning
number, according to our assumption. This contradicts our assumption that all numbers
mn + r , m Î  0 are winning.

Hence, each nonzero residue class modulo n contains a loosing number.

There are exactly n - 1 losing numbers .


Lemma: No pair (u, n ) of positive integers satisfies the following property:
(*) In  exists an arithmetic progression (at )t¥=1 with difference n such that each
segment
éa - u, a + u ù contains a prime.
êë i i úû

Proof of the lemma: Suppose such a pair (u, n ) and a corresponding arithmetic
¥
progression (a )
t t =1
exist. In  exist arbitrarily long patches of consecutive composites.
Take such a patch P of length 3un . Then, at least one segment éêëai - u, ai + u ùúû is fully
contained in P , a contradiction.

Suppose such a nonzero residue class modulo n exists (hence n > 1 ). Let u Î  be greater
than every loosing number. Consider the members of the supposed residue class which are
greater than u . They form an arithmetic progression with the property (*) , a
contradiction (by the lemma).
PROBLEMS AND SOLUTIONS FOR 25th BALKAN MATHEMATICAL
OLYMPIAD
Problem 1
An acute-angled scalene triangle ABC is given, with AC > BC . Let O be its
circumcentre, Η its orthocentre, and F the foot of the altitude from C. Let P be the point
(other than A) on the line ΑΒ such that ΑF=ΡF, and M be the midpoint of ΑC. We denote
the intersection of PH and BC by X, the intersection of OM and FX by Y, and the
intersection of OF and AC by Z. Prove that the points F, M, Y and Z are concyclic.

Solution:
It is enough to show that ΟF ⊥ FX .
Let ΟΕ ⊥ ΑΒ , then it is trivial that :
CΗ = 2ΟΕ . (1)
Since from the hypothesis we have ΡF = ΑF then we take ΡΒ = ΡF − ΒF or
ΡΒ = ΑF − ΒF (2)
Also, ∠XPB = ∠HAP and ∠HAP = ∠HCX since ΑFGC in inscribable (where G is the
foot of the altidude from A),
so ∠XPB = ∠HCX and since ∠BXP = ∠HXC , the triangles XΗC and XΒΡ are similar.

If XL and XD are respectively the heights of the triangles XΗC and XΒΡ we have:
XD PB
= ,
XL CH
and from (1) and (2) we get:
XD AF − BF FE XD FE
= = ⇒ =
XL 2OE OE FD OE
Therefore the triangles XFD, OEF are similar and we get:
∠OFX = ∠OFC + ∠LFX = ∠FOE + ∠FXD = ∠XFD + ∠FXD = 90o , so ΟF ⊥ FX .

1
Problem 2
Does there exist a sequence a1, a2 ,..., an ,... of positive real numbers satisfying both of the
following conditions:
n
(i) ∑ ai ≤ n 2 , for every positive integer n;
i =1
n 1
(ii) ∑ ≤ 2008 , for every positive integer n ?
i =1 ai

Solution.
The answer is no.
It is enough to show that
n 2n
1 n
if ∑a
i =1
i ≤ n for any n , then
2
∑a
i=2
>
4
. (or any other precise estimate)
i
k +1 k +1
2 2
1
For this, we use that ∑ ai ∑ ≥ 22 k for any k ≥ 0 by the arithmetic-harmonic mean
i = 2k +1 i = 2k +1 ai
inequality.
2k +1 2k +1 2k +1
1 1
Since ∑ ai < ∑ ai ≤ 2 2k +2
, it follows that ∑ >
i = 2k +1 i =1 i = 2k +1 ai 4
2n 2k +1
1 n −1 1 n
and hence ∑ i > ∑ ∑ > . (it can be stated in words)
i =2 a k =0 i = 2k +1 ai 4

Remark: no points for using some inequality, that doesn’t lead to solution

2
Problem 3
Let n be a positive integer. The rectangle ABCD with side lengths AB = 90n + 1 and
BC = 90n + 5 is partitioned into unit squares with sides parallel to the sides of ABCD. Let
S be the set of all points which are vertices of these unit squares. Prove that the number of
lines which pass through at least two points from S is divisible by 4 .

Solution.
Denote 90n + 1 = m . We investigate the number of the lines modulo 4 consecutively
reducing different types of lines.
The vertical and horizontal lines are
(m + 5) + (m + 1) = 2(m + 3) which is divisible to 4 .
Moreover, every line which makes an acute angle to the axe Ox (i.e. that line has a
positive angular coefficient) corresponds to unique line with an obtuse angle (consider
the symmetry with respect to the line through the midpoints of AB and CD ). Therefore
it is enough to prove that the lines with acute angles are an even number.
Every line which does not pass through the center O of the rectangle corresponds to
another line with the same angular coefficent(consider the symmetry with respect to O ).
Therefore it is enough to consider the lines through O .
p
Every line through O has an angular coefficient , where ( p, q) = 1 , p and q are odd
q
positive integers. (To see this, consider the two nearest, from the two sides, to O points
of the line).
p
If p ≠ 1 , q ≠ 1 , p ≤ m and q ≤ m , the line with angular coefficient , uniquely
q
q
corresponds to the line with angular coefficient . It remains to prove that the number of
p
the remaining lines is even.

The last number is


ϕ (m + 2) ϕ (m + 4) ϕ (m + 2) + ϕ (m + 4)
1+ + −1 =
2 2 2
because we have:
1) one line with p = q = 1 ;
ϕ (m + 2) p
2) lines with angular coefficient , p ≤ m is odd and ( p, m + 2) = 1 ;
2 m+2
ϕ (m + 4) p
3) − 1 lines with angular coefficient , p ≤ m is odd and
2 m+4
( p, m + 4) = 1 .
Now the assertion follows from the fact that the number
ϕ (m + 2) + ϕ (m + 4) = ϕ (90n + 3) + ϕ (90n + 5) is divisible to 4 .

3
Problem 4
Let c be a positive integer. The sequence a1, a2 ,..., an ,... is defined by a1 = c , and
an +1 = an2 + an + c3 , for every positive integer n . Find all values of c for which there
exist some integers k ≥ 1 and m ≥ 2 , such that ak2 + c3 is the m th power of some positive
integer.

Solution.
First, notice:
an2+1 + c3 = (an2 + an + c3 ) 2 + c3 = (an2 + c3 )(an2 + 2an + 1 + c3 )
We first prove that an2 + c3 and an2 + 2an + 1 + c3 are coprime.
We prove by induction that 4c3 + 1 is coprime with 2an + 1 , for every n ≥ 1 .
Let n = 1 and p be a prime divisor of 4c3 + 1 and 2a1 + 1 = 2c + 1 . Then p divides
2(4c 3 + 1) = (2c + 1)(4c 2 − 2c + 1) + 1 , hence p divides 1, a contradiction. Assume now
that (4c 3 + 1, 2an + 1) = 1 for some n ≥ 1 and the prime p divides 4c 3 + 1 and 2an +1 + 1 .
Then p divides 4an +1 + 2 = (2an + 1) 2 + 4c3 + 1 , which gives a contradiction.

Assume that for some n ≥ 1 the number


an2+1 + c3 = (an2 + an + c3 ) 2 + c3 = (an2 + c3 )(an2 + 2an + 1 + c3 )
is a power. Since an2 + c3 and an2 + 2an + 1 + c3 are coprime,
than an2 + c 3 is a power as well.
The same argument can be further applied giving that a12 + c 3 = c 2 + c 3 = c 2 (c + 1) is a
power.
If a 2 (a + 1) = t m with odd m ≥ 3 , then a = t1m and a + 1 = t2m , which is impossible. If
a 2 (a + 1) = t 2 m1 with m1 ≥ 2 , then a = t1m1 and a + 1 = t2m1 , which is impossible.

Therefore a 2 (a + 1) = t 2 whence we obtain the solutions a = s 2 − 1 , s ≥ 2 , s ∈ ` .

4
28th BALKAN MATHEMATICAL OLYMPIAD
Iassy, May 6th, 2011

Version: English

Problem 1. Let ABCD be a cyclic quadrilateral which is not a trapezoid


and whose diagonals meet at E. The midpoints of AB and CD are F and
G respectively, and ℓ is the line through G parallel to AB. The feet of the
perpendiculars from E onto the lines ℓ and CD are H and K, respectively.
Prove that the lines EF and HK are perpendicular.

Problem 2. Given real numbers x, y, z such that x + y + z = 0, show


that
x(x + 2) y(y + 2) z(z + 2)
+ + 2 ≥ 0.
2x2 + 1 2y 2 + 1 2z + 1
When does equality hold?

Problem 3. Let S be a finite set of positive integers which has the


following property: if x is a member of S, then so are all positive divisors
of x. A non-empty subset T of S is good if whenever x, y ∈ T and x < y,
the ratio y/x is a power of a prime number. A non-empty subset T of S is
bad if whenever x, y ∈ T and x < y, the ratio y/x is not a power of a prime
number. We agree that a singleton subset of S is both good and bad. Let
k be the largest possible size of a good subset of S. Prove that k is also the
smallest number of pairwise-disjoint bad subsets whose union is S.

Problem 4. Let ABCDEF be a convex hexagon of area 1, whose oppo-


site sides are parallel. The lines AB, CD and EF meet in pairs to determine
the vertices of a triangle. Similarly, the lines BC, DE and F A meet in pairs
to determine the vertices of another triangle. Show that the area of at least
one of these two triangles is at least 3/2.

Each problem is worth 10 points.


Time allowed: 4 hours and 30 minutes.
PROBLEM 1
Let ABCD be a cyclic quadrilateral which is not a trapezoid and whose diagonals
meet at E. The midpoints of AB and CD are F and G respectively, and ` is the line
through G parallel to AB. The feet of the perpendiculars from E onto the lines ` and
CD are H and K, respectively. Prove that the lines EF and HK are perpendicular.

Solution. The points E, K, H, G are on the circle of diameter GE, so

∠EHK = ∠EGK. (†)

CE BE
Also, from ∠DCA = ∠DBA and CD = BA it follows

CE 2CE 2BE BE
= = = ,
CG CD BA BF
therefore ∆CGE ∼ ∆BF E. In particular, ∠EGC = ∠BF E, so by (†)

∠EHK = ∠BF E.

But HE⊥F B and so, since F E and HK are obtained by rotations of these lines by the
same (directed) angle, F E⊥HK.

Marking Scheme. ∠EHK = ∠EGK . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2p


Similarity of ∆CGE ∼ ∆BF E . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3p
∠EGC = ∠BF E . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1p
∠EHK = ∠BF E . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1p
Concluding the proof . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3p
Remark. Any partial or equivalent approach should be marked accordingly.
PROBLEM 2
Given real numbers x, y, z such that x + y + z = 0, show that

x(x + 2) y(y + 2) z(z + 2)


+ + ≥ 0.
2x2 + 1 2y 2 + 1 2z 2 + 1
When does equality hold?

Solution. The inequality is clear if xyz = 0, in which case equality holds if and only
if x = y = z = 0.
Henceforth assume xyz 6= 0 and rewrite the inequality as

(2x + 1)2 (2y + 1)2 (2z + 1)2


+ + ≥ 3.
2x2 + 1 2y 2 + 1 2z 2 + 1

Notice that (exactly) one of the products xy, yz, zx is positive, say yz > 0, to get

(2y + 1)2 (2z + 1)2 2(y + z + 1)2


+ ≥ (by Jensen)
2y 2 + 1 2z 2 + 1 y2 + z2 + 1
2(x − 1)2
= 2 (for x + y + z = 0)
x − 2yz + 1
2(x − 1)2
≥ . (for yz > 0)
x2 + 1
Here equality holds if and only if x = 1 and y = z = −1/2. Finally, since

(2x + 1)2 2(x − 1)2 2x2 (x − 1)2


+ − 3 = ≥ 0, x ∈ R,
2x2 + 1 x2 + 1 (2x2 + 1)(x2 + 1)

the conclusion follows. Clearly, equality holds if and only if x = 1, so y = z = −1/2.


Therefore, if xyz 6= 0, equality holds if and only if one of the numbers is 1, and the other
two are −1/2.

Marking Scheme. Proving the inequality and identifying the equality case when one
of the variables vanishes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1p
Applying Jensen or Cauchy–Schwarz inequality to the fractions involving the pair of
numbers of the same sign . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3p
Producing the corresponding lower bound in the third variable . . . . . . . . . . . . . . . . . 3p
Proving the resulting one–variable inequality . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2p
Deriving the equality case . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1p
Remark. Any partial or equivalent approach should be marked accordingly.
PROBLEM 3
Let S be a finite set of positive integers which has the following property: if x is a
member of S, then so are all positive divisors of x. A non-empty subset T of S is good if
whenever x, y ∈ T and x < y, the ratio y/x is a power of a prime number. A non-empty
subset T of S is bad if whenever x, y ∈ T and x < y, the ratio y/x is not a power of a
prime number. We agree that a singleton subset of S is both good and bad. Let k be
the largest possible size of a good subset of S. Prove that k is also the smallest number
of pairwise-disjoint bad subsets whose union is S.

Solution. Notice first that a bad subset of S contains at most one element from a
good one, to deduce that a partition of S into bad subsets has at least as many members
as a maximal good subset.
Notice further that the elements of a good subset of S must be among the terms of a
geometric sequence whose ratio is a prime: if x < y < z are elements of a good subset
of S, then y = xpα and z = yq β = xpα q β for some primes p and q and some positive
integers α and β, so p = q for z/x to be a power of a prime.
Next, let P = {2, 3, 5, 7, 11, · · · } denote the set of all primes, let

m = max {expp x : x ∈ S and p ∈ P },

where expp x is the exponent of the prime p in the canonical decomposition of x, and
notice that a maximal good subset of S must be of the form {a, ap, · · · , apm } for some
prime p and some positive integer a which is not divisible by p. Consequently, a maximal
good subset of S has m + 1 elements, so a partition of S into bad subsets has at least
m + 1 members.
Finally, notice by maximality of m that the sets
X
Sk = {x : x ∈ S and expp x ≡ k (mod m + 1)}, k = 0, 1, · · · , m,
p∈P

form a partition of S into m + 1 bad subsets. The conclusion follows.

Marking Scheme. Identification of the structure of a good set . . . . . . . . . . . . . . . . . . . 1p


Considering the maximal exponent m of a prime and deriving k = m + 1 . . . . . . 1p
Noticing that the intersection of a bad set and a good set contains at most one
element and infering that a partition of S into bad sets has at least k members. . . . .2p
Producing a partition of S into k bad subsets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6p
Remark. Any partial or equivalent approach should be marked accordingly.
PROBLEM 4
Let ABCDEF be a convex hexagon of area 1, whose opposite sides are parallel. The
lines AB, CD and EF meet in pairs to determine the vertices of a triangle. Similarly,
the lines BC, DE and F A meet in pairs to determine the vertices of another triangle.
Show that the area of at least one of these two triangles is at least 3/2.

Solution. Unless otherwise stated, throughout the proof indices take on values from
0 to 5 and are reduced modulo 6. Label the vertices of the hexagon in circular order,
A0 , A1 , · · · , A5 , and let the lines of support of the alternate sides Ai Ai+1 and Ai+2 Ai+3
meet at Bi . To show that the area of at least one of the triangles B0 B2 B4 , B1 B3 B5
is greater than or equal to 3/2, it is sufficient to prove that the total area of the six
triangles Ai+1 Bi Ai+2 is at least 1:
5
X
area Ai+1 Bi Ai+2 ≥ 1.
i=0

To begin with, reflect each Bi through the midpoint of the segment Ai+1 Ai+2 to get the
points Bi0 . We shall prove that the six triangles Ai+1 Bi0 Ai+2 cover the hexagon. To this
end, reflect A2i+1 through the midpoint of the segment A2i A2i+2 to get the points A02i+1 ,
i = 0, 1, 2. The hexagon splits into three parallelograms, A2i A2i+1 A2i+2 A02i+1 , i = 0, 1, 2,
and a (possibly degenerate) triangle, A01 A03 A05 . Notice first that each parallelogram
A2i A2i+1 A2i+2 A02i+1 is covered by the pair of triangles (A2i B2i+5
0 0 A
A2i+1 , A2i+1 B2i 2i+2 ),
i = 0, 1, 2. The proof is completed by showing that at least one of these pairs contains
a triangle that covers the triangle A01 A03 A05 . To this end, it is sufficient to prove that
0 ≥ A2i A02i+5 and A2j+2 B2j
0 ≥ A 0
A2i B2i+5 2j+2 A2j+3 for some indices i, j ∈ {0, 1, 2}. To
establish the first inequality, notice that
0
A2i B2i+5 = A2i+1 B2i+5 , A2i A02i+5 = A2i+4 A2i+5 , i = 0, 1, 2,
A1 B 5 A0 B 5 A3 B 1 A2 A3
= and = ,
A4 A5 A5 B 3 A0 A1 A0 B5
to get
2 0
Y A2i B2i+5
= 1.
A2i A02i+5
i=0
Similarly,
2 0
Y A2j+2 B2j
= 1,
A2j+2 A02j+3
j=0
whence the conclusion.

Marking Scheme. Stating that the total area of the small triangles ≥ 1 . . . . . . . . . 1p
Idea of covering the hexagon by flipping the small triangles . . . . . . . . . . . . . . . . . . . . . 2p
Decomposition of the hexagon into three adequate parallelograms and a triangle 1p
Proving that each pair of triangles adjacent to a parallelogram covers that parallel-
ogram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1p
Proving the central triangle also covered . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5p
Remark. Any partial or equivalent approach should be marked accordingly.
Language: English

Saturday, April 28, 2012

Problem 1. Let A, B and C be points lying on a circle Γ with centre O . Assume that
∠ABC > 90◦ . Let D be the point of intersection of the line AB with the line perpendicular to
AC at C . Let ` be the line through D which is perpendicular to AO. Let E be the point of
intersection of ` with the line AC , and let F be the point of intersection of Γ with ` that lies
between D and E .
Prove that the circumcircles of triangles BF E and CF D are tangent at F .

Problem 2. Prove that


X p
(x + y) (z + x)(z + y) ≥ 4(xy + yz + zx),
cyc

for all positive real numbers x, y , and z .


The notation above means that the left-hand side is

p p p
(x + y) (z + x)(z + y) + (y + z) (x + y)(x + z) + (z + x) (y + z)(y + x).

Problem 3. Let n be a positive integer. Let Pn = {2n , 2n−1 · 3, 2n−2 · 32 , . . . , 3n }. For each
subset X of Pn , we write SX for the sum of all elements of X , with the convention that S∅ = 0
where ∅ is the empty set. Suppose that y is a real number with 0 ≤ y ≤ 3n+1 − 2n+1 .
Prove that there is a subset Y of Pn such that 0 ≤ y − SY < 2n .

Problem 4. Let Z+ be the set of positive integers. Find all functions f : Z+ → Z+ such that
the following conditions both hold:
(i) f (n!) = f (n)! for every positive integer n,
(ii) m − n divides f (m) − f (n) whenever m and n are dierent positive integers.

Each problem is worth 10 points.

Time allowed: 4 hours and 30 minutes.


Problem 1.

Solution. Let ` ∩ AO = {K} and G be the other end point of the diameter of Γ through
A. Then D, C, G are collinear. Moreover, E is the orthocenter of triangle ADG. Therefore
GE ⊥ AD and G, E , B are collinear.

As ∠CDF = ∠GDK = ∠GAC = ∠GF C , F G is tangent to the circumcircle of triangle


CF D at F . As ∠F BE = ∠F BG = ∠F AG = ∠GF K = ∠GF E , F G is also tangent to the
circumcircle of BF E at F . Hence the circumcircles of the triangles CF D and BF E are tangent
at F .
Problem 2.

Solution 1. We will obtain the inequality by adding the inequalities


p
(x + y) (z + x)(z + y) ≥ 2xy + yz + zx
for cyclic permutation of x, y , z .
Squaring both sides of this inequality we obtain
(x + y)2 (z + x)(z + y) ≥ 4x2 y 2 + y 2 z 2 + z 2 x2 + 4xy 2 z + 4x2 yz + 2xyz 2
which is equivalent to
x3 y + xy 3 + z(x3 + y 3 ) ≥ 2x2 y 2 + xyz(x + y)
which can be rearranged to
(xy + yz + zx)(x − y)2 ≥ 0,
which is clearly true.

Solution 2.
√ √
For
√ positive real numbers x,√y, z there exists a triangle with the side lengths
x + y, y + z, z + x and the area K = xy + yz + zx/2.
The existence of the triangle is clear by simple checking of the triangle inequality. To prove the
area formula, we have
1√ √
K= x + y z + x sin α,
2
√ √
where α is the angle between the sides of length x + y and z + x. On the other hand, from
the law of cosines we have
x+y+z+x−y−z x
cos α = p =p
2 (x + y)(z + x) (x + y)(z + x)
and √
√ xy + yz + zx
sin α = 1− cos2 α= p .
(x + y)(z + x)

Now the inequality is equivalent to


√ √ √ X√
x+y y+z z+x x + y ≥ 16K 2 .
cyc

This can be rewritten as


√ √ √
x+y y+z z+x K
≥2P √
4K cyc x + y/2
to become the Euler inequality R ≥ 2r.
Problem 3.

Solution 1. Let α = 3/2 so 1 + α > α2 .


Given y , we construct Y algorithmically. Let Y = ∅ and of course S∅ = 0. For i = 0 to m,
perform the following operation:
If SY + 2i 3m−i ≤ y , then replace Y by Y ∪ {2i 3m−i }.
When this process is nished, we have a subset Y of Pm such that SY ≤ y .
Notice that the elements of Pm are in ascending order of size as given, and may alternatively
be described as 2m , 2m α, 2m α2 , . . . , 2m αm . If any member of this list is not in Y , then no two
consecutive members of the list to the left of the omitted member can both be in Y . This is
because 1 + α > α2 , and the greedy nature of the process used to construct Y .
Therefore either Y = Pm , in which case y = 3m+1 − 2m+1 and all is well, or at least one of the
two leftmost elements of the list is omitted from Y .
If 2m is not omitted from Y , then the algorithmic process ensures that (SY − 2m ) + 2m−1 3 > y ,
and so y − SY < 2m . On the other hand, if 2m is omitted from Y , then y − SY < 2m ).

Solution 2. Note that 3m+1 − 2m+1 = (3 − 2)(3m + 3m−1 · 2 + · · · + 3 · 2m−1 + 2m ) = SPm .


Dividing every element of Pm by 2m gives us the following equivalent problem:
Let m be a positive integer, a = 3/2, and Qm = {1, a, a2 , . . . , am }. Show that for any real
number x satisfying 0 ≤ x ≤ 1 + a + a2 + · · · + am , there exists a subset X of Qm such that
0 ≤ x − SX < 1.
We will prove this problem by induction on m. When m = 1, S∅ = 0, S{1} = 1, S{a} = 3/2,
S{1,a} = 5/2. Since the dierence between any two consecutive of them is at most 1, the claim
is true.
Suppose that the statement is true for positive integer m. Let x be a real number with 0 ≤
x ≤ 1 + a + a2 + · · · + am+1 . If 0 ≤ x ≤ 1 + a + a2 + · · · + am , then by the induction hypothesis
there exists a subset X of Qm ⊂ Qm+1 such that 0 ≤ x − SX < 1.
am+1 − 1
If = 1 + a + a2 + · · · + am < x, then x > am+1 as
a−1
am+1 − 1 1
= 2(am+1 − 1) = am+1 + (am+1 − 2) ≥ am+1 + a2 − 2 = am+1 + .
a−1 4
Therefore 0 < (x − am+1 ) ≤ 1 + a + a2 + · · · + am . Again by the induction hypothesis, there
exists a subset X of Qm satisfying 0 ≤ (x − am+1 ) − SX < 1. Hence 0 ≤ x − SX 0 < 1 where
X 0 = X ∪ {am+1 } ⊂ Qm+1 .
Problem 4.

Solution 1. There are three such functions: the constant functions 1, 2 and the identity
function idZ+ . These functions clearly satisfy the conditions in the hypothesis. Let us prove
that there are only ones.
Consider such a function f and suppose that it has a xed point a ≥ 3, that is f (a) = a. Then
a!, (a!)!, · · · are all xed points of f , hence the function f has a strictly increasing sequence
a1 < a2 < · · · < ak < · · · of xed points. For a positive integer n, ak − n divides ak − f (n) =
f (ak ) − f (n) for every k ∈ Z+ . Also ak − n divides ak − n, so it divides ak − f (n) − (ak − n) =
n − f (n). This is possible only if f (n) = n, hence in this case we get f = idZ+ .
Now suppose that f has no xed points greater than 2. Let p ≥ 5 be a prime and notice that
by Wilson's Theorem we have (p − 2)! ≡ 1 (mod p). Therefore p divides (p − 2)! − 1. But
(p − 2)! − 1 divides f ((p − 2)!) − f (1), hence p divides f ((p − 2)!) − f (1) = (f (p − 2))! − f (1).
Clearly we have f (1) = 1 or f (1) = 2. As p ≥ 5, the fact that p divides (f (p − 2))! − f (1)
implies that f (p − 2) < p. It is easy to check, again by Wilson's Theorem, that p does not
divide (p − 1)! − 1 and (p − 1)! − 2, hence we deduce that f (p − 2) ≤ p − 2. On the other
hand, p − 3 = (p − 2) − 1 divides f (p − 2) − f (1) ≤ (p − 2) − 1. Thus either f (p − 2) = f (1)
or f (p − 2) = p − 2. As p − 2 ≥ 3, the last case is excluded, since the function f has no xed
points greater than 2. It follows f (p − 2) = f (1) and this property holds for all primes p ≥ 5.
Taking n any positive integer, we deduce that p − 2 − n divides f (p − 2) − f (n) = f (1) − f (n)
for all primes p ≥ 5. Thus f (n) = f (1), hence f is the constant function 1 or 2.

Solution 2. Note rst that if f (n0 ) = n0 , then m − n0 |f (m) − m for all m ∈ Z+ . If f (n0 ) = n0
for innitely many n0 ∈ Z+ , then f (m) − m has innitely many divisors, hence f (m) = m for
all m ∈ Z+ . On the other hand, if f (n0 ) = n0 for some n0 ≥ 3, then f xes each term of the
sequence (nk )∞
k=0 , which is recursively dened by nk = nk−1 !. Hence if f (3) = 3, then f (n) = n
for all n ∈ Z .
+

We may assume that f (3) 6= 3. Since f (1) = f (1)!, and f (2) = f (2)!, f (1), f (2) ∈ {1, 2}. We
have 4 = 3! − 2|f (3)! − f (2). This together with f (3) 6= 3 implies that f (3) ∈ {1, 2}. Let n > 3,
then n! − 3|f (n)! − f (3) and 3 - f (n)!, i.e. f (n)! ∈ {1, 2}. Hence we conclude that f (n) ∈ {1, 2}
for all n ∈ Z+ .
If f is not constant, then there exist positive integers m, n with {f (n), f (m)} = {1, 2}. Let
k = 2 + max{m, n}. If f (k) 6= f (m), then k − m|f (k) − f (m). This is a contradiction as
|f (k) − f (m)| = 1 and k − m ≥ 2.
Therefore the functions satisfying the conditions are f ≡ 1, f ≡ 2, f = idZ+ .
31st Balkan
Mathematical Olympiad
May 2-7 2014
Pleven
Bulgaria

Problems and Solutions


Problem 1. Let x, y and z be positive real numbers such that xy + yz + zx = 3xyz.
Prove that
x2 y + y 2 z + z 2 x ≥ 2(x + y + z) − 3

and determine when equality holds.

1 1 1
Solution. The given condition can be rearranged to + + = 3. Using this, we obtain:
x y z
1 1 1
x2 y + y 2 z + z 2 x − 2(x + y + z) + 3 = x2 y − 2x + + y 2 z − 2y + + z 2 x − 2x + =
y z x
 2  2  2
1 1 1
= y x− +z y− +x z− ≥0
y z z

Equality holds if and only if we have xy = yz = zx = 1, or, in other words, x = y = z = 1.

1 1 1
Alternative solution. It follows from + + = 3 and Cauchy-Schwarz inequality
x y z
that
 
2 2 2 1 1 1
3(x y + y z + z x) = + + (x2 y + y 2 z + z 2 x)
x y z
 2  2  2 !
1 1 1 √ √ √
= √ + √ + √ ((x y)2 ) + (y z)2 + (z x)2 )
y z x

≥ (x + y + z)2 .

(x + y + z)2
Therefore, x2 y + y 2z + z 2 x ≥ and if x + y + z = t it suffices to show that
3
t2
≥ 2t − 3. The latter is equivalent to (t − 3)2 ≥ 0. Equality holds when
3
√ √ √ √ √ √
x y y = y z z = z x x,

i.e. xy = yz = zx and t = x + y + z = 3. Hence, x = y = z = 1.

Comment. The inequality is true with the condition xy + yz + zx ≤ 3xyz.


Problem 2. A special number is a positive integer n for which there exist positive integers
a, b, c and d with
a3 + 2b3
n= .
c3 + 2d3
Prove that:

(a) there are infinitely many special numbers;

(b) 2014 is not a special number.

Solution. (a) Every perfect cube k 3 of a positive integer is special because we can write

a3 + 2b3 (ka)3 + 2(kb)3


k3 = k3 =
a3 + 2b3 a3 + 2b3

for some positive integers a, b.


(b) Observe that 2014 = 2.19.53. If 2014 is special, then we have,

x3 + 2y 3 = 2014(u3 + 2v 3 ) (1)

for some positive integers x, y, u, v. We may assume that x3 + 2y 3 is minimal with


this property. Now, we will use the fact that if 19 divides x3 + 2y 3, then it divides
both x and y. Indeed, if 19 does not divide x, then it does not divide y too. The
relation x3 ≡ −2y 3 (mod 19) implies (x3 )6 ≡ (−2y 3 )6 (mod 19). The latter congruence
is equivalent to x18 ≡ 26 y 18 (mod 19). Now, according to the Fermat’s Little Theorem,
we obtain 1 ≡ 26 (mod 19), that is 19 divides 63, not possible.
It follows x = 19x1 , y = 19y1 , for some positive integers x1 and y1 . Replacing in (1) we
get
192 (x31 + 2y13) = 2.53(u3 + 2v 3 ) (2)

i.e. 19|u3 + 2v 3 . It follows u = 19u1 and v = 19v1 , and replacing in (2) we get

x31 + 2y13 = 2014(u31 + 2v13 ).


Clearly, x31 + 2y13 < x3 + 2y 3 , contradicting the minimality of x3 + 2y 3.

Problem 3. Let ABCD be a trapezium inscribed in a circle Γ with diameter AB. Let
E be the intersection point of the diagonals AC and BD. The circle with center B and
radius BE meets Γ at the points K and L, where K is on the same side of AB as C. The
line perpendicular to BD at E intersects CD at M.
Prove that KM is perpendicular to DL.

Solution. Since AB k CD, we have that ABCD is isosceles trapezium. Let O be the
center of k and EM meets AB at point Q. Then, from the right angled triangle BEQ, we
have BE 2 = BO.BQ. Since BE = BK, we get BK 2 = BO.BQ (1). Suppose that KL
meets AB at P . Then, from the right angled triangle BAK, we have BK 2 = BP.BA (2)

K
D
b b
b

b
C
M
E b

b b b b b

A Q O P B

BP BO 1
From (1) and (2) we get= = , and therefore P is the midpoint of BQ (3).
BQ BA 2
However, DM k AQ and MQ k AD (both are perpendicular to DB). Hence, AQMD
is parallelogram and thus MQ = AD = BC. We conclude that QBCM is isosceles
trapezium. It follows from (3) that KL is the perpendicular bisector of BQ and CM,
that is, M is symmetric to C with respect to KL. Finally, we get that M is the orthocenter
of the triangle DLK by using the well-known result that the reflection of the orthocenter
of a triangle to every side belongs to the circumcircle of the triangle and vise versa.

Problem 4. Let n be a positive integer. A regular hexagon with side length n is divided
into equilateral triangles with side length 1 by lines parallel to its sides.
Find the number of regular hexagons all of whose vertices are among the vertices of the
equilateral triangles.

Solution. By a lattice hexagon we will mean a regular hexagon whose sides run along edges
of the lattice. Given any regular hexagon H, we construct a lattice hexagon whose edges
pass through the vertices of H, as shown in the figure, which we will call the enveloping
lattice hexagon of H. Given a lattice hexagon G of side length m, the number of regular
hexagons whose enveloping lattice hexagon is G is exactly m.

b b b b b

Yet also there are precisely 3(n−m)(n−m+1)+1 lat- b b

b b b b b

tice hexagons of side length m in our lattice: they are


b b b

those with centres lying at most n − m steps from the b b b

b b b

centre of the lattice. In particular, the total number


b b

of regular hexagons equals b b b

b b b b b

X
n X
n X
n X
n
2 2
N= (3(n − m)(n − m + 1) + 1)m = (3n + 3n) m − 3(2m + 1) m +3 m3 .
m=1 m=1 m=1 m=1

X  2
n(n + 1) X 2 X
n n n
n(n + 1)(2n + 1) 3 n(n + 1)
Since m = , m = and m = it is
2 6 2
m=1
 m=1
2 m=1
n(n + 1)
easily checked that N = .
2
Solutions of Benelux Mathematical Olympiad 2010

Problem 1. A finite set of integers is called bad if its elements add up to 2010. A finite
set of integers is a Benelux-set if none of its subsets is bad. Determine the smallest integer
n such that the set {502, 503, 504, . . . , 2009} can be partitioned into n Benelux-sets.
(A partition of a set S into n subsets is a collection of n pairwise disjoint subsets of S, the
union of which equals S.)

Solution. As 502 + 1508 = 2010, the set S = {502, 503, . . . , 2009} is not a Benelux-set, so
n = 1 does not work. We will prove that n = 2 does work, i.e. that S can be partitioned
into 2 Benelux-sets.
Define the following subsets of S:

A = {502, 503, . . . , 670},


B = {671, 672, . . . , 1005},
C = {1006, 1007, . . . , 1339},
D = {1340, 1341, . . . , 1508},
E = {1509, 1510, . . . , 2009}.

We will show that A ∪ C ∪ E and B ∪ D are both Benelux-sets.


Note that there does not exist a bad subset of S of one element, since that element would
have to be 2010. Also, there does not exist a bad subset of S of more than three elements,
since the sum of four or more elements would be at least 502+503+504+505 = 2014 > 2010.
So any possible bad subset of S contains two or three elements.
Consider a bad subset of two elements a and b. As a, b ≥ 502 and a + b = 2010, we have
a, b ≤ 2010 − 502 = 1508. Furthermore, exactly one of a and b is smaller than 1005 and
one is larger than 1005. So one of them, say a, is an element of A ∪ B, and the other is an
element of C ∪ D. Suppose a ∈ A, then b ≥ 2010 − 670 = 1340, so b ∈ D. On the other
hand, suppose a ∈ B, then b ≤ 2010 − 671 = 1339, so b ∈ C. Hence {a, b} cannot be a
subset of A ∪ C ∪ E, nor of B ∪ D.
Now consider a bad subset of three elements a, b and c. As a, b, c ≥ 502, a + b + c = 2010,
and the three elements are pairwise distinct, we have a, b, c ≤ 2010 − 502 − 503 = 1005.
So a, b, c ∈ A ∪ B. At least one of the elements, say a, is smaller than 2010
3
= 670, and at
least one of the elements, say b, is larger than 670. So a ∈ A and b ∈ B. We conclude that
{a, b, c} cannot be a subset of A ∪ C ∪ E, nor of B ∪ D.
This proves that A ∪ C ∪ E and B ∪ D are Benelux-sets, and therefore the smallest n for
which S can be partitioned into n Benelux-sets is n = 2. 

Remark. Observe that A ∪ C ∪ E1 and B ∪ D ∪ E2 are also Benelux-sets, where {E1 , E2 }


is any partition of E.
Problem 2. Find all polynomials p(x) with real coefficients such that

p(a + b − 2c) + p(b + c − 2a) + p(c + a − 2b) = 3p(a − b) + 3p(b − c) + 3p(c − a)

for all a, b, c ∈ R.

Solution 1. For a = b = c, we have 3p(0) = 9p(0), hence p(0) = 0. Now set b = c = 0,


then we have
p(a) + p(−2a) + p(a) = 3p(a) + 3p(−a)
for all a ∈ R. So we find a polynomial equation

p(−2x) = p(x) + 3p(−x). (1)

Note that the zero polynomial is a solution to this equation. Now suppose that p is not the
zero polynomial, and let n ≥ 0 be the degree of p. Let an 6= 0 be the coefficient of xn in
p(x). At the left-hand side of (1), the coefficient of xn is (−2)n · an , while at the right-hand
side the coefficient of xn is an + 3 · (−1)n · an . Hence (−2)n = 1 + 3 · (−1)n . For n even,
we find 2n = 4, so n = 2, and for n odd, we find −2n = −2, so n = 1. As we already know
that p(0) = 0, we must have p(x) = a2 x2 + a1 x, where a1 and a2 are real numbers (possibly
zero).
The polynomial p(x) = x is a solution to our problem, as

(a + b − 2c) + (b + c − 2a) + (c + a − 2b) = 0 = 3(a − b) + 3(b − c) + 3(c − a)

for all a, b, c ∈ R. Also, p(x) = x2 is a solution, since

(a + b − 2c)2 + (b + c − 2a)2 + (c + a − 2b)2 = 6(a2 + b2 + c2 ) − 6(ab + bc + ca)


= 3(a − b)2 + 3(b − c)2 + 3(c − a)2

for all a, b, c ∈ R.
Now note that if p(x) is a solution to our problem, then so is λp(x) for all λ ∈ R. Also,
if p(x) and q(x) are both solutions, then so is p(x) + q(x). We conclude that for all real
numbers a2 and a1 the polynomial a2 x2 + a1 x is a solution. Since we have already shown
that there can be no other solutions, these are the only solutions. 

Solution 2. For a = b = c, we have 3p(0) = 9p(0), hence p(0) = 0. Now set b = c = 0,


then we have
p(a) + p(−2a) + p(a) = 3p(a) + 3p(−a)
for all a ∈ R. So we find a polynomial equation

p(−2x) = p(x) + 3p(−x). (2)


Define q(x) = p(x) + p(−x), then we find that

q(2x) = p(2x) + p(−2x) = (p(−x) + 3p(x)) + (p(x) + 3p(−x)) = 4q(x). (3)

Note that the zero polynomial is a solution to this equation. Now suppose that q is not
the zero polynomial, and let m ≥ 0 be the degree of q. Let bm 6= 0 be the coefficient
of xm in q(x). At the left-hand side of (3), the coefficient of xm is 2m · bm , while at the
right-hand side the coefficient of xm is 4bm . Hence m = 2. As q(x) = p(x) + p(−x), the
polynomial q(x) does not contain any nonzero terms with odd exponent of x. Since also
q(0) = 2p(0) = 0, we conclude that

q(x) = b2 x2 ,

where b2 is a real number (possibly zero).


From (2) we now deduce that p(2x) = p(−x) + 3p(x) = 2p(x) + q(x), so

p(2x) − 2p(x) = b2 x2 . (4)

Suppose that that degree n of p is greater than 2. Let an 6= 0 be the coefficient of xn


in p(x). At the left-hand side of (4), the coefficient of xn is (2n − 2) · an 6= 0. But the
coefficient of xn at the right-hand side vanishes, yielding a contradiction. So the degree of
p is at most 2. As we already know that p(0) = 0, we must have p(x) = a2 x2 + a1 x, where
a1 and a2 are real numbers (possibly zero).
We finally check that every polynomial of this form is indeed a solution (see solution 1). 
Problem 3. On a line l there are three different points A, B and P in that order. Let a be
the line through A perpendicular to l, and let b be the line through B perpendicular to l.
A line through P , not coinciding with l, intersects a in Q and b in R. The line through A
perpendicular to BQ intersects BQ in L and BR in T . The line through B perpendicular
to AR intersects AR in K and AQ in S.

(a) Prove that P , T , S are collinear.

(b) Prove that P , K, L are collinear.

Solution 1.

(a) Since P , R and Q are collinear, we have 4P AQ ∼ 4P BR, hence

|AQ| |AP |
= .
|BR| |BP |

Conversely, P , T and S are collinear if it holds that

|AS| |AP |
= .
|BT | |BP |

So it suffices to prove
|BT | |AS|
= .
|BR| |AQ|
Since ∠ABT = 90◦ = ∠ALB and ∠T AB = ∠BAL, we have 4ABT ∼ 4ALB.
And since ∠ALB = 90◦ = ∠QAB and ∠LBA = ∠ABQ, we have 4ALB ∼ 4QAB.
Hence 4ABT ∼ 4QAB, so
|BT | |AB|
= .
|BA| |AQ|
Similarly, we have 4ABR ∼ 4AKB ∼ 4SAB, so

|BR| |AB|
= .
|BA| |AS|

Combining both results, we get

|BT | |BT |/|BA| |AB|/|AQ| |AS|


= = = ,
|BR| |BR|/|BA| |AB|/|AS| |AQ|

which had to be proved.


(b) Let the line P K intersect BR in B1 and AQ in A1 and let the line P L intersect BR
in B2 and AQ in A2 . Consider the points A1 , A and S on the line AQ, and the points
B1 , B and T on the line BR. As AQ k BR and the three lines A1 B1 , AB and ST
are concurrent (in P ), we have

A1 A : AS = B1 B : BT,

where all lengths are directed. Similarly, as A1 B1 , AR and SB are concurrent (in
K), we have
A1 A : AS = B1 R : RB.
This gives
BB1 RB1 RB + BB1 BB1 BB1
= = =1+ =1− ,
BT RB RB RB BR
so
1
BB1 = 1 1 .
BT
+ BR

Similary, using the lines A2 B2 , AB and QR (concurrent in P ) and the lines A2 B2 ,


AT and QB (concurrent in L), we find

B2 B : BR = A2 A : AQ = B2 T : T B.

This gives
BB2 T B2 T B + BB2 BB2 BB2
= = =1+ =1− ,
BR TB TB TB BT
so
1
BB2 = 1 1 .
BR
+ BT
We conclude that B1 = B2 , which implies that P , K and L are collinear.

Solution 2.

(a) Define X as the intersection of AT and BS, and Y as the intersection of AR and BQ.
To prove that P , S and T are collinear, we will use Menelaos’ theorem in 4ABX,
so we have to prove
AP BS XT
= −1.
P B SX T A
Note that B is between P and A, X is between S and B, and X is between T and
A, so it suffices to prove that

|AP | |BS| |XT |


= 1.
|P B| |SX| |T A|
Because AQ and BR are parallel, we have 4AQP ∼ 4BRP , hence
|AP | |QA|
= . (5)
|BP | |RB|
Also, since ∠ASB = ∠KBR and ∠BAS = 90◦ = ∠BKR, we have 4ASB ∼
4KBR, hence
|BS| |AS| |AS|
= , so |BS| = |RB|. (6)
|RB| |KB| |KB|
Similarly, we have 4AT B ∼ 4QAL, hence
|T A| |T B| |T B|
= , so |T A| = |AQ|. (7)
|AQ| |AL| |AL|
As ∠ASX = ∠ASB = 90◦ − ∠ABS = 90◦ − ∠ABK = ∠KAB = ∠Y AB, and
∠SAX = 90◦ − ∠XAB = 90◦ − ∠LAB = ∠ABL = ∠ABY , we have 4SXA ∼
4AY B, hence
|SX| |AS| |AS|
= , so |SX| = |AY |. (8)
|AY | |BA| |BA|
Similarly, we have 4BXT ∼ 4AY B, hence
|XT | |BT | |BT |
= , so |XT | = |Y B|. (9)
|Y B| |AB| |AB|

By combining (5) - (9), we find

|AP | |BS| |XT | |QA| |AS| |BA| |BT | |AL|


= · |RB| · · |Y B| ·
|P B| |SX| |T A| |RB| |KB| |AS||AY | |AB| |T B||AQ|
|AL| |Y B|
= . (10)
|KB| |AY |
Since ∠Y LA = 90◦ = ∠Y KB and ∠AY L = ∠BY K, we have 4AY L ∼ 4BY K,
hence
|AL| |AY | |AL| |BY |
= , so = 1. (11)
|BK| |BY | |BK| |AY |
By combining (10) and (11), we find

|AP | |BS| |XT |


= 1,
|P B| |SX| |T A|
as we wanted to prove.

(b) Again, we will use Menelaos’ theorem in 4ABX, so we have to prove


AP BK XL
= −1.
P B KX LA
AP BK XL
Note that PB
< 0, and KX
< 0 if and only if LA
< 0, so it suffices to prove that

|AP | |BK| |XL|


= 1.
|P B| |KX| |LA|

As ∠BXL = ∠AXK and ∠BLX = 90◦ = ∠AKX, we have 4BLX ∼ 4AKX,


hence
|XL| |BL|
= . (12)
|XK| |AK|
Since ∠ALB = 90◦ = ∠QAB, we have 4ALB ∼ 4QAB, hence

|LA| |LB| |LB|


= , so |LA| = |AQ|. (13)
|AQ| |AB| |AB|

Similarly, we have 4AKB ∼ 4ABR, hence

|BK| |AK| |AK|


= , so |BK| = |RB|. (14)
|RB| |AB| |AB|

By combining (5) and (12) - (14), we find

|AP | |BK| |XL| |QA| |BL| |AB| |AK|


= · · · |RB| = 1,
|P B| |KX| |LA| |RB| |AK| |LB||AQ| |AB|

which is what we wanted to prove.

Solution 3. As ∠AKB = ∠ALB = 90◦ , the points K and L belong to the circle with
diameter AB. Since ∠QAB = ∠ABR = 90◦ , the lines AQ and BR are tangents to this
circle.
Apply Pascal’s theorem to the points A, A, K, L, B and B, all on the same circle. This
yields that the intersection Q of the tangent in A and the line BL, the intersection R of
the tangent in B and the line AK, and the intersection of KL and AB are collinear. So
KL passes through the intersection of AB and QR, which is point P . Hence P , K and L
are collinear. This proves part b.
Now apply Pascal’s theorem to the points A, A, L, K, B and B. This yields that the
intersection S of the tangent in A and the line BK, the intersection T of the tangent in B
and the line AL, and the intersection P of KL and AB are collinear. This proves part a. 

Solution 4.
(a) W.l.o.g. we may assume that A = (0, 0) and B = (1, 0) and the line through P is in
the upper half plane, so l is the x-axis, a is the y-axis and b is the line x = 1. Take
P = (p, 0) (p > 1) and Q = (0, q) (q > 0). Since P Q is given by xp + yq = 1, we find
R = (1, q(p−1)
p
).
Now AR is given by y = q(p−1)
p
x, hence BS, the line perpendicular to AR and passing
p p
through B = (1, 0), is given by y = − q(p−1) (x − 1). We find S = (0, q(p−1) ).
Moreover BQ is given by y = −q(x − 1), hence AT , the line perpendicular to BQ
and passing through A = (0, 0), is given by y = 1q x. We find T = (1, 1q ). Since
p
|BT | 1/q q(p−1) |AS|
|BP |
= p−1
= p
= |AP |
, we conclude that P , T and S are collinear.

(b) Point K is the intersection of AR and BS. Solving for x yields

q(p − 1) p
x=− (x − 1)
p q(p − 1)
 
q(p − 1) p p
+ x=
p q(p − 1) q(p − 1)
p
q(p−1)
x= q(p−1) p
p
+ q(p−1)

so p
!
q(p−1) 1
K= q(p−1) p
, q(p−1) p
.
p
+ q(p−1) p
+ q(p−1)

Point L is the point of intersection of AT and BQ. Solving for x yields


1
x = −q(x − 1)
q
 
1
+q x=q
q
q
x= 1
q
+q
so !
q 1
L= 1 , 1 .
q
+q q
+q
Let K0 and L0 be the projections of K and L on the x-axis. We have to show that
the following fractions are equal:
1 1
q(p−1) p
|K0 K| p
+ q(p−1) |L0 L| 1
+q
= p and = q q
|K0 P | q(p−1)
p − q(p−1) |L0 P | p − 1 +q
p q
p
+ q(p−1)
Working out cross products twice, this comes down to
p
! !
1 q ? 1 q(p−1)
q(p−1) p
· p− 1 = 1 · p − q(p−1) p
p
+ q(p−1) q
+q q
+q p
+ q(p−1)
p
  !   !
1 q ? q(p − 1) p q(p−1)
+q · p− 1 = + · p− q(p−1)
q q
+q p q(p − 1) p
+ q(p−1)
p
p ? p2 p
+ pq − q = q(p − 1) + −
q q(p − 1) q(p − 1)
p ? p(p − 1)
+ pq − q = q(p − 1) + ,
q q(p − 1)

which is clearly true. 


Problem 4. Find all quadruples (a, b, p, n) of positive integers, such that p is a prime and

a3 + b 3 = p n .

Solution 1. Let (a, b, p, n) be a solution. Note that we can write the given equation as

(a + b)(a2 − ab + b2 ) = pn .

As a and b are positive integers, we have a + b ≥ 2, so p | a + b. Furthermore, a2 − ab + b2 =


(a − b)2 + ab, so either a = b = 1 or a2 − ab + b2 ≥ 2. Assume that the latter is the case.
Then p is a divisor of both a+b and a2 −ab+b2 , hence also of (a+b)2 −(a2 −ab+b2 ) = 3ab.
This means that p either is equal to 3 or is a divisor of ab. Since p is a divisor of a + b, we
have p | a ⇔ p | b, hence either p = 3, or p | a and p | b. If p | a and p | b, then we can
write a = pa0 , b = pb0 with a0 and b0 positive integers, and we have (a0 )3 + (b0 )3 = pn−3 , so
(a0 , b0 , p, n − 3) then is another solution (note that (a0 )3 + (b0 )3 is a positive integer greater
than 1, so n − 3 is positive).
Now assume that (a0 , b0 , p0 , n0 ) is a solution such that p - a. From the reasoning above
it follows that either a0 = b0 = 1, or p0 = 3. After all, if we do not have a0 = b0 = 1
and we have p0 6= 3, then p | a. Also, given an arbitrary solution (a, b, p, n), we can divide
everything by p repeatedly until there are no factors p left in a.
Suppose a0 = b0 = 1. Then the solution is (1, 1, 2, 1).
Suppose p0 = 3. Assume that 32 | (a20 − a0 b0 + b20 ). As 32 | (a0 + b0 )2 , we then have
32 | (a0 + b0 )2 − (a20 − a0 b0 + b20 ) = 3a0 b0 , so 3 | a0 b0 . But 3 - a0 by assumption, and
3 | a0 + b0 , so 3 - b0 , which contradicts 3 | a0 b0 . We conclude that 32 - (a20 − a0 b0 + b20 ). As
both a0 + b0 and a20 − a0 b0 + b20 must be powers of 3, we have a20 − a0 b0 + b20 = 3. Hence
(a0 − b0 )2 + a0 b0 = 3. We must have (a0 − b0 )2 = 0 or (a0 − b0 )2 = 1. The former does not
give a solution; the latter gives a0 = 2 and b0 = 1 or a0 = 1 and b0 = 2.
So all solutions with p - a are (1, 1, 2, 1), (2, 1, 3, 2) and (1, 2, 3, 2). From the above it follows
that all other solutions are of the form (pk0 a0 , pk0 b0 , p0 , n0 + 3k), where (a0 , b0 , p0 , n0 ) is
one of these three solutions. Hence we find three families of solutions:

• (2k , 2k , 2, 3k + 1) with k ∈ Z≥0 ,

• (2 · 3k , 3k , 3, 3k + 2) with k ∈ Z≥0 ,

• (3k , 2 · 3k , 3, 3k + 2) with k ∈ Z≥0 .

It is easy to check that all these quadruples are indeed solutions. 

Solution 2. Let (a, b, p, n) be a solution. Note that we can write the given equation as

(a + b)(a2 − ab + b2 ) = pn .
As a and b are positive integers, we have a + b ≥ 2 and a2 − ab + b2 = (a − b)2 + ab ≥ 1.
So both factors are positive and therefore must be powers of p. Let k be an integer with
1 ≤ k ≤ n such that a + b = pk . Then a2 − ab + b2 = pn−k . If we substitute b = pk − a, we
find
pn−k = (a + b)2 − 3ab = p2k − 3a(pk − a).
We can rewrite this as:
3a2 − 3pk a + p2k − pn−k = 0,
from which we see that a is a solution of the following quadratic equation in x:

3x2 − 3pk x + p2k − pn−k = 0. (15)

The discriminant of (15) is

D = (−3pk )2 − 4 · 3 · (p2k − pn−k ) = 3 · (4pn−k − p2k ) = 3pn−k · (4 − p3k−n ).

As pn−k = (a + b)2 − 3ab < (a + b)2 = p2k , we have n − k < 2k, so 3k − n > 0. Since a is
a solution of (15), the discriminant must be nonnegative. Hence 4 − p3k−n ≥ 0. If p = 2,
this implies 3k − n = 1 or 3k − n = 2; if p = 3, this implies 3k − n = 1; and if p > 3, then
p ≥ 5 so 4 ≥ p3k−n can never be true.
Suppose p = 2 and 3k − n = 1. Then D = 3 · 22k−1 · (4 − 2) = 3 · 22k . But this is a not a
square, so the solutions of (15) will not be integers, which yields a contradiction.
Suppose p = 2 and 3k − n = 2. Then D = 3 · 22k−2 · (4 − 4) = 0, so the only solution of (15)
k
is x = 3·2
2·3
= 2k−1 . Therefore a = 2k−1 and b = 2k − a = 2k−1 , and this gives a solution for
all k ≥ 1, namely (2k−1 , 2k−1 , 2, 3k − 2).
Suppose p = 3 and 3k − n = 1. Then D = 3 · 32k−1 · (4 − 3) = 32k , so the solutions of (15)
k+1 k
are x = 3 2·3±3 = 21 (3k ± 3k−1 ). Therefore a = 2 · 3k−1 or a = 3k−1 . For all k ≥ 1 we find
the solutions (2 · 3k−1 , 3k−1 , 3, 3k − 1) and (3k−1 , 2 · 3k−1 , 3, 3k − 1).
We conclude that there are three families of solutions:

• (2k−1 , 2k−1 , 2, 3k − 2) with k ∈ Z≥1 ,

• (2 · 3k−1 , 3k−1 , 3, 3k − 1) with k ∈ Z≥1 ,

• (3k−1 , 2 · 3k−1 , 3, 3k − 1) with k ∈ Z≥1 .

It is easy to check that all these quadruples are indeed solutions. 


THIRD BENELUX
BxMO MATHEMATICAL OLYMPIAD
2011 Luxembourg, 6–8 May 2011

PROBLEMS
AND

SOLUTIONS
Problem 1
An ordered pair of integers (m, n) with 1 < m < n is said to be a Benelux couple if the
following two conditions hold : m has the same prime divisors as n, and m + 1 has the same
prime divisors as n + 1.

(a) Find three Benelux couples (m, n) with m 6 14.

(b) Prove that there exist infinitely many Benelux couples.

Solution
(a) It is possible to see that (2, 8), (6, 48) and (14, 224) are Benelux couples.

(b) Let k > 2 be an integer and m = 2k − 2. Define n = m(m + 2) = 2k 2k − 2 . Since m is even, m and n
have the same prime factors. Also, n + 1 = m(m + 2) + 1 = (m + 1)2 , so m + 1 and n + 1 have the same

prime factors, too. We have thus obtained a Benelux couple 2k − 2, 2k (2k − 2) for each k > 2.
Problem 2
Let ABC be a triangle with incentre I. The angle bisectors AI, BI and CI meet [BC], [CA]
and [AB] at D, E and F , respectively. The perpendicular bisector of [AD] intersects the lines
BI and CI at M and N , respectively. Show that A, I, M and N lie on a circle.

Solution
The quadrilateral AM DB is cyclic. Indeed, M is the intersection of the line BI, which bisects the angle
ABD
\ in ABD and the perpendicular bisector of [AD]. By uniqueness of this intersection point, it follows
that M lies on the circumcircle of ABD, and thence AM DB is cyclic. Analogously, AN DC is cyclic.
Moreover, M N BC is cyclic, for N\ M I = 90◦ − EIA.
[ Indeed, A and I lie on either side of the midpoint of
[AD], for BDA
\ = CAD \ + BCA \ > BAD. \ But
 
[ = 180◦ − 1 BAC
EIA \ − BEA \ = 180◦ − 1 BAC\ − 1 CBA
\ + BCA \ = 90◦ − 1 BCA \
2 2 2 2

It follows that N
\ M I = BCI,
[ which implies that M N BC is cyclic, as the points I and D lie on the same
side of M N .

There are now two ways of completing the proof :

Solution 1 (using AM DB and M N BC)


Since AM DB is cyclic, M
\ AI = M
\ AD = M \ BD, as, by construction, B and M lie on either side of AD.
Moreover, M
\ BD = M\ BC = M \N C for M N BC is cyclic. Thus M
\ AI = M
\ N I, so AM IN is cyclic, for M
and N lie on either side of AD.

Solution 2 (using AM DB and AN DC)


Since AM DB and AN DC are cylic, AM
\ I + AN
[I = AM
\ B + AN
\ C = ADB \ = 180◦ , because B and
\ + ADC
M , and C and N lie on either side of AD. Hence AM IN is cyclic, for M and N lie on either side of AD.

M
E
N
F
I

Remark. It is moreover true that BM ⊥ DN and CN ⊥ DM . Indeed, symmetry implies that the image
J of I under reflection in M N lies on the circumcircle of DM N . Moreover, DI is a height of DM N , so
the fact that I and J are equidistant from the side [M N ] implies that I is the orthocentre of DM N . This
implies the claim.
Problem 3
If k is an integer, let c(k) denote the largest cube that is less than or equal to k. Find all
positive integers p for which the following sequence is bounded :

a0 = p and an+1 = 3an − 2c(an ) for n > 0.

Solution
Since c(an ) 6 an for all n ∈ N, an+1 > an with equality if and only if c(an ) = an . Hence the sequence is
bounded if and only if it is eventually constant, which is if and only if an is a perfect cube, for some n > 0.
In particular, the sequence is bounded if p is a perfect cube.

We now claim that, if an is not a cube for some n, then neither is an+1 . Indeed, if an is not a cube,
q 3 < an < (q + 1)3 for some q ∈ N, so that c(an ) = q 3 . Suppose to the contrary that an+1 is a cube. Then

an+1 = 3an − 2c(an ) < 3(q + 1)3 − 2q 3 = q 3 + 9q 2 + 9q + 3 < q 3 + 9q 2 + 27q + 27 = (q + 3)3

Also, since c(an ) < an , an+1 > an > q 3 , so q 3 < an+1 < (q + 3)3 . It follows that the only possible values of
an+1 are (q + 1)3 and (q + 2)3 . However, in both of these cases,

3an − 2q 3 = an+1 = (q + 1)3 ⇐⇒ 3an = 3 q 3 + q 2 + q + 1




3an − 2q 3 = an+1 = (q + 2)3 ⇐⇒ 3an = 3 q 3 + 2q 2 + 4q + 8




a contradiction modulo 3. This proves that, if an is not a cube, then neither is an+1 . Hence, if p is not
a perfect cube, an is not a cube for any n ∈ N, and the sequence is not bounded. We conclude that the
sequence is bounded if and only if p is a perfect cube.
Problem 4
Abby and Brian play the following game : They first choose a positive integer N . Then they
write numbers on a blackboard in turn. Abby starts by writing a 1. Thereafter, when one of
them has written the number n, the other writes down either n + 1 or 2n, provided that the
number is not greater than N . The player who writes N on the blackboard wins.

(a) Determine which player has a winning strategy if N = 2011.

(b) Find the number of positive integers N 6 2011 for which Brian has a winning strategy.

Solution
(a) Abby has a winning strategy for odd N : Observe that, whenever any player writes down an odd number,
the other player has to write down an even number. By adding 1 to that number, the first player can
write down another odd number. Since Abby starts the game by writing down an odd number, she can
force Brian to write down even numbers only. Since N is odd, Abby will win the game. In particular,
Abby has a winning strategy if N = 2011.

(b) − Let N = 4k. If any player is forced to write down a number m ∈ k+1, k+2, . . . , 2k , the other player

wins the game by writing down 2m ∈ 2k + 2, 2k + 4, . . . , 4k , for the players will have to write down
the remaining numbers one after the other. Since there is an even number of numbers remaining, the
latter player wins. This implies that the player who can write down k, i.e. has a winning strategy for
N = k, wins the game for N = 4k.

− Similarly, let N = 4k +2. If any player is forced to write down a number m ∈ k +1, k +2, . . . , 2k +1 ,

the other player wins the game by writing down 2m ∈ 2k + 2, 2k + 4, . . . , 4k + 2 , as in the previous
case. Analogously, this implies that the player who has a winning strategy for N = k wins the game
for N = 4k + 2.
Since Abby wins the game for N = 1, 3, while Brian wins the game for N = 2, Brian wins the game for
N = 8, 10, as well, and thus for N = 32, 34, 40, 42, too. Then Brian wins the game for a further 8 values
of N between 128 and 170, and thence for a further 16 values between 512 and 682, and for no other
values with N 6 2011. Hence Brian has a winning strategy for precisely 31 values of N with N 6 2011.
4th Benelux Mathematical Olympiad
20–22 April 2012 — Namur, Belgium

Solutions

Problem 1. A sequence a1 , a2 , . . . , an , . . . of natural numbers is defined by the rule

an+1 = an + bn (n = 1, 2, . . . )

where bn is the last digit of an . Prove that such a sequence contains infinitely many powers of
2 if and only if a1 is not divisible by 5.

Solution. First we can observe that:

• If a1 is divisible by 5, then an = a2 = 0 (mod 10) ∀n ≥ 2.

• If a1 is not divisible by 5, then for n ≥ 2: an is even, the sequence bn is periodic, its


period is a cyclic permutation of (2, 4, 8, 6), and an+4 = an + 20.

(a) Let us suppose that a1 is divisible by 5.


Since 2k 6= 0 (mod 10) for any k ∈ N, the sequence does not contain any power of 2 for
n ≥ 2.

(b) Let us suppose that a1 is not divisible by 5.


We can remark that the sequence of powers of 2 modulo 20 respects the period (12, 4, 8, 16)
starting with 25 = 32. We choose j such that aj = 2 (mod 10) (i.e. bj = 2) and look at
the parity of its penultimate digit.

• If aj = 12 (mod 20), then the numbers aj+4k , k ∈ N, represent all the numbers
congruent to 12 (mod 20) and greater than aj , so all powers of 2 congruent to 12
(mod 20) and greater than aj appear in the sequence.
• If aj = 2 (mod 20), then the numbers aj+1+4k , k ∈ N, represent all the numbers
congruent to 4 (mod 20) and greater than aj+1 , so all powers of 2 congruent to 4
(mod 20) and greater than aj+1 appear in the sequence.

Thus, the sequence contains infinitely many powers of 2.

Alternative 1 for (b). We choose j such that aj = 2 (mod 10) (i.e. bj = 2).

• If aj = 20t + 12 for some t ∈ N, then aj+4k = aj + 20k = 20(t + k) + 12, ∀k ∈ N. We


4s+3
obtain infinitely many powers of 2 by taking k = 2 5 −3 − t (with s ∈ N large enough to
have k > 0) since 24s+3 = 3 (mod 5), ∀s ∈ N.

1
• If aj = 20t + 2 for some t ∈ N, then aj+1+4k = aj+1 + 20k = 20(t + k) + 4, ∀k ∈ N. We
4s
obtain infinitely many powers of 2 by taking k = 2 5−1 − t (with s ∈ N large enough to
have k > 0) since 24s = 1 (mod 5), ∀s ∈ N.

Alternative 2 for (b). Choose j such that aj is a multiple of 4, i.e. aj = 4q (such a j always
exists since an+1 = an + 2 for infinitely many n). Then we have aj+4k = aj + 20k = 4(q + 5k).
Let us look for (k, m) such that

aj+4k = 2m ⇐⇒ 4(q + 5k) = 2m ⇐⇒ q + 5k = 2m−2 ⇐⇒ 2m−2 = q (mod 5).

Since q could not be a multiple of 5, we have q ∈ {1, 2, 3, 4} (mod 5). Since the sequence
2m−2 (mod 5) is periodic with period (1, 2, 4, 3), we find that 2m−2 = q (mod 5) happens for
infinitely many values of m. Hence 2m−2 = q + 5k is solvable for infinitely many pairs (k, m).
Noting that m determines k and that k is nonnegative as soon as m is large enough concludes
the proof.

Alternative 3 for (b). We shall show that for any n > 1 there is some k ≥ n such that ak
is a power of 2. First, we observe that we can always find m ∈ {n, n + 1, n + 2, n + 3} such
that am is divisible by 4. If am is not a power of 2, we write am = 2b c with b ≥ 2 and c > 1
odd. Then we have
c+5
am+4·2b−2 = am + 20 (2b−2 ) = 2b c + 5 · 2b = 2b+1 ·
2
If c > 5, we have c+5
2
< c and hence the odd factor of am+4.2b−2 is strictly smaller than the odd
0
factor of am . Therefore there is some m0 > m such that am0 = 2b c0 with c0 odd and ≤ 5. The
0
case c0 = 5 is forbidden. If c0 = 1, then am0 is a power of 2. If c0 = 3, then am0 +4.2b0 −2 = 2b +3 is
a power of 2.

2
Problem 2. Find all quadruples (a, b, c, d) of positive real numbers such that abcd = 1,
a2012 + 2012b = 2012c + d2012 and 2012a + b2012 = c2012 + 2012d.

Solution. Rewrite the last two equations into

a2012 − d2012 = 2012(c − b) and c2012 − b2012 = 2012(a − d) (1)

and observe that a = d holds if and only if c = b holds. In that case, the last two equa-
tions are satisfied, and condition abcd = 1 leads to a set of valid quadruples of the form
(a, b, c, d) = (t, 1t , 1t , t) for any t > 0.
We show that there are no other solutions. Assume that a 6= d and c 6= b. Multiply both sides
of (1) to obtain
(a2012 − d2012 )(c2012 − b2012 ) = 20122 (c − b)(a − d)
and divide the left-hand side by the (nonzero) right-hand side to get

a2011 + · · · + a2011−i di + · · · + d2011 c2011 + · · · + c2011−i bi + · · · + b2011


· =1.
2012 2012
Now apply the arithmetic-geometric mean inequality to the first factor

a2011 + · · · + a2011−i di + · · · + d2011


q
2012 2011×2012 2011
> (ad) 2 = (ad) 2 .
2012
The inequality is strict, since equality holds only if all terms in the mean are equal to each
other, which happens only if a = d. Similarly, we find

c2011 + · · · + c2011−i bi + · · · b2011


q
2012 2011×2012 2011
> (cb) 2 = (cb) 2 .
2012
Multiplying both inequalities, we obtain
2011 2011
(ad) 2 (cb) 2 <1

which is equivalent to abcd < 1, a contradiction.

3
Problem 3. In triangle ABC the midpoint of BC is called M . Let P be a variable interior
point of the triangle such that ∠CP M = ∠P AB. Let Γ be the circumcircle of triangle ABP .
The line M P intersects Γ a second time in Q. Define R as the reflection of P in the tangent
to Γ in B. Prove that the length |QR| is independent of the position of P inside the triangle.

Solution. We claim |QR| = |BC|, which will clearly imply that quantity |QR| is independent
from the position of P inside triangle 4ABC (and independent from the position of A).
This equality will follow from the equality between triangles 4BP C and 4RBQ. This in turn
will be shown by means of three equalities (two sides and an angle): |BP | = |RB|, |P C| = |BQ|
and ∠BP C = ∠RBQ.
Γ Q

P
α

M C
B

(a) |BP | = |RB|


Obvious since R is the reflection of P in a line going through B.

(b) |P C| = |BQ|
Let U be the fourth vertex of parallelogram BP CU . Then U is on line P Q and ∠BU P =
∠U P C = α. If Q is on the same arc P B as A, then ∠BQP = α, and 4QP U is isosceles;
hence, |BQ| = |BU | = |P C|. On the other way, if Q is on the other arc P B, then
∠BQP and α are supplementary, hence BQU = α, and again 4QP U is isosceles; the
same conclusion follows.

(c) ∠BP C = ∠RBQ


Define T to be the midpoint of P R. Then line BT , tangent to circle Γ in B, splits ∠RBQ
into two parts, ∠RBT and ∠T BQ.
We first show that ∠RBT = α. Indeed, by symmetry, ∠RBT = ∠P BT and, since BT
is tangent to Γ, we have that ∠P BT = ∠P AB (because they both intercept the same
arc PdB on circle Γ), from which our claim follows.

4
We then show that ∠T BQ = ∠BP M . Indeed, since ∠T BQ and ∠BP Q intercept oppo-
site arcs on circle Γ, they are supplementary and we have ∠T BQ = π − ∠BP Q = ∠BP M .
We finally conclude that

∠RBQ = ∠RBT + ∠T BQ = α + ∠BP M = ∠M P C + ∠BP M = ∠BP C.

We have thus shown 4BP C = 4RBQ, which completes the proof.

Note. Notice that point A does not play any role in the problem except fixing circle Γ (and,
for that reason, the result is also valid when P is chosen outside of triangle 4ABC).

Alternative 1 for (b). The law of sines in triangle 4BQM gives

|BM | |BQ|
= . (2)
sin ∠BQM sin ∠BM Q
Since Q belongs to circle Γ, we have either ∠BQP = ∠BAP = α, hence ∠BQM = ∠M P C,
or these angles are supplementary; in both cases they have equal sines. We also have that
∠BM Q and ∠CM P are supplementary, hence have equal sines. Using these facts along with
|BM | = |M C| transforms (2) into

|M C| |BQ|
=
sin ∠M P C sin ∠CM P
from which the law of sines in triangle 4CP M implies that |BQ| = |P C|.

Alternative 2 for (b). Let S be the second intersection of line CP with circle Γ. Then,
∠BSP = α, so BS and M P are parallel; since M is the midpoint of segment BC, P is the
midpoint of SC. If Q is on the same arc P B as A, then the quadrilateral QP BS is an isosceles
trapezoid, and |QB| = |SP | = |P C|. If Q is on the other arc P B, then the quadrilateral
P QBS is an isosceles trapezoid, and again |QB| = |SP | = |P C|.

5
Problem 4. Yesterday, n ≥ 4 people sat around a round table. Each participant remembers
only who his two neighbours were, but not which one sat on his left and which one sat on
his right. Today, you would like the same people to sit around the same round table so that
each participant has the same two neighbours as yesterday (it is possible that yesterday’s left-
hand side neighbour is today’s right-hand side neighbour). You are allowed to query some of
the participants: if anyone is asked, he will answer by pointing at his two neighbours from
yesterday.

(a) Determine the minimal number f (n) of participants you have to query in order to be
certain to succeed, if later questions must not depend on the outcome of the previous
questions. That is, you have to choose in advance the list of people you are going to
query, before effectively asking any question.

(b) Determine the minimal number g(n) of participants you have to query in order to be
certain to succeed, if later questions may depend on the outcome of previous questions.
That is, you can wait until you get the first answer to choose whom to ask the second
question, and so on.

Solution.

(a) f (n) = n − 3.

• Asking n − 4 questions is not enough since the n − 4 people queried might be sitting
in a consecutive string, in which case the n − 4 answers allow one to sit n − 2 people
in the same positions as yesterday, but there is still an ambiguity among the two
remaining ones.
• Let us show that n − 3 questions suffice. Among the 3 people who are not queried,
at least 2 must sit next to people who have been queried. If exactly 2 do, then both
these people must be neighbours of the third, so that the neighbours of everybody
are known and we are done. If all 3 unqueried people sit next to a queried person,
then at least one of them has two queried neighbours, and again it follows that the
neighbours of everybody are known, so that we are done.

(b) g(n) = n − 1 − n3 ( = n − 1 − n+2


     2n   2n−5 
3
= 3
− 1 = 3
).
Say there is a link between two people if and only if they are neighbours. There are in
total n links, which we all need to identify. By asking a person for his neighbours, we can
discover at most two new links. More precisely, if at any point we query a participant
who has not yet been pointed as a neighbour, we discover exactly two new links (we call
this a type-0 query). If we query a participant who has been pointed once as a neighbour,
will discover exactly one new link (we call this a type-1 query). Of course, querying a
participant who has already been pointed twice provides no information (and we assume
in the rest of this solution that it never happens).
First note that, since f (4) = 1, we also have g(4) = 1. We now prove the formula for
g(n) for n ≥ 5.

6
n
• Let us show that n −
n 1 − 3
questions suffice. Our strategy consists in making
sure that the first 3 queries are type-0. Let us show that this is always possible.
A type-0 query requires a participant that hasn’t been queried or pointed before.
Since the number of those participants decreases n by three at most after each query,
 n  possible to perform 3 type-0 queries first. During this
we see that it is always
phase we discover 2 3 links.
The remaining queries will be either type-0 or type-1, and each of them discovers at
least one new link. We perform them until n − 1 links have been discovered, after
which we are done (the last link can be deduced without query).n The number of
1
queries
 in
 this second phase  most n − 1 − 2 3 , and the total is at
  is therefore at
most n3 + (n − 1 − 2 n3 ) = n − 1 − n3 .
• We now show that n − 2 − n3 = ĝ(n) questions are not enough.
 

(i) Consider the pool of unqueried and unpointed participants ; each type-0 must
query this pool. Since, from the point of view of the questioner, all elements
of the pool are undistinguishable, we can assume that each type-0 query asks
the second leftmost participant in the pool (except if there is only one element
left in the pool). One can then check that the pool, which starts as a string
of n contiguous participants, will stay contiguous after each type-0 and type-
1 query. Furthermore, using our assumption, we see that each type-0 query
removes three participants from the pool. Therefore there can be at most n3
 

type-0 queries in the scenarios corresponding to our assumption.


(ii) Assume there are k type-0 queries. Since there are ĝ(n) queries, thenumber of
n

discovered links is equal to 2k + (ĝ(n) − k) = ĝ(n) + k = n − 2 + k − 3 . If k is
strictly less than n3 , we discover strictly less than n − 2 links, which is clearly


insufficient (indeed, there are at least three missing links, and one can check
that whatever the configuration of the missing links, there are always several
orders compatible with the discovered links).
(iii) We now analyze the remaining case with k = n3 type-0 queries2 , in which we
 

discover n − 2 links. On the one hand, if the missing links are disjoint, there
are always two orders compatible with the discovered links (for example when
n = 7 and links are missing between the (4, 5) and (7, 1) pairs of neighbours,
the two orders are 1 − 2 − 3 − 4 5 − 6 − 7 and 1 − 2 − 3 − 4 7 − 6 − 5). On the
other hand, a situation where the two missing links would be adjacent would
allow the identification of the correct order. However, this never happens in the
scenarios corresponding to the assumption we made in (i). Indeed, two adjacent
missing links imply that some participant  n is
 unqueried and unpointed at the end
of the process. Since we perform k = 3 type-0 queries (the maximum), the
reasoning from (i) shows that the pool of unqueried and unpointed participants
is empty at the end of the process, which contradicts the existence of two
adjacent missing links.

Here we use the assumption n ≥ 5, since quantity n − 1 − 2 n3  isnegative when n = 4.


1
 
2
Note that this cannot happen when n ∈ {4, 5, 7} since we have n3 > ĝ(n) in those cases.

7
UK Mathematical Olympiad for Girls
EGMO | 2012
European Girls’ Mathematical Olympiad

23 June 2011

Instructions Supported by
• Time allowed: 3 hours.

• Full written solutions – not just answers – are required, with complete proofs of
any assertions you may make. Marks awarded will depend on the clarity of your
mathematical presentation. Work in rough first, and then write up your best attempt.
Do not hand in rough work.

• One complete solution will gain more credit than several unfinished attempts. It is
more important to complete a small number of questions than to try all the problems.

• Each question carries 10 marks. However, earlier questions tend to be easier. In


general you are advised to concentrate on these problems first.

• The use of rulers and compasses is allowed, but calculators and protractors are
forbidden.

• Start each question on a fresh sheet of paper. Write on one side of the paper only.
On each sheet of working write the number of the question in the top left hand corner
and your name, initials and school in the top right hand corner.

• Complete the cover sheet provided and attach it to the front of your script, followed
by your solutions in question number order.

• Staple all the pages neatly together in the top left hand corner.

• To accommodate candidates sitting in other timezones, please do not discuss the


paper on the internet until 8am BST on Friday 24 June.

Do not turn over until told to do so.

A partnership of
MT
UK

UK
MT

UKMT

United Kingdom Mathematics Trust


UK Mathematical Olympiad for Girls

23 June 2011

1. Three circles M N P, N LP, LM P have a common point P. A point A is chosen on


circle M N P (other than M, N or P ). AN meets circle N LP at B and AM meets
circle LM P at C. Prove that BC passes through L.
Many diagrams are possible. You need only solve this problem for one of the possible
configurations.

2. The number 12 may be factored into three positive integers in exactly eighteen ways,
these factorizations include 1 × 3 × 4, 2 × 2 × 3 and 2 × 3 × 2. Let N be the number
of seconds in a week. In how many ways can N be factored into three positive
integers?
A numerical answer is not sufficient. The calculation should be explained and jus-
tified.

3. Consider a convex quadrilateral and its two diagonals. These form four triangles.

(a) Suppose that the sum of the areas of a pair of opposite triangles is half the
area of the quadrilateral. Prove that at least one of the two diagonals divides
the quadrilateral into two parts of equal area.

(b) Suppose that at least one of the two diagonals divides the quadrilateral into
two parts of equal area. Prove that the sum of the areas of a pair of opposite
triangles is half the area of the quadrilateral.

4. Find a cubic polynomial f (X) with integer coefficients such that whenever a, b, c are
real numbers such that a+b+c = 2 and a2 +b2 +c2 = 2, we have f (a) = f (b) = f (c).

5. Let a be an even integer. Show that there are infinitely many integers b with the
property that there is a unique prime number of the form u2 + au + b with u an
integer.
Note that an integer p is “prime” when it is positive, and it is divisible by exactly
two positive integers. Therefore 1 is not prime, nor is −7.

Time allowed: 3 hours


UK Mathematical Olympiad for Girls

23 June 2011

Solutions
These are polished solutions and do not illustrate the process of failed ideas and rough
work by which candidates may arrive at their own solutions.
The mark allocation on Maths Olympiad papers is different from what you are used to
at school. To get any marks, you need to make significant progress towards the solution.
So 3 marks roughly means that you had most of the relevant ideas, but were not able to
link them into a coherent proof. 8 or 9 marks means that you have solved the problem, but
have made a minor calculation error or have not explained your reasoning clearly enough.
The authors of the problems include Christopher Bradley (Q1) and Geoff Smith (Q2,
Q3, Q5); problem 4 was kindly supplied by David Monk, but, like many problems, its
provenance is unclear. The UK MOG 2011 was marked on Sunday 3 July at the Holiday
Inn, King’s Cross by a team of Ceri Fiddes, Vesna Kadelburg, Joseph Myers, Vicky Neale,
Geoff Smith and Alison Zhu, who also provided the remarks and extended solutions here.

1. Three circles M N P, N LP, LM P have a common point P. A point A is chosen on


circle M N P (other than M, N or P ). AN meets circle N LP at B and AM meets
circle LM P at C. Prove that BC passes through L.
Many diagrams are possible. You need only solve this problem for one of the possible
configurations.
Solution Here is a possible diagram. CM A and AN B are given to be straight
lines, and we must show that BLC is a straight line.
A
M

N P
C

L
B

The quadrilaterals M AN P , P N BL and LCM P are all cyclic, so ∠P LC = ∠P M A =


∠P N B by exterior angle to a cyclic quadrilateral. Now opposite angles of the
cyclic quadrilateral P N BL are supplementary, so angles BLP and ∠P LC sum to
a straight line, as required.
Two angles are “supplementary” if they add to 180◦ .
Solution 2 Note that for fixed M, N and P , the sizes of ∠M AN , ∠M BL, ∠LCN
are invariant with respect to the position of A. We must also always have that
∠M P N + ∠N P L + ∠LP M = 360◦ . Therefore, as opposite angles in a cyclic
quadrilateral add up to 180◦ , ∠M AN + ∠N BL + ∠LCM = 3 × 180◦ − 360◦ = 180◦ .
Since AM C and AN B are straight lines, the quadrilateral ABLC is a triangle and
we can now deduce that CLB is 180◦ .
Remarks Some candidates claimed that they had solved the problem by producing
scale drawings or a couple of examples that confirmed that L lay on BC. However,
this does not constitute a proof because this has not shown that the claim is true in
all possible cases. Nevertheless, it is still important to draw accurate diagrams when
trying to solve a question. Often, they can suggest the next step in your solution;
you may spot that two triangles look similar and go on to prove this.
There was some confusion over what is meant by a “configuration”. This usually
refers to the relative positions of the three circles and the point A (such as the point
A being on a minor as opposed to the major arc M N ), and not to the exact sizes
of the circles.

It turns out that for most special cases, one of the quickest solutions is to use circle
theorems, as in our general solution. Some candidates solved the problem for a
very specific case, which was given credit provided they made their assumptions
completely clear. Unfortunately, most candidates who went down this route were
not sufficiently careful about how they set up their configurations.
One problem arose from giving too few constraints. For example, some candidates
stated that they were going to assume that the three circles had the same radii, but
went on to claim that M P = N P . This requires an additional condition such as
the circles being symmetric in the line P L. Here is an example where we have three
congruent circles but N P 6= M P .

When writing out a proof, it is important to check very carefully that each statement
follows from the previous statement. Try very hard to find counterexamples. So if
you have written A ⇒ B, try to find a case where A is true and B is not true.
In other cases, students started off with a set of constraints leading to a configuration
which might not exist. For example, it is not immediately obvious that we can have
P diametrically opposite B and C, with circles N P L and M P L of equal radii. The
safest way of setting up a specific configuration would be to give a construction. Fix
P . Specify M, N and L. Then construct A in relation to the existing points.
Returning to the question as it was meant to be solved, two key ideas were required.
Firstly, we needed to connect lines N P , M P and LP and notice that we have the
cyclic quadrilaterals AN P M , N P LB, P M CL. Secondly, we needed a strategy for
showing that L lies on BC. One way is to show that ∠BLP + ∠P LC = 180◦ . Then
BLC is a straight line.
Finally, be careful when labelling angles. Obviously in an accurate diagram, it is
impossible not to draw L on BC, but for the purposes of this question, remember
that we do not yet know that L is on BC. Therefore the statement “N P LB is a
cyclic quadrilateral and ∠N P L = α, implying ∠ABC = 180◦ − α” is not strictly
correct. We only know that ∠N BL = 180◦ − α.

2. The number 12 may be factored into three positive integers in exactly eighteen ways,
these factorizations include 1 × 3 × 4, 2 × 2 × 3 and 2 × 3 × 2. Let N be the number
of seconds in a week. In how many ways can N be factored into three positive
integers?
A numerical answer is not sufficient. The calculation should be explained and jus-
tified.
Solution For each prime number p, if pn | N but pn+1 6 | N , then we can distribute
the factors of p among the three factors in (n+2
2 ) ways. To see this, imagine you have
n stones. You divide them into three parts by adding two ‘separator’ stones to the
pile, and then putting the stones in a row. You get a partition of n into three parts
by looking at the number before the first separator, the number of stones between
the separators, and the number of stones after the second separator. The number
of such partitions is therefore given by the specified binomial formula. You then
multiply over all primes (if you like you can restrict attention to those dividing N ).
In our case N = 7 × 24 × 602 = 27 × 33 × 52 × 7 so the answer is

(92 )(52 )(42 )(32 ) = 36 × 10 × 6 × 3 = 6480.

The notation a | b means “a divides b”. The notation (nr ) is a binomial coefficient,
sometimes also denoted n Cr .
Remarks Most candidates correctly computed the value of N in this question
(N = 60 × 60 × 24 × 7 = 604800), and many realised that it would be helpful to find
the prime factorization of N (N = 27 × 33 × 52 × 7). The next step of the problem
proved to be much harder. There were various attempts to try small cases and to
look for patterns, which is of course a sensible strategy. It is important to remember
that even if you notice a pattern, you still need to justify it carefully. Knowing that
a pattern fits two or three cases does not prove that it works in general.
A significant number of candidates tried to use the information given in the question
about good factorizations of 12 (“good factorization” meaning the sort considered
in the question). This information was in the question to illustrate that 1 is allowed
in a factorization (e.g. 1 × 3 × 4), and that the order of the factors is important
(2 × 2 × 3 and 2 × 3 × 2 count as different factorizations in this question). The
candidates who tried to use the information about 12 typically tried to write N as
the product of 12 and something else (or perhaps the product of 123 and something
else) and then to multiply 18 by something. Unfortunately, this does not work. To
see this, you could try counting the good factorizations of 122 . There are not 182 of
them. The problem is that the factors of 12 and 12 overlap, so we end up counting
some factorizations too many times.
That thought might help to steer us in a useful direction: working with different
primes separately. Our job is to count factorizations of N of the form a × b × c. We
know that each of a, b and c must be a product of a power of 2, a power of 3, a
power of 5 and a power of 7 (including 20 as a power of 2, and so on). We also need
to use up all of the 27 , 33 , 52 and 71 that occur in the prime factorization of N . We
could imagine that we have seven 2s, three 3s, two 5s and one 7 cut out from pieces
of paper, and we need to assign them to three boxes, labelled a, b and c. We need
to count the ways to do this.
Let us think about just the 2s. We have seven numbers, to put in three boxes. One
way to do this is to imagine listing the seven 2s: 2 2 2 2 2 2 2. We can include
two vertical bars, to separate the 2s for each of the three boxes. For example, the
pattern 2 2 2 | 2 2 | 2 2 would correspond to three 2s in the a box, two 2s in the b
box, and two 2s in the c box. Similarly, the pattern | 2 2 2 | 2 2 2 2 would correspond
to no 2s in the a box, three 2s in the b box, and four 2s in the c box.
So we want to count the number of ways to list seven 2s and two vertical bars.
We have nine spaces, and need to pick two of them for the vertical bars (the rest
will automatically be filled by the seven 2s). In how many ways can we do this?
You may have learned about binomial coefficients, in which case you will know that
9

the answer is 2 (sometimes also written as 9 C2 ). Alternatively, you can work it
out directly. There are 9 places for the first vertical bar, and then 8 for the second,
which gives 9 × 8 possibilities. But that counts each possibility twice (corresponding
to swapping the vertical bars), so there are 9×82
= 36 possibilities. Fortunately, this
is exactly the same as the binomial coefficient 92 .
That is the 2s dealt with. But we can now see how to deal with the 3s, 5s and 7. In
general, if we have pn (where p is a prime number and n is a natural number) then
 (n+2)(n+1)
we want the binomial coefficient n+22
= 2
. The argument in general is just
the same as the argument above, thinking of including vertical bars and so on.
So there are 9×8
2
= 36 ways to put the 2s into the boxes, 5×4
2
= 10 ways to place the
4×3 3×2
3s, 2 = 6 ways to place the 5s, and just 2 = 3 ways to place the 7. (Of course,
we can see the last of these immediately, without needing the argument above).
To complete the argument, we can notice that we can simply multiply these numbers
(for each way to place the 2s, we have 10 ways to place the 3s, and so on). So the
final answer is 36 × 10 × 6 × 3 = 6480.
We were pleased to see that some candidates managed to come up with a correct
solution (along the lines of the one given here).
If you have not thought about it before, you might like to think about how to count
the number of factors of N = 604800. Hint: do not try to list them all!

3. Consider a convex quadrilateral and its two diagonals. These form four triangles.

(a) Suppose that the sum of the areas of a pair of opposite triangles is half the
area of the quadrilateral. Prove that at least one of the two diagonals divides
the quadrilateral into two parts of equal area.
(b) Suppose that at least one of the two diagonals divides the quadrilateral into
two parts of equal area. Prove that the sum of the areas of a pair of opposite
triangles is half the area of the quadrilateral.
Solution Let the four triangles into which the quadrilateral ABCD is broken by
the diagonals have areas α, β, γ and δ respectively. For definiteness, let the diagonals
meet at X and suppose that [ABX] = α, [BCX] = β, [CDX] = γ and [DAX] = δ.
Let AX = w, BX = x, CX = y and DX = z.
Now if α + γ = β + δ, then wx + zy = wz + xy, so wx + zy − wz − xy = 0 and
therefore (w − y)(x − z) = 0 so w = y or x = z so α + δ = β + γ or α + β = γ + δ.
Conversely, suppose that α + δ = β + γ. Therefore xw + wz = xy + yz, so w(x + z) =
y(x + z) and therefore w = y so α = β and γ = δ. Therefore α + γ = β + δ.
Note that the area of a triangle is given by 21 ab sin C, and that sin C = sin(180◦ −C),
so the equations above result from cancellation of sine terms.
Remarks The most common mistake made when attempting to answer this ques-
tion was that candidates attempted to show that this is true for specific types of
quadrilaterals, for example parallelograms or cyclic quadrilaterals. It is necessary
for a correct argument to look at general quadrilaterals. Once you have drawn and
labelled a quadrilateral for consideration you need to get a grip on the area in some
way. The two most commonly used formulae for area of a triangle (as this is what
we are dealing with in both parts) are 12 bh and 21 ab sin C, either will work.

In part (a) we assume that δ + β = 21 (α + β + γ + δ) (or α + γ = 12 (α + β + γ + δ)


but this gives the same result). And it immediately follows that α + γ is also equal
to half the area of the whole quadrilateral and so

α+γ =β+δ

and using 21 ab sin C this gives


1
2
xw sin θ + 21 zy sin θ = 12 wz sin(180◦ − θ) + 21 xy sin(180◦ − θ).

It is clear to see that we should multiply by 2, and a little thought about sin θ and
sin(180◦ − θ) should convince you they are the same thing and so they can also be
factored out (N.B. we can divide through by sin θ as it is definitely non-zero).
We are left with xw + zy = wz + xy which rearranges to give

x(w − y) = z(w − y)

which means that either x = z or w − y = 0. It is very important to notice


both possibilities here, as it does not follow that x must be equal to z (consider
2 × 0 = 3 × 0).
If x = z, then wz + yz = wx + yx, so
1
2
wz sin(180◦ − θ) + 21 yz sin θ = 12 wx sin θ + 21 yx sin(180◦ − θ)

and we have δ + α = β + γ which means the diagonal BD splits the area in half.
If w = y the argument can run in exactly the same way to show that AC splits the
quadrilateral in half.
The argument is easily reversible, and this is what was required in part (b).
4. Find a cubic polynomial f (X) with integer coefficients such that whenever a, b, c are
real numbers such that a+b+c = 2 and a2 +b2 +c2 = 2, we have f (a) = f (b) = f (c).
Solution We have 2(ab+bc+ca) = (a+b+c)2 −(a2 +b2 +c2 ) = 2, so a, b, c are roots
of X 3 − 2X 2 + X − p where p = abc. Let f (X) be X(X − 1)2 (i.e. X 3 − 2X 2 + X).
Now f (a) = f (b) = f (c) = abc.
Remarks Some candidates assumed that a, b and c had to be integers, although the
question specified real numbers. Some candidates wrote the general cubic polynomial
as aX 3 + bX 2 + cX + d; that notation was inappropriate for this question because
the question already uses a, b and c as values that need not be the coefficients of
the polynomial, and confusion arises if they are used with two different meanings.
If f (a) = f (b) = f (c) = k, then a, b and c must be roots of f (X) − k = 0,
so heuristically it seems appropriate to try letting f (X) − k be the polynomial
(X − a)(X − b)(X − c) with those three roots. It is then necessary to notice that
the non-constant terms of this polynomial have coefficients that do not depend on
a, b and c, while f (a) = f (b) = f (c) for any choice of the constant term.
Another way of finding a candidate polynomial that some candidates used was
substituting particular values of a, b and c satisfying the given conditions to obtain
linear equations in the coefficients of f . This shows that f must have a particular
form if it has the given property, and it is then necessary to show that the polynomial
found does indeed have that property in order to complete the problem.
Finding a possible f by trial and error with particular values of a, b and c, without
any reason for it to work for all a, b and c satisfying the given conditions, was not
rated highly.
5. Let a be an even integer. Show that there are infinitely many integers b with the
property that there is a unique prime number of the form u2 + au + b with u an
integer.
Note that an integer p is “prime” when it is positive, and it is divisible by exactly
two positive integers. Therefore 1 is not prime, nor is −7.
Solution Note that a2 is divisible by 4. As b ranges over the integers, every even
perfect
√ square arises as a2 − 4b (as do other less interesting values). The expression
a2 − 4b can take every even positive integer value. In particular, it can take the
value p − 1 where p is any odd prime number (by choosing b appropriately).
For such a choice of b, the roots α, β of the polynomial X 2 + aX + b are integers
which differ by p − 1. Let the larger root be β and let w = β + 1. Therefore
w2 + aw + b = (w − α)(w − β) = 1 · p = p. For integers v > w we have v 2 + av + b =
(v − α)(v − β) is a product of two integers, each greater than 1, so is not prime.
For integers v in the range α ≤ v ≤ β, the expression v 2 + av + b is negative. For
v < α, the values obtained repeat those for v > β.
Since there is a different choice of integer b for each odd prime number p, and there
are infinitely many odd prime numbers, we are done.
Remarks No correct answer to this problem was obtained during the UK MOG.
We could start by trying to find just one b with the desired property, since it is not
immediately clear that there is even one, never mind infinitely many. (We might
try the problem with some particular numerical values of a first, to get a feel for
what is going on, but we will move straight to the more general solution here.)
Our goal is to find some integer b so that there is a unique prime of the form
u2 + au + b with u an integer. We might need to remember that there could be
multiple (well, two) values of u that give the same value of u2 + au + b.
We want to make sure that for almost all values of u, the quadratic u2 + au + b is not
prime. What is a good way to make sure that a number N is not prime? Well, if
we knew that we could factorize N into a product of two integers, neither of which
is 1, then we would know that N is not prime.
This suggests that we could try to choose the integer b so that the polynomial
f (X) ≡ X 2 + aX + b has two integer roots, say α and β. Then f (X) will factorize
as (X − α)(X − β). When you evaluate f (X) at u, this yields a factorization of
f (u). Provided that neither |u − α| nor |u − β| = 1, this will prevent f (u) from
being prime.
The value of a is given, and it is an even integer. The roots of f (X) are

−a ± a2 − 4b
2
and these roots can be made to be integers by selecting b so that a2 − 4b is a square.
Notice that the average of the roots is −a/2, and you√can not alter that with your
choice of b. However, the difference of the roots is a2 − 4b and by appropriate
choice of b, you can arrange that this has any even value that you like.
We are also going to need to make sure that f (u) really is prime for at least one
value of u. How can we do this? We could pick a prime p and then make sure that
w − α = p and w − β = 1 for some suitable value of w, so that f (w) = p (which
is certainly prime). In order for this to be possible, we need the difference between
the roots β and α to be p − 1. As is often the case, it is more convenient to choose
p to be an odd prime.
So choose an odd prime p. For the given fixed even integer a, we choose b so that
the roots α, β are integers, with α < β and β − α = p − 1.
Let w = β + 1. Therefore w2 + aw + b = (w − α)(w − β) = p · 1 = p, so we know
that the quadratic u2 + au + b is a prime number for at least one value of u.
We still need to check that this is the only prime value of u2 + au + b.
If v is an integer with v > β + 1, then v 2 + av + b = (v − α)(v − β), and each of these
factors is an integer greater than 1, so v 2 + av + b = (v − α)(v − β) is not positive
and so is not prime.
If v is an integer with α ≤ v ≤ β, then v − α is positive and v − β is negative, so
v 2 + av + b = (v − α)(v − β) is not positive and so is not prime.
If v is an integer with v < α, then v 2 + av + b = (v − α)(v − β) = (β + α − v −
α)(β + α − v − β), so the quadratic takes the same value as at β + α − v (which is
greater than β). So for v < α the values obtained repeat those for v > β.
Therefore this choice of b ensures that f (u) assumes just one prime value. It takes
this value twice, at u = α − 1 and u = β + 1.
So we have managed to find one value of b that meets the requirements. How can
we show that there are in fact infinitely many? Our choice of b was determined by
the odd prime p that we chose. But there are infinitely many odd primes p, and
each of them gives rise to a different value of b. So there are infinitely many values
of b that have the desired property.
Above, we made sure that for almost all values of u, the quadratic u2 + au + b is not
prime, by arranging for this polynomial to factorize into two linear factors. Might
there be other ways to ensure this polynomial has few prime values? Two other
ways that a polynomial could be almost never prime are that it could have only
finitely many positive values—which cannot apply to this polynomial because the
leading term has a positive coefficient—and that there could be some prime p such
that it is always divisible by p. It turns out that this last case cannot apply to this
polynomial (you might wish to think about why). And there is a conjecture (the
Bunyakovskii conjecture) that these three reasons are the only reasons a polynomial
with integer coefficients can fail to have infinitely many prime values. So any solution
not involving making the polynomial factorize would imply a counterexample to this
conjecture.
European Girls’ Mathematical Olympiad 2012—Day 1 Solutions

Problem 1. Let ABC be a triangle with circumcentre O. The points D, E and F lie in the interiors of the
sides BC, CA and AB respectively, such that DE is perpendicular to CO and DF is perpendicular to BO.
(By interior we mean, for example, that the point D lies on the line BC and D is between B and C on that
line.)
Let K be the circumcentre of triangle AF E. Prove that the lines DK and BC are perpendicular.

Origin. Netherlands (Merlijn Staps).

O
E
F

B C
D

Solution 1 (submitter). Let `C be the tangent at C to the circumcircle of 4ABC. As CO ⊥ `C , the lines
DE and `C are parallel. Now we find that

∠CDE = ∠(BC, `C ) = ∠BAC,

hence the quadrilateral BDEA is cyclic. Analogously, we find that the quadrilateral CDF A is cyclic. As we
now have ∠CDE = ∠A = ∠F DB, we conclude that the line BC is the external angle bisector of ∠EDF .
Furthermore, ∠EDF = 180◦ − 2∠A. Since K is the circumcentre of 4AEF , ∠F KE = 2∠F AE = 2∠A. So
∠F KE + ∠EDF = 180◦ , hence K lies on the circumcircle of 4DEF . As |KE| = |KF |, we have that K is the
midpoint of the arc EF of this circumcircle. It is well known that this point lies on the internal angle bisector
of ∠EDF . We conclude that DK is the internal angle bisector of ∠EDF . Together with the fact that BC is
the external angle bisector of ∠EDF , this yields that DK ⊥ BC, as desired.

Solution 2 (submitter). As in the previous solution, we show that the quadrilaterals BDEA and CDF A
are both cyclic. Denote by M and L respectively the circumcentres of these quadrilaterals. We will show that
the quadrilateral KLOM is a parallelogram. The lines KL and M O are the perpendicular bisectors of the line
segments AF and AB, respectively. Hence both KL and M O are perpendicular to AB, which yields KL k M O.
In the same way we can show that the lines KM and LO are both perpendicular to AC and hence parallel
as well. We conclude that KLOM is indeed a parallelogram. Now, let K 0 , L0 , O0 and M 0 be the respective
projections of K, L, O and M to BC. We have to show that K 0 = D. As L lies on the perpendicular bisector
of CD, we have that L0 is the midpoint of CD. Similarly, M 0 is the midpoint of BD and O0 is the midpoint
of BC. Now we are going to use directed lengths. Since KLOM is a parallelogram, M 0 K 0 = O0 L0 . As

O0 L0 = O0 C − L0 C = 1
2 · (BC − DC) = 1
2 · BD = M 0 D,

we find that M 0 K 0 = M 0 D, hence K 0 = D, as desired.

1
Solution 3 (submitter). Denote by `A , `B and `C the tangents at A, B and C to the circumcircle of 4ABC.
Let A0 be the point of intersection of `B and `C and define B 0 and C 0 analogously. As in the first solution,
we find that DE k `C and DF k `B . Now, let Q be the point of intersection of DE and `A and let R be
the point of intersection of DF and `A . We easily find 4AQE ∼ 4AB 0 C. As |B 0 A| = |B 0 C|, we must have
|QA| = |QE|, hence 4AQE is isosceles. Therefore the perpendicular bisector of AE is the internal angle bisector
of ∠EQA = ∠DQR. Analogously, the perpendicular bisector of AF is the internal angle bisector of ∠DRQ.
We conclude that K is the incentre of 4DQR, thus DK is the angle bisector of ∠QDR. Because the sides of
the triangles 4QDR and 4B 0 A0 C 0 are pairwise parallel, the angle bisector DK of ∠QDR is parallel to the
angle bisector of ∠B 0 A0 C 0 . Finally, as the angle bisector of ∠B 0 A0 C 0 is easily seen to be perpendicular to BC
(as it is the perpendicular bisector of this segment), we find that DK ⊥ BC, as desired.

Remark (submitter). The fact that the quadrilateral BDEA is cyclic (which is an essential part of the first
two solutions) can be proven in various ways. Another possibility is as follows. Let P be the midpoint of BC.
Then, as ∠CP O = 90◦ , we have ∠P OC = 90◦ −∠OCP . Let X be the point of intersection of DE and CO, then
we have that ∠CDE = ∠CDX = 90◦ − ∠XCD = 90◦ − ∠OCP . Hence ∠CDE = ∠P OC = 21 ∠BOC = ∠BAC.
From this we can conclude that BDEA is cyclic.

Solution 4 (PSC). This is a simplified variant of Solution 1. ∠COB = 2∠A (angle at centre of circle ABC)
and OB = OC so ∠OBC = ∠BCO = 90◦ − ∠A. Likewise ∠EKF = 2∠A and ∠KF E = ∠F EK = 90◦ − ∠A.
Now because DE ⊥ CO, ∠EDC = 90◦ − ∠DCO = 90◦ − ∠BCO = ∠A and similarly ∠BDF = ∠A, so
∠F DE = 180◦ − 2∠A. So quadrilateral KF DE is cyclic (opposite angles), so (same segment) ∠KDE =
∠KF E = 90◦ − ∠A, so ∠KDC = 90◦ and DK is perpendicular to BC.

Problem 2. Let n be a positive integer. Find the greatest possible integer m, in terms of n, with the following
property: a table with m rows and n columns can be filled with real numbers in such a manner that for any
two different rows [a1 , a2 , . . . , an ] and [b1 , b2 , . . . , bn ] the following holds:

max(|a1 − b1 |, |a2 − b2 |, . . . , |an − bn |) = 1.

Origin. Poland (Tomasz Kobos).

Solution 1 (submitter). The largest possible m is equal to 2n .


In order to see that the value 2n can be indeed achieved, consider all binary vectors of length n as rows of
the table. We now proceed with proving that this is the maximum value.
Let [aik ] be a feasible table, where i = 1, . . . , m and k = 1, . . . , n. Let us define undirected graphs G1 , G2 ,
. . . , Gn , each with vertex set {1, 2, . . . , m}, where ij ∈ E(Gk ) if and only if |aik − ajk | = 1 (by E(Gk ) we denote
the edge set of the graph Gk ). Observe the following two properties.

(1) Each graph Gk is bipartite. Indeed, if it contained a cycle of odd length, then the sum of ±1 along this
cycle would need to be equal to 0, which contradicts the length of the cycle being odd.
(2) For every i 6= j, ij ∈ E(Gk ) for some k. This follows directly from the problem statement.

For every graph Gk fix some bipartition (Ak , Bk ) of {1, 2, . . . , m}, i.e., a partition of {1, 2, . . . , m} into two
disjoint sets Ak , Bk such that the edges of Gk traverse only between Ak and Bk . If m > 2n , then there are two
distinct indices i, j such that they belong to exactly the same parts Ak , Bk , that is, i ∈ Ak if and only if j ∈ Ak
for all k = 1, 2, . . . , n. However, this means that the edge ij cannot be present in any of the graphs G1 , G2 ,
. . . , Gn , which contradicts (2). Therefore, m ≤ 2n .

Solution 2 (PSC). In any table with the given property, the least and greatest values in a column cannot
differ by more than 1. Thus, if each value that is neither least nor greatest in its column is changed to be equal
to either the least or the greatest value in its column (arbitrarily), this does not affect any |ai − bi | = 1, nor
does it increase any difference above 1, so the table still has that given property. But after such a change, for
any choice of what the least and greatest values in each column are, there are only two possible choices for each
entry in the table (either the least or the greatest value in its column); that is, only 2n possible distinct rows,
and the given property implies that all rows must be distinct. As in the previous solution, we see that this
number can be achieved.

2
Solution 3 (Coordinators). We prove by induction on n that m ≤ 2n .
First suppose n = 1. If real numbers x and y have |x − y| = 1 then bxc and byc have opposite parities and
hence it is impossible to find three real numbers with all differences 1. Thus m ≤ 2.
Suppose instead n > 1. Let a be the smallest number appearing in the first column of the table; then every
entry in the first column of the table lies in the interval [a, a + 1]. Let A be the collection of rows with first
entry a and B be the collection of rows with first entry in (a, a + 1]. No two rows in A differ by 1 in their first
entries, so if we list the rows in A and delete their first entries we obtain a table satisfying the conditions of
the problem with n replaced by n − 1; thus, by the induction hypothesis, there are at most 2n−1 rows in A.
Similarly, there are at most 2n−1 rows in B. Hence m ≤ 2n−1 + 2n−1 = 2n . As before, this number can be
achieved.

Solution 4 (Coordinators). Consider the rows of the table as points of Rn . As the values in each column
differ by at most 1, these points must lie in some n-dimensional unit cube C. Consider the unit cubes centred
on each of the m points. The conditions of the problem imply that the interiors of these unit cubes are pairwise
disjoint. But now C has volume 1, and each of these cubes intersects C in volume at least 2−n : indeed, if the
unit cube centred on a point of C is divided into 2n cubes of equal size then one of these cubes must lie entirely
within C. Hence m ≤ 2n . As before, this number can be achieved.

Solution 5 (Coordinators). Again consider the rows of the table as points of Rn . The conditions of the
problem imply that these points must all lie in some n-dimensional unit cube C, but no two of the points lie in
any smaller cube. Thus if C is divided into 2n equally-sized subcubes, each of these subcubes contains at most
one row of the table, giving m ≤ 2n . As before, this number can be achieved.

Problem 3. Find all functions f : R → R such that



f yf (x + y) + f (x) = 4x + 2yf (x + y)

for all x, y ∈ R.

Origin. Netherlands (Birgit van Dalen).

Solution 1 (submitter). Setting y = 0 yields

f (f (x)) = 4x, (1)

from which we derive that f is a bijective function. Also, we find that

f (0) = f (4 · 0) = f (f (f (0))) = 4f (0),

hence f (0) = 0. Now set x = 0 and y = 1 in the given equation and use (1) again:

4 = f (f (1)) = 2f (1),

so f (1) = 2 and therefore also f (2) = f (f (1)) = 4. Finally substitute y = 1 − x in the equation:

f (2(1 − x) + f (x)) = 4x + 4(1 − x) = 4 = f (2) for all x ∈ R.

As f is injective, from this it follows that f (x) = 2 − 2(1 − x) = 2x. It is easy to see that this function satisfies
the original equation. Hence the only solution is the function defined by f (x) = 2x for all x ∈ R.

Solution 2 (Coordinators). Setting y = 0 in the equation we see

f (f (x)) = 4x

so f is a bijection. Let κ = f −1 (2) and set x + y = κ in the original equation to see

f (2κ − 2x + f (x)) = 4κ.

As the right hand side is independent of x and f is injective, 2κ − 2x + f (x) is constant, i.e. f (x) = 2x + α.
Substituting this into the original equation, we see that 2x + α is a solution to the original equation if and
only if 4(y 2 + xy + x) + (3 + 2y)α = 4(y 2 + xy + x) + 2yα for all x, y, i.e. if and only if α = 0. Thus the unique
solution to the equation is f (x) = 2x.

3
Problem 4. A set A of integers is called sum-full if A ⊆ A + A, i.e. each element a ∈ A is the sum of some
pair of (not necessarily different) elements b, c ∈ A. A set A of integers is said to be zero-sum-free if 0 is the
only integer that cannot be expressed as the sum of the elements of a finite nonempty subset of A.
Does there exist a sum-full zero-sum-free set of integers?

Origin. Romania (Dan Schwarz).

Remark. The original formulation of this problem had a weaker definition of zero-sum-free that did not
require all nonzero integers to be sums of finite nonempty subsets of A.

Solution (submitter, adapted). The set A = {F2n : n = 1, 2, . . .} ∪ {−F2n+1 : n = 1, 2, . . .}, where Fk is


the k th Fibonacci number (F1 = 1, F2 = 1, Fk+2 = Fk+1 + Fk for k ≥ 1) qualifies for an example. We then
have F2n = F2n+2 + (−F2n+1 ) and −F2n+1 = (−F2n+3 ) + F2n+2 for all n ≥ 1, so A is sum-full (and even with
unique representations). On the other hand, we can never have
s
X t
X
0= F2ni − F2nj +1 ,
i=1 j=1

owing to the fact that Zeckendorf representations are known to be unique.


It remains to be shown that all nonzero values can be represented as sums of distinct numbers 1, −2, 3,
−5, 8, −13, 21, . . . . This may be done using a greedy algorithm: when representing n, the number largest
in magnitude that is used is the element m = ±Fk of A that is closest to 0 subject to having the same sign
as n and |m| ≥ |n|. That this algorithm terminates without using any member of A twice is a straightforward
induction on k; the base case is k = 2 (m = 1) and the induction hypothesis is that for all n for which the above
algorithm starts with ±F` with ` ≤ k, it terminates without having used any member of A twice and without
having used any ±Fj with j > `.

Remark (James Aaronson and Adam P Goucher). Let n be a positive integer, and write u = 2n ; we
claim that the set

{1, 2, 4, . . . , 2n−1 , −u, u + 1, −(2u + 1), 3u + 2, −(5u + 3), 8u + 5, . . .}

is a sum-full zero-sum-free set. The proof is similar to that used for the standard examples.

4
European Girls’ Mathematical Olympiad 2012—Day 2 Solutions

Problem 5. The numbers p and q are prime and satisfy


p q+1 2n
+ =
p+1 q n+2
for some positive integer n. Find all possible values of q − p.

Origin. Luxembourg (Pierre Haas).

Solution 1 (submitter). Rearranging the equation, 2qn(p + 1) = (n + 2)(2pq + p + q + 1). The left hand
side is even, so either n + 2 or p + q + 1 is even, so either p = 2 or q = 2 since p and q are prime, or n is even.
If p = 2, 6qn = (n + 2)(5q + 3), so (q − 3)(n − 10) = 36. Considering the divisors of 36 for which q is
prime, we find the possible solutions (p, q, n) in this case are (2, 5, 28) and (2, 7, 19) (both of which satisfy the
equation).
If q = 2, 4n(p + 1) = (n + 2)(5p + 3), so n = pn + 10p + 6, a contradiction since n < pn, so there is no
solution with q = 2.
Finally, suppose that n = 2k is even. We may suppose also that p and q are odd primes. The equation
becomes 2kq(p + 1) = (k + 1)(2pq + p + q + 1). The left hand side is even and 2pq + p + q + 1 is odd, so k + 1
is even, so k = 2` + 1 is odd. We now have

q(p + 1)(2` + 1) = (` + 1)(2pq + p + q + 1)

or equivalently
`q(p + 1) = (` + 1)(pq + p + 1).
Note that q | pq + p + 1 if and only if q | p + 1. Furthermore, because (p, p + 1) = 1 and q is prime,
(p + 1, pq + p + 1) = (p + 1, pq) = (p + 1, q) > 1 if and only if q | p + 1.
Since (`, ` + 1), we see that, if q - p + 1, then ` = pq + p + 1 and ` + 1 = q(p + 1), so q = p + 2
(and (p, p + 2, 2(2p2 + 6p + 3)) satisfies the original equation). In the contrary case, suppose p + 1 = rq, so
`(p + 1) = (` + 1)(p + r), a contradiction since ` < ` + 1 and p + 1 ≤ p + r.
Thus the possible values of q − p are 2, 3 and 5.

Solution 2 (PSC). Subtracting 2 and multiplying by −1, the condition is equivalent to


1 1 4
− = .
p+1 q n+2
Thus q > p + 1. Rearranging,
4(p + 1)q
q−p−1= .
n+2
The expression on the right is a positive integer, and q must cancel into n + 2 else q would divide p + 1 < q.
Let (n + 2)/q = u a positive integer.
Now
4(p + 1)
q−p−1=
u
so
uq − u(p + 1) = 4(p + 1)
so p + 1 divides uq. However, q is prime and p + 1 < q, therefore p + 1 divides u. Let v be the integer u/(p + 1).
Now
4
q − p = 1 + ∈ {2, 3, 5}.
v
All three cases can occur, where (p, q, n) is (3, 5, 78), (2, 5, 28) or (2, 7, 19). Note that all pairs of twin primes
q = p + 2 yield solutions (p, p + 2, 2(2p2 + 6p + 3)).

1
Solution 3 (Coordinators). Subtract 2 from both sides to get
1 1 4
− = .
p+1 q n+2
From this, since n is positive, we have that q > p + 1. Therefore q and p + 1 are coprime, since q is prime.
Group the terms on the LHS to get
q−p−1 4
= .
q(p + 1) n+2
Now (q, q − p − 1) = (q, p + 1) = 1 and (p + 1, q − p − 1) = (p + 1, q) = 1 so the fraction on the left is in lowest
terms. Therefore the numerator must divide the numerator on the right, which is 4. Since q − p − 1 is positive,
it must be 1, 2 or 4, so that q − p must be 2, 3 or 5. All of these can be attained, by (p, q, n) = (3, 5, 78),
(2, 5, 28) and (2, 7, 19) respectively.

Problem 6. There are infinitely many people registered on the social network Mugbook. Some pairs of
(different) users are registered as friends, but each person has only finitely many friends. Every user has at
least one friend. (Friendship is symmetric; that is, if A is a friend of B, then B is a friend of A.)
Each person is required to designate one of their friends as their best friend. If A designates B as her best
friend, then (unfortunately) it does not follow that B necessarily designates A as her best friend. Someone
designated as a best friend is called a 1-best friend. More generally, if n > 1 is a positive integer, then a user
is an n-best friend provided that they have been designated the best friend of someone who is an (n − 1)-best
friend. Someone who is a k-best friend for every positive integer k is called popular.
(a) Prove that every popular person is the best friend of a popular person.
(b) Show that if people can have infinitely many friends, then it is possible that a popular person is not the
best friend of a popular person.

Origin. Romania (Dan Schwarz) (rephrasing by Geoff Smith).

Remark. The original formulation of this problem was:


function f : X → X, let us use the notations f 0 (X) := X, f n+1 (X) := f (f n (X)) for n ≥ 0, and also
Given a\
ω
f (X) := f n (X). Let us now impose on f that all its fibres f −1 (y) := {x ∈ X | f (x) = y}, for y ∈ f (X),
n≥0
are finite. Prove that f (f ω (X)) = f ω (X).

Solution 1 (submitter, adapted). For any person A, let f 0 (x) = x, let f (A) be A’s best friend, and define
f k+1 (A) = f (f k (A)), so any person who is a k-best friend is f k (A) for some person A; clearly a k-best friend
is also an `-best friend for all ` < k. Let X be a popular person. For each positive integer k, let xk be a person
with f k (xk ) = X. Because X only has finitely many friends, infinitely many of the f k−1 (xk ) (all of whom
designated X as best friend) must be the same person, who must be popular.
If people can have infinitely many friends, consider people Xi for positive integers i and Pi,j for i < j positive
integers. Xi designates Xi+1 as her best friend; Pi,i designates X1 as her best friend; Pi,j designates Pi+1,j as
her best friend if i < j. Then all Xi are popular, but X1 is not the best friend of a popular person.

Solution 2 (submitter, adapted). For any set S of people, let f −1 (S) be the set of people who designated
someone in S as their best friend. Since each person has only finitely many friends, if S is finite then f −1 (S) is
finite.
Let X be a popular person and put V0 = {X} and Vk = f −1 (Vk−1 ). All Vi are finite and (since X is popular)
nonempty.
If any two sets Vi , Vj , with 0 ≤ i < j are not disjoint, define f i (x) for positive integers i as in Solution 1.
It follows ∅ 6= f i (Vi ∩ Vj ) ⊆ f i (Vi ) ∩ f i (Vj ) ⊆ V0 ∩ Vj−i , thus X ∈ Vj−i . But this means that f j−i (X) = X,
therefore f n(j−i) (X) = X. Furthermore, if Y = f j−i−1 (X), then f (Y ) = X and f n(j−i) (Y ) = Y , so X is the
best friend of Y , who is popular.
If all sets Vn are disjoint, by König’s infinity lemma there exists an infinite sequence of (distinct) xi , i ≥ 0,
with xi ∈ Vi and xi = f (xi+1 ) for all i. Now x1 is popular and her best friend is x0 = X.
If people can have infinitely many friends, proceed as in Solution 1.

2
Problem 7. Let ABC be an acute-angled triangle with circumcircle Γ and orthocentre H. Let K be a point
of Γ on the other side of BC from A. Let L be the reflection of K in the line AB, and let M be the reflection
of K in the line BC. Let E be the second point of intersection of Γ with the circumcircle of triangle BLM .
Show that the lines KH, EM and BC are concurrent. (The orthocentre of a triangle is the point on all three
of its altitudes.)

Origin. Luxembourg (Pierre Haas).

Solution 1 (submitter). Since the quadrilateral BM EL is cyclic, we have ∠BEM = ∠BLM . By construc-
tion, |BK| = |BL| = |BM |, and so (using directed angles)

∠BLM = 90◦ − 12 ∠M BL = 90◦ − 180◦ − 12 ∠LBK − 21 ∠KBM




= 12 ∠LBK + 12 ∠KBM − 90◦ = (180◦ − ∠B) − 90◦ = 90◦ − B.




We see also that ∠BEM = ∠BAH, and so the point N of intersection of EM and AH lies on Γ.
Let X be the point of intersection of KH and BC, and let N 0 be the point of intersection of M X and AH.
Since BC bisects the segment KM by construction, the triangle KXM is isosceles; as AHkM K, HXN 0 is
isosceles. Since AH ⊥ BC, N 0 is the reflection of H in the line BC. It is well known that this reflection
lies on Γ, and so N 0 = N . Thus E, M , N and M , X, N 0 all lie on the same line M N ; that is, EM passes
through X.

E Γ

H
M

X
C
L B

K N = N0

Remark (submitter). The condition that K lies on the circumcircle of ABC is not necessary; indeed, the
solution above does not use it. However, together with the fact that the triangle ABC is acute-angled, this
condition implies that M is in the interior of Γ, which is necessary to avoid dealing with different configurations
including coincident points or the point of concurrence being at infinity.

Solution 2 (PSC). We work with directed angles. Let HK meet BC at X. Let M X meet AH at HA on Γ
(where HA is the reflection of H in BC). Define E 0 to be where HA M meets Γ (again). Our task is to show
that ∠M E 0 B = ∠M LB.
Observe that

∠M E 0 B = ∠HA AB (angles in same segment)


c
=B

Now

∠M LB = ∠HLB (Simson line, doubled)


= ∠BKHC (reflecting in the line AB)
= ∠BCHC (angles in the same segment)
= Bc.

3
Problem 8. A word is a finite sequence of letters from some alphabet. A word is repetitive if it is a con-
catenation of at least two identical subwords (for example, ababab and abcabc are repetitive, but ababa and
aabb are not). Prove that if a word has the property that swapping any two adjacent letters makes the word
repetitive, then all its letters are identical. (Note that one may swap two adjacent identical letters, leaving a
word unchanged.)

Origin. Romania (Dan Schwarz).

Solution 1 (submitter). In this and the subsequent solutions we refer to a word with all letters identical as
constant.
Let us consider a nonconstant word W , of length |W | = w, and reach a contradiction. Since the word
W must contain two distinct adjacent letters, be it W = AabB with a 6= b, we may assume B = cC to be
non-empty, and so W = AabcC. By the proper transpositions we get the repetitive words W 0 = AbacC = P w/p ,
of a period P of length p | w, 1 < p < w, and W 00 = AacbC = Qw/q , of a period Q of length q | w, 1 < q < w.
However, if a word U V is repetitive, then the word V U is also repetitive, of a same period length; therefore we
can work in the sequel with the repetitive words W00 = CAbac, of a period P 0 of length p, and W000 = CAacb,
of a period Q0 of length q. The main idea now is that the common prefix of two repetitive words
cannot be too long.
Now, if a word a1 a2 . . . aw = T w/t is repetitive, of a period T of length t | w, 1 ≤ t < w, then the word (and
any subword of it) is t-periodic, i.e. ak = ak+t , for all 1 ≤ k ≤ w − t. Therefore the word CA is both p-periodic
and q-periodic.
We now use the following classical result:

Wilf-Fine Theorem. Let p, q be positive integers, and let N be a word of length n, which is both p-periodic
and q-periodic. If n ≥ p + q − gcd(p, q) then the word N is gcd(p, q)-periodic (but this need not be the case if
instead n ≤ p + q − gcd(p, q) − 1).
By this we need |CA| ≤ p + q − gcd(p, q) − 1 ≤ p + q − 2, hence w ≤ p + q + 1, otherwise W00 and W000 would
be identical, absurd. Since p | w and 1 < p < w, we have 2p ≤ w ≤ p + q + 1, and so p ≤ q + 1; similarly we
have q ≤ p + 1.
If p = q, then |CA| ≤ p + p − gcd(p, p) − 1 = p − 1, so 2p ≤ w ≤ p + 2, implying p ≤ 2. But the three-letter
suffix acb is not periodic (not even for c = a or c = b), thus must be contained in Q0 , forcing q ≥ 3, contradiction.
If p 6= q, then max(p, q) = min(p, q) + 1, so 3 min(p, q) ≤ w ≤ 2 min(p, q) + 2, hence min(p, q) ≤ 2, forcing
min(p, q) = 2 and max(p, q) = 3; by an above observation, we may even say q = 3 and p = 2, leading to c = b. It
follows 6 = 3 min(p, q) ≤ w ≤ 2 min(p, q) + 2 = 6, forcing w = 6. This leads to CA = aba = abb, contradiction.

Solution 2 (submitter). We will take over from the solution above, just before invoking the Wilf-Fine
Theorem, by replacing it with a weaker lemma, also built upon a seminal result of combinatorics on words.

Lemma. Let p, q be positive integers, and let N be a word of length n, which is both p-periodic and q-
periodic. If n ≥ p + q then the word N is gcd(p, q)-periodic.

Proof. Let us first prove that two not-null words U , V commute, i.e. U V = V U , if and only if there exists
a word W with |W | = gcd(|U |, |V |), such that U = W |U |/|W | , V = W |V |/|W | . The “if” part being trivial, we
will prove the “only if” part, by strong induction on |U | + |V |. Indeed, for the base step |U | + |V | = 2 we
have |U | = |V | = 1, and so clearly we can take W = U = V . Now, for |U | + |V | > 2, if |U | = |V | it follows
U = V , and so we can again take W = U = V . If not, assume without loss of generality |U | < |V |; then
V = U V 0 , so U U V 0 = U V 0 U , whence U V 0 = V 0 U . Since |V 0 | < |V |, it follows 2 ≤ |U | + |V 0 | < |U | + |V |,
0
so by the induction hypothesis there exists a suitable word W such that U = W |U |/|W | , V 0 = W |V |/|W | , so
0 0
V = U V 0 = W |U |/|W | W |V |/|W | = W (|U |+|V |)/|W | = W |V |/|W | .
Now, assuming without loss of generality p ≤ q, q = kp+r, we have N = QP S, with |Q| = q, |P | = p. If r = 0
all is clear; otherwise it follows we can write P = U V , Q = V (U V )k , with |V | = r, whence U V = V U , implying
P Q = QP , and so by the above result there will exist a word W of length gcd(p, q) such that P = W p/ gcd(p,q) ,
Q = W q/ gcd(p,q) , therefore N is gcd(p, q)-periodic. 

By this we need |CA| ≤ p + q − 1, hence w ≤ p + q + 2, otherwise by the previous lemma W00 and W000 would
be identical, absurd. Since p | w and 1 < p < w, we have 2p ≤ w ≤ p + q + 2, and so p ≤ q + 2; similarly we have
q ≤ p + 2. That implies max(p, q) ≤ min(p, q) + 2. Now, from k max(p, q) = w ≤ p + q + 2 ≤ 2 max(p, q) + 2
we will have (k − 2) max(p, q) ≤ 2; but max(p, q) ≤ 2 is impossible, since the three-letter suffix acb is not
periodic (not even for c = a or c = b), thus must be contained in Q0 , forcing q ≥ 3. Therefore k = 2, and so
w = 2 max(p, q).

4
If max(p, q) = min(p, q), then w = 2p = 2q, for a quick contradiction.
If max(p, q) = min(p, q) + 1, it follows 3 min(p, q) ≤ w = 2 max(p, q) = 2 min(p, q) + 2, hence min(p, q) ≤ 2,
forcing min(p, q) = 2 and max(p, q) = 3; by an above observation, we may even say q = 3 and p = 2, leading to
c = b. It follows w = 2 max(p, q) = 6, leading to CA = aba = abb, contradiction.
If max(p, q) = min(p, q) + 2, it follows 3 min(p, q) ≤ w = 2 max(p, q) = 2 min(p, q) + 4, hence min(p, q) ≤ 4.
From min(p, q) | w = 2 max(p, q) then follows either min(p, q) = 2 and max(p, q) = 4, thus w = 8, clearly
contradictory, or else min(p, q) = 4 and max(p, q) = 6, thus w = 12, which also leads to contradiction, by just
a little deeper analysis.

Solution 3 (PSC). We define the distance between two words of the same length to be the number of positions
in which those two words have different letters. Any two words related by a transposition have distance 0 or 2;
any two words related by a sequence of two transpositions have distance 0, 2, 3 or 4.
Say the period of a repetitive word is the least k such that the word is the concatenation of two or more
identical subwords of length k. We use the following lemma on distances between repetitive words.

Lemma. Consider a pair of distinct, nonconstant repetitive words with periods ga and gb, where (a, b) = 1
and a, b > 1, the first word is made up of kb repetitions of the subword of length ga and the second word is
made up of ka repetitions of the subword of length gb. These two words have distance at least max(ka, kb).

Proof. We may assume k = 1, since the distance between the words is k times the distance between their
initial subwords of length gab. Without loss of generality suppose b > a.
For each positive integer m, look at the subsequence in each word of letters in positions congruent to m
(mod g). Those subsequences (of length ab) have periods dividing a and b respectively. If they are equal, then
they are constant (since each letter is equal to those a and b before and after it, mod ab, and (a, b) = 1).
Because a > 1, there is some m for which the first subsequence is not constant, and so is unequal to the second
subsequence. Restrict attention to those subsequences.
We now have two distinct repetitive words, one (nonconstant) made up of b repetitions of a subword of
length a and one made up of a repetitions of a subword of length b. Looking at the first of those words, for any
1 ≤ t ≤ b consider the letters in positions t, t + b, . . . , t + (a − 1)b. These letters cover every position (mod a);
since the first word is not constant, the letters are not all equal, but the letters in the corresponding positions
in the second word are all equal. At least one of these letters in the first word must change to make them all
equal to those in the corresponding positions in the second word; repeating for each t, at least b letters must
change, so the words have distance at least b. 

In the original problem, consider all the words (which we suppose to be repetitive) obtained by a transposition
of two adjacent letters from the original nonconstant word; say that word has length n. Suppose those words
include two distinct words with periods n/a and n/b; those words have distance at most 4. If a > 4 or b > 4,
we have a contradiction unless a | b or b | a. If a > 4 is the greatest number of repetitions in any of the words
(n/a is the smallest period), then unless all the numbers of repetitions divide each other there must be words
with 2 or 4 repetitions, words with 3 repetitions and all larger numbers of repetitions must divide each other
and be divisible by 6.
We now divide into three cases: all the numbers of repetitions may divide either other; or there may be
words with (multiples of) 2, 3 and 6 repetitions; or all words may have at most 4 repetitions, with at least one
word having 3 repetitions and at least one having 2 or 4 repetitions.

Case 1. Suppose all the numbers of repetitions divide each other. Let k be the least number of repetitions.
Consider the word as being divided into k blocks, each of ` letters; any transposition of two adjacent letters
leaves those blocks identical. If any two adjacent letters within a block are the same, then this means all the
blocks are already identical; since the word is not constant, the letters in the first block are not all identical,
so there are two distinct adjacent letters in the first block, and transposing them leaves it distinct from the
other blocks, a contradiction. Otherwise, all pairs of adjacent letters within each block are distinct; transposing
any adjacent pair within the first block leaves it identical to the second block. If the first block has more than
two letters, this is impossible since transposing the first two letters has a different result from transposing the
second two. So the blocks all have length 2; similarly, there are just two blocks, the arrangement is abba but
transposing the adjacent letters bb does not leave the word repetitive.

Case 2. Suppose some word resulting from a transposition is made of (a multiple of) 6 repetitions, some
of 3 repetitions and some of 2 repetitions (or 4 repetitions, counted as 2). Consider it as a sequence of 6 blocks,
each of length `. If the six blocks are already identical, then as the word is not constant, there are some
two distinct adjacent letters within the first block; transposing them leaves a result where the blocks form a

5
pattern BAAAAA, which cannot have two, three or six repetitions. So the six blocks are not already identical.
If a transposition within a block results in them being identical, the blocks form a pattern (without loss of
generality) BAAAAA, ABAAAA or AABAAA. In any of these cases, apply the same transposition (that
converts between A and B) to an A block adjacent to the B block, and the result cannot have two, three or six
repetitions. Finally, consider the case where some transposition between two adjacent blocks results in all six
blocks being identical. The patterns are BCAAAA, ABCAAA and AABCAA (and considering the letters at
the start and end of each block shows B 6= C). In all cases, transposing two adjacent distinct letters within an
A block produces a result that cannot have two, three or six repetitions.

Case 3. In the remaining case, all words have at most 4 repetitions, at least one has 3 repetitions and
at least one has 2 or 4 repetitions. For the purposes of this case we will think of 4-repetition words as being
2-repetition words. The number of each letter is a multiple of 6, so n ≥ 12; consider the word as made of six
blocks of length `.
If the word is already repetitive with 2 repetitions, pattern ABCABC, any transposition between two
distinct letters leaves it no longer repetitive with two repetitions, so it must instead have three repetitions
after the transposition. If AB is not all one letter, transposing two adjacent letters within AB implies that
CA = BC, so A = B = C, the word has pattern AAAAAA but transposing within the initial AA means it no
longer has 3 repetitions. This implies that AB is all one letter, but similarly BC must also be all one letter and
so the word is constant, a contradiction.
If the word is already repetitive with 3 repetitions, it has pattern ABABAB and any transposition leaves it
no longer having 3 repetitions, so having 2 repetitions instead. ABA is not made all of one letter (since the word
is not constant) and any transposition between two adjacent distinct letters therein turns it into BAB; such a
transposition affects at most two of the blocks, so A = B, the word has pattern AAAAAA and transposing two
adjacent distinct letters within the first half cannot leave it with two repetitions.
So the word is not already repetitive, and so no two adjacent letters are the same; all transpositions give
distinct strings. Consider transpositions of adjacent letters within the first four letters; three different words
result, of which at most one is periodic with two repetitions (it must be made of two copies of the second half
of the word) and at most one is periodic with three repetitions, a contradiction.

6
EGMO 2013
Problems with Solutions

Problem Selection Committee:


Charles Leytem (chair), Pierre Haas, Jingran Lin,
Christian Reiher, Gerhard Woeginger.

The Problem Selection Committee gratefully acknowledges the receipt


of 38 problems proposals from 9 countries:
Belarus, the Netherlands, Slovenia,
Bulgaria, Poland, Turkey,
Finland, Romania, the United Kingdom.
Problem 1. (Proposed by David Monk, United Kingdom)
The side BC of the triangle ABC is extended beyond C to D so that CD = BC.
The side CA is extended beyond A to E so that AE = 2CA.
Prove that if AD = BE, then the triangle ABC is right-angled.

Solution 1: Define F so that ABF D is a parallelogram. Then E, A, C, F are collinear


(as diagonals of a parallelogram bisect each other) and BF = AD = BE. Further, A is
the midpoint of EF , since AF = 2AC, and thus AB is an altitude of the isosceles triangle
EBF with apex B. Therefore AB ⊥ AC.

B C
D

A Variant. Let P be the midpoint of [AE], so that AP = AB because AE = 2AB.


Let Q be the midpoint of [AB]. Then P Q = 21 BE = 12 AD = CQ. Hence P A is a median
of the isosceles triangle CP Q. In other words, P A ⊥ AB, which completes the proof.

A
Q
B C
D

Solution 2: Notice that A is the centroid of triangle BDE, since C is the midpoint of
[BD] and AE = 2CA. Let M be the midpoint of [BE]. Then M , A, D lie on a line, and

2
further, AM = 21 AD = 12 BE. This implies that ∠EAB = 90◦ .

B C
D

Solution 3: Let P be the midpoint [AE]. Since C is the midpoint of [BD], and,
moreover, AC = EP , we have

[ACD] = [ABC] = [EBP ].

But AD = BE, and, as mentioned previously, AC = EP , so this implies that

∠BEP = ∠CAD or ∠BEP = 180◦ − ∠CAD.

But ∠CAD < ∠CED and ∠BEC + ∠CED < 180◦ , so we must be in the first case,
i.e. ∠BEP = ∠CAD. It follows that triangles BEP and DAC are congruent, and thus
∠BP A = ∠ACB. But AP = AC, so BA is a median of the isosceles triangle BCP . Thus
AB ⊥ P C, completing the proof.

B
C D

Solution 4: Write β = ∠ECB, and let x = AC, y = BC = CD, z = BE = AD.


Notice that EC = 3x. Then, using the cosine theorem,

z 2 = x2 + y 2 + 2xy cos β in triangle ACD;


z 2 = 9x2 + y 2 − 6xy cos β in triangle BCE.

3
Hence 4z 2 = 12x2 + 4y 2 or z 2 − y 2 = 3x2 . Let H be the foot of the perpendicular through
B to AC, and write h = BH. Then

y 2 − h2 = CH 2 , z 2 − h2 = EH 2 .

Hence z 2 − y 2 = EH 2 − CH 2 . Substituting from the above,

EH 2 − CH 2 = 3x2 = EA2 − CA2 .

Thus H = A, and hence the triangle ABC is right-angled at A.

Remark. It is possible to conclude directly from z 2 − y 2 = 3x2 = (2x)2 − x2 using


Carnot’s theorem.

Solution 5: Writing a = BC, b = CA, c = AB, we have


)
a2 = b2 + c2 − 2bc cos ∠A
in triangle ABC;
c2 = a2 + b2 − 2ab cos ∠C
EB 2 = 4b2 + c2 + 4bc cos ∠A in triangle AEB;
AD2 = a2 + b2 + 2ab cos ∠C in triangle ACD.

Thus

6b2 + 3c2 − 2a2 = 4b2 + c2 + 4bc cos ∠A = EB 2 = AD2


= a2 + b2 + 2ab cos ∠C = 2a2 + 2b2 − c2 ,

which gives a2 = b2 + c2 . Therefore ∠BAC is a right angle by the converse of the theorem
of Pythagoras.

−→ −→ −−→ −−→
Solution 6: Let AC = ~x and AB = ~y . Now AD = 2~x − ~y and EB = 2~x + ~y . Then
−−→ −−→ −−→ −−→
BE · BE = AD · AD ⇐⇒ (2~x + ~y )2 = (2~x − ~y )2 ⇐⇒ ~x · ~y = 0

and thus AC ⊥ AB, whence triangle ABC is right-angled at A.

−→ −−→
Remark. It is perhaps more natural to introduce CA = ~a and CB = ~b. Then we have
the equality
 2  2  
3~a − ~b = ~a + ~b =⇒ ~a · ~a − ~b = 0.

4
Solution 7: Let a, b, c, d, e denote the complex co-ordinates of the points A, B, C, D,
E and take the unit circle to be the circumcircle of ABC. We have

d = b + 2(c − b) = 2c − b and e = c + 3(a − c) = 3a − 2c .

Thus b − e = (d − a) + 2(b − a), and hence

BE = AD ⇐⇒ (b − e)(b − e) = (d − a)(d − a)
⇐⇒ 2(d − a)(b − a) + 2(d − a)(b − a) + 4(b − a)(b − a) = 0
⇐⇒ 2(d − a)(a − b) + 2(d − a)(b − a)ab + 4(b − a)(a − b) = 0
⇐⇒ (d − a) − (d − a)ab + 2(b − a) = 0
⇐⇒ 2c − b − a − 2cab + a + b + 2(b − a) = 0
⇐⇒ c2 − ab + bc − ac = 0
⇐⇒ (b + c)(c − a) = 0,

implying c = −b and that triangle ABC is right-angled at A.

Solution 8: We use areal co-ordinates with reference to the triangle ABC. Recall that if
(x1 , y1 , z1 ) and (x2 , y2 , z2 ) are points in the plane, then the square of the distance between
these two points is −a2 vw − b2 wu − c2 uv, where (u, v, w) = (x1 − x2 , y1 − y2 , z1 − z2 ).
In our case A = (1, 0, 0), B = (0, 1, 0), C = (0, 0, 1), so E = (3, 0, 2) and, introducing
point F as in the first solution, F = (−1, 0, 2). Then

BE 2 = AD2 ⇐⇒ −2a2 + 6b2 + 3c2 = 2a2 + 2b2 − c2 ,

and thus a2 = b2 + c2 . Therefore ∠BAC is a right angle by the converse of the theorem
of Pythagoras.

5
Problem 2. (Proposed by Matti Lehtinen, Finland)
Determine all integers m for which the m × m square can be dissected into
five rectangles, the side lengths of which are the integers 1, 2, 3, . . . , 10 in some
order.

Solution: The solution naturally divides into three different parts: we first obtain some
bounds on m. We then describe the structure of possible dissections, and finally, we deal
with the few remaining cases.

In the first part of the solution, we get rid of the cases with m 6 10 or m > 14.
Let `1 , . . . , `5 and w1 , . . . , w5 be the lengths and widths of the five rectangles. Then the
rearrangement inequality yields the lower bound

`1 w1 + `2 w2 + `3 w3 + `4 w4 + `5 w5
1
 
= `1 w1 + `2 w2 + `3 w3 + `4 w4 + `5 w5 + w1 `1 + w2 `2 + w3 `3 + w3 `4 + w5 `5
2
1

> 1 · 10 + 2 · 9 + 3 · 8 + · · · + 8 · 3 + 9 · 2 + 10 · 1 = 110,
2
and the upper bound

`1 w1 + `2 w2 + `3 w3 + `4 w4 + `5 w5
1
 
= `1 w1 + `2 w2 + `3 w3 + `4 w4 + `5 w5 + w1 `1 + w2 `2 + w3 `3 + w3 `4 + w5 `5
2
1

6 1 · 1 + 2 · 2 + 3 · 3 + · · · + 8 · 8 + 9 · 9 + 10 · 10 = 192.5,
2
As the area of the square is sandwiched between 110 and 192.5, the only possible candi-
dates for m are 11, 12, and 13.

In the second part of the solution, we show that a dissection of the square into five
rectangles must consist of a single inner rectangle and four outer rectangles that each
cover one of the four corners of the square. Indeed, if one of the sides the square had
three rectangles adjacent to it, removing these three rectangles would leave a polygon
with eight vertices, which is clearly not the union of two rectangles. Moreover, since
m > 10, each side of the square has at least two adjacent rectangles. Hence each side of
the square has precisely two adjacent rectangles, and thus the only way of partitionning
the square into five rectangles is to have a single inner rectangle and four outer rectangles
each covering of the four corners of the square, as claimed.

Let us now show that a square of size 12 × 12 cannot be dissected in the desired
way. Let R1 , R2 , R3 and R4 be the outer rectangles (in clockwise orientation along the

6
boundary of the square). If an outer rectangle has a side of length s, then some adjacent
outer rectangle must have a side of length 12 − s. Therefore, neither of s = 1 or s = 6
can be sidelengths of an outer rectangle, so the inner rectangle must have dimensions
1 × 6. One of the outer rectangles (say R1 ) must have dimensions 10 × x, and an adjacent
rectangle (say R2 ) must thus have dimensions 2 × y. Rectangle R3 then has dimensions
(12 − y) × z, and rectangle R4 has dimensions (12 − z) × (12 − x). Note that exactly one
of the three numbers x, y, z is even (and equals 4 or 8), while the other two numbers are
odd. Now, the total area of all five rectangles is

144 = 6 + 10x + 2y + (12 − y) z + (12 − z)(12 − x),

which simplifies to (y − x)(z − 2) = 6. As exactly one of the three numbers x, y, z is even,


the factors y − x and z − 2 are either both even or both odd, so their product cannot
equal 6, and thus there is no solution with m = 12.

Finally, we handle the cases m = 11 and m = 13, which indeed are solutions. The
corresponding rectangle sets are 10 × 5, 1 × 9, 8 × 2, 7 × 4 and 3 × 6 for m = 11, and
10 × 5, 9 × 8, 4 × 6, 3 × 7 and 1 × 2 for m = 13. These sets can be found by trial and
error. The corresponding partitions are shown in the figure below.

3×6
9×8
10×5

10×5

7×4
8×2
1×2

4×6
3×7
1×9

Remark. The configurations for m = 11 and m = 13 given above are not unique.

A Variant for Obtaining Bounds. We first exclude the cases m 6 9 by the observa-
tion that one of the small rectangles has a side of length 10 and must fit into the square;
hence m > 10.
To exclude the cases m > 14, we work via the perimeter: as every rectangle has at
most two sides on the boundary of the m × m square, the perimeter 4m of the square is
bounded by 1 + 2 + 3 + 4 + 5 + 6 + 7 + 8 + 9 + 10 = 55; hence m 6 13.

7
We are left to deal with the case m = 10: clearly, the rectangle with side length 10
must have one its sides of length 10 along the boundary of the square. The remaining
rectangle R of dimensions 10 × s, say, would have to be divided into four rectangles with
different sidelengths strictly less than 10. If there were at least two rectangles adjacent
to one of the sides of length s of R, removing these two rectangles from R would leave
a polygon with at least six vertices (since the sidelengths of the rectangles partitioning
R are strictly less than 10). It is clearly impossible to partition such a polygon into no
more than two rectangles with different sidelengths. Hence, given a side of length s of R,
there is only one rectangle adjacent to that side, so the rectangles adjacent to the sides
of length s of R would have to have the same length s, a contradiction.

Remark. Note that the argument of the second part of the main solution cannot be
directly applied to the case m = 10.

A Variant for Dealing with m = 12. As in the previous solution, we show that the
inner rectangle must have dimensions 1 × 6. Since the area of the square and the area of
the inner rectangle are even, the areas of the four outer rectangles must sum to an even
number. Now the four sides of the square are divided into segments of lengths 2 and 10,
3 and 9, 4 and 8, and 5 and 7. Hence the sides with adjacent segments of lengths 3 and
9, and 5 and 7 must be opposite sides of the square (otherwise, exactly one of the outer
rectangles would have odd area). However, the difference of two rectangle side lengths on
opposite sides of the square must be 1 or 6 (in order to accomodate the inner rectangle).
This is not the case, so there is no solution with m = 12.

Remark. In the case m = 12, having shown that the inner rectangle must have dimen-
sions 1 × 6, this case can also be dealt with by listing the remaining configurations one
by one.

8
Problem 3. (Proposed by Dan Schwarz, Romania)
Let n be a positive integer.
(a) Prove that there exists a set S of 6n pairwise different positive integers,
such that the least common multiple of any two elements of S is no larger
than 32n2 .
(b) Prove that every set T of 6n pairwise different positive integers contains
two elements the least common multiple of which is larger than 9n2 .

Solution: (a) Let the set A consist of the 4n integers 1, 2, . . . , 4n and let the set B
consist of the 2n even integers 4n + 2, 4n + 4, . . . , 8n. We claim that the 6n-element set
S = A ∪ B has the desired property.
Indeed, the least common multiple of two (even) elements of B is no larger than
8n · (8n/2) = 32n2 , and the least common multiple of some element of A and some
element of A ∪ B is at most their product, which is at most 4n · 8n = 32n2 .
(b) We prove the following lemma: “If a set U contains m + 1 integers, where m > 2,
that are all not less than m, then some two of its elements have least common multiple
strictly larger than m2 .”
Let the elements of U be u1 > u2 > · · · > um+1 > m. Note that 1/u1 6 1/ui 6 1/m
for 1 6 i 6 m + 1. We partition the interval [1/u1 ; 1/m] into m subintervals of equal
length. By the pigeonhole principle, there exist indices i, j with 1 6 i < j 6 m + 1 such
that 1/ui and 1/uj belong to the same subinterval. Hence
1 1 1 1 1 1
 
0 < − 6 − < .
uj ui m m u1 m2
Now 1/uj −1/ui is a positive fraction with denominator lcm(ui , uj ). The above thus yields
the lower bound lcm(ui , uj ) > m2 , completing the proof of the lemma.
Applying the lemma with m = 3n to the 3n + 1 largest elements of T , which are all
not less than 3n, we arrive at the desired statement.

A Variant. Alternatively, for part (b), we prove the following lemma: “If a set U
contains m > 2 integers that all are greater than m, then some two of its elements have
least common multiple strictly larger than m2 .”
Let u1 > u2 > · · · > um be the elements of U . Since um > m = m2 /m, there exists
a smallest index k such that uk > m2 /k. If k = 1, then u1 > m2 , and the least common
multiple of u1 and u2 is strictly larger than m2 . So let us suppose k > 1 from now on, so
that we have uk > m2 /k and uk−1 6 m2 /(k − 1). The greatest common divisor d of uk−1
and uk satisfies
m2 m2 m2
d 6 uk−1 − uk < − = .
k−1 k (k − 1)k

9
This implies m2 /(dk) > k − 1 and uk /d > k − 1, and hence uk /d > k. But then the least
common multiple of uk−1 and uk equals

uk−1 uk uk m2
> uk · > · k = m2 ,
d d k
and the proof of the lemma is complete.
If we remove the 3n smallest elements from set T and apply the lemma with m = 3n
to the remaining elements, we arrive at the desired statement.

10
Problem 4. (Proposed by Vesna Iršič, Slovenia)
Find all positive integers a and b for which there are three consecutive integers
at which the polynomial
n5 + a
P (n) =
b
takes integer values.

Solution 1: Denote the three consecutive integers by x − 1, x, and x + 1, so that

(x−1)5 +a ≡ 0 (mod b), x5 +a ≡ 0 (mod b), (x+1)5 +a ≡ 0 (mod b). (1)

By computing the differences of the equations in (1) we get


A := (x + 1)5 − (x − 1)5 = 10x4 + 20x2 + 2 ≡ 0 (mod b), (2)
B := (x + 1)5 − x5 = 5x4 + 10x3 + 10x2 + 5x + 1 ≡ 0 (mod b). (3)
Adding the first and third equation in (1) and subtracting twice the second equation yields

C := (x + 1)5 + (x − 1)5 − 2x5 = 20x3 + 10x ≡ 0 (mod b). (4)

Next, (2) and (4) together yield

D := 4xA − (2x2 + 3)C = − 22x ≡ 0 (mod b). (5)

Finally we combine (3) and (5) to derive

22B + (5x3 + 10x2 + 10x + 5)D = 22 ≡ 0 (mod b).

As the positive integer b divides 22, we are left with the four cases b = 1, b = 2, b = 11
and b = 22.
If b is even (i.e. b = 2 or b = 22), then we get a contradiction from (3), because the
integer B = 2(5x3 + 5x2 ) + 5(x4 + x) + 1 is odd, and hence not divisible by any even
integer.
For b = 1, it is trivial to see that a polynomial of the form P (n) = n5 + a, with a any
positive integer, has the desired property.
For b = 11, we note that

n ≡ 0, 1, 2,3, 4, 5, 6, 7, 8, 9, 10 (mod 11)


=⇒ n5 ≡ 0, 1, −1, 1, 1, 1, −1, −1, −1, 1, −1 (mod 11).

Hence a polynomial of the form P (n) = (n5 + a)/11 has the desired property if and only
if a ≡ ±1 (mod 11). This completes the proof.

11
A Variant. We start by following the first solution up to equation (4). We note that
b = 1 is a trivial solution, and assume from now on that b > 2. As (x − 1)5 + a and x5 + a
have different parity, b must be odd. As B in (3) is a multiple of b, we conclude that (i)
b is not divisible by 5 and that (ii) b and x are relatively prime. As C = 10x(2x2 + 1) in
(4) is divisible by b, we altogether derive

E := 2x2 + 1 ≡ 0 (mod b).

Together with (2) this implies that

5E 2 + 10E − 2A = 11 ≡ 0 (mod b).

Hence b = 11 is the only remaining candidate, and it is handled as in the first solution.

Solution 2: Let p be a prime such that p divides b. For some integer x, we have

(x − 1)5 ≡ x5 ≡ (x + 1)5 (mod p).

Now, there is a primitive root g modulo p, so there exist u, v, w such that

x − 1 ≡ gu (mod p), x ≡ gv (mod p), x + 1 ≡ gw (mod p). (6)

The condition of the problem is thus

g 5u ≡ g 5v ≡ g 5w (mod p) =⇒ 5u ≡ 5v ≡ 5w (mod p − 1).

If p 6≡ 1 (mod 5), then 5 is invertible modulo p − 1 and thus u ≡ v ≡ w (mod p − 1),


i.e. x − 1 ≡ x ≡ x + 1 (mod p). This is a contradiction. Hence p ≡ 1 (mod 5) and thus
u ≡ v ≡ w (mod p−1 5
). Thus, from (6), there exist integers k, ` such that
p−1

x − 1 ≡ g v+k 5 ≡ xtk (mod p)  p−1
where t = g 5 .
v+` p−1
x+1≡g 5 ≡ xt` (mod p) 

Let r = tk and s = t` . In particular, the above yields r, s 6≡ 1 (mod p), and thus

x ≡ −(r − 1)−1 ≡ (s − 1)−1 (mod p).

It follows that

(r − 1)−1 + (s − 1)−1 ≡ 0 (mod p) =⇒ r+s≡2 (mod p).

Now t5 ≡ 1 (mod p), so r and s must be congruent, modulo p, to some of the non-trivial
fifth roots of unity t, t2 , t3 , t4 . Observe that, for any pair of these non-trivial roots of unity,

12
either one is the other’s inverse, or one is the other’s square. In the first case, we have
r + r−1 ≡ 2 (mod p), implying r ≡ 1 (mod p), a contradiction. Hence
r + r2 ≡ 2 (mod p) =⇒ (r − 1)(r + 2) ≡ 0 (mod p),
or
s2 + s ≡ 2 (mod p) =⇒ (s − 1)(s + 2) ≡ 0 (mod p).
Thus, since r, s 6≡ 1 (mod p), we have r ≡ −2 (mod p) or s ≡ −2 (mod p), and thus
1 ≡ r5 ≡ −32 (mod p) or an analogous equation obtained from s. Hence p | 33. Since
p ≡ 1 (mod 5), it follows that p = 11, i.e. b is a power of 11.
Examining the fifth powers modulo 11, we see that b = 11 is indeed a solution with
a ≡ ±1 (mod 11) and, correspondingly, x ≡ ±4 (mod 11). Now suppose, for the sake of
contradiction, that 112 divides b. Then, for some integer m, we must have
   
x − 1, x, x + 1 ≡ ± 3 + 11m, 4 + 11m, 5 + 11m (mod 121),
and thus, substituting into the condition of the problem,
35 + 55 · 34 m ≡ 45 + 55 · 44 m ≡ 55 + 55 · 54 m (mod 121)
=⇒ 1 − 22m ≡ 56 + 44m ≡ −21 + 11m (mod 121).
Hence 33m ≡ 22 (mod 121) and 33m ≡ 44 (mod 121), so 22 ≡ 0 (mod 121), a contra-
diction. It follows that b | 11.
Finally, we conclude that the positive integers satisfying the original condition are
b = 11, with a ≡ ±1 (mod 11), and b = 1, for any positive integer a.

Solution 3: Denote the three consecutive integers by x−1, x, and x+1 as in Solution 1.
By computing the differences in (1), we find
F := (x + 1)5 − x5 = 5x4 + 10x3 + 10x2 + 5x + 1 ≡ 0 (mod b),
G := x5 − (x − 1)5 = 5x4 − 10x3 + 10x2 − 5x + 1 ≡ 0 (mod b).
By determining the polynomial greatest divisor of F (x) and G(x) using the Euclidean
algorithm, we find that
p(x)F (x) + q(x)G(x) = 22, (7)
where
p(x) = −15x3 + 30x2 − 28x + 11,
q(x) = 15x3 + 30x2 + 28x + 11.
Since b | F (x) and b | G(x), it follows from (7) that b | 22. We now finish off the problem
as in Solution 1.

13
Problem 5. (Proposed by Waldemar Pompe, Poland)
Let Ω be the circumcircle of the triangle ABC. The circle ω is tangent to the
sides AC and BC, and it is internally tangent to Ω at the point P . A line
parallel to AB and intersecting the interior of triangle ABC is tangent to ω
at Q.
Prove that ∠ACP = ∠QCB.

Solution 1: Assume that ω is tangent to AC and BC at E and F , respectively and


let P E, P F , P Q meet Ω at K, L, M , respectively. Let I and O denote the respective
centres of ω and Ω, and consider the homethety H that maps ω onto Ω. Now K is the
image of E under H , and EI ⊥ AC. Hence OK ⊥ AC, and thus K is the midpoint of
the arc CA. Similarly, L is the midpoint of the arc BC and M is the midpoint of the arc
BA. It follows that arcs LM and CK are equal, because



BM = M A =⇒ BL + LM = M K + KA =⇒ LC + LM = M K + CK



=⇒ 2LM + M C = M C + 2CK =⇒ LM = CK.

Thus arcs F Q and DE of ω are equal, too, where D is the intersection of CP with ω. Since
CE and CF are tangents to ω, this implies that ∠DEC = ∠CF Q. Further, CE = CF ,
and thus triangles CED and CF Q are congruent. In particular, ∠ECD = ∠QCF , as
required.

M
C

K Q
D
ω F

E
I

A B

14
A Variant. As above, we show that arcs F Q and DE of ω are equal, which implies
that DEF Q is an isoceles trapezoid, and so we have ∠F ED = ∠QF E. Together with
|F Q| = |DE|, this implies that, since E and F are images of each other under reflection
in the angle bisector CI of ∠C, so are the segments [EQ] and [F D], and, in particular,
D and Q. In turn, this yields ∠ECD = ∠QCF , as required.

Remark. Let J denote the incentre of ABC. By Sawayama’s theorem, J is the midpoint
of [EF ], i.e. P J is a median of P F E. Since C is the intersection of the tangents AC and
BC to the circumcircle of P F E at E and F , respectively, P C is a symmedian of P F E.
Thus ∠CP E = ∠F P J. But, since the arcs F Q and DE of ω are equal, ∠CP E = ∠F P Q.
This shows that J lies on the line P Q.

Another Variant. We show that arcs QE and F D are equal, and then finish as in the
main solution. Let BP meet ω again at Z. Consider the homothety H that maps ω onto
Ω. Under H , D 7→ C and Z 7→ B, so DZ k CB. (This also follows by considering the
common tangent to ω and Ω, and tangential angles.) Now, by power of a point,

BF 2 = BZ · BP, CF 2 = CD · CP.

Now DZ k CB implies BZ/BP = CD/CP , and so, dividing the two previous equa-
tions by each other, and taking square roots, BF/CF = BP/CP . Hence P F bissects
angle ∠BP C. Now let ∠BP F = ∠F P C = β. By tangential angles, it follows that
∠CF D = β. Further, ∠BAC = ∠BP C = 2β. Let the tangent to ω through Q and
parallel to AB meet AC at X. Then ∠QXC = 2β, so, since XQ = XE by tangency,
∠QEX = β. By tangential angles, it follows that arcs F D and QE are equal, as claimed.

X D Q

ω F

A B
Z

15
Solution 2: Let I and O denote the respective centres of ω and Ω. Observe that
CI is the angle bisector of angle ∠C, because ω is tangent to AC and BC. Consider the
homethety H that maps ω onto Ω. Let M be the image of Q under H . By construction,
IQ ⊥ AB, so OM ⊥ AB. Thus the diameter OM of Ω passes through the midpoint of
the arc AB of Ω, which also lies on the angle bisector CI. This implies that ∠ICM = 90◦ .
We next show that P, I, Q, C lie on a circle. Notice that
 
∠P QI = 90◦ − 12 ∠QIP = 90◦ − 12 ∠M OP = 90◦ − 180◦ − ∠P CM
 
= ∠P CI + ∠ICM − 90◦ = ∠P CI.

Hence P, I, Q, C lie on a circle. But P I = IQ, so CI is the angle bisector of ∠P CQ. Since
CI is also the angle bisector of angle ∠C, it follows that ∠ACP = ∠QCB, as required.

M
C

ω O

A B
T

A Variant. We show that P IQC is cyclic by chasing angles. Define α = ∠BAC,


β = ∠CBA and γ = ∠ACP . For convenience, we consider the configuration where A
and P lie one the same side of the angle bisector CI of ∠C. In this configuration,

∠P CI = 21 ∠ACB − ∠ACP = 90◦ − 12 α − 12 β − γ.

Now notice that ∠P BA = ∠ACP = γ, and therefore ∠CAP = 180◦ − β − γ, whence


∠P AB = 180◦ −α−β−γ. Further, P O is a diameter of Ω, and therefore ∠AP O = 90◦ −γ.
Let AB and P O intersect at T . Then

∠BT O = 180◦ − ∠P AB − ∠AP O = α + β + 2γ − 90◦ .

16
But QI ⊥ AB by construction, and thus
∠OIQ = 90◦ − ∠BT O = 180◦ − α − β − 2γ
=⇒ ∠QIP = 180◦ − ∠OIQ = α + β + 2γ
=⇒ ∠P QI = 90◦ − 12 α − 12 β − γ.
Hence ∠ICQ = ∠P QI, and thus P IQC is cyclic. Since P I = QI, it follows that CI is
the angle bisector of ∠P CQ, which completes the proof.

Solution 3: Let I and O denote the respective centres of ω and Ω. Let D be the second
point of intersection of CP with ω, and let ` denote the tangent to ω at D, which meets
AC at S. Hence ID ⊥ `. By construction, P , I, O lie one a line, and hence the isosceles
triangles P ID and P OC are similar. In particular, it follows that OC ⊥ `, so C is the
midpoint of the arc of Ω defined by the points of intersection of ` with Ω. It is easy to
see that this implies that
∠DSC = ∠ABC.
Under reflection in the angle bisector CI of ∠C, ` is thus mapped to a tangent to ω
parallel to AB and intersecting the interior of ABC, since ω is mapped to itself under
this reflection. In particular, D is mapped to Q, and thus ∠QCB = ∠ACD, as required.

D
S
ω O

` I

A B

Remark. Conceptually, this solution is similar to Solution 1, but here, we proceed


more directly via the reflectional symmetry. Therefore, this solution links Solution 1 to
Solution 4, in which we use an inversion.

17
Solution 4: Let the tangent to ω at Q meet AC and BC at X and Y , respectively. Then
AC/XC = BC/Y C, and thus there is a radius r such that r2 = AC · Y C = BC · XC.
Let Γ denote the circle with centre C and radius r, and consider the inversion I in the
circle Γ . Under I ,

A 7−→ A0 , the point on the ray CA satisfying CA0 = CY ;


B 7−→ B 0 , the point on the ray CB satisfying CB 0 = CX;
Ω 7−→ the line A0 B 0 ;
ω 7−→ ω 0 , the excircle of CA0 B 0 opposite C;
P 7−→ P 0 , the point where ω 0 touches A0 B 0 ;

In particular, ω 0 , the image of ω, is a circle tangent to AC, BC and A0 B 0 , so it is either


the excircle of CA0 B 0 opposite C, or the incircle of CA0 B 0 . Let ω be tangent to BC at F ,
and let F 0 be the image of F under I . Then CF · CF 0 = BC · XC. Now CF < BC, so
CF 0 > CX = CB 0 . Hence ω 0 cannot be the incircle, so ω 0 is indeed the excircle of CA0 B 0
opposite C.
Now note that ω is the excircle of CXY opposite C. The reflection about the angle
bisector of ∠C maps X to B 0 , Y to A0 . It thus maps the triangle CXY to CB 0 A0 , ω to
ω 0 and, finally, Q to P 0 . It follows that ∠ACP = ∠ACP 0 = ∠QCB, as required.

C Γ

B0
X Y
P0 Q
A0
ω

A B

Solution 5: Let r be the radius such that r2 = AC ·BC. Let J denote the composition
of the inversion I in the circle of centre C and radius r, followed by the reflection in the

18
angle bisector of ∠C. Under J ,

A 7−→ B, B 7→ A;
Ω 7−→ the line AB;
ω 7−→ ω 0 , the excircle of ABC opposite the vertex C;
P 7−→ Q0 , the point where ω 0 touches AB;

In particular, note that the image ω 0 of ω under J is a circle tangent to AC, BC and
AB, so it is either the incircle of ABC, or the excircle opposite vertex C. Observe that
r > min {AC, BC}, so the image of the points of tangency of ω must lie outside ABC,
and thus ω 0 cannot be the incircle. Thus ω 0 is the excircle opposite vertex C as claimed.
Further, the point of tangency P is mapped to Q0 .
Now, since the line CP is mapped to itself under the inversion I , and mapped onto
CQ0 under J , CP and CQ0 are images of each other under reflection in the angle bisector
of ∠C. But C, Q, Q0 lie on a line for there is a homothety with centre C that maps ω
onto the excircle ω 0 . This completes the proof.

Q0
A B

P
ω0

Solution 6: Assume that ω is tangent to AC and BC at E and F , respectively. Assume


that CP meets ω at D. Let I and O denote the respective centres of ω and Ω. To set
up a solution in the complex plane, we take the circle ω as the unit circle centered at the
origin of the complex plane, and let P O be the real axis with o > 0, where we use the
convention that lowercase letters denote complex coordinates of corresponding points in
the plane denoted by uppercase letters.

19
Now, a point Z on the circle Ω satisfies

|z − o|2 = (o + 1)2 ⇐⇒ zz ∗ − o(z + z ∗ ) − 2o − 1 = 0.

The triangle ABC is defined by the points E and. F on ω, the intersection C of the
corresponding tangents lying on Ω. Thus c = 2ef (e + f ), and further

|c − o|2 = (o + 1)2 ⇐⇒ cc∗ − o(c + c∗ ) − 2o − 1 = 0, (1)

and this is the equality defining o. The points A and B are the second intersection points
of Ω with the tangents to ω at E and F respectively. A point Z on the tangent through
E is given by z = 2e − e2 z ∗ , and thus A and C satisfy
   
2e − e2 z ∗ z ∗ − o 2e − e2 z ∗ + z ∗ − 2o − 1 = 0
   
⇐⇒ −e2 z ∗ 2 + 2e + oe2 − o z ∗ − 2eo + 2o + 1 = 0
   
⇐⇒ z ∗ 2 − 2e∗ + o − oe∗ 2 z ∗ + 2e∗ o + 2oe∗ 2 + e∗ 2 = 0,

since |e| = 1. Thus

2e∗ f  
a∗ + c∗ = 2e∗ + o − oe∗ 2 =⇒ a∗ = + o 1 − e∗ 2 ,
e+f
and similarly
2f ∗ e  

b = + o 1 − f ∗2 .
f +e
Then
2(ef ∗ − e∗ f )  
b ∗ − a∗ = + o e∗ 2 − f ∗ 2
e+f
 
2ef f ∗ 2 − e∗ 2  
= + o e∗ 2 − f ∗ 2
e+f
!

∗2 ∗2
 2ef  
= f −e − o = f ∗ 2 − e∗ 2 (c − o).
e+f

Now let Z be a point on the tangent to ω parallel to AB passing through Q. Then

z = 2q − q 2 z ∗ ⇐⇒ z − q = q − q 2 z ∗ = −q 2 (z ∗ − q ∗ ),

for |q| = 1, and thus

b−a z−q −q 2 (z ∗ − q ∗ )
= = = −q 2 .
b ∗ − a∗ z∗ − q∗ z∗ − q∗

20
It follows that
 
b−a f 2 − e2 (c∗ − o) ∗
2 2c − o
q2 = − = −   = e f
b ∗ − a∗ f ∗ 2 − e∗ 2 (c − o) c−o
(c∗ − o)2 ∗
2 2 (c − o)
2
= e2 f 2 = e f ,
|c − o|2 (1 + o)2

where we have used (1). In particular,

c∗ − o
q = ef ,
1+o
where the choice of sign is to be justified a posteriori. Further, the point D satisfies
d−p c−p c−p c+1
−dp = ∗ ∗
= ∗ =⇒ d=− = ∗ ,
d −p c − p∗ c∗ p
−1 c +1
using p = −1 to obtain the final equality.
Now, it suffices to show that (i) DQ k EF ⊥ CI and (ii) the midpoint of [DQ] is on
CI. The desired equality then follows by symmetry with respect to the angle bisector of
the angle ∠ACB. Notice that (i) is equivalent with

d−q e−f
∗ ∗
= ∗ ⇐⇒ dq = ef.
d −q e − f∗

for [DQ] and [EF ] are chords of ω. But

c + 1 c∗ − o
dq = ef ⇐⇒ ef = ef ⇐⇒ (c + 1)(c∗ − o) = (c∗ + 1)(1 + o)
c∗ + 1 1 + o
⇐⇒ cc∗ − o(c + c∗ ) − 2o − 1 = 0.

The last equality is precisely the defining relation for o, (1). This proves (i). Further, the
midpoint of [DQ] is 21 (d + q), so it remains to check that

d+q c
dq = ∗ ∗
= ∗ = ef,
d +q c

where the first equality expresses that [DQ] is a chord of ω (obviously) containing its
midpoint, the second equality expresses the alignment of the midpoint of [DQ], C and
I, and the third equality follows from the expression for c. But we have just shown that
dq = ef . This proves (ii), justifies the choice of sign for q a posteriori, and thus completes
the solution of the problem.

21
Problem 6. (Proposed by Emil Kolev, Bulgaria)
Snow White and the Seven Dwarves are living in their house in the forest.
On each of 16 consecutive days, some of the dwarves worked in the diamond
mine while the remaining dwarves collected berries in the forest. No dwarf
performed both types of work on the same day. On any two different (not
necessarily consecutive) days, at least three dwarves each performed both
types of work. Further, on the first day, all seven dwarves worked in the
diamond mine.
Prove that, on one of these 16 days, all seven dwarves were collecting
berries.

Solution 1: We define V as the set of all 128 vectors of length 7 with entries in {0, 1}.
Every such vector encodes the work schedule of a single day: if the i-th entry is 0 then
the i-th dwarf works in the mine, and if this entry is 1 then the i-th dwarf collects berries.
The 16 working days correspond to 16 vectors d1 , . . . , d16 in V , which we will call day-
vectors. The condition imposed on any pair of distinct days means that any two distinct
day-vectors di and dj differ in at least three positions.
We say that a vector x ∈ V covers some vector y ∈ V , if x and y differ in at most
one position; note that every vector in V covers exactly eight vectors. For each of the 16
day-vectors di we define Bi ⊂ V as the set of the eight vectors that are covered by di . As,
for i 6= j, the day-vectors di and dj differ in at least three positions, their corresponding
sets Bi and Bj are disjoint. As the sets B1 , . . . , B16 together contain 16 · 8 = 128 = |V |
distinct elements, they form a partition of V ; in other words, every vector in V is covered
by precisely one day-vector.
The weight of a vector v ∈ V is  defined as the number of 1-entries in v. For
7
k = 0, 1, . . . , 7, the set V contains k vectors of weight k. Let us analyse the 16 day-
vectors d1 , . . . , d16 by their weights, and let us discuss how the vectors in V are covered
by them.

1. As all seven dwarves work in the diamond mine on the first day, the first day-vector is
d1 = (0000000). This day-vector covers all vectors in V with weight 0 or 1.

2. No day-vector can have weight 2,


 as otherwise it would differ from d1 in at most two
positions. Hence each of the 72 = 21 vectors of weight 2 must be covered by some
day-vector of weight 3. As every vector of weight 3 covers three vectors of weight 2,
exactly 21/3 = 7 day-vectors have weight 3.
 
3. How are the 73 = 35 vectors of weight 3 covered by the day-vectors? Seven of them are
day-vectors, and the remaining 28 ones must be covered by day-vectors of weight 4. As
every vector of weight 4 covers four vectors of weight 3, exactly 28/4 = 7 day-vectors
have weight 4.

22
To summarize, one day-vector has weight 0, seven have weight 3, and seven have weight 4.
None of these 15 day-vectors covers any vector of weight 6 or 7, so that the eight heavy-
weight vectors in V must be covered by the only remaining day-vector; and this remaining
vector must be (1111111). On the day corresponding to (1111111) all seven dwarves are
collecting berries, and that is what we wanted to show.

Solution 2: If a dwarf X performs the same type of work on three days D1 , D2 , D3 ,


then we say that this triple of days is monotonous for X. We claim that the following
configuration cannot occur: There are three dwarves X1 , X2 , X3 and three days D1 , D2 ,
D3 , such that the triple (D1 , D2 , D3 ) is monotonous for each of the dwarves X1 , X2 , X3 .
(Proof: Suppose that such a configuration would occur. Then among the remaining
dwarves there exist three dwarves Y1 , Y2 , Y3 that performed both types of work on day
D1 and on day D2 ; without loss of generality these three dwarves worked in the mine on
day D1 and collected berries on day D2 . On day D3 , two of Y1 , Y2 , Y3 performed the same
type of work, and without loss of generality Y1 and Y2 worked in the mine. But then on
days D1 and D3 , each of the five dwarves X1 , X2 , X3 , Y1 , Y2 performed only one type of
work; this is in contradiction with the problem statement.)
Next we consider some fixed triple X1 , X2 , X3 of dwarves. There are eight possible
working schedules for X1 , X2 , X3 (like mine-mine-mine, mine-mine-berries, mine-berries-
mine, etc). As the above forbidden configuration does not occur, each of these eight
working schedules must occur on exactly two of the sixteen days. In particular this
implies that every dwarf worked exactly eight times in the mine and exactly eight times
in the forest.
For 0 6 k 6 7 we denote by d(k) the number of days on which exactly k dwarves
were collecting berries. Since on the first day all seven dwarves were in the mine, on each
of the remaining days at least three dwarves collected berries. This yields d(0) = 1 and
d(1) = d(2) = 0. We assume, for the sake of contradiction, that d(7) = 0 and hence

d(3) + d(4) + d(5) + d(6) = 15. (1)

As every dwarf collected berries exactly eight times, we get that, further,

3 d(3) + 4 d(4) + 5 d(5) + 6 d(6) = 7 · 8 = 56. (2)

Next, let us count the number q of quadruples (X1 , X2 , X3 , D) for which X1 , X2 , X3


are three pairwise distinct dwarves that all collected berries on day D. As there are
7 · 6 · 5 = 210 triples of pairwise distinct dwarves, and as every working schedule for three
fixed dwarves occurs on exactly two days, we get q = 420. As every day on which k
dwarves collect berries contributes k(k − 1)(k − 2) such quadruples, we also have

3 · 2 · 1 · d(3) + 4 · 3 · 2 · d(4) + 5 · 4 · 3 · d(5) + 6 · 5 · 4 · d(6) = q = 420,

23
which simplifies to

d(3) + 4 d(4) + 10 d(5) + 20 d(6) = 70. (3)

Finally, we count the number r of quadruples (X1 , X2 , X3 , D) for which X1 , X2 , X3 are


three pairwise distinct dwarves that all worked in the mine on day D. Similarly as above
we see that r = 420 and that

7 · 6 · 5 · d(0) + 4 · 3 · 2 · d(3) + 3 · 2 · 1 · d(4) = r = 420,

which simplifies to

4 d(3) + d(4) = 35. (4)

Multiplying (1) by −40, multiplying (2) by 10, multiplying (3) by −1, multiplying (4) by
4, and then adding up the four resulting equations yields 5d(3) = 30 and hence d(3) = 6.
Then (4) yields d(4) = 11. As d(3) + d(4) = 17, the total number of days cannot be 16.
We have reached the desired contradiction.

A Variant. We follow the second solution up to equation (3). Multiplying (1) by 8,


multiplying (2) by −3, and adding the two resulting equations to (3) yields

3 d(5) + 10 d(6) = 22. (5)

As d(5) and d(6) are positive integers, (5) implies 0 6 d(6) 6 2. Only the case d(6) = 1
yields an integral value d(5) = 4. The equations (1) and (2) then yield d(3) = 10 and
d(4) = 0.
Now let us look at the d(3) = 10 special days on which exactly three dwarves were
collecting berries. One of the dwarves collected berries on at least five special days (if every
dwarf collected berries on at most four special days, this would allow at most 7 · 4/3 < 10
special days); we call this dwarf X. On at least two out of these five special days, some
dwarf Y must have collected berries together with X. Then these two days contradict
the problem statement. We have reached the desired contradiction.

Comment. Up to permutations of the dwarves, there exists a unique set of day-vectors


(as introduced in the first solution) that satisfies the conditions of the problem statement:

0000000 1110000 1001100 1000011 0101010 0100101 0010110 0011001


1111111 0001111 0110011 0111100 1010101 1011010 1101001 1100110

24
Problems and Solutions
Day 1
The EGMO 2014 Problem Committee thanks the following countries for submitting

problem proposals:

• Bulgaria

• Iran

• Japan

• Luxembourg

• Netherlands

• Poland

• Romania

• Ukraine

• United Kingdom

The Members of the Problem Committee:

Okan Tekman

Selim Bahadr

“ahin Emrah

Fehmi Emre Kadan


1. Determine all real constants t such that whenever a, b, c are the lengths of the

sides of a triangle, then so are a2 + bct, b2 + cat, c2 + abt.


Proposed by S. Khan, UNK

The answer is the interval [2/3, 2].

Solution 1.

Ift < 2/3, take a triangle with sides c = b = 1 and a = 2 − . Then b2 + cat + c2 +
abt − a2 − bct = 3t − 2 + (4 − 2t − ) ≤ 0 for small positive ; for instance, for any
0 <  < (2 − 3t)/(4 − 2t).
On the other hand, if t > 2, then take a triangle with sides b = c = 1 and a = .
Then b2 + cat + c2 + abt − a2 − bct = 2 − t + (2t − ) ≤ 0 for small positive ; for
instance, for any 0 <  < (t − 2)/(2t).

Now assume that 2/3 ≤ t ≤ 2 and b + c > a. Then using (b + c)2 ≥ 4bc we obtain

b2 + cat + c2 + abt − a2 − bct = (b + c)2 + at(b + c) − (2 + t)bc − a2


1
≥ (b + c)2 + at(b + c) − (2 + t)(b + c)2 − a2
4
1
≥ (2 − t)(b + c)2 + at(b + c) − a2 .
4
As 2 − t ≥ 0 and t > 0, this last expression is an increasing function of b + c, and

hence using b + c > a we obtain


Ç å
1 3 2 2
b + cat + c + abt − a − bct > (2 − t)a2 + ta2 − a2 =
2 2 2
t− a ≥0
4 4 3

as t ≥ 2/3. The other two inequalities follow by symmetry.

Solution 2.

After showing that t must be in the interval [2/3, 2] as in Solution 1, we let x =


(c + a − b)/2, y = (a + b − c)/2 and z = (b + c − a)/2 so that a = x + y , b = y + z ,
c = z + x. Then we have:

b2 + cat + c2 + abt − a2 − bct = (x2 + y 2 − z 2 + xy + xz + yz)t + 2(z 2 + xz + yz − xy)

Since this linear function of t is positive both at t = 2/3 where

2 2 2 2 2
(x +y −z +xy +xz +yz)+2(z 2 +xz +yz −xy) = ((x−y)2 +4(x+y)z +2z 2 ) > 0
3 3
and at t=2 where

2(x2 + y 2 − z 2 + xy + xz − yz) + 2(z 2 + xz + yz + xy) = 2(x2 + y 2 ) + 4(x + y)z > 0 ,

it is positive on the entire interval [2/3, 2].


Solution 3.

After the point in Solution 2 where we obtain

b2 + cat + c2 + abt − a2 − bct = (x2 + y 2 − z 2 + xy + xz + yz)t + 2(z 2 + xz + yz − xy)

we observe that the right hand side can be rewritten as

(2 − t)z 2 + (x − y)2 t + (3t − 2)xy + z(x + y)(2 + t).

As the rst three terms are non-negative and the last term is positive, the result

follows.

Solution 4.

First we show that t must be in the interval [2/3, 2] as in Solution 1. Then:

Case 1 : If a ≥ b, c, then ab + ac − bc > 0, 2(b2 + c2 ) ≥ (b + c)2 > a2 and t ≥ 2/3


implies:

b2 + cat + c2 + abt − a2 − bct = b2 + c2 − a2 + (ab + ac − bc)t


2
≥ (b2 + c2 − a2 ) + (ab + ac − bc)
3
1 2
≥ (3b + 3c2 − 3a2 + 2ab + 2ac − 2bc)
3
1î 2 ó
≥ (2b + 2c2 − a2 ) + (b − c)2 + 2a(b + c − a)
3
>0

Case 2 : If b ≥ a, c, then b2 + c2 − a2 > 0. If also ab + ac − bc ≥ 0, then b2 + cat +


c2 + abt − a2 − bct > 0. If, on the other hand, ab + ac − bc ≤ 0, then since t ≤ 2, we
have:

b2 + cat + c2 + abt − a2 − bct ≥ b2 + c2 − a2 + 2(ab + ac − bc)


≥ (b − c)2 + a(b + c − a) + a(b + c)
>0

By symmetry, we are done.


2 . Let D and E be two points on the sides AB and AC , respectively, of a triangle
ABC , such that DB = BC = CE , and let F be the point of intersection of the
lines CD and BE . Prove that the incenter I of the triangle ABC , the orthocenter

H of the triangle DEF and the midpoint M of the arc BAC of the circumcircle of
the triangle ABC are collinear.

Proposed by Danylo Khilko, UKR

Solution 1.

As DB = BC = CE we have BI ⊥ CD and CI ⊥ BE . Hence I is orthocenter of


triangle BF C . Let K be the point of intersection of the lines BI and CD , and let L

be the point of intersection of the lines CI and BE . Then we have the power relation

IB · IK = IC · IL. Let U and V be the feet of the perpendiculars from D to EF


and E to DF , respectively. Now we have the power relation DH · HU = EH · HV .

Let ω1 and ω2 be the circles with diameters BD and CE , respectively. From the

power relations above we conclude that IH is the radical axis of the circles ω1 and

ω2 .
Let O1 and O2 be centers of ω1 and ω2 , respectively. Then M B = M C , BO1 = CO2
and ∠M BO1 = ∠M CO2 , and the triangles M BO1 and M CO2 are congruent. Hence

M O1 = M O2 . Since radii of ω1 and ω2 are equal, this implies that M lies on the
radical axis of ω1 and ω2 and M , I , H are collinear.
Solution 2.

Let the points K , L, U , V be as in Solution 1. Le P be the point of intersection

of DU and EI , and let Q be the point of intersection of EV and DI .


Since DB = BC = CE , the points CI and BI are perpendicular to BE and
CD, respectively. Hence the lines BI and EV are parallel and ∠IEB = ∠IBE =
∠U EH . Similarly, the lines CI and DU are parallel and ∠IDC = ∠ICD = ∠V DH .
Since ∠U EH = ∠V DH , the points D , Q, F , P , E are concyclic. Hence IP · IE =

IQ · ID.
Let R be the second point intersection of the circumcircle of triangle HEP and the
lineHI . As IH · IR = IP · IE = IQ · ID, the points D, Q, H , R are also concyclic.
◦ ◦
We have ∠DQH = ∠EP H = ∠DF E = ∠BF C = 180 − ∠BIC = 90 − ∠BAC/2.

Now using the concylicity of D , Q, H , R, and E , P , H , R we obtain ∠DRH =

∠ERH = ∠180◦ −(90◦ −∠BAC/2) = 90◦ +∠BAC/2. Hence R is inside the triangle
DEH and ∠DRE = 360◦ − ∠DRH − ∠ERH = 180◦ − ∠BAC and it follows that
the points A, D , R, E are concyclic.

As M B = M C , BD = CE , ∠M BD = ∠M CE , the triangles M BD and M CE


are congruent and ∠M DA = ∠M EA. Hence the points M , D , E , A are concylic.

Therefore the points M , D , R, E , A are concylic. Now we have ∠M RE = 180 −

∠M AE = 180◦ − (90◦ + ∠BAC/2) = 90◦ − ∠BAC/2 and since ∠ERH = 90◦ +


∠BAC/2, we conclude that the points I, H, R, M are collinear.
Solution 3.

Suppose that we have a coordinate system and (bx , by ), (cx , cy ), (dx , dy ), (ex , ey ) are
−→ −−→ −→ −−→
the coordinates of the points B , C , D , E , respectively. From BI · CD = 0, CI · BE =
−−→ −−→ −−→ −−→ −→ → − → − → − → −
0, EH · CD = 0, DH · BE = 0 we obtain IH · ( B − C − E + D ) = 0. Hence the
slope of the line IH is (cx + ex − bx − dx )/(by + dy − cy − ey ).

Assume that the x-axis lies along the line BC , and let α = ∠BAC , β = ∠ABC ,
θ = ∠ACB . Since DB = BC = CE , we have cx − bx = BC , ex − dx = BC −
BC cos β − BC cos θ, by = cy = 0, dy − ey = BC sin β − BC sin θ. Therefore the
slope of IH is (2 − cos β − cos θ)/(sin β − sin θ).

Now we will show that the slope of the line M I is the same. Let r andR be
the inradius and circumradius of the triangle ABC , respectively. As ∠BM C =
∠BAC = α and BM = M C , we have

BC α
Å ã
AC − AB
my − iy = cot −r and mx − ix =
2 2 2
where (mx , my ) and (ix , iy ) are the coordinates of M and I, respectively. Therefore

the slope of M I is (BC cot(α/2) − 2r)/(AC − AB).

Now the equality of these slopes follows using

BC AC AB
= = = 2R ,
sin α sin β sin θ
hence
α Å ã
2 α
Å ã
BC cot = 4R cos = 2R(1 + cos α)
2 2
and
r
= cos α + cos β + cos θ − 1
R
as
BC cot(α/2) − 2r 2R(1 + cos α) − 2r 2 − cos β − cos θ
= =
AC − AB 2R(sin β − sin θ) sin β − sin θ
giving the collinearity of the points I, H, M .
Solution 4.

Let the bisectors BI and CI meet the circumcircle of ABC again at P and Q,
respectively. Let the altitude of DEF belonging to D meet BI at R and the one

belonging to E meet CI at S.
Since BI is angle bisector of the CBD, BI and CD are
iscosceles triangle

perpendicular. Since EH and DF are also perpendicular, HS and RI are parallel.

Similarly, HR and SI are parallel, and hence HSIR is a parallelogram.

M is the midpoint of the arc BAC , we have ∠M P I =


On the other hand, as

∠M P B = ∠M QC = ∠M QI , and ∠P IQ = (P ¯ A + CB
¯ + AQ)/2
¯ = (P
¯ C + CB
¯ +
BQ)/2
¯ = ∠P M Q. Therefore M P IQ is a parallelogram.
Since CI is angle bisector of the iscosceles triangle BCE , the triangle BSE is
also isosceles. Hence ∠F BS = ∠EBS = ∠SEB = ∠HEF = ∠HDF = ∠RDF =

∠F CS and B , S , F , C are concyclic. Similarly, B , F , R, C are concyclic. Therefore


B , S , R, C are concyclic. As B , Q, P , C are also concyclic, SR an QP are parallel.
Now it follows that HSIR and M QIP are homothetic parallelograms, and therefore

M , H, I are collinear.
3. We denote the number of positive divisors of a positive integer m by d(m) and

the number of distinct prime divisors of m by ω(m). Let k be a positive integer.

Prove that there exist innitely many positive integers n such that ω(n) = k and
d(n) does not divide d(a2 + b2 ) for any positive integers a, b satisfying a + b = n.
Proposed by JPN

Solution.

We will show that any number of the form n = 2p−1 m where m is a positive integer

that has exactly k − 1 prime factors all of which are greater than 3 and p is a prime
(p−1)/2
number such that (5/4) > m satises the given condition.
Suppose that a and b are positive integers such that a + b = n and d(n) | d(a2 + b2 ).
2 2 2 2 cp−1
Then p | d(a + b ). Hence a + b = q r where q is a prime, c is a positive integer
and r is a positive integer not divisible by q . If q ≥ 5, then

22p−2 m2 = n2 = (a + b)2 > a2 + b2 = q cp−1 r ≥ q p−1 ≥ 5p−1

gives a contradiction. So q is 2 or 3.

Ifq = 3, then a2 + b2 is divisible by 3 and this implies that both a and b are divisible
by 3. This means n = a + b is divisible by 3, a contradiction. Hence q = 2.

Now we have a + b = 2p−1 m and a2 + b2 = 2cp−1 r. If the highest powers of 2 dividing


a and b are dierent, then a + b = 2p−1 m implies that the smaller one must be 2p−1
2p−2 2 2 cp−1
and this makes 2 the highest power of 2 dividing a +b = 2 r, or equivalently,
cp − 1 = 2p − 2, which is not possible. Therefore a = 2 a0 and b = 2t b0 for some
t
2 2 cp−1−2t
positive integer t < p − 1 and odd integers a0 and b0 . Then a0 + b0 = 2 r. The
left side of this equality is congruent to 2 modulo 4, therefore cp − 1 − 2t must be

1. But then t < p − 1 gives (c/2)p = t + 1 < p, which is not possible either.
Problems and Solutions
Day 2
The EGMO 2014 Problem Committee thanks the following countries for submitting

problem proposals:

• Bulgaria

• Iran

• Japan

• Luxembourg

• Netherlands

• Poland

• Romania

• Ukraine

• United Kingdom

The Members of the Problem Committee:

Okan Tekman

Selim Bahadr

“ahin Emrah

Fehmi Emre Kadan


4. Determine all integers n ≥ 2 for which there exist integers x1 , x2 , . . . , xn−1
satisfying the condition that if 0 < i < n, 0 < j < n, i 6= j and n divides 2i + j ,
then xi < xj .
Proposed by Merlijn Staps, NLD

The answer is that n = 2k with k≥1 or n = 3 · 2k where k ≥ 0.

Solution 1.

Suppose that n has one of these forms. For an integer i, let xi be the largest integer
xi
such that 2 divides i. Now assume that 0 < i < n, 0 < j < n, i 6= j , n divides

2i + j and xi ≥ xj . Then the highest power of 2 dividing 2i + j is 2xj and therefore


k ≤ xj and 2k ≤ j . Since 0 < j < n, this is possible only if n = 3 · 2k and either
j = 2k or j = 2k+1 . In the rst case, i 6= j and xi ≥ xj imply i = 2k+1 leading to
k k
the contradiction 3 · 2 = n | 2i + j = 5 · 2 . The second case is not possible as i 6= j
k+2
and xi ≥ xj now imply i ≥ 2 > n.
Now suppose that n does not have one of these forms and x1 , x2 , . . . , xn−1 satisfying
the given condition exist. For any positive integer m, let am be the remainder of
m
the division of (−2) by n. Then none of am is 0 as n is not a power of 2. Also

am 6= am+1 for any m ≥ 1 as am = am+1 would lead to n dividing 3 · 2m . Moreover


n divides 2am + am+1 . Hence we must have xa1 < xa2 < xa3 < . . . which is not
possible as am 's can take on only nitely many values.

Solution 2.

Let E = {n/3, n/2, 2n/3} ∩ {1, 2, . . . , n − 1}, D = {1, 2, . . . , n − 1} \ E , and let


f : D → {1, 2, . . . , n − 1} be the function sending i in D to the unique f (i) in
{1, 2, . . . , n − 1} such that f (i) ≡ −2i (mod n).
Then the condition of the problem is that xi < xf (i)
D. Since D is a
for each i in

nite set, the integers x1 , x2 , . . . , xn−1 exist if and only if for each i in D there exists
k(i)
a positive integer k(i) such that f (i) belongs to E . This can be seen as follows:

• If f k (i) does not belong to E for any k > 0 for some i, then there exists

k2 > k1 > 0 such that f k1 (i) = f k2 (i), leading to the contradiction xf k1 (i) <
xf k2 (i) = xf k1 (i) .

• On the other hand, if such k(i) exists for each i in D, and if k0 (i) denotes

the smallest such, then the condition of the problem is satised by letting

xi = −k0 (i) for i in D, and xi = 0 for i in E.

In other words, the integers x1 , x2 , . . . , xn−1 exist if and only if for each i in D there
k(i)
exists a positive integer k(i) such that (−2) i ≡ n/3, n/2 or 2n/3 (mod n). For
i = 1, this implies that n = 2 with k ≥ 1 or n = 3 · 2k with k ≥ 0. On the other
k

hand, if n has one of these forms, letting k(i) = k does the trick for all i in D .
Solution 3.

Suppose that x1 , x2 , . . . , xk−1 satisfy the condition of the problem for n = k . Let
y2i = xi for 1 ≤ i ≤ k − 1 and choose y2i−1 for 1 ≤ i ≤ k to be less than
min{x1 , x2 , . . . , xk−1 }. Now suppose that for n = 2k we have 0 < i < n, 0 < j < n,
i 6= j , n divides 2i+j . Then j is even. If i is also even, then 0 < i/2 < k , 0 < j/2 < k
and k divides 2(i/2) + (j/2); hence yi = xi/2 < xj/2 = yj . On the other hand, if i is

odd, then yi < min{x1 , x2 , . . . , xk−1 } ≤ xj/2 = yj . Therefore, y1 , y2 , . . . , y2k−1 satisfy

the condition of the problem for n = 2k .

Since the condition is vacuous for n = 2 and n = 3, it follows that x1 , x2 , . . . , xn−1


satisfying the condition exist for all n = 2k with k ≥ 1 and n = 3 · 2k with k ≥ 0.
Now suppose that x1 , x2 , . . . , xn−1 satisfying the condition of the problem exist for

n = 2 m where k is a nonnegative integer and m > 3 is an odd number. Let b0 = 2k


k

and let bi+1 be the remainder of the division of (−2)bi by n for i ≥ 0. No terms of

this sequence is 0 and no two consecutive terms are both equal to b1 as m > 3. On
φ(m)
the other hand, as (−2) ≡ 1 (mod m), we have bφ(m) ≡ (−2)φ(m) 2k ≡ 2k ≡ b0
(mod n), and hence bφ(m) = b0 . Since 2bi + bi+1 is divisible by n for all i ≥ 0, we
have xb0 < xb1 < · · · < xb = xb0 , a contradiction.
φ(m)
5. Let n be a positive integer. We have n boxes where each box contains a non-

negative number of pebbles. In each move we are allowed to take two pebbles from

a box we choose, throw away one of the pebbles and put the other pebble in another

box we choose. An initial conguration of pebbles is called solvable if it is possible

to reach a conguration with no empty box, in a nite (possibly zero) number of

moves. Determine all initial congurations of pebbles which are not solvable, but

become solvable when an additional pebble is added to a box, no matter which box

is chosen.

Proposed by Dan Schwarz, ROU

The answer is any conguration with 2n − 2 pebbles which has even numbers of

pebbles in each box.

Solution 1. Number the boxes from 1 through n and denote a conguration by

x = (x1 , x2 , . . . , xn ) where xi is the number of pebbles in the ith box. Let

n  
X xi − 1
D(x) =
i=1
2

for a conguration x. We can rewrite this in the form

1 1
D(x) = N (x) − n + O(x)
2 2
where N (x) is the total number of pebbles and O(x) is the number of boxes with

an odd number of pebbles for the conguration x.


Note that a move either leaves D the same (if it is made into a box containing

an even number of pebbles) or decreases it by 1 (if it is made into a box with an

odd number of pebbles). As D is nonnegative for any conguration which does not

have any empty boxes, it is also nonnegative for any solvable conguration. On the

other hand, if a conguration has nonnegative D, then making mi = b(xi − 1)/2c


moves from the ith P
box into mi empty boxes for each i with mi > 0 lls all boxes
as D(x) ≥ 0 means
mi >0 mi ≥ (number of empty boxes).

As N (x) and O(x) have the same parity, a conguration x is solvable exactly when
O(x) ≥ 2n−N (x), and unsolvable exactly when O(x) ≤ 2n−2−N (x). In particular,
any conguration with 2n − 1 pebbles is solvable, and a conguration with 2n − 2

pebbles is unsolvable if and only if all boxes contain even numbers of pebbles.

Suppose that x0 is obtained from x by adding a pebble in some box. Then O(x0 ) =
O(x) + 1 or O(x0 ) = O(x) − 1. If x is unsolvable and x0 is solvable, then we must
0 0
have O(x) ≤ 2n − 2 − N (x) and O(x ) ≥ 2n − N (x ) = 2n − 1 − N (x), and hence

O(x0 ) = O(x) + 1. That is, the pebble must be added to a box with an even number
of pebbles. This can be the case irrespective of where the pebble is added only if

all boxes contain even numbers of pebbles, and 0 = O(x) ≤ 2n − 2 − N (x) and
0
1 = O(x ) ≥ 2n − 1 − N (x); that is, N (x) = 2n − 2.
Solution 2. Let x be a conguration and x̃ be another conguration obtained from
x by removing two pebbles from a box and depositing them in another box.

Claim 1 : x̃ is solvable if and only if x is solvable.

Let us call two congurations equivalent if they have the same total number of

pebbles and parities of the number of pebbles in the corresponding boxes are the

same. (It does not matter whether we consider this equivalence for a xed ordering

of the boxes or up to permutation.) From Claim 1 it follows that two equivalent

congurations are both solvable or both unsolvable. In particular, any conguration

with 2n − 1 or more pebbles is solvable, because it is equivalent to a conguration

with no empty boxes.

Let us a call a conguration with all boxes containing two or fewer pebbles scant.

Every unsolvable conguration is equivalent to a scant conguration.

Claim 2 : A scant conguration is solvable if and only if it contains no empty boxes.

By Claim 1 and Claim 2, addition of a pebble to a scant unsolvable conguration

makes it solvable if and only if the conguration has exactly one empty box and

the pebble is added to the empty box or to a box containing two pebbles. Hence,

the addition of a pebble makes an unsolvable scant conguration into a solvable

conguration irrespective of where it is added if and only if all boxes have even

numbers of pebbles and exactly one of them is empty. Therefore, the addition of a

pebble makes an unsolvable conguration into a solvable one irrespective of where

the pebble is added if and only if the conguration has 2n − 2 pebbles and all boxes
have even numbers of pebbles.

Proof of Claim 1 : Suppose that the two pebbles were moved from box B in x to

box B̃ in x̃, and x is solvable. Then we perform exactly the same sequence of moves
for x̃ as we did for x except that instead of the rst move that is made out of B we
make a move from B̃ (into the same box), and if there was no move from B , then

at the end we make a move from B̃ to B in case B is now empty.

Proof of Claim 2 : Any move from a scant conguration either leaves the number of

empty boxes the same and the resulting conguration is also scant (if it is made into

an empty box), or increases the number of empty boxes by one (if it is made into

a nonempty box). In the second case, if the move was made into a box containing

one pebble, then the resulting conguration is still scant. On the other hand, if

it is made into a box containing two pebbles, then the resulting conguration is

equivalent to the scant conguration which has one pebble in the box the move was

made into and exactly the same number of pebbles in all other boxes as the original

conguration. Therefore, any sequence of move from a scant conguration results

in a conguration with more or the same number of empty boxes.


6. Determine all functions f: R→R satisfying the condition

f y 2 + 2xf (y) + f (x)2 = (y + f (x))(x + f (y))




for all real numbers x and y.


Proposed by Daniël Kroes, NLD

1
The answer is the functions f (x) = x, f (x) = −x and f (x) = − x.
2
Solution.

1
It can be easily checked that the functions f (x) = x, f (x) = −x and f (x) = −x
2
satisfy the given condition. We will show that these are the only functions doing so.

Let y = −f (x) in the original equation to obtain

f (2f (x)2 + 2xf (−f (x))) = 0

for allx. In particular, 0 is a value of f . Suppose that u and v are such that
f (u) = 0 = f (v). Plugging x = u or v and y = u or v in the original equations
2 2 2 2 2 2
we get f (u ) = u , f (u ) = uv , f (v ) = uv and f (v ) = v . We conclude that

u2 = uv = v 2 and hence u = v . So there is exactly one a mapped to 0, and


a
f (x)2 + xf (−f (x)) = (*)
2
for all x.
Suppose that f (x1 ) = f (x2 ) 6= 0 for some x1 and x2 . Using (*) we obtain
x1 f (−f (x1 )) = x2 f (−f (x2 )) = x2 f (−f (x1 )) and hence either x1 = x2 or f (x1 ) =
f (x2 ) = −a. In the second case, letting x = a and y = x1 in the original equation
2 2 2 2 2 2
we get f (x1 − 2a ) = 0, hence x1 − 2a = a. Similarly, x2 − 2a = a, and it follows

that x1 = x2 or x1 = −x2 in this case.

Using the symmetry of the original equation we have

f (f (x)2 + y 2 + 2xf (y)) = (x + f (y))(y + f (x)) = f (f (y)2 + x2 + 2yf (x)) (**)

for all x and y . f (x)2 + y 2 + 2xf (y) 6= f (y)2 + x2 + 2yf (x) for some x and y .
Suppose
2 2
Then by the observations above, (x + f (y))(y + f (x)) 6= 0 and f (x) + y + 2xf (y) =

−(f (y)2 + x2 + 2yf (x)). But these conditions are contradictory as the second one
2 2
can be rewritten as (f (x) + y) + (f (y) + x) = 0.

Therefore from (**) now it follows that

f (x)2 + y 2 + 2xf (y) = f (y)2 + x2 + 2yf (x) (***)

for all x and y . In particular, letting y = 0 we obtain f (x)2 = (f (0) − x)2 for all x.
Let f (x) = s(x)(f (0) − x) where s : R → {1, −1}. Plugging this in (***) gives

x(ys(y) + f (0)(1 − s(y)) = y(xs(x) + f (0)(1 − s(x)))

for all x and y. So s(x) + f (0)(1 − s(x))/x must be constant for x 6= 0.


If f (0) = 0 it follows that s(x) is constant for x 6= 0, and therefore either f (x) = x
for all x or f (x) = −x for all x. Suppose that f (0) 6= 0. If s(x) is −1 for all
x 6= 0, then −1 + 2f (0)/x must be constant for all x 6= 0, which is not possible. On
the other hand, if there exist nonzero x and y such that s(x) = −1 and s(y) = 1,

then −1 + 2f (0)/x = 1. That is, there can be only one such x, that x is f (0), and

hence f (x) = f (0) − x for all x. Putting this back in the original equation gives

2f (0)2 = f (0) and hence f (0) = 1/2. We are done.

Remark:

The following line of reasoning or a variant of it can be used between (*) and (***):

Suppose that f (x1 ) = f (x2 ) 6= 0 for some x1 and x2 . Then from (*) it follows that

x1 f (−f (x1 )) = x2 f (−f (x2 )) = x2 f (−f (x1 )) and hence either x1 = x2 or f (x1 ) =
f (x2 ) = −a. In the second case, using (*) again we obtain a2 = a/2 and therefore a =
1/2. Now letting x = 1/2 in the original equation gives f (y 2 + f (y)) = y(f (y) + 1/2)
for all y . From this letting y = 0 we obtain f (0) = 1/2, and letting f (y) = −1/2 we
2 2
obtain f (y − 1/2) = 0 and y = 1. To summarize, f (x1 ) = f (x2 ) 6= 0 implies either

x1 = x2 or x1 , x2 ∈ {1, −1} and f (1) = f (−1) = −1/2, f (1/2) = 0, f (0) = 1/2.


Using the symmetry of the original equation we have

f (f (x)2 + y 2 + 2xf (y)) = (x + f (y))(y + f (x)) = f (f (y)2 + x2 + 2yf (x)) (**)

for all x and y. Let y = 0. Then

f (f (x)2 + 2xf (0)) = f (f (0)2 + x2 )

for all x. f (x)2 + 2xf (0) 6= f (0)2 + x2 for some x, then by the observation above
If
2 2 2
we must have f (1/2) = 0, f (0) = 1/2 and f (x) + 2xf (0) = −(f (0) + x ). We can
2 2
rewrite this as f (x) + (f (0) + x) = 0 to obtain x = 1/2 and f (0) = −x = −1/2,
2 2 2
which contradicts f (0) = 1/2. So we conclude that f (x) + 2xf (0) = f (0) + x
2 2
for all x. This implies f (x) = (f (0) − x) for all x. In particular, the second case
2 2
considered above is not possible as (f (0) − 1) = f (1) = f (−1) = (f (0) + 1) means

f (0) = 0, contradicting f (0) = 1/2. Therefore f is injective and from (**) now it
follows that

f (x)2 + y 2 + 2xf (y) = f (y)2 + x2 + 2yf (x) (***)

for all x and y.


EUROPEAN

MA
TH
LE

EM
DD

AT
MI

ICA
O L
TH

LYM
U R

P
FO

IAD
STREČNO
SLOVAKIA 2010

Contest Solutions

4th MEMO, Strečno, Slovakia

9 to 15 September 2010
Problem I-1. Find all functions f : R → R such that for all x, y ∈ R, we have

f (x + y) + f (x)f (y) = f (xy) + (y + 1)f (x) + (x + 1)f (y).

Solution. Setting y = 0 yields

0 = f (0)(f (x) − x − 2).

It is easy to check that f (x) = x + 2 is not a solution, so f (0) = 0. Setting x = 1, y = −1,


we obtain
0 = f (−1)(f (1) − 3),
so f (−1) = 0 or f (1) = 3.
Let us assume f (−1) = 0. Putting x = 2, y = −1 in the original functional equation, we
get f (−2) = f (1). On the other hand, setting x = −2, y = 1 gives f (−2)f (1) = 3f (−2)−f (1)
which together with f (−2) = f (1) gives f (1) ∈ {0, 2}.
So we have f (1) = a ∈ {0, 2, 3}. Setting y = 1 yields

f (x + 1) = (3 − a)f (x) + a(x + 1). (1)

for all real x.


Now we set y = 1 + 1/x for arbitrary x 6= 0, we obtain
   
f x + x1 + 1 + f (x)f x1 + 1 = f (x + 1) + x1 + 2 f (x) + f 1
x + 1 (x + 1).

Applying (1) yields


1
 1
 1
 
(3 − a) f x + x + f (x)f x − (x + 1)f x = f (x) 5 − 2a − (a − 1) x1 + 2a + ax.

From this and the original functional equation with y = 1/x we have
 
(3 − a) a + f (x) 1 + x1 = f (x) 5 − 2a − (a − 1) · x1 + 2a + ax,

which is equivalent to 
f (x) −2 + a + 2
x = a2 + ax − a.

Using a ∈ {0, 2, 3} we get f (x) = 0, f (x) = x2 + x, f (x) = 3x for all real x (with some
exceptions when −2 + a + x2 = 0, but this cases can be handled easily for example by using
(1)). We can also easily check that the functions f (x) = 0, f (x) = x2 + x, f (x) = 3x are
solutions of the original functional equation.

Solution 2. As in the first solution we obtain f (0) = 0, f (1) = a ∈ {0, 2, 3} and

f (x + 1) = (3 − a)f (x) + a(x + 1) for x ∈ R. (2)

If a = 3, then (2) implies that f (x + 1) = 3(x + 1) for all x ∈ R (and therefore f (x) = 3x for
all x). It is easy to verify that this is a solution of the functional equation.
In the sequel we will assume that a ∈ {0, 2} and therefore f (−1) = 0. We will compute
f (xyz) in two different ways. Setting yz for y into the original functional equation we obtain

f (xyz) = f (x + yz) + f (x)f (yz) − (yz + 1)f (x) − (x + 1)f (yz) =


= f (x + yz) + f (x)f (y + z) + f (x)f (y)f (z) − (z + 1)f (x)f (y) −
− (y + 1)f (x)f (z) − (yz + 1)f (x) − (x + 1)f (y + z) − (x + 1)f (y)f (z)+
+ (x + 1)(z + 1)f (y) + (x + 1)(y + 1)f (z).

On the other hand, setting xy for x and z for y into the original functional equation we obtain

f (xyz) = f (xy + z) + f (xy)f (z) − (z + 1)f (xy) − (xy + 1)f (z) =


= f (xy + z) + f (x + y)f (z) + f (x)f (y)f (z) − (y + 1)f (x)f (z) −
− (x + 1)f (y)f (z) − (z + 1)f (x + y) − (z + 1)f (x)f (y) + (y + 1)(z + 1)f (x) +
+ (x + 1)(z + 1)f (y) − (xy + 1)f (z).

Therefore
f (x + yz) + f (x)f (y + z) − (yz + 1)f (x) − (x + 1)f (y + z) + (x + 1)(y + 1)f (z) =
= f (xy + z) + f (x + y)f (z) − (z + 1)f (x + y) + (y + 1)(z + 1)f (x) − (xy + 1)f (z).

In particular, for x = −1 and y = z we obtain

f (z 2 − 1) = f (z − 1)f (z) − (z + 1)f (z − 1) + (z − 1)f (z).

On the other hand, setting x = z + 1 and y = z − 1 into the original equation we obtain

f (2z) + f (z + 1)f (z − 1) = f (z 2 − 1) + (z + 2)f (z − 1) + zf (z + 1).

Therefore

f (2z) + f (z + 1)f (z − 1) = f (z − 1)f (z) + f (z − 1) + (z − 1)f (z) + zf (z + 1).

Since (2) implies that f (2) = 5a − a2 and since for x = 2 and y = z the original functional
equation implies

f (z + 2) + f (2)f (z) = f (2z) + (z + 1)f (2) + 3f (z),

it follows that
f (z + 2) + (5a − a2 )f (z) + f (z + 1)f (z − 1) =
= f (z − 1)f (z) + f (z − 1) + (z + 2)f (z) + zf (z + 1) + (5a − a2 )(z + 1).

The equation (2) implies that

f (z) = (3 − a)f (z − 1) + az,


f (z + 1) = (3 − a)2 f (z − 1) + (4a − a2 )z + a

and
f (z + 2) = (3 − a)3 f (z − 1) + (a3 − 7a2 + 13a)z + 5a − a2 .
From the last four equations we obtain that

(3 − a)(2 − a)f (z − 1)2 − 2(a − 3)(a − 2)zf (z − 1) + (a2 − 9a + 20)f (z − 1) =


= (5a − a2 )z 2 + (a2 − 5a)z.

For a = 2 we get 6f (z − 1) = 6z 2 − 6z, therefore f (z) = z 2 + z and it is easy to verify that


this is a solution of the functional equation.
For a = 0 we get 6f (z − 1)2 − 12zf (z − 1) + 20f (z − 1) = 0, which implies that for
each z ∈ R one of the equalities f (z) = 0 and f (z) = 2z − 43 is satisfied. Assume that
f (z) = 2z − 34 for some z ∈ R. Then the original functional equation for x = 1 and y = z
implies that f (z + 1) = 3f (z) = 6z − 4. Therefore either 6z − 4 = 0 or 6z − 4 = 2(z + 1) − 43 .
The first equation implies that z = 23 and f (z) = 2z − 34 = 0, and the second equation
implies that z = 76 and therefore f (z) = 2z − 43 = 1, f (z + 1) = 3z = 3 = 2(z + 1) − 43 and
f (z + 2) = 3f (z + 1) = 9 6= 5 = 2(z + 2) − 43 . The contradiction shows that f (z) = 0 for each
z ∈ R.
Problem I-2. All positive divisors of a positive integer N are written on a blackboard. Two
players A and B play the following game taking alternate moves. In the first move, the player
A erases N . If the last erased number is d, then the next player erases either a divisor of d
or a multiple of d. The player who cannot make a move loses. Determine all numbers N for
which A can win independently of the moves of B.

Solution. Let N = pa11 pa22 . . . pakk be the prime factorization of N . In an arbitrary move
the players writes down a divisor of N , which we can represent as a sequence (b1 , b2 , . . . , bk ),
where bi ≤ ai (such a sequence represents the number pb11 pb22 . . . pbkk ). The rules of the game
say that the sequence (b1 , b2 , . . . , bk ) can be followed by a sequence (c1 , c2 , . . . , ck ) with either
ci ≤ bi for each i, or ai ≥ ci ≥ bi for each i (obviously, if such a sequence is not on the sheet).
If one of the numbers ai is odd, then the player B posses the winning strategy. Indeed,
let for simplicity a1 be odd. Then the response for the move (b1 , b2 , . . . , bk ) should be

(a1 − b1 , b2 , . . . , bk ).

One can easily check that this is a winning strategy for B: All the legal sequences split up
into pairs and when A writes down one sequence from a pair, player B responds with the
second one from the same pair (a1 − b1 6= b1 because of a1 is odd).
If all ai are even, then the player A has a winning strategy. Let the move of player B be
(b1 , b2 , . . . , bk ), where one of bi is strictly less than ai ((b1 , b2 , . . . , bk ) 6= (a1 , a2 , . . . , ak ), as it
was the first move of A). Let j be the smallest index such that bj < aj . Then the response
of A can be

(b1 , b2 , . . . , bj−1 , aj − bj − 1, bj+1 , . . . , bk ) (symmetric reflection of bj ).

Again, all legal sequences (except for (a1 , a2 , . . . , ak )) split up into pairs and when B writes
down one sequence from a pair, player A can respond with the second one (aj − bj − 1 6= bj
because of aj is even).
Obviously the condition ”all ai are even” means that ”N is a square”. For N ∈ [2000, 2100]
it is possible only for N = 2025. The answer for the alternative question is 20101005 .
Points A, B, C and D lie on a circle in this order. Let E be a point on the segment AC
such that AD = AE and CB = CE holds. Let k be the circumcircle of triangle BDE let
M the center of k. Let F be the second intersection point of k and AC. Prove that the lines
F M , AD and BC meet in a point.

1. Solution
Assume A lies between C and F (the case when C lies between A and F can be handled in
Problem. The problem statement to be inserted. :)
the same way). Let the lines BC and AD meet in P . Using |M B| = |M E|, |BC| = |CE|
Solution. Assume A lies between C and F (the case when C lies between A and F can
and |M E| =be|M F | we
handled getsame way). Let the lines BC and AD meet in P . Using |MB| = |ME|,
in the
|BC| =We|CE|are |ME| = |MF
andgiven | wequadrilateral
get
∠M BPI-3.
Problem = π − ∠M BE −a∠EBC cyclic = π − ∠BEM − ∠CEB
ABCD ∠F EM
with a=point E on=the∠Mdiagonal
F E.
AC such that ∠MBP
AD ==AE and CB = CE. Let M be the center of
π − ∠MBE − ∠EBC = π − ∠BEM − ∠CEB = ∠F EM = ∠MF E. the circumcircle k of the
Therefore ∠M F CThe
triangle BDE. + ∠CBM = ∠M F Ethe
circle k intersects ∠M in
π − AC
+ line BPthe=points
π, whichE andimplies that the
F . Prove that points
the
Mlines
, B, FCMand F are
, AD, ∠MF
andconcyclic.
Therefore C + ∠CBM = ∠MF
BC meet at one point. E + π − ∠MBP = π, which implies that the points
M, B, C and F are concyclic.

D
b

A E
F b b b b
C

b
B
M
b

Using |ME| = |MD| and |AE| = |AD| we get


Using |M E| = |M D| and |AE| = |AD| we get
Solution. Assume that ∠AEM = ∠DEM
A lies − ∠DEA
between = ∠EDM
C and F (the − ∠EDA = ∠MDA,
case when C lies between A and F
can be handled
∠AEM
in the
= ∠DEM
same way).
− ∠DEA
Let the
=
lines
∠EDM
BC and

AD
∠EDA
meet
= P∠M
in
DA,
. Using M B = M E,
hence ∠MDP = ∠MBP and the quadrilateral MP BD is cyclic. This gives (using that
BC =∠M
hence CEDP and=M∠M E =BP
quadrilaterals M F and
ABCD we the
andget 4M
F MBC

= 4M
quadrilateral
BCcyclic
are M Pand
EC
as well) BDtherefore
is cyclic. This gives (using that
quadrilaterals ABCD and F M BC are cyclic as well)
∠P BC
∠M =∠P
MB = ∠MDB
EC= ∠ADB
◦ ∠ACB
= 180= − = ∠F=
∠M EF CB − ∠F
= ◦π −
180 ∠MMB,
F C,
∠P M B = ∠P DB = ∠ADB = ∠ACB = ∠F CB = π − ∠F M B,
which means that the points F , M and P are collinear, therefore the lines AD, BC and
which implies that
F Mthat the
in a points
meetthe point. M , B, C, and F are concyclic. Using M E = M D and AE = AD
which means points F , M and P are collinear, therefore the lines AD, BC and
(which means 4M EA ∼ = 4M DA) we get ∠AEM = ∠ADM , hence ∠M DP = ∠M BP and
F M meet inAlternative
a point. solution. Assume A lies between C and F (the case when C lies between
the quadrilateral M P BD is cyclic. This gives (using that quadrilaterals ABCD and F M BC
A and F can be handled in the same way). Using |MB| = |ME|, |BC| = |CE| and
are cyclic as
|ME|well) that
= |MF | we get
2. Solution
Assume A lies∠P
between
M B ==πC
∠MBP ∠Pand
− ∠MBE ∠ADB
DB F=−(the
∠EBCcase ∠ACB
==πwhen
− ∠BEM −∠F
C=lies between
∠CEB
CB ==∠F 180
EM −=∠F
A◦ and ∠MFFMcan
B, be handled in
E.
the same way). Using |M B| = |M E|, |BC| = |CE| and |M E| = |M F | we get
Therefore ∠MF C + ∠CBM = ∠MF E + π − ∠MBP = π, which implies that the points
which means that the points F , M and P are collinear, therefore the lines AD, BC and F M
∠M
meet in BP
a point. ∠M
M,=B,πC−and F are − ∠EBC = π − ∠BEM − ∠CEB = ∠F EM = ∠M F E.
BEconcyclic.
Therefore ∠M F C + ∠CBM = ∠M F E + π − ∠M BP = π, which implies that the points
Solution 2. Like in the first solution, F M BC is cyclic. Since the points M and A lie
Mon
, B, C and F are concyclic.
the perpendicular bisector of the segment DE, we have ∠M DA = ∠M EA. Moreover,
M E |M
Using E|F= |M D|∠MandF|AE| = |AD| we∠M
get
1
= M , hence A = ∠M FE = EF = ∠M EA. Therefore, the quadrilateral
∠AEM
M ADF is cyclic. = ∠DEM
Then − ∠DEA
the radical axes of = ∠EDM − ∠EDA
circumcircles ∠M DA,
of cyclic=quadrilaterals F M BC,
BCDA and ADF M are the lines F M , AD and BC, which meet in the radical center of the
three∠M
hence circles. = ∠Mthe
DA Thus, F Alines
andFthe
M , quadrilateral
AD and BC meet M ADF is cyclic.
in a point.
The radical axes of circumcircles of cyclic quadrilaterals F M BC, BCDA and ADF M are
lines F M , AD and BC, which meet in the radical center of the three circles. Thus, the lines
F M , AD and BC meet in a point.
Problem I-4. Find all positive integers n which satisfy the following two conditions:

(i) n has at least four different positive divisors;

(ii) for any divisors a and b of n satisfying 1 < a < b < n, the number b − a divides n.

Solution. Clearly primes, squares of primes and the number 1 have the given property. We
will exclude these numbers from further considerations.
First assume that n is even; thus n = 2x for some integer x. Then x − 2 divides n. Any
divisor of n smaller then x = n/2 is at most n/3. Therefore, x − 2 ≤ n/3, yielding x ≤ 6.
Checking all possibilities for x, we arrive to three new satisfactory values of n, namely, 6, 8,
and 12.
Next assume that n is odd. Let n = px, where p is the smallest divisor of n greater than
one. Obviously p is an odd prime. Note that p + 1 - n because p + 1 is even; thus x 6= p + 1.
Since 1 < p < x < n, we have
x − p | px.

If p - x then x − p and x are coprime; hence x − p | p. Then x − p ≤ p. On the other


hand, x 6= p + 1; therefore, x − p ≥ p since p is the smallest nontrivial divisor. Hence x = 2p,
contradicting the assumption that n is odd.
If p | x, then x = py for some integer y greater than one. The choice of p implies that
y ≥ p. Moreover, py − p | p2 y; thus y − 1 | py. Since y − 1 and y are coprime, y ≤ p + 1.
If y = p + 1, then y is an even divisor of n; this contradicts the assumption that n is odd.
Otherwise y = p since y ≥ p. This contradicts the condition y − 1 | py.
All the solutions are primes, squares of primes and the numbers 1, 6, 8 and 12.

Solution 2. If n = 1, n is prime or n is a square of a prime, there are no divisors a and b


satisfying n > a > b > 1, thus the condition is trivially satisfied. Otherwise, for some integers
k and `, n = ` · k with ` > k > 1. Then ` − k also divides n = ` · k.
If ` and k are coprime, ` − k is coprime to ` and k, thus ` − k = 1. Hence n = k(k + 1).
Let p be a prime divisor of k. Since k + 1 − p is coprime to p(k + 1), the condition implies
that k + 1 − p divides k. But
 
k k
k + 1 − p = (p − 1) −1 +
p p

divides k if and only if (p − 1)(k/p − 1) = 0; thus k = p and n = p(p + 1). Clearly p = 2 gives
a solution n = 6. Otherwise p + 1 = q · r for some prime q and integer r greater than 1. Since

p − q = qr − 1 − q = (q − 1)(r − 1) − 2 + r

is a divisor of r, we have (q − 1)(r − 1) ≤ 2. This gives only three possibilities: q = r = 2 or


q = 2, r = 3 or q = 3, r = 2. The first one yields a solution n = 12, while the other two give
n = 30, which fails to satisfy the conditions: 6 − 2 - 30.
It remains to consider the case when n cannot be written as a product of two coprime
numbers greater than 1. Then n = pa , where a ≥ 3 (for a ≤ 2, we obtain the solutions we have
already described). This implies that p and p2 are proper divisors of n, hence p2 −p = p(p−1)
divides n = pa . Since p and p − 1 are coprime, this is only possible when p − 1 = 1; thus
p = 2. However, 23 − 2 = 6 is not a divisor of 2a ; hence there are no solutions for a ≥ 4. Only
the number 8 satisfies the condition in this case.

Solution 3. Clearly 1, p, p2 are solutions. For the other prime powers, n = pk is possible
only for p = 2 and k < 4 (p2 − p is even for odd p, 8 − 2 = 6 does not divide 16).
Now, n is not a prime power, then it has two (or more) prime factors p, q. Then q − p | n.
If p, q are both odd, then 2 | n. (Otherwise also 2 | n.) Therefore, if n is not a prime power,
one of its factors is 2.
Let p be the smallest divisor of n larger than 2; 1 < 2 < p < n. From p − 2 | n follows
p = 3, so 6 | n. Clearly, n = 6 is a solution.
Let n = 6a, a > 1. Then 1 < 3 < 3a < 6a = n, therefore

(3a − 3) = 3(a − 1) | n = 6a,


a − 1 | 2a.

Since gcd(a, a − 1) = 1, we have a − 1 | 2, hence a − 1 = 1 or a − 1 = 2, which yields n = 12


or n = 18.
It is easy to check that n = 12 is a solution, and n = 18 is not (e. g., 7 = 9 − 2 is not a
divisor of 18).
Problem T-1.
Three strictly increasing sequences
a1 , a2 , a3 , . . . , b1 , b2 , b3 , . . . , c1 , c2 , c3 , . . .
of positive integers are given. Every positive integer belongs to exactly one of the three se-
quences. For every positive integer n, the following conditions hold:

(i) can = bn + 1;
(ii) an+1 > bn ;
(iii) the number cn+1 cn − (n + 1)cn+1 − ncn is even.

Find a2010 , b2010 , and c2010 .


Solution. Since {cn } is a strictly increasing sequence of positive integers, it is clear that
cn ≥ n, n ∈ N. Hence, can ≥ an , n ∈ N. However, the given sequences do not contain
equal terms, so can > an and bn = can − 1 > an , n ∈ N. Similarly, from (ii) and (iii),
an+1 > bn + 1 = can , n ∈ N. It is also easy to see that bn < can < bn+1 . Let us for any n ∈ N
count the number of terms in all three sequences that are less or equal to can . There are n
such terms in the first sequence (that is, a1 , a2 , . . . , an ), n such terms in the second sequence
(b1 , b2 , . . . , bn ) and an such terms in the third sequence (c1 , c2 , . . . , can ). It is 2n + an terms
in total. By (i) any positive integer less or equal can must appear among these terms exactly
once; thus, the total number of these terms equals
2n + an = can . (1)
Now we take an instead of n in (iv):
can +1 can − (an + 1)can +1 − an can = can +1 (an + 2n) − (an + 1)can +1 − an (an + 2n) =
= can +1 (2n − 1) − a2n − 2an n ≡ can +1 − an − 2n ≡ can +1 − can ≡ 0 (mod 2).
This means that can +1 6= can + 1 and the number can + 1 has to belong to either of the first
two sequences. The inequalities an < bn < can < an+1 < bn+1 imply that can + 1 = an+1 ,
n ∈ N, and, by (1),
an+1 = an + 2n + 1, n ∈ N. (2)
Next we prove that a1 = 1. Indeed, number 1 has to belong to one of the given sequences,
and if a1 > 1 then c1 = 1 or b1 = 1. The latter case is impossible because b1 > a1 . Then we
must have c1 = 1, and either c2 = 2, or a1 = 2 and ca1 = c2 = a1 + 2 = 4. In both cases we
obtain a contradiction by setting n = 1 in (iv). This proves that a1 = 1, and, together with
(2), defines a unique sequence {an }:
an = an−1 +(2n−1) = an−2 +(2n−3)+(2n−1) = · · · = a1 +3+5+...+(2n−1) = n2 , n ∈ N.
Hence,
a2010 = 20102 ,
b2010 = ca2010 − 1 = a2010 + 2 · 2010 − 1 = 20112 − 2,
c1936 = c442 = ca44 = a44 + 2 · 44 = 442 + 88 = 2024,
a45 = 452 = 2025,
and all the integers between a45 and b45 = ca45 − 1 = a45 + 2 · 45 − 1 = a45 + 89 belong to the
sequence {cn }. Hence, these integers have the form

c1936+k = a45 + k, k = 1, 2, ..., 88,

and c2010 = c1936+74 = a45 + 74 = 2099.


Answer. a2010 = 20102 , b2010 = 20112 − 2, c2010 = 2099.

Solution 2. Denote by (∗) the trivial fact an < can derived at the beginning of the first
solution. One can easily fill the sequences inductively. In fact, like in the first solution, we
have a1 = 1. Now we will find the place for number 2. If a2 = 2, then by (iii) 2 = a2 > b1 ,
which is impossible. If c1 = 2, then by (ii) we have 2 = c1 = ca1 = b1 + 1, hence b1 = 1 which
is also impossible. So the only way is to put b2 = 2. Then by (ii) c1 = ca1 = b1 + 1 = 3.

n 1 2 3 4 5 ...
an 1
bn 2
cn 3

Now, because of (iv), we have c2 6= 4. Also, b2 6= 4, because otherwise by (∗) and (ii)
a2 < ca2 = b2 + 1 = 5 and there is no number left for a2 . So we have a2 = 4. Then by
(iii) a3 6= 5. Also, b2 6= 5, because otherwise by (ii) c4 = ca2 = b2 + 1 = 6 and there are
no numbers left for c2 , c3 . So we have c2 = 5. Using the same arguments we derive a3 6= 6
and b2 6= 6, hence, c3 = 6. Now, a3 6= 7 (by (iii)). Also, c4 6= 7, because otherwise by (ii)
7 = c4 = ca2 = b2 + 1, and this leads to b2 = 6, which is not true. Hence, b2 = 7. Then
c4 = ca2 = b2 + 1 = 8.
n 1 2 3 4 5 ...
an 1 4
bn 2 7
cn 3 5 6 8

Now, we can repeat the arguments from the last paragraph: Because of (iv) we have
c5 6= 9. By (∗) and (ii) we have b3 6= 9 (otherwise a3 < ca3 = b3 + 1 = 10 and there is no
number left for a3 ). So we have a3 = 9. By (iii), a4 6= 10. By (ii), c9 = ca3 = b3 + 1, therefore
b3 6= 10 (otherwise there are no numbers left for c5 , . . . , c8 ). So we have c5 = 10. Similarly

a4 6= 11, b3 6= 11 =⇒ c6 = 11,
a4 6= 12, b3 6= 12 =⇒ c7 = 12,
a4 6= 13, b3 6= 13 =⇒ c8 = 13.

Finally, a4 6= 14 (by (iii)), c9 6= 14 (otherwise by (ii) 14 = c9 = ca3 = b3 + 1, and this leads to


b3 = 13, which is not true). Hence, b3 = 14 and c9 = ca3 = b3 + 1 = 15.

n 1 2 3 4 5 6 7 8 9 ...
an 1 4 9
bn 2 7 14
cn 3 5 6 8 10 11 12 13 15
We formulate the claim which can be easily proved by induction. (We will skip the formal
proof. However, it is just an obvious generalization of the last two paragraphs.) For k ∈ N
and i = 1, 2, . . . , 2k − 2, we have
ak = k 2 ,
bk = k 2 + 2k − 1,
c(k−1)2 +i = k 2 + i,
ck2 = k 2 + 2k.
The rest is straightforward:

a2010 = 20102 , b2010 = 20102 + 2 · 2010 − 1, c2010 = c442 +74 = 452 + 74 = 2099.
Problem T-2. For each integer n ≥ 2, determine the largest real constant Cn such that for
all positive real numbers a1 , . . . , an , we have
 2
a21 + · · · + a2n a1 + · · · + an
≥ + Cn · (a1 − an )2 .
n n

Solution. Define xij = ai − aj for 1 ≤ i < j ≤ n. After multiplication with n2 , the difference
of the squares of quadratic and arithmetic mean equals
n
X X
n2 (QM2 − AM2 ) = n(a21 + · · · + a2n ) − (a1 + · · · + an )2 = (n − 1) a2i − 2ai aj =
i=1 i<j

X n−1
X X
= x2ij = x21n + (x21i + x2in ) + x2ij .
i<j i=2 1<i<j<n

Here the last sum is clearly non-negative. By the AM-QM inequality the sum in the middle
is at least
n−1
X n−1
2 2 1X n−2 2
(x1i + xin ) ≥ (x1i + xin )2 = · x1n .
2 2
i=2 i=2

Hence we finally get


n−2 2 n
n2 (QM2 − AM2 ) ≥ x21n + · x1n = · (a1 − an )2
2 2
with equality if and only if a2 = · · · = an−1 = 21 (a1 + an ). The largest such constant is
therefore
1
C= .
2n
Problem T-3. In each vertex of a regular n-gon there is a fortress. At the same moment
each fortress shoots at one of the two nearest fortresses and hits it. The result of the shooting
is the set of the hit fortresses; we do not distinguish whether a fortress was hit once or twice.
Let P (n) be the number of possible results of the shooting. Prove that for every positive integer
k ≥ 3, P (k) and P (k + 1) are relatively prime.

Solution. Let us denote each hit fortress by a black dot and each undamaged one with a
white dot. Then P (n) is the number of colourings of n dots distributed on the circle with black
and white colours in such a way, that no two white dots have exactly one dot in between them.
The proof of this bijectivity is straightforward: If there are two white dots with exactly one
dot in between, then obviously the fortress in between can not shoot, which is not permitted.
On the other hand, if there are no such two white dots, then each fortress can shoot at least
one black dot and to ensure that every black dot will be hit, we can force the one in the
clockwise direction to shoot at it.
If n is odd, then P (n) is equal to the number K(n) of colourings of n dots on a circle
with black and white colours in such a way, that no two neighbouring dots have white colour
(we define the neighbouring dots to be the dots which have exactly one other dot in between
them). For n even, with the same definition of neighbours, the circle splits into two circles
with n/2 dots, and we have P (n) = K(n/2)2 .
For K(n) it is easy to derive a recurrence formula K(n) = K(n − 1) + K(n − 2). In
fact, the number of legal colourings with n-th dot being black is equal to the number of legal
colourings of n − 1 dots (just put the black dot in between the first dot and the (n − 1)-th dot)
plus the number of colourings of n − 1 dots with no two neighbouring white dots except for
the first and (n − 1)-th (we can put the black dot in between two white dots to obtain legal
colouring). The latter case gives the same number as the number of legal colouring with n − 2
dots having the first dot white (just span two white dots into one white). On the other hand,
the number of legal colourings with n-th dot being white is equal to the number of colourings
of n − 1 dots with no two neighbouring white dots and with the first and (n − 1)-th dot black
(we can put the white dot only in between to black dots), which is equal to the number of
legal colouring with n − 2 dots having the first dot black (again, span two black dots into one
black). Together, we have

K(n) = K(n − 1) + Kw (n − 2) + Kb (n − 2) = K(n − 1) + K(n − 2),

where Kw and Kb stands for the number of legal colourings with first dot white and black
respectively.
Moreover we can directly count K(2) = 3, K(3) = 4, K(4) = 7, which suggests

K(2) = F (4) − F (0), K(3) = F (5) − F (1), K(4) = F (6) − F (2)

and we can easily prove by the induction K(n) = F (n + 2) − F (n − 2), where F (k) stands
for the k-th term of the Fibonacci sequence (F (0) = 0, F (1) = F (2) = 1, . . . ). Further
(K(2), K(3)) = 1, and for n ≥ 3 we have

(K(n), K(n − 1)) = (K(n) − K(n − 1), K(n − 1)) = (K(n − 2), K(n − 1)) = · · · = 1.
Similarly we show that for each even n = 2a the number P (n) = K(a)2 is relatively prime
both to P (n + 1) = K(2a + 1) and P (n − 1) = K(2a − 1):

(K(a), K(2a + 1)) = (K(a), F (2)K(2a) + F (1)K(2a − 1)) =


= (K(a), F (3)K(2a − 1) + F (2)K(2a − 2)) = . . .
· · · = (K(a), F (a + 1)K(a + 1) + F (a)K(a)) = (K(a), F (a + 1)) =
= (F (a + 2) − F (a − 2), F (a + 1)) =
= (F (a + 2) − F (a + 1) − F (a − 2), F (a + 1)) =
= (F (a) − F (a − 2), F (a + 1)) = (F (a − 1), F (a + 1)) =
= (F (a − 1), F (a)) = 1

(K(a), K(2a − 1)) = (K(a), F (2)K(2a − 2) + F (1)K(2a − 3)) =


= (K(a), F (3)K(2a − 3) + F (2)K(2a − 4)) = . . .
· · · = (K(a), F (a)K(a) + F (a − 1)K(a − 1)) = (K(a), F (a − 1)) =
= (F (a + 2) − F (a − 2), F (a − 1)) = (F (a + 2) − F (a), F (a − 1)) =
= (F (a + 2) − F (a + 1), F (a − 1)) = (F (a), F (a − 1)) = 1,
which finishes the proof.
Problem T-4. Let n be a positive integer. A square ABCD is partitioned into n2 unit
squares. Each of them is divided into two triangles by the diagonal parallel to BD. Some of
the vertices of the unit squares are colored red in such a way that each of these 2n2 triangles
contains at least one red vertex. Find the least number of red vertices.
Solution. The least number of red vertices is
 
(n + 1)2
.
3
First, we define a colouring and count the number of red vertices. In what follows it will be
shown that the number of red vertices, obtained by this colouring, is indeed minimal.
It is convenient to replace the square by rhombus ABCD as in this case the isosceles
rightangled triangles are equilateral. Cover the rhombus by regular unit hexagons in such a
way, that A lies in the vertex of a hexagon (figure 1). Colour the center of each hexagon red.
Clearly each equilateral unit triangle belongs to one of the hexagons and thus contains a red
point. Hence this colouring satisfies the required conditions.

D C

A B

Figure 1: Covering with regular hexagons.

Denote by an the number of vertices which are coloured red. Let A1 , A2 , . . . , An−1 be
the points on AB such that AA1 = A1 A2 = · · · = An−2 An−1 = An−1 B = 1. Similarly define
points B1 , . . . , Bn−1 on BC, points C1 , . . . , Cn−1 on CD, and D1 , . . . , Dn−1 on DA.
Each of the n points on the line A1 Bn−1 is red (figure 1 and 2). The parallel lines A2 Bn−2
and A3 Bn−3 have no red points while line A4 Bn−4 contains 3 points less than A1 Bn−1 , that
is n − 3. All of them are red. Similarly, red points lie on lines A7 Bn−7 , A10 Bn−10 and so on.
The number of red points each time decreases by 3. On the other side of the diagonal AC,
we have n − 1 red points on the line C2 Dn−2 , n − 4 points on C5 Dn−5 and so on. Hence the
number of red points equals
 
an = n + (n − 3) + (n − 6) + . . . + (n − 1) + (n − 4) + (n − 7) + . . . .
When n is of the form n = 3k+1, we have an = 31 n(n+2), for n = 3k+2 we get an = 13 (n+1)2
and n = 3k + 3 implies an = 13 n(n + 2). In general, an = b 13 (n + 1)2 c.
D C

Bn−1

Bn−2

D b b b C
b b b
Bn−1
b b b
Bn−2
b b b
B1
b b b
A A1 A2 A3 A4 An−2 An−1 B
b b b

b b b
Figure 2: The value of an .
b b b
B1
b b b

A A1 number An−2Aneeded.
A2 A3of red points ... B
Let bn denote the least n−1 Clearly, b1 = 1. Consider a triangle
with side length 2 (the first picture on figure 3). The four unit triangles do not have a
common vertex, hence at least two Slika 2: Themust
vertices valuebeofcoloured.
an Each of the small marked
disjoint triangles in the second and third picture (figure 3) must contain at least one red
vertex and the bigger marked triangle at least two. This implies that b ≥ 2 + 1 = 3 and
vertice and the bigger marked triangle at least two. This implies that2b2 ≥ 2 + 1 = 3 and
b3 ≥ 1 + 1 + 1 + 2 = 5.
b3 ≥ 1 + 1 + 1 + 2 = 5.

Slika 3: 3:The
Figure Theminimum
minimumnumber
number of
of red vertices for
red vertices fornn==2 2and
andn n= =
3. 3

It has thus been shown that for n = 1, 2 and 3, bn ≥ an , which means that bn = an .
The Itrest
haswill
thusfollow by induction.
been shown The
that for n = 1, 2,next
and step
3, bn will
≥ anshow
, whichthat if bthat
means n−3 b=n =an−3
an ., The
then
bnrest
= will
an . follow by induction. The next step will show that if bn−3 = an−3 , then bn = an .
Let
Letnn= = 3k
3k++2.2. As
As demonstrated
demonstrated inin figure
figure
h 4,4, at least
at least
i bbn−3
n−3++(2k
(2k+
h+1)b
1)b22red
red verticesare
i vertices are
n 2 −4n+4 n 2 +2n+1
needed. That
needed. That is,
is, bn ≥ an−3 + (2k + 1) · 3 = + 2n − 1 = = an , hence
3 3
bn = an .    
(n − 2)2 (n + 1)2
bn ≥ bn−3 + (2k + 1) · 3 = + 2n − 1 = = an ,
3 3

hence bn = an .
If n = 3k + 3, we can estimate that
b

   
2)2 (n + 1)2
b

(n −
bn ≥ bn−3 + 2kb2 + 2 + 1 + 1 + 1 = + 2(n − 3) + 5 =
b

= an .
3 3

b b b
Slika 3: The minimum number of red vertices for n = 2 and n = 3

It has thus been shown that for n = 1, 2 and 3, bn ≥ an , which means that bn = an .
The rest will follow by induction. The next step will show that if bn−3 = an−3 , then
bn = an .
Let n = 3k + 2. As demonstrated in figure
h 4, at least
i bn−3 + (2kh+ 21)b2 red
i vertices are
2
needed. That is, bn ≥ an−3 + (2k + 1) · 3 = n −4n+4
3
+ 2n − 1 = n +2n+1
3
= an , hence
bn = an .

b b b

h i Slika 4: Case n = 3k + 2
n2 +2n+1
2(n − 3) + 5 = . Finally, taking
Figure n = 3k
4: Case + 1, the+ last2.picture demonstrates
h 2 thati
3
hn2 = 3k i n −4n+4
If n = 3k + 3, we can estimate that b ≥ b + 2kb
n −4n+4
bn ≥ bn−3 + (2(k − 1) + 1)b2 + 1 + 1 + 1 +n1 = n−3 3 + 2 + 1 + 1 + 1 =
+2 2n − 1 = an . In all the cases
3 it +
follows that bn = an .
6

b b b

Slika 5: Case n = 3k + 3
Figure 5: Case n = 3k + 3.

Finally, taking n2(n


=−3k + 1,h the last
3) + 5 = n +2n+1
i 2 picture demonstrates that
. Finally, taking n = 3k + 1, the last picture demonstrates that b
b

3
h
 i + 2n − 12 = an . In all the cases it
bn ≥ bn−3 + (2(k − 1) + 1)b2 + 1 + 1 + 1 + 1 = n −4n+4
2 
3 (n − 2) (n + 1)2
bn ≥ bn−3 + (2(k −that
follows 1) +bn =1)b
an .2 + 1 + 1 + 1 + 1 = + 2n − 1 = = an .
3 3

In all the cases it follows that bn = an . b b b

Slika 6: Case n = 3k + 1 b

b b b

Slika 5: Case n = 3k + 3

b b b
7

Slika 6: Case n = 3k + 1

Figure 6: Case n = 3k + 1.
Problem T-5. The incircle of the triangle ABC touches the sides BC, CA, and AB in
the points D, E, and F , respectively. Let K be the point symmetric to D with respect to the
incenter. The lines DE and F K intersect at S. Prove that AS is parallel to BC.

Solution. Let S 0 be the intersection point of the line F K and the line parallel to BC
passing through A. We need to show that S 0 , D and E are collinear. Let the tangent
line to the given circle at the point K intersect AB at Q (it is parallel to BC). Then
∠AS 0 F = ∠QKF = ∠QF K and from that follows that AS 0 = AF = AE. But DC = EC
and BC k AS 0 . Thus ∠CDE = ∠CED = ∠AES 0 = ∠AS 0 E = ∠AES and S 0 , D and E are
collinear.
C

S0

K
A Q F B

Solution 2. Let α = ∠BAC, β = ∠ABC and let I be the center by the incircle. Then
∠IDF = ∠IF D = β/2 = ∠AF S since ∠KF D = ∠AF I. Because ∠F DS = ∠F IE/2 =
90◦ − α/2 (AF IE is cyclic) and ∠AIF = 90◦ − α/2 we have 4AF I ∼ 4SF D. The ratio of
similitude gives AF : SF = IF : DF and using ∠AF S = ∠IF D yields to 4AF S ∼ 4IF D
which means that AF = AS = AE. Finally 4ASE ∼ 4CDE gives ∠SAE = 180◦ − α − β
and consequently ∠BAS + ∠ABC = 180◦ .

Solution 3. Let α = ∠BAC, then ∠F IE = 180◦ − α, ∠F DE = 90◦ − α/2. Because


KD is a diameter of the incircle we have ∠DSF = α/2 and ∠KED = 90◦ . If γ = ∠BCA
then ∠KDE = γ/2. We want to prove that AE : EC = SE : ED because then ∠CDE =
∠CED = ∠AES = ∠ASE which implies AS k CD. Calculation of these length in terms of
the angles of the triangle ABC and its inradius gives
α
AE = r cot
2
γ
EC = r cot
2
α γ α
SE = EK cot = ED tan · cot
2 2 2
and we are done.
Solution 4. We will use complex coordinates. Let I = (0), and let the incircle be a unit
circle. Let D = (−i), E = (e), F = (f ). Then K = (i). The tangents in E, F are (w̄ is the
complex conjugate of w)
te : z + e2 z̄ = 2e,
tf : z + f 2 z̄ = 2f
and the coordinates of A (intersection of te , tf )

2ef 2
a= , ā = .
e+f e+f
The lines
DE : z − iez̄ = e − i,
FK : z + if z̄ = f + i
intersect in S = (z),

(−i)(f − e + 2i) i(e − f − 2ief )


z̄ = , z= .
e+f e+f

To prove AS k BC, we calculate the slope1 of AS:


a−z
t=− = · · · = −1
ā − z̄

which indeed equals the slope of BC (= d2 = (−i)2 = −1).

1
Slope of the line with the equation z + tz̄ = s is t.
Problem T-6. Let A, B, C, D, E be points such that ABCD is a cyclic quadrilateral and
ABDE is a parallelogram. The diagonals AC and BD intersect at S and the rays AB and
DC intersect at F . Prove that ∠AF S = ∠ECD.
Author: Adrian Satja Kurdija, Croatia
Solution. Let M and N be the feet of perpendicular from S to AB and CD, respectively.
Then SM F N is cyclic since it has two opposite right angles. Therefore ∠AF S = ∠M F S =
∠M N S.Problem.
We need Let prove ∠M
to ABCD be aNcyclic ∠ECD. This
S = quadrilateral. Point
willE follow
is chosen so that
from ABDE of
similarity is atriangles
parallelogram, F is the intersection of lines AB and DC (B is between A and F , C is
M SN and EDC. Since ABCD is cyclic, triangles ABS and DCS are similar. Lines SM
between D and F ) and S is the intersection of the diagonals AC and BD. Prove that
and SN ^AF
are the
S = corresponding
^ECD. altitudes, so SM : SN = AB : CD = ED : CD. Also,

∠M SN = 180◦ − ∠AF D = ∠EDF = ∠EDC


Solution.
and therefore, 4M SN ∼ 4EDC as claimed.

SolutionLet2.M , Let
N beFfeet
S intersect the lines
of perpendiculars fromAD
S toand
AB DE in the
and CD, points X and Z respectively
respectively.
and denote α = ∠BAD, δ = ∠ADF , AB = a, and CD = c. It is sufficient to prove that
Then SM F N is cyclic since it has two opposite right angles. Therefore ^AF S =
the triangles
^M F CDE
S = ^MandN S.ZDF are similar, because then ∠ECD = ∠DZF = ∠AF S. These
triangles have a common angle, we have to prove that ZD : F D = c : a.
We need to prove ^M N S = ^ECD. This will follow from similarity of triangles M SN
and EDC. Z E D
Since ABCD is cyclic, triangles ABS and DCS are similar. SM and SN are correspond-
ing altitudes, so |SM | : |SN | = |AB| : |CD| = |ED| : |CD|.
C
Also,
^M SN = 180◦ − ^M F XN = 180S◦ − ^AF D = ^EDF = ^EDC
and therefore, △M SN ∼ △EDC as claimed.

A B F

The sine law in the triangle BF C gives CF : BF = sin δ : sin α, since

∠F BC = 180◦ − ∠ABC = ∠CDA = δ and ∠F CB = 180◦ − ∠BCD = ∠BAD = α.


The Ceva’s theorem for the triangle AF D and the point S then gives
DX AB CF DX a sin δ
1= · · = · · . (1)
AX BF DC AX c sin α
From the similitude of triangles AF X and DZX we have ZD = AF · DX/AX, and from the
sine law in the triangle AF D we have AF = F D · sin δ/ sin α. Therefore the desired ratio
ZD : F D equals
ZD AF DX sin δ DX c
= · = · = ,
FD F D AX sin α AX a
where (1) is used in the last equality.

Solution 3. Let G be the intersection of lines AE and CD and let T be such point on
AG that ∠BF S = ∠T F D. Then we have to prove that F T k CE or equivalently, that
|CG|/|F G| = |EG|/|T G|.
Since ABDE is a parallelogram, the triangles EDG and AF G are similar, therefore
|AG| · |ED| (|BD| + |EG|) · |AB|
|EG| = = ,
|AF | |AF |
so
|BD| · |AB|
|EG| = .
|BF |
Similarly, since the triangles BF D and EDG are similar, we obtain
|F D| · |AB|
|DG| = .
|BF |

Since ABCD is cyclic, the triangles BF C and DF A are similar, so |AF | · |BF | = |CF | · |DF |.
Now we compute
|F D| · |AB|
|CG| = |DG| + |CD| = + |F D| − |F C| =
|BF |
 
|F D| · |AF | |AF | · |BF | |DF | |BF |
= − = |F A| · −
|BF | |F D| |BF | |DF |

and
|F D| · |AF |
|F G| = |DG| + |F D| = ,
|BF |
so  2
|CG| |BF |
=1− .
|F G| |DF |
Now we will compute also the ratio |EG|/|T G|. By the construction of T we have ∠AF T =
∠SF C. Moreover, since ABCD is cyclic and AT k BD, we have also

∠T AF = ∠T AD + ∠DAF = ∠ADB + ∠BCF = ∠ACB + ∠BCF = ∠ACF,

so the triangles AF T and CF S are similar. Since BF C and DF A are also similar, we get
|BC|/|AD| = |CF |/|AF | = |CS|/|AT |. Since the angles ∠DAT and SCB are also equal,
the triangles ADT and CBS are similar. Then ∠T DA = ∠SBC = ∠DAC, so DT k AS.
Then ASDT is a parallelogram and the triangles T DE and SAB are congruent. Therefore
|T G| = |EG| + |T E| = |EG| + |BS|. The triangles ABS and DCS are similar, therefore

|BS| |CS| |AC| − |AS| |BS| · |CD|


= = and |AS| = |AC| − .
|AB| |CD| |CD| |AB|

Since the triangles BF S and DF T are similar, we have

|BS| |DT | |AS| |AC| |BS| · |CD|


= = = − ,
|BF | |DF | |DF | |DF | |AB| · |DF |
so
|AC| · |AB| · |BF |
|BS| = .
|AB| · |DF | + |BF | · |CD|
We use also the similarities of AF C and DF B and of AF D and CF B and obtain
|BD| · |CF | · |AB| · |DF | |BD| · |AB| · |BF |
|BS| = 2 2 2
=
|AB| · |DF | + |BF | · |DF | − |BF | · |AF | |DF |2 − |BF |2

and
|BD| · |AB| · |DF |2
|T G| = |EG| + |BS| = .
|BF | · (|DF |2 − |BF |2 )
Finally we can compute
 2
|EG| |DF |2 − |BF |2 |BF | |CG|
= =1− = ,
|T G| |DF |2 |DF | |F G|

which we had to prove.


Problem T-7. For a nonnegative integer n, define an to be the positive integer with decimal
representation
1 |0 .{z
. . 0} 2 |0 .{z
. . 0} 2 |0 .{z
. . 0} 1.
n n n

Prove that an /3 is always the sum of two positive perfect cubes but never the sum of two
perfect squares.

Solution. First we prove that an /3 is never the sum of two perfect squares. Note that perfect
squares give only remainders 0 and 1 when divided by four; therefore, integers expressible as
the sum of two squares give only remainders 0, 1, and 2. On the other hand, the number an /3
gives remainder 3 because an gives remainder 1; hence it cannot be expressed as the sum of
two perfect squares.2
After some experimentation, one finds the formula
 3  3
an 10n+1 + 2 2 · 10n+1 + 1
= + .
3 3 3

This follows from the fact that an = 103n+3 + 2 · 102n+2 + 2 · 10n+1 + 1. Both the numbers
in brackets are integers since 10n+1 ≡ 1 (mod 3). Thus an /3 can be expressed as the sum of
two perfect cubes.

2
Another way to look at an /3 modulo 4 is to note that it always ends with 67.
Problem T-8. We are given a positive integer n which is not a power of 2. Show that there
exists a positive integer m with the following two properties:

(i) m is the product of two consecutive positive integers;


(ii) the decimal representation of m consists of two identical blocks of n digits.

Solution. First we prove a lemma.


Lemma. Let x and k be integers greater than 2. If k is odd then the number xk + 1 is
the product of two coprime numbers.

Proof. Let m = gcd(x + 1, k). There is a polynomial Q(x) ∈ Z[x] such that

xk + 1 = (x + 1)(xk−1 − xk−2 + · · · + x2 − x + 1) = (x + 1) (x + 1)Q(x) + k .
Then  
k
 (x + 1)Q(x) k
x + 1 = (x + 1)m · +
m m
gives the required product because
(x + 1)Q(x) k xk + 1 x3 + 1
+ = ≥ > 1.
m m (x + 1)m (x + 1)2
The numbers 1 and 2 are powers of two, hence we may assume that n ≥ 3. Since n is not
a power of two, it has an odd divisor greater than one; therefore, according to our lemma,3
there are coprime numbers a and b such that
10n + 1 = ab.

Our task is to prove that there are numbers t and s such that
m = (10n + 1)t = abt = s(s − 1).

First, we show that there is a positive integer s divisible by a which satisfies s ≡ 1


(mod b). Consider the numbers 0, a, 2a, . . . , (b − 1)a. These numbers give mutually different
remainders modulo b since a and b are coprime. Therefore, one of them gives remainder 1
and we take s to be this number.
Similarly we can pick a number s0 divisible by b which satisfies s0 ≡ 1 (mod a). The
numbers s and s0 are positive and smaller than 10n . Therefore, s(s − 1) and s0 (s0 − 1) are
both divisible by ab and smaller than 102n . Moreover, s + s0 ≡ 1 (mod ab). The number
s + s0 is greater than 1 and smaller than 2 · 10n . Hence s + s0 = ab + 1. Therefore, one of the
numbers s and s0 is greater than 5 · 10n−1 . Then one of the numbers s(s − 1) or s0 (s0 − 1) is
greater than 25 · 102n−2 , thus it has 2n digits. This number has all the required properties.
Comment. Instead od using congruences we can also look at Diophantine equations ax =
by + 1 and ax = by − 1. Both have solutions with 0 < x < b and 0 < y < a and xy > 10n−1
for one of them.
3
We can avoid using the lemma by exploiting the Mihailescu’s theorem, first known as Catalan’s Conjecture;
it was proved in 2002. It says that the only solution of the equation xa − y b = 1 in positive integers greater
than one is 32 − 23 . This implies that if 10n + 1 is a power of a prime then it is a prime. This cannot happen
since n has an odd divisor.
PROBLEMS AND SOLUTIONS

5th Middle European Mathematical Olympiad

Varaždin, Croatia, September 2011


ALGEBRA

I 1 (Vjekoslav Kovač, Croatia)


Initially, only the integer 44 is written on a board. An integer a on the board can be
replaced with four pairwise different integers a1 , a2 , a3 , a4 such that the arithmetic mean
1
4 (a1 + a2 + a3 + a4 ) of the four new integers is equal to the number a. In a step we
simultaneously replace all the integers on the board in the above way. After 30 steps we
end up with n = 430 integers b1 , b2 , . . . , bn on the board. Prove that

b21 + b22 + · · · + b2n


> 2011 .
n

First solution
Let us first prove an auxiliary statement.
Lemma. If a1 , a2 , a3 , a4 are four different integers such that their average a = (a1 + a2 +
a3 + a4 )/4 is also an integer, then

a21 + a22 + a23 + a24 5


− a2 > .
4 2

Proof. Note that the expression on the left hand side can be transformed as

a21 + a22 + a23 + a24


− a2
4
a2 + a22 + a23 + a24 − 8a2 + 4a2
= 1
4
a21 + a22 + a23 + a24 − 2a(a1 + a2 + a3 + a4 ) + 4a2
=
4
(a1 − a)2 + (a2 − a)2 + (a3 − a)2 + (a4 − a)2
= .
4
Now, a1 − a, a2 − a, a3 − a, a4 − a are four different integers that add up to 0. We claim
that sum of their squares is at least 10. If none of these integers is 0, then that sum is
at least 12 + (−1)2 + 22 + (−2)2 = 10. On the other hand, if one of the integers is 0,
than the remaining three cannot be only from the set {1, −1, 2, −2}, because no three
different elements of that set add up to 0. Therefore, the sum of their squares is at least
32 + 12 + (−1)2 = 11. This completes the proof of the lemma.

Returning to the given problem, we denote by Sk the average of squares of the numbers
on the board after k steps. More precisely,

b2k,1 + b2k,2 + · · · + b2k,4k


Sk = ,
4k
where bk,1 , bk,2 , . . . , bk,4k are the numbers appearing on the board after the operation is
performed k times. Applying the above lemma to each of the numbers, adding up these
inequalities, and dividing by 4k , we obtain Sk+1 − Sk > 52 , so in particular

5 5
S30 > S0 + 30 · = 442 + 30 · = 2011 .
2 2

1
Second solution (by Michal Zaja̧c, Poland)
Let a0,1 = 44 and let ai,1 , ai,2 , . . . , ai,4i be number written on the board after i steps. In
(i + 1)-st step we replace the number ai,k with ai+1,4k−3 , ai+1,4k−2 , ai+1,4k−1 and ai+1,4k .
We denote
P
4
a2i,j
j=1
Si = .
4i
We want to prove that Si+1 > Si + 2.5, with equality occuring when each number a is
replaced by (a − 2, a − 1, a + 1, a + 2). For a given number a, let (b1 , b2 , b3 , b4 ) be an
arbitrary quadruple of integers that satisfy the conditions that b1 + b2 + b3 + b4 = 4a and
b1 > b2 > b3 > b4 . We will prove that (b1 , b2 , b3 , b4 ) majorizes (a + 2, a + 1, a − 1, a − 2).
First we conclude that b1 > a + 2, otherwise

b1 + b2 + b3 + b4 6 (a + 1) + a + (a − 1) + (a − 2) < 4a.

Next, it holds that b1 + b2 > (a + 2) + (a + 1) = 2a + 3.


Otherwise, it holds that b1 + b2 6 2a + 2 and thus b2 6 a, b3 6 a − 1 and b4 6 a − 2. This
implies that b1 + b2 + b3 + b4 6 4a − 1 < 4a, which is false.
Finally, in order to prove that b1 + b2 + b3 > 3a + 2, which is equivalent to b4 6 a − 2,
we assume otherwise: b4 > a − 1 and we arrive to contradiction in the same way as in
the first case (in this case the sum is strictly bigger than 4a). Thus, we have proved that
(b1 , b2 , b3 , b4 ) ≻ (a + 2, a + 1, a − 1, a − 2).
The function f (x) = x2 is convex (because f ′′ (x) = 2 > 0) and by Karamata inequality it
holds that:

b21 + b22 + b23 + b24 > (a + 2)2 + (a + 1)2 + (a − 1)2 + (a − 2)2 = 4a2 + 10.

Similar to first solution, we conclude that Si+1 > Si +2.5 and finally by inductive argument:

S30 > S0 + 30 · 2.5 = 2011.

2
T 1 (Tonći Kokan, Croatia)
Find all functions f : R → R such that the equality

y 2 f (x) + x2 f (y) + xy = xyf (x + y) + x2 + y 2

holds for all x, y ∈ R, where R is the set of real numbers.

First solution
Substituting y = 0 we find that x2 f (0) = x2 holds for all real numbers x which implies
f (0) = 1.
Let us introduce a new function g : R → R given by g(x) = f (x) − 1. Equation from the
problem becomes
y 2 g(x) + x2 g(y) = xy g(x + y), (1)
while g(0) = 0.
Denoting c = g(1) and introducing another function h : R → R defined by h(x) = g(x)−cx,
we obviously get h(0) = h(1) = 0, whereas the equation that must be satisfied is now

y 2 h(x) + x2 h(y) = xy h(x + y). (2)

Substituting x = y = 1 in the last equation we get h(2) = 0, while another substitution


x = −1, y = 1 gives h(−1) = 0.
Let us suppose that there exists a real number y0 such that h(y0 ) ̸= 0.
Putting x = 1, y = y0 + 1 in (2) we get:

h(y0 + 1)
h(y0 + 1) = (y0 + 1)h(y0 + 2), or h(y0 + 2) = . (3)
y0 + 1

On the other hand, substituting x = 2, y = y0 in (2) gives

2h(y0 )
4h(y0 ) = 2y0 h(y0 + 2), i.e. h(y0 + 2) = . (4)
y0

Finally, putting x = 1, y = y0 in (2) leads to:

h(y0 )
h(y0 ) = y0 h(y0 + 1), or h(y0 + 1) = . (5)
y0

From (3), (4) and (5) it follows that y0 = − 12 . However, substituting x = y = − 21 in (2)
and using h(−1) = 0 we arrive at h(− 12 ) = 0, which is a contradiction.
We conclude that h(x) = 0 holds for all x ∈ R and thus f (x) = cx + 1 is the only solution.
We check that this really is the solution for every real number c.

3
Second solution (by Matija Bašić, coordinator)
We define function h as in the first solution of the problem. Hence, we have h(0) = 0,
h(1) = 0,
y 2 h(x) + x2 h(y) = xyh(x + y). (∗)

Substituting y = x : 2x2 h(x) = x2 h(2x), ∀x, or h(2x) = 2h(x) for all x.


Thus h(2) = 0.
Substituting y = −x : x2 (h(x) + h(−x)) = x2 h(0) = 0, ∀x, which gives

h(−x) = −h(x), ∀x.

Thus h(−1) = 0.
Put y = 1 in (∗) : h(x) + x2 h(1) = xh(x + 1) i.e.

h(x) = xh(x + 1) (1)

In (1) we change x → x + 1

h(x + 1) = (x + 1)h(x + 2) (2)

Put y = 2 in (∗) : 4h(x) + x2 h(2) = 2xh(x + 2) i.e.

2h(x) = xh(x + 2) (3)

Now we conclude

2(x + 1)h(x) = (3) = x(x + 1)h(x + 2)


= (2) = xh(x + 1)
= (1) = h(x)

Therefore,
2(x + 1)h(x) = h(x), ∀x
so h(x) = 0 or 2(x + 1) = 1 for all x. Obviously, h(x) = 0 for all x ̸= − 21 .
Moreover, 2h(− 21 ) = h(2 · (− 12 )) = h(−1) = 0 so h(− 12 ) = 0 holds as well.
We have proved that h(x) = 0 for all x ∈ R, hence, g(x) = cx, f (x) = cx + 1.
Direct check shows that f (x) = cx + 1 is the solution of the given functional equation for
all c ∈ R.

4
Third solution (by Klemen Šivic, Slovenian leader)
As in the first solution we obtain f (0) = 1 and we define g(x) = f (x) − 1. Then g(0) = 0
and
y x
g(x + y) = g(x) + g(y) for x, y ̸= 0. (1)
x y
Therefore
y+z x y+z xy xz
g(x + y + z) = g(x) + g(y + z) = g(x) + g(z) + g(y)
x y+z x z(y + z) y(y + z)
for all nonzero x, y and z such that z ̸= −y. However, since the left side of the above
equation is symmetric in x and z, we obtain that
y+z xy xz y+x zy xz
g(x) + g(z) + g(y) = g(z) + g(x) + g(y)
x z(y + z) y(y + z) z x(y + x) y(y + x)
for all nonzero x, y and z such that y ̸= −x and y ̸= −z. In this equation we set y = z = 1
and we obtain
2g(x) 1
 x
‹
+ x g(1) = g(x) + x + 1 + g(1) for all x ̸= 0, −1,
x x(x + 1) x+1
i.e.
2x + 1 2x + 1
g(x) = g(1) for all x ̸= 0, −1.
x(x + 1) x+1
Therefore
1
g(x) = g(1) x for all x ̸= 0, −1, − .
2
Clearly, the above equation holds also for x = 0. If we set x = 1 and y = −1 into
the equation (1), we obtain g(−1) − g(1), and if we set x = y = − 12 , then we obtain
€ Š € Š
−g(1) = g(−1) = 2g − 21 , therefore g − 12 = − g(1) 2 . Hence g(x) = g(1) x for all x ∈ R.
f (1) = a can be arbitrary, therefore all solutions are functions g(x) = ax, or equivalently,
f (x) = ax + 1 for all x ∈ R, where a ∈ R is arbitrary.

Fourth solution (by team Hungary)


Similar to the first solution, we introduce the function g(x) and prove that g(0) = 0 and
g(−x) = −g(x). Inserting y = 1 and y = −1 into the equation for g(x) we ge:
g(x) + x2 g(1) = x g(x + 1), (1)
g(x) + x g(−1) = −x g(x − 1).
2
(2)

Inserting x + 1 instead of x into (2) we get:


g(x + 1) + (x + 1)2 g(−1) = −(x + 1) g(x). (3)

From (2) and (3) we get represent g(x + 1) in two ways:


g(x) + x2 g(1)
g(x + 1) = = −(x + 1) g(x) − (x + 1)2 g(−1) for x ̸= 0.
x
Solving for g(x) and using g(−1) = −g(1) we get:
€ Š € Š
g(x) x2 + x + 1 = g(1) x x2 + x + 1 .

Since x2 + x + 1 > 0 for all x ∈ R we get g(x) = g(1) x and f (x) = cx + 1. Direct check
shows that this is, indeed, the solution of the given functional equation for all c ∈ R.

5
T 2 (Kristina Ana Škreb, Croatia)
Let a, b, c be positive real numbers such that
a b c
+ + = 2.
1+a 1+b 1+c
Prove that √ √ √
a+ b+ c 1 1 1
>√ +√ +√ .
2 a b c

First solution
Note that the condition of the problem is equivalent to
1 1 1
+ + = 1. (1)
1+a 1+b 1+c

We want to prove that


√ √ √
a+ b+ c 1 1 1
>√ +√ +√
2 a c
√ √ √
 1
b
1 1

⇐⇒ a+ b+ c>2 √ + √ + √
√ 1
  √ 1
 √ a1  b  1c 1 1

⇐⇒ a+ √ + b+ √ + c+ √ >3 √ + √ + √
a
a+1 b+1 c+1
b
 1 c 1 1
a
 b c
⇐⇒ √ + √ + √ >3 √ +√ +√ (2)
a b c a b c

From (1) we see that at most one of the numbers a, b, and c can be strictly smaller than
1 1 1
1. (Otherwise, we would have 1+a + 1+b + 1+c > 12 + 12 = 1.)
Without loss of generality we can take a > b > c.

Case 1. a > b > c > 1


√ €√ Š √ €√ Š
We have
a+1 b+1
a ab − 1 > b ab − 1 =⇒ √ > √ ,
a b

√ €√ Š √ €√ Š
and also
b+1 c+1
b bc − 1 > c bc − 1 =⇒ √ > √ .
b c

Case 2. a > b > 1, and c < 1


√ > b+1
The same way as in Case 1, we get a+1 √ .
a b
Since a, b, and c are positive numbers, (1) implies
1 1 c 1
61− = =⇒ bc > 1 =⇒ b> .
1+b 1+c 1+c c
And this gives
Ê ! r Ê !
√ b 1 b b+1 c+1
b −1 > −1 =⇒ √ > √ .
c c c b c

6
We have showed that
a+1 b+1 c+1
a>b>c =⇒ √ > √ > √ (3)
a b c

and
1 1 1
a>b>c =⇒ 6 6 (4)
1+a 1+b 1+c
hold.
Now (3), (4) and the Chebyshev inequality imply

a+1 b+1 c+1


a + 1 b+1 c+1
 1 1 1
‹
√ + √ + √ = √ + √ + √ + +
a c
b
 1a 1
b
1
c 1+a 1+b 1+c
>3 √ +√ +√ ,
a b c

which is exactly (2).

Second solution (by Klemen Šivic, Slovenian leader)


1 1 1
We make a substitution x = a+1 , y = b+1 , z = c+1 . The condition

1 1 1
+ + =1
1+a 1+b 1+c
is then equivalent to
x + y + z = 1,
y+z
and the original variables can be expressed as a = 1
x −1 = 1−x
x = x , b = x+z
y and
c = x+y
z . The inequality
√ √ √
a+ b+ c 1 1 1
>√ +√ +√
2 a b c

is then equivalent to
r r Ê Ê Ê Ê
x+y y+z z+x 2x 2y 2z
+ + > + + .
2z 2x 2y y+z z+x y+x

We will prove that this inequality holds for all positive numbers x, y and z.
We make a substitution p = x + y, q = y + z, r = z + x. Then p, q and r are sides of a
triangle and we have to prove that
r r r r Ê Ê
p q r p+q−r q+r−p r+p−q
+ + > + + . (1)
q+r−p r+p−q p+q−r r p q

Since p, q and r are sides of a triangle, we can write p = 2R sin α, q = 2R sin β and
r = 2R sin γ, where R is the circumradius and α, β and γ angles of the triangle with sides
p, q and r. Then
r Ê s
p sin α sin(β + γ)
= = =
q+r−p sin β + sin γ − sin α sin β + sin γ − sin(β + γ)
Ì Ì
2 sin β+γ β+γ
2 cos 2 sin α2
= = .
2 sin β+γ β−γ β+γ
2 (cos 2 − cos 2 ) 2 sin β2 sin γ2

7
Similarly we compute the other terms in (1), therefore (1) is equivalent to
Ì Ì Ì
sin α2 sin β2 sin γ2
+ +
2 sin β2 sin γ2 2 sin γ2 sin α2 2 sin α2 sin β2
Ì Ì Ì
β
α
2 sin sin 2 sin β2 sin γ2 2 sin γ2 sin α2
> 2 2
+ + ,
sin γ2 sin α2 sin β2
or equivalently, to
α β γ α β α
 γ β γ

sin + sin + sin > 2 sin sin + sin sin + sin sin
2 2 2 2 2 2 2 2 2
 α β γ 2

2 α 2 β 2 γ
= sin + sin + sin ) − (sin + sin + sin .
2 2 2 2 2 2
Since sin x is concave function on (0, π), Jensen’s inequality implies that
α β γ α+β+γ π 3
sin + sin + sin 6 3 sin = 3 sin = .
2 2 2 6 6 2
Therefore
α β γ 2 α β
 γ 2

sin + sin + sin > sin + sin + sin
2 2 2 3 2 2 2
 α β

γ 2
 α β γ

> sin + sin + sin − sin2 + sin2 + sin2 ,
2 2 2 2 2 2
where at the end we used the arithmetic-quadratic mean. Therefore the inequality is
proved.

Third solution (by team Croatia)


Let a = 2x, b = 2y, c = 2z. Then our condition is equivalent to :

x y z 1 1 1
+ + =1 ⇐⇒ + + = 2.
1 + 2x 1 + 2y 1 + 2z 1 + 2x 1 + 2y 1 + 2z
and we need to prove that
√ √ √ 1 1 1
x+ y+ z > √ + √ + √ ,
x y z
which is equivalent to :
Xx−1 X x − 1 2x + 1
√ >0 ⇐⇒ · √ > 0.
cyc x cyc 2x + 1 x

Since this inequality is symmetric, we can assume x > y > z. We prove that then:

x−1 y−1 z−1


> > (1)
2x + 1 2y + 1 2z + 1
and
2x + 1 2y + 1 2z + 1
√ > √ > √ . (2)
x y z

In order to prove (1) we note that:


x−1 y−1
> ⇐⇒ 3x > 3y,
2x + 1 2y + 1
which holds. The same argument holds for y and z.

8
In order to prove (2) we factor the inequality in the following equivalent way:
√ √ √
( x − y)(2 xy − 1) > 0.

√ √ √
By the assumption, x − y > 0 thus we need to prove that 2 xy − 1 > 0. Assume the
opposite, ie. that 4xy < 1. Then:

1 1 2(1 + x + y) 1 − 4xy
+ = =1+ > 1,
1 + 2x 1 + 2y 1 + 2(x + y) + 4xy (1 + 2x)(1 + 2y)

which contradicts the condition.


We have proven that triplets
 x−1  ‚ Œ
y−1 z−1 2x + 1 2y + 1 2z + 1
, , and √ , √ , √
2x + 1 2y + 1 2z + 1 x y z

are ordered in the same way thus by Chebyshev inequality we have:


X x − 1 2x + 1
 1 X x − 1 X 2x + 1
·√ > · √ = 0.
cyc 2x + 1 x 3 cyc 2x + 1 cyc x

9
COMBINATORICS

I 2 (Tomislav Pejković, Croatia)


Let n > 3 be an integer. John and Mary play the following game: First John labels the
sides of a regular n-gon with the numbers 1, 2, . . . , n in whatever order he wants, using
each number exactly once. Then Mary divides this n-gon into triangles by drawing n − 3
diagonals which do not intersect each other inside the n-gon. All these diagonals are
labeled with number 1. Into each of the triangles the product of the numbers on its sides
is written. Let S be the sum of those n − 2 products.
Determine the value of S if Mary wants the number S to be as small as possible and John
wants S to be as large as possible and if they both make the best possible choices.

Solution (by Rudi Mrazović, coordinator)


For n = 3 the answer is 6. Suppose n > 4. It is obvious that in each triangulation there
are at least two triangles that share two sides with the polygon. We will prove that it
is always best for Mary to choose a triangulation for which there is no more than two
triangles of this kind.
We call a triangle in a triangulation bad if all of its sides are diagonals of the polygon. First
we prove that Mary can choose an optimal triangulation that contains no bad triangles.
Assume on the contrary that every optimal triangulation contains a bad triangle. For an
optimal triangulation T let d(T ) be the length of the smallest side of all bad triangles in
T . Among all optimal triangulations with minimal number of bad triangles let T0 be such
that d(T0 ) is minimal.
Consider a bad triangle ABC in T0 such that |AB| = d(T0 ). Let ABD be the other
ø of the
triangle of T0 that contains AB as one of its sides. Since D lies on the arc AB
circumcircle of ABC that does not contain C and ^ACB is acute, we have |AD| < |AB|
and |BD| < |AB|.
Let T1 be the triangulation obtained from T0 by replacing AB with CD. If the sides AD
and BD have labels a and b respectively, then

S(T1 ) − S(T0 ) = a + b − ab − 1 = −(a − 1)(b − 1) 6 0.

Because T0 is optimal triangulation, we conclude that T1 is also optimal. Since T0 has the
minimal number of bad triangles at least one of the segments AD and BD should be a
diagonal, but then d(T1 ) is less than d(T0 ) what is a contradiction.
Now that we know that Mary can choose an optimal triangulation that contains no bad
triangles, we easily conclude that in a such triangulation there are exactly two triangles
that share two sides with the polygon. If we denote by x1 (respectively x2 ) the number
of triangles that have exactly one (respectively two) of their sides being the sides of the
polygon, then x1 + x2 = n − 2 and x1 + 2x2 = n, so x2 = 2.
Mary’s strategy is to choose these two triangles so that the side of the polygon labeled
with 1 is contained in one of these triangles and the side labeled with 2 is contained in
the other.

10
By this strategy Mary makes sure that
(
n(n + 1)
S 6 max − (1 + 2 + n + n − 1) + 1 · n + 2 · (n − 1),
2
)
n(n + 1)
− (1 + 2 + n + n − 1) + 1 · (n − 1) + 2 · n
2
n2 + 3n − 6
= .
2

On the other hand, John can force Mary to achieve exactly this bound by labeling the
sides of the polygon in the following order

1, n − 1, 4, n − 3, 5, . . . , n − 2, 3, n, 2.

n2 + 3n − 6
Thus, the answer to our problem is S = , for each n > 3.
2

11
T 3 (Viktor Harangi, Hungary)
For an integer n > 3, let M be the set {(x, y) | x, y ∈ Z, 1 6 x 6 n, 1 6 y 6 n} of points
in the plane. (Z is the set of integers.)
What is the maximum possible number of points in a subset S ⊆ M which does not
contain three distinct points being the vertices of a right triangle?

Solution
We will prove that the maximal cardinality of S is 2n − 2.
The set
S = {1} × {2, . . . , n} ∪ {2, . . . , n} × {1}
has cardinality 2n − 2 and it does not contain three distinct points that form a right
triangle.
We will show that any subset S ⊂ M which does not contain three distinct points that
form a right triangle can have at most 2n − 2 points. For such set S consider its subsets:

• Sx consists of those points P = (x, y) in S that have unique x coordinate, that is,
there exists no y ′ ̸= y such that (x, y ′ ) ∈ S.

• Sy consists of those points P = (x, y) in S that have unique y coordinate, that is,
there exists no x′ ̸= x such that (x′ , y) ∈ S.

We claim that S = Sx ∪ Sy . We prove this by contradiction. Assume ther exists a point


P ∈ S \(Sx ∪Sy ). Since P ∈ / Sx , there exists Px ̸= P in S with the same x coordinate as P .
Similarly, there exists Py ̸= P in S with the same y coordinate as P . Hence P, Px , Py ∈ S
and ^Px P Py = 90◦ , a contradiction.
Clearly, |Sx | 6 n, and if |Sx | = n, then S = Sx . The same holds for Sy . So, |S| = n or
|Sx |, |Sy | 6 n − 1 and |S| 6 |Sx | + |Sy | 6 2n − 2. It follows that the cardinality of S is at
most max(n, 2n − 2) = 2n − 2.

12
T 4 (Vjekoslav Kovač, Croatia)
Let n > 3 be an integer. At a MEMO-like competition, there are 3n participants, there
are n languages spoken, and each participant speaks exactly three different languages.
¡ 2n ¤
Prove that at least of the spoken languages can be chosen in such a way that no
9
participant speaks more than two of the chosen languages.
(⌈x⌉ is the smallest integer which is greater than or equal to x.)

First solution
Consider the classifications of the set of n available languages into easy, medium, and
hard languages. There are 3n possible classifications in total and we denote by S the set
of all possible classifications. For each classification s ∈ S, let A(s) be the number of easy
languages and let B(s) be the number of students who speak 3 easy languages.
If we add up quantities A(s) over all possible classifications s ∈ S, the resulting sum will
P
be s∈S A(s) = n3n−1 . In order to verify that, we realize that the result should be the
same for medium and hard languages too, but all three of these sums add up to
X
3 A(s) = number of classifications × number of languages = 3n · n .
s∈S

On the other hand, we use double counting to compute the sum of quantities B(s) over
all possible classifications s ∈ S.
For each student there are 3n−3 classifications for which he speaks 3 easy languages, as
we only have the choice to classify each of the n − 3 languages that the student does not
speak. In two ways, we count the cardinality of the set

{(X, s) : for a classification s student X speaks 3 easy languages}

to get the identity X


B(s) = 3n · 3n−3 = n3n−2 .
s∈S

We claim that there exists a classification s ∈ S such that A(s) − B(s) > 2n 9 . If we assume
on the contrary that A(s) − B(s) < 2n 9 for all classifications s ∈ S, then summing over all
n
3 of them would give
X X 2n
n3n−1 − n3n−2 = A(s) − B(s) < 3n · ,
s∈S s∈S
9

i.e. 2n3n−2 < 2n3n−2 , which is a contradiction.


Let us consider any classification s ∈ S of languages satisfying A(s) − B(s) > 2n
9 . We can
first choose all A(s) easy languages. Then we find all B(s) students who can speak 3 of
these languages, and for each of them we remove one of the languages the student speaks.
This leaves us with a choice of at least 2n
9 languages.
Remark: Classification of languages simply as easy or hard would not give the desired
bound. It would lead to a choice of at least n8 languages only. Taking more than three
language classes would not be a better strategy either.

13
Solution (by Rudi Mrazović, coordinator)
In this proof we will use probabilistic method. Let p ∈ [0, 1]. For each language, suppose
we choose it with probability p and we make these decisions independently. 1 Let A be
the number of chosen languages (i.e. the number of 1s in ω) and B the number of students
whose all three languages are among chosen ones. Lets calculate the expectations 2 of
these random variables.
2 3
X X
EA = E 4 1we have chosen the language l 5 = E [1we have chosen the language l ]
X
language l language l

= P (we have chosen the language l) = np.


language l

" #
X X
EB = E 1student’s s languages are all chosen = E [1student’s s languages are all chosen ]
X student s student s
= P (student’s s languages are all chosen) = 3np3 .
student s

We will use the following obvious (and easily proved inequality). For arbitrary random
variable X we have
P(X > EX) > 0.
For X = A − B we get
P(A − B > np − 3np3 ) > 0.
In this way we have proved that there is a choosing of languages such that A − B >
np − 3np3 . For this choosing for each student that speaks three chosen languages remove
one of them. In the end we are left with at least A − B (and thus np − 3np3 ) languages
that do the job. Taking p = 31 we get what we need, i.e. we can choose at least ⌈ 2n
9 ⌉ such
that no student speaks more than two of them.

Alternative approach (based on the solution by team Poland)


We choose ⌈ n3 ⌉ languages uniformly and randomly. Similarly to the previous probabilistic
solution we show that with positive probability the number of students that speak three
of the chosen languages is less or equal to ⌊ n9 ⌋. Again, use the same trick of removing
some of the languages to obtain at least ⌈ 2n
9 ⌉ of them such that no student speaks three
of them.

1
Formally, we consider probability space ({0, 1}n , P({0, 1}n ), P) where

P(ω) = pk(ω) (1 − p)n−k(ω) , for each ω ∈ {0, 1}n

where k(ω) is the number of 1s in ω. Pn


2
The expectation of integer random variable X is the number EX = k=0
kP(X = k).

14
GEOMETRY

I 3 (Nik Stopar, Slovenia)


In a plane the circles K1 and K2 with centers I1 and I2 , respectively, intersect in two points
A and B. Assume that ^I1 AI2 is obtuse. The tangent to K1 in A intersects K2 again in
C and the tangent to K2 in A intersects K1 again in D. Let K3 be the circumcircle of
the triangle BCD. Let E be the midpoint of that arc CD of K3 that contains B. The
lines AC and AD intersect K3 again in K and L, respectively. Prove that the line AE is
perpendicular to KL.

First solution (by Tomislav Pejković, coordinator)

K1

A K2

E
B C
L

K3

Since AD is tangent to K2 , it follows that ^ACB = ^DAB. Similarly, ^ADB = ^BAC.


From this we have ^DBC = (^ADB+^DAB)+(^BAC +^ACB) = 2(^DAB+^BAC),
hence
^DBC = 2^DAC.

ø we denote the angle ^XZY where Z is a point on the circle K3 such that X, Y, Z
By XY
are ordered counterclockwise.
Since E is the midpoint of the arc CD and the points C, E, D, K are concyclic we have
1ø 1 ø = 1 (180◦ − ^CBD) = 90◦ − ^DAC.
^AKE = CD = (180◦ − DC)
2 2 2

This means that KE and AL are perpendicular.


Analogously, LE and AK are perpendicular and E is the orthocenter of the triangle AKL.
Hence AE and KL are perpendicular.

15
Remark: We use the notation CD ø and DC ø because it provides a convenient way of writ-
ing the solution in all cases regardless of the mutual position of the points A, D, L, C, K.

Second solution
Since AD is tangent to K2 , it follows that ^ACB = ^DAB. Similarly, ^ADB = ^BAC.
From this we have ^DBC = (^ADB+^DAB)+(^BAC +^ACB) = 2(^DAB+^BAC),
hence
^DEC = ^DBC = 2^DAC.

Since |ED| = |EC|, the point E is the circumcenter of ACD. Therefore |EC| = |EA| =
|ED|.
Because the points C, B, D, K are concyclic we have ^KDB = ^ACB. From this and
the first arguments of this solution we have that |DK| = |AK|. Since we proved |EA| =
|ED|, we conclude that the line KE is the bisector of the segment AD and therefore
perpendicular to it.
Analogously, LE and AK are perpendicular and E is the orthocenter of the triangle AKL.
Hence AE and KL are perpendicular.

Remark: The identity ^KDB = ^ACB holds in all cases regardless of the mutual
position of the points A, D, L, C, K.

Third solution (by Karol Kaszuba, Poland)


Let us apply inversion with respect to a circle with the center A and radius r. Denote the
image of point X with X ′ . From the assumptions of the problem and well known facts
about the inversion directly follows that AD′ B ′ C ′ is a parallelogram.
From the definition of the image of the point by inversion we have

r2 r2
|E ′ C ′ | = |EC| , |E ′ D′ | = |ED| .
|AE||AC| |AE||AD|

ø we obtain
Dividing these two identities and using that E is the midpoint of the arc CD

|E ′ C ′ | |EC| |AD| |AD| |AC ′ | |D′ B ′ |


= · = = = .
|E ′ D′ | |ED| |AC| |AC| |AD′ | |C ′ B ′ |

We consider all points X with the property

|XC ′ | |D′ B ′ |
= .
|XD′ | |C ′ B ′ |

These points form the Apollonius circle and hence there are exactly two such points
intersecting the image of K3 , each on different arc C ù ′ D ′ . One of these is the point E ′ .

Since the point symmetric to B ′ with respect to the line C ′ D′ also lies on the same arc
ù
C ′ D ′ as E ′ and lies on the mentioned Apollonius circle we conclude that E ′ is symmetric

to B ′ .

16
This implies |E ′ C ′ | = |B ′ D′ | = |C ′ A′ | (first equality holds because of the symmetry
the second because AD′ B ′ C ′ is a parallelogram) and similarly |E ′ D′ | = |D′ A′ |. Hence
AC ′ E ′ D′ is a deltoid so AE ′ ⊥ C ′ D′ . This means that AE ′ contains the orthocenter of
the triangle AC ′ D′ . It is well know that the orthocenter and circumcenter are isogonal
conjugates (lying on the lines which are symmetric with respect to the angle bisector). On
the other hand triangles AC ′ D′ and AL′ K ′ are inversely similar, so the circumcenter of
AK ′ L′ lies on the same line through A as the orthocenter of AC ′ D′ .
All of this shows that AE ′ pass through the circumcenter of AK ′ L′ , so AE is perpendicular
to KL.

17
T 5 (Michal Szabados, Slovakia)
Let ABCDE be a convex pentagon with all five sides equal in length. The diagonals AD
and EC meet in S with ^ASE = 60◦ . Prove that ABCDE has a pair of parallel sides.

First solution
Let F be such that DEF is an equilateral triangle and the points B and F lay in the
opposite half-planes determined by DE. Denote ^DAE = α. Then ^ADE = α.

A F

B D

Since ^ESD = 120◦ , we have ^DEC = 60◦ − α. Then ^SCD = ^ECD and

^ADC = ^SDC = 180◦ − ^SCD − ^DSC = 60◦ + α.

Obviously ^ADF = 60◦ + α and because |F D| = |CD| we conclude that ADF ≃ ADC.
Similarly, ^AEC = ^F EC = 120◦ − α, so ACE ∼= F CE.
From these two pairs of equal triangles we conclude |AF | = |AC| = |F C|, so both triangles
DEF and ACF are equilateral.
If E lies on the line AF or D lies on the line F C then |AC| = 2|ED| = |AB| + |BC| and
B lies on AC, which is not possible. Therefore exactly one of the points D and E lays
inside the triangle ACF . Without loss of generality, let it be the point E.
The triangles AEF and ABC have their corresponding sides equal therefore AEF ∼
= ABC

and this yields 60 = ^F AC = ^EAB, so |EB| = |AB|. Hence BCDE is a rhombus,
i. e., ED ∥ BC.

18
Second solution (by Matija Bašić, coordinator)
Let α be as in the first solution. In the same way we prove ^AEC = 120◦ − α and
^CED = 60◦ − α. Let F be the symmetric image of A with respect to CE. We get
^DEF = 120◦ − α − (60◦ − α) = 60◦ . Since |DE| = |AE| = |EF |, triangle DEF is
equilateral.
Because |AB| = |BC| = |DF | = |CD| the triangles ABC and CDF are congruent.
If the point D is outside the triangle ACF then this implies that B and D are symmetric
with respect to CE, so |BE| = |DE|. Hence BCDE is a rhombus and DE∥BC.
If the point D is inside the triangle ACF then the point E is outside that triangle and we
see in the similar way that F and C are symmetric with respect to AD and also B and
E are symmetric with respect to AD. Hence |BD| = |DE| and ABDE is a rhombus, so
DE ∥ AB.

Third solution (by Gerd Baron, Austrian leader)


Define the point B ′ such that B ′ CDE is rhombus.
If the pentagon AB ′ CDE is convex, denote ^EAD = ^EDA = α. Similarly to other
solution we have ^AEB ′ = ^AED−^B ′ EC −^CED = 180◦ −2α−(60◦ −α)−(60◦ −α) =
60◦ .
Since |AE| = |B ′ E|, we conclude that AB ′ E is equilateral.
Points B and B ′ are on the same side of the line AC, so we conclude that B = B ′ , so
DE ∥ AB.
If the pentagon AB ′ CDE is not convex, denote the intersection of B ′ E and AD by F and
^DEC = ^DCE = β. Similarly to other solutions we have AEB ′ = 180◦ − ^EAF −
^EF A = 180◦ − ^EDA − (^F EC + ^F SE) = 180◦ − (60◦ − β) − (β + 60◦ ) = 60◦ .
Since |AE| = |B ′ E|, we conclude that AB ′ E is equilateral.
Let B ′′ be the symmetric image of B ′ with respect to AC. Then AB ′′ CB ′ is a rhombus
and B = B ′′ , so we conclude B ′ C ∥ AB ′′ and hence DE ∥ AB.

19
Fourth solution (by team Slovakia)
Denote ^DEC = ^DCE = α and suppose that all five sides of the pentagon have length
a. As in the previous solutions we see that ^SEA = 60◦ + α, ^SDC = 120◦ − α. Applying
the law of sines to the triangles ASE and CSD implies

a sin(60◦ + α) a sin(120◦ − α)
|SA| = = = |SC|.
sin 60◦ sin 60◦

The triangle ASC is isosceles and ^ACS = ^CAS = 30◦ and we have |AC| = 3 · |AS|.
The law of cosines applied to the triangle ABC gives

a2 = a2 + 3|AS|2 − 2 3a · |AS| · cos(^ACB)

3|AS|
from where we get cos(^ACB) = √ = sin(60◦ + α) = cos(30◦ − α).
2 3a

Since 0 < ^ACB < 90 we have two possibilities.
The first possibility is that ^ACB = 30◦ − α, so ^BCE = α = ^CED and hence
BC ∥ ED.
The second possibility is that ^ACB = α − 30◦ , so ^BAD = 60◦ − α = ^ADE and hence
AB ∥ ED.

Fifth solution (by team Germany)


We construct a point Q on the line SE such that ASQ is the equilateral triangle. As in
the previous solutions it is easily seen that ^EAQ = ^DCS and since ^AQS = 60◦ =
^CSD and |AE| = |DC| we have that the triangle AEQ and SCD are congruent, so
|AS| = |AQ| = |CS|.
This shows that the quadrilateral ABCS is a deltoid, so ^ASB = ^BSC = 60◦ and the
point S is the Fermat’s point of the triangle BDE.
Let point X be such that BEX is equilateral and that S and X lie on different sides of
the line EB. It is well know that the property of the Fermat’s point S is that X, S and
D are collinear. Also, since |BX| = |EX|, X lies on the bisector of the segment BE.
We have two cases. In the first case, the segment bisector of BE coincides with the line
DS, so ABDE is a rhombus and AB ∥ ED.
In the second case, the segment bisector of BE intersects the line AS at exactly one point.
From the remarks we have given, that point must be X and also A, so A = X. Then the
triangle BEA is equilateral, so ABCD is a rhombus and BC ∥ ED.

20
T 6, (Michal Rolı́nek, Josef Tkadlec, Czech Republic)
Let ABC be an acute triangle. Denote by B0 and C0 the feet of the altitudes from vertices
B and C, respectively. Let X be a point inside the triangle ABC such that the line BX
is tangent to the circumcircle of the triangle AXC0 and the line CX is tangent to the
circumcircle of the triangle AXB0 . Show that the line AX is perpendicular to BC.

First solution
C

A0

A C0 B

Let A0 be the foot of the altitude from A. The quadrilateral ACA0 C0 is cyclic because
^AA0 C = ^AC0 C = 90◦ . By the power of the point B with respect to that circle we have
|BA||BC0 | = |BA0 ||BC|.
The power of the point B with respect to the circumcircle of AXC0 gives |BX|2 =
|BA||BC0 |.
Similarly, we have |CX|2 = |CA||CB0 | = |CA0 ||BC|.
Summing these two results we have

|BX|2 + |CX|2 = |BA0 ||BC| + |CA0 ||BC| = |BC|2 .

The converse of Pythagora’s theorem implies ^BXC = 90◦ .


Moreover, from |BX|2 = |BA0 ||BC|, i.e. |BX| : |BC| = |BA0 | : |BX| we have that the
triangles BXA0 and BCX are similar. It follows that

^BA0 X = ^BXC = 90◦ = ^BA0 A,

so A0 , X and A are collinear, so AX and BC are perpendicular.

21
Second solution (by Tomislav Pejković, coordinator)
Let H be the orthocenter of the triangle ABC. Because BX is tangent to the circumcircle
of AXC0 we have ^BXC0 = ^BAX (the tangent chord angle theorem). Hence the
triangles BAX and BXC0 are similar.
Analogously, the triangle CAX and CXB0 are similar.

B0
H

A C0 B

Observe that the quadrilateral AC0 HB0 is cyclic because ^AC0 H = ^AB0 H = 90◦ . The
power of the point B with respect to circumcircles of AC0 X and AC0 HB0 gives

|BB0 ||BH| = |BA||BC0 | = |BX|2 .

From this we conclude that the triangles BXH and BB0 X are similar and ^BXH =
^XB0 H = ^XB0 C − 90◦ . Since CAX and CXB0 are similar we have ^XB0 C = ^AXC.
We obtained ^BXH = ^AXC − 90◦ and analogously ^CXH = ^AXB − 90◦ .
Summing up these results we get

^BXC = ^BXH + ^CXH = ^AXC + ^AXB − 180◦ = 180◦ − ^BXC

and so ^BXC = 90◦ .


Hence, the points B, C0 , X, B0 , C all lie on the same circle and we have

^AXB = ^BC0 X = 180◦ − ^XB0 B = 180◦ − ^BXH

which means that A, X and H are collinear. So AX and BC are perpendicular.

22
Third solution (by teams Croatia, Hungary and Poland)
By power of the point we have

|CX|2 = |CA||CB0 |, |BX|2 = |BA||BC0 |,


È
|CA||CB0 | and
È
so the point X is the intersection of the circle with center C and radius
the circle with center B and radius |BA||BC0 |. There are two such points, but only one
is in the interior of the triangle ABC, so we conclude that the point X is unique.
On the other hand we will prove that the point Y which is the intersection of the circle
with diameter BC and the altitude from the point A has the same properties as the point
X, from which we conclude that X and Y are the same point and hence X lies on the line
perpendicular to BC.
Since ^BB0 C = 90◦ , the quadrilateral BCB0 Y is cyclic and hence ^CBB0 = ^CY B0 .
On the other hand ^CAY = 90◦ − ^ACB = ^CBB0 = ^CY B0 , so by the tangent-chord
theorem the line CY is tangent to the circumcircle of the triangle AY B0 . Analogously,
the line BY is tangent to the circumcircle of the triangle AY C0 . Hence, X = Y .

23
NUMBER THEORY

I 4 (Kamil Duszenko, Poland)


Let k and m, with k > m, be positive integers such that the number km(k 2 − m2 ) is
divisible by k 3 − m3 . Prove that (k − m)3 > 3km.

First solution
Let d be the greatest common divisor of k and m. Write k = da, m = db. Then a and b
are relatively prime. Moreover, a > b.
€ Š € Š
The number km k 2 − m2 = d4 ab a2 − b2 = d4 ab(a − b)(a + b) is divisible by k 3 − m3 =
d3 (a3 − b3 ) = d3 (a − b)(a2 + ab + b2 ), so we have

a2 + ab + b2 | dab(a + b).

However, since the numbers a and b are relatively prime, the number a2 +ab+b2 is relatively
prime to a, b, and a+b. (For example, in case of a+b we note that a2 +ab+b2 = (a+b)a+b2 ,
and a + b is relatively prime to b and hence to b2 .) Thus

a2 + ab + b2 | d.

This, in particular, yields d > a2 + ab + b2 = (a − b)2 + 3ab > 3ab. Therefore

(k − m)3 = d3 (a − b)3 > d3 = d2 · d > d2 · 3ab = 3km.

Second solution (by Wojciech Nadara, Poland)


Since k 2 + km + m2 divides km(k + m) and (k 2 + km + m2 )(k + m) we have that it divides
their difference (k + m)(k 2 + m2 ) = k 3 + k 2 m + km2 + m3 . From this we conclude that
k 2 + km + m2 also divides k 3 + k 2 m + km2 + m3 − k(k 2 + km + m2 ) = m3 .
Analogously, we conclude that k 2 + km + m2 divides k 3 .
Multiplying the second power of k 2 + km + m2 | k 3 with k 2 + km + m2 | m3 we conclude
(k 2 + km + m2 )3 | k 6 m3 . Hence k 2 + km + m2 also divides k 2 m and analogously km2 .
Adding all the results we have obtained we conclude that k 2 + km + m2 divides k 3 −
3k 2 m + 3km2 − m3 = (k − m)3 .
Because k > m, i.e. k − m > 0, we have k 2 + km + m2 6 (k − m)3 .
Since (k − m)2 is equivalent to k 2 + km + m2 > 3km, we obtain 3km < (k − m)3 .

24
T 7 (Mariusz Skaba, Poland)
Let A and B be disjoint nonempty sets with A ∪ B = {1, 2, 3, . . . , 10}. Show that there
exist elements a ∈ A and b ∈ B such that the number a3 + ab2 + b3 is divisible by 11.

Solution
For each n = 0, 1, 2, . . . the numbers 2n , 2n+1 , 2n+2 , . . . , 2n+9 have different remainders
when divided by 11.
Suppose that for every b ∈ B there is no a ∈ A such that a ≡ 2b (mod 11).
From the above statement there exists n ∈ {0, 1, . . . , 9} such that b ≡ 2n (mod 11) and
we conclude that elements of B give ten different remainders when divided by 11, so B
has 10 elements. That is a contradiction with the fact that A is nonempty.
Therefore there exist b ∈ B and a ∈ A such that a ≡ 2b (mod 11), and we have

a3 + ab2 + b3 ≡ 8b3 + 2b3 + b3 = 11b3 ≡ 0 (mod 11).

25
T 8 (Aivaras Novikas, Lithuania)
We call a positive integer n amazing if there exist positive integers a, b, c such that the
equality
n = (b, c)(a, bc) + (c, a)(b, ca) + (a, b)(c, ab)
holds. Prove that there exist 2011 consecutive positive integers which are amazing.
(By (m, n) we denote the greatest common divisor of positive integers m and n.)

Solution
We may choose such positive integers x1 , x2 , . . . , x2011 that the numbers

y1 = x21 (x1 + 2), y2 = x22 (x2 + 2), . . . , y2011 = x22011 (x2011 + 2)

are pairwise coprime. For example, we may choose x1 = 1 and xi = y1 y2 . . . yi−1 − 1 for
every consecutive i. This choice guarantees that for every integer 2 6 i 6 2011 both xi
and xi + 2 (hence, yi as well) are coprime with any of the numbers y1 , y2 , . . . , yi−1 .
If a positive integer n is divisible by any of the numbers y1 , y2 , . . . , y2011 then it is amazing.
Indeed, if, say, n = yi m = x2i (xi + 2)m for some positive integers m and 1 6 i 6 2011 then
n = (b, c)(a, bc) + (c, a)(b, ca) + (a, b)(c, ab) for a = mx2i , b = mxi , c = xi .
Since the numbers y1 , y2 , . . . , y2011 are pairwise coprime, the Chinese remainder theorem
implies that there exists a positive integer k satisfying the equalities

k ≡ −i (mod yi ), i = 1, 2, . . . , 2011.

This means that k +i is divisible by yi for any 1 6 i 6 2011. Thus, the consecutive positive
integers k + 1, k + 2, . . . , k + 2011 are all amazing, and the statement of the problem is
proved.

26
Problems and Solutions MEMO 2012

Individual Competition

I1. Find all functions f : R+ → R+ such that equality


f (x + f (y)) = yf (xy + 1)
holds for all x, y ∈ R+ .
(R+ denotes the set of all positive real numbers.)

Solution. Assume that there exists a real number t such that t > 1 and f (t) > 1. If we
f (t) − 1
put x = , y = t into the given equality, we get:
t−1
f (t) − 1 f (t) − 1
f( + f (t)) = tf ( · t + 1),
t−1 t−1
which can be written as
tf (t) − 1 tf (t) − 1
f( ) = tf ( ).
t−1 t−1
From the previous equality, we conclude that t = 1, which contradicts our assumption that t > 1.
1 − f (t)
Therefore, we conclude that such t doesn't exist. In the same way, by putting x = , y = t,
1−t
we can prove that there doesn't exist a real number t < 1 such that f (t) < 1.

y−1
Let y > 1 be an arbitrary real number and let x = . By plugging them into the given
y
equality, we get:
y−1
f( + f (y)) = yf (y).
y
If f (y) > y1 then f ( y−1
y + f (y)) > 1 and thus y + f (y) 6 1. However, the last inequality
y−1

implies that f (y) 6 y , which is a contradiction. In the same way, if we assume that f (y) < y1 ,
1

we also get to a contradiction. Therefore, f (y) = y1 for all y > 1.

Finally, let 0 < a 6 1. Let us take an arbitrary y such that y > 1


a > 1 and let us denote
x = a − y1 . By plugging this into the given equality, we get:
1 1 1 1 1
f (a) = f (x + ) = f (x + f (y)) = yf (xy + 1) = y · = xy+1 = 1 = .
y xy + 1 y
x+ y
a

1
Therefore, the only solution to the given functional equation is f (x) = .
x

1
I2. Let N be a positive integer. A set S ⊂ {1, 2, . . . , N } is called allowed if it does not contain
three distinct elements a, b, c such that a divides b and b divides c. Determine the largest possible
number of elements in an allowed set S .

Solution. The answer is d 34 N e.


On one hand, we can reach this optimum by choosing S ∗ = {b 14 N c + 1, b 41 N c + 2, . . . , N }. We
call a triplet (a, b, c) forbidden if a divides b and b divides c. For any forbidden triplet we would
have 4a 6 c (as if x|y and x 6= y then 2x 6 y ), hence there are no forbidden triplets in S ∗ which
means that it is allowed.
On the other hand, there are dN/2e odd numbers in {1, 2, . . . , N }. For such an odd number q ,
consider the set Hq = {q, 2q, 4q, . . . 2iq q}, where iq is the largest index i such that 2i q 6 N . We
partitioned {1, . . . , N } to these Hq sets. Any three elements from a single set Hq form a forbidden
triplet, hence for any feasible set S we have |Hq ∩ S| 6 2 (for all q odd numbers). If q > N/2,
then |Hq | = 1. So for all 1 6 q 6 N/2 we can choose maximum 2 elements of Hq , and for all
N/2 < q 6 N we can choose only 1 element of Hq . In both cases the number is equal to |Hq ∩S ∗ |.
In summary we have |Hq ∩ S| 6 |Hq ∩ S ∗ | for all odd q which implies that |S| 6 |S ∗ | = d3N/4e.

I3. In a given trapezium ABCD with AB parallel to CD and AB > CD , the line BD bisects
the angle ^ADC . The line through C parallel to AD meets the segments BD and AB in E and
F , respectively. Let O be the circumcentre of the triangle BEF . Suppose that ^ACO = 60◦ .
Prove the equality
|CF | = |AF | + |F O|.

Solution.

D C

O
E

A F X B

Let |AB| = a and |CD| = b. Since AB k CD we have


^DBA = ^BDC = ^ADB

2
and thus the triangle ABD is isosceles with |AB| = |DA| = a.
Since quadrilateral AF CD is parallelogram, we have

|AF | = |CD| = b, |F C| = |DA| = a and |F B| = a − b.

Since AD k CF , we have
^F EB = ^ADB = ^DBA
and thus the triangle F BE is isosceles with |F B| = |EF | = a − b.
Let X and Y be the midpoints of segments F B and EF . Due to symmetry, |OX| = |OY |.
From
a−b a+b
|AX| = |AF | + |F X| = b + =
2 2
and
a−b a+b
|CY | = |CF | − |F Y | = a − =
2 2
we can conclude that right-angled triangles AXO and CY O are congruent and |AO| = |CO|.
Since ^ACO = 60◦ , the triangle AOC is equilateral and ^OAC = 60◦ .
Denoting ^XAO = ^Y CO = ϕ we get ^F AC = ^XAO + ^OAC = ϕ + 60◦ and ^ACF =
^ACO − ^Y CO = 60◦ − ϕ, so ^CF A = 60◦ , ^BF E = 120◦ and ^XF O = 60◦ .
Since the angles of the triangle F XO are 30◦ , 60◦ and 90◦ , from |F O| = 2|F X| = a − b, we
nally get |AF | + |F O| = b + (a − b) = a = |CF |.

I4. The sequence {an }n>0 is dened by a0 = 2, a1 = 4 and


an an−1
an+1 = + an + an−1 for all n > 0.
2
Determine all prime numbers p for which there exist m > 0 such that p|am − 1.

Solution. If an−1 and an are even the number an an−1 /2 is even and therefore an+1 , too.
Hence an is even for all n > 0 and p = 2 is not a solution. Since 3|a1 − 1, p = 3 is a solution.
Assume from now on p > 5. The equation is equivalent to

(an + 2)(an−1 + 2)
an+1 + 2 = .
2
Let bn = (an + 2)/2, it follows that bn+1 = bn bn−1 with b1 = 2 and b2 = 3. Note that p - bn for all
n ∈ N. Hence the sequence modulo p can be constructed backwards and extended for negative
numbers n by bn ≡ bbn+1
n+2
modulo p. Note that two consecutive elements bk , bk+1 determine the
entire sequence. As there are p2 ordered pairs of residues modulo p it follows by the pigeon hole
principle that there exists 0 6 k < l 6 p2 such that bk ≡ bl and bk+1 ≡ bl+1 . The sequence
modulo p is therefore periodic with length l − k and we have bl−k−1 ≡ b−1 ≡ p+3 2 . It follows that
al−k−1 ≡ 1 modulo p. Hence all prime numbers greater than 2 are solutions.

3
4
Team Competition

T1. Find all triplets (x, y, z) of real numbers such that

2x3 + 1 = 3zx,
3
2y + 1 = 3xy,
3
2z + 1 = 3yz.

Solution. Note that no variable can be zero. Assume that one variable is positive. WLOG
x > 0. It follows that z > 0 and y > 0. Summing up all three equations and using AM-GM yields
x3 + y 3 + 1 y 3 + z 3 + 1 z 3 + x3 + 1
2(x3 +y 3 +z 3 )+3 = 3(xy+yz+zx) 6 3( + + ) = 2(x3 +y 3 +z 3 )+3.
3 3 3
Therefore we must have equality and it follows x = y = z = 1 which is a solution.
Assume from now on that all variables are negative. Put u = −x, v = −y and w = −z . Then
u, v, w must be positive and the equations can then be written as

1 = 2u3 + 3uw,
1 = 2v 3 + 3vu,
1 = 2w3 + 3wv.

WLOG let u > v, w. We have

1 = 2u3 + 3uw > 2w3 + 3wv = 1.

Hence we must have equality and therefore u = v = w. It follows that

0 = 2u3 + 3u2 − 1 = (u + 1)2 (2u − 1).

Hence v = w = u = 1/2 which is also a solution. The system has therefore the solutions
(x, y, z) = (1, 1, 1) and (x, y, z) = (−1/2, −1/2, −1/2).

T2. Let a, b and c be positive real numbers with abc = 1. Prove that
p p p
9 + 16a2 + 9 + 16b2 + 9 + 16c2 > 3 + 4(a + b + c).

5
First Solution. Let us start by showing
() If three positive reals x, y , and z sum up to less than 3, then

9 − x2 9 − y 2 9 − z 2
· · > 512.
x y z

Proof of (). Using the inequality between the arithmetic mean and the geometric mean
of four positive reals we obtain

3 + x = 1 + 1 + 1 + x > 4 4 x.
√ √
For similar reasons, one has 3 + y > 4 4 y and 3 + z > 4 4 z . Multiplying the three foregoing
estimates we get

(3 + x)(3 + y)(3 + z) > 64 4 xyz. (1)
Using the A.M.G.M. inequality with just three variables, we get

3 > x + y + z > 3 3 xyz,

which tells us
1 > xyz,
as well as
xy + yz + zx > 3(xyz)2/3 .
Combining these estimates we infer

(3 − x)(3 − y)(3 − z) = 9(3 − x − y − z) + 3(xy + yz + zx) − xyz


> 9(xyz)2/3 − xyz > 8(xyz)2/3 .

If we nally multiply this by (1), we arrive at

(9 − x2 )(9 − y 2 )(9 − z 2 ) > 512xyz

and () follows.


Now to attack the problem itself, we dene three positive reals x, y , and z by
p
x = 9 + 16a2 − 4a,
p
y = 9 + 16b2 − 4b,
p
and z = 9 + 16c2 − 4c.

Then
9 − x2 9 − y 2 9 − z 2
· · = 512abc = 512,
x y z
which means that the conclusion of () is violated. This is only possible if its assumption does
not hold, i.e. if x + y + z > 3. Hence
p p p
9 + 16a2 + 9 + 16b2 + 9 + 16c2 > 3 + 4(a + b + c)

and the problem is solved.

6
Second Solution. The function x 7→ ex where e is the Euler Constant is a bijection between
R and R>0 , hence we can nd u, v, w ∈ R such that a = eu , b = ev and c = ew and the constraint
abc = 1 becomes
eu ev ew = 1 ⇔ eu+v+w = 1 ⇔ u + v + w = 0.
q
Let f (x) = e2x + 169
− ex the inequality can then be written as

3
f (u) + f (v) + f (w) > ∀u, v, w with u + v + w = 0
4
With some calculus we compute the rst two derivatives of f
e2x
f 0 (x) = q − ex (2)
9
e2x + 16
9
2e2x (e2x + 16 ) − e
4x
f 00 (x) = 9 2 3 − ex (3)
(e2x + 16 )
e2x (e2x + 98 )
= 9 32
− ex . (4)
(e2x + 16 )

We determine the convex intervals of f :

f 00 (x) > 0 (5)


9 9 3
⇔ e2x (e2x + ) > ex (e2x + ) 2 (6)
8 16
9 9
⇔ e4x (e2x + )2 > e2x (e2x + )3 (7)
8 16
 3
9 4x 81 2x 9
⇔ e + e − > 0 (8)
16 256 16
9 3 9 3
As the function g(x) = 16
9 4x 81 2x
is monotone increasing, limx→−∞ g(x) = − 16
 
e + 256 e − 16
and limx→∞ g(x) = ∞ there is exactly one value m ∈ R with g(m) = 0. Furthermore it follows
that f is convex on (m, ∞) and concave on (−∞, m).

Lemma 1. For any three real numbers x1 , x2 , x3 with x1 + x2 + x3 = 0 there exists real numbers
u, v with u + 2v = 0 such that

f (x1 ) + f (x2 ) + f (x3 ) > f (u) + 2f (v).

Proof. WLOG we can assume x1 6 x2 6 x3 . If x2 < m we have f (x1 ) + f (x2 ) > f (x1 + x2 −
m) + f (m) as f is concave on (−∞, m). Hence we can assume x2 > m. Then we have by Jensen's
inequality f (x2 ) + f (x3 ) > 2f ( x2 +x
2
3
). Hence we can set u = x1 and v = x2 +x
2
3
.
It remains to prove that
r r
9 9 3
2 a +2 + b2 + > 2a + b + for all a, b with a2 b = 1. (9)
16 16 4
By squaring and rearranging the inequality becomes
r
9 9 3 9
4 (a2 + )(b2 + ) > 4ab + 3a + b − .
16 16 2 4

7
Dividing by 4, squaring and rearranging yields
27 2 9 27 27 3 3
b + ab + a + b > a2 b + ab2 .
64 16 32 64 2 4
After multiplying by a4 and using a2 b = 1 we arrive at
27 5 3 4 9 27 3 27
a − a + a3 + a2 − a + > 0 (10)
32 2 16 64 4 64
27 3 3 27
⇔ (a − 1)2 ( a3 + a2 + a + ) > 0 (11)
32 16 32 64
which is obviously true.

T3. Let n be a positive integer. Consider words of length n composed of letters from the set
{M, E, O}. Let a be the number of such words containing an even number (possibly 0) of blocks
M E and an even number (possibly 0) of blocks M O. Similarly, let b be the number of such words
containing an odd number of blocks M E and an odd number of blocks M O. Prove that a > b.

First Solution. Let A be the set of words of length n with even number of ME and
even number of MO and B be the set of words of length n with odd number of ME and odd
number of MO. We construct an injective map f from B to A. Choose the rst place in the
tuple, where either is the block 01 or the block 02 (this place must exist since the number of
01-blocks is odd and therefore >0) and interchange the blocks. One of the number of blocks 01
and the number of blocks 02 will increase by 1 and one will decrease by 1. Hence both numbers
change its parity from odd to even and the image of the map is therefore in A. Furthermore when
the operation above is applied two times on a sequence the we get the original sequence. Hence
we have f (f (b)) = b for all b ∈ B which implies that the operation is injective and therefore
|B| 6 |A|. To see that |B| < |A| note that all sequences which do not contain an 0 are in A but
can not be the image of an element of B under f . As n > 0 there is at least one such sequence.

Second Solution. We call the blocks ME and the blocks MO important and we say that two
words are similar if the positions of the important blocks are the same. This similarity divides
the set of all sequences into equivalence classes. Let A and B be dened as in the rst solution.
Note that the elements of A and the elements of B contain an even number of important blocks.
Therefore an equivalence class with an odd number of important blocks does not contain any
elements of A or B P. Consider an equivalence class with k > 2 even number of important
P blocks.
There are neven = m even m k
elements of the equivalence class in A and nodd = m odd m k


elements of the equivalence class in B . We have


neven − nodd = (1 − 1)k = 0.
which proves that the equivalence class contains the same number of elements from A and B .
For k = 0 all elements belong to A and this set is not empty which concludes our proof.

8
Third Solution. Let an be the number of words of length n with even number of ME and
even number of MO, bn be the number of words of length n with odd number of ME and odd
number of MO and xn be the common number of words such that

1) start with E, odd number of ME blocks, even number of MO blocks

2) start with O, odd number of ME blocks, even number of MO blocks

3) start with E, even number of ME blocks, odd number of MO blocks

4) start with O, even number of ME blocks, odd number of MO blocks.

Bijections 1) ↔ 4) and 2) ↔ 3) : replace all E by O and all O by E


Bijections 1) ↔ 2) and 3) ↔ 4) : switch rst number E ↔ O

To compute an+1 we consider the three possible start letters of the word. If it starts with E or O
the number of words is an . If it starts with M we distinguish again the three cases for the second
letter. If the word starts with ME or MO we get xn words. When the sequence starts with MM
we distinguish again three cases. . . . If we continue this argument we arrive at
n
X
an+1 = 2an + 2 xk + 1 (12)
k=1

(the plus 1 comes from the sequence M . . . M ).


Similarly
n
X
bn+1 = 2bn + 2 yk (13)
k=1

Taking dierences:
an+1 − bn+1 = 2(an − bn ).
Since a1 = 3 and b1 = 0 an induction gives the claim

an > bn .

(Actually an = bn + 2n+1 − 1)

T4. Let p > 2 be a prime number. For any permutation π = (π(1), π(2), . . . , π(p)) of the set
S = {1, 2, . . . , p}, let f (π) denote the number of multiples of p among the following p numbers:

π(1), π(1) + π(2), . . . , π(1) + π(2) + · · · + π(p)

What is the average value of f (π) taken over all permutations of S ?

9
Solution. We call two permutations π 0 and π 00 equivalent if there is an integer d such
that:
π 0 (i) + d ≡ π 00 (i) (mod p)
for all i = 1, 2, . . . , p. (It's trivial to check that it is an equivalence relation). This equivalence
partitions the set P of all permutations into equivalence classes. Each class consists of p permu-
tations, that can be labeled π0 , . . . , πd , . . . , πp−1 such that π0 (i) + d and πd (i) are congruent for
all i.
Let sk denote the sum π0 (1) + π0 (2) + · · · + π0 (k) mod p. Then πd (1) + πd (2) + · · · + πd (k) ≡
sk + kd (mod p). So for a xed k if we consider the sums πd (1) + πd (2) + · · · + πd (k) for all d-s,
we get these:
sk , sk + k, sk + 2k, . . . , sk + (p − 1)k
If k < p then among these there is exactly one 0. If k = p then all are 0s (sp is the sum of all
remainder classes mod p, it is a well-known fact that it's zero if p > 2).
So for any equivalence class, consisting of p pieces of permutations, there 2p − 1 zeros among the
sums assigned to them. That means an average of 2p−1 p .

T5. Let K be the midpoint of the side AB of a given triangle ABC. Let L and M be
points on the sides AC and BC, respectively, such that ^CLK = ^KM C. Prove that perpen-
diculars to the sides AB, AC and BC passing through K, L and M , respectively, are concurrent.

Solution.

10
Let S be the intersection of perpendiculars through K and L, and T the intersection of
perpendiculars through K and M. Observe that AKSL and BM T M are cyclic (they have two
right angles). Therefore ^SAK = ^SLK = ^CLK − π2 (or π2 − ^CKL if ^CKL is acute).
Analogously, ^T BK = ^T M K = ^CM K − π2 (or π2 − ^CM K if ^CM K is acute). Therefore

^SAK = ^T BK.

But K is the midpoint of AB, hence S and T have to coincide. Thus the perpendiculars are
concurrent.

T6. Let ABCD be a convex quadrilateral with no pair of parallel sides, such that ^ABC =
^CDA. Assume that the intersections of the pairs of neighbouring angle bisectors of ABCD
form a convex quadrilateral EF GH . Let K be the intersection of the diagonals of EF GH . Prove
that the lines AB and CD intersect on the circumcircle of the triangle BKD.

Solution.

11
C

F
D K
H

I
E

Let's denote I ≡ AB ∩ CD and J ≡ BC ∩ AD. Now F is the incenter of triangle IBC thus
IF is the angle bisector of ^BIC . We can also note that H is the excenter of triangle ADI su
IH is the same angle bisector. Thus I, F, H are collinear. similarly we can deduce that J, E, G
are collinear as well. Now if we denote α = ^BAC and β = ^ABC = ^CDA we can see that
^JDI = 180◦ − β = ^JBI . Since IK and JK are the angle bisectors of ^DIA and ^AJB we
get:

^IKJ = 360◦ − ^KIA − ^KJA − ^JAI


^AID ^AJB
= 360◦ − − − (360◦ − α)
2 2
α + β − 180◦ α + β − 180◦
=α− −
2 2
= 180◦ − β = ^JDI = ^JBI.

12
Thus the points I, J, B, K, D are all concyclic which implies the desired result.

T7. Find all triplets (x, y, z) of positive integers such that


(
xy + y x = z y ,
xy + 2012 = y z+1 .

Solution. We consider two cases.


(i) Let x be an odd number. Then, clearly, y is odd (the second equation) and z is even (the
rst equation). If a and b are odd positive integers then ab ≡ (±1)b ≡ ±1 ≡ a (mod 4).
Let us apply this fact to both equations. The second equation implies that y > 1, thus, 4
divides z y and x + y ≡ xy + y x ≡ z y ≡ 0 (mod 4) =⇒ x ≡ −y (mod 4). On the other
hand, x ≡ x + 0 ≡ xy + 2012 ≡ y z+1 ≡ y (mod 4). This means that y ≡ −y (mod 4) which
is impossible for an odd y .
(ii) Let x = 2x1 be even. Then y and z are even too. If y > 2 then 8 divides xy , but only 4
divides 2012, thus, 8 does not divide y z+1 . This implies that z + 1 6 2 =⇒ z = 1 which
is impossible in the light of the rst equation. Hence, y 6 2. We already noted that y > 1,
thus, y = 2. We rewrite the rst equation:

x2 + 2x = z 2 =⇒ 2x = (z − x)(z + x).

Hence, as x and z are both even, there exist such positive integers u < v that z − x =
2u , z + x = 2v and u + v = x. Since v > u we have v > x2 and u 6 v − 1. This implies
x
that x = 2v−1 − 2u−1 > 2v−1 − 2v−2 = 2v−2 > 2 2 −2 =⇒ x1 > 2x1 −3 . The inequality does
not hold for x1 = 6 and the same can be easily proved by induction for the larger values of
x1 (as the left-hand side increases by 1, the right-hand side increases by 2x1 −3 > 22 > 1).
Hence, we only need to√check the rst ve values 1, 2, 3, 4, 5 (i.e. x = 2, 4, 6, 8, 10). Only for
x = 6 the number z = x2 + 2x = 10 is an integer. The obtained triplet (6, 2, 10) satises
both equations.
The answer. (6, 2, 10).

T8. For any positive integer n, let d(n) denote the number of positive divisors of n. Do there
exist positive integers a and b, such that d(a) = d(b) and d(a2 ) = d(b2 ), but d(a3 ) 6= d(b3 )?

First Solution. The answer is negative.


Denote by τ (n) the number of divisors of n ∈ N. First note that if the prime factorization of n

13
is n = pa1 1 · pa2 2 · · · pakk , then τ (n) = (a1 + 1) · · · (ak + 1) and similarly we nd that
τ (n2 ) = (2a1 + 1) · · · (2ak + 1) and τ (n3 ) = (3a1 + 1) · · · (3ak + 1). For convenience denote
βi = αi + 1 for i ∈ {1, 2, · · · , k}. Then
k
Y k
Y k
Y
τ (n) = βi , τ (n2 ) = (2βi − 1), τ (n3 ) = (3βi − 2)
i=1 i=1 i=1

Now we oer two approaches to nd a counterexample in terms of the numbers βi for i ∈
{1, 2, · · · , k}.
We look at pairs of positive integers of the form (n, 2n−1) namely at (2, 3), (3, 5), (4, 7), (8, 15), (18, 35), (32, 63)
and we aim to nd numbers a1 , a2 , · · · a6 ∈ Z (possibly negative) such that

2a1 · 3a2 · 4a3 · 8a4 · 18a5 · 32a6 = 1 and 3a1 · 5a2 · 7a3 · 15a4 · 35a5 · 63a6 = 1.

Comparing the primes powers of 2, 3, 5 and 7 in the latter relations produces a system of
equations

a1 + 2a3 + 3a4 + a5 + 5a6 = 0 (14)


a2 + 2a5 = 0 (15)
a1 + a4 + 2a6 = 0 (16)
a2 + a4 + a5 = 0 (17)
a3 + a5 + a6 = 0 (18)
(19)

with solution (a1 , a2 , a3 , a4 , a5 , a6 ) = (1, −2, Q−1)


Q 0, 1, 1, . Then
Q we choose Q β1 = 2, β2 = 8, β3 =
18, β10 = β20 = 3,Qβ30 = 32. We have ensured β i = β 0
i and (2β i − 1) = (2βi0 − 1). It remains
to see that 11| (3βi − 2) and 11 - (3βi − 2), thus the numbers are distinct and we can nd
Q
the counterexample to the original problem for example as

a = 2 · 37 · 517 , b = 22 · 32 · 531 .

We look for counterexample in the form β1 = pq, β2 = r, β3 = s and β10 = p, β20 = q, β30 = rs
for some p, q, r, s ∈ N. In order to fulll the second condition we need

(2p − 1)(2q − 1) 2r − 1)(2s − 1)


=
2pq − 1 2rs − 1

Thus, looking at the expression (2n−1)(2m−1)


2mn−1 for positive integers m and n, we need it to attain
the same value twice for two distinct choices of n and m. After subtracting 2 and switching the
sign, we obtain
2m + 2n − 3
2mn − 1
.
We attempt the common value to be of the form 1/k (the expression seems asymptotically
small) for some k ∈ N. After some manipulation, the condition turns into
1
(m − k)(n − k) = (2k − 1)(k − 1)
2

14
In order to ensure the right-hand side is not a prime, we choose k = 5. Then we need to solve
(m − 5)(n − 5) = 18
We nd two solutions (6, 23), (7, 14) and so we choose p = 6, q = 23, r = 7, s = 14. We continue
similarly as in rst approach and nd counterexample
a = 2137 · 36 · 513 , b = 25 · 322 · 597 .
It can be easily seen that the counterexample needs to have at least three prime factors. Also,
the set of pairs (2, 3), (3, 5), (4, 7), (8, 15), (18, 35), (32, 63) from the rst approach is the
minimal (with smallest maximal element) set for which the system of equations has non-trivial
solutions. This leads to the claim that the counterexample from the rst approach is also minimal
in this sense.

Second Solution. The problem is immediately reduced to nding nite positive integer
sequences (xi ) and (yj ) satisfying
Y Y
xi = yj (20)
i j
Y Y
(2xi − 1) = (2yj − 1) (21)
i j
Y Y
(3xi − 2) 6= (3yj − 2) (22)
i j

and such that (xi ) is not a permutation of (yj ).

We will look for a parametric family of solutions. We base our construction on choosing the
y 's such that the generic expression 2y − 1 is decomposable and the decomposition factors can be
recombined to generate the x's in (21). The simplest identity of this type seems to be obtained
for y = 2z 2 ,
2y − 1 = 4z 2 − 1 = (2z − 1)(2z + 1) = (2z − 1)(2(z + 1) − 1).
We therefore pick now y0 = 2z 2 , y1 = 2(z + 1)2 , . . . , yn = 2(z + n)2 for some n ∈ N. With
this choice it follows that
n
Y n
Y
(2yj − 1) = (4(z + j)2 − 1)
j=0 j=0
Yn
= (2(z + j) − 1)(2(z + j + 1) − 1)
j=0
n
Y
= (2z − 1)(2(z + n + 1) − 1) (2(z + j) − 1)2 .
j=1

The obvious choice now for the sequence (xi ) consists in the set of values z , z + n + 1, plus
two copies of each number in the sequence (z + j) for j = 1 : n. Note that in this way there

15
are twice as many x's as y 's: 2n + 2 vs. n + 1. Explicitly, x0 = z, x1 = x2 = z + 1, x3 = x4 =
z +2, . . . , x2n−1 = x2n = z +n, x2n+1 = z +n+1. With this choice for the sequence (xi ) condition
(21) is fullled by construction. But what about (20) or (22)?

Let's start with (20) and calculate


Y
xi = z(z + n + 1)(z + 1)2 (z + 2)2 · · · (z + n)2 ,
i
Y
yj = 2n+1 z 2 (z + 1)2 · · · (z + n)2
j

to obtain Y Y
yj / xi = 2n+1 z/(z + n + 1).
j i

Although the r.h.s. above can not be made equal to 1 as desired, it can be further simplied
by choosing z = n + 1. With this choice we arrive at
Y Y
yj / xi = 2n . (23)
j i

Recall that this holds for our current choice y0 = 2n2 , y1 = 2(n + 1)2 , . . . , yn = 2(2n)2 and
x0 = n + 1, x1 = x2 = n + 2, x3 = x4 = n + 3, . . . , x2n−1 = x2n = 2n + 1, x2n+1 = 2n + 2.

Call now the entire sequence construction above Cn , and consider for arbitrary positive inte-
gers n, m the constructions Cn , Cm as well as Cn+m , together with the corresponding sequences
(xi , yj ), (x0i , yj0 ) and (x00i , yj00 ) respectively.

Consider now the sequences (Xi ) and (Yj ) obtained by collecting (concatenating) the se-
quences (xi ), (x0i ), (yj00 ) and (yj ), (yj0 ), (x00i ) respectively. We claim that (Xi ) and (Yj ) are in ge-
neral sequences that satisfy all three conditions (20), (21), (22). Due to the obvious identity
2m 2n = 2m+n we deduce from 23 that the sequences (Xi ) and (Yj ) satisfy, beside (21), also
condition (20).

It remains to investigate condition (22). There are several ways to do this, for example by
analyzing prime decompositions of the l.h.s. and r.h.s. respectively (and formulating a condition
on m, n such that the largest prime divisor of the l.h.s. does not divide the r.h.s. anymore).
Here however we take a dierent route and estimate the asymptotic behavior of the two sides of
equation (22). To this end we use (20) and write
  !
Y Y Y Y Y Y
(3Yj − 2)/ (3Xi − 2) =  (3Yj − 2)/ Yj  × Xi / (3Xi − 2) . (24)
j i j j i i

To estimate the two factors on the r.h.s. of (24) we rst observe that in the generic construction
Cn ,
Y n
Y
(3yj − 2)/yj = 3n+1 (1 − 2/3yj ) = 3n+1 An , (25)
j j=0
Pn
with An → 1 as n → ∞, since j=0 1/6(n + j)2 → 0 as n → ∞.

16
We note now that a similar result holds for the sequence (xi ) in construction Cn ,

Y 2n+1
Y
(3xi − 2)/xi = 32(n+1) (1 − 2/3xi ) = 32(n+1) Bn (26)
i i=0

P2n+1 Pn
with Bn → 2−4/3 as n → ∞, since i=0 2/3xi → 4 ln(2)/3 as n → ∞ due to j=1 1/(n + j + a)
converging to ln(2) for any real a.

Using the two facts (25), (26) in (24) and in the context of the construction of (Xi , Yj ) via
Cn , Cm , Cn+m we obtain

Y Y
(3Yj − 2)/ (3Xi − 2) = 3n+1 An · 3m+1 Am · 32(n+m+1) Bn+m ·
j i

·3−2(n+1) Bn−1 · 3−2(m+1) Bm


−1
· 3−(n+m+1) A−1
n+m
= (1/3)An Am A−1 −1 −1
n+m Bn Bm Bn+m . (27)

Since the limit as n, m → ∞ equals 24/3 /3 6= 1 we obtain that the desired conclusion (22) holds
for m, n large enough and the proof is complete.

17
Problems and solutions
Individual Competition

Problem I-1. Let a, b, c be positive real numbers such that


1 1 1
a+b+c= 2
+ 2 + 2.
a b c
Prove that

3

3

3
2(a + b + c) ≥ 7a2 b + 1 + 7b2 c + 1 + 7c2 a + 1.
Find all triples (a, b, c) for which equality holds.
Solution. From the AM–GM inequality, we obtain that
v

! !
7b 1 2 7b 1
u
3
u
3
7a b + 1 = 2 · t
2 a·a· + 2 ≤ a+a+ + 2 .
8 8a 3 8 8a

3

3
We have analogous upper bounds for 7b2 c + 1 and 7c2 a + 1. Adding up these three
inequalities, we obtain that

3

3

3 2 23(a + b + c) 1 1

1 1
!
7a2 b + 1 + 7b2 c + 1 + 7c2 a + 1 ≤ + 2
+ 2+ 2 .
3 8 8 a b c

Using the condition of the problem, we obtain


√3

3

3
7a2 b + 1 + 7b2 c + 1 + 7c2 a + 1 ≤ 2(a + b + c).

Equality holds if and only if a, b, and c satisfy the system of equations


7b 1
a= + 2,
8 8a
7c 1
b=
+ 2,
8 8b
7a 1
c= + 2.
8 8c
Note that this systemactuallyimplies the equation stipulated in the problem.
Defining f (x) = 87 x − 8x12 , we can rewrite the system as

b = f (a),

c = f (b),

1
a = f (c).
We prove that f (x) is a non-decreasing function. Let u ≥ v. Then
 
8 1 1
f (u) − f (v) = 7
(u − v) + 8v 2
− 8u2
 
8 (u−v)(u+v)
= 7
(u − v) + 8u2 v 2
 
8 u+v
= 7
(u − v) 1 + 8u2 v 2

≥ 0.

Since the system of equations is cyclically symmetric, we may assume that a =


max{a, b, c}. Since a ≥ b, we have b = f (a) ≥ f (b) = c, so c = f (b) ≥ f (c) = a.
In all, c ≥ a ≥ b ≥ c, so a = b = c.
We now have to find the solutions of f (a) = a.
 
8 1
7
a− 8a2
= a
1
8a − a2
= 7a
1
a2
= a

1 = a3
Thus, equality holds if and only if a = b = c = 1.

Problem I-2. Let n be a positive integer. On a board consisting of 4n × 4n squares,


exactly 4n tokens are placed so that each row and each column contains one token. In a
step, a token is moved horizontally or vertically to a neighbouring square. Several tokens
may occupy the same square at the same time. The tokens are to be moved to occupy all
the squares of one of the two diagonals.
Determine the smallest number k(n) such that for any initial situation, we can do it
in at most k(n) steps.
Solution. We shall prove that k(n) = 6n2 .
We define the distance from a given square to a given diagonal to be the minimal
number of steps needed to get from the square to the diagonal. This equals the minimal
number of horizontal steps needed to do that. It also equals the minimal number of
vertical steps needed to do that.
Given a configuration of tokens, we define the distance from this configuration to a
given diagonal to be the sum of distances of the tokens to that diagonal.
Choose the coordinate system so that the vertices of the board have coordinates ±2n.
Place a token on each of the n squares the coordinates of whose centres satisfy x > 0
and y − x = n. Now complete this configuration of tokens so that it has a rotational
symmetry of 90◦ about the origin. Then we have 4n tokens, one in each row, one in each
column. The distance from this configuration to either diagonal is 2n · n + 2n · 2n = 6n2 .
Therefore, k(n) ≥ 6n2 .
Now consider any configuration satisfying the conditions of the problem. We prove
that ≤ 6n2 steps suffice even if we only allow horizontal moves. I.e., the smallest of the

2
two distances from the given configuration to the diagonals is ≤ 6n2 . It suffices to prove
that the sum of the two distances from the given configuration to the diagonals is ≤ 12n2 .
Observe that the sum of the two distances from the square with center (x, y) to the
two diagonals is 2 max(|x|, |y|). This number can take values 1, 3, . . . , 4n − 1. The
squares where it takes a given value can be covered by two columns and two rows, so we
can place at most four tokens there. Thus, the sum of the values for the 4n tokens is
≤ 4((4n − 1) + (4n − 3) + · · · + (2n + 1)) = 4n · 3n = 12n2 .
Problem I-3. Let ABC be an isosceles triangle with AC = BC. Let N be a point inside
the triangle such that 2∠AN B = 180◦ + ∠ACB. Let D be the intersection of the line
BN and the line parallel to AN that passes through C. Let P be the intersection of the
angle bisectors of the angles CAN and ABN .
Show that the lines DP and AN are perpendicular.
Solution. Since AC = BC, there is a circle k such that the lines AC and BC are the
tangents to k at the points A and B. The condition defining the point N implies that
the point N lies on the circle k.
By the tangent-chord theorem, we have ∠BAN = ∠DBC and ∠CAN = ∠ABD.
Since DC is parallel to AN , we have ∠CAN = ∠ACD. Hence ∠ACD = ∠ABN , so the
quadrilateral ABCD is cyclic. It follows that ∠CAD = ∠CBD = ∠BAN .
We can conclude that the angle bisector of ∠CAN is the angle bisector of ∠BAD.
Hence the point P is the incenter of the triangle ABD and DP is the angle bisector of
∠ADB.
We also note that since CD is parallel to AN , we have ∠AN D = ∠BDC = ∠BAC =
∠BAN + ∠N AC = ∠CAD + ∠N AC = ∠N AD. Hence AD = N D and we conclude that
the angle bisector of ∠ADB is the perpendicular bisector of the segment AN .
Hence DP is perpendicular to AN .
Remark 1. The first part of the solution can easily be deduced also by calculating the angles
without noting that AC and BC are tangents to k.
Remark 2. It is a well-known fact that the intersection of the perpendicular bisector of the
segment AN and the angle bisector of the angle ∠ABN lies on the circumcircle of the triangle
ABN , i.e. P also lies on the circle k. This fact is obtained more easily by calculating the angle
∠AP B.

Problem I-4. Let a and b be positive integers. Prove that there exist positive integers x
and y such that !
x+y
= ax + by.
2
Solution. Denoting A = 2a + 1 and B = 2b + 1, the equation can be translated into
B − (x + y) (x + y) − A
= .
x y
For A = B, any integers with x + y = A satisfy the equation. Now suppose that A < B.
Let n be the integer in the interval [A, B) which is divisible by d = B − A. Then n 6= A
because A is odd and d is even. Now choose
n n
x = (B − n) , y = (n − A) .
d d
Here n = x + y, so the equation is satisfied.

3
Team Competition

Problem T-1. Find all functions f : R → R such that

f (xf (x) + 2y) = f (x2 ) + f (y) + x + y − 1

for all x, y ∈ R.
Solution. Putting x = y = 0, we get f (0) = 1.
Putting x = 0, y = z, we get

f (2z) = f (z) + z. (1)

Putting x = z, y = −zf (z), we get

f (z 2 ) = zf (z) − z + 1. (2)

Replacing z by 2z in (2) and using (1), we obtain

f (4z 2 ) = 2zf (2z) − 2z + 1 = 2z(f (z) + z) − 2z + 1 = 2zf (z) + 2z 2 − 2z + 1. (3)

Using (1) for 2z 2 and then for z 2 in place of z, and afterwards using (2), we obtain

f (4z 2 ) = f (2z 2 ) + 2z 2 = f (z 2 ) + z 2 + 2z 2 = zf (z) − z + 1 + 3z 2 . (4)

Comparing (3) and (4) we have

2zf (z) + 2z 2 − 2z + 1 = zf (z) − z + 1 + 3z 2


zf (z) − z 2 − z = 0
z(f (z) − z − 1) = 0.

For z 6= 0 we obtain f (z) = z + 1. For z = 0, we have f (0) = 1. Thus, for all z ∈ R,


we have
f (z) = z + 1.
This function indeed satisfies the functional equation.

Problem T-2. Let x, y, z, w ∈ R \ {0} such that x + y 6= 0, z + w 6= 0, and xy + zw ≥ 0.


Prove the inequality
!−1 −1 !−1
x+y z+w 1 x z y w

+ + ≥ + + + .
z+w x+y 2 z x w y

4
Solution 1. We first subtract 1 on both sides and rewrite the inequality as

(x + y)(z + w) 1 xz 1 yw 1
     
2 2
− ≥ 2 2
− + 2 2
− ,
(x + y) + (z + w) 2 x +z 2 y +w 2

which is equivalent to

(x − z)2 (y − w)2 (x + y − z − w)2


+ ≥ .
x2 + z 2 y 2 + w2 (x + y)2 + (z + w)2

But this is true by the chain of inequalities

(x − z)2 (y − w)2 ((x − z) + (y − w))2 (x + y − z − w)2


+ ≥ ≥ ,
x2 + z 2 y 2 + w2 x2 + z 2 + y 2 + w 2 (x + y)2 + (z + w)2

where we first used the Cauchy–Schwarz inequality for the two vectors
! √
(x − z) (y − w) q 
√ ,√ 2 , x2 + z2, y2 + w2
x2 + z 2 y + w2

and then the condition xy + zw ≥ 0.


Solution 2. The vectors (x, z) and (y, w) form an angle ≤ π/2 containing the sum
vector (x + y, z + w). So with suitable angles α ≤ φ ≤ β with β − α ≤ π/2, the desired
inequality becomes
1
(tg φ + ctg φ)−1 + ≥ (tg α + ctg α)−1 + (tg β + ctg β)−1 ,
2
which is equivalent to
1 + sin 2φ ≥ sin 2α + sin 2β.
If
sin 2φ ≥ min(sin 2α, sin 2β),
then we are done because
1 ≥ max(sin 2α, sin 2β).
Otherwise, modulo 2π we have that π/2 < 2α < 3π/2 < 2β and 2β − 2α ≤ π, so

sin 2α + sin 2β ≤ 0 ≤ 1 + sin 2φ.

Problem T-3. There are n ≥ 2 houses on the northern side of a street. Going from
the west to the east, the houses are numbered from 1 to n. The number of each house
is shown on a plate. One day the inhabitants of the street make fun of the postman by
shuffling their number plates in the following way: for each pair of neighbouring houses,
the current number plates are swapped exactly once during the day.
How many different sequences of number plates are possible at the end of the day?

5
Solution 1. Let f (n) denote the answer. We shall prove by induction that f (n) = 2n−2 .
For n = 2, the answer is clearly 22−2 = 1. We also define f (1) = 1. Now we consider
arbitrary n > 2.
Let Hi denote the house with number i at the start of the day, and let (i  i + 1)
denote the swap between Hi and Hi+1 . Let Hk be the house that has plate n at the end
of the day. It follows that the swaps (n − 1  n), (n − 2  n − 1), . . . , (k  k + 1) must
have happened in this order, for otherwise plate n could not have reached the house Hk .
In addition, (k − 1  k) must have happened before (k  k + 1), otherwise plate n would
have ended up somewhere between H1 and Hk−1 .
It follows that for any k ≤ i < n the plate i will be on Hi+1 , while plates 1, . . . , k will
be on the houses H1 , H2 , . . . , Hk−1 , and Hk+1 in some mixed order. If we restrict our
attention to the first k houses: the same happens that would happen if the only houses
were H1 , H2 , . . . , Hk ; the only difference is that at the end of the game, Hk should change
its plate to n. So there are f (k) different final orderings of the plates such that n is on
Hk (for k = 1, . . . , n − 1).
Therefore,
n−1 n−3
2i = 2n−2 .
X X
f (n) = f (k) = 1 +
k=1 i=0

Solution 2. To each pair of neighbouring houses we assign the moment t in time when
they swap plates. In this way, we get a sequence t1 , . . . , tn−1 of n − 1 moments in time,
such that ti−1 6= ti for all i. This sequence can be split into maximal monotonically
increasing subsequences (with each subsequence consisting of consecutive elements). It
can also be split into maximal monotonically decreasing subsequences (again, with each
subsequence consisting of consecutive elements). If ti−1 > ti , or i = 1, then plate i will
finish the day at the eastern end of the maximal increasing subsequence starting at ti . If
ti−1 < ti , or i = n, then plate i will finish the day at the western end of the maximal
decreasing subsequence ending at ti−1 .
Thus, the n − 2 relations < and > between the neighbouring t’s determine the final
distribution of the plates. Conversely, given the final distribution of the plates, we can
calculate the relations. Indeed, let 2 ≤ i ≤ n − 1. If plate i ends up east of its original
position, then ti−1 > ti , whereas if plate i ends up west of its original position, then
ti−1 < ti . There is no third possibility.
The number of ways to choose these relations is clearly 2n−2 . Each choice can be
realized by suitable moments ti in time: we may choose t1 to be any moment during the
day, and if t1 , . . . , ti−1 are already given, then we may choose ti to be smaller, resp.
greater than ti−1 , as desired. Therefore, the answer is 2n−2 .

Problem T-4. Consider finitely many points in the plane with no three points on a line.
All these points can be coloured red or green such that any triangle with vertices of the
same colour contains at least one point of the other colour in its interior.
What is the maximal possible number of points with this property?
Solution. The answer is 8.
Call a set consisting of red points and green points good if no three points are collinear
and any unicoloured triangle contains a point of the other colour.
On the one hand, the figure on the left below shows an example of a good set with 8
points. The figure on the right shows the two types of unicololured triangles — all other

6
unicoloured triangles are reflections of those.

On the other hand, we shall prove that a good set can have at most four points of
each colour. We give two proofs.
First proof. For a proof by contradiction, let S be a counterexample of minimal
cardinality. We may assume that S has at least five red points.
Let P be any vertex of the convex hull of S. Then P cannot be in the interior of any
triangle, so S \ {P } is good. But S was a minimal counterexample, so S \ {P } has at
most four points of each colour. Therefore, S has exactly five red points, all vertices of
the convex hull of S are red, and S has at most four green points.
Consider the convex hull of S. It is a triangle, a quadrilateral, or a pentagon.
Case i: The convex hull is a triangle.
A Let A, B and C denote the vertices of the trian-
gle, and let I and J be the interior red points.
Without loss of generality, we may assume that
the line IJ intersects sides AB and AC (and not
I J BC), and I is nearer to AB than J is. Now ABI,
AIJ, AJC, BIJ and BJC are five unired trian-
gles with disjoint interiors, so at least one of them
must be empty, because there are at most four
C green points. Thus, S is not good, in contradic-
B
tion to our assumptions.
Case ii: The convex hull is a quadrilateral. A
Let the vertices of the quadrilateral be A, B, C, D,
B
in this cyclic order, and I be the red point in the
I
interior. Now ABI, BCI, CDI and DAI are
unired triangles with disjoint interiors, each has
a green point inside: denote them by X, Y, Z, W D
respectively. Then XY Z and ZW X are two uni-
green triangles, but both cannot have I (the only C
possible red point) in their interiors.

7
A
Case iii: The convex hull is a pentagon.
B
Let A, B, C, D and E denote the vertices of the
pentagon, in this cyclic order. Now ABC, ACD
E
and ADE are three unired triangles with disjoint
interiors, each must have a green point in its inte-
rior, these form a unigreen triangle, which cannot
C D have any red point inside.

Second proof.
Lemma. Let a good set of coloured points be given.
If the convex hull of some red points contains exactly x red points, with exactly y of
them being in its interior, then there are at least x + y − 2 green points in its interior.
(The statement is analogous for switched colours.)
Proof. If the convex hull is not a polygon (i.e. x ≤ 2), the statement is trivial. Otherwise
consider a partition of the convex hull of the red points into triangles, all of which have
only red points as vertices, and have no other red points in their interiors. Let N be the
number of triangles of the partition. Then the sum of their angles is N π. On the other
hand, at each interior point, the sum of the angles of the triangles is always 2π, and at
the peripherial points that form a convex (x − y)-gon, the sum is (x − y − 2)π. So the
sum of the angles of the triangles in the partition is

N π = 2yπ + (x − y − 2)π,

which reduces to N = x + y − 2. Each of the disjoint unicoloured triangles must contain


a single point in its interior, which proves the lemma.
Applying the lemma on all n red points, where m red points are inside their convex
hull, gives that there are at least n + m − 2 green points inside the red points’ convex
hull. Now applying the lemma again on these green points gives that there are at least
(n + m − 2) − 2 red points in their convex hull. But these red points are also interior
points of the convex hull of all red points, therefore

(n + m − 2) − 2 ≤ m.

This reduces to n ≤ 4, and our statement is proven.


Remark. The lemma can also be proven by induction on x.
Remark. If we allow three colours rather than two, then any set size is possible. For details, see
O. Aichholzer. [Empty] [colored] k-gons - Recent results on some Erdős-Szekeres type problems.
In Proc. XIII Encuentros de Geometría Computacional, pages 43-52, Zaragoza, Spain, 2009.

Problem T-5. Let ABC be an acute triangle. Construct a triangle P QR such that
AB = 2P Q, BC = 2QR, CA = 2RP , and the lines P Q, QR, and RP pass through the
points A, B, and C, respectively. (All six points A, B, C, P , Q, and R are distinct.)

8
Solution. There are two possible configurations, but we are giving a proof for only one
of them (where P is between A and Q), because it will always give a solution.

Since the angles of triangles P QR and ABC are equal, ∠QAB = ∠RBC = ∠P CA.
Let S denote the Brocard point of ABC, the one for which ∠SAB = ∠SBC = ∠SCA.
The circle AP C is tangent to AB by the reverse tangent–chord theorem (since ∠P AB =
∠P CA). The same argument holds for S (circle ASC is tangent to AB). It follows that
AP SC is cyclic.
We intend to prove that triangle AP S is similar to triangle BQS. For this we observe
that ∠SAP = ∠SBQ (since ∠SAB = ∠SBC and ∠P AB = ∠QBC), and also ∠ASP =
∠BSQ, because ∠ASP = ∠ACP = ∠BAQ = ∠BSQ. So all the angles are the same in
the two triangles, and the same holds for the third triangle CRS. Now considering the
twirl with centre S, oriented angle P SA and ratio SA/SP , the image of triangle P QR is
triangle ABC. This yields the following construction:

• Construct the Brocard point S with the property ∠SAB = ∠SBC = ∠SCA. It is
obtained as the intersection point of the three circles ASB, BSC, CSA which are
tangent to the lines BC, CA, AB at B, C, A and pass through A, B, C, respectively.

• Construct the circle with center S and radius SA/2.

• Take the point of intersection of this circle and arc AS of circle ASC not containing
C. This point is P .

• Take the intersection of line AP and arc BS of circle BSA not containing A: this
point is Q.

• Take the intersection of line BQ and arc CS of circle CSB not containing B: this
is point R.

9
This construction works. We know that the Brocard point S always exists and it
is inside the triangle. It is easy to verify that the arcs AS, BS and CS used in the
construction are inside the triangle (e.g. arc AS is tangent to side AB and so it is also
inside the obtuse triangle ASB). This means that point P is uniquely defined and is
inside triangle ABC. Similarly, Q is also unique, and by the tangent–chord theorem
∠P AB = ∠QBC. Now R is also unique, and ∠QBC = ∠RCA. Angle P CA is also the
same, because one last time by the tangent–chord theorem ∠P CA = ∠P AB. This means
that R, P and C are collinear. We are done.

Remarks:

• The other point of intersection of the circle around S and circle ASC also works,
but in this configuration it is possible for some of the six points (A, B, C, P, Q, R)
to coincide. In this case the common angle ∠QAB = ∠RBC = ∠P CA is larger
than the Brocard angle, while in the solution it is smaller than the Brocard angle.

• The other Brocard point does not work. (It works when P Q passes through B, QR
through C and RP through A.)

Problem T-6. Let K be a point inside an acute triangle ABC, such that BC is a common
tangent of the circumcircles of AKB and AKC. Let D be the intersection of the lines CK
and AB, and let E be the intersection of the lines BK and AC. Let F be the intersection
of the line BC and the perpendicular bisector of the segment DE. The circumcircle of
ABC and the circle k with centre F and radius F D intersect at points P and Q.
Prove that the segment P Q is a diameter of k.
Solution. The line BC is tangent to the circumcircle of AKC, so the angles BCD and
CAK are equal. Analogously, the angles CBE and BAK are equal.

10
Therefore

π = |∠KBC| + |∠KCB| + |∠BKC| = |∠DAK| + |∠EAK| + |∠DKE|,

so ADKE is a cyclic quadrilateral. Then

|∠KBC| = |∠DAK| = |∠DEK|,

which implies that DE is parallel to BC. Observe that F is the unique point on line BC
for which the angles DF B and CF E are the same. Let F 0 be the point on side BC for
which BF 0 KD is cyclic. Then

|∠F 0 KE| = 2π−|∠EKD|−|∠DKF 0 | = 2π−(π−|∠BAC|)−(π−|∠CBA|) = π−|∠ACB|

which tells us that F 0 CEK is also cyclic, therefore

|∠DF 0 B| = |∠DKB| = |∠CKE| = |∠CF 0 E|.

This means that F = F 0 and |∠DF B| = |∠CF E| = π − |∠BKC| = |∠BAC|, so the


triangles F BD and F EC are both similar to ABC, therefore
|AB| |F E| |F B|
= = .
|AC| |F C| |F D|
We get |F B||F C| = |F D|2 . Let Q0 be the intersection of the line P F and the circumcircle
of ABC. Using the power of the point F , we get |F D|2 = |F B||F C| = |F P ||F Q0 | =
|F D||F Q0 |, therefore |F Q0 | = |F D|, so Q = Q0 .

11
Remark. One can observe that F is Miquel’s point of the cyclic quadrilateral ADKE.

Problem T-7. The numbers from 1 to 20132 are written row by row into a table consisting
of 2013 × 2013 cells. Afterwards, all columns and all rows containing at least one of the
perfect squares 1, 4, 9, . . . , 20132 are simultaneously deleted.
How many cells remain?
Solution. Let m = 503 and n = 4m + 1 = 2013.
Note that
(m − 1)n = (m − 1)(4m + 1) < m · 4m = (2m)2 < m(4m + 1) = mn,
so the perfect square (2m)2 is in the m-th row.
Note that (k + 1)2 − k 2 = 2k + 1 is at most n if k ≤ 2m and is at least n if k ≥ 2m.
Therefore, on the one hand, the first 2m + 1 perfect squares never skip a row and the first
m + 1 rows are all deleted. On the other hand, the last n − (2m − 1) = 2m + 2 perfect
squares are in pairwise distinct rows.
Thus, the first m + 1 rows and 2m more are deleted, so m rows remain.
The j-th column is deleted if and only if j is a square modulo n = 2013 = 3 · 11 · 61.
By the Chinese Remainder Theorem, this is the case if and only if j is a square modulo
each of 3, 11, and 61. Since the numbers of squares for these three moduli are 2, 6, and 31
respectively, the number of squares modulo n, again by the Chinese Remainder Theorem,
is 2 · 6 · 31 = 372. The number of remaining columns is therefore 2013 − 372 = 1641.
The number of remaining cells is 503 · 1641 = 825423.

Problem T-8. The expression


± ±  ±  ±  ±  ± 

12
is written on the blackboard. Two players, A and B, play a game, taking turns. Player
A takes the first turn. In each turn, the player on turn replaces a symbol  by a positive
integer. After all the symbols  are replaced, player A replaces each of the signs ± by
either + or −, independently of each other. Player A wins if the value of the expression
on the blackboard is not divisible by any of the numbers 11, 12, . . . , 18. Otherwise, player
B wins.
Determine which player has a winning strategy.
Solution. We will call a number good if it has a divisor in the set {11, 12, . . . , 18}.
We will show that player B has a winning strategy. Namely, B plays 18! in both his
first and second move. In his last move he plays a number x (which we will specify later),
which ensures that each possible result will be good.
When choosing this number, we may, without loss of generality, work with the result
mod 18!, thus his first and second moves count as zero. Before he plays the last move,
there are eight (= 23 ) possible combinations of signs which give eight results a1 , a2 , . . . ,
a8 . If we ensure that each of the numbers a1 + x, a2 + x, . . . , a8 + x be good, then also
the numbers a1 − x, a2 − x, . . . , a8 − x will be good since for each i ∈ {1 . . . , 8} there
exists j ∈ {1, . . . , 8} such that ai − x = −(aj + x).
Now observe that all of the numbers a1 , . . . , a8 have the same parity and thus they have
at most two different remainders mod 4. Further, if there are two possible remainders,
then each appears exactly four times (check it!).
At least three of the numbers have the same remainder mod 3, wlog let a1 ≡ a2 ≡ a3
(mod 3). Also, we may assume that a4 ≡ a3 (mod 4).
Then, we choose our x from the Chinese Remainder Theorem so that 9 | a1 + x,
5 | a2 + x, 16 | a4 + x, 7 | a5 + x, 11 | a6 + x, 13 | a7 + x, and 17 | a8 + x.
With this choice of x we have in fact ensured 18 | a1 + x, 15 | a2 + x, 12 | a3 + x,
16 | a4 + x, 14 | a5 + x, 11 | a6 + x, 13 | a7 + x, and 17 | a8 + x. Hence the result.

13
SEEMOUS 2008
South Eastern European Mathematical Olympiad
for University Students

Athens – March 7, 2008

Problem 1
Let f : [1, ∞) → (0, ∞) be a continuous function. Assume that for every a > 0, the
equation f (x) = ax has at least one solution in the interval [1, ∞).
(a) Prove that for every a > 0, the equation f (x) = ax has infinitely many solutions.
(b) Give an example of a strictly increasing continuous function f with these prop-
erties.

Problem 2
Let P0 , P1 , P2 , . . . be a sequence of convex polygons such that, for each k ≥ 0, the vertices
of Pk+1 are the midpoints of all sides of Pk . Prove that there exists a unique point lying
inside all these polygons.

Problem 3
Let Mn (R) denote the set of all real n × n matrices. Find all surjective functions f :
Mn (R) → {0, 1, . . . , n} which satisfy

f (XY ) ≤ min{f (X), f (Y )}

for all X, Y ∈ Mn (R).

Problem 4
Let n be a positive integer and f : [0, 1] → R be a continuous function such that
Z 1
xk f (x) dx = 1
0

for every k ∈ {0, 1, . . . , n − 1}. Prove that


Z 1
(f (x))2 dx ≥ n2 .
0

1
Answers

Problem 1
Solution. (a) Suppose that one can find constants a > 0 and b > 0 such that f (x) 6= ax
for all x ∈ [b, ∞). Since f is continuous we obtain two possible cases:
1.) f (x) > ax for x ∈ [b, ∞). Define

f (x) f (x0 )
c = min = .
x∈[1,b] x x0

Then, for every x ∈ [1, ∞) one should have

min(a, c)
f (x) > x,
2
a contradiction.
2.) f (x) < ax for x ∈ [b, ∞). Define

f (x) f (x0 )
C = max = .
x∈[1,b] x x0

Then,
f (x) < 2 max(a, C)x
for every x ∈ [1, ∞) and this is again a contradiction.

(b) Choose a sequence 1 = x1 < x2 < · · · < xk < · · · such that the sequence
yk = 2k cos kπ xk is also increasing. Next define f (xk ) = yk and extend f linearly on
each interval [xk−1 , xk ]: f (x) = ak x + bk for suitable ak , bk . In this way we obtain an
increasing continuous function f , for which lim f (x 2n )
x2n = ∞ and lim
f (x2n−1 )
x2n−1 = 0. It
n→∞ n→∞
f (x)
now follows that the continuous function x takes every positive value on [1, ∞).

Problem 2
Solution. For each k ≥ 0 we denote by Aki = (xki , yik ), i = 1, . . . , n the vertices of Pk .
We may assume that the center of gravity of P0 is O = (0, 0); in other words,
1 0 1
(x1 + · · · + x0n ) = 0 and (y10 + · · · + yn0 ) = 0.
n n

Since 2xk+1
i = xki + xki+1 and 2yik+1 = yik + yi+1
k for all k and i (we agree that xkn+j = xkj
k
and yn+j = yjk ) we see that

1 k 1
(x1 + · · · + xkn ) = 0 and (y1k + · · · + ynk ) = 0
n n
for all k ≥ 0. This shows that O = (0, 0) is the center of gravity of all polygons Pk .
In order to prove that O is the unique common point of all Pk ’s it is enough to prove
the following claim:
Claim. Let Rk be the radius of the smallest ball which is centered at O and contains Pk .
Then, lim Rk = 0.
k→∞

2
Proof of the Claim. Write k · k2 for the Euclidean distance to the origin O. One can
easily check that there exist β1 , . . . , βn > 0 and β1 + · · · + βn = 1 such that
n
X
Ak+n
j = βi Akj+i−1
i=1
Pn k
for all k and j. Let λ = min βi . Since O = i=1 Aj+i−1 , we have the following:
i=1,...,n
° °
°Xn °
° °
kAk+n
j k2 = ° (βi − λ)Akj+i−1 °
° °
i=1 2
n
X
≤ (βi − λ)kAkj+i−1 k2
i=1
n
X
≤ Rk (βi − λ) = Rk (1 − nλ).
i=1

This means that Pk+n lies in the ball of radius Rk (1 − nλ) centered at O. Observe that
1 − nλ < 1.
Continuing in the same way we see that Pmn lies in the ball of radius R0 (1 − nλ)m
centered at O. Therefore, Rmn → 0. Since {Rn } is decreasing, the proof is complete.

Problem 3
Solution. We will show that the only such function is f (X) = rank(X). Setting
Y = In we find that f (X) ≤ f (In ) for all X ∈ Mn (R). Setting Y = X −1 we find
that f (In ) ≤ f (X) for all invertible X ∈ Mn (R). From these facts we conclude that
f (X) = f (In ) for all X ∈ GLn (R).
For X ∈ GLn (R) and Y ∈ Mn (R) we have
f (Y ) = f (X −1 XY ) ≤ f (XY ) ≤ f (Y ),
f (Y ) = f (Y XX −1 ) ≤ f (Y X) ≤ f (Y ).
Hence we have f (XY ) = f (Y X) = f (Y ) for all X ∈ GLn (R) and Y ∈ Mn (R). For
k = 0, 1, . . . , n, let µ ¶
Ik O
Jk = .
O O
It is well known that every matrix Y ∈ Mn (R) is equivalent to Jk for k = rank(Y ).
This means that there exist matrices X, Z ∈ GLn (R) such that Y = XJk Z. From
the discussion above it follows that f (Y ) = f (Jk ). Thus it suffices to determine the
values of the function f on the matrices J0 , J1 , . . . , Jn . Since Jk = Jk · Jk+1 we have
f (Jk ) ≤ f (Jk+1 ) for 0 ≤ k ≤ n − 1. Surjectivity of f imples that f (Jk ) = k for
k = 0, 1, . . . , n and hence f (Y ) = rank(Y ) for all Y ∈ Mn (R).

Problem 4
Solution. There exists a polynomial p(x) = a1 + a2 x + · · · + an xn−1 which satisfies
Z 1
(1) xk p(x) dx = 1 for all k = 0, 1, . . . , n − 1.
0

3
It follows that, for all k = 0, 1, . . . , n − 1,
Z 1
xk (f (x) − p(x)) dx = 0,
0

and hence Z 1
p(x)(f (x) − p(x)) dx = 0.
0
Then, we can write
Z 1 Z 1
2
(f (x) − p(x)) dx = f (x)(f (x) − p(x)) dx
0 0
Z 1 n−1
X Z 1
2
= f (x) dx − ak+1 xk f (x) dx,
0 k=0 0

and since the first integral is non-negative we get


Z 1
f 2 (x) dx ≥ a1 + a2 + · · · + an .
0

To complete the proof we show the following:


Claim. For the coefficients a1 , . . . , an of p we have

a1 + a2 + · · · + an = n2 .

Proof of the Claim. The defining property of p can be written in the form
a1 a2 an
+ + ··· + = 1, 0 ≤ k ≤ n − 1.
k+1 k+2 k+n
Equivalently, the function
a1 a2 an
r(x) = + + ··· + −1
x+1 x+2 x+n
has 0, 1, . . . , n − 1 as zeros. We write r in the form

q(x) − (x + 1)(x + 2) · · · (x + n)
r(x) = ,
(x + 1)(x + 2) · · · (x + n)

where q is a polynomial of degree n − 1. Observe that the coefficient of xn−1 in q is


equal to a1 + a2 + · · · + an . Also, the numerator has 0, 1, . . . , n − 1 as zeros, and since
lim r(x) = −1 we must have
x→∞

q(x) = (x + 1)(x + 2) · · · (x + n) − x(x − 1) · · · (x − (n − 1)).


n(n+1)
This expression for q shows that the coefficient of xn−1 in q is 2 + (n−1)n
2 . It follows
that
a1 + a2 + · · · + an = n2 .

4
SEEMOUS 2009
South Eastern European Mathematical Olympiad for University Students
AGROS, March 6, 2009

COMPETITION PROBLEMS

Problem 1
a) Calculate the limit
Z1
(2n + 1)!
lim (x(1 − x))n xk dx,
n→∞ (n!)2
0

where k ∈ N.
b) Calculate the limit
Z1
(2n + 1)!
lim (x(1 − x))n f (x)dx,
n→∞ (n!)2
0

where f : [0, 1] → R is a continuous function.


 
1
Solution Answer: f . Proof: Set
2
Z1
(2n + 1)!
Ln (f ) = (x(1 − x))n f (x) dx .
(n!)2
0

A straightforward calculation (integrating by parts) shows that

Z1
(n + k)!n!
(x(1 − x))n xk dx = .
(2n + k + 1)!
0

Z1
n (n!)2
Thus, (x(1 − x)) dx = and desired limit is equal to lim Ln (f ) . Next,
(2n + 1)! n→∞
0
(n + 1)(n + 2) . . . (n + k) 1
lim Ln (xk ) = lim = k .
n→∞ n→∞ (2n + 2)(2n + 3) . . . (2n + k + 1) 2
 
1
According to linearity of the integral and of the limit, lim Ln (P ) = P for every
n→∞ 2
polynomial P (x) .
Finally, fix an arbitrary ε > 0. A polynomial P can be chosen such that
|f (x) − P (x)| < ε for every x ∈ [0, 1] . Then

|Ln (f ) − Ln (P )| ≤ Ln (|f − P |) < Ln (ε · I) = ε , where I(x) = 1, for every x ∈ [0, 1] .


 
1
There exists n0 such that Ln (P ) − P < ε for n ≥ n0 . For these integers
2
       
Ln (f ) − f 1 ≤ |Ln (f ) − Ln (P )| + Ln (P ) − P 1 + f 1 − P 1 < 3ε ,

2 2 2 2

which concludes the proof.

***

Problem 2
Let P be a real polynomial of degree five. Assume that the graph of P has three inflection
points lying on a straight line. Calculate the ratios of the areas of the bounded regions between
this line and the graph of the polynomial P.

Solution Denote the inflection points by A, B, and C. Let l : y = kx + n be the equation


of the line that passes through them. If B has coordinates (x0 , y0 ), the affine change

x 0 = x − x0 , y 0 = kx − y + n

transforms l into the x-axis, and the point B—into the origin. Then without loss of generality
it is sufficient to consider a fifth-degree polynomial f (x) with points of inflection (b, 0), (0, 0)
and (a, 0), with b < 0 < a. Obviously f 00 (x) = kx(x − a)(x − b), hence

k 5 k(a + b) 4 kab 3
f (x) = x − x + x + cx + d .
20 12 6
7ka4
By substituting the coordinates of the inflection points, we find d = 0, a + b = 0 and c = 60
and therefore
k 5 ka2 3 7ka4 k
f (x) = x − x + x= x(x2 − a2 )(3x2 − 7a2 ) .
20 6 60 60
Since f (x) turned out to be an odd function, the figures bounded by its graph and the x-axis
are pairwise equiareal. Two of the figures with unequal areas are
r
7
Ω1 : 0 ≤ x ≤ a, 0 ≤ y ≤ f (x); Ω2 : a ≤ x ≤ a , f (x) ≤ y ≤ 0.
3
We find a
ka6
Z
S1 = S(Ω1 ) = f (x) dx = ,
0 40
Z a√ 7
3 4ka6
S2 = S(Ω2 ) = − f (x) dx =
a 405
and conclude that S1 : S2 = 81 : 32.

***
Problem 3
Let SL2 (Z) = {A | A is a 2 × 2 matrix with integer entries and det A = 1} .
a) Find an example of matrices A, B, C ∈ SL2 (Z) such that A2 + B 2 = C 2 .
b) Show that there do not exist matrices A, B, C ∈ SL2 (Z) such that A4 + B 4 = C 4 .

Solution a) Yes. Example:


     
1 1 0 −1 0 −1
A= , B= , C= .
−1 0 1 1 1 0
b) No. Let us recall that every 2 × 2 matrix A satisfies A2 − (trA) A + (det A) E = 0 where
trA = a11 + a22 .
Suppose that A, B, C ∈ SL2 (Z) and A4 + B 4 = C 4 . Let a = trA, b = trB, c = trC . Then
A4 = (aA − E)2 = a2 A2 − 2aA + E = (a3 − 2a) A + (1 − a2 ) E and, after same expressions for
B 4 and C 4 have been substituted,

a3 − 2a A + b3 − 2b B + 2 − a2 − b2 E = c3 − 2c C + 1 − c2 E .
    

Calculating traces of both sides we obtain a4 + b4 − 4(a2 + b2 ) = c4 − 4c2 − 2 , so


a4 + b4 − c4 ≡ −2 ( mod 4) . Since for every integer k: k 4 ≡ 0 ( mod 4) or k 4 ≡ 1 ( mod 4) ,
then a and b are odd and c is even. But then a4 + b4 − 4(a2 + b2 ) ≡ 2 ( mod 8) and
c4 − 4c2 − 2 ≡ −2 ( mod 8) which is a contradiction.

***

Problem 4
Given the real numbers a1 , a2 , . . . , an and b1 , b2 , . . . , bn we define the n × n matrices A = (aij )
and B = (bij ) by

1, if aij ≥ 0,
aij = ai − bj and bij = for all i, j ∈ {1, 2, . . . , n}.
0, if aij < 0,

Consider C = (cij ) a matrix of the same order with elements 0 and 1 such that
n
X n
X n
X n
X
bij = cij , i ∈ {1, 2, . . . , n} and bij = cij , j ∈ {1, 2, . . . , n}.
j=1 j=1 i=1 i=1

Show that: n
X
a) aij (bij − cij ) = 0 and B = C.
i,j=1
b) B is invertible if and only if there exists two permutations σ and τ of the set {1, 2, . . . , n}
such that
bτ (1) ≤ aσ(1) < bτ (2) ≤ aσ(2) < · · · ≤ aσ(n−1) < bτ (n) ≤ aσ(n) .
Solution
(a) We have that
n n n n
! n n n
!
X X X X X X X
aij (bij − cij ) = ai bij − cij − bj bij − cij = 0. (1)
i,j=1 i=1 j=1 j=1 j=1 i=1 i=1
We study the sign of aij (bij − cij ).
If ai ≥ bj , then aij ≥ 0, bij = 1 and cij ∈ {0, 1}, hence aij (bij − cij ) ≥ 0.
If ai < bj , then aij < 0, bij = 0 and cij ∈ {0, 1}, hence aij (bij − cij ) ≥ 0.
Using (1), the conclusion is that

aij (bij − cij ) = 0, for all i, j ∈ {1, 2, . . . , n}. (2)

If aij 6= 0, then bij P ij = 0, then bij = 1 ≥ cij . Hence, bij ≥ cij for all i, j ∈
= cij . If aP
{1, 2, . . . , n} and since i,j=1 bij = ni,j=1 cij the final conclusion is that
n

bij = cij , for all i, j ∈ {1, 2, . . . , n}.

(b) We may assume that a1 ≤ a2 ≤ . . . ≤ an and b1 ≤ b2 ≤ . . . ≤ bn since any permutation of


a1 , a2 , . . . , an permutes the lines of B and any permutation of b1 , b2 , . . . , bn permutes the columns
of B, which does not change whether B is invertible or not.

• If there exists i such that ai = ai+1 , then the lines i and i + 1 in B are equal, so B is not
invertible. In the same way, if there exists j such bj = bj+1 , then the columns j and j + 1
are equal, so B is not invertible.

• If there exists i such that there is no bj with ai < bj ≤ ai+1 , then the lines i and i + 1 in
B are equal, so B is not invertible. In the same way, if there exists j such that there is
no ai with bj ≤ ai < bj+1 , then the columns j and j + 1 are equal, so B is not invertible.

• If a1 < b1 , then a1 < bj for any j ∈ {1, 2, . . . , n}, which means that the first line of B has
only zero elements, hence B is not invertible.

Therefore, if B is invertible, then a1 , a2 , . . . , an and b1 , b2 , . . . , bn separate each other

b1 ≤ a1 < b2 ≤ a2 < . . . ≤ an−1 < bn ≤ an . (3)

It is easy to check that if (3), then


 
1 0··· 0
0

 1 1··· 0 
0 
B=
 1 1··· 0 
1 
 .. .. ..
. . . .. 
 . . . . 
1 1 1 ··· 1

which is, obviously, invertible.


Concluding, B is invertible if and only if there exists a permutation ai1 , ai2 , . . . , ain of
a1 , a2 , . . . , an and a permutation bj1 , bj2 , . . . , bjn of b1 , b2 , . . . , bn such that

bj1 ≤ ai1 < bj2 ≤ ai2 < . . . ≤ ain−1 < bjn ≤ ain .
South Eastern European Mathematical
Olympiad for University Students
Plovdiv, Bulgaria
March 10, 2010

Problem 1. Let f0 : [0, 1] → R be a continuous function. Define the sequence of functions


fn : [0, 1] → R by
Z x
fn (x) = fn−1 (t) dt
0

for all integers n ≥ 1.

P∞
a) Prove that the series n=1 fn (x) is convergent for every x ∈ [0, 1].

P∞
b) Find an explicit formula for the sum of the series n=1 fn (x), x ∈ [0, 1].

0
Solution 1. a) Clearly fn = fn−1 for all n ∈ N. The function f0 is bounded, so there exists a
real positive number M such that |f0 (x)| ≤ M for every x ∈ [0, 1]. Then
Z x
|f1 (x)| ≤ |f0 (t)| dt ≤ M x, ∀x ∈ [0, 1],
0

x
x2
Z
|f2 (x)| ≤ |f1 (t)| dt ≤ M , ∀x ∈ [0, 1].
0 2

By induction, it is easy to see that

xn
|fn (x)| ≤ M , ∀x ∈ [0, 1], ∀n ∈ N.
n!

Therefore
M
max |fn (x)| ≤ , ∀n ∈ N.
x∈[0,1] n!
P∞ 1 P∞
The series n=1 n! is convergent, so the series n=1 fn is uniformly convergent on [0, 1].
P∞
P∞b) Denote by F : [0, 1] → R the sum of the series n=1 fn . The series of the derivatives
0
f
n=1 n is uniformly convergent on [0, 1], since

∞ ∞
0
X X
fn = fn
n=1 n=0

and the last series is uniformly convergent. Then the series ∞


P
n=1 fn can
R x be differentiated term
0 x −t

by term and F = F +f0 . By solving this equation, we find F (x) = e 0 f0 (t)e dt , x ∈ [0, 1].

1
Solution 2. We write
Z x Z t Z t1 Z tn−2
fn (x) = dt dt1 dt2 . . . f0 (tn−1 ) dtn−1
0 Z 0 Z 0 0

= ... f0 (tn−1 ) dt dt1 . . . dtn−1


0≤tn−1 ≤...≤t1 ≤t≤x
Z Z
= ... f0 (t) dt dt1 . . . dtn−1
0≤t≤t1 ≤...≤tn−1 ≤x
Z x Z x Z x Z x Z x
= f0 (t) dt dt1 dt2 . . . dtn−2 dtn−1
0 t t1 tn−3 tn−2
x
(x − t)n−1
Z
= f0 (t) dt.
0 (n − 1)!
Thus
N N
!
x
(x − t)n−1
X Z X
fn (x) = f0 (t) dt.
0 (n − 1)!
n=1 n=1
We have
N −1
x−t
X (x − t)n (x − t)N
e = + eθ , θ ∈ (0, x − t) ,
n! N!
n=0
N −1
X (x − t)n
→ ex−t , N → ∞.
n!
n=0
Hence
−1
Z N
!
x X (x − t)n
Z x Z x
(x − t)N
x−t
f0 (t) dt − f0 (t)e dt ≤ |f0 (t)|ex−t dt

n! N!

0 0 0
n=0
Z x
1
≤ |f0 (t)|ex−t dt → 0, N → ∞.
N! 0

Problem 2. Inside a square consider circles such that the sum of their circumferences is twice
the perimeter of the square.

a) Find the minimum number of circles having this property.

b) Prove that there exist infinitely many lines which intersect at least 3 of these circles.

Solution. a) Consider the circles C1 , C2 , . . . , Ck with diameters d1 , d2 , ..., dk , respectively. De-


note by s the length of the square side. By using the hypothesis, we get

π(d1 + d2 + · · · + dk ) = 8s.

Since di ≤ s for i = 1, . . . , k, we have

8s = π(d1 + d2 + · · · + dk ) ≤ πks,
8 ∼
which implies k ≥ = 2.54. Hence, there are at least 3 circles inside the square.
π
b) Project the circles onto one side of the square so that their images are their diameters.
Since the sum of the diameters is approximately 2.54s and there are at least three circles in the

2
square, there exists an interval where at least three diameters are overlapping. The lines, passing
through this interval and perpendicular to the side on which the diameters are projected, are
the required lines.

Problem 3. Denote by M2 (R) the set of all 2 × 2 matrices with real entries. Prove that:

a) for every A ∈ M2 (R) there exist B, C ∈ M2 (R) such that A = B 2 + C 2 ;


 
0 1
b) there do not exist B, C ∈ M2 (R) such that = B 2 + C 2 and BC = CB.
1 0

Solution. a) Recall that every 2 × 2 matrix A satisfies A2 − (trA) A + (det A) E = 0 . It is


clear that
det(A + tE) det A − t2
lim tr (A + tE) = +∞ and lim − t = lim = −∞ .
t→+∞ t→+∞ tr(A + tE) t→+∞ tr (A + tE)

Thus, for t large enough one has


 
1 2 det (A + tE)
A = (A + tE) − tE = (A + tE) + −t E
tr(A + tE) tr (A + tE)
!2 s !2
1 det (A + tE)
= p (A + tE) + t− (−E)
tr(A + tE) tr (A + tE)
!2 s  !2
1 det (A + tE) 0 1
= (A + tE) + t− .
−1 0
p
tr(A + tE) tr (A + tE)

b) No. For B, C ∈ M2 (R), consider B + iC, B − iC ∈ M2 (C) . If BC = CB then


(B + iC) (B − iC) = B 2 + C 2 . Thus

det B 2 + C 2 = det (B + iC) det (B − iC) = | B + iC | 2 ≥ 0,




 
0 1
which contradicts the fact that det = −1 .
1 0

Problem 4. Suppose that A and B are n × n matrices with integer entries, and det B 6= 0.
Prove that there exists m ∈ N such that the product AB −1 can be represented as
m
X
AB −1 = Nk−1 ,
k=1

where Nk are n × n matrices with integer entries for all k = 1, . . . , m, and Ni 6= Nj for i 6= j.

Solution. Suppose first that n = 1. Then we may consider the integer 1 × 1 matrices as integer
numbers. We shall prove that for given integers p and q we can find integers n1 , . . . , nm such
that pq = n11 + n12 + · · · + n1m and ni 6= nj for i 6= j.
In fact this is well known as the “Egyptian problem”. We write pq = 1q + 1q + · · · + 1q (p
times) and ensure different denominators in the last sum by using several times the equality
1 1 1 3 1 1 1
x = x+1 + x(x+1) . For example, 5 = 5 + 5 + 5 , where we keep the first fraction, we write
1 1 1 1 1 1 1 1
5 = 6 + 30 for the second fraction, and 5 = 7 + 42 + 31 + 930 for the third fraction. Finally,

3 1 1 1 1 1 1 1
= + + + + + + .
5 5 6 7 30 31 42 930

3
Now consider n > 1.
Case 1. Suppose that A is a nonsingular matrix. Denote by λ the least common multiple of
the denominators of the elements of the matrix A−1 . Hence the matrix C = λBA−1 is integer
and nonsingular, and one has
AB −1 = λC −1 .
According to the case n = 1, we can write
1 1 1
λ= + + ··· + ,
n1 n2 nm
where ni 6= nj for i 6= j. Then

AB −1 = (n1 C)−1 + (n2 C)−1 + · · · + (nm C)−1 .

It is easy to see that ni C 6= nj C for i 6= j.


Case 2. Now suppose that A is singular. First we will show that

A = Y + Z,

where Y and Z are nonsingular. If A = (aij ), for every i = 1, 2, . . . , n we choose an integer xi


such that xi 6= 0 and xi 6= aii . Define
 
 aij , if i < j  0, if i < j
yij = xi , if i = j and zij = aii − xi , if i = j
0, if i > j aij , if i > j.
 

Clearly, the matrices Y = (yij ) and Z = (zij ) are nonsingular. Moreover, A = Y + Z.


From Case 1 we have
k
X l
X
−1 −1 −1
YB = (nr C) , ZB = (mq D)−1 ,
r=1 q=1

where
k l
−1 −1
X 1 −1 −1
X 1
YB = λC , λ= and ZB = µD , µ= ,
nr mq
r=1 q=1

C and D are integer and nonsingular. Hence,


k
X l
X
AB −1 = (nr C)−1 + (mq D)−1 .
r=1 q=1

It remains to show that nr C 6= mq D for r = 1, 2, . . . , k and q = 1, 2, . . . , l. Indeed, assuming that


µm
nr C = mq D and recalling that mq > 0 we find D = m nr
q
C. Hence ZB −1 = µD−1 = nrq C −1 ,
 
µm µm µm
and then AB −1 = Y B −1 + ZB −1 = λC −1 + nrq C −1 = λ + nrq C −1 . We have λ + nrq > 0,
and C −1 is nonsingular. Then AB −1 is nonsingular, and therefore A is nonsingular. This is a
contradiction.

4
Sixth South Eastern European
Mathematical Olympiad for University Students
Blagoevgrad, Bulgaria
March 8, 2012

Problem 1. Let A = (aij ) be the n × n matrix, where aij is the remainder of the division of
ij + j i by 3 for i, j = 1, 2, . . . , n. Find the greatest n for which det A ̸= 0.

Solution. We show that ai+6,j = aij for all i, j = 1, 2, . . . , n. First note that if j ≡ 0 (mod 3) then
j i ≡ 0 (mod 3), and if j ≡ 1 or 2 (mod 3) then j 6 ≡ 1 (mod 3). Hence, j i (j 6 − 1) ≡ 0 (mod 3)
for j = 1, 2, . . . , n, and
ai+6,j ≡ (i + 6)j + j i+6 ≡ ij + j i ≡ aij (mod 3),
or ai+6,j = aij . Consequently, det A = 0 for n ≥ 7. By straightforward calculation, we see that
det A = 0 for n = 6 but det A ̸= 0 for n = 5, so the answer is n = 5.

Grading of Problem 1.
5p: Concluding that ∆n = 0 for each n ≥ 7
5p: Computing ∆5 = 12, ∆6 = 0
2p: Computing ∆3 = −10, ∆4 = 4 (in case none of the above is done)

Problem 2. Let an > 0, n ≥ 1. Consider the right triangles △A0 A1 A2 , △A0 A2 A3 , . . .,


△A0 An−1 An , . . ., as in the figure. (More precisely, for every n ≥ 2 the hypotenuse A0 An of
△A0 An−1 An is a leg of △A0 An An+1 with right angle ∠A0 An An+1 , and the vertices An−1 and
An+1 lie on the opposite sides of the straight line A0 An ; also, |An−1 An | = an for every n ≥ 1.)

An
an
An- 1 An+1
...

A2
a2

A1 a1 A0



Is it possible for the set of points {An | n ≥ 0} to be unbounded but the series m(∠An−1 A0 An )
n=2
to be convergent? Here m(∠ABC) denotes the measure of ∠ABC.

Note. A subset B of the plane is bounded if there is a disk D such that B ⊆ D.



∑n ∑ k ∑k
an
Solution. We have |A0 An | = a2i and m(∠An−1 A0 An ) = arctan √ .
i=1 n=2 n=2 a2
1 + · · · + a 2
n−1
The set of points {An | n ≥ 0} will be unbounded if and only if the sequence of the lengths of the
segments A0 An is unbounded. Put a2i = bi . Then the question ∑ can be reformulated as follows: Is
it possible for a series with positive terms to be such that ∞ i=1 bi = ∞ and

∑∞
bn
arctan < ∞.
b1 + · · · + bn−1
n=2
∑n
Denote sn = i=1 bi .Since arctan x ∼ x as x → 0, the question we need to ask is whether
∞ √
∑ √
sn −sn−1 sn −sn−1
one can have sn → ∞ as n → ∞ and sn−1 < ∞. Put sn−1 = un > 0. Then
n=2

sn−1 = 1 + un , ln sn − ln sn−1 =∑
sn 2 ln(1 + u2n ), ln sk = ln s1 + kn=2 ln(1 + u2n ). Finally, the question
∑∞
is whether it is possible to have ∞ n=2 ln(1+un ) = ∞ and
2
n=2 un < ∞. The answer is negative,
since ln(1 + x) ∼ x as x → 0 and un ≤ un ≤ 1 for large enough n.
2

∑∞
Different
∑∞ solution. Since n=2 m(∠A n−1 A0 An ) < ∞, there exists some large enough k for
n=k m(∠An−1 A0 An ) ≤ β < 2 . Then all the vertices An , n ≥ k − 1, lie inside the
π
which
triangle △A0 Ak−1 B, where the side Ak−1 B of △A0 Ak−1 B is a continuation of the side Ak−1 Ak
of △A0 Ak−1 Ak and ∠Ak−1 A0 B = β. Consequently, the set {An | n ≥ 0} is bounded which is a
contradiction.
B

Ak Ak+1

Ak- 1

A0

Grading of Problem 2.
1p: Noting that {An | n ≥ 0} is unbounded ⇔ |A0 An | is unbounded OR expressing |A0 An |
∑∞
1p: Observing that n=2 m(∠An−1 A0 An ) is convergent ⇔ A0 An tends to A0 B OR
expressing the angles by arctan
8p: Proving the assertion

Problem 3.
a) Prove that if k is an even positive integer and A is a real symmetric n × n matrix such that
(Tr(Ak ))k+1 = (Tr(Ak+1 ))k , then

An = Tr(A) An−1 .

b) Does the assertion from a) also hold for odd positive integers k?

Solution. a) Let k = 2l, l ≥ 1. Since A is a symmetric matrix all its eigenvalues λ1 , λ2 , . . . , λn


are real numbers. We have,

1 + λ2 + · · · + λn = a
Tr(A2l ) = λ2l 2l 2l
(1)

and
Tr(A2l+1 ) = λ2l+1
1 + λ2l+1
2 + · · · + λ2l+1
n = b. (2)
By (1) we get that a ≥ 0, so there is some a1 ≥ 0 such that a = a2l
1 . On the other hand, the
equality a2l+1 = b2l implies that (a2l+1
1 )2l = b2l and hence

b = ±a2l+1
1 = (±a1 )2l+1 and a = a2l 2l
1 = (±a1 ) .

2
Then equalities (1) and (2) become

1 + λ2 + · · · + λn = c
λ2l 2l 2l 2l
(3)

and
λ2l+1
1 + λ2l+1
2 + · · · + λ2l+1
n = c2l+1 , (4)
where c = ±a1 . We consider the following cases.
Case 1. If c = 0 then λ1 = · · · = λn = 0, so Tr(A) = 0 and we note that the characteristic
polynomial of A is fA (x) = xn . We have, based on the Cayley-Hamilton Theorem, that

An = 0 = Tr(A) An−1 .

Case 2. If c ̸= 0 then let xi = λi /c, i = 1, 2, . . . , n. In this case equalities (3) and (4) become

1 + x2 + · · · + xn = 1
x2l 2l 2l
(5)

and
x2l+1
1 + x2l+1
2 + · · · + x2l+1
n = 1. (6)
The equality (5) implies that |xi | ≤ 1 for all i = 1, 2, . . . , n. We have x2l ≥ x2l+1 for |x| ≤ 1
with equality reached when x = 0 or x = 1. Then, by (5), (6), and the previous observation,
we find without loss of generality that x1 = 1, x2 = x3 = · · · = xn = 0. Hence λ1 = c,
λ2 = · · · = λn = 0, and this implies that fA (x) = xn−1 (x − c) and Tr(A) = c. It follows, based
on the Cayley-Hamilton Theorem, that

fA (A) = An−1 (A − cIn ) = 0 ⇔ An = Tr(A) An−1 .

b) The answer to the question is negative. We give the following counterexample:


 
1 0 0
k = 1, A = 0 1 0  .
0 0 − 12

Grading of Problem 3.
3p: Reformulating the problem through eigenvalues:
(∑ )2l+1 (∑ )2l
λ2l
i = λ2l+1
i ⇒ ∀i : λni = (λ1 + · · · + λn )λin−1

4p: Only (λi ) = (0, . . . , 0, c, 0, . . . , 0) or (0, . . . , 0) are possible


3p: Finding a counterexample

Problem 4.

a) Compute
∫ 1( )n
1−x
lim n dx.
n→∞ 0 1+x

b) Let k ≥ 1 be an integer. Compute


∫ 1( )n
k+1 1−x
lim n xk dx.
n→∞ 0 1+x

3
1
Solution. a) The limit equals . The result follows immediately from b) for k = 0.
2
k! 1−x
b) The limit equals . We have, by the substitution = y, that
2k+1 1+x
∫ 1( )n ∫
1−x 1
dy
n k+1 k
x dx = 2n k+1
y n (1 − y)k
0 1+x 0 (1 + y)k+2
∫ 1
= 2nk+1 y n f (y)dy,
0

where
(1 − y)k
f (y) = .
(1 + y)k+2
We observe that
f (1) = f ′ (1) = · · · = f (k−1) (1) = 0. (7)
∫ 1
We integrate k times by parts y n f (y)dy, and by (7) we get
0
∫ 1 ∫ 1
n (−1)k
y f (y)dy = y n+k f (k) (y)dy.
0 (n + 1)(n + 2) . . . (n + k) 0

One more integration implies that


∫ 1
(−1)k
y n f (y)dy =
(n + 1)(n + 2) . . . (n + k)(n + k + 1)
0
( 1 ∫ 1 )
n+k+1

× f (y)y
(k)
− y n+k+1 (k+1)
f (y)dy
0 0

(−1)k f (k) (1)


=
(n + 1)(n + 2) . . . (n + k + 1)
∫ 1
(−1)k+1
+ y n+k+1 f (k+1) (y)dy.
(n + 1)(n + 2) . . . (n + k + 1) 0

It follows that ∫ 1
k+1
lim 2n y n f (y)dy = 2(−1)k f (k) (1),
n→∞ 0
since ∫ 1
lim y n+k+1 f (k+1) (y)dy = 0,
n→∞ 0

f (k+1) being continuous and hence bounded. Using Leibniz’s formula we get that
k!
f (k) (1) = (−1)k ,
2k+2
and the problem is solved.

Grading of Problem 4.
3p: For computing a)
7p: For computing b)

4
SEEMOUS 2013 PROBLEMS AND SOLUTIONS

Problem 1
Find all continuous functions f : [1; 8] ! R, such that
Z 2 Z 2 Z Z
2 8 2
f 2 (t3 )dt + 2 f (t3 )dt = f (t)dt (t2 1)2 dt:
1 1 3 1 1

Solution. Using the substitution t = u3 we get


Z Z 2 Z 2
2 8 2 3
f (t)dt = 2 u f (u )du = 2 t2 f (t3 )du:
3 1 1 1
Hence, by the assumptions,
Z 2
f 2 (t3 ) + (t2 1)2 + 2f (t3 ) 2t2 f (t3 ) dt = 0:
1
2
Since f 2 (t3 )+(t2 1)2 +2f (t3 ) 2t2 f (t3 ) = (f (t3 ))2 +(1 t2 )2 +2(1 t2 )f (t3 ) = f (t3 ) + 1 t2
0, we get
Z 2
2
f (t3 ) + 1 t2 dt = 0:
1
The continuity of f implies that f (t3 ) = t2 1, 1 t 2, thus, f (x) = x2=3 1, 1 x 8.
Remark. If the continuity assumption for f is replaced by Riemann integrability then
in…nitely many f ’s would satisfy the given equality. For example if C is any closed nowhere
dense and of measure zero subset of [1; 8] (for example a …nite set or an appropriate Cantor type
set) then any function f such that f (x) = x2=3 1 for every x 2 [1; 8]nC satis…es the conditions.

Problem 2
Let M; N 2 M2 (C) be two nonzero matrices such that
M 2 = N 2 = 02 and M N + N M = I2
where 02 is the 2 2 zero matrix and I2 the 2 2 unit matrix. Prove that there is an invertible
matrix A 2 M2 (C) such that
0 1 1 0 0 1
M =A A and N = A A :
0 0 1 0

First solution. Consider f; g : C2 ! C2 given by f (x) = M x and g(x) = N x.


We have f 2 = g 2 = 0 and f g + gf = idC2 ; composing the last relation (to the left, for instance)
with f g we …nd that (f g)2 = f g, so f g is a projection of C2 .
If f g were zero, then gf = idC2 , so f and g would be invertible, thus contradicting f 2 = 0.
Therefore, f g is nonzero. Let u 2 Im(f g) n f0g and w 2 C2 such that u = f g(w). We obtain
f g(u) = (f g)2 (w) = f g(w) = u. Let v = g(u). The vector v is nonzero, because otherwise we
obtain u = f (v) = 0.
Moreover, u and v are not collinear since v = u with 2 C implies u = f (v) = f ( u) =
f (u) = f 2 (g(w)) = 0, a contradiction.
Let us now consider the ordered basis B of C2 consisting of u and v.
We have f (u) = f 2 (g(u)) = 0, f (v) = f (g(u)) = u, g(u) = v and g(v) = g 2 (u) = 0.
0 1 0 0
Therefore, the matrices of f and g with respect to B are and , respectively.
0 0 1 0
We take A to be the change of base matrix from the standard basis of C2 to B and we are
done.

1
2

0 1 0 0
Second solution. Let us denote by E12 and by E21 . Since M 2 = N 2 =
0 0 1 0
02 and M; N 6= 02 , the minimal polynomials of both M and N are equal to x2 . Therefore, there
are invertible matrices B; C 2 M2 (C) such that M = BE12 B 1 and N = CE21 C 1 .
Note that B and C are not uniquely determined. If B1 E12 B1 1 = B2 E12 B2 1 , then (B1 1 B2 )E12 =
a b 0 a
E12 (B1 1 B2 ); putting B1 1 B2 = , the last relation is equivalent to =
c d 0 c
c d
. Consequently, B1 E12 B1 1 = B2 E12 B2 1 if and only if there exist a 2 C f0g and
0 0
b 2 C such that
a b
B2 = B1 : ( )
0 a
Similarly, C1 E21 C1 1 = C2 E21 C2 1 if and only if there exist 2C f0g and 2 C such that
0
C2 = C1 : ( )

Now, M N + N M = I2 , M = BE12 B 1 and N = CE21 C 1 give


1 1 1 1
BE12 B CE21 C + CE21 C BE12 B = I2 ;
or
1 1 1 1
E12 B CE21 C B+B CE21 C BE12 = I2 :
1C x y
If B = , the previous relation means
z t
z t 0 0 y 0 0 t
+ = (xt yz)I2 6= 02 :
0 0 t y t 0 0 z
After computations we …nd this to be equivalent to xt yz = t2 6= 0. Consequently, there are
y; z 2 C and t 2 C f0g such that
t + yz
t y
C=B : ( )
z t
According to ( ) and ( ), our problem is equivalent to …nding a; 2 C f0g and b; 2 C
0 a b
such that C = B . Taking relation ( ) into account, we need to …nd
0 a
a; 2 C f0g and b; 2 C such that
t + yz
t y 0 a b
B =B ;
z t 0 a
or, B being invertible,
t + yz
t y 0 a b
= :
z t 0 a
8 yz
>
> t+ + y=a
>
< t
This means y=b ;
>
> z+ t=0
>
:
t=a 8
< y=b
and these conditions are equivalent to z= t .
:
t=a
z
It is now enough to choose = 1, a = t, b = y and = .
t
3

Third Solution. Let f; g be as in the …rst solution. Since f 2 = 0 there exists a nonzero
v1 2Kerf so f (v1 ) = 0 and setting v2 = g(v1 ) we get
f (v2 ) = (f g + gf )(v1 ) = v1 6= 0
by the assumptions (and so v2 6= 0). Also
g(v2 ) = g 2 (v1 ) = 0
and so to complete the proof it su¢ ces to show that v1 and v2 are linearly independent, because
then the matrices of f; g with respect to the ordered basis (v1 ; v2 ) would be E12 and E21 respec-
tively, according to the above relations. But if v2 = v1 then 0 = g(v2 ) = g(v1 ) = v2 so since
v2 6= 0; must be 0 which gives v2 = 0v1 = 0 contradiction. This completes the proof.
Remark. A nonelementary solution of this problem can be given by observing that the
conditions on M; N imply that the correspondence I2 ! I2 ; M ! E12 and N ! E21 extends
to an isomorphism between the subalgebras of M2 (C) generated by I2 ; M; N and I2 ; E12 ; E21
respectively, and then one can apply Noether-Skolem Theorem to show that this isomorphism
is actually conjugation by an A 2 Gl2 (C) etc.

Problem 3
Find the maximum value of
Z 1
1
jf 0 (x)j2 jf (x)j p dx
0 x
over all continuously di¤ erentiable functions f : [0; 1] ! R with f (0) = 0 and
Z 1
jf 0 (x)j2 dx 1: ( )
0

Solution. For x 2 [0; 1] let Z x


g(x) = jf 0 (t)j2 dt:
0
Then for x 2 [0; 1] the Cauchy-Schwarz inequality gives
Z x Z x 1=2
p p
jf (x)j jf 0 (t)j dt jf 0 (t)j2 dt x= xg(x)1=2 :
0 0
Thus
Z 1 Z 1
0 2 1 2
jf (x)j jf (x)j p dx g(x)1=2 g 0 (x)dx = [g(1)3=2 g(0)3=2 ]
0 x 0 3
Z 1 3=2
2 2
= jf 0 (t)j2 dt :
3 0 3
by ( ). The maximum is achieved by the function f (x) = x.
R1
Remark. If the condition ( ) is replaced by 0 jf 0 (x)j p dx 1 with 0 < p < 2 …xed, then
the given expression would have supremum equal to +1, as it can be seen by considering
continuously di¤erentiable functions that approximate the functions fM (x) = M x for 0 x
1 1 1
p
and p 1
for < x 1, where M can be an arbitrary large positive real number.
M M Mp

Problem 4
Let A 2 M2 (Q) such that there is n 2 N; n 6= 0, with An = I2 . Prove that either A2 = I2
or A3 = I2 :
4

First Solution. Let fA (x) = det(A xI2 ) = x2 sx + p 2 Q[x] be the characteristic


polynomial of A and let 1 ; 2 be its roots, also known as the eigenvalues of matrix A. We have
that 1 + 2 = s 2 Q and 1 2 = p 2 Q. We know, based on Cayley-Hamilton theorem, that
the matrix A satis…es the relation A2 sA + pI2 = 02 . For any eigenvalue 2 C there is an
eigenvector X 6= 0, such that AX = X. By induction we have that An X = n X and it follows
that n = 1. Thus, the eigenvalues of A satisfy the equalities
n n
1 = 2 = 1 ( ):
Is 1 2 R then we also have that 2 2 R and from ( ) we get that 1 = 2 = 1 (and note
that n must be odd) so A satis…es the equation (A + I2 )2 = A2 + 2A + I2 = 02 and it follows
that I2 = An = (A + I2 I2 )n = n(A + I2 ) I2 which gives A = I2 and hence A3 = I2 .
If 1 2 C n R then 2 = 1 2 C n R and since n1 = 1 we get that j 1;2 j = 1 and this implies
that 1;2 = cos t i sin t. Now we have the equalities 1 + 2 = 2 cos t = s 2 Q and n1 = 1
implies that cos nt + i sin nt = 1 which in turn implies that cos nt = 1. Using the equality
cos(n + 1)t + cos(n 1)t = 2 cos t cos nt we get that there is a polynomial Pn = xn + of
degree n with integer coe¢ cients such that 2 cos nt = Pn (2 cos t). Set x = 2 cos t and observe
that we have Pn (x) = 2 so x = 2 cos t is a rational root of an equation of the form xn + = 0.
However, the rational roots of this equation are integers, so x 2 Z and since jxj 2 we get that
2 cos t = 2; 1; 0; 1; 2.
When 2 cos t = 2 then 1;2 are real numbers (note that in this case 1 = 2 = 1 or
1 = 2 = 1) and this case was discussed above.
When 2 cos t = 0 we get that A2 + I2 = 02 so A2 = I2 :
When 2 cos t = 1 we get that A2 A + I2 = 02 which implies that (A + I2 )(A2 A + I2 ) = 02
so A3 = I2 .
When 2 cos t = 1 we get that A2 +A+I2 = 02 and this implies that (A I2 )(A2 +A+I2 ) = 02
so A3 = I2 . It follows that An 2 I2 ; A; A2 . However, An = I2 and this implies that either
A = I2 or A2 = I2 both of which contradict the equality A3 = I2 : This completes the
proof.
Remark. The polynomials Pn used in the above proof are related to the Chebyshev poly-
nomials, Tn (x) = cos(narccosx). One could also get the conclusion that 2 cos t is an integer by
considering the sequence xm = 2 cos(2m t) and noticing that since xm+1 = x2m 2, if x0 were a
a
noninteger rational (b > 1) in lowest terms then the denominator of xm in lowest terms would
m
b
be b2 and this contradicts the fact that xm must be periodic since t is a rational multiple of :
Second Solution. Let mA (x) be the minimal polynomial of A. Since A2n I2 = (An +
I2 )(An I2 ) = 02 , mA (x) must be a divisor of x2n 1 which has no multiple roots. It is well
known that the monic irreducible over Q factors of x2n 1 are exactly the cyclotomic polynomials
d (x) where d divides 2n. Hence the irreducible over Q factors of mA (x) must be cyclotomic
polynomials and since the degree of mA (x) is at most 2 we conclude that mA (x) itself must be a
cyclotomic polynomial, say d (x) for some positive integer d with (d) = 1 or 2 (where is the
Euler totient function), (d) being the degree of d (x). But this implies that d 2 f1; 2; 3; 4; 6g
and since A; A3 cannot be equal to I2 we get that mA (x) 2 fx + 1; x2 + 1; x2 x + 1g and this
implies that either A2 = I2 or A3 = I2 .
International Mathematics
Competition for
University Students

1994-2014
International Competition in Mathematics for
Universtiy Students
in
Plovdiv, Bulgaria
1994
1

PROBLEMS AND SOLUTIONS

First day — July 29, 1994

Problem 1. (13 points)


a) Let A be a n × n, n ≥ 2, symmetric, invertible matrix with real
positive elements. Show that zn ≤ n2 − 2n, where zn is the number of zero
elements in A−1 .
b) How many zero elements are there in the inverse of the n × n matrix

1 1 1 1 ... 1
 

 1 2 2 2 ... 2 

 1 2 1 1 ... 1 
A= ?
 


1 2 1 2 ... 2 

 .................... 
1 2 1 2 ... ...

Solution. Denote by aij and bij the elements of A and A−1 , respectively.
n
P
Then for k 6= m we have aki bim = 0 and from the positivity of aij we
i=0
conclude that at least one of {bim : i = 1, 2, . . . , n} is positive and at least
one is negative. Hence we have at least two non-zero elements in every
column of A−1 . This proves part a). For part b) all b ij are zero except
b1,1 = 2, bn,n = (−1)n , bi,i+1 = bi+1,i = (−1)i for i = 1, 2, . . . , n − 1.

Problem 2. (13 points)


Let f ∈ C 1 (a, b), lim f (x) = +∞, lim f (x) = −∞ and
x→a+ x→b−
f 0 (x) + f 2 (x) ≥ −1 for x ∈ (a, b). Prove that b − a ≥ π and give an example
where b − a = π.
Solution. From the inequality we get

d f 0 (x)
(arctg f (x) + x) = +1≥0
dx 1 + f 2 (x)

for x ∈ (a, b). Thus arctg f (x)+x is non-decreasing in the interval and using
π π
the limits we get + a ≤ − + b. Hence b − a ≥ π. One has equality for
2 2
f (x) = cotg x, a = 0, b = π.

Problem 3. (13 points)


2

Given a set S of 2n − 1, n ∈ N, different irrational numbers. Prove


that there are n different elements x 1 , x2 , . . . , xn ∈ S such that for all non-
negative rational numbers a1 , a2 , . . . , an with a1 + a2 + · · · + an > 0 we have
that a1 x1 + a2 x2 + · · · + an xn is an irrational number.
Solution. Let I be the set of irrational numbers, Q – the set of rational
numbers, Q+ = Q ∩ [0, ∞). We work by induction. For n = 1 the statement
is trivial. Let it be true for n − 1. We start to prove it for n. From the
induction argument there are n − 1 different elements x 1 , x2 , . . . , xn−1 ∈ S
such that

a1 x1 + a2 x2 + · · · + an−1 xn−1 ∈ I
(1)
for all a1 , a2 , . . . , an ∈ Q+ with a1 + a2 + · · · + an−1 > 0.

Denote the other elements of S by xn , xn+1 , . . . , x2n−1 . Assume the state-


ment is not true for n. Then for k = 0, 1, . . . , n − 1 there are r k ∈ Q such
that
n−1 n−1
bik xi + ck xn+k = rk for some bik , ck ∈ Q+ ,
X X
(2) bik + ck > 0.
i=1 i=1

Also
n−1 n−1
dk xn+k = R for some dk ∈ Q+ ,
X X
(3) dk > 0, R ∈ Q.
k=0 k=0

If in (2) ck = 0 then (2) contradicts (1). Thus ck 6= 0 and without loss of


n−1
generality one may take ck = 1. In (2) also bik > 0 in view of xn+k ∈ I.
P
i=1
Replacing (2) in (3) we get

n−1 n−1 n−1 n−1


! !
X X X X
dk − bik xi + rk = R or dk bik xi ∈ Q,
k=0 i=1 i=1 k=0

which contradicts (1) because of the conditions on b 0 s and d0 s.

Problem 4. (18 points)


Let α ∈ R \ {0} and suppose that F and G are linear maps (operators)
from Rn into Rn satisfying F ◦ G − G ◦ F = αF .
a) Show that for all k ∈ N one has F k ◦ G − G ◦ F k = αkF k .
b) Show that there exists k ≥ 1 such that F k = 0.
3

Solution. For a) using the assumptions we have


k  
Fk ◦ G − G ◦ Fk = F k−i+1 ◦ G ◦ F i−1 − F k−i ◦ G ◦ F i =
X

i=1
k
F k−i ◦ (F ◦ G − G ◦ F ) ◦ F i−1 =
X
=
i=1
k
F k−i ◦ αF ◦ F i−1 = αkF k .
X
=
i=1

b) Consider the linear operator L(F ) = F ◦G−G◦F acting over all n×n
matrices F . It may have at most n2 different eigenvalues. Assuming that
F k 6= 0 for every k we get that L has infinitely many different eigenvalues
αk in view of a) – a contradiction.

Problem 5. (18 points)


a) Let f ∈ C[0, b], g ∈ C(R) and let g be periodic with period b. Prove
Z b
that f (x)g(nx)dx has a limit as n → ∞ and
0
Z b 1
Z b Z b
lim f (x)g(nx)dx = f (x)dx · g(x)dx.
n→∞ 0 b 0 0

b) Find Z π sin x
lim dx.
n→∞ 0 1 + 3cos 2 nx
Z b
Solution. Set kgk1 = |g(x)|dx and
0

ω(f, t) = sup {|f (x) − f (y)| : x, y ∈ [0, b], |x − y| ≤ t} .

In view of the uniform continuity of f we have ω(f, t) → 0 as t → 0. Using


the periodicity of g we get
Z b n Z
X bk/n
f (x)g(nx)dx = f (x)g(nx)dx
0 k=1 b(k−1)/n
n
X Z bk/n n Z
X bk/n
= f (bk/n) g(nx)dx + {f (x) − f (bk/n)}g(nx)dx
k=1 b(k−1)/n k=1 b(k−1)/n
n b
1X
Z
= f (bk/n) g(x)dx + O(ω(f, b/n)kgk1 )
n k=1 0
4

n bk/n b
1X
Z Z
= f (x)dx g(x)dx
b k=1 b(k−1)/n 0
n
!Z
1X b
Z bk/n b
+ f (bk/n) − f (x)dx g(x)dx + O(ω(f, b/n)kgk1 )
b k=1 n b(k−1)/n 0

1
Z b Z b
= f (x)dx g(x)dx + O(ω(f, b/n)kgk1 ).
b 0 0

This proves a). For b) we set b = π, f (x) = sin x, g(x) = (1 + 3cos 2 x)−1 .
From a) and
Z π Z π π
sin xdx = 2, (1 + 3cos 2 x)−1 dx =
0 0 2
we get Z π sin x
lim dx = 1.
n→∞ 0 1 + 3cos 2 nx

Problem 6. (25 points)


Let f ∈ C 2 [0, N ] and |f 0 (x)| < 1, f 00 (x) > 0 for every x ∈ [0, N ]. Let
0 ≤ m0 < m1 < · · · < mk ≤ N be integers such that ni = f (mi ) are also
integers for i = 0, 1, . . . , k. Denote b i = ni − ni−1 and ai = mi − mi−1 for
i = 1, 2, . . . , k.
a) Prove that
b1 b2 bk
−1 < < < ··· < < 1.
a1 a2 ak
b) Prove that for every choice of A > 1 there are no more than N/A
indices j such that aj > A.
c) Prove that k ≤ 3N 2/3 (i.e. there are no more than 3N 2/3 integer
points on the curve y = f (x), x ∈ [0, N ]).
Solution. a) For i = 1, 2, . . . , k we have

bi = f (mi ) − f (mi−1 ) = (mi − mi−1 )f 0 (xi )

bi bi
for some xi ∈ (mi−1 , mi ). Hence = f 0 (xi ) and so −1 < < 1. From the
ai ai
bi
convexity of f we have that f 0 is increasing and = f 0 (xi ) < f 0 (xi+1 ) =
ai
bi+1
because of xi < mi < xi+1 .
ai+1
5

b) Set SA = {j ∈ {0, 1, . . . , k} : aj > A}. Then


k
X X
N ≥ m k − m0 = ai ≥ aj > A|SA |
i=1 j∈SA

and hence |SA | < N/A.


c) All different fractions in (−1, 1) with denominators less or equal A are
no more 2A2 . Using b) we get k < N/A + 2A2 . Put A = N 1/3 in the above
estimate and get k < 3N 2/3 .

Second day — July 30, 1994

Problem 1. (14 points)


Let f ∈ C 1 [a, b], f (a) = 0 and suppose that λ ∈ R, λ > 0, is such that

|f 0 (x)| ≤ λ|f (x)|

for all x ∈ [a, b]. Is it true that f (x) = 0 for all x ∈ [a, b]?
Solution. Assume that there is y ∈ (a, b] such that f (y) 6= 0. Without
loss of generality we have f (y) > 0. In view of the continuity of f there exists
c ∈ [a, y) such that f (c) = 0 and f (x) > 0 for x ∈ (c, y]. For x ∈ (c, y] we
have |f 0 (x)| ≤ λf (x). This implies that the function g(x) = ln f (x) − λx is
f 0 (x)
not increasing in (c, y] because of g 0 (x) = −λ ≤ 0. Thus ln f (x)−λx ≥
f (x)
ln f (y) − λy and f (x) ≥ eλx−λy f (y) for x ∈ (c, y]. Thus

0 = f (c) = f (c + 0) ≥ eλc−λy f (y) > 0

— a contradiction. Hence one has f (x) = 0 for all x ∈ [a, b].

Problem 2. (14 points)


Let f : R2 → R be given by f (x, y) = (x2 − y 2 )e−x −y .
2 2

a) Prove that f attains its minimum and its maximum.


∂f ∂f
b) Determine all points (x, y) such that (x, y) = (x, y) = 0 and
∂x ∂y
determine for which of them f has global or local minimum or maximum.
Solution. We have f (1, 0) = e−1 , f (0, 1) = −e−1 and te−t ≤ 2e−2 for
2 2
t ≥ 2. Therefore |f (x, y)| ≤ (x2 + y 2 )e−x −y ≤ 2e−2 < e−1 for (x, y) ∈
/
M = {(u, v) : u2 + v 2 ≤ 2} and f cannot attain its minimum and its
6

maximum outside M . Part a) follows from the compactness of M and the


∂f
continuity of f . Let (x, y) be a point from part b). From (x, y) =
2 2
∂x
2x(1 − x2 + y 2 )e−x −y we get

(1) x(1 − x2 + y 2 ) = 0.

Similarly

(2) y(1 + x2 − y 2 ) = 0.

All solutions (x, y) of the system (1), (2) are (0, 0), (0, 1), (0, −1), (1, 0)
and (−1, 0). One has f (1, 0) = f (−1, 0) = e −1 and f has global maximum
at the points (1, 0) and (−1, 0). One has f (0, 1) = f (0, −1) = −e −1 and
f has global minimum at the points (0, 1) and (0, −1). The point (0, 0)
2
is not an extrema point because of f (x, 0) = x 2 e−x > 0 if x 6= 0 and
2
f (y, 0) = −y 2 e−y < 0 if y 6= 0.

Problem 3. (14 points)


Let f be a real-valued function with n + 1 derivatives at each point of
R. Show that for each pair of real numbers a, b, a < b, such that
!
f (b) + f 0 (b) + · · · + f (n) (b)
ln =b−a
f (a) + f 0 (a) + · · · + f (n) (a)

there is a number c in the open interval (a, b) for which

f (n+1) (c) = f (c).

Note that ln denotes the natural logarithm.


 
Solution. Set g(x) = f (x) + f 0 (x) + · · · + f (n) (x) e−x . From the
assumption one get g(a) = g(b). Then there exists c ∈ (a, b) such
 that
0 0
g (c) = 0. Replacing in the last equality g (x) = f (n+1) (x) − f (x) e−x we
finish the proof.

Problem 4. (18 points)


Let A be a n × n diagonal matrix with characteristic polynomial

(x − c1 )d1 (x − c2 )d2 . . . (x − ck )dk ,

where c1 , c2 , . . . , ck are distinct (which means that c1 appears d1 times on the


diagonal, c2 appears d2 times on the diagonal, etc. and d1 +d2 +· · ·+dk = n).
7

Let V be the space of all n × n matrices B such that AB = BA. Prove that
the dimension of V is
d21 + d22 + · · · + d2k .

Solution. Set A = (aij )ni,j=1 , B = (bij )ni,j=1 , AB = (xij )ni,j=1 and


BA = (yij )ni,j=1 . Then xij = aii bij and yij = ajj bij . Thus AB = BA is
equivalent to (aii − ajj )bij = 0 for i, j = 1, 2, . . . , n. Therefore bij = 0 if
aii 6= ajj and bij may be arbitrary if aii = ajj . The number of indices (i, j)
for which aii = ajj = cm for some m = 1, 2, . . . , k is d2m . This gives the
desired result.

Problem 5. (18 points)


Let x1 , x2 , . . . , xk be vectors of m-dimensional Euclidian space, such that
x1 +x2 +· · ·+xk = 0. Show that there exists a permutation π of the integers
{1, 2, . . . , k} such that
n k
!1/2
X
2
X
xπ(i) ≤ kxi k for each n = 1, 2, . . . , k.



i=1 i=1

Note that k · k denotes the Euclidian norm.


Solution. We define π inductively. Set π(1) = 1. Assume π is defined
for i = 1, 2, . . . , n and also
2
n n

X
kxπ(i) k2 .
X
(1) xπ(i) ≤



i=1 i=1

Note (1) is true for n = 1. We choose π(n + 1) in a way that (1) is fulfilled
n
P
with n + 1 instead of n. Set y = xπ(i) and A = {1, 2, . . . , k} \ {π(i) : i =
i=1 !
1, 2, . . . , n}. Assume that (y, xr ) > 0 for all r ∈ A. Then y,
P
xr >0
r∈A
and in view of y +
P
xr = 0 one gets −(y, y) > 0, which is impossible.
r∈A
Therefore there is r ∈ A such that

(2) (y, xr ) ≤ 0.

Put π(n + 1) = r. Then using (2) and (1) we have


2
n+1


xπ(i) = ky + xr k2 = kyk2 + 2(y, xr ) + kxr k2 ≤ kyk2 + kxr k2 ≤
X


i=1
8

n n+1
kxπ(i) k2 + kxr k2 = kxπ(i) k2 ,
X X

i=1 i=1
which verifies (1) for n + 1. Thus we define π for every n = 1, 2, . . . , k.
Finally from (1) we get
2
n n k

X
kxπ(i) k2 ≤ kxi k2 .
X X
xπ(i) ≤



i=1 i=1 i=1

Problem 6. (22 points)


ln2 N NX−2
1
Find lim . Note that ln denotes the natural
N →∞ N ln k · ln(N − k)
k=2
logarithm.
Solution. Obviously

ln2 N NX
−2
1 ln2 N N − 3 3
(1) AN = ≥ · 2 =1− .
N k=2 ln k · ln(N − k) N ln N N

1
Take M , 2 ≤ M < N/2. Then using that is decreasing in
ln k · ln(N − k)
[2, N/2] and the symmetry with respect to N/2 one get
 
M N −M N
ln2 N  X X−1 X −2 
1
AN = + + ≤
N k=2 k=M +1 k=N −M  ln k · ln(N − k)

ln2 N M −1 N − 2M − 1
 
≤ 2 + ≤
N ln 2 · ln(N − 2) ln M · ln(N − M )
2 M ln N 2M ln N 1
   
≤ · + 1− +O .
ln 2 N N ln M ln N
N
 
Choose M = + 1 to get
ln2 N
2 ln N 1 ln ln N
     
(2) AN ≤ 1 − +O ≤ 1+O .
N ln2 N ln N − 2 ln ln N ln N ln N
Estimates (1) and (2) give

ln2 N NX−2
1
lim = 1.
N →∞ N ln k · ln(N − k)
k=2
International Competition in Mathematics for
Universtiy Students
in
Plovdiv, Bulgaria
1995
1

PROBLEMS AND SOLUTIONS

First day

Problem 1. (10 points)


Let X be a nonsingular matrix with columns X 1 , X2 , . . . , Xn . Let Y be a
matrix with columns X2 , X3 , . . . , Xn , 0. Show that the matrices A = Y X −1
and B = X −1 Y have rank n − 1 and have only 0’s for eigenvalues.
Solution. Let J = (aij ) be the n × n matrix where aij = 1 if i = j + 1
and aij = 0 otherwise. The rank of J is n − 1 and its only eigenvalues are
00 s. Moreover Y = XJ and A = Y X −1 = XJX −1 , B = X −1 Y = J. It
follows that both A and B have rank n − 1 with only 0 0 s for eigenvalues.

Problem 2. (15 points)


Let f be a continuous function on [0, 1] such that for every x ∈ [0, 1] we
Z 1 Z 1
1 − x2 1
have f (t)dt ≥ . Show that f 2 (t)dt ≥ .
x 2 0 3
Solution. From the inequality
Z 1 Z 1 Z 1 Z 1
0≤ (f (x) − x)2 dx = f 2 (x)dx − 2 xf (x)dx + x2 dx
0 0 0 0

we get
Z 1 Z 1 Z 1 Z 1 1
f 2 (x)dx ≥ 2 xf (x)dx − x2 dx = 2 xf (x)dx − .
0 0 0 0 3
Z 1Z Z Z
1 1 1 − x2 1
From the hypotheses we have f (t)dtdx ≥ dx or tf (t)dt ≥
0 x 0 2 0
1
. This completes the proof.
3

Problem 3. (15 points)


Let f be twice continuously differentiable on (0, +∞) such that
lim f 0 (x) = −∞ and lim f 00 (x) = +∞. Show that
x→0+ x→0+

f (x)
lim = 0.
x→0+ f 0 (x)
2

Solution. Since f 0 tends to −∞ and f 00 tends to +∞ as x tends to


0+, there exists an interval (0, r) such that f 0 (x) < 0 and f 00 (x) > 0 for all
x ∈ (0, r). Hence f is decreasing and f 0 is increasing on (0, r). By the mean
value theorem for every 0 < x < x0 < r we obtain

f (x) − f (x0 ) = f 0 (ξ)(x − x0 ) > 0,

for some ξ ∈ (x, x0 ). Taking into account that f 0 is increasing, f 0 (x) <
f 0 (ξ) < 0, we get

f 0 (ξ) f (x) − f (x0 )


x − x0 < 0
(x − x0 ) = < 0.
f (x) f 0 (x)

Taking limits as x tends to 0+ we obtain

f (x) f (x)
−x0 ≤ lim inf ≤ lim sup 0 ≤ 0.
x→0+ f 0 (x) x→0+ f (x)

f (x)
Since this happens for all x0 ∈ (0, r) we deduce that lim exists and
x→0+ f 0 (x)
f (x)
lim = 0.
x→0+ f 0 (x)

Problem 4. (15 points)


Let F : (1, ∞) → R be the function defined by
Z x2 dt
F (x) := .
x ln t

Show that F is one-to-one (i.e. injective) and find the range (i.e. set of
values) of F .
Solution. From the definition we have
x−1
F 0 (x) = , x > 1.
ln x
Therefore F 0 (x) > 0 for x ∈ (1, ∞). Thus F is strictly increasing and hence
one-to-one. Since
 
2 1 x2 − x
F (x) ≥ (x − x) min : x ≤ t ≤ x2 = →∞
ln t ln x2
3

as x → ∞, it follows that the range of F is (F (1+), ∞). In order to determine


F (1+) we substitute t = ev in the definition of F and we get
Z 2 ln x ev
F (x) = dv.
ln x v
Hence Z 2 ln x 1
F (x) < e2 ln x dv = x2 ln 2
ln x v
and similarly F (x) > x ln 2. Thus F (1+) = ln 2.

Problem 5. (20 points)


Let A and B be real n × n matrices. Assume that there exist n + 1
different real numbers t1 , t2 , . . . , tn+1 such that the matrices

Ci = A + ti B, i = 1, 2, . . . , n + 1,

are nilpotent (i.e. Cin = 0).


Show that both A and B are nilpotent.
Solution. We have that

(A + tB)n = An + tP1 + t2 P2 + · · · + tn−1 Pn−1 + tn B n

for some matrices P1 , P2 , . . . , Pn−1 not depending on t.


Assume that a, p1 , p2 , . . . , pn−1 , b are the (i, j)-th entries of the corre-
sponding matrices An , P1 , P2 , . . . , Pn−1 , B n . Then the polynomial

btn + pn−1 tn−1 + · · · + p2 t2 + p1 t + a

has at least n + 1 roots t1 , t2 , . . . , tn+1 . Hence all its coefficients vanish.


Therefore An = 0, B n = 0, Pi = 0; and A and B are nilpotent.

Problem 6. (25 points)


Let p > 1. Show that there exists a constant K p > 0 such that for every
x, y ∈ R satisfying |x|p + |y|p = 2, we have
 
(x − y)2 ≤ Kp 4 − (x + y)2 .
4

Solution. Let 0 < δ < 1. First we show that there exists K p,δ > 0 such
that
(x − y)2
f (x, y) = ≤ Kp,δ
4 − (x + y)2
for every (x, y) ∈ Dδ = {(x, y) : |x − y| ≥ δ, |x|p + |y|p = 2}.
Since Dδ is compact it is enough to show that f is continuous on D δ .
For this we show that the denominator of f p is different from zero. Assume
x + y
the contrary. Then |x + y| = 2, and = 1. Since p > 1, the function
2
x + y p p p
p
g(t) = |t| is strictly convex, in other words < |x| + |y| whenever

2 2
x + y p |x| p + |y|p
x 6= y. So for some (x, y) ∈ Dδ we have <
= 1 =
p 2 2
x + y

2 . We get a contradiction.
If x and y have different signs then (x, y) ∈ D δ for all 0 < δ < 1 because
then |x − y| ≥ max{|x|, |y|} ≥ 1 > δ. So we may further assume without loss
of generality that x > 0, y > 0 and xp + y p = 2. Set x = 1 + t. Then
 1/p
p 1/p p 1/p p(p−1) 2
y = (2 − x ) = (2 − (1 + t) ) = 2 − (1 + pt + t + o(t2 ))
2
 
1/p
p(p − 1) 2
= 1 − pt − t + o(t2 )
2
   
1 p(p − 1) 2 1 1
= 1+ −pt − t + o(t2 ) + − 1 (−pt + o(t))2 + o(t2 )
p 2 2p p
p−1 2 p − 1
= 1−t− t + o(t2 ) − t2 + o(t2 )
2 2
= 1 − t − (p − 1)t2 + o(t2 ).

We have
(x − y)2 = (2t + o(t))2 = 4t2 + o(t2 )
and

4−(x+y)2 =4−(2−(p−1)t2 +o(t2 ))2 =4−4+4(p−1)t2 +o(t2 )=4(p−1)t2 +o(t2 ).

So there exists δp > 0 such that if |t| < δp we have (x−y)2 < 5t2 , 4−(x+y)2 >
3(p − 1)t2 . Then
5 5
(∗) (x − y)2 < 5t2 = · 3(p − 1)t2 < (4 − (x + y)2 )
3(p − 1) 3(p − 1)
5

if |x − 1| < δp . From the symmetry we have that (∗) also holds when
|y − 1| < δp .
To finish the proof it is enough to show that |x − y| ≥ 2δ p whenever
|x − 1| ≥ δp , |y − 1| ≥ δp and xp + y p = 2. Indeed, p p
 sincepx + yp = 2p we have
x+y x +y
that max{x, y} ≥ 1. So let x − 1 ≥ δp . Since ≤ = 1 we
2 2
get x + y ≤ 2. Then x − y ≥ 2(x − 1) ≥ 2δp .

Second day

Problem 1. (10 points)


Let A be 3 × 3 real matrix such that the vectors Au and u are orthogonal
for each column vector u ∈ R3 . Prove that:
a) A> = −A, where A> denotes the transpose of the matrix A;
b) there exists a vector v ∈ R3 such that Au = v × u for every u ∈ R3 ,
where v × u denotes the vector product in R 3 .
Solution. a) Set A = (aij ), u = (u1 , u2 , u3 )> . If we use the orthogonal-
ity condition

(1) (Au, u) = 0

with ui = δik we get akk = 0. If we use (1) with ui = δik + δim we get

akk + akm + amk + amm = 0

and hence akm = −amk .


b) Set v1 = −a23 , v2 = a13 , v3 = −a12 . Then

Au = (v2 u3 − v3 u2 , v3 u1 − v1 u3 , v1 u2 − v2 u1 )> = v × u.

Problem 2. (15 points)


Let {bn }∞
n=0 beq
a sequence of positive real numbers such that b 0 = 1,
p p
bn = 2 + bn−1 − 2 1 + bn−1 . Calculate

X
bn 2n .
n=1
6


Solution. Put an = 1 + bn for n ≥ 0. Then an > 1, a0 = 2 and
q √ √
an = 1 + 1 + an−1 − 2 an−1 = an−1 ,

so an = 22
−n
. Then
N
X N
X N
X
bn 2n = (an − 1)2 2n = [a2n 2n − an 2n+1 + 2n ]
n=1 n=1 n=1
XN
= [(an−1 − 1)2n − (an − 1)2n+1 ]
n=1
22
−N
1 N +1 −1
= (a0 − 1)2 − (aN − 1)2 =2−2 .
2−N
Put x = 2−N . Then x → 0 as N → ∞ and so

!  
X 22 2x − 1
−N
N −1
bn 2 = lim 2−2 = lim 2 − 2 = 2 − 2 ln 2.
n=1
N →∞ 2−N x→0 x

Problem 3. (15 points)


Let all roots of an n-th degree polynomial P (z) with complex coefficients
lie on the unit circle in the complex plane. Prove that all roots of the
polynomial
2zP 0 (z) − nP (z)
lie on the same circle.
Solution. It is enough to consider only polynomials with leading coef-
ficient 1. Let P (z) = (z − α1 )(z − α2 ) . . . (z − αn ) with |αj | = 1, where the
complex numbers α1 , α2 , . . . , αn may coincide.
We have
Pe (z) ≡ 2zP 0 (z) − nP (z) = (z + α1 )(z − α2 ) . . . (z − αn ) +
+(z − α1 )(z + α2 ) . . . (z − αn ) + · · · + (z − α1 )(z − α2 ) . . . (z + αn ).
n
Pe (z) X z + αk z+α |z|2 − |α|2
Hence, = . Since Re = 2
for all complex z,
P (z) k=1
z − α k z − α |z − α|
n
Pe (z) X |z|2 − 1
α, z 6= α, we deduce that in our case Re = . From |z| 6= 1
P (z) k=1 |z − αk |2
Pe (z)
it follows that Re 6= 0. Hence Pe (z) = 0 implies |z| = 1.
P (z)
7

Problem 4. (15 points)


a) Prove that for every ε > 0 there is a positive integer n and real
numbers λ1 , . . . , λn such that

n
X
2k+1
max x − λk x < ε.
x∈[−1,1]
k=1

b) Prove that for every odd continuous function f on [−1, 1] and for every
ε > 0 there is a positive integer n and real numbers µ 1 , . . . , µn such that

n
X
2k+1
max f (x) − µk x < ε.
x∈[−1,1]
k=1

Recall that f is odd means that f (x) = −f (−x) for all x ∈ [−1, 1].
Solution. a) Let n be such that (1 − ε2 )n ≤ ε. Then 2 n
! |x(1 − x ) | < ε
n
for every x ∈ [−1, 1]. Thus one can set λ k = (−1)k+1 because then
k

n n
!
X X n 2k+1
2k+1 k
x− λk x = (−1) x = x(1 − x2 )n .
k=1 k=0
k

b) From the Weierstrass theorem there is a polynomial, say p ∈ Π m , such


that
ε
max |f (x) − p(x)| < .
x∈[−1,1] 2
1
Set q(x) = {p(x) − p(−x)}. Then
2
1 1
f (x) − q(x) = {f (x) − p(x)} − {f (−x) − p(−x)}
2 2
and
1 1 ε
(1) max |f (x) − q(x)| ≤ max |f (x) − p(x)| + max |f (−x) − p(−x)| < .
|x|≤1 2 |x|≤1 2 |x|≤1 2

But q is an odd polynomial in Πm and it can be written as


m
X m
X
q(x) = bk x2k+1 = b0 x + bk x2k+1 .
k=0 k=1
8

ε
If b0 = 0 then (1) proves b). If b0 6= 0 then one applies a) with instead
2|b0 |
of ε to get

Xn ε
2k+1
(2) max b0 x − b0 λk x <
|x|≤1 2
k=1

for appropriate n and λ1 , λ2 , . . . , λn . Now b) follows from (1) and (2) with
max{n, m} instead of n.

Problem 5. (10+15 points)


a) Prove that every function of the form

XN
a0
f (x) = + cos x + an cos (nx)
2 n=2

with |a0 | < 1, has positive as well as negative values in the period [0, 2π).
b) Prove that the function
100
X 3
F (x) = cos (n 2 x)
n=1

has at least 40 zeros in the interval (0, 1000).


Solution. a) Let us consider the integral
Z 2π
f (x)(1 ± cos x)dx = π(a0 ± 1).
0

The assumption that f (x) ≥ 0 implies a 0 ≥ 1. Similarly, if f (x) ≤ 0 then


a0 ≤ −1. In both cases we have a contradiction with the hypothesis of the
problem.
b) We shall prove that for each integer N and for each real number h ≥ 24
and each real number y the function
N
X 3
FN (x) = cos (xn 2 )
n=1

changes sign in the interval (y, y + h). The assertion will follow immediately
from here.
9

Consider the integrals


Z y+h Z y+h
I1 = FN (x)dx, I2 = FN (x)cos x dx.
y y

If FN (x) does not change sign in (y, y + h) then we have


Z Z
y+h y+h

|I2 | ≤ |FN (x)|dx = FN (x)dx = |I1 |.
y y

Hence, it is enough to prove that

|I2 | > |I1 |.

Obviously, for each α 6= 0 we have


Z
y+h 2

cos (αx)dx ≤ .
y |α|

Hence
 
XN Z y+h N
X Z ∞
3 1 dt
(1) |I1 | = cos (xn 2 )dx ≤ 2 3 < 2 1 + 3 = 6.
y n2 1 t2
n=1 n=1

On the other hand we have


N Z
X y+h 3
I2 = cos xcos (xn 2 )dx
n=1 y
Z
1 y+h
= (1 + cos (2x))dx +
2 y
N Z y+h     
1X 3 3
+ cos x(n 2 − 1) + cos x(n 2 + 1) dx
2 n=2 y
1
= h + ∆,
2
where
N
!! N
1 X 1 1 1 X 1
|∆| ≤ 1+2 3 + 3 ≤ +2 3 .
2 n=2 n −1
2 n +12 2 n=2 n 2 − 1
10

3 2 3
We use that n 2 − 1 ≥ n 2 for n ≥ 3 and we get
3
XN Z ∞
1 2 1 1 2 dt
|∆| ≤ + 3 +3 3 < + √ +3 3 < 6.
2 22 − 1 n=3 n 2
2 2 2−1 2 t2
Hence
1
(2) |I2 | > h − 6.
2
We use that h ≥ 24 and inequalities (1), (2) and we obtain |I 2 | > |I1 |. The
proof is completed.

Problem 6. (20 points)


Suppose that {fn }∞
n=1 is a sequence of continuous functions on the inter-
val [0, 1] such that
Z (
1 1 if n=m
fm (x)fn (x)dx =
0 0 if n 6= m
and
sup{|fn (x)| : x ∈ [0, 1] and n = 1, 2, . . .} < +∞.
Show that there exists no subsequence {f nk } of {fn } such that lim fnk (x)
k→∞
exists for all x ∈ [0, 1].
Solution. It is clear that one can add some functions, say {g m }, which
satisfy the hypothesis of the problem and the closure of the finite linear
combinations of {fn } ∪ {gm } is L2 [0, 1]. Therefore without loss of generality
we assume that {fn } generates L2 [0, 1].
Let us suppose that there is a subsequence {n k } and a function f such
that
fnk (x) −→ f (x) for every x ∈ [0, 1].
k→∞
Fix m ∈ N. From Lebesgue’s theorem we have
Z 1 Z 1
0= fm (x)fnk (x)dx −→ fm (x)f (x)dx.
0 k→∞ 0
Z 1
Hence fm (x)f (x)dx = 0 for every m ∈ N, which implies f (x) = 0 almost
0
everywhere. Using once more Lebesgue’s theorem we get
Z 1 Z 1
1= fn2k (x)dx −→ f 2 (x)dx = 0.
0 k→∞ 0
The contradiction proves the statement.
International Competition in Mathematics for
Universtiy Students
in
Plovdiv, Bulgaria
1996
1

PROBLEMS AND SOLUTIONS

First day — August 2, 1996

Problem 1. (10 points)


Let for j = 0, . . . , n, aj = a0 + jd, where a0 , d are fixed real numbers.
Put  
a0 a1 a2 . . . an
 a
 1 a0 a1 . . . an−1 

A =  a2 a1 a0 . . . an−2  .
 
 ........................... 
 

an an−1 an−2 . . . a0

Calculate det(A), where det(A) denotes the determinant of A.


Solution. Adding the first column of A to the last column we get that
 
a0 a1 a2 ... 1

 a1 a0 a1 ... 1 

det(A) = (a0 + an ) det  a2 a1 a0 ... 1 .
 
.......................
 
 
an an−1 an−2 . . . 1

Subtracting the n-th row of the above matrix from the (n+1)-st one, (n−1)-
st from n-th, . . . , first from second we obtain that
 
a0 a1 a2 . . . 1

 d −d −d . . . 0 

det(A) = (a0 + an ) det  d d −d . . . 0 .
 
....................
 
 
d d d ... 0

Hence,
 
d −d −d . . . −d

 d d −d . . . −d 

n
det(A) = (−1) (a0 + an ) det  d d d . . . −d .
 
....................
 
 
d d d ... d
2

Adding the last row of the above matrix to the other rows we have
 
2d 0 0 . . . 0

 2d 2d 0 . . . 0 

n
det(A) = (−1) (a0 +an ) det  2d 2d 2d . . . 0  = (−1)n (a0 +an )2n−1 dn .
 
...................
 
 
d d d ... d

Problem 2. (10 points)


Evaluate the definite integral
Z π sin nx
dx,
−π (1 + 2x )sin x

where n is a natural number.


Solution. We have
Z π
sin nx
In = x
dx
−π (1 + 2 )sin x
Z π Z 0
sin nx sin nx
= x
dx + x
dx.
0 (1 + 2 )sin x −π (1 + 2 )sin x

In the second integral we make the change of variable x = −x and obtain


Z π sin nx
Z π sin nx
In = dx + dx
0 (1 + 2x )sin x 0 (1 + 2−x )sin x
π (1 + 2x )sin nx
Z
= dx
0 (1 + 2x )sin x
Z π sin nx
= dx.
0 sin x
For n ≥ 2 we have
Z π sin nx − sin (n − 2)x
In − In−2 = dx
0 sin x
Z π
= 2 cos (n − 1)xdx = 0.
0

The answer (
0 if n is even,
In =
π if n is odd
3

follows from the above formula and I 0 = 0, I1 = π.


Problem 3. (15 points)
The linear operator A on the vector space V is called an involution if
A2 = E where E is the identity operator on V . Let dim V = n < ∞.
(i) Prove that for every involution A on V there exists a basis of V
consisting of eigenvectors of A.
(ii) Find the maximal number of distinct pairwise commuting involutions
on V .
Solution.
1
(i) Let B = (A + E). Then
2
1 2 1 1
B2 = (A + 2AE + E) = (2AE + 2E) = (A + E) = B.
4 4 2
Hence B is a projection. Thus there exists a basis of eigenvectors for B, and
the matrix of B in this basis is of the form diag(1, . . . , 1, 0, . . . , 0).
Since A = 2B − E the eigenvalues of A are ±1 only.
(ii) Let {Ai : i ∈ I} be a set of commuting diagonalizable operators
on V , and let A1 be one of these operators. Choose an eigenvalue λ of A 1
and denote Vλ = {v ∈ V : A1 v = λv}. Then Vλ is a subspace of V , and
since A1 Ai = Ai A1 for each i ∈ I we obtain that Vλ is invariant under each
Ai . If Vλ = V then A1 is either E or −E, and we can start with another
operator Ai . If Vλ 6= V we proceed by induction on dim V in order to find
a common eigenvector for all Ai . Therefore {Ai : i ∈ I} are simultaneously
diagonalizable.
If they are involutions then |I| ≤ 2n since the diagonal entries may equal
1 or -1 only.
Problem 4. (15 points)
1 n−1
X
Let a1 = 1, an = ak an−k for n ≥ 2. Show that
n k=1
(i) lim sup |an |1/n < 2−1/2 ;
n→∞
(ii) lim sup |an |1/n ≥ 2/3.
n→∞
Solution.
(i) We show by induction that

(∗) an ≤ q n for n ≥ 3,
4

1 1
where q = 0.7 and use that 0.7 < 2−1/2 . One has a1 = 1, a2 = , a3 = ,
2 3
11
a4 = . Therefore (∗) is true for n = 3 and n = 4. Assume (∗) is true for
48
n ≤ N − 1 for some N ≥ 5. Then

2 1 1 NX
−3
2 1 N −5 N
aN = aN −1 + aN −2 + ak aN −k ≤ q N −1 + q N −2 + q ≤ qN
N N N k=3 N N N

2 1
because + 2 ≤ 5.
q q
(ii) We show by induction that
an ≥ q n for n ≥ 2,
 2
2 1 2
where q = . One has a2 = > = q 2 . Going by induction we have
3 2 3
for N ≥ 3

2 1 NX
−2
2 N −3 N
aN = aN −1 + ak aN −k ≥ q N −1 + q = qN
N N k=2 N N

2
because = 3.
q
Problem 5. (25 points)
(i) Let a, b be real numbers such that b ≤ 0 and 1 + ax + bx 2 ≥ 0 for
every x in [0, 1]. Prove that
1

Z 1
if a < 0, −

2 n
lim n (1 + ax + bx ) dx = a
n→+∞  +∞
0 if a ≥ 0.
(ii) Let f : [0, 1] → [0, ∞) be a function with a continuous second
derivative and let f 00 (x) ≤ 0 for every x in [0, 1]. Suppose that L =
Z 1
lim n (f (x))n dx exists and 0 < L < +∞. Prove that f 0 has a con-
n→∞ 0
stant sign and min |f 0 (x)| = L−1 .
x∈[0,1]
Solution. (i) With a linear change of the variable (i) is equivalent to:
(i0 ) Let a, b, A be real numbers such that b ≤ 0, A > 0 and 1+ax+bx 2 > 0
Z A
for every x in [0, A]. Denote In = n (1 + ax + bx2 )n dx. Prove that
0
1
lim In = − when a < 0 and lim In = +∞ when a ≥ 0.
n→+∞ a n→+∞
5

Let a < 0. Set f (x) = eax − (1 + ax + bx2 ). Using that f (0) = f 0 (0) = 0
and f 00 (x) = a2 eax − 2b we get for x > 0 that

0 < eax − (1 + ax + bx2 ) < cx2

a2
where c = − b. Using the mean value theorem we get
2

0 < eanx − (1 + ax + bx2 )n < cx2 nea(n−1)x .

Therefore
Z A Z A Z A
anx 2 n 2
0<n e dx − n (1 + ax + bx ) dx < cn x2 ea(n−1)x dx.
0 0 0

Using that
A eanA − 1 1
Z
n eanx dx = −→ −
0 a n→∞ a

and Z A 1
Z ∞
x2 ea(n−1)x dx < t2 e−t dt
0 |a|3 (n − 1)3 0

we get (i0 )
in the case a < 0.
Let a ≥ 0. Then for n > max{A−2 , −b} − 1 we have

Z A Z √1
2 n n+1
n (1 + ax + bx ) dx > n (1 + bx2 )n dx
0 0
n
1 b

> n· √ · 1+
n+1 n+1
n b
> √ e −→ ∞.
n + 1 n→∞

(i) is proved.
Z 1
(ii) Denote In = n (f (x))n dx and M = max f (x).
0 x∈[0,1]
For M < 1 we have In ≤ nM n −→ 0, a contradiction.
n→∞
If M > 1 since f is continuous there exists an interval I ⊂ [0, 1] with
|I| > 0 such that f (x) > 1 for every x ∈ I. Then I n ≥ n|I| −→ +∞,
n→∞
a contradiction. Hence M = 1. Now we prove that f 0 has a constant
sign. Assume the opposite. Then f 0 (x0 ) = 0 for some x ∈ (0, 1). Then
6

h2 00
f (x0 ) = M = 1 because f 00 ≤ 0. For x0 + h in [0, 1], f (x0 + h) = 1 + f (ξ),
2
h2
ξ ∈ (x0 , x0 + h). Let m = min f 00 (x). So, f (x0 + h) ≥ 1 + 2 m.
x∈[0,1]
δ2
Let δ > 0 be such that 1 + m > 0 and x0 + δ < 1. Then
2
x0 +δ δ n
m 2
Z Z 
In ≥ n (f (x))n dx ≥ n 1+ h dh −→ ∞
x0 0 2 n→∞

in view of (i0 ) – a contradiction. Hence f is monotone and M = f (0) or


M = f (1).
Let M = f (0) = 1. For h in [0, 1]
m 2
1 + hf 0 (0) ≥ f (h) ≥ 1 + hf 0 (0) + h ,
2

where f 0 (0) 6= 0, because otherwise we get a contradiction as above. Since


f (0) = M the function f is decreasing and hence f 0 (0) < 0. Let 0 < A < 1
m
be such that 1 + Af 0 (0) + A2 > 0. Then
2
A A A n
m 2
Z Z Z
n (1 + hf 0 (0))n dh ≥ n (f (x))n dx ≥ n 1 + hf 0 (0) + h dh.
0 0 0 2

1
From (i0 ) the first and the third integral tend to − as n → ∞, hence
f 0 (0)
so does theZ second.
1 1
Also n (f (x))n dx ≤ n(f (A))n −→ 0 (f (A) < 1). We get L = −
A n→∞ f 0 (0)
in this case.
1
If M = f (1) we get in a similar way L = .
f 0 (1)
Problem 6. (25 points)
Upper content of a subset E of the plane R 2 is defined as
n
( )
X
C(E) = inf diam(Ei )
i=1

where inf is taken over all finite families of sets E 1 , . . . , En , n ∈ N, in R2


n
such that E ⊂ ∪ Ei .
i=1
7

Lower content of E is defined as

K(E) = sup {lenght(L) : L is a closed line segment


onto which E can be contracted} .

Show that
(a) C(L) = lenght(L) if L is a closed line segment;
(b) C(E) ≥ K(E);
(c) the equality in (b) needs not hold even if E is compact.
Hint. If E = T ∪ T 0 where T is the triangle with vertices (−2, 2), (2, 2)
and (0, 4), and T 0 is its reflexion about the x-axis, then C(E) = 8 > K(E).
Remarks: All distances used in this problem are Euclidian. Diameter
of a set E is diam(E) = sup{dist(x, y) : x, y ∈ E}. Contraction of a set E
to a set F is a mapping f : E 7→ F such that dist(f (x), f (y)) ≤ dist(x, y) for
all x, y ∈ E. A set E can be contracted onto a set F if there is a contraction
f of E to F which is onto, i.e., such that f (E) = F . Triangle is defined as
the union of the three segments joining its vertices, i.e., it does not contain
the interior.
Solution.
(a) The choice E1 = L gives C(L) ≤ lenght(L). If E ⊂ ∪ni=1 Ei then
n
X
diam(Ei ) ≥ lenght(L): By induction, n=1 obvious, and assuming that
i=1
En+1 contains the end point a of L, define the segment L ε = {x ∈ L :
n+1
X
dist(x, a) ≥ diam(En+1 )+ε} and use induction assumption to get diam(Ei ) ≥
i=1
lenght(Lε ) + diam(En+1 ) ≥ lenght(L) − ε; but ε > 0 is arbitrary.
(b) If f is a contraction of E onto L and E ⊂ ∪ nn=1 Ei , then L ⊂ ∪ni=1 f (Ei )
n
X n
X
and lenght(L) ≤ diam(f (Ei )) ≤ diam(Ei ).
i=1 i=1
(c1) Let E = T ∪ T 0 where T is the triangle with vertices (−2, 2), (2, 2)
n
and (0, 4), and T 0 is its reflexion about the x-axis. Suppose E ⊂ ∪ Ei .
i=1
If no set among Ei meets both T and T 0 , then Ei may be partitioned into
covers of segments [(−2, 2), (2, 2)] and [(−2, −2), (2, −2)], both of length 4,
n
X
so diam(Ei ) ≥ 8. If at least one set among Ei , say Ek , meets both T and
i=1
T 0 , choose a ∈ Ek ∩ T and b ∈ Ek ∩ T 0 and note that the sets Ei0 = Ei for
i 6= k, Ek0 = Ek ∪ [a, b] cover T ∪ T 0 ∪ [a, b], which is a set of upper content
8

at least 8, since its orthogonal projection onto y-axis is a segment of length


n
X
8. Since diam(Ej ) = diam(Ej0 ), we get diam(Ei ) ≥ 8.
i=1
(c2) Let f be a contraction of E onto L = [a 0 , b0 ]. Choose a = (a1 , a2 ),
b = (b1 , b2 ) ∈ E such that f (a) = a0 and f (b) = b0 . Since lenght(L) =
dist(a0 , b0 ) ≤ dist(a, b) and since the triangles have diameter only 4, we may
assume that a ∈ T and b ∈ T 0 . Observe that if a2 ≤ 3 then a lies on one of
the segments joining some of the points (−2, 2), (2, 2), (−1, 3), (1, 3); since
all these
√ points have distances from vertices, and √ so from points, of T 2 at
most 50, we get that lenght(L) ≤ dist(a, b) ≤ 50. Similarly if b2 ≥ −3.
Finally, if a2 > 3 and b2 < −3, we√note that every vertex, and so every point
of T is in the distance at most 10 for√a and every vertex, and so every
point, of T 0 is in the distance at most 10 of b. Since f is a contraction,

the image of T lies in a segment containing a 0 of length at most √ 10 and
the image of T 0 lies in a segment containing b0 of length at√most √10. Since
the union√of these two images is L, we get lenght(L) ≤ 2 10 ≤ 50. Thus
K(E) ≤ 50 < 8.

Second day — August 3, 1996

Problem 1. (10 points)


Prove that if f : [0, 1] → [0, 1] is a continuous function, then the sequence
of iterates xn+1 = f (xn ) converges if and only if

lim (xn+1 − xn ) = 0.
n→∞

Solution. The “only if” part is obvious. Now suppose that lim (xn+1
n→∞
−xn ) = 0 and the sequence {xn } does not converge. Then there are two
cluster points K < L. There must be points from the interval (K, L) in the
|f (x) − x|
sequence. There is an x ∈ (K, L) such that f (x) 6= x. Put ε = >
2
0. Then from the continuity of the function f we get that for some δ > 0 for
all y ∈ (x−δ, x+δ) it is |f (y)−y| > ε. On the other hand for n large enough
it is |xn+1 − xn | < 2δ and |f (xn ) − xn | = |xn+1 − xn | < ε. So the sequence
cannot come into the interval (x − δ, x + δ), but also cannot jump over this
interval. Then all cluster points have to be at most x − δ (a contradiction
with L being a cluster point), or at least x + δ (a contradiction with K being
a cluster point).
9

Problem 2. (10 points)


et + e−t
Let θ be a positive real number and let cosh t = denote the
2
hyperbolic cosine. Show that if k ∈ N and both cosh kθ and cosh (k + 1)θ
are rational, then so is cosh θ.
Solution. First we show that

(1) If cosh t is rational and m ∈ N, then cosh mt is rational.

Since cosh 0.t = cosh 0 = 1 ∈ Q and cosh 1.t = cosh t ∈ Q, (1) follows
inductively from

cosh (m + 1)t = 2cosh t.cosh mt − cosh (m − 1)t.

The statement of the problem is obvious for k = 1, so we consider k ≥ 2.


For any m we have
(2)
cosh θ = cosh ((m + 1)θ − mθ) =
= cosh (m + 1)θ.cosh mθ − sinh
p
(m + 1)θ.sinh mθ √
= cosh (m + 1)θ.cosh mθ − cosh 2 (m + 1)θ − 1. cosh 2 mθ − 1

Set cosh kθ = a, cosh (k + 1)θ = b, a, b ∈ Q. Then (2) with m = k gives


p p
cosh θ = ab − a2 − 1 b2 − 1

and then
(a2 − 1)(b2 − 1) = (ab − cosh θ)2
(3)
= a2 b2 − 2abcosh θ + cosh 2 θ.

Set cosh (k 2 − 1)θ = A, cosh k 2 θ = B. From (1) with m = k − 1 and


t = (k + 1)θ we have A ∈ Q. From (1) with m = k and t = kθ we have
B ∈ Q. Moreover k 2 − 1 > k implies A > a and B > b. Thus AB > ab.
From (2) with m = k 2 − 1 we have

(A2 − 1)(B 2 − 1) = (AB − cosh θ)2


(4)
= A2 B 2 − 2ABcosh θ + cosh 2 θ.

So after we cancel the cosh 2 θ from (3) and (4) we have a non-trivial
linear equation in cosh θ with rational coefficients.
10

Problem 3. (15 points)


Let G be the subgroup of GL2 (R), generated by A and B, where
" # " #
2 0 1 1
A= , B= .
0 1 0 1
!
a11 a12
Let H consist of those matrices in G for which a11 =a22 =1.
a21 a22
(a) Show that H is an abelian subgroup of G.
(b) Show that H is not finitely generated.
Remarks. GL2 (R) denotes, as usual, the group (under matrix multipli-
cation) of all 2 × 2 invertible matrices with real entries (elements). Abelian
means commutative. A group is finitely generated if there are a finite number
of elements of the group such that every other element of the group can be
obtained from these elements using the group operation.
Solution.
(a) All of the matrices in G are of the form
" #
∗ ∗
.
0 ∗

So all of the matrices in H are of the form


" #
1 x
M (x) = ,
0 1

so they commute. Since M (x)−1 = M (−x), H is a subgroup of G.


(b) A generator of H can only be of the form M (x), where x is a binary
p
rational, i.e., x = n with integer p and non-negative integer n. In H it
2
holds

M (x)M (y) = M (x + y)
M (x)M (y)−1 = M (x − y).

1
 
The matrices of the form M are in H for all n ∈ N. With only finite
2n
number of generators all of them cannot be achieved.
11

Problem 4. (20 points)


Let B be a bounded closed convex symmetric (with respect to the origin)
set in R2 with boundary the curve Γ. Let B have the property that the
ellipse of maximal area contained in B is the disc D of radius 1 centered at
the origin with boundary the circle C. Prove that A ∩ Γ 6= Ø for any arc A
π
of C of length l(A) ≥ .
2
Solution. Assume the contrary – there is an arc A ⊂ C with length
π
l(A) = such that A ⊂ B\Γ. Without loss of generality we may assume that
2 √ √ √ √
the ends of A are M = (1/ 2, 1/ 2), N = (1/ 2, −1/ 2). A is compact
and Γ is closed. From A ∩ Γ = Ø we get δ > 0 such that dist(x, y) > δ for
every x ∈ A, y ∈ Γ.
x2 y2
Given ε > 0 with Eε we denote the ellipse with boundary: 2
+ 2 = 1,
(1 + ε) b
such that M, N ∈ Eε . Since M ∈ Eε we get
(1 + ε)2
b2 = .
2(1 + ε)2 − 1
Then we have
(1 + ε)2
area Eε = π p > π = area D.
2(1 + ε)2 − 1
In view of the hypotheses, Eε \ B 6= Ø for every ε > 0. Let S = {(x, y) ∈
R2 : |x| > |y|}. ¿From Eε \ S ⊂ D ⊂ B it follows that Eε \ B ⊂ S. Taking
ε < δ we get that
Ø 6= Eε \ B ⊂ Eε ∩ S ⊂ D1+ε ∩ S ⊂ B
– a contradiction (we use the notation D t = {(x, y) ∈ R2 : x2 + y 2 ≤ t2 }).
Remark. The ellipse with maximal area is well known as John’s ellipse.
Any coincidence with the President of the Jury is accidental.
Problem 5. (20 points)
(i) Prove that

X nx 1
lim = .
x→+∞
n=1
(n2 + x) 2 2
(ii) Prove that there is a positive constant c such that for every x ∈ [1, ∞)
we have ∞
X nx 1 c
− ≤ .

2
(n + x) 2 2 x


n=1
12

Solution.
t 1
(i) Set f (t) = 2 2
, h = √ . Then
(1 + t ) x
∞ ∞
nx ∞ 1
X X Z
= h f (nh) −→ f (t)dt = .
n=1
(n2 + x)2 n=1
h→0 0 2


X
The convergence holds since h f (nh) is a Riemann sum of the inte-
n=1
Z ∞
gral f (t)dt. There are no problems with the infinite domain because
0

X Z ∞
f is integrable and f ↓ 0 for x → ∞ (thus h f (nh) ≥ f (t)dt ≥
n=N nN

X
h f (nh)).
n=N +1
(ii) We have
∞ ∞ Z nh+ h ! Z h
X nx 1 X 2 2

− = hf (nh) − f (t)dt − f (t)dt

(n 2 + x)2 2

h

n=1

n=1 nh− 0
(1) ∞ Z nh+ h
2 Z h

X 2 2
≤ hf (nh) − f (t)dt + f (t)dt

h

n=1 nh− 0 2

Using twice integration by parts one has


Z a+b 1
Z b
(2) 2bg(a) − g(t)dt = − (b − t)2 (g 00 (a + t) + g 00 (a − t))dt
a−b 2 0

for every g ∈ C 2 [a − b, a + b]. Using f (0) = 0, f ∈ C 2 [0, h/2] one gets


Z h/2
(3) f (t)dt = O(h2 ).
0

From (1), (2) and (3) we get


Z nh+ h
∞ ∞
X nx 1 X 2 2
− ≤ h |f 00 (t)|dt + O(h2 ) =

(n 2 + x)2 2

h

n=1

n=1 nh− 2
Z ∞
= h2 |f 00 (t)|dt + O(h2 ) = O(h2 ) = O(x−1 ).
h
2
13

Problem 6. (Carleman’s inequality) (25 points)


(i) Prove that for every sequence {a n }∞
n=1 , such that an > 0, n = 1, 2, . . .

X
and an < ∞, we have
n=1

∞ ∞
(a1 a2 · · · an )1/n < e
X X
an ,
n=1 n=1

where e is the natural log base.


(ii) Prove that for every ε > 0 there exists a sequence {a n }∞
n=1 , such that

X
an > 0, n = 1, 2, . . ., an < ∞ and
n=1

∞ ∞
(a1 a2 · · · an )1/n > (e − ε)
X X
an .
n=1 n=1

Solution.
(i) Put for n ∈ N

(1) cn = (n + 1)n /nn−1 .

Observe that c1 c2 · · · cn = (n + 1)n . Hence, for n ∈ N,

(a1 a2 · · · an )1/n = (a1 c1 a2 c2 · · · an cn )1/n /(n + 1)


≤ (a1 c1 + · · · + an cn )/n(n + 1).

Consequently,
∞ ∞ ∞
!
(a1 a2 · · · an )1/n ≤
X X X
(2) an cn (m(m + 1))−1 .
n=1 n=1 m=n

Since ∞ ∞ 
1 1
X X 
(m(m + 1))−1 = − = 1/n
m=n m=n m m+1
we have !

X ∞
X ∞
X
−1
an cn (m(m + 1)) = an cn /n
n=1 m=n n=1
∞ ∞
an ((n + 1)/n)n < e
X X
= an
n=1 n=1
14

(by (1)). Combining the last inequality with (2) we get the result.
(ii) Set an = nn−1 (n + 1)−n for n = 1, 2, . . . , N and an = 2−n for n > N ,
where N will be chosen later. Then
1
(3) (a1 · · · an )1/n =
n+1
for n ≤ N . Let K = K(ε) be such that
n
n+1 ε

(4) >e− for n > K.
n 2
Choose N from the condition
K ∞ N
X X ε X 1
(5) an + 2−n ≤ ,
n=1 n=1
(2e − ε)(e − ε) n=K+1 n

which is always possible because the harmonic series diverges. Using (3), (4)
and (5) we have
∞ K ∞ N n
1 n
X X X X 
−n
an = an + 2 + <
n=1 n=1 n=N +1 n=K+1
n n+1
N −1 N
ε 1 ε 1
X  X
< + e− =
(2e − ε)(e − ε) n=K+1 n 2 n=K+1
n
N ∞
1 1 1 X
(a1 · · · an )1/n .
X
= ≤
e − ε n=K+1 n e − ε n=1
FOURTH INTERNATIONAL COMPETITION
FOR UNIVERSITY STUDENTS IN MATHEMATICS
July 30 – August 4, 1997, Plovdiv, BULGARIA

First day — August 1, 1997

Problems and Solutions

Problem 1.
Let {εn }∞
n=1 be a sequence of positive real numbers, such that lim εn = n→∞
0. Find n
1 k
X  
lim ln + εn ,
n→∞ n k=1 n
where ln denotes the natural logarithm.
Solution.
It is well known that
1 n
1X k
Z  
−1 = ln xdx = lim ln
0 n→∞ n n
k=1

(Riemman’s sums). Then


n n
1X k 1X k
   
ln + εn ≥ ln −→ −1.
n k=1 n n k=1 n n→∞

Given ε > 0 there exist n0 such that 0 < εn ≤ ε for all n ≥ n0 . Then
n n
1X k 1X k
   
ln + εn ≤ ln +ε .
n k=1 n n k=1 n
Since
n 1
1X k
  Z
lim ln +ε = ln(x + ε)dx
n→∞ n n 0
k=1

Z 1+ε
= ln xdx
ε

1
we obtain the result when ε goes to 0 and so
n
1X k
 
lim ln + εn = −1.
n→∞ n n
k=1

Problem∞2.
Suppose
P
an converges. Do the following sums have to converge as
n=1
well?
a) a1 + a2 + a4 + a3 + a8 + a7 + a6 + a5 + a16 + a15 + · · · + a9 + a32 + · · ·
b) a1 + a2 + a3 + a4 + a5 + a7 + a6 + a8 + a9 + a11 + a13 + a15 + a10 +
a12 + a14 + a16 + a17 + a19 + · · ·
Justify your answers.
Solution. ∞ n
a) Yes. Let S =
P
an , S n =
P
ak . Fix ε > 0 and a number n0 such
n=1 k=1
that |Sn − S| < ε for n > n0 . The partial sums of the permuted series have
the form L2n−1 +k = S2n−1 + S2n − S2n −k , 0 ≤ k < 2n−1 and for 2n−1 > n0 we
have |L2n−1 +k − S| < 3ε, i.e. the permuted series converges.
(−1)n+1 2n−1
P−1 1
b) No. Take an = √ .Then L3.2n−2 = S2n−1 + √
n k=2n−2 2k + 1
1
and L3.2n−2 − S2n−1 ≥ 2n−2 √ n −→ ∞, so L3.2n−2 −→ ∞.
2 n→∞ n→∞

Problem 3.
Let A and B be real n×n matrices such that A 2 +B 2 =AB. Prove that
if BA − AB is an invertible matrix then n is divisible by 3.
Solution. √
1 3
Set S = A + ωB, where ω = − + i . We have
2 2
SS = (A + ωB)(A + ωB) = A2 + ωBA + ωAB + B 2
= AB + ωBA + ωAB = ω(BA − AB),

because ω + 1 = −ω. Since det(SS) = det S. det S is a real number and


det ω(BA − AB) = ω n det(BA − AB) and det(BA − AB) 6= 0, then ω n is a
real number. This is possible only when n is divisible by 3.

2
Problem 4.
Let α be a real number, 1 < α < 2.
a) Show that α has a unique representation as an infinite product

1 1
  
α= 1+ 1+ ...
n1 n2
where each ni is a positive integer satisfying

n2i ≤ ni+1 .

b) Show that α is rational if and only if its infinite product has the
following property:
For some m and all k ≥ m,

nk+1 = n2k .

Solution.
a) We construct inductively the sequence {n i } and the ratios
α
θ k = Qk 1
1 (1 + ni )

so that
θk > 1 for all k.
Choose nk to be the least n for which
1
1+ < θk−1
n
(θ0 = α) so that for each k,
1 1
(1) 1+ < θk−1 ≤ 1 + .
nk nk − 1
Since
1
θk−1 ≤ 1 +
nk − 1
we have
1 θk−1 1 + nk1−1 1
1+ < θk = 1 ≤ 1 =1+ 2 .
nk+1 1 + nk 1 + nk nk − 1

3
Hence, for each k, nk+1 ≥ n2k .
Since n1 ≥ 2, nk → ∞ so that θk → 1. Hence
∞ 
1
Y 
α= 1+ .
1
nk

The uniquness of the infinite product will follow from the fact that on
every step nk has to be determine by (1).
Indeed, if for some k we have
1
1+ ≥ θk−1
nk

then θk ≤ 1, θk+1 < 1 and hence {θk } does not converge to 1.


Now observe that for M > 1,
1 1 1 1 1 1 1
   
(2) 1+ 1+ 2 1+ 4 · · · = 1+ + 2 + 3 +· · · = 1+ .
M M M M M M M −1
Assume that for some k we have
1
1+ < θk−1 .
nk − 1
Then we get
α θk−1
1 1 = 1 1
(1 + n1 )(1 + n2 ) . . . (1 + nk )(1 + nk+1 ) . . .
θk−1 θk−1
≥ 1 = >1
(1 + nk )(1 + n12 ) . . . 1 + nk1−1
k

– a contradiction.
b) From (2) α is rational if its product ends in the stated way.
p
Conversely, suppose α is the rational number . Our aim is to show
q
that for some m,
nm
θm−1 = .
nm − 1
Suppose this is not the case, so that for every m,
nm
(3) θm−1 < .
nm − 1

4
For each k we write
pk
θk =
qk
as a fraction (not necessarily in lowest terms) where

p0 = p, q0 = q

and in general
pk = pk−1 nk , qk = qk−1 (nk + 1).
The numbers pk − qk are positive integers: to obtain a contradiction it suffices
to show that this sequence is strictly decreasing. Now,

pk − qk − (pk−1 − qk−1 ) = nk pk−1 − (nk + 1)qk−1 − pk−1 + qk−1


= (nk − 1)pk−1 − nk qk−1

and this is negative because


pk−1 nk
= θk−1 <
qk−1 nk − 1
by inequality (3).

Problem 5. For a natural n consider the hyperplane


n
( )
n
R0n
X
= x = (x1 , x2 , . . . , xn ) ∈ R : xi = 0
i=1

and the lattice Z0n


= {y ∈ R0n : all yi are integers}. Define the (quasi–)norm
 n 1/p
in Rn by kxkp = |xi |p
P
if 0 < p < ∞, and kxk∞ = max |xi |.
i=1 i
a) Let x ∈ R0n be such that

max xi − min xi ≤ 1.
i i

For every p ∈ [1, ∞] and for every y ∈ Z0n prove that

kxkp ≤ kx + ykp .

b) For every p ∈ (0, 1), show that there is an n and an x ∈ R 0n with


max xi − min xi ≤ 1 and an y ∈ Z0n such that
i i

kxkp > kx + ykp .

5
Solution.
a) For x = 0 the statement is trivial. Let x 6= 0. Then max xi > 0 and
i
min xi < 0. Hence kxk∞ < 1. From the hypothesis on x it follows that:
i
i) If xj ≤ 0 then max xi ≤ xj + 1.
i
ii) If xj ≥ 0 then min xi ≥ xj − 1.
i
Consider y ∈ Z0n , y 6= 0. We split the indices {1, 2, . . . , n} into five
sets:
I(0) = {i : yi = 0},
I(+, +) = {i : yi > 0, xi ≥ 0}, I(+, −) = {i : yi > 0, xi < 0},
I(−, +) = {i : yi < 0, xi > 0}, I(−, −) = {i : yi < 0, xi ≤ 0}.
As least one of the last four index sets is not empty. If I(+, +) 6= Ø or
I(−, −) 6= Ø then kx + yk∞ ≥ 1 > kxk∞ . If I(+, +) = I(−, −) = Ø then
P
yi = 0 implies I(+, −) 6= Ø and I(−, +) 6= Ø. Therefore i) and ii) give
kx + yk∞ ≥ kxk∞ which completes the case p = ∞.
Now let 1 ≤ p < ∞. Then using i) for every j ∈ I(+, −) we get
|xj + yj | = yj − 1 + xj + 1 ≥ |yj | − 1 + max xi . Hence
i

|xj + yj |p ≥ |yj | − 1 + |xk |p for every k ∈ I(−, +) and j ∈ I(+, −).

Similarly

|xj + yj |p ≥ |yj | − 1 + |xk |p for every k ∈ I(+, −) and j ∈ I(−, +);

|xj + yj |p ≥ |yj | + |xj |p for every j ∈ I(+, +) ∪ I(−, −).


Assume that
P
1≥
P
1. Then
j∈I(+,−) j∈I(−,+)

kx + ykpp − kxkpp
 

(|xj + yj |p − |xj |p ) +  |xj + yj |p − |xk |p 


X X X
=
j∈I(+,+)∪I(−,−) j∈I(+,−) k∈I(−,+)
 

|xj + yj |p − |xk |p 
X X
+
j∈I(−,+) k∈I(+,−)
X X
≥ |yj | + (|yj | − 1)
j∈I(+,+)∪I(−,−) j∈I(+,−)

6
 
X X X
+ (|yj | − 1) − 1+ 1
j∈I(−,+) j∈I(+,−) j∈I(−,+)
n
X X X X
= |yi | − 2 1=2 (yj − 1) + 2 yj ≥ 0.
i=1 j∈I(+,−) j∈I(+,−) j∈I(+,+)
P P
The case 1≤ 1 is similar. This proves the statement.
j∈I(+,−) j∈I(−,+)
b) Fix p ∈ (0, 1) and a rational t ∈ ( 21 , 1). Choose a pair of positive
integers m and l such that mt = l(1 − t) and set n = m + l. Let

xi = t, i = 1, 2, . . . , m; xi = t − 1, i = m + 1, m + 2, . . . , n;
yi = −1, i = 1, 2, . . . , m; ym+1 = m; yi = 0, i = m + 2, . . . , n.

Then x ∈ R0n , max xi − min xi = 1, y ∈ Z0n and


i i

kxkpp − kx + ykpp = m(tp − (1 − t)p ) + (1 − t)p − (m − 1 + t)p ,

which is possitive for m big enough.

Problem 6. Suppose that F is a family of finite subsets of N and for


any two sets A, B ∈ F we have A ∩ B 6= Ø.
a) Is it true that there is a finite subset Y of N such that for any
A, B ∈ F we have A ∩ B ∩ Y 6= Ø?
b) Is the statement a) true if we suppose in addition that all of the
members of F have the same size?
Justify your answers.
Solution.
a) No. Consider F = {A1 , B1 , . . . , An , Bn , . . .}, where An = {1, 3, 5, . . . , 2n−
1, 2n}, Bn = {2, 4, 6, . . . , 2n, 2n + 1}.
b) Yes. We will prove inductively a stronger statement:
Suppose F , G are
two families of finite subsets of N such that:
1) For every A ∈ F and B ∈ G we have A ∩ B 6= Ø;
2) All the elements of F have the same size r, and elements of G – size s. (we
shall write #(F ) = r, #(G) = s).

7
Then there is a finite set Y such that A ∪ B ∪ Y 6= Ø for every A ∈ F and
B ∈ G.
The problem b) follows if we take F = G.
Proof of the statement: The statement is obvious for r = s = 1.
Fix the numbers r, s and suppose the statement is proved for all pairs F 0 , G0
with #(F 0 ) < r, #(G0 ) < s. Fix A0 ∈ F , B0 ∈ G. For any subset C ⊂ A0 ∪B0 ,
denote
F (C) = {A ∈ F : A ∩ (A0 ∪ B0 ) = C}.
Then F = ∪ F (C). It is enough to prove that for any pair of non-
Ø6=C⊂A0 ∪B0
empty sets C, D ⊂ A0 ∪ B0 the families F (C) and G(D) satisfy the statement.
Indeed, if we denote by YC,D the corresponding finite set, then the
finite set ∪ YC,D will satisfy the statement for F and G. The proof
C,D⊂A0 ∪B0
for F (C) and G(D).
If C ∩ D 6= Ø, it is trivial.
If C ∩ D = Ø, then any two sets A ∈ F (C), B ∈ G(D) must meet
outside A0 ∪ B0 . Then if we denote F̃ (C) = {A \ C : A ∈ F (C)}, G̃(D) =
{B \ D : B ∈ G(D)}, then F̃ (C) and G̃(D) satisfy the conditions 1) and 2)
above, with #(F̃ (C)) = #(F ) − #C < r, #(G̃(D)) = #(G) − #D < s, and
the inductive assumption works.

8
FOURTH INTERNATIONAL COMPETITION
FOR UNIVERSITY STUDENTS IN MATHEMATICS
July 30 – August 4, 1997, Plovdiv, BULGARIA

Second day — August 2, 1997

Problems and Solutions

Problem 1.
Let f be a C 3 (R) non-negative function, f (0)=f 0 (0)=0, 0 < f 00 (0).
Let p !0
f (x)
g(x) =
f 0 (x)
for x 6= 0 and g(0) = 0. Show that g is bounded in some neighbourhood of 0.
Does the theorem hold for f ∈ C 2 (R)?
Solution.
1
Let c = f 00 (0). We have
2
(f 0 )2 − 2f f 00
g= √ ,
2(f 0 )2 f

where

f (x) = cx2 + O(x3 ), f 0 (x) = 2cx + O(x2 ), f 00 (x) = 2c + O(x).

Therefore (f 0 (x))2 = 4c2 x2 + O(x3 ),

2f (x)f 00 (x) = 4c2 x2 + O(x3 )

and q q
2(f 0 (x))2 f (x) = 2(4c2 x2 + O(x3 ))|x| c + O(x).
g is bounded because
p
2(f 0 (x))2 f (x)
−→ 8c5/2 6= 0
|x|3 x→0

and f 0 (x)2 − 2f (x)f 00 (x) = O(x3 ).


The theorem does not hold for some C 2 -functions.

1
p
Let f (x) = (x + |x|3/2 )2 = x2 + 2x2 |x| + |x|3 , so f is C 2 . For x > 0,
!0
1 1 1 1 3 1
g(x) = 3√ =− · 3 √ 2 · · √ −→ −∞.
2 1+ 2 x
2 (1 + 2 x) 4 x x→0

Problem 2.
Let M be an invertible matrix of dimension 2n × 2n, represented in
block form as
" # " #
A B −1 E F
M= and M = .
C D G H

Show that det M. det H = det A.


Solution.
Let I denote the identity n × n matrix. Then
" # " # " #
A B I F A 0
det M. det H = det · det = det = det A.
C D 0 H C I

Problem 3.
∞ (−1)n−1 sin (log n)
P
Show that converges if and only if α > 0.
n=1 nα
Solution.
sin (log t)
Set f (t) = . We have

−α cos (log t)
f 0 (t) = α+1
sin (log t) + .
t tα+1
1+α
So |f 0 (t)| ≤ for α > 0. Then from Mean value theorem for some
tα+1
1+α P1+α
θ ∈ (0, 1) we get |f (n+1)−f (n)| = |f 0 (n+θ)| ≤ α+1 . Since < +∞

n ∞
nα+1
P P
for α > 0 and f (n) −→ 0 we get that (−1)n−1 f (n) = (f (2n−1)−f (2n))
n→∞ n=1 n=1
converges.
sin (log n)
Now we have to prove that does not converge to 0 for α ≤ 0.

It suffices to consider α = 0.
We show that an = sin (log n) does not  tend to zero. Assume the
1 1 log n
contrary. There exist kn ∈ N and λn ∈ − , for n > e2 such that =
2 2 π
kn + λn . Then |an | = sin π|λn |. Since an → 0 we get λn → 0.

2
We have kn+1 − kn =
 
log(n + 1) − log n 1 1
= − (λn+1 − λn ) = log 1 + − (λn+1 − λn ).
π π n

Then |kn+1 − kn | < 1 for all n big enough. Hence there exists n 0 so that
log n
kn = kn0 for n > n0 . So = kn0 + λn for n > n0 . Since λn → 0 we get
π
contradiction with log n → ∞.

Problem 4.
a) Let the mapping f : Mn → R from the space
n2
Mn = R of n × n matrices with real entries to reals be linear, i.e.:

(1) f (A + B) = f (A) + f (B), f (cA) = cf (A)

for any A, B ∈ Mn , c ∈ R. Prove that there exists a unique matrix C ∈ M n


such that f (A) = tr(AC) for any A ∈ Mn . (If A = {aij }ni,j=1 then
n
P
tr(A) = aii ).
i=1
b) Suppose in addition to (1) that

(2) f (A.B) = f (B.A)

for any A, B ∈ Mn . Prove that there exists λ ∈ R such that f (A) = λ.tr(A).
Solution.
a) If we denote by Eij the standard basis of Mn consisting of elementary
matrix (with entry 1 at the place (i, j) and zero elsewhere), then the entries
cij of C can be defined by cij = f (Eji ). b) Denote by L the n2 −1-dimensional
linear subspace of Mn consisting of all matrices with zero trace. The elements
Eij with i 6= j and the elements Eii − Enn , i = 1, . . . , n − 1 form a linear basis
for L. Since

Eij = Eij .Ejj − Ejj .Eij , i 6= j


Eii − Enn = Ein .Eni − Eni .Ein , i = 1, . . . , n − 1,

then the property (2) shows that f is vanishing identically on L. Now, for
1
any A ∈ Mn we have A − tr(A).E ∈ L, where E is the identity matrix, and
n
1
therefore f (A) = f (E).tr(A).
n

3
Problem 5.
Let X be an arbitrary set, let f be an one-to-one function mapping
X onto itself. Prove that there exist mappings g 1 , g2 : X → X such that
f = g1 ◦ g2 and g1 ◦ g1 = id = g2 ◦ g2 , where id denotes the identity mapping
on X.
Solution.
Let f n = f ◦ f ◦ · · · ◦ f , f 0 = id, f −n = (f −1 )n for every natural
| {z }
n times
number n. Let T (x) = {f n (x) : n ∈ Z} for every x ∈ X. The sets T (x) for
different x’s either coinside or do not intersect. Each of them is mapped by f
onto itself. It is enough to prove the theorem for every such set. Let A = T (x).
If A is finite, then we can think that A is the set of all vertices of a regular

n polygon and that f is rotation by . Such rotation can be obtained as a
n
composition of 2 symmetries mapping the n polygon onto itself (if n is even
π
then there are axes of symmetry making angle; if n = 2k + 1 then there
n

are axes making k angle). If A is infinite then we can think that A = Z
n
and f (m) = m + 1 for every m ∈ Z. In this case we define g 1 as a symmetry
1
relative to , g2 as a symmetry relative to 0.
2

Problem 6.
Let f : [0, 1] → R be a continuous function. Say that f “crosses the
axis” at x if f (x) = 0 but in any neighbourhood of x there are y, z with
f (y) < 0 and f (z) > 0.
a) Give an example of a continuous function that “crosses the axis”
infiniteley often.
b) Can a continuous function “cross the axis” uncountably often?
Justify your answer.
Solution.
1
a) f (x) = x sin .
x
b) Yes. The Cantor set is given by

X
C = {x ∈ [0, 1) : x = bj 3−j , bj ∈ {0, 2}}.
j=1


P
There is an one-to-one mapping f : [0, 1) → C. Indeed, for x = aj 2−j ,
j=1

P
aj ∈ {0, 1} we set f (x) = (2aj )3−j . Hence C is uncountable.
j=1

4
For k = 1, 2, . . . and i = 0, 1, 2, . . . , 2k−1 − 1 we set
   
k−2
X k−2
X
ak,i = 3−k 6 aj 3j + 1  , bk,i = 3−k 6 aj 3j + 2  ,
j=0 j=0

k−2
P
where i = aj 2j , aj ∈ {0, 1}. Then
j=0


[ 2k−1
[−1
[0, 1) \ C = (ak,i , bk,i ),
k=1 i=0

i.e. the Cantor set consists of all points which have a trinary representation
with 0 and 2 as digits and the points of its compliment have some 1’s in their
2k−1 −1
trinary representation. Thus, ∪ (ak,i , bk,i ) are all points (exept ak,i ) which
i=0
have 1 on k-th place and 0 or 2 on the j-th (j < k) places.
Noticing that the points with at least one digit equals to 1 are every-
where dence in [0,1] we set

X
f (x) = (−1)k gk (x).
k=1

where gk is a piece-wise  linear continuous functions with values at the knots
ak,i + bk,i
gk = 2−k , gk (0) = gk (1) = gk (ak,i ) = gk (bk,i ) = 0,
2
i = 0, 1, . . . , 2k−1 − 1.
Then f is continuous and f “crosses the axis” at every point of the
Cantor set.

5
5th INTERNATIONAL MATHEMATICS COMPETITION FOR UNIVERSITY
STUDENTS
July 29 - August 3, 1998, Blagoevgrad, Bulgaria

First day

PROBLEMS AND SOLUTIONS

Problem 1. (20 points) Let V be a 10-dimensional real vector space and U1 and U2 two linear subspaces
such that U1 ⊆ U2 , dimIR U1 = 3 and dimIR U2 = 6. Let E be the set of all linear maps T : V −→ V which
have U1 and U2 as invariant subspaces (i.e., T (U1 ) ⊆ U1 and T (U2 ) ⊆ U2 ). Calculate the dimension of E
as a real vector space.
Solution First choose a basis {v1 , v2 , v3 } of U1 . It is possible to extend this basis with vectors v4 ,v5 and
v6 to get a basis of U2 . In the same way we can extend a basis of U2 with vectors v7 , . . . , v10 to get as
basis of V .
Let T ∈ E be an endomorphism which has U1 and U2 as invariant subspaces. Then its matrix, relative
to the basis {v1 , . . . , v10 } is of the form
 
∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗

 ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗  

 ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗  
 0 0 0 ∗ ∗ ∗ ∗ ∗ ∗ ∗ 
 
 0 0 0 ∗ ∗ ∗ ∗ ∗ ∗ ∗ 
 0 0 0 ∗ ∗ ∗ ∗ ∗ ∗ ∗  .
 
 
 0 0 0 0 0 0 ∗ ∗ ∗ ∗ 
 
 0 0 0 0 0 0 ∗ ∗ ∗ ∗ 
 
 0 0 0 0 0 0 ∗ ∗ ∗ ∗ 
0 0 0 0 0 0 ∗ ∗ ∗ ∗

So dimIR E = 9 + 18 + 40 = 67.

Problem 2. Prove that the following proposition holds for n = 3 (5 points) and n = 5 (7 points), and
does not hold for n = 4 (8 points).
“For any permutation π1 of {1, 2, . . . , n} different from the identity there is a permutation π2 such
that any permutation π can be obtained from π1 and π2 using only compositions (for example, π =
π1 ◦ π1 ◦ π2 ◦ π1 ).”
Solution
Let Sn be the group of permutations of {1, 2, . . . , n}.
1) When n = 3 the proposition is obvious: if x = (12) we choose y = (123); if x = (123) we choose
y = (12).
2) n = 4. Let x = (12)(34). Assume that there exists y ∈ Sn , such that S4 = hx, yi. Denote by K
the invariant subgroup
K = {id, (12)(34), (13)(24), (14)(23)}.
By the fact that x and y generate the whole group S4 , it follows that the factor group S4 /K contains
only powers of ȳ = yK, i.e., S4 /K is cyclic. It is easy to see that this factor-group is not comutative
(something more this group is not isomorphic to S3 ).
3) n = 5
a) If x = (12), then for y we can take y = (12345).
b) If x = (123), we set y = (124)(35). Then y 3 xy 3 = (125) and y 4 = (124). Therefore (123), (124), (125) ∈
hx, yi- the subgroup generated by x and y. From the fact that (123), (124), (125) generate the alternating
subgroup A5 , it follows that A5 ⊂ hx, yi. Moreover y is an odd permutation, hence hx, yi = S5 .
c) If x = (123)(45), then as in b) we see that for y we can take the element (124).
d) If x = (1234), we set y = (12345). Then (yx)3 = (24) ∈ hx, yi, x2 (24) = (13) ∈ hx, yi and
2
y = (13524) ∈ hx, yi. By the fact (13) ∈ hx, yi and (13524) ∈ hx, yi, it follows that hx, yi = S 5 .

1
e) If x = (12)(34), then for y we can take y = (1354). Then y 2 x = (125), y 3 x = (124)(53) and by c)
S5 = hx, yi.
f) If x = (12345), then it is clear that for y we can take the element y = (12).

Problem 3. Let f (x) = 2x(1 − x), x ∈ IR. Define


n
z }| {
fn = f ◦ . . . ◦f .
R1
a) (10 points) Find limn→∞ 0 fn (x)dx.
R1
b) (10 points) Compute 0 fn (x)dx for n = 1, 2, . . ..
Solution. a) Fix x = x0 ∈ (0, 1). If we denote xn = fn (x0 ), n = 1, 2, . . . it is easy to see that
x1 ∈ (0, 1/2], x1 ≤ f (x1 ) ≤ 1/2 and xn ≤ f (xn ) ≤ 1/2 (by induction). Then (xn )n is a bounded non-
decreasing sequence and, since xn+1 = 2xn (1 − xn ), the limit l = limn→∞ xn satisfies l = 2l(1 − l), which
implies l = 1/2. Now the monotone convergence theorem implies that
Z 1
lim fn (x)dx = 1/2.
n→∞ 0

b) We prove by induction that

 2n
1 2n −1 1
(1) fn (x) = − 2 x−
2 2
1
holds for n = 1, 2, . . . . For n = 1 this is true, since f (x) = 2x(1 − x) = 2 − 2(x − 12 )2 . If (1) holds for
some n = k, then we have

1 k
1
 2k
fk+1 (x) = fk (f (x)) = 2 − 22 −1
2 − 2(x − 21 )2 − 12
 k
1 k 2
= 2 − 22 −1 −2(x − 12 )2
k+1
1 1 2k+1
= 2 − 22 −1 (x − 2)

which is (2) for n = k + 1.


Using (1) we can compute the integral,
Z " n  2n +1 #1
1
1 22 −1 1 1 1
fn (x)dx = x− n x− = − .
0 2 2 +1 2 2 2(2n + 1)
x=0

Problem 4. (20 points) The function f : IR → IR is twice differentiable and satisfies f (0) = 2, f 0 (0) = −2
and f (1) = 1. Prove that there exists a real number ξ ∈ (0, 1) for which

f (ξ) · f 0 (ξ) + f 00 (ξ) = 0.

Solution. Define the function


1 2
g(x) = f (x) + f 0 (x).
2
Because g(0) = 0 and
f (x) · f 0 (x) + f 00 (x) = g 0 (x),
it is enough to prove that there exists a real number 0 < η ≤ 1 for which g(η) = 0.
a) If f is never zero, let
x 1
h(x) = − .
2 f (x)

2
Because h(0) = h(1) = − 21 , there exists a real number 0 < η < 1 for which h0 (η) = 0. But g = f 2 · h0 ,
and we are done.
b) If f has at least one zero, let z1 be the first one and z2 be the last one. (The set of the zeros is
closed.) By the conditions, 0 < z1 ≤ z2 < 1.
The function f is positive on the intervals [0, z1 ) and (z2 , 1]; this implies that f 0 (z1 ) ≤ 0 and f 0 (z2 ) ≥ 0.
Then g(z1 ) = f 0 (z1 ) ≤ 0 and g(z2 ) = f 0 (z2 ) ≥ 0, and there exists a real number η ∈ [z1 , z2 ] for which
g(η) = 0.
2
Remark. For the function f (x) = x+1 the conditions hold and f · f 0 + f 00 is constantly 0.

Problem 5. Let P be an algebraic polynomial of degree n having only real zeros and real coefficients.
a) (15 points) Prove that for every real x the following inequality holds:
(2) (n − 1)(P 0 (x))2 ≥ nP (x)P 00 (x).

b) (5 points) Examine the cases of equality.


Solution. Observe that both sides of (2) are identically equal to zero if n = 1. Suppose that n > 1. Let
x1 , . . . , xn be the zeros of P . Clearly (2) is true when x = xi , i ∈ {1, . . . , n}, and equality is possible
only if P 0 (xi ) = 0, i.e., if xi is a multiple zero of P . Now suppose that x is not a zero of P . Using the
identities
n
P 0 (x) X 1 P 00 (x) X 2
= , = ,
P (x) i=1
x − xi P (x) (x − xi )(x − xj )
1≤i<j≤n
we find  2 n
P 0 (x) P 00 (x) X n − 1 X 2
(n − 1) −n = − .
P (x) P (x) i=1
(x − xi )2 (x − xi )(x − xj )
1≤i<j≤n
But this last expression is simply
 2
X 1 1
− ,
x − xi x − xj
1≤i<j≤n

and therefore is positive. The inequality is proved. In order that (2) holds with equality sign for every real
x it is necessary that x1 = x2 = . . . = xn . A direct verification shows that indeed, if P (x) = c(x − x1 )n ,
then (2) becomes an identity.

Problem 6. Let f : [0, 1] → IR be a continuous function with the property that for any x and y in the
interval,
xf (y) + yf (x) ≤ 1.
a) (15 points) Show that
Z 1
π
f (x)dx ≤ .
0 4
b) (5 points) Find a function, satisfying the condition, for which there is equality.
Solution Observe that the integral is equal to
Z π2
f (sin θ) cos θdθ
0
and to Z π
2
f (cos θ) sin θdθ
0
So, twice the integral is at most
Z π
2 π
1dθ = .
0 2

Now let f (x) = 1 − x2 . If x = sin θ and y = sin φ then
xf (y) + yf (x) = sin θ cos φ + sin φ cos θ = sin(θ + φ) ≤ 1.

3
5th INTERNATIONAL MATHEMATICS COMPETITION FOR UNIVERSITY
STUDENTS
July 29 - August 3, 1998, Blagoevgrad, Bulgaria

Second day

PROBLEMS AND SOLUTION

Problem 1. (20 points) Let V be a real vector space, and let f, f1 , f2 , . . . , fk be linear maps from V
to IR. Suppose that f (x) = 0 whenever f1 (x) = f2 (x) = . . . = fk (x) = 0. Prove that f is a linear
combination of f1 , f2 , ..., fk .

Solution. We use induction on k. By passing to a subset, we may assume that f1 , . . . , fk are linearly
independent.
Since fk is independent of f1 , . . . , fk−1 , by induction there exists a vector ak ∈ V such that f1 (ak ) =
. . . = fk−1 (ak ) = 0 and fk (ak ) 6= 0. After normalising, we may assume that fk (ak ) = 1. The vectors
a1 , . . . , ak−1 are defined similarly to get

1 if i = j
fi (aj ) =
0 if i 6= j.
Pk
For an arbitrary x ∈ V and 1 ≤ i ≤ k, fi (x−f1 (x)a1 −f2 (x)a2 −· · ·−fk (x)ak ) = fi (x)− j=1 fj (x)fi (aj ) =
fi (x) − fi (x)fi (ai ) = 0, thus f (x − f1 (x)a1 − · · · − fk (x)ak ) = 0. By the linearity of f this implies
f (x) = f1 (x)f (a1 ) + · · · + fk (x)f (ak ), which gives f (x) as a linear combination of f1 (x), . . . , fk (x).

Problem 2. (20 points) Let


3
X 1
P = {f : f (x) = ak xk , ak ∈ IR, |f (±1)| ≤ 1, |f (± )| ≤ 1}.
2
k=0

Evaluate
sup max |f 00 (x)|
f ∈P −1≤x≤1

and find all polynomials f ∈ P for which the above “sup” is attained.

Solution. Denote x0 = 1, x1 = − 12 , x2 = 12 , x3 = 1,
3
Y
w(x) = (x − xi ),
i=0

w(x)
wk (x) = , k = 0, . . . , 3,
x − xk
wk (x)
lk (x) = .
wk (xk )
Then for every f ∈ P
3
X
f 00 (x) = lk00 (x)f (xk ),
k=0
3
X
|f 00 (x)| ≤ |lk00 (x)|.
k=0

1
Since f 00 is a linear function max−1≤x≤1 |f 00 (x)| is attained either at x = −1 or at x = 1. Without loss
of generality let the maximum point is x = 1. Then
3
X
sup max |f 00 (x)| = |lk00 (1)|.
f ∈P −1≤x≤1
k=0

In order to have equality for the extremal polynomial f∗ there must hold

f∗ (xk ) = signlk00 (1), k = 0, 1, 2, 3.

It is easy to see that {lk00 (1)}3k=0 alternate in sign, so f∗ (xk ) = (−1)k−1 , k = 0, . . . , 3. Hence f∗ (x) =
T3 (x) = 4x3 − 3x, the Chebyshev polynomial of the first kind, and f∗00 (1) = 24. The other extremal
polynomial, corresponding to x = −1, is −T3 .

Problem 3. (20 points) Let 0 < c < 1 and


 x
 c for x ∈ [0, c],
f (x) =
 1−x
1−c for x ∈ [c, 1].

We say that p is an n-periodic point if


f (f (. . . f (p))) = p
| {z }
n

and n is the smallest number with this property. Prove that for every n ≥ 1 the set of n-periodic points
is non-empty and finite.

Solution. Let fn (x) = f (f (. . . f (x))). It is easy to see that fn (x) is a picewise monotone function and
| {z }
n
its graph contains 2n linear segments; one endpoint is always on {(x, y) : 0 ≤ x ≤ 1, y = 0}, the other is
on {(x, y) : 0 ≤ x ≤ 1, y = 1}. Thus the graph of the identity function intersects each segment once, so
the number of points for which fn (x) = x is 2n .
Since for each n-periodic points we have fn (x) = x, the number of n-periodic points is finite.
A point x is n-periodic if fn (x) = x but fk (x) 6= x for k = 1, . . . , n−1. But as we saw before fk (x) = x
holds only at 2k points, so there are at most 21 + 22 + · · · + 2n−1 = 2n − 2 points x for which fk (x) = x
for at least one k ∈ {1, 2, . . . , n − 1}. Therefore at least two of the 2n points for which fn (x) = x are
n-periodic points.

Problem 4. (20 points) Let An = {1, 2, . . . , n}, where n ≥ 3. Let F be the family of all non-constant
functions f : An → An satisfying the following conditions:
(1) f (k) ≤ f (k + 1) for k = 1, 2, . . . , n − 1,
(2) f (k) = f (f (k + 1)) for k = 1, 2, . . . , n − 1.
Find the number of functions in F.

Solution. It is clear that id : An −→ An , given by id(x) = x, does not verify condition (2). Since id is
the only increasing
 injection on An , F does not contain injections. Let us take any f ∈ F and suppose
that # f −1 (k) ≥ 2. Since f is increasing, there exists i ∈ An such that f (i) = f (i + 1) = k. In view of
(2), f (k) = f (f (i + 1)) = f (i) = k. If {i < k : f (i) < k} = ∅, then taking j = max{i < k : f (i) < k}
 we
get f (j) < f (j + 1) = k = f (f (j + 1)), a contradiction. Hence f (i) = k for i ≤ k. If # f −1 ({l})  ≥ 2
for some l ≥ k, then the similar consideration shows that f (i) = l = k for i ≤ k. Hence # f −1 {i} = 0
or 1 for every i > k. Therefore f (i) ≤ i for i > k. If f (l) = l, then taking j = max{i < l : f (i) < l}
we get f (j) < f (j + 1) = l = f (f (j + 1)), a contradiction. Thus, f (i) ≤ i − 1 for i > k. Let
m = max{i : f (i) = k}. Since f is non-constant m ≤ n − 1. Since k = f (m) = f (f (m + 1)),
f (m + 1) ∈ [k + 1, m]. If f (l) > l − 1 for some l > m + 1, then l − 1 and f (l) belong to f −1 (f (l)) and

2
this contradicts the facts above. Hence f (i) = i − 1 for i > m + 1. Thus we show that every function f
in F is defined by natural numbers k, l, m, where 1 ≤ k < l = f (m + 1) ≤ m ≤ n − 1.

 k if i ≤ m
f (i) = l if i = m

i − 1 if i > m + 1.

Then  
n
#(F) = .
3

Problem 5. (20 points) Suppose that S is a family of spheres (i.e., surfaces of balls of positive radius)
in IRn , n ≥ 2, such that the intersection of any two contains at most one point. Prove that the set M of
those points that belong to at least two different spheres from S is countable.

Solution. For every x ∈ M choose spheres S, T ∈ S such that S 6= T and x ∈ S ∩ T ; denote by U, V, W


the three components of Rn \ (S ∪ T ), where the notation is such that ∂U = S, ∂V = T and x is the only
point of U ∩ V , and choose points with rational coordinates u ∈ U , v ∈ V , and w ∈ W . We claim that
x is uniquely determined by the triple hu, v, wi; since the set of such triples is countable, this will finish
the proof.
To prove the claim, suppose, that from some x0 ∈ M we arrived to the same hu, v, wi using spheres
S , T 0 ∈ S and components U 0 , V 0 , W 0 of Rn \ (S 0 ∪ T 0 ). Since S ∩ S 0 contains at most one point and since
0

U ∩ U 0 6= ∅, we have that U ⊂ U 0 or U 0 ⊂ U ; similarly for V ’s and W ’s. Exchanging the role of x and
x0 and/or of U ’s and V ’s if necessary, there are only two cases to consider: (a) U ⊃ U 0 and V ⊃ V 0 and
(b) U ⊂ U 0 , V ⊃ V 0 and W ⊂ W 0 . In case (a) we recall that U ∩ V contains only x and that x0 ∈ U 0 ∩ V 0 ,
so x = x0 . In case (b) we get from W ⊂ W 0 that U 0 ⊂ U ∪ V ; so since U 0 is open and connected, and
U ∩ V is just one point, we infer that U 0 = U and we are back in the already proved case (a).

Problem 6. (20 points) Let f : (0, 1) → [0, ∞) be a function that is zero except at the distinct points
a1 , a2 , ... . Let bn = f (an ).

X
(a) Prove that if bn < ∞, then f is differentiable at at least one point x ∈ (0, 1).
n=1

P
(b) Prove that for any sequence of non-negative real numbers (bn )∞
n=1 , with bn = ∞, there exists a
n=1
sequence (an )∞
n=1 such that the function f defined as above is nowhere differentiable.

Solution

P 1
a) We first construct a sequence cn of positive numbers such that cn → ∞ and cn bn < 2. Let
n=1

P
B= bn , and for each k = 0, 1, . . . denote by Nk the first positive integer for which
n=1


X B
bn ≤ .
4k
n=Nk

2k
Now set cn = 5B for each n, Nk ≤ n < Nk+1 . Then we have cn → ∞ and
∞ ∞ ∞ ∞ ∞
X X X X 2k X X 2k B 2
cn bn = cn bn ≤ bn ≤ · = .
n=1
5B 5B 4k 5
k=0 Nk ≤n<Nk+1 k=0 n=Nk k=0
P
Consider the intervals In = (an − cn bn , an + cn bn ). The sum of their lengths is 2 cn bn < 1, thus
there exists a point x0 ∈ (0, 1) which is not contained in any In . We show that f is differentiable at x0 ,

3
and f 0 (x0 ) = 0. Since x0 is outside of the intervals In , x0 6= an for any n and f (x0 ) = 0. For arbitrary
x ∈ (0, 1) \ {x0 }, if x = an for some n, then

f (x) − f (x0 ) f (an ) − 0 bn 1

x − x0
= ≤ = ,
|an − x0 | cn bn cn

otherwise f (x)−f
x−x0
(x0 )
= 0. Since cn → ∞, this implies that for arbitrary ε > 0 there are only finitely many
x ∈ (0, 1) \ {x0 } for which
f (x) − f (x0 )

x − x0
does not hold, and we are done.
Remark. The variation of f is finite, which implies that f is differentiable almost everywhere .
b) We remove the zero elements from sequence bn . Since f (x) = 0 except for a countable subset of
(0, 1), if f is differentiable at some point x0 , then f (x0 ) and f 0 (x0 ) must be P
0.
It is easy to construct a sequence βn satisfying 0 < βn ≤ bn , bn → 0 and ∞ n=1 βn = ∞.
Choose the numbers a1 , a2 , . . . such that the intervals In = (an − βn , an + βn ) (nP= 1, 2, . . .) cover
each point of (0, 1) infinitely many times (it is possible since the sum of lengths is 2 bn = ∞). Then
for arbitrary x0 ∈ (0, 1), f (x0 ) = 0 and ε > 0 there is an n for which βn < ε and x0 ∈ In which implies

|f (an ) − f (x0 )| bn
> ≥ 1.
|an − x0 | βn

4
6th INTERNATIONAL COMPETITION FOR UNIVERSITY
STUDENTS IN MATHEMATICS
Keszthely, 1999.

Problems and solutions on the first day

1. a) Show that for any m ∈ N there exists a real m × m matrix A such that A3 = A + I, where I is the
m × m identity matrix. (6 points)
b) Show that det A > 0 for every real m × m matrix satisfying A3 = A + I. (14 points)
Solution. a) The diagonal matrix  
λ 0
..
A = λI =  . 
0 λ
is a solution for equation A3 = A + I if and only if λ3 = λ + 1, because A3 − A − I = (λ3 − λ − 1)I. This
equation, being cubic, has real solution.
b) It is easy to check that the polynomial p(x) = x3 − x − 1 has a positive real root λ1 (because p(0) < 0)
and two conjugated complex roots λ2 and λ3 (one can check the discriminant of the polynomial, which is

−1 3
2 23
3 + −1 2 = 108 > 0, or the local minimum and maximum of the polynomial).
If a matrix A satisfies equation A3 = A + I, then its eigenvalues can be only λ1 , λ2 and λ3 . The
multiplicity of λ2 and λ3 must be the same, because A is a real matrix and its characteristic polynomial has
only real coefficients. Denoting the multiplicity of λ1 by α and the common multiplicity of λ2 and λ3 by β,
β β
det A = λα α β
1 λ2 λ3 = λ1 · (λ2 λ3 ) .

Because λ1 and λ2 λ3 = |λ2 |2 are positive, the product on the right side has only positive factors.

2. Does there exist a bijective map π : N → N such that



X π(n)
< ∞?
n=1
n2

(20 points)
Solution 1. No. For, let π be a permutation of N and let N ∈ N. We shall argue that

3N
X π(n) 1
2
> .
n 9
n=N +1

In fact, of the 2N numbers π(N + 1), . . . , π(3N ) only N can be ≤ N so that at least N of them are > N .
Hence
3N 3N
X π(n) 1 X 1 1
2
≥ 2
π(n) > 2
·N ·N = .
n (3N ) 9N 9
n=N +1 n=N +1

Solution 2. Let π be a permutation of N. For any n ∈ N, the numbers π(1), . . . , π(n) are distinct positive
integers, thus π(1) + . . . + π(n) ≥ 1 + . . . + n = n(n+1)
2 . By this inequality,
∞ ∞  
X π(n) X  1 1
= π(1) + . . . + π(n) − ≥
n=1
n2 n=1
n2 (n + 1)2

∞ ∞ ∞
X n(n + 1) 2n + 1 X 2n + 1 X 1
≥ · 2 2
= ≥ = ∞.
n=1
2 n (n + 1) n=1
2n(n + 1) n=1
n + 1

1
3. Suppose that a function f : R → R satisfies the inequality

Xn

3k f (x + ky) − f (x − ky) ≤ 1

(1)

k=1

for every positive integer n and for all x, y ∈ R. Prove that f is a constant function. (20 points)
Solution. Writing (1) with n − 1 instead of n,

n−1 
X k
3 f (x + ky) − f (x − ky) ≤ 1. (2)

k=1

From the difference of (1) and (2),


n 
3 f (x + ny) − f (x − ny) ≤ 2;

which means
f (x + ny) − f (x − ny) ≤ 2 .

(3)
3n
For arbitrary u, v ∈ R and n ∈ N one can choose x and y such that x − ny = u and x + ny = v, namely
x = u+v v−u
2 and y = 2n . Thus, (3) yields
f (u) − f (v) ≤ 2

3n
2
for arbitrary positive integer n. Because 3n can be arbitrary small, this implies f (u) = f (v).

x2

4. Find all strictly monotonic functions f : (0, +∞) → (0, +∞) such that f f (x) ≡ x. (20 points)
f (x) x x
Solution. Let g(x) = . We have g( ) = g(x). By induction it follows that g( n ) = g(x), i.e.
x g(x) g (x)
x x
(1) f( )= , n ∈ N.
g n (x) g n−1 (x)

x2 f 2 (x)
On the other hand, let substitute x by f (x) in f () = x. ¿From the injectivity of f we get =
f (x) f (f (x))
x, i.e. g(xg(x)) = g(x). Again by induction we deduce that g(xg n (x)) = g(x) which can be written in the
form

(2) f (xg n (x)) = xg n−1 (x), n ∈ N.

Set f (m) = f ◦ f ◦ . . . ◦ f . It follows from (1) and (2) that


| {z }
m times

(3) f (m) (xg n (x)) = xg n−m (x), m, n ∈ N.

Now, we shall prove that g is a constant. Assume g(x1 ) < g(x2 ). Then we may find n ∈ N such
that x1 g n (x1 ) ≤ x2 g n (x2 ). On the other hand, if m is even then f (m) is strictly increasing and from (3) it
follows that xm 1 g
n−m
(x1 ) ≤ xm2 g
n−m
(x2 ). But when n is fixed the opposite inequality holds ∀m  1. This
contradiction shows that g is a constant, i.e. f (x) = Cx, C > 0.
Conversely, it is easy to check that the functions of this type verify the conditions of the problem.

5. Suppose that 2n points of an n × n grid are marked. Show that for some k > 1 one can select 2k distinct
marked points, say a1 , . . . , a2k , such that a1 and a2 are in the same row, a2 and a3 are in the same column,
. . . , a2k−1 and a2k are in the same row, and a2k and a1 are in the same column. (20 points)

2
Solution 1. We prove the more general statement that if at least n + k points are marked in an n × k grid,
then the required sequence of marked points can be selected.
If a row or a column contains at most one marked point, delete it. This decreases n + k by 1 and the
number of the marked points by at most 1, so the condition remains true. Repeat this step until each row
and column contains at least two marked points. Note that the condition implies that there are at least two
marked points, so the whole set of marked points cannot be deleted.
We define a sequence b1 , b2 , . . . of marked points. Let b1 be an arbitrary marked point. For any positive
integer n, let b2n be an other marked point in the row of b2n−1 and b2n+1 be an other marked point in the
column of b2n .

Let m be the first index for which bm is the same as one of the earlier points, say bm = bl , l < m.
If m − l is even, the line segments bl bl+1 , bl+1 bl+2 , ..., bm−1 bl = bm−1 bm are alternating horizontal and
vertical. So one can choose 2k = m − l, and (a1 , . . . , a2k ) = (bl , . . . , bm−1 ) or (a1 , . . . , a2k ) = (bl+1 , . . . , bm )
if l is odd or even, respectively.
If m − l is odd, then the points bl = bm , bl+1 and bm−1 are in the same row/column. In this case chose
2k = m − l − 1. Again, the line segments bl+1 bl+2 , bl+2 bl+3 , ..., bm−1 bl+1 are alternating horizontal and
vertical and one can choose (a1 , . . . , a2k ) = (bl+1 , . . . , bm−1 ) or (a1 , . . . , a2k ) = (bl+2 , . . . , bm−1 , bl+1 ) if l is
even or odd, respectively.
Solution 2. Define the graph G in the following way: Let the vertices of G be the rows and the columns of
the grid. Connect a row r and a column c with an edge if the intersection point of r and c is marked.
The graph G has 2n vertices and 2n edges. As is well known, if a graph of N vertices contains no circle,
it can have at most N − 1 edges. Thus G does contain a circle. A circle is an alternating sequence of rows
and columns, and the intersection of each neighbouring row and column is a marked point. The required
sequence consists of these intersection points.

6. a) For each 1 < p < ∞ find a constant cp < ∞ for which the following statement holds: If f : [−1, 1] → R
is a continuously differentiable function satisfying f (1) > f (−1) and |f 0 (y)| ≤ 1 for all y ∈ [−1, 1], then there
1/p
is an x ∈ [−1, 1] such that f 0 (x) > 0 and |f (y) − f (x)| ≤ cp f 0 (x) |y − x| for all y ∈ [−1, 1]. (10 points)
b) Does such a constant also exist for p = 1? (10 points)
R1 R1 R1
Solution. (a) Let g(x) = max(0, f 0 (x)). Then 0 < −1 f 0 (x)dx = −1 g(x)dx + −1 (f 0 (x) − g(x))dx, so
R1 R1 R1 R1
we get −1 |f 0 (x)|dx = −1 g(x)dx + −1 (g(x) − f 0 (x))dx < 2 −1 g(x)dx. Fix p and c (to be determined
at the end). Given any t > 0, choose for every x such that g(x) > t an interval I x = [x, y] such that
|f (y) − f (x)| > cg(x)1/p |y − x| > ct1/p |Ix | and choose disjoint Ixi that cover at least one third of the measure
S R R1 R1
of the set {g > t}. For I = i Ii we thus have ct1/p |I| ≤ I f 0 (x)dx ≤ −1 |f 0 (x)|dx < 2 −1 g(x)dx; so
R 1 R 1 R 1
|{g > t}| ≤ 3|I| < (6/c)t−1/p −1 g(x)dx. Integrating the inequality, we get −1 g(x)dx = 0 |{g > t}|dt <
R1
(6/c)p/(p − 1) −1 g(x)dx; this is a contradiction e.g. for cp = (6p)/(p − 1).
(b) No. Given c > 1, denote α = 1/c and choose 0 < ε < 1 such that ((1 + ε)/(2ε)) −α < 1/4. Let
g : [−1, 1] → [−1, 1] be continuous, even, g(x) = −1 for |x| ≤ ε and 0 ≤ g(x) < α((|x| + ε)/(2ε)) −α−1 for ε <
R1 R1
|x| ≤ 1 is chosen such that ε g(t)dt > −ε/2+ ε α((|x|+ε)/(2ε))−α−1 dt = −ε/2+2ε(1−((1+ε)/(2ε))−α) > ε.
R R1
Let f = g(t)dt. Then f (1) − f (−1) ≥ −2ε + 2 ε g(t)dt > 0. If ε < x < 1 and y = −ε, then |f (x) − f (y)| ≥
Rx Rx
2ε − ε g(t)dt ≥ 2ε − ε α((t + ε)/(2ε))−α−1 = 2ε((x + ε)/(2ε))−α > g(x)|x − y|/α = f 0 (x)|x − y|/α;
symmetrically for −1 < x < −ε and y = ε.

3
6th INTERNATIONAL COMPETITION FOR UNIVERSITY
STUDENTS IN MATHEMATICS
Keszthely, 1999.

Problems and solutions on the second day

1. Suppose that in a not necessarily commutative ring R the square of any element is 0. Prove that
abc + abc = 0 for any three elements a, b, c. (20 points)
Solution. From 0 = (a + b)2 = a2 + b2 + ab + ba = ab + ba, we have ab = −(ba) for arbitrary a, b, which
implies   
abc = a(bc) = − (bc) a = − b(ca) = (ca)b = c(ab) = − (ab)c = −abc.

2. We throw a dice (which selects one of the numbers 1, 2, . . . , 6 with equal probability) n times. What is
the probability that the sum of the values is divisible by 5? (20 points)
(r)
Solution 1. For all nonnegative integers n and modulo 5 residue class r, denote by pn the probability
(0)
that after n throwing the sum of values is congruent to r modulo n. It is obvious that p 0 = 1 and
(1) (2) (3) (4)
p0 = p0 = p0 = p0 = 0.
Moreover, for any n > 0 we have
6
(r)
X 1 (r−i)
pn = pn−1 . (1)
i=1
6
(r)
From this recursion we can compute the probabilities for small values of n and can conjecture that p n =
1 4 (r) 1 1
5 + 5·6n if n ≡ r (mod )5 and pn = 5 − 5·6n otherwise. From (1), this conjecture can be proved by
induction.
Solution 2. Let S be the set of all sequences consisting of digits 1, . . . , 6 of length n. We create collections
of these sequences.
Let a collection contain sequences of the form

. . . 6} XY1 . . . Yn−k−1 ,
|66 {z
k

where X ∈ {1, 2, 3, 4, 5} and k and the digits Y1 , . . . , Yn−k−1 are fixed. Then each collection consists of 5
sequences, and the sums of the digits of sequences give a whole residue system mod 5.
Except for the sequence 66 . . . 6, each sequence is the element of one collection. This means that the
number of the sequences, which have a sum of digits divisible by 5, is 51 (6n − 1) + 1 if n is divisible by 5,
otherwise 15 (6n − 1).
Thus, the probability is 51 + 5·64 n if n is divisible by 5, otherwise it is 51 − 5·61 n .
Solution 3. For arbitrary positive integer k denote by pk the probability that the sum of values is k. Define
the generating function
∞  n
X x + x2 + x3 + x4 + x5 + x6
f (x) = p k xk = .
6
k=1

(The last equality can be easily proved by induction.)



P
Our goal is to compute the sum p5k . Let ε = cos 2π 2π
5 + i sin 5 be the first 5th root of unity. Then
k=1


X f (1) + f (ε) + f (ε2 ) + f (ε3 ) + f (ε4 )
p5k = .
5
k=1

1
εjn
Obviously f (1) = 1, and f (εj ) = for j = 1, 2, 3, 4. This implies that f (ε) + f (ε2 ) + f (ε3 ) + f (ε4 )
6n

P
4
is 6n if n is divisible by 5, otherwise it is −1
6n . Thus, p5k is 51 + 5·64 n if n is divisible by 5, otherwise it is
k=1
1 1
5 − 5·6n .

n
P n
P n
3. Assume that x1 , . . . , xn ≥ −1 and x3i = 0. Prove that xi ≤ 3. (20 points)
i=1 i=1

Solution. The inequality


 2
3 1 1
0 ≤ x3 − x + = (x + 1) x −
4 4 2
holds for x ≥ −1.
Substituting x1 , . . . , xn , we obtain
n   n n n
X 3 1 X 3X n 3X n
0≤ x3i − xi + = x3i − xi + = 0 − xi + ,
i=1
4 4 i=1
4 i=1 4 4 i=1 4

n
P n
so xi ≤ 3.
i=1

Remark. Equailty holds only in the case when n = 9k, k of the x1 , ..., xn are −1, and 8k of them are 21 .

4. Prove that there exists no function f : (0, +∞) → (0, +∞) such that f 2 (x) ≥ f (x + y) f (x) + y for any
x, y > 0. (20 points)
Solution. Assume that such a function exists. The initial inequality can be written in the form f (x) −
2
(x) (x)y
f (x + y) ≥ f (x) − ff(x)+y = ff(x)+y . Obviously, f is a decreasing function. Fix x > 0 and choose n ∈ N such
that nf (x + 1) ≥ 1. For k = 0, 1, . . . , n − 1 we have
    k

k k+1 f x+ n 1
f x+ −f x+ ≥ k
 ≥ .
n n nf x + n +1 2n

The additon of these inequalities gives f (x + 1) ≤ f (x) − 21 . From this it follows that f (x + 2m) ≤ f (x) − m
for all m ∈ N. Taking m ≥ f (x), we get a contradiction with the conditon f (x) > 0.

5. Let S be the set of all words consisting of the letters x, y, z, and consider an equivalence relation ∼ on S
satisfying the following conditions: for arbitrary words u, v, w ∈ S
(i) uu ∼ u;
(ii) if v ∼ w, then uv ∼ uw and vu ∼ wu.
Show that every word in S is equivalent to a word of length at most 8. (20 points)
Solution. First we prove the following lemma: If a word u ∈ S contains at least one of each letter, and
v ∈ S is an arbitrary word, then there exists a word w ∈ S such that uvw ∼ u.
If v contains a single letter, say x, write u in the form u = u1 xu2 , and choose w = u2 . Then uvw =
(u1 xu2 )xu2 = u1 ((xu2 )(xu2 )) ∼ u1 (xu2 ) = u.
In the general case, let the letters of v be a1 , . . . , ak . Then one can choose some words w1 , . . . , wk such
that (ua1 )w1 ∼ u, (ua1 a2 )w2 ∼ ua1 , . . . , (ua1 . . . ak )wk ∼ ua1 . . . ak−1 . Then u ∼ ua1 w1 ∼ ua1 a2 w2 w1 ∼
. . . ∼ ua1 . . . ak wk . . . w1 = uv(wk . . . w1 ), so w = wk . . . w1 is a good choice.
Consider now an arbitrary word a, which contains more than 8 digits. We shall prove that there is a
shorter word which is equivalent to a. If a can be written in the form uvvw, its length can be reduced by
uvvw ∼ uvw. So we can assume that a does not have this form.
Write a in the form a = bcd, where b and d are the first and last four letter of a, respectively. We prove
that a ∼ bd.

2
It is easy to check that b and d contains all the three letters x, y and z, otherwise their length could be
reduced. By the lemma there is a word e such that b(cd)e ∼ b, and there is a word f such that def ∼ d.
Then we can write
a = bcd ∼ bc(def ) ∼ bc(dedef ) = (bcde)(def ) ∼ bd.

Remark. Of course, it is enough to give for every word of length 9 an shortest shorter word. Assuming that
the first letter is x and the second is y, it is easy (but a little long) to check that there are 18 words of length
9 which cannot be written in the form uvvw.
For five of these words there is a 2-step solution, for example

xyxzyzx zy ∼ xy xzyz xzyzy ∼ xyx zy zy ∼ xyxzy.

In the remaining 13 cases we need more steps. The general algorithm given by the Solution works
for these cases as well, but needs also very long words. For example, to reduce the length of the word
a = xyzyxzxyz, we have set b = xyzy, c = x, d = zxyz, e = xyxzxzyxyzy, f = zyxyxzyxzxzxzxyxyzxyz.
The longest word in the algorithm was

bcdedef = xyzyxzxyzxyxzxzyxyzyzxyzxyxzxzyxyzyzyxyxzyxzxzxzxyxyzxyz,

which is of length 46. This is not the shortest way: reducing the length of word a can be done for example
by the following steps:

xyzyxzx yz ∼ xyzyxz xyzy z ∼ xyzyxzxy zyx yzyz ∼ xyzyxz xyzyxz yx yz yz ∼ xy zyx zyx yz ∼ xyzyxyz.

(The last example is due to Nayden Kambouchev from Sofia University.)

1
6. Let A be a subset of Zn = Z/nZ containing at most 100 ln n elements. Define the rth Fourier coefficient
of A for r ∈ Zn by  
X 2πi
f (r) = exp sr .
n
s∈A
|A|
Prove that there exists an r =
6 0, such that f (r) ≥ 2 . (20 points)
Solution. Let A = {a1 , . . . , ak }. Consider the k-tuples
 
2πia1 t 2πiak t
exp , . . . , exp ∈ Ck , t = 0, 1, . . . , n − 1.
n n

Each component is in the unit circle |z| = 1. Split the circle into 6 equal arcs. This induces a decomposition
1
of the k-tuples into 6k classes. By the condition k ≤ 100 ln n we have n > 6k , so there are two k-tuples in
the same class say for t1 < t2 . Set r = t2 − t1 . Then
 
2πiaj r 2πaj t2 2πaj t1 π 1
Re exp = cos − ≥ cos =
n n n 3 2

for all j, so
k
|f (r)| ≥ Re f (r) ≥ .
2

3
Solutions for the first day problems at the IMC 2000

Problem 1.
Is it true that if f : [0, 1] → [0, 1] is
a) monotone increasing
b) monotone decreasing
then there exists an x ∈ [0, 1] for which f (x) = x?
Solution.
a) Yes.
Proof: Let A = {x ∈ [0, 1] : f (x) > x}. If f (0) = 0 we are done, if not then A is
non-empty (0 is in A) bounded, so it has supremum, say a. Let b = f (a).
I. case: a < b. Then, using that f is monotone and a was the sup, we get b = f (a) ≤
f ((a + b)/2) ≤ (a + b)/2, which contradicts a < b.
II. case: a > b. Then we get b = f (a) ≥ f ((a + b)/2) > (a + b)/2 contradiction.
Therefore we must have a = b.
b) No. Let, for example,

f (x) = 1 − x/2 if x ≤ 1/2


and
f (x) = 1/2 − x/2 if x > 1/2
This is clearly a good counter-example.

Problem 2.
Let p(x) = x5 + x and q(x) = x5 + x2 . Find all pairs (w, z) of complex numbers with
w 6= z for which p(w) = p(z) and q(w) = q(z).
Short solution. Let

p(x) − p(y)
P (x, y) = = x4 + x3 y + x2 y 2 + xy 3 + y 4 + 1
x−y

and
q(x) − q(y)
Q(x, y) = = x4 + x3 y + x2 y 2 + xy 3 + y 4 + x + y.
x−y
We need those pairs (w, z) which satisfy P (w, z) = Q(w, z) = 0.
From P − Q = 0 we have w + z = 1. Let c = wz. After a short calculation we obtain
c2 − 3c + 2 = 0, which has the solutions c = 1 and c = 2. From the system w + z = 1,
wz = c we obtain the following pairs:
√ √ ! √ √ !
1 ± 3i 1 ∓ 3i 1 ± 7i 1 ∓ 7i
, and , .
2 2 2 2

1
Problem 3.
A and B are square complex matrices of the same size and

rank(AB − BA) = 1 .

Show that (AB − BA)2 = 0.


Let C = AB − BA. Since rank C = 1, at most one eigenvalue of C is different from 0.
Also tr C = 0, so all the eigevalues are zero. In the Jordan canonical form there can only
be one 2 × 2 cage and thus C 2 = 0.

Problem 4.
a) Show that if (xi ) is a decreasing sequence of positive numbers then

n
!1/2 n
X X xi
x2i ≤ √ .
i=1 i=1
i

b) Show that there is a constant C so that if (xi ) is a decreasing sequence of positive


numbers then !1/2
∞ ∞ ∞
X 1 X
2
X
√ x ≤C xi .
m=1
m i=m i i=1

Solution.
a)
n n n i n n
X xi 2 X xi xj X xi X xi X xi xi X
( √ ) = √√ ≥ √ √ ≥ √ i√ = x2i
i=1
i i,j
i j i=1
i j=1
j i=1
i i i=1

b)
∞ ∞ ∞ ∞
X 1 X 2 1/2 X 1 X xi
√ ( xi ) ≤ √ √
m=1
m i=m m=1
m i=m i − m + 1

by a)
∞ i
X X 1
= xi √ √
i=1 m=1
m i−m+1

You can get a sharp bound on

i
X 1
sup √ √
i m=1
m i−m+1

by checking that it is at most


i+1
1
Z
√ √ dx = π
0 x i+1−x

2
Alternatively you can observe that

i i/2
X 1 X 1
√ √ =2 √ √ ≤
m=1
m i+1−m m=1
m i+1−m

i/2
1 X 1 1 p
≤ 2p √ ≤ 2 p .2 i/2 = 4
i/2 m=1 m i/2

Problem 5.
Let R be a ring of characteristic zero (not necessarily commutative). Let e, f and g
be idempotent elements of R satisfying e + f + g = 0. Show that e = f = g = 0.
(R is of characteristic zero means that, if a ∈ R and n is a positive integer, then
na 6= 0 unless a = 0. An idempotent x is an element satisfying x = x2 .)
Solution. Suppose that e + f + g = 0 for given idempotents e, f, g ∈ R. Then

g = g 2 = (−(e + f ))2 = e + (ef + f e) + f = (ef + f e) − g,

i.e. ef+fe=2g, whence the additive commutator

[e, f ] = ef − f e = [e, ef + f e] = 2[e, g] = 2[e, −e − f ] = −2[e, f ],

i.e. ef = f e (since R has zero characteristic). Thus ef + f e = 2g becomes ef = g, so that


e + f + ef = 0. On multiplying by e, this yields e + 2ef = 0, and similarly f + 2ef = 0,
so that f = −2ef = e, hence e = f = g by symmetry. Hence, finaly, 3e = e + f + g = 0,
i.e. e = f = g = 0.
For part (i) just omit some of this.

Problem 6.
Let f : R → (0, ∞) be an increasing differentiable function for which lim f (x) = ∞
x→∞
and f 0 is bounded.
Rx
Let F (x) = f . Define the sequence (an ) inductively by
0

1
a0 = 1, an+1 = an + ,
f (an )

and the sequence (bn ) simply by bn = F −1 (n). Prove that lim (an − bn ) = 0.
n→∞
Solution. From the conditions it is obvious that F is increasing and lim bn = ∞.
n→∞
By Lagrange’s theorem and the recursion in (1), for all k ≥ 0 integers there exists a
real number ξ ∈ (ak , ak+1 ) such that

f (ξ)
F (ak+1 ) − F (ak ) = f (ξ)(ak+1 − ak ) = . (2)
f (ak )

3
By the monotonity, f (ak ) ≤ f (ξ) ≤ f (ak+1 ), thus
f (ak+1 ) f (ak+1 ) − f (ak )
1 ≤ F (ak+1 ) − F (ak ) ≤ =1+ . (3)
f (ak ) f (ak )
Summing (3) for k = 0, . . . , n − 1 and substituting F (bn ) = n, we have
n−1
X f (ak+1 ) − f (ak )
F (bn ) < n + F (a0 ) ≤ F (an ) ≤ F (bn ) + F (a0 ) + . (4)
f (ak )
k=0

From the first two inequalities we already have an > bn and lim an = ∞.
n→∞
Let ε be an arbitrary positive number. Choose an integer Kε such that f (aKε ) > 2ε .
If n is sufficiently large, then
n−1
X f (ak+1 ) − f (ak )
F (a0 ) + =
f (ak )
k=0

K n−1
!
ε −1
X f (ak+1 ) − f (ak ) X f (ak+1 ) − f (ak )
= F (a0 ) + + < (5)
f (ak ) f (ak )
k=0 k=Kε
n−1
1 X 
< Oε (1) + f (ak+1 ) − f (ak ) <
f (aKε )
k=Kε
ε 
< Oε (1) + f (an ) − f (aKε ) < εf (an ).
2
Inequalities (4) and (5) together say that for any positive ε, if n is sufficiently large,
F (an ) − F (bn ) < εf (an ).
Again, by Lagrange’s theorem, there is a real number ζ ∈ (bn , an ) such that
F (an ) − F (bn ) = f (ζ)(an − bn ) > f (bn )(an − bn ), (6)
thus
f (bn )(an − bn ) < εf (an ). (7)
Let B be an upper bound for f 0 . Apply f (an ) < f (bn ) + B(an − bn ) in (7):

f (bn )(an − bn ) < ε f (bn ) + B(an − bn ) ,

f (bn ) − εB (an − bn ) < εf (bn ). (8)
Due to lim f (bn ) = ∞, the first factor is positive, and we have
n→∞

f (bn )
an − b n < ε < 2ε (9)
f (bn ) − εB
for sufficiently large n.
Thus, for arbitrary positive ε we proved that 0 < an − bn < 2ε if n is sufficiently large.

4
Solutions for the second day problems at the IMC 2000

Problem 1.
a) Show that the unit square can be partitioned into n smaller squares if n is large
enough.
b) Let d ≥ 2. Show that there is a constant N (d) such that, whenever n ≥ N (d), a
d-dimensional unit cube can be partitioned into n smaller cubes.

Solution. We start with the following lemma: If a and b be coprime positive integers
then every sufficiently large positive integer m can be expressed in the form ax + by with
x, y non-negative integers.
Proof of the lemma. The numbers 0, a, 2a, . . . , (b−1)a give a complete residue system
modulo b. Consequently, for any m there exists a 0 ≤ x ≤ b − 1 so that ax ≡ m (mod b).
If m ≥ (b − 1)a, then y = (m − ax)/b, for which x + by = m, is a non-negative integer, too.
Now observe that any dissection of a cube into n smaller cubes may be refined to
give a dissection into n + (ad − 1) cubes, for any a ≥ 1. This refinement is achieved by
picking an arbitrary cube in the dissection, and cutting it into ad smaller cubes. To prove
the required result, then, it suffices to exhibit two relatively prime integers of form a d − 1.
In the 2-dimensional case, a1 = 2 and a2 = 3 give the coprime numbers 22 − 1 = 3 and
32 − 1 = 8. In the general case, two such integers are 2d − 1 and (2d − 1)d − 1, as is easy
to check.

Problem 2. Let f be continuous and nowhere monotone on [0, 1]. Show that the set
of points on which f attains local minima is dense in [0, 1].
(A function is nowhere monotone if there exists no interval where the function is
monotone. A set is dense if each non-empty open interval contains at least one element of
the set.)

Solution. Let (x − α, x + α) ⊂ [0, 1] be an arbitrary non-empty open interval. The


function f is not monoton in the intervals [x − α, x] and [x, x + α], thus there exist some
real numbers x − α ≤ p < q ≤ x, x ≤ r < s ≤ x + α so that f (p) > f (q) and f (r) < f (s).
By Weierstrass’ theorem, f has a global minimum in the interval [p, s]. The values f (p)
and f (s) are not the minimum, because they are greater than f (q) and f (s), respectively.
Thus the minimum is in the interior of the interval, it is a local minimum. So each non-
empty interval (x − α, x + α) ⊂ [0, 1] contains at least one local minimum.

Problem 3. Let p(z) be a polynomial of degree n with complex coefficients. Prove


that there exist at least n + 1 complex numbers z for which p(z) is 0 or 1.

Solution. The statement is not true if p is a constant polynomial. We prove it only


in the case if n is positive.
For an arbitrary polynomial q(z) and complex number c, denote by µ(q, c) the largest
exponent α for which q(z) is divisible by (z − c)α . (With other words, if c is a root of q,
then µ(q, c) is the root’s multiplicity. Otherwise 0.)

1
Denote by S0 and S1 the sets of complex numbers z for which p(z) is 0 or 1, respec-
tively. These sets contain all roots of the polynomials p(z) and p(z) − 1, thus
X X
µ(p, c) = µ(p − 1, c) = n. (1)
c∈S0 c∈S1

The polynomial p0 has at most n − 1 roots (n > 0 is used here). This implies that
X
µ(p0 , c) ≤ n − 1. (2)
c∈S0 ∪S1

If p(c) = 0 or p(c) − 1 = 0, then

µ(p, c) − µ(p0 c) = 1 or µ(p − 1, c) − µ(p0 c) = 1, (3)

respectively. Putting (1), (2) and (3) together we obtain


X  X 
S0 + S1 = µ(p, c) − µ(p0 , c) + µ(p − 1, c) − µ(p0 , c) =
c∈S0 c∈S1

X X X
= µ(p, c) + µ(p − 1, c) − µ(p0 , c) ≥ n + n − (n − 1) = n + 1.
c∈S0 c∈S1 c∈S0 ∪S1

Problem 4. Suppose the graph of a polynomial of degree 6 is tangent to a straight


line at 3 points A1 , A2 , A3 , where A2 lies between A1 and A3 .
a) Prove that if the lengths of the segments A1 A2 and A2 A3 are equal, then the areas
of the figures bounded by these segments and the graph of the polynomial are equal as well.
A2 A3
b) Let k = , and let K be the ratio of the areas of the appropriate figures. Prove
A1 A2
that
2 5 7
k < K < k5 .
7 2

Solution. a) Without loss of generality, we can assume that the point A2 is the origin
of system of coordinates. Then the polynomial can be presented in the form

y = a0 x4 + a1 x3 + a2 x2 + a3 x + a4 x2 + a5 x,


where the equation y = a5 x determines the straight line A1 A3 . The abscissas of the points
A1 and A3 are −a and a, a > 0, respectively. Since −a and a are points of tangency, the
numbers −a and a must be double roots of the polynomial a0 x4 + a1 x3 + a2 x2 + a3 x + a4 .
It follows that the polynomial is of the form

y = a0 (x2 − a2 )2 + a5 x.

2
The equality follows from the equality of the integrals

Z0 Za
2 2 2
a0 x2 − a2 x2 dx
 
a0 x − a x dx =
−a 0

due to the fact that the function y = a0 (x2 − a2 ) is even.


b) Without loss of generality, we can assume that a0 = 1. Then the function is of the
form
y = (x + a)2 (x − b)2 x2 + a5 x,
where a and b are positive numbers and b = ka, 0 < k < ∞. The areas of the figures at
the segments A1 A2 and A2 A3 are equal respectively to

Z0
a7
(x + a)2 (x − b)2 x2 dx = (7k 2 + 7k + 2)
210
−a

and
Zb
a7
(x + a)2 (x − b)2 x2 dx = (2k 2 + 7k + 7)
210
0

Then
2k 2 + 7k + 7
K = k5 .
7k 2 + 7k + 2
2k2 +7k+7
The derivative of the function f (k) = 7k2 +7k+2 is negative for 0 < k < ∞. Therefore f (k)
7 2 2 2k2 +7k+7 7
decreases from to when k increases from 0 to ∞. Inequalities
2 7 7 < 7k2 +7k+2 < 2 imply
the desired inequalities.

Problem 5. Let R+ be the set of positive real numbers. Find all functions f : R+ →
R+ such that for all x, y ∈ R+

f (x)f (yf (x)) = f (x + y).

First solution. First, if we assume that f (x) > 1 for some x ∈ R+ , setting y =
x
gives the contradiction f (x) = 1. Hence f (x) ≤ 1 for each x ∈ R+ , which implies
f (x) − 1
that f is a decreasing function.
If f (x) = 1 for some x ∈ R+ , then f (x + y) = f (y) for each y ∈ R+ , and by the
monotonicity of f it follows that f ≡ 1.
Let now f (x) < 1 for each x ∈ R+ . Then f is strictly decreasing function, in particular
injective. By the equalities

f (x)f (yf (x)) = f (x + y) =

3
   
= f yf (x) + x + y(1 − f (x)) = f (yf (x))f x + y(1 − f (x)) f (yf (x))

1 − f (1)
we obtain that x = (x + y(1 − f (x)))f (yf (x)). Setting x = 1, z = xf (1) and a = ,
f (1)
1
we get f (z) = .
1 + az
1
Combining the two cases, we conclude that f (x) = for each x ∈ R+ , where
1 + ax
a ≥ 0. Conversely, a direct verification shows that the functions of this form satisfy the
initial equality.
Second solution. As in the first solution we get that f is a decreasing function, in
particular differentiable almost everywhere. Write the initial equality in the form

f (x + y) − f (x) f (yf (x)) − 1


= f 2 (x) .
y yf (x)

It follows that if f is differentiable at the point x ∈ R+ , then there exists the limit
f (z) − 1 0 2 +
 1 0
lim =: −a. Therefore f (x) = −af (x) for each x ∈ R , i.e. = a,
z→0+ z f (x)
1
which means that f (x) = . Substituting in the initial relaton, we find that b = 1
ax + b
and a ≥ 0.

1 n
Problem 6. For an m × m real matrix A, eA is defined as
P
n!
A . (The sum is
n=0
convergent for all matrices.) Prove or disprove, that for all real polynomials p and m × m
real matrices A and B, p(eAB ) is nilpotent if and only if p(eBA ) is nilpotent. (A matrix
A is nilpotent if Ak = 0 for some positive integer k.)
Solution. First we prove that for any polynomial q and m × m matrices A and B,
the characteristic polinomials of q(eAB ) and q(eBA ) are the same. It is easy to check that

for any matrix X, q(eX ) = cn X n with some real numbers cn which depend on q. Let
P
n=0


X ∞
X
C= cn · (BA)n−1 B = cn · B(AB)n−1 .
n=1 n=1

Then q(eAB ) = c0 I + AC and q(eBA ) = c0 I + CA. It is well-known that the characteristic


polynomials of AC and CA are the same; denote this polynomial by f (x). Then the
characteristic polynomials of matrices q(eAB ) and q(eBA ) are both f (x − c0 ).
k
Now assume that the matrix p(eAB ) is nilpotent, i.e. p(eAB ) = 0 for some positive
integer k. Chose q = pk . The characteristic polynomial of the matrix q(eAB ) = 0 is xm ,
so the same holds for the matrix q(eBA ). By the theorem of Cayley and Hamilton, this
m km
implies that q(eBA ) = p(eBA ) = 0. Thus the matrix q(eBA ) is nilpotent, too.

4
8th IMC 2001
July 19 - July 25
Prague, Czech Republic

First day

Problem 1.
Let n be a positive integer. Consider an n×n matrix with entries 1, 2, . . . , n2
written in order starting top left and moving along each row in turn left–to–
right. We choose n entries of the matrix such that exactly one entry is chosen
in each row and each column. What are the possible values of the sum of the
selected entries?

Solution. Since there are exactly n rows and n columns, the choice is of
the form
{(j, σ(j)) : j = 1, . . . , n}
where σ ∈ Sn is a permutation. Thus the corresponding sum is equal to
n
X n
X n
X n
X
n(j − 1) + σ(j) = nj − n+ σ(j)
j=1 j=1 j=1 j=1

n n n
X X X n(n + 1) n(n2 + 1)
=n j− n+ j = (n + 1) − n2 = ,
j=1 j=1 j=1
2 2

which shows that the sum is independent of σ.

Problem 2.
Let r, s, t be positive integers which are pairwise relatively prime. If a and b
are elements of a commutative multiplicative group with unity element e, and
t
ar = bs = (ab) = e, prove that a = b = e.
Does the same conclusion hold if a and b are elements of an arbitrary non-
commutative group?

Solution. 1. There exist integers u and v such that us + vt = 1. Since


ab = ba, we obtain
 v
us+vt us t us us u
ab = (ab) = (ab) (ab) = (ab) e = (ab) = aus (bs ) = aus e = aus .
r us
Therefore, br = ebr = ar br = (ab) = ausr = (ar ) = e. Since xr + ys = 1 for
suitable integers x and y,

b = bxr+ys = (br )x (bs )y = e.

It follows similarly that a = e as well.


2. This is not true. Let a = (123) and b = (34567) be cycles of the permu-
7
tation group S7 of order 7. Then ab = (1234567) and a3 = b5 = (ab) = e.

X tn
Problem 3. Find lim (1 − t) , where t % 1 means that t ap-
t%1
n=1
1 + tn
proaches 1 from below.

1
Solution.
∞ ∞
X tn 1−t X tn
lim (1 − t) n
= lim · (− ln t) =
t→1−0
n=1
1+t t→1−0 − ln t
n=1
1 + tn

∞ ∞ Z ∞
X 1 X 1 dx
= lim (− ln t) −n ln t
= lim h nh
= = ln 2.
t→1−0
n=1
1 + e h→+0
n=1
1 + e 0 1 + ex

Problem 4.
Let k be a positive integer. Let p(x) be a polynomial of degree n each of
whose coefficients is −1, 1 or 0, and which is divisible by (x − 1)k . Let q be a
prime such that lnq q < ln(n+1)
k
. Prove that the complex qth roots of unity are
roots of the polynomial p(x).

Solution. Let p(x) = (x−1)k ·r(x) and εj = e2πi·j/q (j = 1, 2, . . . , q −1). As


is well-known, the polynomial xq−1 + xq−2 + . . . + x + 1 = (x − ε1 ) . . . (x − εq−1 )
is irreducible, thus all ε1 , . . . , εq−1 are roots of r(x), or none of them.
Qq−1
Suppose that none of ε1 , . . . , εq−1 is a root of r(x). Then j=1 r(εj ) is a
rational integer, which is not 0 and

q−1
Y q−1
Y q−1
Y
q−1 k

(n + 1) ≥ p(εj ) = (1 − εj ) ·
r(εj ) ≥
j=1 j=1 j=1
k
q−1
Y
≥ (1 − εj ) = (1q−1 + 1q−2 + . . . + 11 + 1)k = q k .


j=1
q k
This contradicts the condition ln q < ln(n+1) .

Problem 5.
Let A be an n × n complex matrix such that A 6= λI for all λ ∈ C. Prove
that A is similar to a matrix having at most one non-zero entry on the main
diagonal.

Solution. The statement will be proved by induction


 onn. For n = 1,
a b
there is nothing to do. In the case n = 2, write A = . If b 6= 0, and
c d
c 6= 0 or b = c = 0 then A is similar to
     
1 0 a b 1 0 0 b
=
a/b 1 c d −a/b 1 c − ad/b a+d
or      
1 −a/c a b 1 a/c 0 b − ad/c
= ,
0 1 c d 0 1 c a+d
respectively. If b = c = 0 and a 6= d, then A is similar to
     
1 1 a 0 1 −1 a d−a
= ,
0 1 0 d 0 1 0 d

2
and we can perform the step seen in the case b 6= 0 again.
0
Assume
 0 now  that n > 3 and the problem has been solved for all n < n. Let
A ∗
A= , where A0 is (n − 1) × (n − 1) matrix. Clearly we may assume
∗ β n
 
0 ∗
that A0 6= λ0 I, so the induction provides a P with, say, P −1 A0 P = .
∗ α n−1
But then the matrix
 −1  0    −1 0 
P 0 A ∗ P 0 P AP ∗
B= =
0 1 ∗ β 0 1 ∗ β
is similar to A and  its diagonal
 is (0, 0, . . . , 0, α, β). On the other hand, we may
0 ∗
also view B as , where C is an (n − 1) × (n − 1) matrix with diagonal
∗ C n
(0, . . . , 0, α, β). If the inductive
 hypothesis is applicable to C, we would have
−1 0 ∗
Q CQ = D, with D = so that finally the matrix
∗ γ n−1
         
1 0 1 0 1 0 0 ∗ 1 0 0 ∗
E= ·B· = =
0 Q−1 0 Q 0 Q−1 ∗ C 0 Q ∗ D

is similar to A and its diagonal is (0, 0, . . . , 0, γ), as required.


The inductive argument can fail only when n − 1 = 2 and the resulting
matrix applying P has the form
 
0 a b
P −1 AP =  c d 0 
e 0 d

where d 6= 0. The numbers a, b, c, e cannot be 0 at the same time. If, say,


b 6= 0, A is similar to
     
1 0 0 0 a b 1 0 0 −b a b
 0 1 0  c d 0  0 1 0  =  c d 0 .
1 0 1 e 0 d −1 0 1 e−b−d a b+d

Performing half of the induction step again, the diagonal of the resulting matrix
will be (0, d − b, d + b) (the trace is the same) and the induction step can be
finished. The cases a 6= 0, c 6= 0 and e 6= 0 are similar.

Problem 6.
Suppose that the differentiable functions a, b, f, g : R → R satisfy

f (x) ≥ 0, f 0 (x) ≥ 0, g(x) > 0, g 0 (x) > 0 for all x ∈ R,

lim a(x) = A > 0, lim b(x) = B > 0, lim f (x) = lim g(x) = ∞,
x→∞ x→∞ x→∞ x→∞

and
f 0 (x) f (x)
+ a(x) = b(x).
g 0 (x) g(x)
Prove that
f (x) B
lim = .
x→∞ g(x) A+1

3
Solution. Let 0 < ε < A be an arbitrary real number. If x is sufficiently
large then f (x) > 0, g(x) > 0, |a(x) − A| < ε, |b(x) − B| < ε and

f 0 (x) f (x) f 0 (x) f (x)


(1) B − ε < b(x) = + a(x) < + (A + ε) <
g 0 (x) g(x) g 0 (x) g(x)
A A−1 0
(A + ε)(A + 1) f 0 (x) g(x) + A · f (x) · g(x) · g (x)
< · A =
A (A + 1) · g(x) · g 0 (x)
  A 0
(A + ε)(A + 1) f (x) · g(x)
= ·  A+1 0 ,
A g(x)

thus
  A 0
f (x) · g(x) A(B − ε)
(2)  A+1 0 > (A + ε)(A + 1) .
g(x)

It can be similarly obtained that, for sufficiently large x,


  A 0
f (x) · g(x) A(B + ε)
(3)  A+1 0 < (A − ε)(A + 1) .
g(x)

From ε → 0, we have
  A 0
f (x) · g(x) B
lim  A+1 0 = A + 1 .
x→∞
g(x)

By l’Hospital’s rule this implies


A
f (x) f (x) · g(x) B
lim = lim A+1 = .
x→∞ g(x) x→∞ A +1
g(x)

4
8th IMC 2001
July 19 - July 25
Prague, Czech Republic

Second day

Problem 1.
Let r, s ≥ 1 be integers and a0 , a1 , . . . , ar−1 , b0 , b1 , . . . , bs−1 be real non-
negative numbers such that

(a0 + a1 x + a2 x2 + . . . + ar−1 xr−1 + xr )(b0 + b1 x + b2 x2 + . . . + bs−1 xs−1 + xs ) =

1 + x + x2 + . . . + xr+s−1 + xr+s .
Prove that each ai and each bj equals either 0 or 1.

Solution. Multiply the left hand side polynomials. We obtain the following
equalities:
a0 b0 = 1, a0 b1 + a1 b0 = 1, . . .
Among them one can find equations

a0 + a1 bs−1 + a2 bs−2 + . . . = 1
and

b0 + b1 ar−1 + b2 ar−2 + . . . = 1.
From these equations it follows that a0 , b0 ≤ 1. Taking into account that
a0 b0 = 1 we can see that a0 = b0 = 1.
Now looking at the following equations we notice that all a’s must be less
than or equal to 1. The same statement holds for the b’s. It follows from
a0 b1 + a1 b0 = 1 that one of the numbers a1 , b1 equals 0 while the other one must
be 1. Follow by induction.

Problem 2.
√ q p 2bn
Let a0 = 2, b0 = 2, an+1 = 2 − 4 − a2n , bn+1 = p .
2 + 4 + b2n
a) Prove that the sequences (an ), (bn ) are decreasing and converge to 0.
b) Prove that the sequence (2n an ) is increasing, the sequence (2n bn ) is de-
creasing and that these two sequences converge to the same limit.
c) Prove that there is a positive constant C such that for all n the following
C
inequality holds: 0 < bn − an < n .
8
p √ √
p Solution. Obviously a2 = 2 − 2 < 2. Since the function f (x) =

2 − 4 − x2 is increasing on the interval [0, 2] the inequality a1 > a2 implies
that a2 > a3 . Simple induction ends the  proof of monotonicity of (an ). In the
2x
same way we prove that (bn ) decreases just notice that g(x) = √ =
 2 + 4 + x2
 p 
2/ 2/x + 1 + 4/x2 . It is a matter of simple manipulation to prove that
2f (x) > x for all x ∈ (0, 2), this implies that the sequence (2n an ) is strictly

1
increasing. The inequality 2g(x) < x for x ∈ (0, 2) implies that the sequence
4b2
(2n bn ) strictly decreases. By an easy induction one can show that a2n = 4+bn2
n
for positive integers n. Since the limit of the decreasing sequence (2n bn ) of
positive numbers is finite we have

4 · 4n b2n
lim 4n a2n = lim = lim 4n b2n .
4 + b2n

We know already that the limits lim 2n an and lim 2n bn are equal. The first
of the two is positive because the sequence (2n an ) is strictly increasing. The
existence of a number C follows easily from the equalities

4n+1 b2n  n  (2n bn )4 1 1


2n bn − 2n an = 4n b2n − 2
/ 2 bn + 2 n a n = · ·
4 + bn 4 + b2n 4n 2n (bn + an )

and from the existence of positive limits lim 2n bn and lim 2n an .


Remark. The last problem may be solved in a much simpler way by
someone who is able to make use of sine and cosine. It is enough to notice that
π π
an = 2 sin n+1 and bn = 2 tan n+1 .
2 2
Problem 3.
Find the maximum number of points on a sphere of radius 1 in Rn√such that
the distance between any two of these points is strictly greater than 2.

Solution. The unit sphere in Rn is defined by


n
( )
X
n 2
Sn−1 = (x1 , . . . , xn ) ∈ R | xk = 1 .
k=1

The distance between the points X = (x1 , . . . , xn ) and Y = (y1 , . . . , yn ) is:


n
X
d2 (X, Y ) = (xk − yk )2 .
k=1

We have


d(X, Y ) > 2 ⇔ d2 (X, Y ) > 2
Xn Xn n
X
⇔ x2k + yk2 + 2 xk y k > 2
k=1 k=1 k=1
Xn
⇔ xk y k < 0
k=1

Taking account of the symmetry of the sphere, we can suppose that

A1 = (−1, 0, . . . , 0).
n
P
For X = A1 , xk yk < 0 implies y1 > 0, ∀ Y ∈ Mn .
k=1
Let X = (x1 , X), Y = (y1 , Y ) ∈ Mn \{A1 }, X, Y ∈ Rn−1 .

2
We have
n
X n−1
X n−1
X
xk y k < 0 ⇒ x 1 y 1 + xk y k < 0 ⇔ x0k yk0 < 0,
k=1 k=1 k=1
where
xk y
x0k = pP , yk0 = pPk .
x2k y2k
therefore

(x01 , . . . , x0n−1 ), (y10 , . . . , yn−1


0
) ∈ Sn−2
n
P
and verifies xk yk < 0.
k=1
If an is the search number of points in Rn we obtain an ≤ 1 + an−1 and
a1 = 2 implies that an ≤ n + 1.
We show that an = n + 1, giving an example of a set Mn with (n + 1)
elements satisfying the conditions of the problem.
A1 = (−1, 0, 0, 0, . . . , 0, 0) 
A2 = n1 , −c1 , 0, 0, . . . , 0, 0 
1
A3 = n1 , n−1 · c1 , −c2 , 0, . . . , 0, 0
 
A4 = n1 , n−1
1 1
· c1 , n−1 · c2 , −c3 , . . . , 0, 0
 
1
An−1 = n1 , n−1 1
· c1 , n−2 1
· c2 , n−3 · c3 , . . . , −cn−2 , 0
 
An = n1 , n−1
1 1
· c1 , n−2 1
· c1 , n−3 · c3 , . . . , 12 · cn−2 , −cn−1
 
An+1 = n1 , n−1
1 1
· c1 , n−2 1
· c2 , n−3 · c3 , . . . , 12 · cn−2 , cn−1
where s  
1 1
ck = 1+ 1− , k = 1, n − 1.
n n−k+1
n n
xk yk = − n1 < 0 and x2k = 1, ∀X, Y ∈ {A1 , . . . , An+1 } .
P P
We have
k=1 k−=1
These points are on the unit sphere in Rn and the distance between any two
points is equal to
√ √
r
1
d = 2 1 + > 2.
n
Remark. For n = 2 the points form an equilateral triangle in the unit
circle; for n = 3 the four points from a regular tetrahedron and in Rn the points
from an n dimensional regular simplex.

Problem 4.
Let A = (ak,` )k,`=1,...,n be an n × n complex matrix such that for each
m ∈ {1, . . . , n} and 1 ≤ j1 < . . . < jm ≤ n the determinant of the matrix
(ajk ,j` )k,`=1,...,m is zero. Prove that An = 0 and that there exists a permutation
σ ∈ Sn such that the matrix
(aσ(k),σ(`) )k,`=1,...,n

3
has all of its nonzero elements above the diagonal.

Solution. We will only prove (2), since it implies (1). Consider a directed
graph G with n vertices V1 , . . . , Vn and a directed edge from Vk to V` when
ak,` 6= 0. We shall prove that it is acyclic.
Assume that there exists a cycle and take one of minimum length m. Let
j1 < . . . < jm be the vertices the cycle goes through and let σ0 ∈ Sn be a
permutation such that ajk ,jσ0 (k) 6= 0 for k = 1, . . . , m. Observe that for any
other σ ∈ Sn we have ajk ,jσ(k) = 0 for some k ∈ {1, . . . , m}, otherwise we would
obtain a different cycle through the same set of vertices and, consequently, a
shorter cycle. Finally

0 = det(ajk ,j` )k,`=1,...,m

m m
= (−1)sign (−1)sign
Y X Y
σ0 σ
ajk ,jσ0 (k) + ajk ,jσ(k) 6= 0,
k=1 σ6=σ0 k=1

which is a contradiction.
Since G is acyclic there exists a topological ordering i.e. a permutation
σ ∈ Sn such that k < ` whenever there is an edge from Vσ(k) to Vσ(`) . It is easy
to see that this permutation solves the problem.

Problem 5. Let R be the set of real numbers. Prove that there is no


function f : R → R with f (0) > 0, and such that

f (x + y) ≥ f (x) + yf (f (x)) for all x, y ∈ R.

Solution. Suppose that there exists a function satisfying the inequality. If


f (f (x)) ≤ 0 for all x, then f is a decreasing function in view of the inequalities
f (x + y) ≥ f (x) + yf (f (x)) ≥ f (x) for any y ≤ 0. Since f (0) > 0 ≥ f (f (x)),
it implies f (x) > 0 for all x, which is a contradiction. Hence there is a z such
that f (f (z)) > 0. Then the inequality f (z + x) ≥ f (z) + xf (f (z)) shows that
lim f (x) = +∞ and therefore lim f (f (x)) = +∞. In particular, there exist
x→∞ x→∞
x, y > 0 such that f (x) ≥ 0, f (f (x)) > 1, y ≥ f (fx+1
(x))−1 and f (f (x + y + 1)) ≥ 0.
Then f (x + y) ≥ f (x) + yf (f (x)) ≥ x + y + 1 and hence

f (f (x + y)) ≥ f (x + y + 1) + f (x + y) − (x + y + 1) f (f (x + y + 1)) ≥
≥ f (x + y + 1) ≥ f (x + y) + f (f (x + y)) ≥
≥ f (x) + yf (f (x)) + f (f (x + y)) > f (f (x + y)).

This contradiction completes the solution of the problem.

4
Problem 6.
For each positive integer n, let fn (ϑ) = sin ϑ · sin(2ϑ) · sin(4ϑ) · · · sin(2n ϑ).
For all real ϑ and all n, prove that
2
|fn (ϑ)| ≤ √ |fn (π/3)|.
3

Solution.
√ We prove that g(ϑ) = | sin ϑ|| sin(2ϑ)|1/2 attains its maximum
value ( 3/2)3/2 at points 2k π/3 (where k is a positive integer). This can be
seen by using derivatives or a classical bound like

√ q 2
2 4 √
|g(ϑ)| = | sin ϑ|| sin(2ϑ)|1/2 = √
4
| sin ϑ| · | sin ϑ| · | sin ϑ| · | 3 cos ϑ|
3
√ √ !3/2
2 3 sin2 ϑ + 3 cos2 ϑ 3
≤ √ · = .
4
3 4 2
Hence

g(ϑ) · g(2ϑ)1/2 · g(4ϑ)3/4 · · · g(2n−1 ϑ)E sin(2n ϑ) 1−E/2



fn (ϑ)
= ·
fn (π/3) g(π/3) · g(2π/3)1/2 · g(4π/3)3/4 · · · g(2n−1 π/3)E sin(2n π/3)

sin(2n ϑ) 1−E/2
 1−E/2
1 2
≤ ≤ √ ≤√ .
sin(2n π/3) 3/2 3
where E = 32 (1 − (−1/2)n ). This is exactly the bound we had to prove.

5
Solutions for problems in the
9th International Mathematics Competition
for University Students
Warsaw, July 19 - July 25, 2002
First Day

Problem 1. A standard parabola is the graph of a quadratic polynomial


y = x2 + ax + b with leading coefficient 1. Three standard parabolas with
vertices V1 , V2 , V3 intersect pairwise at points A1 , A2 , A3 . Let A 7→ s (A) be
the reflection of the plane with respect to the x axis.
Prove that standard parabolas with vertices s (A1 ), s (A2 ), s (A3 ) intersect
pairwise at the points s (V1 ), s (V2 ), s (V3 ).
Solution. First we show that the standard parabola with vertex V contains
point A if and only if the standard parabola with vertex s(A) contains point
s(V ).
Let A = (a, b) and V = (v, w). The equation of the standard parabola
with vertex V = (v, w) is y = (x − v)2 + w, so it contains point A if and
only if b = (a − v)2 + w. Similarly, the equation of the parabola with vertex
s(A) = (a, −b) is y = (x − a)2 − b; it contains point s(V ) = (v, −w) if and
only if −w = (v − a)2 − b. The two conditions are equivalent.
Now assume that the standard parabolas with vertices V1 and V2 , V1 and
V3 , V2 and V3 intersect each other at points A3 , A2 , A1 , respectively. Then, by
the statement above, the standard parabolas with vertices s(A1 ) and s(A2 ),
s(A1 ) and s(A3 ), s(A2 ) and s(A3 ) intersect each other at points V3 , V2 , V1 ,
respectively, because they contain these points.
Problem 2. Does there exist a continuously differentiable function f : R → R
such that for every x ∈ R we have f (x) > 0 and f 0 (x) = f (f (x))?
Solution. Assume that there exists such a function. Since f 0 (x) = f (f (x)) > 0,
the function is strictly monotone increasing.
By the monotonity, f (x) > 0 implies f (f (x)) > f (0) for all x. Thus, f (0)
is a lower bound for f 0 (x), and for all x < 0 we have f (x) < f (0) + x · f (0) =
(1 + x)f (0). Hence, if x ≤ −1 then f (x) ≤ 0, contradicting the property
f (x) > 0.
So such function does not exist.

1
Problem 3. Let n be a positive integer and let
1
ak = n ,
 bk = 2k−n , f or k = 1, 2, . . . , n.
k

Show that
a1 − b 1 a2 − b 2 an − b n
+ +···+ = 0. (1)
1 2 n
n n−1
 
Solution. Since k k
=n k−1
for all k ≥ 1, (1) is equivalent to
" #
2n 1 1 1 21 22 2n
n−1 + n−1 + · · · +
  n−1
 = + +···+ . (2)
n 0 1 n−1
1 2 n

We prove (2) by induction. For n = 1, both sides are equal to 2.


Assume that (2) holds for some n. Let
" #
2n 1 1 1
xn = n−1 + n−1 + · · · + n−1
   ;
n 0 1 n−1

then
n n−1
! !
2n+1 X 1 2n X 1 1
xn+1 = n
 = 1+ n +
 n
 +1 =
n+1 k
n+1 k k+1
k=0 k=0

n−1 n−k k+1 n−1


2n X n
+ 2n+1 2n X 1 2n+1 2n+1
= n−1
n + = n−1 +
 = xn + .
n + 1 k=0 k
n+1 n k=0 k
n+1 n+1
This implies (2) for n + 1.
Problem 4. Let f : [a, b] → [a, b] be a continuous function and let p ∈ [a, b].
Define p0 = p and pn+1 = f (pn ) for n = 0, 1, 2, . . . Suppose that the set
Tp = {pn : n = 0, 1, 2, . . . } is closed, i.e., if x ∈
/ Tp then there is a δ > 0 such
that for all x0 ∈ Tp we have |x0 − x| ≥ δ. Show that Tp has finitely many
elements.
Solution. If for some n > m the equality pm = pn holds then Tp is a finite
set. Thus we can assume that all points p0 , p1 , . . . are distinct. There is
a convergent subsequence pnk and its limit q is in Tp . Since f is continu-
ous pnk +1 = f (pnk ) → f (q), so all, except for finitely many, points pn are
accumulation points of Tp . Hence we may assume that all of them are ac-
cumulation points of Tp . Let d = sup{|pm − pn | : m, n ≥ 0}. Let δn be

2
positive numbers such that ∞ d
P
n=0 δn < 2 . Let In be an interval of length less
than δn centered at pn such that there are there are infinitely many k’s such
n
[
that pk ∈/ Ij , this can be done by induction. Let n0 = 0 and nm+1 be the
j=0
nm
[
smallest integer k > nm such that pk ∈
/ Ij . Since Tp is closed the limit
j=0
of the subsequence (pnm ) must be in Tp but it is impossible because of the
definition of In ’s, of course if the sequence (pnm ) is not convergent we may
replace it with its convergent subsequence. The proof is finished.
Remark. If Tp = {p1 , p2 , . . . } and each pn is an accumulation point of Tp ,
then Tp is the countable union of nowhere dense sets (i.e. the single-element
sets {pn }). If T is closed then this contradicts the Baire Category Theorem.
Problem 5. Prove or disprove the following statements:
(a) There exists a monotone function f : [0, 1] → [0, 1] such that for each
y ∈ [0, 1] the equation f (x) = y has uncountably many solutions x.
(b) There exists a continuously differentiable function f : [0, 1] → [0, 1] such
that for each y ∈ [0, 1] the equation f (x) = y has uncountably many solutions
x.
Solution. a. It does not exist. For each y the set {x : y = f (x)} is either
empty or consists of 1 point or is an interval. These sets are pairwise disjoint,
so there are at most countably many of the third type.
b. Let f be such a map. Then for each value y of this map there is an x0 such
that y = f (x) and f 0 (x) = 0, because an uncountable set {x : y = f (x)}
contains an accumulation point x0 and clearly f 0 (x0 ) = 0. For every ε > 0
and every x0 such that f 0 (x0 ) = 0 there exists an open interval Ix0 such
that if x ∈ Ix0 then |f 0 (x)| < ε. The union of all these intervals Ix0 may
be written as a union of pairwise disjoint open intervals Jn . The image of
each Jn is an interval (or a point) of length < ε · length(Jn ) due to Lagrange
Mean Value Theorem. Thus the image of the interval [0, 1] may be covered
with the intervals such that the sum of their lengths is ε · 1 = ε. This is not
possible for ε < 1.
Remarks. 1. The proof of part b is essentially the proof of the easy part
of A. Sard’s theorem about measure of the set of critical values of a smooth
map.
2. If only continuity is required, there exists such a function, e.g. the first
co-ordinate of the very well known Peano curve which is a continuous map
from an interval onto a square.

3
kM xk2
Problem 6. For an n×n matrix M with real entries let kM k = sup ,
x∈Rn \{0} kxk2
where k · k2 denotes the Euclidean norm on Rn . Assume that an n × n matrix
1
A with real entries satisfies kAk − Ak−1 k ≤ 2002k for all positive integers k.
k
Prove that kA k ≤ 2002 for all positive integers k.
Solution.
Lemma 1. Let (an )n≥0 be a sequence of non-negative numbers such that
a2k −a2k+1 ≤ a2k , a2k+1 −a2k+2 ≤ ak ak+1 for any k ≥ 0 and lim sup nan < 1/4.

Then lim sup n an < 1.
Proof. Let cl = supn≥2l (n + 1)an for l ≥ 0. We will show that cl+1 ≤ 4c2l .
Indeed, for any integer n ≥ 2l+1 there exists an integer k ≥ 2l such that
c2l
n = 2k or n = 2k + 1. In the first case there is a2k − a2k+1 ≤ a2k ≤ (k+1) 2 ≤

4c2l 4c2l
2k+1
− 2k+2
, whereas in the second case there is a2k+1 − a2k+2 ≤ ak ak+1 ≤
c2l 4c2l 4c2l
(k+1)(k+2)
≤ 2k+2
− 2k+3
.
4c2l
Hence a sequence (an − ) l+1
n+1 n≥2
is non-decreasing and its terms are
4c2
non-positive since it converges to zero. Therefore an ≤ n+1 l
for n ≥ 2l+1 ,
meaning that c2l+1 ≤ 4c2l . This implies that a sequence ((4cl )2 )l≥0 is non-
−l

increasing and therefore bounded from above by some number q ∈ (0, 1) since
l
all its terms except finitely many are less than 1. Hence cl ≤ q 2 for l large
cl l √
enough. For any n between 2l and 2l+1 there is an ≤ n+1 ≤ q 2 ≤ ( q)n
√ √ √ √
yielding lim sup n an ≤ q < 1, yielding lim sup n an ≤ q < 1, which ends
the proof.
Lemma 2. Let T be a linear map from Rn into itself. Assume that
lim sup nkT n+1 − T n k < 1/4. Then lim sup kT n+1 − T n k1/n < 1. In particular
T n converges in the operator norm and T is power bounded.
Proof. Put an = kT n+1 − T n k. Observe that
T k+m+1 − T k+m = (T k+m+2 − T k+m+1 ) − (T k+1 − T k )(T m+1 − T m )
implying that ak+m ≤ ak+m+1 + ak am . Therefore the sequence (am )m≥0 sat-
isfies assumptions of Lemma 1 and the assertion of Proposition 1 follows.
Remarks. 1. The theorem proved above holds in the case of an operator
T which maps a normed space X into itself, X does not have to be finite
dimensional.
2. The constant 1/4 in Lemma 1 cannot be replaced by any greater number
1
since a sequence an = 4n satisfies the inequality ak+m − ak+m+1 ≤ ak am for
any positive integers k and m whereas it does not have exponential decay.
3. The constant 1/4 in Lemma 2 cannot be replaced by any number greater
that 1/e. Consider an operator (T f )(x) = xf (x) on L2 ([0, 1]). One can easily

4
check that lim sup kT n+1 − T n k = 1/e, whereas T n does not converge in the
operator norm. The question whether in general lim sup nkT n+1 − T n k < ∞
implies that T is power bounded remains open.
Remark The problem was incorrectly stated during the competition: in-
1
stead of the inequality kAk− Ak−1  k ≤ 2002k , the
 inequality
 kAk − Ak−1 k ≤
1 1 ε 1 kε
2002n
was assumed. If A = then Ak = . Therefore
  0 1 0 1
0 ε
Ak − Ak−1 = , so for sufficiently small ε the condition is satisfied
0 0
although the sequence kAk k is clearly unbounded.


5
Solutions for problems in the
9th International Mathematics Competition
for University Students
Warsaw, July 19 - July 25, 2002

Second Day

Problem 1. Compute the determinant of the n × n matrix A = [a ij ],


(
(−1)|i−j| , if i 6= j,
aij =
2, if i = j.

Solution. Adding the second row to the first one, then adding the third row
to the second one, ..., adding the nth row to the (n − 1)th, the determinant
does not change and we have


2 −1 +1 . . . ±1 ∓1 1 1 0 0 ... 0 0

−1 2 −1 . . . ∓1 ±1 0
1 1 0 ... 0 0

+1 −1 2 . . . ±1 ∓1 0 0 1 1 ... 0 0
det(A) = . .. .. .. .. = .. .. .. .. .... .

.. .. ..
. . . . . . . . . . . .
∓1 ±1 ∓1 . . . 2 −1 0 0 0 0 ... 1 1

±1 ∓1 ±1 . . . −1 2 ±1 ∓1 ±1 ∓1 ... −1 2
Now subtract the first column from the second, then subtract the result-
ing second column from the third, ..., and at last, subtract the (n − 1)th
column from the nth column. This way we have

1 0 0 . . . 0 0

0 1 0 . . . 0 0
.. .. .. . . . .. = n + 1.

det(A) = . . .
. .. .
0 0 0 . . . 1 0

0 0 0 . . . 0 n + 1

Problem 2. Two hundred students participated in a mathematical con-


test. They had 6 problems to solve. It is known that each problem was
correctly solved by at least 120 participants. Prove that there must be two
participants such that every problem was solved by at least one of these two
students.
Solution. For each pair of students, consider
 the set of those problems which
was not solved by them. There exist 200 2 = 19900 sets; we have to prove
that at least one set is empty.

1
For each problem, there are at most 80 students who did not solve it.
From these students at most 80 2 = 3160 pairs can be selected, so the
problem can belong to at most 3160 sets. The 6 problems together can
belong to at most 6 · 3160 = 18960 sets.
Hence, at least 19900 − 18960 = 940 sets must be empty.
Problem 3. For each n ≥ 1 let
∞ ∞
X kn X kn
an = , bn = (−1)k .
k! k!
k=0 k=0
Show that an · bn is an integer.
Solution. We prove by induction on n that a n /e and bn e are integers, we
prove this for n = 0 as well. (For n = 0, the term 0 0 in the definition of the
sequences must be replaced by 1.)
From the power series of ex , an = e1 = e and bn = e−1 = 1/e.
Suppose that for some n ≥ 0, a0 , a1 , . . . , an and b0 , b1 , ...bn are all multi-
pliers of e and 1/e, respectively. Then, by the binomial theorem,

n ∞ ∞ X
n   m
X (k + 1)n+1 X (k + 1)n X n k
an+1 = = = =
(k + 1)! k! m k!
k=0 k=0 k=0 m=0


n  X n  
X n km X n
= = am
m=0
m k! m=0
m
k=0
and similarly
n ∞
X (k + 1)n+1 X (k + 1)n
bn+1 = (−1)k+1 =− (−1)k =
(k + 1)! k!
k=0 k=0

∞ n   m ∞
n  X n  
X X n k X n km X n
=− (−1)k =− (−1)k =− bm .
m=0
m k! m=0
m k! m=0
m
k=0 k=0

The numbers an+1 and bn+1 are expressed as linear combinations of the
previous elements with integer coefficients which finishes the proof.
Problem 4. In the tetrahedron OABC, let ∠BOC = α, ∠COA = β and
∠AOB = γ. Let σ be the angle between the faces OAB and OAC, and let
τ be the angle between the faces OBA and OBC. Prove that

γ > β · cos σ + α · cos τ.

Solution. We can assume OA = OB = OC = 1. Intersect the unit sphere


with center O with the angle domains AOB, BOC and COA; the intersec-
tions are “slices” and their areas are 12 γ, 21 α and 12 β, respectively.

2
Now project the slices AOC and COB to the plane OAB. Denote by
C 0 the projection of vertex C, and denote by A 0 and B 0 the reflections of
vertices A and B with center O, respectively. By the projection, OC 0 < 1.
The projections of arcs AC and BC are segments of ellipses with long
axes AA0 and BB 0 , respectively. (The ellipses can be degenerate if σ or τ
is right angle.) The two ellipses intersect each other in 4 points; both half
ellipses connecting A and A0 intersect both half ellipses connecting B and
B 0 . There exist no more intersection, because two different conics cannot
have more than 4 common points.
The signed areas of the projections of slices AOC and COB are 12 α·cos τ
and 21 β · cos σ, respectively. The statement says thet the sum of these signed
areas is less than the area of slice BOA.

There are three significantly different cases with respect to the signs
of cos σ and cos τ (see Figure). If both signs are positive (case (a)), then
the projections of slices OAC and OBC are subsets of slice OBC without
common interior point, and they do not cover the whole slice OBC; this
implies the statement. In cases (b) and (c) where at least one of the signs
is negative, projections with positive sign are subsets of the slice OBC, so
the statement is obvious again.
Problem 5. Let A be an n × n matrix with complex entries and suppose
that n > 1. Prove that
−1
AA = In ⇐⇒ ∃ S ∈ GLn (C) such that A = SS .

(If A = [aij ] then A = [aij ], where aij is the complex conjugate of aij ;
GLn (C) denotes the set of all n×n invertible matrices with complex entries,
and In is the identity matrix.)
−1
Solution. The direction ⇐ is trivial, since if A = SS , then
−1
AA = SS · SS −1 = In .
For the direction ⇒, we must prove that there exists an invertible matrix
S such that AS = S.
Let w be an arbitrary complex number which is not 0. Choosing
S = wA + wIn , we have AS = A(wA + wIn ) = wIn + wA = S. If S is
singular, then w1 S = A − (w/w)In is singular as well, so w/w is an eigen-
value of A. Since A has finitely many eigenvalues and w/w can be any
complex number on the unit circle, there exist such w that S is invertible.

3
Problem 6. Let f : Rn → R be a convex function whose gradient ∇f =

∂f ∂f n
∂x1 , . . . , ∂xn exists at every point of R and satisfies the condition

∃L > 0 ∀x1 , x2 ∈ Rn k∇f (x1 ) − ∇f (x2 )k ≤ Lkx1 − x2 k.


Prove that

∀x1 , x2 ∈ Rn k∇f (x1 ) − ∇f (x2 )k2 ≤ Lh∇f (x1 ) − ∇f (x2 ), x1 − x2 i. (1)

In this formula ha, bi denotes the scalar product of the vectors a and b.
Solution. Let g(x) = f (x)−f (x1 )−h∇f (x1 ), x−x1 i. It is obvious that g has
the same properties. Moreover, g(x 1 ) = ∇g(x1 ) = 0 and, due to convexity,
g has 0 as the absolute minimum at x1 . Next we prove that
1
g(x2 ) ≥ k∇g(x2 )k2 . (2)
2L
Let y0 = x2 − L1 k∇g(x2 )k and y(t) = y0 + t(x2 − y0 ). Then
Z 1
g(x2 ) = g(y0 ) + h∇g(y(t)), x2 − y0 i dt =
0
Z 1
= g(y0 ) + h∇g(x2 ), x2 − y0 i − h∇g(x2 ) − ∇g(y(t)), x2 − y0 i dt ≥
0
1
1
Z
≥0+ k∇g(x2 )k2 − k∇g(x2 ) − ∇g(y(t))k · kx2 − y0 k dt ≥
L 0
1
1
Z
≥ k∇g(x2 )k2 − kx2 − y0 k Lkx2 − g(y)k dt =
L 0
1
1 1
Z
= k∇g(x2 )k2 − Lkx2 − y0 k2 t dt = k∇g(x2 )k2 .
L 0 2L
Substituting the definition of g into (2), we obtain
1
f (x2 ) − f (x1 ) − h∇f (x1 ), x2 − x1 i ≥ k∇f (x2 ) − ∇f (x1 )k2 ,
2L

k∇f (x2 ) − ∇f (x1 )k2 ≤ 2Lh∇f (x1 ), x1 − x2 i + 2L(f (x2 ) − f (x1 )). (3)

Exchanging variables x1 and x2 , we have

k∇f (x2 ) − ∇f (x1 )k2 ≤ 2Lh∇f (x2 ), x2 − x1 i + 2L(f (x1 ) − f (x2 )). (4)

The statement (1) is the average of (3) and (4).

4
10th International Mathematical Competition for University Students
Cluj-Napoca, July 2003

Day 1

1. (a) Let a1 , a2 , . . . be a sequence of real numbers such that a1 = 1 and an+1 > 32 an for all n.
Prove that the sequence
an
3 n−1

2

has a finite limit or tends to infinity. (10 points)


(b) Prove that for all α > 1 there exists a sequence a1 , a2 , . . . with the same properties such
that
an
lim n−1 = α.
3
2

(10 points)
an
Solution. (a) Let bn = . Then an+1 > 32 an is equivalent to bn+1 > bn , thus the sequence
3 n−1

2

(bn ) is strictly increasing. Each increasing sequence has a finite limit or tends to infinity.
(b) For all α > 1 there exists a sequence 1 = b1 < b2 < . . . which converges to α. Choosing
n−1
an = 32 bn , we obtain the required sequence (an ).

2. Let a1 , a2 . . . , a51 be non-zero elements of a field. We simultaneously replace each element with
the sum of the 50 remaining ones. In this way we get a sequence b1 . . . , b51 . If this new sequence is
a permutation of the original one, what can be the characteristic of the field? (The characteristic
of a field is p, if p is the smallest positive integer such that x + x + . . . + x = 0 for any element x
| {z }
p
of the field. If there exists no such p, the characteristic is 0.) (20 points)
Solution. Let S = a1 + a2 + · · · + a51 . Then b1 + b2 + · · · + b51 = 50S. Since b1 , b2 , · · · , b51 is a

permutation of a1 , a2 , · · · , a51 , we get 50S = S, so 49S = 0. Assume that the characteristic of the
field is not equal to 7. Then 49S = 0 implies that S = 0. Therefore bi = −ai for i = 1, 2, · · · , 51.
On the other hand, bi = aϕ(i) , where ϕ ∈ S51 . Therefore, if the characteristic is not 2, the sequence
a1 , a2 , · · · , a51 can be partitioned into pairs {ai , aϕ(i) } of additive inverses. But this is impossible,
since 51 is an odd number. It follows that the characteristic of the field is 7 or 2.
The characteristic can be either 2 or 7. For the case of 7, x1 = . . . = x51 = 1 is a possible
choice. For the case of 2, any elements can be chosen such that S = 0, since then bi = −ai = ai .

3. Let A be an n × n real matrix such that 3A3 = A2 + A + I (I is the identity matrix). Show
that the sequence Ak converges to an idempotent matrix. (A matrix B is called idempotent if
B 2 = B.) (20 points)

Solution. The minimal polynomial of A is a divisor of 3x3 − x2 − x − 1. This polynomial has three
different roots. This implies that A is diagonalizable: A = C −1 DC where D is a diagonal matrix.
The eigenvalues of the matrices A and D are all roots of polynomial 3x3 − x2 − x − 1. One of the
three roots is 1, the remaining two roots have smaller absolute value than 1. Hence, the diagonal
elements of Dk , which are the kth powers of the eigenvalues, tend to either 0 or 1 and the limit
M = lim Dk is idempotent. Then lim Ak = C −1 M C is idempotent as well.

4. Determine the set of all pairs (a, b) of positive integers for which the set of positive integers
can be decomposed into two sets A and B such that a · A = b · B. (20 points)
Solution. Clearly a and b must be different since A and B are disjoint.

1
Let {a, b} be a solution and consider the sets A, B such that a · A = b · B. Denoting d = (a, b)
the greatest common divisor of a and b, we have a = d·a1 , b = d·b1 , (a1 , b1 ) = 1 and a1 ·A = b1 ·B.
Thus {a1 , b1 } is a solution and it is enough to determine the solutions {a, b} with (a, b) = 1.
If 1 ∈ A then a ∈ a · A = b · B, thus b must be a divisor of a. Similarly, if 1 ∈ B, then a is a
divisor of b. Therefore, in all solutions, one of numbers a, b is a divisor of the other one.
Now we prove that if n ≥ 2, then (1, n) is a solution. For each positive integer k, let f (k)
be the largest non-negative integer for which nf (k) |k. Then let A = {k : f (k) is odd} and
B = {k : f (k) is even}. This is a decomposition of all positive integers such that A = n · B.

5. Let g : [0, 1] → R be a continuous function and let fn : [0, 1] → R be a sequence of functions


defined by f0 (x) = g(x) and

1 x
Z
fn+1 (x) = fn (t)dt (x ∈ (0, 1], n = 0, 1, 2, . . .).
x 0

Determine lim fn (x) for every x ∈ (0, 1]. (20 points)


n→∞
B. We shall prove in two different ways that limn→∞ fn (x) = g(0) for every x ∈ (0, 1]. (The
second one is more lengthy but it tells us how to calculate fn directly from g.)
Proof I. First we prove our claim for non-decreasing g. In this case, by induction, one can
easily see that
1. each fn is non-decrasing as well, and
2. g(x) = f0 (x) ≥ f1 (x) ≥ f2 (x) ≥ . . . ≥ g(0) (x ∈ (0, 1]).
Then (2) implies that there exists

h(x) = lim fn (x) (x ∈ (0, 1]).


n→∞

Clearly h is non-decreasing and g(0) ≤ h(x) ≤ fn (x) for any x ∈ (0, 1], n = 0, 1, 2, . . .. Therefore
to show that h(x) = g(0) for any x ∈ (0, 1], it is enough to prove that h(1) cannot be greater than
g(0).
Suppose that h(1) > g(0). Then there exists a 0 < δ < 1 such that h(1) > g(δ). Using the
definition, (2) and (1) we get
Z 1 Z δ Z 1
fn+1 (1) = fn (t)dt ≤ g(t)dt + fn (t)dt ≤ δg(δ) + (1 − δ)fn (1).
0 0 δ

Hence
fn (1) − fn+1 (1) ≥ δ(fn (1) − g(δ)) ≥ δ(h(1) − g(δ)) > 0,
so fn (1) → −∞, which is a contradiction.
Similarly, we can prove our claim for non-increasing continuous functions as well.
Now suppose that g is an arbitrary continuous function on [0, 1]. Let

M (x) = sup g(t), m(x) = inf g(t) (x ∈ [0, 1])


t∈[0,x] t∈[0,x]

Then on [0, 1] m is non-increasing, M is non-decreasing, both are continuous, m(x) ≤ g(x) ≤ M (x)
and M (0) = m(0) = g(0). Define the sequences of functions Mn (x) and mn (x) in the same way
as fn is defined but starting with M0 = M and m0 = m.
Then one can easily see by induction that mn (x) ≤ fn (x) ≤ Mn (x). By the first part of the
proof, limn mn (x) = m(0) = g(0) = M (0) = limn Mn (x) for any x ∈ (0, 1]. Therefore we must
have limn fn (x) = g(0).

2
Proof II. To make the notation clearer we shall denote the variable of fj by xj . By definition
(and Fubini theorem) we get that
Z xn+1 Z xn Z xn−1 Z x2 Z x1
1 1 1 1
fn+1 (xn+1 ) = ... g(x0 )dx0 dx1 . . . dxn
xn+1 0 x xn−1 0 0 x1 0
ZZ n 0
1 dx0 dx1 . . . dxn
= g(x0 )
xn+1 0≤x0 ≤x1 ≤...≤xn ≤xn+1 x1 . . . xn
Z xn+1 ZZ !
1 dx1 . . . dxn
= g(x0 ) dx0 .
xn+1 0 x0 ≤x1 ≤...≤xn ≤xn+1 x1 . . . xn

Therefore with the notation


ZZ
dx1 . . . dxn
hn (a, b) =
a≤x1 ≤...≤xn ≤b x1 . . . xn

and x = xn+1 , t = x0 we have


Z x
1
fn+1 (x) = g(t)hn (t, x)dt.
x 0

Using that hn (a, b) is the same for any permutation of x1 , . . . , xn and the fact that the integral
is 0 on any hyperplanes (xi = xj ) we get that
ZZ Z b Z b
dx1 . . . dxn dx1 . . . dxn
n! hn (a, b) = = ...
a≤x1 ,...,xn ≤b x1 . . . xn a a x1 . . . xn
!n
Z b
dx
= = (log(b/a))n .
a x

Therefore x
(log(x/t))n
Z
1
fn+1 (x) = g(t) dt.
x 0 n!
Note that if g is constant then the definition gives fn = g. This implies on one hand that we
must have
1 x (log(x/t))n
Z
dt = 1
x 0 n!
and on the other hand that, by replacing g by g − g(0), we can suppose that g(0) = 0.
Let x ∈ (0, 1] and ε > 0 be fixed. By continuity there exists a 0 < δ < x and an M such that
|g(t)| < ε on [0, δ] and |g(t)| ≤ M on [0, 1] . Since

(log(x/δ))n
lim =0
n→∞ n!
there exists an n0 sucht that log(x/δ))n /n! < ε whenever n ≥ n0 . Then, for any n ≥ n0 , we have

1 x (log(x/t))n
Z
|fn+1 (x)| ≤ |g(t)| dt
x 0 n!
1 δ (log(x/t))n 1 x (log(x/δ))n
Z Z
≤ ε dt + |g(t)| dt
x 0 n! x δ n!
1 x (log(x/t))n 1 x
Z Z
≤ ε dt + M εdt
x 0 n! x δ
≤ ε + M ε.

Therefore limn f (x) = 0 = g(0).

3
6. Let f (z) = an z n + an−1 z n−1 + . . . + a1 z + a0 be a polynomial with real coefficients. Prove that
if all roots of f lie in the left half-plane {z ∈ C : Re z < 0} then

ak ak+3 < ak+1 ak+2

holds for every k = 0, 1, . . . , n − 3. (20 points) Q


Solution. The polynomial f is a product of linear and quadratic factors, f (z) = i (ki z + li ) ·

2
Q
j (pj z + qj z + rj ), with ki , li , pj , qj , rj ∈ R. Since all roots are in the left
half-plane, for each i, ki
and li are of the same sign, and for each j, pj , qj , rj are of the same sign,
too. Hence, multiplying
f by −1 if necessary, the roots of f don’t change and f becomes the polynomial with all positive
coefficients.
For the simplicity, we extend the sequence of coefficients by an+1 = an+2 = . . . = 0 and
a−1 = a−2 = . . . = 0 and prove the same statement for −1 ≤ k ≤ n − 2 by induction.
For n ≤ 2 the statement is obvious: ak+1 and ak+2 are positive and at least one of ak−1 and
ak+3 is 0; hence, ak+1 ak+2 > ak ak+3 = 0.
Now assume that n ≥ 3 and the statement is true for all smaller values of n. Take a divisor of
f (z) which has the form z 2 + pz + q where p and q are positive real numbers. (Such a divisor can
be obtained from a conjugate pair of roots or two real roots.) Then we can write

f (z) = (z 2 + pz + q)(bn−2 z n−2 + . . . + b1 z + b0 ) = (z 2 + pz + q)g(x). (1)

The roots polynomial g(z) are in the left half-plane, so we have bk+1 bk+2 < bk bk+3 for all −1 ≤
k ≤ n − 4. Defining bn−1 = bn = . . . = 0 and b−1 = b−2 = . . . = 0 as well, we also have
bk+1 bk+2 ≤ bk bk+3 for all integer k.
Now we prove ak+1 ak+2 > ak ak+3 . If k = −1 or k = n − 2 then this is obvious since ak+1 ak+2
is positive and ak ak+3 = 0. Thus, assume 0 ≤ k ≤ n − 3. By an easy computation,

ak+1 ak+2 − ak ak+3 =

= (qbk+1 + pbk + bk−1 )(qbk+2 + pbk+1 + bk ) − (qbk + pbk−1 + bk−2 )(qbk+3 + pbk+2 + bk+1 ) =
= (bk−1 bk − bk−2 bk+1 ) + p(b2k − bk−2 bk+2 ) + q(bk−1 bk+2 − bk−2 bk+3 )+
+p2 (bk bk+1 − bk−1 bk+2 ) + q 2 (bk+1 bk+2 − bk bk+3 ) + pq(b2k+1 − bk−1 bk+3 ).
We prove that all the six terms are non-negative and at least one is positive. Term p2 (bk bk+1 −
bk−1 bk+2 ) is positive since 0 ≤ k ≤ n − 3. Also terms bk−1 bk − bk−2 bk+1 and q 2 (bk+1 bk+2 − bk bk+3 )
are non-negative by the induction hypothesis.
To check the sign of p(b2k − bk−2 bk+2 ) consider

bk−1 (b2k − bk−2 bk+2 ) = bk−2 (bk bk+1 − bk−1 bk+2 ) + bk (bk−1 bk − bk−2 bk+1 ) ≥ 0.

If bk−1 > 0 we can divide by it to obtain b2k −bk−2 bk+2 ≥ 0. Otherwise, if bk−1 = 0, either bk−2 = 0
or bk+2 = 0 and thus b2k − bk−2 bk+2 = b2k ≥ 0. Therefore, p(b2k − bk−2 bk+2 ) ≥ 0 for all k. Similarly,
pq(b2k+1 − bk−1 bk+3 ) ≥ 0.
The sign of q(bk−1 bk+2 − bk−2 bk+3 ) can be checked in a similar way. Consider

bk+1 (bk−1 bk+2 − bk−2 bk+3 ) = bk−1 (bk+1 bk+2 − bk bk+3 ) + bk+3 (bk−1 bk − bk−2 bk+1 ) ≥ 0.

If bk+1 > 0, we can divide by it. Otherwise either bk−2 = 0 or bk+3 = 0. In all cases, we obtain
bk−1 bk+2 − bk−2 bk+3 ≥ 0.
Now the signs of all terms are checked and the proof is complete.

4
10th International Mathematical Competition for University Students
Cluj-Napoca, July 2003

Day 2

1. Let A and B be n × n real matrices such that AB + A + B = 0. Prove that AB = BA.

Solution. Since (A + I)(B + I) = AB + A + B + I = I (I is the identity matrix), matrices


A + I and B + I are inverses of each other. Then (A + I)(B + I) = (B + I)(A + I) and
AB + BA.

2. Evaluate the limit


2x
sinm t
Z
lim dt (m, n ∈ N).
x→0+ x tn

sin t sin t
Solution. We use the fact that is decreasing in the interval (0, π) and lim = 1.
t t→0+0 t
sin 2x sin t
For all x ∈ (0, π2 ) and t ∈ [x, 2x] we have x< < 1, thus
2 t
m Z 2x m Z 2x Z 2x m
sinm t

sin 2x t t
n
< n
dt < dt,
2x x t x t x tn
Z 2x m Z 2
t m−n+1
n
dt = x um−n du.
x t 1
 m
sin 2x
The factor tends to 1. If m − n + 1 < 0, the limit of xm−n+1 is infinity; if
2x
R2
m − n + 1 > 0 then 0. If m − n + 1 = 0 then xm−n+1 1 um−n du = ln 2. Hence,

Z2x m 0,
 m≥n
sin t
lim dt = ln 2, n − m = 1 .
x→0+0 tn 
+∞, n − m > 1.

x

3. Let A be a closed subset of Rn and let B be the set of all those points b ∈ Rn for which
there exists exactly one point a0 ∈ A such that

|a0 − b| = inf |a − b|.


a∈A

Prove that B is dense in Rn ; that is, the closure of B is Rn .

Solution. Let b0 ∈
/ A (otherwise b0 ∈ A ⊂ B), % = inf |a − b0 |. The intersection of the ball
a∈A
of radius % + 1 with centre b0 with set A is compact and there exists a0 ∈ A: |a0 − b0 | = %.

1
Denote by Br (a) = {x ∈ Rn : |x − a| ≤ r} and ∂Br (a) = {x ∈ Rn : |x − a| = r} the
ball and the sphere of center a and radius r, respectively.
If a0 is not the unique nearest point then for
T any point a on the open line segment (a0 , b0 )
we have B|a−a0 | (a) ⊂ B% (b0 ) and ∂B|a−a0 | (a) ∂B% (b0 ) = {a0 }, therefore (a0 , b0 ) ⊂ B and
b0 is an accumulation point of set B.

4. Find all positive integers n for which there exists a family F of three-element subsets
of S = {1, 2, . . . , n} satisfying the following two conditions:

(i) for any two different elements a, b ∈ S, there exists exactly one A ∈ F containing
both a, b;

(ii) if a, b, c, x, y, z are elements of S such that if {a, b, x}, {a, c, y}, {b, c, z} ∈ F, then
{x, y, z} ∈ F.

Solution. The condition (i) of the problem allows us to define a (well-defined) operation
∗ on the set S given by

a ∗ b = c if and only if {a, b, c} ∈ F, where a 6= b.

We note that this operation is still not defined completely (we need to define a ∗ a), but
nevertheless let us investigate its features. At first, due to (i), for a 6= b the operation
obviously satisfies the following three conditions:
(a) a 6= a ∗ b 6= b;
(b) a ∗ b = b ∗ a;
(c) a ∗ (a ∗ b) = b.
What does the condition (ii) give? It claims that
(e’) x ∗ (a ∗ c) = x ∗ y = z = b ∗ c = (x ∗ a) ∗ c
for any three different x, a, c, i.e. that the operation is associative if the arguments are
different. Now we can complete the definition of ∗. In order to save associativity for non-
different arguments, i.e. to make b = a ∗ (a ∗ b) = (a ∗ a) ∗ b hold, we will add to S an extra
element, call it 0, and define
(d) a ∗ a = 0 and a ∗ 0 = 0 ∗ a = a.
Now it is easy to check that, for any a, b, c ∈ S ∪ {0}, (a),(b),(c) and (d), still hold, and
(e) a ∗ b ∗ c := (a ∗ b) ∗ c = a ∗ (b ∗ c).
We have thus obtained that (S ∪ {0}, ∗) has the structure of a finite Abelian group,
whose elements are all of order two. Since the order of every such group is a power of 2,
we conclude that |S ∪ {0}| = n + 1 = 2m and n = 2m − 1 for some integer m ≥ 1.
Given n = 2m −1, according to what we have proven till now, we will construct a family
of three-element subsets of S satisfying (i) and (ii). Let us define the operation ∗ in the
following manner:
if a = a0 + 2a1 + . . . + 2m−1 am−1 and b = b0 + 2b1 + . . . + 2m−1 bm−1 , where ai , bi
are either 0 or 1, we put a ∗ b = |a0 − b0 | + 2|a1 − b1 | + . . . + 2m−1 |am−1 − bm−1 |.

2
It is simple to check that this ∗ satisfies (a),(b),(c) and (e’). Therefore, if we include in
F all possible triples a, b, a ∗ b, the condition (i) follows from (a),(b) and (c), whereas the
condition (ii) follows from (e’)
The answer is: n = 2m − 1.

5. (a) Show that for each function f : Q × Q → R there exists a function g : Q → R such
that f (x, y) ≤ g(x) + g(y) for all x, y ∈ Q.
(b) Find a function f : R × R → R for which there is no function g : R → R such that
f (x, y) ≤ g(x) + g(y) for all x, y ∈ R.

Solution. a) Let ϕ : Q → N be a bijection. Define g(x) = max{|f (s, t)| : s, t ∈ Q, ϕ(s) ≤


ϕ(x), ϕ(t) ≤ ϕ(x)}. We have f (x, y) ≤ max{g(x), g(y)} ≤ g(x) + g(y).
1
b) We shall show that the function defined by f (x, y) = |x−y| for x 6= y and f (x, x) = 0
satisfies the problem. If, by contradiction there exists a function g as above, it results, that
1
g(y) ≥ |x−y| − f (x) for x, y ∈ R, x 6= y; one obtains that for each x ∈ R, lim g(y) = ∞.
y→x
We show, that there exists no function g having an infinite limit at each point of a bounded
and closed interval [a, b].
For each k ∈ N+ denote Ak = {x ∈ [a, b] : |g(x)| ≤ k}.
We have obviously [a, b] = ∪∞ k=1 Ak . The set [a, b] is uncountable, so at least one of the
sets Ak is infinite (in fact uncountable). This set Ak being infinite, there exists a sequence
in Ak having distinct terms. This sequence will contain a convergent subsequence (xn )n∈N
convergent to a point x ∈ [a, b]. But lim g(y) = ∞ implies that g(xn ) → ∞, a contradiction
y→x
because |g(xn )| ≤ k, ∀n ∈ N.

Second solution for part (b). Let S be the set of all sequences of real numbers. The
2
cardinality of S is |S| = |R|ℵ0 = 2ℵ0 = 2ℵ0 = |R|. Thus, there exists a bijection h : R → S.
Now define the function f in the following way. For any real x and positive integer n,
let f (x, n) be the nth element of sequence h(x). If y is not a positive integer then let
f (x, y) = 0. We prove that this function has the required property.
Let g be an arbitrary R → R function. We show that there exist real numbers x, y
such that f (x, y) > g(x) + g(y). Consider the sequence (n + g(n))∞ n=1 . This sequence is an

element of S, thus (n + g(n))n=1 = h(x) for a certain real x. Then for an arbitrary positive
integer n, f (x, n) is the nth element, f (x, n) = n + g(n). Choosing n such that n > g(x),
we obtain f (x, n) = n + g(n) > g(x) + g(n).

6. Let (an )n∈N be the sequence defined by


n
1 X ak
a0 = 1, an+1 = .
n + 1 k=0 n − k + 2

Find the limit n


X ak
lim ,
n→∞
k=0
2k

3
if it exists.

Solution. Consider the generating function f (x) = ∞ n


P
n=0 an x . By induction 0 < an ≤ 1,
thus this series is absolutely convergent for |x| < 1, f (0) = 1 and the function is positive
in the interval [0, 1). The goal is to compute f ( 12 ).
By the recurrence formula,
∞ ∞ X
n
0
X
n
X ak
f (x) = (n + 1)an+1 x = xn =
n=0 n=0 k=0
n−k+2

∞ ∞ ∞
X
k
X xn−k X xm
= ak x = f (x) .
k=0 n=k
n−k+2 m=0
m+2
Then ∞
x
f0 xm+1
X Z
ln f (x) = ln f (x) − ln f (0) = = =
0 f m=0
(m + 1)(m + 2)
∞   ∞
xm+1 xm+1 1 X xm+1
   
X 1 1
= − =1+ 1− =1+ 1− ln ,
m=0
(m + 1) (m + 2) x m=0
(m + 1) x 1 − x
 
1
ln f = 1 − ln 2,
2
1 e
and thus f ( ) = .
2 2

4
11th International Mathematical Competition for University Students
Skopje, 25–26 July 2004

Solutions for problems on Day 1

Problem 1. Let S be an infinite set of real numbers such that |s1 + s2 + · · · + sk | < 1 for every finite subset
{s1 , s2 , . . . , sk } ⊂ S. Show that S is countable. [20 points]
Solution. Let Sn = S ∩ ( n1 , ∞) for any integer n > 0. It follows from the inequality that |Sn | < n. Similarly, if we
define S−n = S ∩ (−∞, − n1 ), then |S−n | < n. Any nonzeroSx ∈ S is an element of some Sn or S−n , because there
exists an n such that x > n1 , or x < − n1 . Then S ⊂ {0} ∪ (Sn ∪ S−n ), S is a countable union of finite sets, and
n∈N
hence countable.

Problem 2. Let P (x) = x2 − 1. How many distinct real solutions does the following equation have:

P (P (. . . (P (x)) . . . )) = 0 ? [20 points]


| {z }
2004

Solution. Put Pn (x) = P (P (...(P (x))...)). As P1 (x) ≥ −1, for each x ∈ R, it must be that Pn+1 (x) = P1 (Pn (x)) ≥
| {z }
n
−1, for each n ∈ N and each x ∈ R. Therefore the equation Pn (x) = a, where a < −1 has no real solutions.
Let us prove that the equation Pn (x) = a, where a > 0, has exactly two distinct real solutions. To this end we
use mathematical induction by n. If n = 1 the assertion follows directly. Assuming that the assertion holds for a
n ∈ N we prove √ that it must also hold
√ for n + 1. Since Pn+1 (x) =√a is equivalent√ to P1 (Pn (x)) = a, we conclude
that Pn (x) = a + 1 or Pn (x) = − a + 1. The equation Pn (x) = a + 1, as √ a + 1 > 1, has exactly two distinct
real
√ solutions by the inductive hypothesis, while the equation P n (x) = − a + 1 has no real solutions (because
− a + 1 < −1). Hence the equation Pn+1 (x) = a, has exactly two distinct real solutions.
Let us prove now that the equation Pn (x) = 0 has exactly n + 1 distinct real solutions. Again we √ use
mathematical induction. If n = 1 the solutions are x = ±1, and if n = 2 the solutions are x = 0 and x = ± 2,
so in both cases the number of solutions is equal to n + 1. Suppose that the assertion holds for some n ∈ N .
Note that Pn+2 (x) = P2 (Pn (x)) = Pn2 (x)(Pn2 (x) − 2), so the set of all real solutions of the
√ equation Pn+2 = √ 0 is
exactly the union of the sets of all real solutions of the equations Pn (x) = 0, Pn (x) = 2 and Pn (x) = − 2.
By the inductive
√ hypothesis√the equation Pn (x) = 0 has exactly n + 1 distinct real solutions, while the equations
Pn (x) = 2 and Pn (x) = − 2 have two and no distinct real solutions, respectively. Hence, the sets above being
pairwise disjoint, the equation Pn+2 (x) = 0 has exactly n + 3 distinct real solutions. Thus we have proved that,
for each n ∈ N , the equation Pn (x) = 0 has exactly n + 1 distinct real solutions, so the answer to the question
posed in this problem is 2005.

n
P π
Problem 3. Let Sn be the set of all sums xk , where n ≥ 2, 0 ≤ x1 , x2 , . . . , xn ≤ 2 and
k=1

n
X
sin xk = 1 .
k=1

a) Show that Sn is an interval. [10 points]


b) Let ln be the length of Sn . Find lim ln . [10 points]
n→∞

Solution. (a) Equivalently, we consider the set

Y = {y = (y1 , y2 , ..., yn )| 0 ≤ y1 , y2 , ..., yn ≤ 1, y1 + y2 + ... + yn = 1} ⊂ Rn

and the image f (Y ) of Y under

f (y) = arcsin y1 + arcsin y2 + ... + arcsin yn .

Note that f (Y ) = Sn . Since Y is a connected subspace of Rn and f is a continuous function, the image f (Y ) is
also connected, and we know that the only connected subspaces of R are intervals. Thus Sn is an interval.
(b) We prove that
1 π
≤ x1 + x2 + ... + xn ≤ .
n arcsin
n 2
Since the graph of sin x is concave down for x ∈ [0, π2 ], the chord joining the points (0, 0) and ( π2 , 1) lies below the
graph. Hence
2x π
≤ sin x for all x ∈ [0, ]
π 2
and we can deduce the right-hand side of the claim:
2
(x1 + x2 + ... + xn ) ≤ sin x1 + sin x2 + ... + sin xn = 1.
π
The value 1 can be reached choosing x1 = π2 and x2 = · · · = xn = 0.
The left-hand side follows immediately from Jensen’s inequality, since sin x is concave down for x ∈ [0, π2 ] and
0 ≤ x1 +x2 +...+x
n
n
< π2
1 sin x1 + sin x2 + ... + sin xn x1 + x2 + ... + xn
= ≤ sin .
n n n
Equality holds if x1 = · · · = xn = arcsin n1 .
Now we have computed the minimum and maximum of interval Sn ; we can conclude that Sn = [n arcsin n1 , π2 ].
Thus ln = π2 − n arcsin n1 and
π arcsin(1/n) π
lim ln = − lim = − 1.
n→∞ 2 n→∞ 1/n 2

Problem 4. Suppose n ≥ 4 and let M be a finite set of n points in R3 , no four of which lie in a plane. Assume
that the points can be coloured black or white so that any sphere which intersects M in at least four points has
the property that exactly half of the points in the intersection of M and the sphere are white. Prove that all of
the points in M lie on one sphere. [20 points]

−1, if X is white P
Solution. Define f : M → {−1, 1}, f (X) = . The given condition becomes X∈S f (X) = 0
1, if X is black
for any sphere S which passes through at least 4 points of M . For any 3 given points A, B, C in M , denote by
S (A, B, C) the set of all spheres which pass through
P Pand at least one other point of M and by |S (A, B, C)|
A, B, C
the number of these spheres. Also, denote by the sum X∈M f (X).
We have X X X
0= f (X) = (|S (A, B, C)| − 1) (f (A) + f (B) + f (C)) + (1)
S∈S(A,B,C) X∈S

since the values of A, B, C appear |S (A, B, C)| times each and the other values appear only once.
If there are 3 points A, B, C such that |S (A, B, C)| = 1, the proof is finished. P
If |S (A, B, C)|P> 1 for any distinct points A, B, C in M , we will prove at first that = 0.
n

Assume that > 0. From (1) itfollows that f (A) + f (B) + f (C) < 0 and summing by all 3 possible
choices of (A, B, C) we obtain that n3
P P
P< 0, which means < 0 (contradicts the starting assumption). The
same reasoningP is applied when assuming < 0.
Now, from = 0 and (1), it follows that f (A) + f (B) + f (C) = 0 for any distinct points A, B, C in M .
Taking another point D ∈ M , the following equalities take place

f (A) + f (B) + f (C) = 0


f (A) + f (B) + f (D) = 0
f (A) + f (C) + f (D) = 0
f (B) + f (C) + f (D) = 0

which easily leads to f (A) = f (B) = f (C) = f (D) = 0, which contradicts the definition of f .

Problem 5. Let X be a set of 2k−4



k−2 + 1 real numbers, k ≥ 2. Prove that there exists a monotone sequence
{xi }ki=1 ⊆ X such that
|xi+1 − x1 | ≥ 2|xi − x1 |
for all i = 2, . . . , k − 1. [20 points]
Solution. We prove a more general statement:
Lemma. Let k, l ≥ 2, let X be a set of k+l−4

k−2 + 1 real numbers. Then either X contains an increasing sequence
{xi }ki=1 ⊆ X of length k and
|xi+1 − x1 | ≥ 2|xi − x1 | ∀i = 2, . . . , k − 1,
or X contains a decreasing sequence {xi }li=1 ⊆ X of length l and

|xi+1 − x1 | ≥ 2|xi − x1 | ∀i = 2, . . . , l − 1.

Proof of the lemma. We use induction on k + l. In case k = 2 or l = 2 the lemma is obviously true.
Now let us make the induction step. Let m be the minimal element of X, M be its maximal element. Let
m+M m+M
Xm = {x ∈ X : x ≤ }, XM = {x ∈ X : x > }.
2 2
k+l−4
 k+(l−1)−4 (k−1)+l−4
Since k−2 = k−2 + (k−1)−2
, we can see that either
   
(k − 1) + l − 4 k + (l − 1) − 4
|Xm | ≥ + 1, or |XM | ≥ + 1.
(k − 1) − 2 k−2

In the first case we apply the inductive assumption to Xm and either obtain a decreasing sequence of length l
with the required properties (in this case the inductive step is made), or obtain an increasing sequence {xi }k−1
i=1 ⊆
Xm of length k − 1. Then we note that the sequence {x1 , x2 , . . . , xk−1 , M } ⊆ X has length k and all the required
properties.
In the case |XM | ≥ k+(l−1)−4

k−2 + 1 the inductive step is made in a similar way. Thus the lemma is proved.
The reader may check that the number k+l−4

k−2 + 1 cannot be smaller in the lemma.

Problem 6. For every complex number z ∈


/ {0, 1} define
X
f (z) := (log z)−4 ,

where the sum is over all branches of the complex logarithm.


a) Show that there are two polynomials P and Q such that f (z) = P (z)/Q(z) for all z ∈ C \ {0, 1}. [10
points]
b) Show that for all z ∈ C \ {0, 1}

z 2 + 4z + 1
f (z) = z . [10 points]
6(z − 1)4

Solution 1. It is clear that


P the left hand side is well defined and independent of the order of summation, because
−4
we have a sum of the type n , and the branches of the logarithms do not matter because all branches are taken.
It is easy to check that the convergence is locally uniform on C \ {0, 1}; therefore, f is a holomorphic function on
the complex plane, except possibly for isolated singularities at 0 and 1. (We omit the detailed estimates here.)
The function log has its only (simple) zero at z = 1, so f has a quadruple pole at z = 1.
Now we investigate the behavior near infinity. We have Re(log(z)) = log |z|, hence (with c := log |z|)
X X X
| (log z)−4 | ≤ | log z|−4 = (log |z| + 2πin)−4 + O(1)
Z ∞
= (c + 2πix)−4 dx + O(1)
−∞
Z ∞
−4
= c (1 + 2πix/c)−4 dx + O(1)
−∞
Z ∞
−3
= c (1 + 2πit)−4 dt + O(1)
−∞
≤ α(log |z|)−3

for a universal constant α. Therefore, the infinite sum tends to 0 as |z| → ∞. In particular, the isolated singularity
at ∞ is not essential, but rather has (at least a single) zero at ∞.
The remaining singularity is at z = 0. It is readily verified that f (1/z) = f (z) (because log(1/z) = − log(z));
this implies that f has a zero at z = 0.
We conclude that the infinite sum is holomorphic on C with at most one pole and without an essential singularity
at ∞, so it is a rational function, i.e. we can write f (z) = P (z)/Q(z) for some polynomials P and Q which we
may as well assume coprime. This solves the first part.
Since f has a quadruple pole at z = 1 and no other poles, we have Q(z) = (z − 1)4 up to a constant factor
which we can as well set equal to 1, and this determines P uniquely. Since f (z) → 0 as z → ∞, the degree of P
is at most 3, and since P (0) = 0, it follows that P (z) = z(az 2 + bz + c) for yet undetermined complex constants
a, b, c.
There are a number of ways to compute the coefficients a, b, c, which turn out to be a = c = 1/6, b = 2/3.
Since f (z) = f (1/z), it follows easily that a = c. Moreover, the fact lim (z − 1)4 f (z) = 1 implies a + b + c = 1
z→1
(this fact follows from the observation that at z = 1, all summands cancel pairwise, except the principal branch
which contributes a quadruple pole). Finally, we can calculate
 
X X X X 1
f (−1) = π −4 n−4 = 2π −4 n−4 = 2π −4  n−4 − n−4  = .
48
nodd n≥1odd n≥1 n≥1even

This implies a − b + c = −1/3. These three equations easily yield a, b, c.


Moreover, the function f satisfies f (z) + f (−z) = 16f (z 2 ): this follows because the branches of log(z 2 ) =
log((−z)2 ) are the numbers 2 log(z) and 2 log(−z). This observation supplies the two equations b = 4a and a = c,
which can be used instead of some of the
P considerations above.
1 dz
Another way is to compute g(z) = (log z)2
first. In the same way, g(z) = (z−1) 2 . The unknown coefficient d
2
can be computed from lim (z − 1) g(z) = 1; it is d = 1. Then the exponent 2 in the denominator can be increased
z→1
by taking derivatives (see Solution 2). Similarly, one can start with exponent 3 directly.
A more straightforward, though tedious way to find the constants is computing the first four terms of the
Laurent series of f around z = 1. For that branch of the logarithm which vanishes at 1, for all |w| < 12 we have
w2 w3 w4
log(1 + w) = w − + − + O(|w|5 );
2 3 4
after some computation, one can obtain
1 7 1
= w−4 + 2w−2 + w−2 + w−1 + O(1).
log(1 + w)4 6 6
The remaining branches of logarithm give a bounded function. So
7 1
f (1 + w) = w−4 + 2w−2 + w−2 + w−1
6 6
(the remainder vanishes) and
1 + 2(z − 1) + 76 (z − 1)2 + 16 (z − 1)3 z(z 2 + 4z + 1)
f (z) = = .
(z − 1)4 6(z − 1)4
Solution 2. ¿From the well-known series for the cotangent function,
N
X 1 i iw
lim = cot
N →∞ w + 2πi · k 2 2
k=−N

and
N i log z
X 1 i i log z i e2i· 2 + 1 1 1
lim = cot = ·i i log z = + .
N →∞ log z + 2πi · k 2 2 2 e2i· 2 − 1 2 z−1
k=−N
Taking derivatives we obtain  0
X 1 1 1 z
= −z ·+ = ,
(log z)2 2 z−1 (z − 1)2
 0
X 1 z z z(z + 1)
3
=− · 2
=
(log z) 2 (z − 1) 2(z − 1)3
and 0
z(z 2 + 4z + 1)

X 1 z z(z + 1)
4
=− · = .
(log z) 3 2(z − 1)3 2(z − 1)4
11th International Mathematical Competition for University Students
Skopje, 25–26 July 2004

Solutions for problems on Day 2

1. Let A be a real 4 × 2 matrix and B be a real 2 × 4 matrix such that


 
1 0 −1 0
0 1 0 −1
AB = −1 0
.
1 0
0 −1 0 1
Find BA. [20 points]
 
A1 
Solution. Let A = and B = B1 B2 where A1 , A2 , B1 , B2 are 2 × 2 matrices. Then
A2
 
1 0 −1 0    
0 1 0 −1 A 1
 A 1 B1 A 1 B2

−1 0
= B1 B2 =
1 0 A2 A2 B1 A2 B2
0 −1 0 1
therefore, A1 B1 = A2 B2 = I2 and A1 B2 = A2 B1 = −I2 . Then B1 = A−1 −1 −1
1 , B2 = −A1 and A2 = B2 =
−A1 . Finally,    
 A1 2 0
BA = B1 B2 = B1 A1 + B2 A2 = 2I2 =
A2 0 2

2. Let f, g : [a, b] → [0, ∞) be continuous and non-decreasing functions such that for each x ∈ [a, b] we
have Z xp Z xp
f (t) dt ≤ g(t) dt
a a
Rbp Rbp
and a f (t) dt = a g(t) dt.
Rbp Rbp
Prove that a 1 + f (t) dt ≥ a 1 + g(t) dt. [20 points]
Rxp Rxp
Solution. Let F (x) = a f (t) dt and G(x) = a g(t) dt. The functions F, G are convex, F (a) = 0 =
G(a) and F (b) = G(b) by the hypothesis. We are supposed to show that
Z bq Z bq
2 2
0
1 + F (t) dt ≥ 1 + G0 (t) dt
a a

i.e. The length ot the graph of F is ≥ the length of the graph of G. This is clear since both functions are
convex, their graphs have common ends and the graph of F is below the graph of G — the length of the
graph of F is the least upper bound of the lengths of the graphs of piecewise linear functions whose values
at the points of non-differentiability coincide with the values of F , if a convex polygon P1 is contained in
a polygon P2 then the perimeter of P1 is ≤ the perimeter of P2 .

3. Let D be the closed unit disk in the plane, and let p1 , p2 , . . . , pn be fixed points in D. Show that there
exists a point p in D such that the sum of the distances of p to each of p1 , p2 , . . . , pn is greater than or
equal to 1. [20 points]
Solution. considering as vectors, thoose p to be the unit vector which points into the opposite direction as
Pn
pi . Then, by the triangle inequality,
i=1

n
X n
X Xn
|p − pi | ≥ np − pi = n + pi ≥ n..


i=1 i=1 i=1
4. For n ≥ 1 let M be an n × n complex matrix with distinct eigenvalues λ1 , λ2 , . . . , λk , with multiplicities
m1 , m2 , . . . , mk , respectively. Consider the linear operator LM defined by LM (X) = M X + XM T , for any
complex n × n matrix X. Find its eigenvalues and their multiplicities. (M T denotes the transpose of M ;
that is, if M = (mk,l ), then M T = (ml,k ).) [20 points]
Solution. We first solve the problem for the special case when the eigenvalues of M are distinct and all sums
λr + λs are different. Let λr and λs be two eigenvalues of M and ~vr , ~vs eigenvectors associated to them, i.e.
T
M~vj = λ~vj for j = r, s. We have M~vr (~vs )T +~vr (~vs )T M T = (M~vr )(~vs )T +~vr M~vs = λr~vr (~vs )T +λs~vr (~vs )T ,
so ~vr (~vs ) is an eigenmatrix of LM with the eigenvalue λr + λs .
Notice that if λr 6= λs then vectors ~u, w~ are linearly independent and matrices ~u(w) ~ T and w(~ ~ u)T are
linearly independent, too. This implies that the eigenvalue λr + λs is double if r 6= s.
The map LM maps n2 –dimensional linear space into itself, so it has at most n2 eigenvalues. We already
found n2 eigenvalues, so there exists no more and the problem is solved for the special case.
In the general case, matrix M is a limit of matrices M1 , M2 , . . . such that each of them belongs to the
special case above. By the continuity of the eigenvalues we obtain that the eigenvalues of LM are
• 2λr with multiplicity m2r (r = 1, . . . , k);
• λr + λs with multiplicity 2mr ms (1 ≤ r < s ≤ k).
(It can happen that the sums λr + λs are not pairwise different; for those multiple values the multiplicities
should be summed up.)

5. Prove that Z 1 Z 1
dx dy
≤ 1. [20 points]
0 0 x−1 + | ln y| − 1
Solution 1. First we use the inequality

x−1 − 1 ≥ | ln x|, x ∈ (0, 1],

which follows from


(x−1 − 1) x=1 = | ln x||x=1 = 0,

1 1
(x−1 − 1)0 = − 2
≤ − = | ln x|0 , x ∈ (0, 1].
x x
Therefore Z 1 Z 1 Z 1Z 1 Z 1Z 1
dx dy dx dy dx dy
−1
≤ = .
0 0 x + | ln y| − 1 0 0 | ln x| + | ln y| 0 0 | ln(x · y)|

Substituting y = u/x, we obtain


Z 1Z 1 Z 1 Z 1  Z 1
dx dy dx du du
= = | ln u| · = 1.
0 0 | ln(x · y)| 0 u x | ln u| 0 | ln u|

Solution 2. Substituting s = x−1 − 1 and u = s − ln y,


Z 1Z 1 Z ∞Z ∞ Z ∞ Z u  −u
dx dy es−u es e
−1
= 2
duds = 2
ds dsdu.
0 0 x + | ln y| − 1 0 s (s + 1) u 0 0 (s + 1) u
es
Since the function (s+1)2
is convex,
u
es eu
Z  
u
ds ≤ +1
0 (s + 1)2 2 (u + 1)2
so
1 1 ∞  −u Z ∞ Z ∞
eu
Z Z Z  
dx dy u e 1 du −u
≤ +1 du = + e du = 1.
0 0 x−1 + | ln y| − 1 0 2 (u + 1)2 u 2 0 (u + 1)2 0
6. For n ≥ 0 define matrices An and Bn as follows: A0 = B0 = (1) and for every n > 0
   
An−1 An−1 An−1 An−1
An = and Bn = .
An−1 Bn−1 An−1 0

Denote the sum of all elements of a matrix M by S(M ). Prove that S(Ank−1 ) = S(Akn−1 ) for every n, k ≥ 1.
[20 points]
Solution. The quantity S(Ak−1
n ) has a special combinatorical meaning. Consider an n × k table filled with
0’s and 1’s such that no 2 × 2 contains only 1’s. Denote the number of such fillings by Fnk . The filling of
each row of the table corresponds to some integer ranging from 0 to 2n − 1 written in base 2. Fnk equals
to the number of k-tuples of integers such that every two consecutive integers correspond to the filling of
n × 2 table without 2 × 2 squares filled with 1’s.
Consider binary expansions of integers i and j in in−1 . . . i1 and jn jn−1 . . . j1 . There are two cases:

1. If in jn = 0 then i and j can be consecutive iff in−1 . . . i1 and jn−1 . . . j1 can be consequtive.

2. If in = jn = 1 then i and j can be consecutive iff in−1 jn−1 = 0 and in−2 . . . i1 and jn−2 . . . j1 can be
consecutive.

Hence i and j can be consecutive iff (i + 1, j + 1)-th entry of An is 1. Denoting this entry by ai,j , the sum
P2n −1 P2n −1
S(Ak−1
n ) = i1 =0 · · ·
k−1
ik =0 ai1 i2 ai2 i3 · · · aik−1 ik counts the possible fillings. Therefore Fnk = S(An ).
The the obvious statement Fnk = Fkn completes the proof.
12th International Mathematics Competition for University Students
Blagoevgrad, July 22 - July 28, 2005
First Day

Problem 1. Let A be the n × n matrix, whose (i, j)th entry is i + j for all i, j = 1, 2, . . . , n. What is the
rank of A?
Solution 1. For n = 1 the rank is 1. Now assume n ≥ 2. Since A = (i)ni,j=1 + (j)ni,j=1 , matrix A is the sum
of two matrixes of rank 1. Therefore, the rank of A is at most 2. The determinant of the top-left 2 × 2
minor is −1, so the rank is exactly 2.
Therefore, the rank of A is 1 for n = 1 and 2 for n ≥ 2.
Solution 2. Consider the case n ≥ 2. For i = n, n − 1, . . . , 2, subtract the (i − 1)th row from the nth row.
Then subtract the second row from all lower rows.
 
    1 2 ... n
2 3 ... n + 1 2 3 ... n + 1 1 1 . . . 1 
 3 4 . . . n + 2 1 1 . . . 1 
   
0 0 . . . 0 
rank  .. = rank = rank  = 2.
 
.. .
..  . .. .
 .. .. 
   
 . . .  .. . . .. 
. . .
n + 1 n + 2 ... 2n 1 1 ... 1
0 0 ... 0

Problem 2. For an integer n ≥ 3 consider the sets

Sn = {(x1 , x2 , . . . , xn ) : ∀i xi ∈ {0, 1, 2}}

An = {(x1 , x2 , . . . , xn ) ∈ Sn : ∀i ≤ n − 2 |{xi , xi+1 , xi+2 }| =


6 1}
and
Bn = {(x1 , x2 , . . . , xn ) ∈ Sn : ∀i ≤ n − 1 (xi = xi+1 ⇒ xi 6= 0)} .
Prove that |An+1 | = 3 · |Bn |.
(|A| denotes the number of elements of the set A.)
Solution 1. Extend the definitions also for n = 1, 2. Consider the following sets

A0n = {(x1 , x2 , . . . , xn ) ∈ An : xn−1 = xn } , A00n = An \ A0n ,

Bn0 = {(x1 , x2 , . . . , xn ) ∈ Bn : xn = 0} , Bn00 = Bn \ Bn0


and denote an = |An |, a0n = |A0n |, a00n = |A00n |, bn = |Bn |, b0n = |Bn0 |, b00n = |Bn00 | .
It is easy to observe the following relations between the a–sequences

 an = a0n + a00n
a0 = a00n ,
 n+1 00 0 00
an+1 = 2an + 2an

which lead to an+1 = 2an + 2an−1 .


For the b–sequences we have the same relations

 bn = b0n + b00n
b0 = b00n ,
 n+100 0 00
bn+1 = 2bn + 2bn

therefore bn+1 = 2bn + 2bn−1 .


By computing the first values of (an ) and (bn ) we obtain

a1 = 3, a2 = 9, a3 = 24
b1 = 3, b2 = 8
which leads to 
a2 = 3b1
a3 = 3b2
Now, reasoning by induction, it is easy to prove that an+1 = 3bn for every n ≥ 1.
Solution 2. Regarding xi to be elements of Z3 and working “modulo 3”, we have that

(x1 , x2 , . . . , xn ) ∈ An ⇒ (x1 + 1, x2 + 1, . . . , xn + 1) ∈ An , (x1 + 2, x2 + 2, . . . , xn + 2) ∈ An

which means that 1/3 of the elements of An start with 0. We establish a bijection between the subset of
all the vectors in An+1 which start with 0 and the set Bn by

(0, x1 , x2 , . . . , xn ) ∈ An+1 7−→ (y1 , y2 , . . . , yn ) ∈ Bn


y1 = x1 , y2 = x2 − x1 , y3 = x3 − x2 , . . . , yn = xn − xn−1

(if yk = yk+1 = 0 then xk − xk−1 = xk+1 − xk = 0 (where x0 = 0), which gives xk−1 = xk = xk+1 , which
is not possible because of the definition of the sets Ap ; therefore, the definition of the above function is
correct).
The inverse is defined by

(y1 , y2 , . . . , yn ) ∈ Bn 7−→ (0, x1 , x2 , . . . , xn ) ∈ An+1


x 1 = y 1 , x2 = y 1 + y 2 , . . . , x n = y 1 + y 2 + · · · + y n

Problem 3. Let f : R → [0, ∞) be a continuously differentiable function. Prove that


Z 1 Z 1 Z 1 2
0
3 2

f (x) dx − f (0) f (x) dx ≤ max |f (x)| f (x) dx .

0 0 0≤x≤1 0

Solution 1. Let M = max |f 0 (x)|. By the inequality −M ≤ f 0 (x) ≤ M, x ∈ [0, 1] it follows:


0≤x≤1

−M f (x) ≤ f (x) f 0 (x) ≤ M f (x) , x ∈ [0, 1] .

By integration Z x Z x
1 1
−M f (t) dt ≤ f 2 (x) − f 2 (0) ≤ M f (t) dt, x ∈ [0, 1]
0 2 2 0
Z x Z x
1 1
−M f (x) f (t) dt ≤ f 3 (x) − f 2 (0) f (x) ≤ M f (x) f (t) dt, x ∈ [0, 1] .
0 2 2 0
Integrating the last inequality on [0, 1] it follows that
R 2 R R 2
1 1 R1 1
−M 0 f (x)dx ≤ 0 f 3 (x) dx − f 2 (0) 0 f (x) dx ≤ M 0 f (x)dx ⇔
R R 2
1 3 2
R1 1
0 f (x) dx − f (0) 0 f (x) dx ≤ M 0 f (x) dx .

R1 R1
Solution 2. Let M = max |f 0 (x)| and F (x) = − x
f ; then F 0 = f , F (0) = − 0
f and F (1) = 0.
0≤x≤1
Integrating by parts, Z 1 Z 1 Z 1
0
3
f = 2
f · F = [f 2
F ]10 − (f 2 )0 F =
0 0 0
Z 1 Z 1 Z 1
0
2
= f (1)F (1) − f (0)F (0) − 2
2F f f = f (0) 2
f− 2F f f 0 .
0 0 0
Then
Z 1 Z 1
Z 1
Z 1 Z 1 Z 1 2
0 0
3 2


f (x) dx − f (0) f (x) dx = 2F f f ≤ 2F f |f | ≤ M 2F f = M · [F 2 ]10 =M f .
0 0 0 0 0 0
Problem 4. Find all polynomials P (x) = an xn + an−1 xn−1 + ... + a1 x + a0 (an 6= 0) satisfying the following
two conditions:
(i) (a0 , a1 , ..., an ) is a permutation of the numbers (0, 1, ..., n)
and
(ii) all roots of P (x) are rational numbers.
Solution 1. Note that P (x) does not have any positive root because P (x) > 0 for every x > 0. Thus, we can
represent them in the form −αi , i = 1, 2, . . . , n, where αi ≥ 0. If a0 6= 0 then there is a k ∈ N, 1 ≤ k ≤ n−1,
with ak = 0, so using Viete’s formulae we get
ak
α1 α2 ...αn−k−1 αn−k + α1 α2 ...αn−k−1 αn−k+1 + ... + αk+1 αk+2 ...αn−1 αn = = 0,
an
which is impossible because the left side of the equality is positive. Therefore a0 = 0 and one of the roots of
the polynomial, say αn , must be equal to zero. Consider the polynomial Q(x) = an xn−1 +an−1 xn−2 +...+a1 .
It has zeros −αi , i = 1, 2, . . . , n − 1. Again, Viete’s formulae, for n ≥ 3, yield:
a1
α1 α2 ...αn−1 = (1)
an
a2
α1 α2 ...αn−2 + α1 α2 ...αn−3 αn−1 + ... + α2 α3 ...αn−1 = (2)
an
an−1
α1 + α2 + ... + αn−1 = . (3)
an
Dividing (2) by (1) we get
1 1 1 a2
+ + ... + = . (4)
α1 α2 αn−1 a1
From (3) and (4), applying the AM-HM inequality we obtain
an−1 α1 + α2 + ... + αn−1 n−1 (n − 1)a1
= ≥ 1 1 1 = ,
(n − 1)an n−1 α1
+ α2
+ ... + αn−1
a2
2
therefore a2aa1n−1
an
≥ (n − 1)2 . Hence n2 ≥ a2aa1n−1
an
≥ (n − 1)2 , implying n ≤ 3. So, the only polynomials
possibly satisfying (i) and (ii) are those of degree at most three. These polynomials can easily be found
and they are P (x) = x, P (x) = x2 + 2x, P (x) = 2x2 + x, P (x) = x3 + 3x2 + 2x and P (x) = 2x3 + 3x2 + x.
2
Solution 2. Consider the prime factorization of P in the ring Z[x]. Since all roots of P are rational, P can
be written as a product of n linear polynomials with rational coefficients. Therefore, all prime factor of P
are linear and P can be written as n
Y
P (x) = (bk x + ck )
k=1

where the coefficients bk , ck are integers. Since the leading coefficient of P is positive, we can assume bk > 0
for all k. The coefficients of P are nonnegative, so P cannot have a positive root. This implies ck ≥ 0. It
is not possible that ck = 0 for two different values of k, because it would imply a0 = a1 = 0. So ck > 0 in
at least n − 1 cases.
Now substitute x = 1.
n
n(n + 1) Y
P (1) = an + · · · + a0 = 0 + 1 + · · · + n = = (bk + ck ) ≥ 2n−1 ;
2 k=1

therefore it is necessary that 2n−1 ≤ n(n+1)


2
, therefore n ≤ 4. Moreover, the number n(n+1)
2
can be written
as a product of n − 1 integers greater than 1.
If n = 1, the only solution is P (x) = 1x + 0.
If n = 2, we have P (1) = 3 = 1 · 3, so one factor must be x, the other one is x + 2 or 2x + 1. Both
x(x + 2) = 1x2 + 2x + 0 and x(2x + 1) = 2x2 + 1x + 0 are solutions.
If n = 3, then P (1) = 6 = 1·2·3, so one factor must be x, another one is x+1, the third one is again x+2
or 2x+1. The two polynomials are x(x+1)(x+2) = 1x3 +3x2 +2x+0 and x(x+1)(2x+1) = 2x3 +3x2 +1x+0,
both have the proper set of coefficients.
In the case n = 4, there is no solution because n(n+1)
2
= 10 cannot be written as a product of 3 integers
greater than 1.
Altogether we found 5 solutions: 1x+0, 1x2 +2x+0, 2x2 +1x+0, 1x3 +3x2 +2x+0 and 2x3 +3x2 +1x+0.

Problem 5. Let f : (0, ∞) → R be a twice continuously differentiable function such that

|f 00 (x) + 2xf 0 (x) + (x2 + 1)f (x)| ≤ 1

for all x. Prove that lim f (x) = 0.


x→∞
Solution 1. Let g(x) = f 0 (x) + xf (x); then f 00 (x) + 2xf 0 (x) + (x2 + 1)f (x) = g 0 (x) + xg(x).
We prove that if h is a continuously differentiable function such that h0 (x) + xh(x) is bounded then
lim h = 0. Applying this lemma for h = g then for h = f , the statement follows.

2 /2 2 /2
Let M be an upper bound for |h0 (x)+xh(x)| and let p(x) = h(x)ex . (The function e−x is a solution
of the differential equation u0 (x) + xu(x) = 0.) Then
2 /2 2 /2
|p0 (x)| = |h0 (x) + xh(x)|ex ≤ M ex

and
p(x) p(0) + 0x p0 |p(0)| + M 0x ex2 /2 dx
R R
|h(x)| = x2 /2 = ≤ .
e ex2 /2 ex2 /2
R x x2 /2
2 /2 e dx
Since lim ex = ∞ and lim 0 x2 /2 = 0 (by L’Hospital’s rule), this implies limx→∞ h(x) = 0.
x→∞ e
2
f (x)ex /2
Solution 2. Apply L’Hospital rule twice on the fraction . (Note that L’Hospital rule is valid if
ex2 /2
the denominator converges to infinity, without any assumption on the numerator.)
2 2 /2 2 /2
f (x)ex /2 (f 0 (x) + xf (x))ex (f 00 (x) + 2xf 0 (x) + (x2 + 1)f (x))ex
lim f (x) = lim = lim = lim =
x→∞ x→∞ ex2 /2 x→∞ xex2 /2 x→∞ (x2 + 1)ex2 /2

f 00 (x) + 2xf 0 (x) + (x2 + 1)f (x)


= lim = 0.
x→∞ x2 + 1

Problem 6. Given a group G, denote by G(m) the subgroup generated by the mth powers of elements of
G. If G(m) and G(n) are commutative, prove that G(gcd(m, n)) is also commutative. (gcd(m, n) denotes
the greatest common divisor of m and n.)
Solution. Write d = gcd(m, n). It is easy to see that hG(m), G(n)i = G(d); hence, it will suffice to
check commutativity for any two elements in G(m) ∪ G(n), and so for any two generators am and bn .
Consider their commutator z = a−m b−n am bn ; then the relations

z = (a−m bam )−n bn = a−m (b−n abn )m

show that z ∈ G(m) ∩ G(n). But then z is in the center of G(d). Now, from the relation am bn = bn am z, it
easily follows by induction that
2
aml bnl = bnl aml z l .
2 2
Setting l = m/d and l = n/d we obtain z (m/d) = z (n/d) = e, but this implies that z = e as well.
12th International Mathematics Competition for University
Students
Blagoevgrad, July 22 - July 28, 2005
Second Day

Problem 1. Let f (x) = x2 + bx + c, where b and c are real numbers, and let

M = {x ∈ R : |f (x)| < 1}.

Clearly the set M is either empty or consists of disjoint open intervals. Denote the sum of
their lengths by |M |. Prove that √
|M | ≤ 2 2.
2 2
Solution. Write f (x) = x + 2b + d where d = c − b4 . The absolute minimum of f is d.
If d ≥ 1 then f (x) ≥ 1 for all x, M = ∅ and |M | = 0.
If −1 < d < 1 then f (x) > −1 for all x,
2
b √

b
−1 < x + + d < 1 ⇐⇒ x + < 1 − d

2 2
so
b √ b √
 
M= − − 1 − d, − + 1 − d
2 2
and √ √
|M | = 2 1 − d < 2 2.
If d ≤ −1 then
 2
b p b p
−1 < x + +d<1 ⇐⇒ |d| − 1 < x + < |d| + 1
2 2
so p p  p p 
M= − |d| + 1, − |d| − 1 ∪ |d| − 1, |d| + 1
and
p p  (|d| + 1) − (|d| − 1) 2 √
|M | = 2 |d| + 1 − |d| − 1 = 2 p p ≤ 2√ √ = 2 2.
|d| + 1 + |d| − 1 1+1+ 1−0

Problem 2. Let f : R → R be a function such that (f (x))n is a polynomial for every


n = 2, 3, . . .. Does it follow that f is a polynomial?
Solution 1. Yes, it is even enough to assume that f 2 and f 3 are polynomials.
Let p = f 2 and q = f 3 . Write these polynomials in the form of

p = a · pa11 · . . . · pakk , q = b · q1b1 · . . . · qlbl ,


where a, b ∈ R, a1 , . . . , ak , b1 , . . . bl are positive integers and p1 , . . . , pk , q1 , . . . , ql are irre-
ducible polynomials with leading coefficients 1. For p3 = q 2 and the factorisation of p3 = q 2
is unique we get that a3 = b2 , k = l and for some (i1 , . . . , ik ) permutation of (1, . . . , k) we
have p1 = qi1 , . . . , pk = qik and 3a1 = 2bi1 , . . . , 3ak = 2bik . Hence b1 , . . . , bl are divisible by
b /3 b /3
3 let r = b1/3 · q11 · . . . · ql l be a polynomial. Since r3 = q = f 3 we have f = r.
p 3
Solution 2. Let be the simplest form of the rational function ff 2 . Then the simplest form
q
 3 2
p2 p2
of its square is q2 . On the other hand q2 = ff 2 = f 2 is a polynomial therefore q must
f3 p
be a constant and so f = f2
= q
is a polynomial.

Problem 3. In the linear space of all real n × n matrices, find the maximum possible
dimension of a linear subspace V such that

∀X, Y ∈ V trace(XY ) = 0.

(The trace of a matrix is the sum of the diagonal entries.)


Solution. If A is a nonzero symmetric matrix, then trace(A2 ) = trace(At A) is the sum of
the squared entries of A which is positive. So V cannot contain any symmetric matrix but
0.
Denote by S the linear space of all real n × n symmetric matrices; dim V = n(n+1) 2
.
2 2 n(n+1) n(n−1)
Since V ∩ S = {0}, we have dim V + dim S ≤ n and thus dim V ≤ n − 2 = 2 .
The space of strictly upper triangular matrices has dimension n(n−1)
2
and satisfies the
condition of the problem.
Therefore the maximum dimension of V is n(n−1) 2
.

Problem 4. Prove that if f : R → R is three times differentiable, then there exists a real
number ξ ∈ (−1, 1) such that

f 000 (ξ) f (1) − f (−1)


= − f 0 (0).
6 2

Solution 1. Let
f (−1) 2 f (1) 2
g(x) = − x (x − 1) − f (0)(x2 − 1) + x (x + 1) − f 0 (0)x(x − 1)(x + 1).
2 2
It is easy to check that g(±1) = f (±1), g(0) = f (0) and g 0 (0) = f 0 (0).
Apply Rolle’s theorem for the function h(x) = f (x) − g(x) and its derivatives. Since
h(−1) = h(0) = h(1) = 0, there exist η ∈ (−1, 0) and ϑ ∈ (0, 1) such that h0 (η) =
h0 (ϑ) = 0. We also have h0 (0) = 0, so there exist % ∈ (η, 0) and σ ∈ (0, ϑ) such that
h00 (%) = h00 (σ) = 0. Finally, there exists a ξ ∈ (%, σ) ⊂ (−1, 1) where h000 (ξ) = 0. Then

f (−1) f (1) f (1) − f (−1)


f 000 (ξ) = g 000 (ξ) = − · 6 − f (0) · 0 + · 6 − f 0 (0) · 6 = − f 0 (0).
2 2 2
f (1) − f (−1)
Solution 2. The expression − f 0 (0) is the divided difference f [−1, 0, 0, 1] and
2
f 000 (ξ)
there exists a number ξ ∈ (−1, 1) such that f [−1, 0, 0, 1] = .
3!
Problem 5. Find all r > 0 such that whenever f : R2 → R is a differentiable function
such that |grad f (0, 0)| = 1 and |grad f (u) − grad f (v)| ≤ |u − v| for all u, v ∈ R2 , then
the maximum of f on the disk {u ∈ R2 : |u| ≤ r} is attained at exactly one point.
(grad f (u) = (∂1√f (u), ∂2 f (u)) is the gradient vector of f at the point u. For a vector
u = (a, b), |u| = a2 + b2 .)
x2 y 2
Solution. To get an upper bound for r, set f (x, y) = x − + . This function satisfies
2 2
the conditions, since grad f (x, y) = (1 − x, y), grad f (0, 0) = (1, 0) and |grad f (x1 , y1 ) −
grad f (x2 , y2 )| = |(x2 − x1 , y1 − y2 )| = |(x1 , y1 ) − (x2 , y2 )|.
In the disk Dr = {(x, y) : x2 + y 2 ≤ r2 }
2
x2 + y 2 r2 1

1 1
f (x, y) = − x− + ≤ + .
2 2 4 2 4
 q 
2
If r > 21 then the absolute maximum is r2 + 14 , attained at the points 12 , ± r2 − 14 .
Therefore, it is necessary that r ≤ 12 because if r > 21 then the maximum is attained twice.
Suppose now that r ≤ 1/2 and that f attains its maximum on Dr at u, v, u 6= v. Since
|grad f (z) − grad f (0)| ≤ r, |grad f (z)| ≥ 1 − r > 0 for all z ∈ Dr . Hence f may attain its
maximum only at the boundary of Dr , so we must have |u| = |v| = r and grad f (u) = au
and grad f (v) = bv, where a, b ≥ 0. Since au = grad f (u) and bv = grad f (v) belong
to the disk D with centre grad f (0) and radius r, they do not belong to the interior of
Dr . Hence |grad f (u) − grad f (v)| = |au − bv| ≥ |u − v| and this inequality is strict
since D ∩ Dr contains no more than one point. But this contradicts the assumption that
|grad f (u) − grad f (v)| ≤ |u − v|. So all r ≤ 12 satisfies the condition.

Problem6. Prove  that and q are rational numbers and r = p + q 7, then there exists
 if p 
a b 1 0
a matrix 6= ± with integer entries and with ad − bc = 1 such that
c d 0 1
ar + b
= r.
cr + d
Solution. First consider the case when q = 0 and r is rational. Choose a positive integer t
such that r2 t is an integer and set
   
a b 1 + rt −r2 t
= .
c d t 1 − rt
Then
(1 + rt)r − r2 t
 
a b ar + b
det = 1 and = = r.
c d cr + d tr + (1 − rt)
Now assume q 6= 0. Let the minimal
√ polynomial of r in Z[x] be ux2 + vx + w. The other
root of this polynomial is r = p−q 7, so v = −u(r+r) = −2up and w = urr = u(p2 −7q 2 ).
The discriminant is v 2 − 4uw = 7 · (2uq)2 . The left-hand side is an integer, implying that
also ∆ = 2uq is an integer.
The equation ar+b
cr+d
= r is equivalent to cr2 + (d − a)r − b = 0. This must be a multiple
of the minimal polynomial, so we need

c = ut, d − a = vt, −b = wt

for some integer t 6= 0. Putting together these equalities with ad − bc = 1 we obtain that

(a + d)2 = (a − d)2 + 4ad = 4 + (v 2 − 4uw)t2 = 4 + 7∆2 t2 .

Therefore 4 + 7∆2 t2 must be a perfect square. Introducing s = a + d, we need an integer


solution (s, t) for the Diophantine equation

s2 − 7∆2 t2 = 4 (1)

such that t 6= 0.
The numbers s and t will be even. Then a + d = s and d − a = vt will be even as well
and a and d √ will be really integers.
√ √ √
(8±3 7)n =
Let √ √k n ±ln 7 for each integer n. Then k 2
n −7ln
2
= (k n +ln 7)(k n −ln 7) =
((8 + 3 7)n (8 − 3 7))n = 1 and the sequence (ln ) also satisfies the linear recurrence
ln+1 = 16ln − ln−1 . Consider the residue of ln modulo ∆. There are ∆2 possible residue
pairs for (ln , ln+1 ) so some are the same. Starting from such two positions, the recurrence
shows that the sequence of residues is periodic in both directions. Then there are infinitely
many indices such that ln ≡ l0 = 0 (mod ∆).
Taking such an index n, we can set s = 2kn and t = 2ln /∆.
Remarks. 1. It is well-known that if D > 0 is not a perfect square then the Pell-like
Diophantine equation
x2 − Dy 2 = 1
has infinitely many solutions. Using this fact the solution can be generalized to all quadratic
algebraic numbers.
2. It is also known that the continued fraction of a real number r is periodic from a certain
point if and only if r is a root of a quadratic equation. This fact can lead to another
solution.
13th International Mathematics Competition for University Students
Odessa, July 20-26, 2006
First Day

Problem 1. Let f : R → R be a real function. Prove or disprove each of the following statements.
(a) If f is continuous and range(f ) = R then f is monotonic.
(b) If f is monotonic and range(f ) = R then f is continuous.
(c) If f is monotonic and f is continuous then range(f ) = R.
(20 points)
Solution. (a) False. Consider function f (x) = x3 x. It is continuous, range(f ) = R but, for example,
f (0) = 0, f ( 12 ) = 83 and f (1) = 0, therefore f (0) > f ( 21 ), f ( 12 ) < f (1) and f is not monotonic.
(b) True. Assume first that f is non-decreasing. For an arbitrary number a, the limits lim f and
a−
lim f exist and lim f ≤ lim f . If the two limits are equal, the function is continuous at a. Otherwise,
a+ a− a+
if lim f = b < lim f = c, we have f (x) ≤ b for all x < a and f (x) ≥ c for all x > a; therefore
a− a+
range(f )  ( ∞, b) ∪ (c, ∞) ∪ {f (a)} cannot be the complete R.
For non-increasing f the same can be applied writing reverse relations or g(x) = f (x).
(c) False. The function g(x) = arctan x is monotonic and continuous, but range(g) = ( π/2, π/2) 6= R.

Problem 2. Find the number of positive integers x satisfying the following two conditions:
1. x < 102006 ;
2. x2 x is divisible by 102006 .
(20 points)

Solution 1. Let Sk = 0 < x < 10k x2 x is divisible by 10k and s (k) = |Sk | , k ≥ 1. Let x =
ak+1 ak . . . a1 be the decimal writing of an integer x ∈ Sk+1 , k ≥ 1. Then obviously y = ak . . . a1 ∈ Sk . Now,
2
let y = ak . . .a1 ∈ Sk be fixed. Considering ak+1 as a variable digit, we have x2 x = ak+1 10k + y
ak+1 10k + y = (y 2 y) + ak+1 10k (2y 1) + a2k+1 102k . Since y 2 y = 10k z for an iteger z, it follows that
x2 x is divisible by 10k+1 if and only if z + ak+1 (2y 1)  0 (mod 10). Since y  3 (mod 10) is obviously
impossible, the congruence has exactly one solution. Hence we obtain a one-to-one correspondence between
the sets Sk+1 and Sk for every k ≥ 1. Therefore s (2006) = s (1) = 3, because S1 = {1, 5, 6} .
Solution 2. Since x2 x = x(x 1) and the numbers x and x 1 are relatively prime, one of them must
be divisible by 22006 and one of them (may be the same) must be divisible by 52006 . Therefore, x must
satisfy the following two conditions:

x  0 or 1 (mod 22006 );

x  0 or 1 (mod 52006 ).
Altogether we have 4 cases. The Chinese remainder theorem yields that in each case there is a unique
solution among the numbers 0, 1, . . . , 102006 1. These four numbers are different because each two gives
different residues modulo 22006 or 52006 . Moreover, one of the numbers is 0 which is not allowed.
Therefore there exist 3 solutions.

Problem 3. Let A be an n  n-matrix with integer entries and b1 , . . . , bk be integers satisfying det A =
b1  . . .  bk . Prove that there exist n  n-matrices B1 , . . . , Bk with integer entries such that A = B1  . . .  Bk
and det Bi = bi for all i = 1, . . . , k.
(20 points)
Solution. By induction, it is enough to consider the case m = 2. Furthermore, we can multiply A with
any integral matrix with determinant 1 from the right or from the left, without changing the problem.
Hence we can assume A to be upper triangular.

1
Lemma. Let A be an integral upper triangular matrix, and let b, c be integers satisfying det A = bc. Then
there exist integral upper triangular matrices B, C such that det B = b, det C = c, A = BC.
Proof. The proof is done by induction on n, the case n = 1 being obvious. Assume the statement is true
for n 1. Let A, b, c as in the statement of the lemma. Define Bnn to be the greatest common divisor of b
Ann
and Ann , and put Cnn = B nn
. Since Ann divides bc, Cnn divides Bbnn c, which divides c. Hence Cnn divides
c. Therefore, b0 = Bbnn and c0 = Cnn c
are integers. Define A0 to be the upper-left (n 1)  (n 1)-submatrix
of A; then det A0 = b0 c0 . By induction we can find the upper-left (n 1)  (n 1)-part of B and C in such
a way that det B = b, det C = c and A = BC holds on the upper-left (n 1)  (n 1)-submatrix of A. It
remains to define Bi,n and Ci,n such that A = BC also holds for the (i, n)-th entry for all i < n.
First we check that Bii and Cnn are relatively prime for all i < n. Since Bii divides b0 , it is certainly
enough to prove that b0 and Cnn are relatively prime, i.e.
 
b Ann
gcd , = 1,
gcd(b, Ann ) gcd(b, Ann )

which is obvious. Now we define Bj,n and Cj,n inductively: Suppose we have defined Bi,n and Ci,n for all
i = j + 1, j + 2, . . . , n 1. Then Bj,n and Cj,n have to satisfy

Aj,n = Bj,j Cj,n + Bj,j+1 Cj+1,n +    + Bj,n Cn,n

Since Bj,j and Cn,n are relatively prime, we can choose integers Cj,n and Bj,n such that this equation is
satisfied. Doing this step by step for all j = n 1, n 2, . . . , 1, we finally get B and C such that A = BC.
2

Problem 4. Let f be a rational function (i.e. the quotient of two real polynomials) and suppose that
f (n) is an integer for infinitely many integers n. Prove that f is a polynomial.
(20 points)
Solution. Let S be an infinite set of integers such that rational function f (x) is integral for all x ∈ S.
Suppose that f (x) = p(x)/q(x) where p is a polynomial of degree k and q is a polynomial of degree n.
Then p, q are solutions to the simultaneous equations p(x) = q(x)f (x) for all x ∈ S that are not roots of
q. These are linear simultaneous equations in the coefficients of p, q with rational coefficients. Since they
have a solution, they have a rational solution.
Thus there are polynomials p0 , q 0 with rational coefficients such that p0 (x) = q 0 (x)f (x) for all x ∈ S that
are not roots of q. Multiplying this with the previous equation, we see that p0 (x)q(x)f (x) = p(x)q 0 (x)f (x)
for all x ∈ S that are not roots of q. If x is not a root of p or q, then f (x) 6= 0, and hence p0 (x)q(x) =
p(x)q 0 (x) for all x ∈ S except for finitely many roots of p and q. Thus the two polynomials p0 q and pq 0
are equal for infinitely many choices of value. Thus p0 (x)q(x) = p(x)q 0 (x). Dividing by q(x)q 0 (x), we see
that p0 (x)/q 0 (x) = p(x)/q(x) = f (x). Thus f (x) can be written as the quotient of two polynomials with
rational coefficients. Multiplying up by some integer, it can be written as the quotient of two polynomials
with integer coefficients.
Suppose f (x) = p00 (x)/q 00 (x) where p00 and q 00 both have integer coefficients. Then by Euler’s division
algorithm for polynomials, there exist polynomials s and r, both of which have rational coefficients such
that p00 (x) = q 00 (x)s(x) + r(x) and the degree of r is less than the degree of q 00 . Dividing by q 00 (x), we get
that f (x) = s(x) + r(x)/q 00 (x). Now there exists an integer N such that N s(x) has integral coefficients.
Then N f (x) N s(x) is an integer for all x ∈ S. However, this is equal to the rational function N r/q 00 ,
which has a higher degree denominator than numerator, so tends to 0 as x tends to ∞. Thus for all
sufficiently large x ∈ S, N f (x) N s(x) = 0 and hence r(x) = 0. Thus r has infinitely many roots, and is
0. Thus f (x) = s(x), so f is a polynomial.

Problem 5. Let a, b, c, d, e > 0 be real numbers such that a2 + b2 + c2 = d2 + e2 and a4 + b4 + c4 = d4 + e4 .


Compare the numbers a3 + b3 + c3 and d3 + e3 .
(20 points)

2
Solution. Without loss of generality a ≥ b ≥ c, d ≥ e. Let c2 = e2 + ∆, ∆ ∈ R. Then d2 = a2 + b2 + ∆
and the second equation implies
a2 b 2
a4 + b4 + (e2 + ∆)2 = (a2 + b2 + ∆)2 + e4 , ∆ = a2 +b 2 −e2 .
2 2 2 2 2 2 2 1 2 2 1 2 2
(Here a + b e ≥ 3 (a + b + c ) 2 (d + e ) = 6 (d + e ) > 0.)
2 2 a2 b 2 (a2 −e2 )(e2 −b2 )
Since c = e 2 2
a +b −e 2 = a2 +b2 −e2
> 0 then a > e > b.
2 2 2 a2 b 2 2
Therefore d = a + b a2 +b2 −e2
< a and a > d ≥ e > b ≥ c.
Consider a function f (x) = ax + bx + cx dx ex , x ∈ R. We shall prove that f (x) has only two
zeroes x = 2 and x = 4 and changes the sign at these points. Suppose the contrary. Then Rolle’s
theorem implies that f 0 (x) has at least two distinct zeroes. Without loss of generality a = 1. Then
f 0 (x) = ln b  bx + ln c  cx ln d  dx ln e  ex , x ∈ R. If f 0 (x1 ) = f 0 (x2 ) = 0, x1 < x2 , then
ln b  bxi + ln c  cxi = ln d  dxi + ln e  exi , i = 1, 2,
but since 1 > d ≥ e > b ≥ c we have
( ln b)  bx2 + ( ln c)  cx2 x2 −x1 x2 −x1 ( ln d)  dx2 + ( ln e)  ex2
≤ b < e ≤ ,
( ln b)  bx1 + ( ln c)  cx1 ( ln d)  dx1 + ( ln e)  ex1
a contradiction. Therefore f (x) has a constantS sign at each of the intervals ( ∞, 2), (2, 4) and (4, ∞).
Since f (0) = 1 then f (x) > 0, x ∈ ( ∞, 2) (4, ∞) and f (x) < 0, x ∈ (2, 4). In particular, f (3) =
a3 + b3 + c3 d3 e3 < 0.
Problem 6. Find all sequences a0 , a1 , . . . , an of real numbers where n ≥ 1 and an 6= 0, for which the
following statement is true:
If f : R → R is an n times differentiable function and x0 < x1 < . . . < xn are real numbers such that
f (x0 ) = f (x1 ) = . . . = f (xn ) = 0 then there exists an h ∈ (x0 , xn ) for which
a0 f (h) + a1 f 0 (h) + . . . + an f (n) (h) = 0.
(20 points)
Solution. Let A(x) = a0 + a1 x + . . . + an xn . We prove that sequence a0 , . . . , an satisfies the required
property if and only if all zeros of polynomial A(x) are real.
(a) Assume that all roots of A(x) are real. Let us use the following notations. Let I be the identity
operator on R → R functions and D be differentiation operator. For an arbitrary polynomial P (x) =
p0 + p1 x + . . . + pn xn , write P (D) = p0 I + p1 D + p2 D 2 + . . . + pn D n . Then the statement can written as
(A(D)f )(ξ) = 0.
First prove the statement for n = 1. Consider the function
a0
x
g(x) = e a1 f (x).
Since g(x0 ) = g(x1 ) = 0, by Rolle’s theorem there exists a ξ ∈ (x0 , x1 ) for which
a0
ξ
a 0 a0 ξ a0
ξ e a1
0
g (ξ) = e a1 f (ξ) + e a1 f 0 ξ) = (a0 f (ξ) + a1 f 0 (ξ)) = 0.
a1 a1
Now assume that n > 1 and the statement holds for n 1. Let A(x) = (x c)B(x) where c is a real root
of polynomial A. By the n = 1 case, there exist y0 ∈ (x0 , x1 ), y1 ∈ (x1 , x2 ), . . . , yn−1 ∈ (xn−1 , xn ) such that
f 0 (yj ) cf (yj ) = 0 for all j = 0, 1, . . . , n 1. Now apply the induction hypothesis for polynomial B(x),
function g = f 0 cf and points y0 , . . . , yn−1 . The hypothesis says that there exists a ξ ∈ (y0 , yn−1 )  (x0 , xn )
such that
(B(D)g)(ξ) = (B(D)(D cI)f )(ξ) = (A(D)f )(ξ) = 0.
(b) Assume that u + vi is a complex root of polynomial A(x) such that v 6= 0. Consider the linear
differential equation an g (n) + . . . + a1 g 0 + g = 0. A solution of this equation is g1 (x) = eux sin vx which has
infinitely many zeros.
Let k be the smallest index for which ak 6= 0. Choose a small ε > 0 and set f (x) = g1 (x) + εxk . If
ε is sufficiently small then g has the required number of roots but a0 f + a1 f 0 + . . . + an f (n) = ak ε 6= 0
everywhere.

3
13th International Mathematics Competition for University Students
Odessa, July 20-26, 2006
Second Day

Problem 1. Let V be a convex polygon with n vertices.


(a) Prove that if n is divisible by 3 then V can be triangulated (i.e. dissected into non-overlapping
triangles whose vertices are vertices of V ) so that each vertex of V is the vertex of an odd number
of triangles.
(b) Prove that if n is not divisible by 3 then V can be triangulated so that there are exactly two
vertices that are the vertices of an even number of the triangles.
(20 points)
Solution. Apply induction on n. For the initial cases n = 3, 4, 5, chose the triangulations shown in
the Figure to prove the statement.
odd even odd odd

odd odd

odd odd odd even even even

Now assume that the statement is true for some n = k and consider the case n = k + 3. Denote
the vertices of V by P1 , . . . , Pk+3 . Apply the induction hypothesis on the polygon P1 P2 . . . Pk ; in this
triangulation each of vertices P1 , . . . , Pk belong to an odd number of triangles, except two vertices
if n is not divisible by 3. Now add triangles P1 Pk Pk+2 , Pk Pk+1 Pk+2 and P1 Pk+2 Pk+3 . This way we
introduce two new triangles at vertices P1 and Pk so parity is preserved. The vertices Pk+1 , Pk+2 and
Pk+3 share an odd number of triangles. Therefore, the number of vertices shared by even number of
triangles remains the same as in polygon P1 P2 . . . Pk .
Pk Pk −1
Pk −2
Pk +1

Pk +2

Pk +3
P3
P1 P2


Problem 2. Find all functions f : R → R such that for any real numbers a < b, the image f [a, b]
is a closed interval of length b a.
(20 points)

1
Solution. The functions f (x) = x + c and f (x) = x + c with some constant c obviously satisfy
the condition of the problem. We will prove now that these are the only functions with the desired
property.
Let f be such a function. Then f clearly satisfies |f (x) f (y)| ≤ |x y| for all x, y; therefore, f
is continuous. Given x, y with x < y, let a, b ∈ [x, y] be such that f (a) is the maximum and f (b) is
the minimum of f on [x, y]. Then f ([x, y]) = [f (b), f (a)]; hence
y x = f (a) f (b) ≤ |a b| ≤ y x
This implies {a, b} = {x, y}, and therefore f is a monotone function. Suppose f is increasing. Then
f (x) f (y) = x y implies f (x) x = f (y) y, which says that f (x) = x + c for some constant c.
Similarly, the case of a decreasing function f leads to f (x) = x + c for some constant c.
Problem 3. Compare tan(sin x) and sin(tan x) for all x ∈ (0, π2 ).
(20 points)
Solution. Let f (x) = tan(sin x) sin(tan x). Then
cos x cos(tan x) cos3 x cos(tan x)  cos2 (sin x)
f 0 (x) = =
cos2 (sin x) cos2 x cos2 x  cos2 (tan x)
Let 0 < x < arctan π2 . It follows from the concavity of cosine on (0, π2 ) that
 
p3 2
1 tan x + 2 sin x
cos(tan x)  cos (sin x) < [cos(tan x) + 2 cos(sin x)] ≤ cos < cos x ,
3 3
 tan x+2 sin x 0  1  q
the last inequality follows from 3
1
= 3 cos2 x + 2 cos x ≥ 3 cos12 x  cos x  cos x = 1. This
proves that cos3 x cos(tan x)cos2 (sin x) > 0, so f 0 (x) > 0, so f increases on the interval [0, arctan π2 ].
To end the proof it is enough to notice that (recall that 4 + π 2 < 16)
h  π i π/2 π
tan sin arctan = tan p > tan = 1 .
2 2
1 + π /4 4
This implies that if x ∈ [arctan π2 , π2 ] then tan(sin x) > 1 and therefore f (x) > 0.
Problem 4. Let v0 be the zero vector in Rn and let v1 , v2 , . . . , vn+1 ∈ Rn be such that the Euclidean
norm |vi vj | is rational for every 0 ≤ i, j ≤ n + 1. Prove that v1 , . . . , vn+1 are linearly dependent
over the rationals.
(20 points)
Solution. By passing to a subspace we can assume that v1 , . . . , vn are linearly independent over the
reals. Then there exist λ1 , . . . , λn ∈ R satisfying
n
X
vn+1 = λj v j
j=1

We shall prove that λj is rational for all j. From


2 hvi , vj i = |vi v j |2 |vi |2 |vj |2
we get that hvi , vj i is rational for all i, j. Define A to be the rational n  n-matrix Aij = hvi , vj i,
w ∈ Qn to be the vector wi = hvi , vn+1 i, and λ ∈ Rn to be the vector (λi )i . Then,
n
X
hvi , vn+1 i = λj hvi , vj i
j=1

gives Aλ = w. Since v1 , . . . , vn are linearly independent, A is invertible. The entries of A−1 are
rationals, therefore λ = A−1 w ∈ Qn , and we are done.

2
Problem 5. Prove that there exists an infinite number of relatively prime pairs (m, n) of positive
integers such that the equation
(x + m)3 = nx
has three distinct integer roots.
(20 points)
Solution. Substituting y = x + m, we can replace the equation by

y3 ny + mn = 0.

Let two roots be u and v; the third one must be w = (u + v) since the sum is 0. The roots must
also satisfy
uv + uw + vw = (u2 + uv + v 2 ) = n, i.e. u2 + uv + v 2 = n
and
uvw = uv(u + v) = mn.
So we need some integer pairs (u, v) such that uv(u + v) is divisible by u2 + uv + v 2 . Look for such
pairs in the form u = kp, v = kq. Then

u2 + uv + v 2 = k 2 (p2 + pq + q 2 ),

and
uv(u + v) = k 3 pq(p + q).
uv(u + v)
Chosing p, q such that they are coprime then setting k = p2 + pq + q 2 we have =
u2 + uv + v 2
p2 + pq + q 2 .
Substituting back to the original quantites, we obtain the family of cases

n = (p2 + pq + q 2 )3 , m = p2 q + pq 2 ,

and the three roots are


x1 = p 3 , x2 = q 3 , x3 = (p + q)3 .

Problem 6. Let Ai , Bi , Si (i = 1, 2, 3) be invertible real 2  2 matrices such that


(1) not all Ai have a common real eigenvector;
(2) Ai = Si−1 Bi Si for all i 
= 1, 2,3;
1 0
(3) A1 A2 A3 = B1 B2 B3 = .
0 1
Prove that there is an invertible real 2  2 matrix S such that Ai = S −1 Bi S for all i = 1, 2, 3.
(20 points)
Solution. We note that the problem is trivial if Aj = λI for some j, so suppose this is not the case.
Consider then first the situation
 where some Aj , say A3 , has two distinct real eigenvalues.  We may
0 0
assume that A3 = B3 = λ µ by conjugating both sides. Let A2 = ( ac db ) and B2 = ac0 db0 . Then

a + d = Tr A2 = Tr B2 = a0 + d0
aλ + dµ = Tr(A2 A3 ) = Tr A−1
1 = Tr B1−1 = Tr(B2 B3 ) = a0 λ + d0 µ.

Hence a = a0 and d = d0 and so also bc = b0 c0 . Now we cannot have c = 0 or b = 0, for then (1, 0)> or
0
(0, 1)> would be a common eigenvector of all Aj . The matrix S = ( c c ) conjugates A2 = S −1 B2 S,
and as S commutes with A3 = B3 , it follows that Aj = S −1 Bj S for all j.

3
If the distinct eigenvalues of A3 = B3 are not real, we know from above that Aj = S −1 Bj S for
some S ∈ GL2 C unless all Aj have a common eigenvector over C. Even if they do, say Aj v = λj v,
by taking the conjugate square  root it follows that Aj ’s can be simultaneously diagonalized. If
A2 = ( a d ) and B2 = ac0 db0 , it follows as above that a = a0 , d = d0 and so b0 c0 = 0. Now B2
0 0

and B3 (and hence B1 too) have a common eigenvector over C so they too can be simultaneously
diagonalized. And so SAj = Bj S for some S ∈ GL2 C in either case. Let S0 = Re S and S1 = Im S.
By separating the real and imaginary components,  we are done if either S0 or S1 is invertible. If not,
x 0
S0 may be conjugated to some T S0 T = y 0 , with (x, y) 6= (0, 0)> , and it follows that all Aj
−1 >

have a common eigenvector T (0, 1)> , a contradiction.


We are left with the case when no Aj has distinct eigenvalues; then these eigenvalues by necessity
are real. By conjugation and division by scalars we may assume that A3 = ( 1 1b ) and b 6= 0. By further
conjugation by upper-triangular matrices (which preserves the shape of A3 up to the value of b) we can 
0 u 2 2 −1 −1 −(b+v)/u 1
also assume that A2 = ( 1 v ). Here v = Tr A2 = 4 det A2 = 4u. Now A1 = A3 A2 = 1/u ,
and hence (b + v)2 /u2 = Tr2 A1 = 4 det A1 = 4/u. Comparing these two it follows that b = 2v.
What we have done is simultaneously reduced all Aj to matrices whose all entries depend on u and
v (= det A2 and Tr A2 , respectively) only, but these themselves are invariant under similarity. So
Bj ’s can be simultaneously reduced to the very same matrices.

4
IMC2007, Blagoevgrad, Bulgaria
Day 1, August 5, 2007

Problem 1. Let f be a polynomial of degree 2 with integer coefficients. Suppose that f (k) is divisible
by 5 for every integer k. Prove that all coefficients of f are divisible by 5.
Solution 1. Let f (x) = ax2 + bx + c. Substituting x = 0, x = 1 and x = −1, we obtain that 5|f (0) = c,
5|f (1) = (a + b + c) and 5|f (−1) = (a − b + c). Then 5|f (1) + f (−1) − 2f (0) = 2a and 5|f (1) − f (−1) = 2b.
Therefore 5 divides 2a, 2b and c and the statement follows.
Solution 2. Consider f (x) as a polynomial over the 5-element field (i.e. modulo 5). The polynomial has
5 roots while its degree is at most 2. Therefore f ≡ 0 (mod 5) and all of its coefficients are divisible by 5.

Problem 2. Let n ≥ 2 be an integer. What is the minimal and maximal possible rank of an n × n matrix
whose n2 entries are precisely the numbers 1, 2, . . . , n2 ?
Solution. The minimal rank is 2 and the maximal rank is n. To prove this, we have to show that the rank
can be 2 and n but it cannot be 1.
(i) The rank is at least 2. Consider an arbitrary matrix A = [aij ] with entries 1, 2, . . . , n2 in some
order. Since permuting rows or columns of a matrix does not change its rank, we can assume that
1 = a11 < a21 < · · · < an1 and a11 < a12 <
 · · · < a1n . Hence an1 ≥ n and a1n ≥ n and at
 least one of these
a11 a1n a a
inequalities is strict. Then det < 1 · n2 − n · n = 0 so rk(A) ≥ rk 11 1n ≥ 2.
an1 ann an1 ann
(ii) The rank can be 2. Let
 
1 2 ... n
 n+1 n+2 . . . 2n
 
T = .. .. .. .. 
 . . . . 
n − n + 1 n − n + 2 . . . n2
2 2

The ith row is (1, 2, . . . , n) + n(i − 1) · (1, 1, . . . , 1) so each row is in the two-dimensional subspace generated
by the vectors (1, 2, . . . , n) and (1, 1, . . . , 1). We already proved that the rank is at least 2, so rk(T ) = 2.
(iii) The rank can be n, i.e. the matrix can be nonsingular. Put odd numbers into the diagonal,
only even numbers above the diagonal and arrange the entries under the diagonal arbitrarily. Then the
determinant of the matrix is odd, so the rank is complete.

Problem 3. Call a polynomial P (x1 , . . . , xk ) good if there exist 2 × 2 real matrices A1 , . . . , Ak such that
!
Xk
P (x1 , . . . , xk ) = det xi Ai .
i=1

Find all values of k for which all homogeneous polynomials with k variables of degree 2 are good.
(A polynomial is homogeneous if each term has the same total degree.)
Solution. The possible values for k are 1 and 2.  
If k = 1 then P (x) = αx2 and we can choose A1 = 10 α0 .
   
2 2 1 0 0 β
If k = 2 then P (x, y) = αx + βy + γxy and we can choose matrices A1 = 0 α and A2 = −1 γ .
P
k
Now let k ≥ 3. We show that the polynomial P (x1 , . . . , xk ) = x2i is not good. Suppose that
k  i=0
P
P (x1 , . . . , xk ) = det xi Ai . Since the first columns of A1 , . . . , Ak are linearly dependent, the first
i=0

1
column of some non-trivial linear combination y1 A1 + . . . + yk Ak is zero. Then det(y1A1 + . . . + yk Ak ) = 0
but P (y1, . . . , yk ) 6= 0, a contradiction.

Problem 4. Let G be a finite group. For arbitrary sets U, V, W ⊂ G, denote by NU V W the number of
triples (x, y, z) ∈ U × V × W for which xyz is the unity.
Suppose that G is partitioned into three sets A, B and C (i.e. sets A, B, C are pairwise disjoint and
G = A ∪ B ∪ C). Prove that NABC = NCBA .
Solution. We start with three preliminary observations.
Let U, V be two arbitrary subsets of G. For each x ∈ U and y ∈ V there is a unique z ∈ G for which
xyz = e. Therefore,
NU V G = |U × V | = |U| · |V |. (1)
Second, the equation xyz = e is equivalent to yzx = e and zxy = e. For arbitrary sets U, V, W ⊂ G, this
implies

{(x, y, z) ∈ U ×V ×W : xyz = e} = {(x, y, z) ∈ U ×V ×W : yzx = e} = {(x, y, z) ∈ U ×V ×W : zxy = e}

and therefore
NU V W = NV W U = NW U V . (2)
Third, if U, V ⊂ G and W1 , W2 , W3 are disjoint sets and W = W1 ∪ W2 ∪ W3 then, for arbitrary U, V ⊂ G,

{(x, y, z) ∈ U × V × W : xyz = e} = {(x, y, z) ∈ U × V × W1 : xyz = e}∪

∪{(x, y, z) ∈ U × V × W2 : xyz = e} ∪ {(x, y, z) ∈ U × V × W3 : xyz = e}


so
NU V W = NU V W1 + NU V W2 + NU V W3 . (3)
Applying these observations, the statement follows as

NABC = NABG − NABA − NABB = |A| · |B| − NBAA − NBAB =

= NBAG − NBAA − NBAB = NBAC = NCBA .

Problem 5. Let n be a positive integer and a1 , . . . , an be arbitrary integers. Suppose that a function
X
n
f : Z → R satisfies f (k + ai ℓ) = 0 whenever k and ℓ are integers and ℓ 6= 0. Prove that f = 0.
i=1
Solution. Let us define a subset I of the polynomial ring R[X] as follows:
n X
m X
m o
j
I = P (X) = bj X : bj f (k + jℓ) = 0 for all k, ℓ ∈ Z, ℓ 6= 0 .
j=0 j=0

This is a subspace of the real vector space R[X]. Furthermore, P (X)P∈ I implies X · P (X) ∈ I. Hence,
n ai
I is an ideal, and it is non-zero, because the polynomial R(X) = i=1 X belongs to I. Thus, I is
generated (as an ideal) by some non-zero polynomial Q.
If Q is constant then the definition of I implies f = 0, so we can assume that Q has a complex zero c.
Again, by the definition of I, the polynomial Q(X m ) belongs to I for every natural number m ≥ 1; hence
Q(X) divides Q(X m ). This shows that all the complex numbers

c, c2 , c3 , c4 , . . .

are roots of Q. Since Q can have only finitely many roots, we must have cN = 1 for some N ≥ 1; in
particular, Q(1) = 0, which implies P (1) = 0 for all P ∈ I. This contradicts the fact that R(X) =
P n ai
i=1 X ∈ I, and we are done.

2
Problem 6. How many nonzero coefficients can a polynomial P (z) have if its coefficients are integers
and |P (z)| ≤ 2 for any complex number z of unit length?
Solution. We show that the number of nonzero coefficients can be 0, 1 and 2. These values are possible,
for example the polynomials P0 (z) = 0, P1 (z) = 1 and P2 (z) = 1 + z satisfy the conditions and they have
0, 1 and 2 nonzero terms, respectively.
Now consider an arbitrary polynomial P (z) = a0 + a1 z + . . .+ an z n satisfying the conditions and assume
that it has at least two nonzero coefficients. Dividing the polynomial by a power of z and optionally
replacing p(z) by −p(z), we can achieve a0 > 0 such that conditions are not changed and the number of
nonzero terms is preserved. So, without loss of generality, we can assume that a0 > 0.
Let Q(z) = a1 z + . . . + an−1 z n−1 . Our goal is to show that Q(z) = 0.
Consider those complex numbers w0 , w1 , . . . , wn−1 on the unit circle for which an wkn = |an |; namely, let
(
e2kπi/n if an > 0
wk = (2k+1)πi/n
(k = 0, 1, . . . , n).
e if an < 0

Notice that
X
n−1 X
n−1 X
n−1 X
n−1
Q(wk ) = Q(w0 e2kπi/n ) = aj w0j (e2jπi/n )k = 0.
k=0 k=0 j=1 k=0

Taking the average of polynomial P (z) at the points wk , we obtain

1X 1X 
n−1 n−1
P (wk ) = a0 + Q(wk ) + an wkn = a0 + |an |
n k=0 n k=0

and
X
n−1
X
n−1
1 1
2≥ P (wk ) ≥ P (wk ) = a0 + |an | ≥ 2.
n k=0 n
k=0

This obviously implies a0 = |an | = 1 and P (wk ) = 2 + Q(wk ) = 2 for all k. Therefore, all values of
Q(wk ) must lie on the circle |2 + z| = 2, while their sum is 0. This is possible only if Q(wk ) = 0 for all k.
Then polynomial Q(z) has at least n distinct roots while its degree is at most n − 1. So Q(z) = 0 and
P (z) = a0 + an z n has only two nonzero coefficients.
Remark. From Parseval’s formula (i.e. integrating |P (z)|2 = P (z)P (z) on the unit circle) it can be
obtained that Z 2π Z 2π
1 1
2 2
|a0 | + . . . + |an | = it 2
P (e ) dt ≤ 4 dt = 4. (4)
2π 0 2π 0
Hence, there cannot be more than four nonzero coefficients, and if there are more than one nonzero term,
then their coefficients are ±1.
It is also easy to see that equality in (4) cannot hold two or more nonzero coefficients, so it is sufficient
to consider only polynomials of the form 1 ± xm ± xn . However, we do not know (yet :-)) any simpler
argument for these cases than the proof above.

3
IMC2007, Blagoevgrad, Bulgaria
Day 2, August 6, 2007

Problem 1. Let f : R → R be a continuous function. Suppose that for any c > 0, the graph
of f can be moved to the graph of cf using only a translation or a rotation. Does this imply that
f (x) = ax + b for some real numbers a and b ?
Solution. No. The function f (x) = ex also has this property since cex = ex+log c .
Problem 2. Let x, y, and z be integers such that S = x4 + y 4 + z 4 is divisible by 29. Show that S
is divisible by 294 .
Solution. We claim that 29 | x, y, z. Then, x4 + y 4 + z 4 is clearly divisible by 294 .
Assume, to the contrary, that 29 does not divide all of the numbers x, y, z. Without loss of
generality, we can suppose that 29 ∤ x. Since the residue classes modulo 29 form a field, there is some
w ∈ Z such that xw ≡ 1 (mod 29). Then, (xw)4 + (yw)4 + (zw)4 is also divisible by 29. So we can
assume that x ≡ 1 (mod 29).
Thus, we need to show that y 4 + z 4 ≡ −1 (mod 29), i.e. y 4 ≡ −1 − z 4 (mod 29), is impossible.
There are only eight fourth powers modulo 29,

0 ≡ 04 ,
1 ≡ 14 ≡ 124 ≡ 174 ≡ 284 (mod 29),
7 ≡ 84 ≡ 94 ≡ 204 ≡ 214 (mod 29),
16 ≡ 24 ≡ 54 ≡ 244 ≡ 274 (mod 29),
20 ≡ 64 ≡ 144 ≡ 154 ≡ 234 (mod 29),
23 ≡ 34 ≡ 74 ≡ 224 ≡ 264 (mod 29),
24 ≡ 44 ≡ 104 ≡ 194 ≡ 254 (mod 29),
25 ≡ 114 ≡ 134 ≡ 164 ≡ 184 (mod 29).

The differences −1 − z 4 are congruent to 28, 27, 21, 12, 8, 5, 4, and 3. None of these residue classes
is listed among the fourth powers.
Problem 3. Let C be a nonempty closed bounded subset of the real line and f : C → C be a
nondecreasing continuous function. Show that there exists a point p ∈ C such that f (p) = p.
(A set is closed if its complement is a union of open intervals. A function g is nondecreasing if
g(x) ≤ g(y) for all x ≤ y.)
Solution. Suppose f (x) 6= x for all x ∈ C. Let [a, b] be the smallest closed interval that contains C.
Since C is closed, a, b ∈ C. By our hypothesis f (a) > a and f (b) < b. Let p = sup{x ∈ C : f (x) > x}.
Since C is closed and f is continuous, f (p) ≥ p, so f (p) > p. For all x > p, x ∈ C we have f (x) < x.
Therefore f f (p) < f (p) contrary to the fact that f is non-decreasing.
Problem 4. Let n > 1 be an odd positive integer and A = (aij )i,j=1...n be the n × n matrix with


2 if i = j
aij = 1 if i − j ≡ ±2 (mod n)


0 otherwise.

Find det A.

1

2 1 if i − j ≡ ±1 (mod n)
Solution. Notice that A = B , with bij = . So it is sufficient to find
0 otherwise
det B.
To find det B, expand the determinant with respect to the first row, and then expad both terms
with respect to the first column.

0 1 1
1 1 1 0 1
1 0 1
0 1 1 0 1
1 0 1
.. .. .. ..
. . 1 . . 1 . .
det B = 1 .. .. = − .. + ..
. . 0 1 . 0 1
.. 0 1
1 0 1 1 0
1 0 1
1 1 0 1 1
1 1 0
   
0 1 1 1 0 1 0 1

 . . . . . . 0 1   .. .. 1 0 1 
 1   1 . . 
 . .   . ..
. 
= −  . . . 0 1 − 1 . . . .  
+ . . . 0 1 − 1 . . 
 .   .. 
 1 0 1 . . 0 1   1 0 . 0 1 

1 0 1 0 1 1 1 0
= −(0 − 1) + (1 − 0) = 2,

since the second and the third matrices are lower/upper triangular, while in the first and the fourth
matrices we have row1 − row3 + row5 − · · · ± rown−2 = 0̄.
So det B = 2 and thus det A = 4.
Problem 5. For each positive integer k, find the smallest number nk for which there exist real
nk × nk matrices A1 , A2 , . . . , Ak such that all of the following conditions hold:

(1) A21 = A22 = . . . = A2k = 0,

(2) Ai Aj = Aj Ai for all 1 ≤ i, j ≤ k, and

(3) A1 A2 . . . Ak 6= 0.

Solution. The anwser is nk = 2k . In that case, the matrices can be constructed as follows: Let V be
the n-dimensional real vector space with basis elements [S], where S runs through all n = 2k subsets
of {1, 2, . . . , k}. Define Ai as an endomorphism of V by
(
0 if i ∈ S
Ai [S] =
[S ∪ {i}] if i 6∈ S

for all i = 1, 2, . . . , k and S ⊂ {1, 2, . . . , k}. Then A2i = 0 and Ai Aj = Aj Ai . Furthermore,

A1 A2 . . . Ak [∅] = [{1, 2, . . . , k}],

and hence A1 A2 . . . Ak 6= 0.
Now let A1 , A2 , . . . , Ak be n × n matrices satisfying the conditions of the problem; we prove that
n ≥ 2k . Let v be a real vector satisfying A1 A2 . . . Ak v 6= 0. Denote by P the set of all subsets of
{1, 2, . . . , k}. Choose a complete ordering ≺ on P with the property

X≺Y ⇒ |X| ≤ |Y | for all X, Y ∈ P.

2
For every element X = {x1 , x2 , . . . , xr } ∈ P, define AX = Ax1 Ax2 . . . Axr and vX = AX v. Finally,
write X̄ = {1, 2, . . . , k} \ X for the complement of X.
Now take X, Y ∈ P with X  Y . Then AX̄ annihilates vY , because X  Y implies the existence
of some y ∈ Y \ X = Y ∩ X̄, and

AX̄ vY = AX̄\{y} Ay Ay vY \{y} = 0,

since A2y = 0. So, AX̄ annihilates the span of all the vY with X  Y . This implies that vX does not
lie in this span, because AX̄ vX = v{1,2,...,k} 6= 0. Therefore, the vectors vX (with X ∈ P) are linearly
independent; hence n ≥ |P| = 2k .
Problem 6. Let f 6= 0 be a polynomial with real coefficients. Define the sequence f0 , f1 , f2 , . . . of
polynomials by f0 = f and fn+1 = fn + fn′ for every n ≥ 0. Prove that there exists a number N such
that for every n ≥ N, all roots of fn are real.
Solution. For the proof, we need the following
Lemma 1. For any polynomial g, denote by d(g) the minimum distance of any two of its real
zeros (d(g) = ∞ if g has at most one real zero). Assume that g and g + g ′ both are of degree k ≥ 2
and have k distinct real zeros. Then d(g + g ′) ≥ d(g).
Proof of Lemma 1: Let x1 < x2 < · · · < xk be the roots of g. Suppose a, b are roots of g + g ′
satisfying 0 < b − a < d(g). Then, a, b cannot be roots of g, and

g ′ (a) g ′ (b)
= = −1. (1)
g(a) g(b)

Since gg is strictly decreasing between consecutive zeros of g, we must have a < xj < b for some j.
For all i = 1, 2, . . . , k − 1 we have xi+1 − xi > b − a, hence a − xi > b − xi+1 . If i < j, both sides
1
of this inequality are negative; if i ≥ j, both sides are positive. In any case, a−x i
< b−x1i+1 , and hence

g ′ (a) X 1 X
k−1 k−1
1 1 1 g ′ (b)
= + < + =
a − xi a − xk b − xi+1 b − x1
| {z } i=1 | {z }
g(a) i=1
g(b)
<0 >0

This contradicts (1).


Now we turn to the proof of the stated problem. Denote by m the degree of f . We will prove
by induction on m that fn has m distinct real zeros for sufficiently large n. The cases m = 0, 1 are
trivial; so we assume m ≥ 2. Without loss of generality we can assume that f is monic. By induction,
the result holds for f ′ , and by ignoring the first few terms we can assume that fn′ has m − 1 distinct
(n) (n) (n)
real zeros for all n. Let us denote these zeros by x1 > x2 > · · · > xm−1 . Then fn has minima
(n) (n) (n) (n) (n) (n) (n) (n)
in x1 , x3 , x5 , . . . , and maxima in x2 , x4 , x6 , . . . . Note that in the interval (xi+1 , xi ), the
function fn+1 ′
= fn′ + fn′′ must have a zero (this follows by applying Rolle’s theorem to the function
(n)
ex fn′ (x)); the same is true for the interval (−∞, xm−1 ). Hence, in each of these m − 1 intervals, fn+1

has exactly one zero. This shows that


(n) (n+1) (n) (n+1) (n) (n+1)
x1 > x1 > x2 > x2 > x3 > x3 > ... (2)

(n) (n)
Lemma 2. We have limn→∞ fn (xj ) = −∞ if j is odd, and lim fn (xj ) = +∞ if j is even.
n→∞
Lemma 2 immediately implies the result: For sufficiently large n, the values of all maxima of fn
are positive, and the values of all minima of fn are negative; this implies that fn has m distinct zeros.

3
Proof of Lemma 2: Let d = min{d(f ′), 1}; then by Lemma 1, d(fn′ ) ≥ d for all n. Define
(m − 1)dm−1
ε= ; we will show that
mm−1
(n+1) (n)
fn+1 (xj ) ≥ fn (xj ) + ε for j even. (3)
(n)
(The corresponding result for odd j can be shown similarly.) Do to so, write f = fn , b = xj , and
choose a satisfying d ≤ b − a ≤ 1 such that f ′ has no zero inside (a, b). Define ξ by the relation
1
b − ξ = (b − a); then ξ ∈ (a, b). We show that f (ξ) + f ′ (ξ) ≥ f (b) + ε.
m
Notice, that

f ′′ (ξ) X
m−1
1
= (n)
f (ξ)

i=1 ξ − xi
X 1 1 X 1
= (n)
+ +
i<j ξ − xi
ξ − b i>j ξ − x(n)
| {z } | {z i }
1
< ξ−a <0

1 1
< (m − 1) + = 0.
ξ−a ξ−b
f ′′
The last equality holds by definition of ξ. Since f ′ is positive and is decreasing in (a, b), we have
f′
that f ′′ is negative on (ξ, b). Therefore,
Z b Z b
f (b) − f (ξ) = f (t)dt ≤

f ′ (ξ)dt = (b − ξ)f ′ (ξ)
ξ ξ

Hence,

f (ξ) + f ′ (ξ) ≥ f (b) − (b − ξ)f ′ (ξ) + f ′ (ξ)


= f (b) + (1 − (ξ − b))f ′ (ξ)
= f (b) + (1 − m1 (b − a))f ′ (ξ)
≥ f (b) + (1 − m1 )f ′ (ξ).

Together with
Y
m−1
(n) dm−1
m−1
f (ξ) = |f (ξ)| = m
′ ′
|ξ − xi | ≥ m|ξ − b| ≥ m−2
| {z } m
i=1
≥|ξ−b|

we get
f (ξ) + f ′ (ξ) ≥ f (b) + ε.
Together with (2) this shows (3). This finishes the proof of Lemma 2.
f + f′

f′
a ξ b

4
P
n
IMC2008, Blagoevgrad, Bulgaria
Problem 6. For a permutation σ = (i1 , i2 , ..., in ) of (1, 2, ..., n) define D(σ) = |ik − k|. Let Q(n, d) be
k=1
the number of permutations σ of (1, 2, ..., n) with d = D(σ). Prove that Q(n, d) is even for d ≥ 2n. Day 1, July 27, 2008
Solution. Consider the n × n determinant

. . . xn−1
1 x
1 . . . xn−2
x Problem 1. Find all continuous functions f : R → R such that f (x) − f (y) is rational for all reals x and
∆(x) = . . . .
. .. . . .. y such that x − y is rational.
.
xn−1 xn−2 . . . 1 Solution. We prove that f (x) = ax + b where a ∈ Q and b ∈ R. These functions obviously satify the
conditions.
where the ij-th entry is x|i−j| . From the definition of the determinant we get Suppose that a function f (x) fulfills the required properties. For an arbitrary rational q, consider the
X function gq (x) = f (x+ q) −f (x). This is a continuous function which attains only rational values, therefore
∆(x) = (−1)inv(i1 ,...,in) xD(i1 ,...,in) gq is constant.
(i1 ,...,in)∈Sn
Set a = f (1) − f (0) and b = f (0). Let n be an arbitrary positive integer and let r = f (1/n) − f (0).
Since f (x + 1/n) − f (x) = f (1/n) − f (0) = r for all x, we have
where Sn is the set of all permutations of (1, 2, ..., n) and inv(i1 , ..., in ) denotes the number of inversions in
the sequence (i1 , ..., in ). So Q(n, d) has the same parity as the coefficient of xd in ∆(x). f (k/n) − f (0) = (f (1/n) − f (0)) + (f (2/n) − f (1/n)) + . . . + (f (k/n) − f ((k − 1)/n) = kr
It remains to evaluate ∆(x). In order to eliminate the entries below the diagonal, subtract the (n−1)-th
row, multiplied by x, from the n-th row. Then subtract the (n − 2)-th row, multiplied by x, from the and
(n − 1)-th and so on. Finally, subtract the first row, multiplied by x, from the second row.
f (−k/n) − f (0) = −(f (0) − f (−1/n)) − (f (−1/n) − f (−2/n)) − . . . − (f (−(k − 1)/n) − f (−k/n) = −kr
n−2 n−1 n−2 n−1
1 x . . . x x 1 x . . . x x
1 n−3 n−2 2 n−3 n−1 n−2 n
x . . . x x 0 1 − x . . . x − x x − x for k ≥ 1. In the case k = n we get a = f (1) − f (0) = nr, so r = a/n. Hence, f (k/n) − f (0) = kr = ak/n
. .
∆(x) = ... .
..
..
.
.
.. .. = . . . = ..
.
..
..
.
.
..
.
.. = (1 − x2 )n−1 . and then f (k/n) = a · k/n + b for all integers k and n > 0.
So, we have f (x) = ax + b for all rational x. Since the function f is continous and the rational numbers
n−2 xn−3 . . . 1 x 1 − x2 x − x3
x 0 0 ...
form a dense subset of R, the same holds for all real x.
xn−1 xn−2 . . . x 1 0 0 ... 0 1 − x2
For d ≥ 2n, the coefficient of xd is 0 so Q(n, d) is even. Problem 2. Denote by V the real vector space of all real polynomials in one variable, and let P : V → R
be a linear map. Suppose that for all f, g ∈ V with P (f g) = 0 we have P (f ) = 0 or P (g) = 0. Prove that
there exist real numbers x0 , c such that P (f ) = c f (x0 ) for all f ∈ V .
Solution. We can assume that P 6= 0.
Let f ∈ V be such that P (f ) 6= 0. Then P (f 2 ) 6= 0, and therefore P (f 2) = aP (f ) for some non-zero
real a. Then 0 = P (f 2 − af ) = P (f (f − a)) implies P (f − a) = 0, so we get P (a) 6= 0. By rescaling, we
can assume that P (1) = 1. Now P (X + b) = 0 for b = −P (X). Replacing P by P̂ given as
P̂ (f (X)) = P (f (X + b))
we can assume that P (X) = 0.
Now we are going to prove that P (X k ) = 0 for all k ≥ 1. Suppose this is true for all k < n. We know
that P (X n + e) = 0 for e = −P (X n ). From the induction hypothesis we get

P (X + e)(X + 1)n−1 = P (X n + e) = 0,
and therefore P (X + e) = 0 (since P (X + 1) = 1 6= 0). Hence e = 0 and P (X n ) = 0, which completes the
inductive step. From P (1) = 1 and P (X k ) = 0 for k ≥ 1 we immediately get P (f ) = f (0) for all f ∈ V .
4 1
Problem 3. Let p be a polynomial with integer coefficients and let a1 < a2 < . . . < ak be integers. is a set of three special triples also (we may suppose that a + b + c < 1, because otherwise all three triples
are equal and our statement is trivial).
a) Prove that there exists a ∈ Z such that p(ai ) divides p(a) for all i = 1, 2, . . . , k.
If there is a special triple (x, y, z) which is not worse than any triple from S1 , then the triple
b) Does there exist an a ∈ Z such that the product p(a1 ) · p(a2 ) · . . . · p(ak ) divides p(a)?
((1 − a − b − c)x + a, (1 − a − b − c)y + b, (1 − a − b − c)z + c)
Solution. The theorem is obvious if p(ai ) = 0 for some i, so assume that all p(ai ) are nonzero and pairwise
different. is special and not worse than any triple from S. We also have a(S1 ) = b(S1 ) = c(S1 ) = 0, so we may
There exist numbers s, t such that s|p(a1 ), t|p(a2 ), st = lcm(p(a1 ), p(a2 )) and gcd(s, t) = 1. suppose that the same holds for our starting set S.
As s, t are relatively prime numbers, there exist m, n ∈ Z such that a1 + sn = a2 + tm =: b2 . Obviously Suppose that one element of S has two entries equal to 0.
s|p(a1 + sn) − p(a1 ) and t|p(a2 + tm) − p(a2 ), so st|p(b2 ). Note that one of the two remaining triples from S is not worse than the other. This triple is also not
Similarly one obtains b3 such that p(a3 )|p(b3 ) and p(b2 )|p(b3 ) thus also p(a1 )|p(b3 ) and p(a2 )|p(b3 ). worse than all triples from S because any special triple is not worse than itself and the triple with two
Reasoning inductively we obtain the existence of a = bk as required. zeroes.
The polynomial p(x) = 2x2 + 2 shows that the second part of the problem is not true, as p(0) = 2, So we have a = b = c = 0 but we may suppose that all triples from S contain at most one zero. By
p(1) = 4 but no value of p(a) is divisible by 8 for integer a. transposing triples and elements in triples (elements in all triples must be transposed simultaneously) we
Remark. One can assume that the p(ai ) are nonzero and ask for a such that p(a) is a nonzero mul- may achieve the following situation x1 = y2 = z3 = 0 and x2 > x3 . If z2 > z1 , then the second triple
tiple of all p(ai ). In the solution above, it can happen that p(a) = 0. But every number p(a + (x2 , 0, z2 ) is not worse than the other two triples from S. So we may assume that z1 > z2 . If y1 > y3 ,
np(a1 )p(a2 ) . . . p(ak )) is also divisible by every p(ai ), since the polynomial is nonzero, there exists n such then the first triple is not worse than the second and the third and we assume y3 > y1 . Consider the
that p(a + np(a1 )p(a2 ) . . . p(ak )) satisfies the modified thesis. three pairs of numbers x2 , y1; z1 , x3 ; y3 , z2 . The sum of all these numbers is three and consequently the
sum of the numbers in one of the pairs is less than or equal to one. If it is the first pair then the triple
Problem 4. We say a triple (a1 , a2 , a3 ) of nonnegative reals is better than another triple (b1 , b2 , b3 ) if two (x2 , 1 − x2 , 0) is not worse than all triples from S, for the second we may take (1 − z1 , 0, z1 ) and for the
out of the three following inequalities a1 > b1 , a2 > b2 , a3 > b3 are satisfied. We call a triple (x, y, z) third — (0, y3, 1 − y3 ). So we found a desirable special triple for any given S.
special if x, y, z are nonnegative and x + y + z = 1. Find all natural numbers n for which there is a set S
of n special triples such that for any given special triple we can find at least one better triple in S. Problem 5. Does there exist a finite group G with a normal subgroup H such that |Aut H| > |Aut G|?
Solution. The answer is n > 4. Solution. Yes. Let H be the commutative group H = F23 , where F2 ∼
= Z/2Z is the field with two elements.
Consider the following set of special triples: The group of automorphisms of H is the general linear group GL3 F2 ; it has
       
8 7 2 3 3 2 2 11 2
0, , , , 0, , , ,0 , , , . (8 − 1) · (8 − 2) · (8 − 4) = 7 · 6 · 4 = 168
15 15 5 5 5 5 15 15 15
We will prove that any special triple (x, y, z) is worse than one of these (triple a is worse than triple b if elements. One of them is the shift operator φ : (x1 , x2 , x3 ) 7→ (x2 , x3 , x1 ).
triple b is better than triple a). We suppose that some special triple (x, y, z) is actually not worse than the Now let T = {a0 , a1 , a2 } be a group of order 3 (written multiplicatively); it acts on H by τ (a) = φ. Let
first three of the triples from the given set, derive some conditions on x, y, z and prove that, under these G be the semidirect product G = H ⋊τ T . In other words, G is the group of 24 elements
conditions, (x, y, z) is worse than the fourth triple
 from the set.
8 7
Triple (x,y, z) is not worse than 0, 15 , 15 means that y > 15 8
or z > 15 7
. Triple (x, y, z) is not worse G = {bai : b ∈ H, i ∈ (Z/3Z)}, ab = φ(b)a.
than 52 , 0, 53 — x > 25 or z > 53 . Triple (x, y, z) is not worse than 35 , 52 , 0 — x > 35 or y > 52 . Since
G has one element e of order 1 and seven elements b, b ∈ H, b 6= e of order 2.
x + y + z = 1, then it is impossible that all inequalities x > 25 , y > 25 and z > 15 7
are true. Suppose that
If g = ba, we find that g 2 = baba = bφ(b)a2 6= e, and that
x < 52 , then y > 52 and z > 35 . Using x + y + z = 1 and x > 0 we get x = 0, y = 52 , z = 35 . We obtain
the triple 0, 2 , 3 which is worse than 2 , 11 , 2 . Suppose that y < 2 , then x > 3 and z > 15
5 5 15 15 15 5 5
7
and this g 3 = bφ(b)a2 ba = bφ(b)aφ(b)a2 = bφ(b)φ2 (b)a3 = ψ(b),
7 2 8
is a contradiction to the admissibility of (x, y, z). Suppose that z < 15 , then x > 5
and y > 15 . We get
1
(by admissibility, again) that z 6 15 and y 6 35 . The last inequalities imply that 15 2 11 2
, 15 , 15 is better than where the homomorphism ψ : H → H is defined as ψ : (x1 , x2 , x3 ) 7→ (x1 + x2 + x3 )(1, 1, 1). It is clear that
(x, y, z). g 3 = ψ(b) = e for 4 elements b ∈ H, while g 6 = ψ 2 (b) = e for all b ∈ H.
We will prove that for any given set of three special triples one can find a special triple which is not We see that G has 8 elements of order 3, namely ba and ba2 with b ∈ Ker ψ, and 8 elements of order 6,
worse than any triple from the set. Suppose we have a set S of three special triples namely ba and ba2 with b 6∈ Ker ψ. That accounts for orders of all elements of G.
(x1 , y1 , z1 ), (x2 , y2 , z2 ), (x3 , y3, z3 ). Let b0 ∈ H \Kerψ be arbitrary; it is easy to see that G is generated by b0 and a. As every automorphism
of G is fully determined by its action on b0 and a, it follows that G has no more than
Denote a(S) = min(x , x , x ), b(S) = min(y , y , y ), c(S) = min(z1 , z2 , z3 ). It is easy to check that S1 :
1 2 3 1 2 3
 
x1 − a y1 − b z1 − c 7 · 8 = 56
, ,
1−a−b−c 1−a−b−c 1−a−b−c
  automorphisms.
x2 − a y2 − b z2 − c
, , Remark. G and H can be equivalently presented as subgroups of S6 , namely as H = h(12), (34), (56)i and
1−a−b−c 1−a−b−c 1−a−b−c
  G = h(135)(246), (12)i.
x3 − a y3 − b z3 − c
, ,
1−a−b−c 1−a−b−c 1−a−b−c
2 3
is a Cauchy sequence in H. (This is the crucial observation.) Indeed, for m > n, the norm kym − yn k IMC2008, Blagoevgrad, Bulgaria
may be computed by the above remark as Day 2, July 28, 2008
2

d2
⊤ 2
 2

1 1 1 1 1 1 d n(m − n) m −n
kym − yn k2 = − ,..., − , ,..., = +
2 m n m n m m m 2 m2 n2 m2 Problem 1. Let n, k be positive integers and suppose that the polynomial x2k − xk + 1 divides
R
  x2n + xn + 1. Prove that x2k + xk + 1 divides x2n + xn + 1.
d2 (m − n)(m − n + n) d2 m − n d2 1 1
= = = −
→ 0, m, n → ∞. Solution. Let f (x) = x2n + xn + 1, g(x) = x2k − xk + 1, h(x) = x2k + xk + 1. The complex number
2 m2 n 2 mn 2 n m
x = cos( π ) + i sin( 3k
1
π
) is a root of g(x).
By completeness of H, it follows that there exists a limit 3k
Let α = πn 3k
. Since g(x) divides f (x), f (x1 ) = g(x1 ) = 0. So, 0 = x12n + x1n + 1 = (cos(2α) +
y = lim yn ∈ H. i sin(2α)) + (cos α + i sin α) + 1 = 0, and (2 cos α + 1)(cos α + i sin α) = 0. Hence 2 cos α + 1 = 0, i.e.
n→∞
α = ± 2π 3
+ 2πc, where c ∈ Z.
We claim that y sastisfies all conditions of the problem. For m > n > p, with n, p fixed, we compute 3k −1
2 Let x2 be a root of the polynomial h(x). Since h(x) = xxk −1 , the roots of the polynomial h(x)
 1
d2
⊤
1 1 1 1 are distinct and they are x2 = cos 2πs + i sin 2πs , where s = 3a ± 1, a ∈ Z. It is enough to prove that
kxn − ym k2 = − ,...,− ,1 − ,− ,...,− 3k 3k
2 m m m m m m f (x ) = 0. We have f (x ) = x2n + xn + 1 = (cos(4sα) + sin(4sα)) + (cos(2sα) + sin(2sα)) + 1 =
2 2 2 2
  R
(2 cos(2sα) + 1)(cos(2sα) + i sin(2sα)) = 0 (since 2 cos(2sα) + 1 = 2 cos(2s(± 2π + 2πc)) + 1 =
d2 m − 1 (m − 1)2 d2 m − 1 d2 3
= + = → , m → ∞, 2 cos( 4πs
3
) + 1 = 2 cos( 4π
3
(3a ± 1)) + 1 = 0).
2 m2 m2 2 m 2
√ Problem 2. Two different ellipses are given. One focus of the first ellipse coincides with one focus
showing that kxn − yk = d/ 2, as well as of the second ellipse. Prove that the ellipses have at most two points in common.
* ⊤
d2 1 1 1 1 Solution. It is well known that an ellipse might be defined by a focus (a point) and a directrix (a
hxn − ym , xp − ym i = − ,...,− ,...,1 − ,...,− , straight line), as a locus of points such that the distance to the focus divided by the distance to
2 m m m m
 ⊤ + directrix is equal to a given number e < 1. So, if a point X belongs to both ellipses with the same
1 1 1 1 focus F and directrices l1 , l2 , then e1 · l1 X = F X = e2 · l2 X (here we denote by l1 X, l2 X distances
− ,...,1 − ,...,− ,...,−
m m m m between the corresponding line and the point X). The equation e1 · l1 X = e2 · l2 X defines two lines,
   Rm
whose equations are linear combinations with coefficients e1 , ±e2 of the normalized equations of lines
d2 m − 2 2 1 d2
= − 1− =− → 0, m → ∞, l1 , l2 but of those two only one is relevant, since X and F should lie on the same side of each directrix.
2 m2 m m 2m
So, we have that all possible points lie on one line. The intersection of a line and an ellipse consists
showing that hxn − y, xp − yi = 0, so that of at most two points.
(√ )
2 Problem 3. Let n be a positive integer. Prove that 2n−1 divides
(xn − y) : n ∈ N
d X  n 
5k .
is indeed an orthonormal system of vectors. 2k + 1
0≤k<n/2
This completes the proof in the case when T = S, which we can always take if S is countable. If
it is not, let x′ , x′′ be any two distinct points in S \ T . Then applying the above procedure to the set  √ n  √ n 
Solution. As is known, the Fibonacci numbers Fn can be expressed as Fn = √15 1+ 5
− 1−2 5 .
T ′ = {x′ , x′′ , x1 , x2 , . . . , xn , . . .}     l−1 
2
n
Expanding this expression, we obtain that Fn = 1
+ n3 5 + ... + nl 5 2 , where l is the
1
2n−1
it follows that
greatest odd number such that l ≤ n and s = l−1 ≤ n2 .
x′ + x′′ + x1 + x2 + · · · + xn x1 + x2 + · · · + xn  k
2

lim = lim =y P
1
s
n P n
n→∞ n+2 n→∞ n So, Fn = 2n−1 2k+1
5 , which implies that 2n−1 divides 0≤k<n/2 2k+1
5k .
k=0
satisfies that (√ √ ) (√ )
2 ′ 2 ′′ 2 Problem 4. Let Z[x] be the ring of polynomials with integer coefficients, and let f (x), g(x) ∈ Z[x] be
(x − y), (x − y) ∪ (xn − y) : n ∈ N nonconstant polynomials such that g(x) divides f (x) in Z[x]. Prove that if the polynomial f (x)−2008
d d d
has at least 81 distinct integer roots, then the degree of g(x) is greater than 5.
is still an orthonormal system. Solution. Let f (x) = g(x)h(x) where h(x) is a polynomial with integer coefficients.
This it true for any distinct x′ , x′′ ∈ S \ T ; it follows that the entire system Let a1 , . . . , a81 be distinct integer roots of the polynomial f (x) − 2008. Then f (ai ) = g(ai )h(ai ) =
(√ )
2 2008 for i = 1, . . . , 81, Hence, g(a1 ), . . . , g(a81 ) are integer divisors of 2008.
(x − y) : x ∈ S Since 2008 = 23 ·251 (2, 251 are primes) then 2008 has exactly 16 distinct integer divisors (including
d
the negative divisors as well). By the pigeonhole principle, there are at least 6 equal numbers among
is an orthonormal system of vectors in H, as required. g(a1 ), . . . , g(a81 ) (because 81 > 16 · 5). For example, g(a1) = g(a2 ) = . . . = g(a6 ) = c. So g(x) − c is
4 1
a nonconstant polynomial which has at least 6 distinct roots (namely a1 , . . . , a6 ). Then the degree Problem 6. Let H be an infinite-dimensional real Hilbert space, let d > 0, and suppose that S is a
of the polynomial g(x) − c is at least 6. set of points (not necessarily countable) in H such that the distance between any two distinct points
Problem 5. Let n be a positive integer, and consider the matrix A = (aij )1≤i,j≤n , where in S is equal to d. Show that there is a point y ∈ H such that
(√ )
( 2
1 if i + j is a prime number, (x − y) : x ∈ S
aij = d
0 otherwise.
is an orthonormal system of vectors in H.
Prove that | det A| = k 2 for some integer k. √
Solution. It is clear that, if B is an orthonormal system in a Hilbert space H, then {(d/ 2)e : e ∈ B}
Solution. Call a square matrix of type (B), if it is of the form is a set of points in H, any two of which are at distance d apart. We need to show that every set S
  of equidistant points is a translate of such a set.
0 b12 0 ... b1,2k−2 0 We begin by noting that, if x1 , x2 , x3 , x4 ∈ S are four distinct points, then
 0 0 
 b21 b23 . . . b2,2k−1 
  hx2 − x1 , x2 − x1 i = d2 ,
 0 b32 0 ... b3,2k−2 0 
 . . . .. . . . 1  1
 . .. .. . .. .. 
 .  hx − x , x − x i =
2 1 3 1 kx − x k2 + kx − x k2 − kx − x k2 = d2 ,
2 1 3 1 2 3
b2k−2,1 0 b2k−2,3 ... 0 b2k−2,2k−1  2 2
1 1
0 b2k−1,2 0 . . . b2k−1,2k−2 0 hx2 − x1 , x4 − x3 i = hx2 − x1 , x4 − x1 i − hx2 − x1 , x3 − x1 i = d2 − d2 = 0.
2 2
Note that every matrix of this form has determinant zero, because it has k columns spanning a vector This shows that scalar products among vectors which are finite linear combinations of the form
space of dimension at most k − 1.
Call a square matrix of type (C), if it is of the form λ1 x1 + λ2 x2 + · · · + λn xn ,
  where x1 , x2 , . . . , xn are distinct points in S and λ1 , λ2 , . . . , λn are integers with λ1 + λ2 + · · ·+ λn = 0,
0 c11 0 c12 . . . 0 c1,k
  are universal across all such sets S in all Hilbert spaces H; in particular, we may conveniently evaluate
 c11 0 c12 0 . . . c1,k 0 
  them using examples of our choosing, such as the canonical example above in Rn . In fact this property
 0 c21 0 c22 . . . 0 c2,k 
  trivially follows also when coefficients λi are rational, and hence by continuity any real numbers with
C ′ = c21 0 c22 0 . . . c2,k 0 

 . ... ... ... ... ... 
...  sum 0.
 .
 .  If S = {x1 , x2 , . . . , xn } is a finite set, we form
 0 ck,1 0 ck,2 . . . 0 ck,k 
ck,1 0 ck,2 0 . . . ck,k 0 1
x= (x1 + x2 + · · · + xn ) ,
n
By permutations of rows and columns, we see that
pick a non-zero vector z ∈ [Span(x1 − x, x2 − x, . . . , xn − x)]⊥ and seek y in the form y = x + λz for
 
C 0 a suitable λ ∈ R. We find that
| det C ′ | = det = | det C|2 ,
0 C
hx1 − y, x2 − yi = hx1 − x − λz, x2 − x − λzi = hx1 − x, x2 − xi + λ2 kzk2 .
where C denotes the k × k-matrix with coefficients ci,j . Therefore, the determinant of any matrix of
hx1 − x, x2 − xi may be computed by our remark above as
type (C) is a perfect square (up to a sign).  * ⊤  ⊤ +
Now let X ′ be the matrix obtained from A by replacing the first row by 1 0 0 . . . 0 , and d2 1 1 1 1 1 1 1 1
let Y be the matrix obtained from A by replacing the entry a11 by 0. By multi-linearity of the hx1 − x, x2 − xi = − 1, , , . . . , , , − 1, , . . . ,
2 n n n n n n n n
determinant, det(A) = det(X ′ ) + det(Y ). Note that X ′ can be written as     Rn
  d2 2 1 n−2 d2
= −1 + =− .
1 0 2 n n n2 2n
X′ =
v X √
d 2
for some (n − 1) × (n − 1)-matrix X and some column vector v. Then det(A) = det(X) + det(Y ). So the choice λ = √ will make all vectors (xi − y) orthogonal to each other; it is easily
2nkzk d
Now consider two cases. If n is odd, then X is of type (C), and Y is of type (B). Therefore, checked as above that they will also be of length one.
| det(A)| = | det(X)| is a perfect square. If n is even, then X is of type (B), and Y is of type (C); Let now S be an infinite set. Pick an infinite sequence T = {x1 , x2 , . . . , xn , . . .} of distinct points
hence | det(A)| = | det(Y )| is a perfect square. in S. We claim that the sequence
The set of primes can be replaced by any subset of {2} ∪ {3, 5, 7, 9, 11, . . . }.
1
yn = (x1 + x2 + · · · + xn )
n
2 3
International Mathematics Competition for University Students
July 25–30 2009, Budapest, Hungary
Day 1

Problem 1.
Suppose that f and g are real-valued functions on the real line and f (r) ≤ g(r) for every rational r. Does this
imply that f (x) ≤ g(x) for every real x if
a) f and g are non-decreasing?
b) f and g are continuous?
√ √
Solution. a) No. Counter-example: f and g can be chosen as the characteristic functions of [ 3, ∞) and ( 3, ∞),
respectively.
b) Yes. By the assumptions g − f is continuous on the whole real line and nonnegative on the rationals. Since
any real number can be obtained as a limit of rational numbers we get that g − f is nonnegative on the whole real
line.

Problem 2.
Let A, B and C be real square matrices of the same size, and suppose that A is invertible. Prove that if (A−B)C =
BA−1 , then C(A − B) = A−1 B.
Solution. A straightforward calculation shows that (A−B)C = BA−1 is equivalent to AC −BC −BA−1 +AA−1 =
I, where I denotes the identity matrix. This is equivalent to (A − B)(C + A−1 ) = I. Hence, (A − B)−1 = C + A−1 ,
meaning that (C + A−1 )(A − B) = I also holds. Expansion yields the desired result.

Problem 3.
In a town every two residents who are not friends have a friend in common, and no one is a friend of everyone else.
Let
Pn us 2number the residents from 1 to n and let ai be the number of friends of the i-th resident. Suppose that
a = n 2 − n. Let k be the smallest number of residents (at least three) who can be seated at a round table
i=1 i
in such a way that any two neighbors are friends. Determine all possible values of k.
Solution. Let us define the simple, undirected graph G so that the vertices of G are the town’s residents and the
edges of G are the friendships between the residents. Let V (G) = {v1 , v2 , . . . , vn } denote the vertices of G; ai is
degree of vi for every i. Let E(G) denote the edges of G. In this terminology, the problem asks us to describe the
length k of the shortest cycle in G.
Let us count the walks of length 2 in G, that is, the ordered triples (vi , vj , vl ) of vertices with P vi vj , vj vl ∈ E(G)
(i = l being allowed). For a given j the number is obviously a2j , therefore the total number is ni=1 a2i = n2 − n.
Now we show that there is an injection f from the set of ordered pairs of distinct vertices to the set of these
walks. For vi vj ∈ / E(G), let f (vi , vj ) = (vi , vl , vj ) with arbitrary l such that vi vl , vl vj ∈ E(G). For vi vj ∈ E(G), let
f (vi , vj ) = (vi , vj , vi ). f is an injection since for i 6= l, (vi , vj , vl ) can only be the image of (vi , vl ), and for i = l, it
can only be the image of (vi , vj ). P
Since the number of ordered pairs of distinct vertices is n2 − n, ni=1 a2i ≥ n2 − n. Equality holds iff f is
surjective, that is, iff there is exactly one l with vi vl , vl vj ∈ E(G) for every i, j with vi vj ∈ / E(G) and there is no
such l for any i, j with vi vj ∈ E(G). In other words, iff G contains neither C3 nor C4 (cycles of length 3 or 4), that
is, G is either a forest (a cycle-free graph) or the length of its shortest cycle is at least 5.
It is easy to check that if every two vertices of a forest are connected by a path of length at most 2, then the
forest is a star (one vertex is connected to all others by an edge). But G has n vertices, and none of them has
degree n − 1. Hence G is not forest, so it has cycles. On the other hand, if the length of a cycle C of G is at
least 6 then it has two vertices such that both arcs of C connecting them are longer than 2. Hence there is a path
connecting them that is shorter than both arcs. Replacing one of the arcs by this path, we have a closed walk
shorter than C. Therefore length of the shortest cycle is 5.
Finally, we must note that there is at least one G with the prescribed properties – e.g. the cycle C5 itself
satisfies the conditions. Thus 5 is the sole possible value of k.

1
Problem 4.
Let p(z) = a0 + a1 z + a2 z 2 + · · · + an z n be a complex polynomial. Suppose that 1 = c0 ≥ c1 ≥ · · · ≥ cn ≥ 0 is a
sequence of real numbers which is convex (i.e. 2ck ≤ ck−1 + ck+1 for every k = 1, 2, . . . , n − 1), and consider the
polynomial
q(z) = c0 a0 + c1 a1 z + c2 a2 z 2 + · · · + cn an z n .
Prove that
max q(z) ≤ max p(z) .
|z|≤1 |z|≤1

Solution. The polynomials p and q are regular on the complex plane, so by the Maximum Principle, max|z|≤1 |q(z)| =
max|z|=1 |q(z)|, and similarly for p. Let us denote Mf = max|z|=1 |f (z)| for any regular function f . Thus it suffices
to prove that Mq ≤ Mp .
First, note that we can assume cn = 0. Indeed,
P for cn = 1, we get p = q and the statement is trivial; otherwise,
cj −cn cj −cn
q(z) = cn p(z) + (1 − cn )r(z), where r(z) = nj=0 1−c n
aj z j . The sequence c′j = 1−c n
also satisfies the prescribed
conditions (it is a positive linear transform of the sequence cn with c0 = 1), but c′n = 0 too, so we get Mr ≤ Mp .

This is enough: Mq = |q(z0 )| ≤ cn |p(z0 )| + (1 − cn )|r(z0 )| ≤ cn Mp + (1 − cn )Mr ≤ Mp .


Using the Cauchy formulas, we can express the coefficients aj of p from its values taken over the positively
oriented circle S = {|z| = 1}: Z Z
1 p(z) 1 p(z)
aj = dz = |dz|
2πi S z j+1 2π S z j
for 0 ≤ j ≤ n, otherwise Z
p(z)
|dz| = 0.
S zj
Let us use these identities to get a new formula for q, using only the values of p over S:
X
n Z 
2π · q(w) = cj p(z)z |dz| wj .
−j

j=0 S

We can exchange the order of the summation and the integration (sufficient conditions to do this obviously apply):
 
Z X
n
2π · q(w) =  cj (w/z)j  p(z)|dz|.
S j=0

It would be nice if the integration kernel (the sum between the brackets) was real. But this is easily arranged – for
−n ≤ j ≤ −1, we can add the conjugate expressions, because by the above remarks, they are zero anyway:
Xn Z  Xn Z 
j
2π · q(w) = cj p(z)z |dz| w =
−j
c|j| p(z)z |dz| wj ,
−j

j=0 S j=−n S

 
Z X
n Z
2π · q(w) =  c|j| (w/z) j
p(z)|dz| = K(w/z)p(z)|dz|,
S j=−n S

where
X
n X
n
j
K(u) = c|j| u = c0 + 2 cj R(uj )
j=−n j=1

for u ∈ S. R
R Let us examine K(u). It is a real-valued function. Again from the Cauchy formulas, S K(u)|du| = 2πc0 = 2π.
If S |K(u)||du| = 2π still holds (taking the absolute value does not increase the integral), then for every w:
Z Z Z

2π|q(w)| = K(w/z)p(z)|dz| ≤ |K(w/z)| · |p(z)||dz| ≤ Mp |K(u)||du| = 2πMp ;
S S S
R R
this would conclude the proof. So it suffices to prove that S |K(u)||du| = S K(u)|du|, which is to say, K is
non-negative.

2
c_{|j|}

d_1 F_1

d_2 F_2

Now let us decompose K into a sum using the given conditions for the numbers cj (including cn = 0). Let
Pk−1
dk = ck−1 − 2ckP+ ck+1 for k = 1, . . . , n (setting cn+1 = 0); we know that dk ≥ 0. Let Fk (u) = j=−k+1 (k − |j|)uj .
n
Then K(u) = k=1 dk Fk (u) by easy induction (or see Figure for a graphical illustration). So it suffices to prove
that Fk (u) is real and Fk (u) ≥ 0 for u ∈ S. This is reasonably well-known (as Fkk is the Fejér kernel), and also very
easy:
Fk (u) = (1 + u + u2 + · · · + uk−1 )(1 + u−1 + u−2 + · · · + u−(k−1) ) =
= (1 + u + u2 + · · · + uk−1 )(1 + u + u2 + · · · + uk−1 ) = |1 + u + u2 + · · · + uk−1 |2 ≥ 0
This completes the proof.

Problem 5.
Let n be a positive integer. An n-simplex in Rn is given by n + 1 points P0 , P1 , . . . , Pn , called its vertices, which
do not all belong to the same hyperplane. For every n-simplex S we denote by v(S) the volume of S, and we write
C(S) for the center of the unique sphere containing all the vertices of S.
Suppose that P is a point inside an n-simplex S. Let Si be the n-simplex obtained from S by replacing its i-th
vertex by P . Prove that

v(S0 )C(S0 ) + v(S1 )C(S1 ) + · · · + v(Sn )C(Sn ) = v(S)C(S).

Solution 1. We will prove this by induction on n, starting with n = 1. In that case we are given an interval [a, b]
with a point p ∈ (a, b), and we have to verify

b+p p+a b+a


(b − p) + (p − a) = (b − a) ,
2 2 2
which is true.
Now let assume the result is true for n − 1 and prove it for n. We have to show that the point
X
n
v(Sj )
X= O(Sj )
v(S)
j=0

has the same distance to all the points P0 , P1 , . . . , Pn . Let i ∈ {0, 1, 2, . . . , n} and define the sets
Mi = {P0 , P1 , . . . , Pi−1 , Pi+1 , . . . , Pn }. The set of all points having the same distance to all points in Mi is a
line hi orthogonal to the hyperplane Ei determined by the points in Mi . We are going to show that X lies on every
hi . To do so, fix some index i and notice that

v(Si ) v(S) − v(Si ) X v(Sj )


X= O(Si ) + · O(Sj )
v(S) v(S) v(S) − v(Si )
j6=i
| {z }
Y

and O(Si ) lies on hi , so that it is enough to show that Y lies on hi .


A map f : R>0 → Rn will be called affine if there are points A, B ∈ Rn such that f (λ) = λA + (1 − λ)B.
Consider the ray g starting in Pi and passing through P . For λ > 0 let Pλ = (1 − λ)P + λPi , so that Pλ is an
affine function describing the points of g. For every such λ let Sjλ be the n-simplex obtained from S by replacing
the j-th vertex by Pλ . The point O(Sjλ ) is the intersection of the fixed line hj with the hyperplane orthogonal to

3
g and passing through the midpoint of the segment Pi Pλ which is given by an affine function. This implies that
v(Sj )
also O(Sjλ ) is an affine function. We write ϕj = v(S)−s(S i)
, and then
X
Yλ = ϕj O(Sjλ )
j6=i

is an affine function. We want to show that Yλ ∈ hi for all λ (then specializing to λ = 1 gives the desired result).
It is enough to do this for two different values of λ.
Let g intersect the sphere containing the vertices of S in a point Z; then Z = Pλ for a suitable λ > 0, and we
have O(Sjλ ) = O(S) for all j, so that Yλ = O(S) ∈ hi . Now let g intersect the hyperplane Ei in a point Q; then
Q = Pλ for some λ > 0, and Q is different from Z. Define T to be the (n − 1)-simplex with vertex set Mi , and
let Tj be the (n − 1)-simplex obtained from T by replacing the vertex Pj by Q. If we write v ′ for the volume of
(n − 1)-simplices in the hyperplane Ei , then

v ′ (Tj ) v(Sjλ ) v(Sjλ )


= = P λ
v ′ (T ) v(S) k6=i v(Sk )
λv(Sj ) v(Sj )
=P = = ϕj .
k6=i λv(S k ) v(S) − v(Si )
P
If p denotes the orthogonal projection onto Ei then p(O(Sjλ )) = O(Tj ), so that p(Yλ ) = j6=i ϕj O(Tj ) equals O(T )
by induction hypothesis, which implies Yλ ∈ p−1 (O(T )) = hi , and we are done.
Solution 2. For n = 1, the statement is checked easily.
Assume n ≥ 2. Denote O(Sj ) − O(S) by qj and Pj − P by pj . For all distinct j and k in the range 0, ..., n the
point O(Sj ) lies on a hyperplane orthogonal to pk and Pj lies on a hyperplane orthogonal to qk . So we have
(
hpi , qj − qk i = 0
hqi , pj − pk i = 0

for all j 6= i 6= k. This means that the value hpi , qj i is independent of j as long as j 6= i, denote this value by λi .
Similarly, hqi , pj i = µi for some µi . Since n ≥ 2, these equalities imply that all the λi and µi values are equal, in
particular, hpi , qj i = hpj , qi i for any i and j.
We claim that for such pi and qi , the volumes
Vj = | det(p0 , ..., pj−1 , pj+1 , ..., pn )|
and
Wj = | det(q0 , ..., qj−1 , qj+1 , ..., qn )|
are proportional. Indeed, first assume that p0 , ..., pn−1 and q0 , ..., qn−1 are bases of Rn , then we have

1 
Vj = det hpk , ql i k6=j =
| det(q0 , ..., qn−1 )| l<n

1 det(p0 , ..., pn−1 )
= det((hpk , ql i)) l6=j =
| det(q0 , ..., qn−1 )| det(q0 , ..., qn−1 ) Wj .
k<n

If our assumption did not hold after any reindexing of the vectors pi and qi , then both pi and qi span a subspace
of dimension at most n − 1 P and all the volumes are 0.
Finally, it is clear that qj Wj / det(q0 , ..., qn ) = 0: the weight of pj is the height of 0 over the hyperplane
spanned by the rest of the vectors qk relative to the height of pj over the same hyperplane, so the sum is parallel
to all the faces of the simplex spanned by q0 , ..., qn . By the argument above, we can change the weights to the
proportional set of weights Vj / det(p0 , ..., pn ) and the sum will still be 0. That is,
X Vj X v(Sj )
0= qj = (O(Sj ) − O(S)) =
det(p0 , ..., pn ) v(S)
1 X X  1 X 
= O(Sj )v(Sj ) − O(S) v(Sj ) = O(Sj )v(Sj ) − O(S)v(S) ,
v(S) v(S)
q.e.d.

4
International Mathematics Competition for University Students
July 25–30 2009, Budapest, Hungary
Day 2

Problem 1.
Let ℓ be a line and P a point in R3 . Let S be the set of points X such that the distance from X to ℓ is greater
than or equal to two times the distance between X and P . If the distance from P to ℓ is d > 0, find the volume of
S.
Solution. We can choose a coordinate system of the space p such that the line ℓ is the z-axis and the point P
is
p (d, 0, 0). The distance from the point (x, y, z) to ℓ is x2 + y 2 , while the distance from P to X is |P X| =
(x − d)2 + y 2 + z 2 . Square everything to get rid of the square roots. The condition can be reformulated as
follows: the square of the distance from ℓ to X is at least 4|P X|2 .
x2 + y 2 ≥ 4((x − d)2 + y 2 + z 2 )
0 ≥ 3x2 − 8dx + 4d2 + 3y 2 + 4z 2
   
16 4 2
− 4 d ≥ 3 x − d + 3y 2 + 4z 2
2
3 3
A translation by 43 d in the x-direction does not change the volume, so we get
4 2
d ≥ 3x21 + 3y 2 + 4z 2
3
   2 √ !2
3x1 2 3y 3z
1≥ + + ,
2d 2d d
where x1 = x− 34 d. This equation defines a solid ellipsoid in canonical form. To compute its volume, perform a linear

2d 2 √d 3
transformation: we divide x1 and y by 2d √d
3 and z by 3 . This changes the volume by the factor 3 3
= 94d
√ and
3
3 3
turns the ellipsoid into the unit ball of volume 43 π. So before the transformation the volume was 4d

9 3
· 43 π = 16πd
√ .
27 3

Problem 2.
Suppose f : R → R is a two times differentiable function satisfying f (0) = 1, f ′ (0) = 0, and for all x ∈ [0, ∞),
f ′′ (x) − 5f ′ (x) + 6f (x) ≥ 0.
Prove that for all x ∈ [0, ∞),
f (x) ≥ 3e2x − 2e3x .

Solution. We have f ′′ (x) − 2f ′ (x) − 3(f ′ (x) − 2f (x)) ≥ 0, x ∈ [0, ∞).


Let g(x) = f ′ (x) − 2f (x), x ∈ [0, ∞). It follows that
g′ (x) − 3g(x) ≥ 0, x ∈ [0, ∞),
hence
(g(x)e−3x )′ ≥ 0, x ∈ [0, ∞),
therefore
g(x)e−3x ≥ g(0) = −2, x ∈ [0, ∞) or equivalently
f ′ (x) − 2f (x) ≥ −2e3x , x ∈ [0, ∞).
Analogously we get
(f (x)e−2x )′ ≥ −2ex , x ∈ [0, ∞) or equivalently
(f (x)e−2x + 2ex )′ ≥ 0, x ∈ [0, ∞).
It follows that
f (x)e−2x + 2ex ≥ f (0) + 2 = 3, x ∈ [0, ∞) or equivalently
f (x) ≥ 3e2x − 2e3x , x ∈ [0, ∞).

1
Problem 3.
Let A, B ∈ Mn (C) be two n × n matrices such that

A2 B + BA2 = 2ABA.

Prove that there exists a positive integer k such that (AB − BA)k = 0.
Solution 1. Let us fix the matrix A ∈ Mn (C). For every matrix X ∈ Mn (C), let ∆X := AX − XA. We need to
prove that the matrix ∆B is nilpotent.
Observe that the condition A2 B + BA2 = 2ABA is equivalent to

∆2 B = ∆(∆B) = 0. (1)

∆ is linear; moreover, it is a derivation, i.e. it satisfies the Leibniz rule:

∆(XY ) = (∆X)Y + X(∆Y ), ∀X, Y ∈ Mn (C).

Using induction, one can easily generalize the above formula to k factors:

∆(X1 · · · Xk ) = (∆X1 )X2 · · · Xk + · · · + X1 · · · Xj−1 (∆Xj )Xj+1 · · · Xk + X1 · · · Xn−1 ∆Xk , (2)

for any matrices X1 , X2 , . . . , Xk ∈ Mn (C). Using the identities (1) and (2) we obtain the equation for ∆k (B k ):

∆k (B k ) = k!(∆B)k , ∀k ∈ N. (3)

By the last equation it is enough to show that ∆n (B n ) = 0.


To prove this, first we observe that equation (3) together with the fact that ∆2 B = 0 implies that ∆k+1 B k = 0,
for every k ∈ N. Hence, we have
∆k (B j ) = 0, ∀k, j ∈ N, j < k. (4)
By the Cayley–Hamilton Theorem, there are scalars α0 , α1 , . . . , αn−1 ∈ C such that

B n = α0 I + α1 B + · · · + αn−1 B n−1 ,

which together with (4) implies that ∆n B n = 0.


Solution 2. Set X = AB − BA. The matrix X commutes with A because

AX − XA = (A2 B − ABA) − (ABA − BA2 ) = A2 B + BA2 − 2ABA = 0.

Hence for any m ≥ 0 we have

X m+1 = X m (AB − BA) = AX m B − X m BA.

Take the trace of both sides:


tr X m+1 = tr A(X m B) − tr(X m B)A = 0
(since for any matrices U and V , we have tr U V = tr V U ). As tr X m+1 is the sum of the m + 1-st powers of
the eigenvalues of X, the values of tr X, . . . , tr X n determine the eigenvalues of X uniquely, therefore all of these
eigenvalues have to be 0. This implies that X is nilpotent.

Problem 4.
Let p be a prime number and Fp be the field of residues modulo p. Let W be the smallest set of polynomials with
coefficients in Fp such that

• the polynomials x + 1 and xp−2 + xp−3 + · · · + x2 + 2x + 1 are in W , and


• for any polynomials h1 (x) and h2 (x) in W the polynomial r(x), which is the remainder of h1 (h2 (x)) modulo
xp − x, is also in W .

How many polynomials are there in W ?

2
Solution. Note that both of our polynomials are bijective functions on Fp : f1 (x) = x + 1 is the cycle 0 → 1 →
2 → · · · → (p − 1) → 0 and f2 (x) = xp−2 + xp−3 + · · · + x2 + 2x + 1 is the transposition 0 ↔ 1 (this follows from the
p−1
formula f2 (x) = x x−1−1 + x and Fermat’s little theorem). So any composition formed from them is also a bijection,
and reduction modulo xp − x does not change the evaluation in Fp . Also note that the transposition and the cycle
generate the symmetric group (f1k ◦ f2 ◦ f1p−k is the transposition k ↔ (k + 1), and transpositions of consecutive
elements clearly generate Sp ), so we get all p! permutations of the elements of Fp .
The set W only contains polynomials of degree at most p − 1. This means that two distinct elements of W
cannot represent the same permutation. So W must contain those polynomials of degree at most p − 1 which
permute the elements of Fp . By minimality, W has exactly these p! elements.

Problem 5.
Let M be the vector space of m × p real matrices. For a vector subspace S ⊆ M, denote by δ(S) the dimension of
the vector space generated by all columns of all matrices in S.
Say that a vector subspace T ⊆ M is a covering matrix space if
[
ker A = Rp .
A∈T, A6=0

Such a T is minimal if it does not contain a proper vector subspace S ⊂ T which is also a covering matrix space.
(a) (8 points) Let T be a minimal covering matrix space and let n = dim T . Prove that
 
n
δ(T ) ≤ .
2

(b) (2 points) Prove that for every positiveinteger


 n we can find m and p, and a minimal covering matrix space
n
T as above such that dim T = n and δ(T ) = .
2
Solution 1. (a) We will prove the claim by constructing a suitable decomposition T = Z0 ⊕ Z1 ⊕ · · · and a
corresponding decomposition of the space spanned by all columns of T as W0 ⊕ W1 ⊕ · · · , such that dim W0 6 n − 1,
dim W1 6 n − 2, etc., from which the bound follows.

We first claim that, in every covering matrix space S, we can find an A ∈ S with rk A 6 dim S − 1. Indeed, let
S0 ⊆ S be some minimal covering matrix space. Let s = dim S0 and fix some subspace S ′ ⊂ S0 of dimension s − 1.
S ′ is not covering by minimality of S0 , so that we can find an u ∈ Rp with u 6∈ ∪B∈S ′ , B6=0 Ker B. Let V = S ′ (u);
by the rank-nullity theorem, dim V = s − 1. On the other hand, as S0 is covering, we have that Au = 0 for some
A ∈ S0 \ S ′ . We claim that Im A ⊂ V (and therefore rk(A) 6 s − 1).
For suppose that Av 6∈ V for some v ∈ Rp . For every α ∈ R, consider the map fα : S0 → Rm defined by
fα : (τ + βA) 7→ τ (u + αv) + βAv, τ ∈ S ′ , β ∈ R. Note that f0 is of rank s = dim S0 by our assumption, so that
some s × s minor of the matrix of f0 is non-zero. The corresponding minor of fα is thus a nonzero polynomial of
α, so that it follows that rk fα = s for all but finitely many α. For such an α 6= 0, we have that Ker fα = {0} and
thus
0 6= τ (u + αv) + βAv = (τ + α−1 βA)(u + αv)
for all τ ∈ S ′ , β ∈ R not both zero, so that B(u + αv) 6= 0 for all nonzero B ∈ S0 , a contradiction.

Let now T be a minimal covering matrix space, and write dim T = n. We have shown that we can find an
A ∈ T such that W0 = Im A satisfies w0 = dim W0 6 n − 1. Denote Z0 = {B ∈ T : Im B ⊂ W0 }; we know that
t0 = dim Z0 > 1. If T = Z0 , then δ(T ) 6 n − 1 and we are done. Else, write T = Z0 ⊕ T1 , also write Rm = W0 ⊕ V1
and let π1 : Rm → Rm be the projection onto the V1 -component. We claim that

T1♯ = {π1 τ1 : τ1 ∈ T1 }

is also a covering matrix space. Note here that π1♯ : T1 → T1♯ , τ1 7→ (π1 τ1 ) is an isomorphism. In particular we note
that δ(T ) = w0 + δ(T1♯ ).
Suppose that T1♯ is not a covering matrix space, so we can find a v1 ∈ Rp with v1 6∈ ∪τ1 ∈T1 ,τ1 6=0 Ker(π1 τ1 ). On
the other hand, by minimality of T we can find a u1 ∈ Rp with u1 6∈ ∪τ0 ∈Z0 , τ0 6=0 Ker τ0 . The maps gα : Z0 → V ,

3
τ0 7→ τ0 (u1 + αv1 ) and hβ : T1 → V1 , τ1 7→ π1 (τ1 (v1 + βu1 )) have rk g0 = t0 and rk h0 = n − t0 and thus both
rk gα = t0 and rk hα−1 = n − t0 for all but finitely many α 6= 0 by the same argument as above. Pick such an α
and suppose that
(τ0 + τ1 )(u1 + αv1 ) = 0
for some τ0 ∈ Z0 , τ1 ∈ T1 . Applying π1 to both sides we see that we can only have τ1 = 0, and then τ0 = 0 as well,
a contradiction given that T is a covering matrix space.

In fact, the exact same proof shows that, in general, if T is a minimal covering matrix space, Rm = V0 ⊕ V1 ,
T0 = {τ ∈ T : Im τ ⊂ V0 }, T = T0 ⊕ T1 , π1 : Rm → Rm is the projection onto the V1 -component, and
T1♯ = {π1 τ1 : τ1 ∈ T1 }, then T1♯ is a covering matrix space.
We can now repeat the process. We choose a π1 A1 ∈ T1♯ such that W1 = (π1 A1 )(Rp ) has w1 = dim W1 6
n − t0 − 1 6 n − 2. We write Z1 = {τ1 ∈ T1 : Im(π1 τ1 ) ⊂ W1 }, T1 = Z1 ⊕ T2 (and so T = (Z0 ⊕ Z1 ) ⊕ T2 ),
t1 = dim Z1 > 1, V1 = W1 ⊕ V2 (and so Rm = (W0 ⊕ W1 ) ⊕ V2 ), π2 : Rm → Rm is the projection onto the
V2 -component, and T2♯ = {π2 τ2 : τ2 ∈ T2 }, so that T2♯ is also a covering matrix space, etc.
We conclude that
δ(T ) = w0 + δ(T1 ) = w0 + w1 + δ(T2 ) = · · ·
 
n
6 (n − 1) + (n − 2) + · · · 6 .
2
 
(b) We consider n2 × n matrices whose rows are indexed by n2 pairs (i, j) of integers 1 6 i < j 6 n. For every
u = (u1 , u2 , . . . , un ) ∈ Rn , consider the matrix A(u) whose entries A(u)(i,j),k with 1 6 i < j 6 n and 1 6 k 6 n
are given by 

 ui , k = j,
(A(u))(i,j),k = −uj , k = i,


0, otherwise.
It is immediate that Ker A(u) = R · u for every u 6= 0, so that S = {A(u) : u ∈ Rn } is a covering matrix space,
and in fact a minimal one.
On the other hand, for any 1 6 i < j 6 n, we have that A(ei )(i,j),j is the (i, j)th vector in the standard basis
n 
of R( 2 ) , where e denotes the ith vector in the standard basis of Rn . This means that δ(S) = n , as required.
i 2
Solution 2. (for part a)
Let us denote X = Rp , Y = Rm . For each x ∈ X, denote by µx : T → Y the evaluation map τ 7→ τ (x). As T
is a covering matrix space, ker µx > 0 for every x ∈ X. Let U = {x ∈ X : dim ker µx = 1}.
Let T1 be the span of the family of subspaces {ker µx : x ∈ U }. We claim that T1 = T . For suppose the
contrary, and let T ′ ⊂ T be a subspace of T of dimension n − 1 such that T1 ⊆ T ′ . This implies that T ′ is a
covering matrix space. Indeed, for x ∈ U , (ker µx ) ∩ T ′ = ker µx 6= 0, while for x ∈ / U we have dim µx ≥ 2, so that
(ker µx ) ∩ T ′ 6= 0 by computing dimensions. However, this is a contradiction as T is minimal.
Now we may choose x1 , x2 , . . . , xn ∈ U and τ1 , τ2 , . . . , τn ∈ T in such a way that ker µxi = Rτi and τi form a
basis of T . Let us complete x1 , . . . , xn to a sequence x1 , . . . , xd which spans X. Put yij = τi (xj ). It is clear that
yij span the vector space generated by the columns of all matrices in T . We claim that the subset {yij : i > j} is
n
enough to span this space, which clearly implies that δ(T ) 6 2 .
We have yii = 0. So it is enough to show that every yij with i < j can be expressed as a linear combination of
yki , k = 1, . . . , n. This follows from the following lemma:
Lemma. For every x0 ∈ U , 0 6= τ0 ∈ ker µx0 and x ∈ X, there exists a τ ∈ T such that τ0 (x) = τ (x0 ).
Proof. The operator µx0 has rank n − 1, which implies that for small ε the operator µx0 +εx also has rank n − 1.
Therefore one can produce a rational function τ (ε) with values in T such that mx0 +εx (τ (ε)) = 0. Taking the
derivative at ε = 0 gives µx0 (τ0 ) + µx (τ ′ (0)) = 0. Therefore τ = −τ ′ (0) satisfies the desired property.
Remark. Lemma in solution 2 is the same as the claim Im A ⊂ V at the beginning  of solution 1, but the proof given here
is different. It can be shown that all minimal covering spaces T with dim T = n2 are essentially the ones described in our
example.

4
IMC2010, Blagoevgrad, Bulgaria
Day 1, July 26, 2010

Problem 1. Let 0 < a < b. Prove that


Z b
2 2 2
(x2 + 1)e−x dx ≥ e−a − e−b .
a

Rx 2 2
Solution 1. Let f (x) = 0 (t2 + 1)e−t dt and let g(x) = −e−x ; both functions are increasing.
By Cauchy’s Mean Value Theorem, there exists a real number x ∈ (a, b) such that
2   r
f (b) − f (a) f 0 (x) (x2 + 1)e−x 1 1 1
= 0 = 2 = x+ ≥ x · = 1.
g(b) − g(a) g (x) 2xe−x 2 x x

Then Z b
2 2 2
(x2 + 1)e−x dx = f (b) − f (a) ≥ g(b) − g(a) = e−a − e−b .
a

Solution 2. Z Z
b
2 −x2
b
2  2 b 2 2
(x + 1)e dx ≥ 2xe−x dx = − e−x a = e−a − e−b .
a a

Problem 2. Compute the sum of the series


X

1 1 1
= + +··· .
k=0
(4k + 1)(4k + 2)(4k + 3)(4k + 4) 1·2·3·4 5·6·7·8

Solution 1. Let
X

x4k+4
F (x) = .
k=0
(4k + 1)(4k + 2)(4k + 3)(4k + 4)
This power series converges for |x| ≤ 1 and our goal is to compute F (1).
Differentiating 4 times, we get
X∞
1
(IV )
F (x) = x4k = .
k=0
1 − x4
Since F (0) = F 0 (0) = F 00 (0) = F 000 (0) = 0 and F is continuous at 1 − 0 by Abel’s continuity theorem,

1
integrating 4 times we get
Z y Z y
(IV ) dx 1 1 1
F (y) = F (0) +
000 000
F (x) dx = 4
= arctan y + log(1 + y) − log(1 − y) ,
0 1−x 2 4 4
Z z
0
Z z 
1 1 1
F (z) = F (0) +
00 00
F (y) dx =
000
arctan y + log(1 + y) − log(1 − y) dy =
2 4 4
 Z z 0
  0
Z z   Z z 
1 y 1 1
= z arctan z − 2
dy + (1 + z) log(1 + z) − dy + (1 − z) log(1 − z) + dy =
2 0 1+y 4 0 4 0
1 1 1 1
= z arctan z − log(1 + z 2 ) + (1 + z) log(1 + z) + (1 − z) log(1 − z) ,
Z t 2 4 4 4 
1 1 2 1 1
F (t) =
0
z arctan z − log(1 + z ) + (1 + z) log(1 + z) + (1 − z) log(1 − z) dt =
2 4 4 4
0
   
1 2 1 2
= (1 + t ) arctan t − t − t log(1 + t ) − 2t + 2 arctan t +
4 4
   
1 2 1 2 1 2 1 2
+ (1 + t) log(1 + t) − t − t − (1 − t) log(1 − t) + t − t =
8 2 8 2
1 1 1 1
= (−1 + t2 ) arctan t − t log(1 + t2 ) + (1 + t)2 log(1 + t) − (1 − t)2 log(1 − t) ,
Z 1 4 4 8 8 
1 2 1 2 1 2 1 2
F (1) = (−1 + t ) arctan t − t log(1 + t ) + (1 + t) log(1 + t) − (1 − t) log(1 − t) dt =
0 4 4 8 8
 3 2 3 3
1
−3t + t 1 − 3t 2 (1 + t) (1 − t) ln 2 π
= arctan t + log(1 + t ) + log(1 + t) + log(1 − t) = − .
12 24 24 24 0 4 24
Remark. The computation can be shorter if we change the order of integrations.
Z 1 Z t Z z Z y Z 1 Z 1 Z 1 Z 1
1 1
F (1) = 4
dx dy dz dt = 4
dt dz dy dz =
t=0 z=0 y=0 x=0 1 − x x=0 1 − x y=x z=y t=z
Z 1  Z 1 Z 1 Z 1  Z 1
1 1 1 (1 − x)3
= 4
dt dz dy dx = 4
· dx =
x=0 1 − x 6 y=x z=x t=x 0 1−x 6
 1
1 1 2 1 ln 2 π
= − arctan x − log(1 + x ) + log(1 + x) = − .
6 12 3 0 4 24
Solution 2. Let
X m m 
X 
1 1 1 1 1 1 1 1 1
Am = = · − · + · − · ,
k=0
(4k + 1)(4k + 2)(4k + 3)(4k + 4) k=0 6 4k + 1 2 4k + 2 2 4k + 3 6 4k + 4
Xm  
1 1
Bm = − ,
k=0
4k + 1 4k + 3
Xm  
1 1 1 1
Cm = − + − and
k=0
4k + 1 4k + 2 4k + 3 4k + 4
Xm  
1 1
Dm = − .
k=0
4k + 2 4k + 4
It is easy check that
1 1 1
Am = Cm − Bm − Dm .
3 6 6
Therefore,
π 1
2Cm − Bm − Dm 2 ln 2 − − ln 2 1 π
lim Am = lim = 4 2 = ln 2 − .
6 6 4 24

2

Problem 3. Define the sequence x1 , x2 , . . . inductively by x1 = 5 and xn+1 = x2n − 2 for each n ≥ 1.
Compute
x1 · x2 · x3 · · · xn
lim .
n→∞ xn+1
Solution. Let yn = x2n . Then yn+1 = (yn − 2)2 and yn+1 − 4 = yn (yn − 4). Since y2 = 9 > 5, we have
y3 = (y2 − 2)2 > 5 and inductively yn > 5, n ≥ 2. Hence, yn+1 − yn = yn2 − 5yn + 4 > 4 for all n ≥ 2, so
yn → ∞.
By yn+1 − 4 = yn (yn − 4),
 2
x1 · x2 · x3 · · · xn y1 · y2 · y3 · · · yn
=
xn+1 yn+1
yn+1 − 4 y1 · y2 · y3 · · · yn yn+1 − 4 y1 · y2 · y3 · · · yn−1
= · = · = ···
yn+1 yn+1 − 4 yn+1 yn − 4
yn+1 − 4 1 yn+1 − 4
= · = → 1.
yn+1 y1 − 4 yn+1
Therefore,
x1 · x2 · x3 · · · xn
lim = 1.
n→∞ xn+1

Problem 4. Let a, b be two integers and suppose that n is a positive integer for which the set

Z \ axn + by n | x, y ∈ Z

is finite. Prove that n = 1.


Solution. Assume that n > 1. Notice that n may be replaced by any prime divisor p of n. Moreover,
a and b should be coprime, otherwise the numbers not divisible by the greatest common divisor of a, b
cannot be represented as axn + by n .
If p = 2, then the number of the form ax2 + by 2 takes not all possible remainders modulo 8. If, say, b is
even, then ax2 takes at most three different remainders modulo 8, by 2 takes at most two, hence ax2 + by 2
takes at most 3 × 2 = 6 different remainders. If both a and b are odd, then ax2 + by 2 ≡ x2 ± y 2 (mod 4);
the expression x2 + y 2 does not take the remainder 3 modulo 4 and x2 − y 2 does not take the remainder 2
modulo 4.
Consider the case when p ≥ 3. The pth powers take exactly p different remainders modulo p2 . Indeed,
(x + kp)p and xp have the same remainder modulo p2 , and all numbers 0p , 1p , . . . , (p − 1)p are different
even modulo p. So, axp + by p take at most p2 different remainders modulo p2 . If it takes strictly less then
p2 different remainders modulo p2 , we get infinitely many non-representable numbers. If it takes exactly
p2 remainders, then axp + by p is divisible by p2 only if both x and y are divisible by p. Hence if axp + by p
is divisible by p2 , it is also divisible by pp . Again we get infinitely many non-representable numbers, for
example the numbers congruent to p2 modulo p3 are non-representable.

Problem 5. Suppose that a, b, c are real numbers in the interval [−1, 1] such that

1 + 2abc ≥ a2 + b2 + c2 .

Prove that
1 + 2(abc)n ≥ a2n + b2n + c2n
for all positive integers n.

3
Solution 1. Consider the symmetric matrix
 
1 a b
A = a 1 c  .
b c 1
     
1 a 1 b 1 c
By the constraint we have det A ≥ 0 and det , det , det ≥ 0. Hence A is positive
a 1 b 1 c 1
semidefinite, and A = B 2 for some symmetric real matrix B.
Let the rows of B be x, y, z. Then |x| = |y| = |z| = 1, a = x · y, b = y · z and c = z · x, where |x| and
x · y denote the Euclidean norm and scalar product. Denote by X = ⊗n x, Y = ⊗n y, Z = ⊗n z the nth
which belongto R3 . Then |X| = |Y | = |Z| = 1, X · Y = an , Y · Z = bn and Z · X = cn .
n
tensor powers, 
1 an bn
So, the matrix an 1 cn , being the Gram matrix of three vectors in R3 , is positive semidefinite, and
n

bn cn 1
its determinant, 1 + 2(abc)n − a2n − b2n − c2n is non-negative.
Solution 2. The constraint can be written as

(a − bc)2 ≤ (1 − b2 )(1 − c2 ). (1)

By the Cauchy-Schwarz inequality,


2 2
an−1 + an−2 bc + . . . + bn−1 cn−1 ≤ |a|n−1 + |a|n−2 |bc| + . . . + |bc|n−1 ≤
2  
≤ 1 + |bc| + . . . + |bc|n−1 ≤ 1 + |b|2 + . . . + |b|2(n−1) 1 + |c|2 + . . . + |c|2(n−1)

Multiplying by (1), we get

(a − bc)2 (an−1 + an−2 bc + . . . + bn−1 cn−1 )2 ≤


  
(1 − b2 ) 1 + |b|2 + . . . + |b|2(n−1) (1 − c2 ) 1 + |c|2 + . . . + |c|2(n−1) ,
(an − bn cn )2 ≤ (1 − bn )(1 − cn ),
1 + 2(abc)n ≥ a2n + b2n + b2n .

4
IMC2010, Blagoevgrad, Bulgaria
Day 2, July 27, 2010

Problem 1. (a) A sequence x1 , x2 , . . . of real numbers satisfies

xn+1 = xn cos xn for all n ≥ 1 .

Does it follow that this sequence converges for all initial values x1 ?
(b) A sequence y1 , y2, . . . of real numbers satisfies

yn+1 = yn sin yn for all n ≥ 1 .

Does it follow that this sequence converges for all initial values y1 ?
Solution 1. (a) NO. For example, for x1 = π we have xn = (−1)n−1 π, and the sequence is divergent.
(b) YES. Notice that |yn | is nonincreasing and hence converges to some number a ≥ 0.
If a = 0, then lim yn = 0 and we are done. If a > 0, then a = lim |yn+1| = lim |yn sin yn | = a·| sin a|,
so sin a = ±1 and a = (k + 12 )π for some nonnegative integer k.
Since the sequence |yn | is nonincreasing, there exists an index n0 such that (k + 21 )π ≤ |yn | <
(k
 + 1)π for all n > n0 . Then all the numbers yn0 +1 , yn0 +2 , . . . lie in the union of the intervals
1
(k + 2 )π, (k + 1)π and − (k + 1)π, −(k + 12 )π .   
Depending on the parity of k, in one of the intervals (k+ 21 )π, (k+1)π and −(k+1)π, −(k+ 21 )π
the values of the sine function is positive; denote this interval by I+ . In the other interval the sine
function is negative; denote this interval by I− . If yn ∈ I− for some n > n0 then yn and yn+1 = yn sin yn
have opposite signs, so yn+1 ∈ I+ . On the other hand, if If yn ∈ I+ for some n > n0 then yn and yn+1
have the same sign, so yn+1 ∈ I+ . In both cases, yn+1 ∈ I+ .
We obtained that the numbers yn0 +2 , yn0 +3 , . . . lie in I+ , so they have the same sign. Since |yn | is
convergent, this implies that the sequence (yn ) is convergent as well.
Solution 2 for part (b). Similarly to the first solution, |yn | → a for some real number a.
Notice that t · sin t = (−t) sin(−t) = |t| sin |t| for all real t, hence yn+1 = |yn | sin |yn | for all n ≥ 2.
Since the function t 7→ t sin t is continuous, yn+1 = |yn | sin |yn | → |a| sin |a| = a.
Problem 2. Let a0 , a1 , . . . , an be positive real numbers such that ak+1 − ak ≥ 1 for all k =
0, 1, . . . , n − 1. Prove that
        
1 1 1 1 1 1
1+ 1+ ··· 1+ ≤ 1+ 1+ ··· 1+ .
a0 a1 − a0 an − a0 a0 a1 an

Solution. Apply induction on n. Considering the empty product as 1, we have equality for n = 0.
Now assume that the statement is true for some n and prove it for n + 1. For n + 1, the statement
can be written as the sum of the inequalities
       
1 1 1 1 1
1+ 1+ ··· 1+ ≤ 1+ ··· 1+
a0 a1 − a0 an − a0 a0 an
(which is the induction hypothesis) and
       
1 1 1 1 1 1 1
1+ ··· 1+ · ≤ 1+ ··· 1+ · . (1)
a0 a1 − a0 an − a0 an+1 − a0 a0 an an+1
Hence, to complete the solution it is sufficient to prove (1).

1
To prove (1), apply a second induction. For n = 0, we have to verify
 
1 1 1 1
· ≤ 1+ .
a0 a1 − a0 a0 a1

Multiplying by a0 a1 (a1 − a0 ), this is equivalent with

a1 ≤ (a0 + 1)(a1 − a0 )
a0 ≤ a0 a1 − a20
1 ≤ a1 − a0 .

For the induction step it is sufficient that


   
1 an+1 − a0 1 an+1
1+ · ≤ 1+ · .
an+1 − a0 an+2 − a0 an+1 an+2

Multiplying by (an+2 − a0 )an+2 ,

(an+1 − a0 + 1)an+2 ≤ (an+1 + 1)(an+2 − a0 )


a0 ≤ a0 an+2 − a0 an+1
1 ≤ an+2 − an+1 .

Remark 1. It is easy to check from the solution that equality holds if and only if ak+1 − ak = 1 for
all k.
Remark 2. The statement of the problem is a direct corollary of the identity

X  ! Y n  
1 Y
n
1 1
1+ 1+ = 1+ .
i=0
xi j6=i xj − xi i=0
xi

Problem 3. Denote by Sn the group of permutations of the sequence (1, 2, . . . , n). Suppose that
G is a subgroup of Sn , such that for every π ∈ G \ {e} there exists a unique k ∈ {1, 2, . . . , n} for
which π(k) = k. (Here e is the unit element in the group Sn .) Show that this k is the same for all
π ∈ G \ {e}.
Solution. Let us consider the action of G on the set X = {1, . . . , n}. Let

Gx = { g ∈ G : g(x) = x} and Gx = { g(x) : g ∈ G}


be the stabilizer and the orbit of x ∈ X under this action, respectively. The condition of the problem
states that [
G= Gx (1)
x∈X

and
Gx ∩ Gy = {e} for all x 6= y. (2)
We need to prove that Gx = G for some x ∈ X.
Let Gx1 , . . . , Gxk be the distinct orbits of the action of G. Then one can write (1) as

[
k [
G= Gy . (3)
i=1 y∈Gxi

2
It is well known that
|G|
|Gx| = . (4)
|Gx |
Also note that if y ∈ Gx then Gy = Gx and thus |Gy| = |Gx|. Therefore,
|G| |G|
|Gx | = = = |Gy | for all y ∈ Gx. (5)
|Gx| |Gy|
Combining (3), (2), (4) and (5) we get

[k [ X k
|G|
|G| − 1 = |G \ {e}| = Gy \ {e} = (|Gxi | − 1),
|Gxi |
i=1 y∈Gxi i=1

hence
Xk  
1 1
1− = 1− . (6)
|G| i=1
|Gxi |
If for some i, j ∈ {1, . . . , k} |Gxi |, |Gxi | ≥ 2 then
k 
X     
1 1 1 1
1− ≥ 1− + 1− =1>1−
i=1
|Gxi | 2 2 |G|

which contradicts with (6), thus we can assume that

|Gx1 | = . . . = |Gxk−1 | = 1.

Then from (6) we get |Gxk | = |G|, hence Gxk = G.


Problem 4. Let A be a symmetric m × m matrix over the two-element field all of whose diagonal
entries are zero. Prove that for every positive integer n each column of the matrix An has a zero
entry.
Solution. Denote by ek (1 ≤ k ≤ m) the m-dimensional vector over F2 , whose k-th entry is 1 and all
the other elements are 0. Furthermore, let u be the vector whose all entries are 1. The k-th column
of An is An ek . So the statement can be written as An ek 6= u for all 1 ≤ k ≤ m and all n ≥ 1.
For every pair of vectors x = (x1 , . . . , xm ) and y = (y1 , . . . , ym ), define the bilinear form (x, y) =
xT y = x1 y1 + ... + xm ym . The product (x, y) has all basic properties of scalar products (except the
property that (x, x) = 0 implies x = 0). Moreover, we have (x, x) = (x, u) for every vector x ∈ F2m .
It is also easy to check that (w, Aw) = w T Aw = 0 for all vectors w, since A is symmetric and its
diagonal elements are 0.
Lemma. Suppose that v ∈ F2m a vector such that An v = u for some n ≥ 1. Then (v, v) = 0.
Proof. Apply induction on n. For odd values of n we prove the lemma directly. Let n = 2k + 1 and
w = Ak v. Then

(v, v) = (v, u) = (v, An v) = v T An v = v T A2k+1 v = (Ak v, Ak+1 v) = (w, Aw) = 0.

Now suppose that n is even, n = 2k, and the lemma is true for all smaller values of n. Let
w = Ak v; then Ak w = An v = u and thus we have (w, w) = 0 by the induction hypothesis. Hence,

(v, v) = (v, u) = v T An v = v T A2k v = (Ak v)T (Ak v) = (Ak v, Ak v) = (w, w) = 0.

The lemma is proved.

3
Now suppose that An ek = u for some 1 ≤ k ≤ m and positive integer n. By the Lemma, we
should have (ek , ek ) = 0. But this is impossible because (ek , ek ) = 1 6= 0.
Problem 5. Suppose that for a function f : R → R and real numbers a < b one has f (x) = 0 for
all x ∈ (a, b). Prove that f (x) = 0 for all x ∈ R if

X
p−1  
k
f y+ =0
k=0
p

for every prime number p and every real number y.


Solution. Let N > 1 be some integer to be defined later, and consider set of real polynomials
  
X k
n

JN = c0 + c1 x + . . . + cn x ∈ R[x] ∀x ∈ R
n
ck f x + =0 .
k=0
N

Notice that 0 ∈ JN , any linear combinations of any elements in JN is in JN , and for every P (x) ∈ JN
we have xP (x) ∈ JN . Hence, JN is an ideal of the ring R[x].
xN − 1
By the problem’s conditions, for every prime divisors of N we have N/p ∈ JN . Since R[x]
x −1
is a principal ideal domain (due to the Euclidean algorithm), the greatest common divisor of these
xN − 1
polynomials is an element of JN . The complex roots of the polynomial N/p are those Nth
x −1
roots of unity whose order does not divide N/p. The roots of the greatest common divisor is the
intersection of such sets; it can be seen that the intersection consist of the primitive Nth roots of
unity. Therefore,  N 
x − 1
gcd p N = ΦN (x)
xN/p − 1
is the Nth cyclotomic polynomial. So ΦN ∈ JN , which polynomial has degree ϕ(N).
ϕ(N) ϕ(N)
Now choose N in such a way that < b − a. It is well-known that lim inf = 0, so there
N N →∞ N
ϕ(N )
exists such a value for N. Let ΦN (x) = a0 + a1 x + . . . + aϕ(N ) x where aϕ(N ) = 1 and |a0 | = 1.
P
ϕ(N ) 
Then, by the definition of JN , we have ak f x + Nk = 0 for all x ∈ R.
k=0
1
If x ∈ [b, b + N
), then
X
ϕ(N )−1
ϕ(N )−k

f (x) = − ak f x − N
.
k=0

On the right-hand side, all numbers x − ϕ(NN)−k lie in (a, b). Therefore the right-hand side is zero,
and f (x) = 0 for all x ∈ [b, b + N1 ). It can be obtained similarly that f (x) = 0 for all x ∈ (a − N1 , a]
as well. Hence, f = 0 in the interval (a − N1 , b + N1 ). Continuing in this fashion we see that f must
vanish everywhere.

4
IMC2011, Blagoevgrad, Bulgaria
Day 1, July 30, 2011

Problem 1. Let f : R → R be a continuous function. A point x is called a shadow point if there exists a point y ∈ R with
y > x such that f (y) > f (x). Let a < b be real numbers and suppose that
• all the points of the open interval I = (a, b) are shadow points;
• a and b are not shadow points.
Prove that
a) f (x) ≤ f (b) for all a < x < b;
b) f (a) = f (b).
(José Luis Dı́az-Barrero, Barcelona)
Solution. (a) We prove by contradiction. Suppose that exists a point c ∈ (a, b) such that f (c) > f (b).
By Weierstrass’ theorem, f has a maximal value m on [c, b]; this value is attained at some point d ∈ [c, b]. Since
f (d) = max f ≥ f (c) > f (b), we have d 6= b, so d ∈ [c, b) ⊂ (a, b). The point d, lying in (a, b), is a shadow point, therefore
[c.b]
f (y) > f (d) for some y > d. From combining our inequalities we get f (y) > f (d) > f (b).
Case 1: y > b. Then f (y) > f (b) contradicts the assumption that b is not a shadow point.
Case 2: y ≤ b. Then y ∈ (d, b] ⊂ [c, b], therefore f (y) > f (d) = m = max f ≥ f (y), contradiction again.
[c,b]

(b) Since a < b and a is not a shadow point, we have f (a) ≥ f (b).
By part (a), we already have f (x) ≤ f (b) for all x ∈ (a, b). By the continuity at a we have

f (a) = lim f (x) ≤ lim f (b) = f (b)


x→a+0 x→a+0

Hence we have both f (a) ≥ f (b) and f (a) ≤ f (b), so f (a) = f (b).

Problem 2. Does there exist a real 3 × 3 matrix A such that tr(A) = 0 and A2 + At = I? (tr(A) denotes the trace of A,
At is the transpose of A, and I is the identity matrix.)
(Moubinool Omarjee, Paris)
Solution. The answer is NO.
Suppose that tr(A) = 0 and A2 + At = I. Taking the transpose, we have

A = I − (A2 )t = I − (At )2 = I − (I − A2 )2 = 2A2 − A4 ,

A4 − 2A2 + A = 0.

The roots of the polynomial x4 − 2x2 + x = x(x − 1)(x2 + x − 1) are 0, 1, −1± 2
5
so these numbers can be the eigenvalues of

1± 5
A; the eigenvalues of A2 can be 0, 1, 2 .
By tr(A) = 0, the sum of the eigenvalues is 0, and by tr(A2 ) = tr(I − At ) = 3 the sum of squares of the eigenvalues is 3.
It is easy to check that this two conditions cannot be satisfied simultaneously.

Problem 3. Let p be a prime number. Call a positive integer n interesting if

xn − 1 = (xp − x + 1)f (x) + pg(x)

for some polynomials f and g with integer coefficients.


a) Prove that the number pp − 1 is interesting.
b) For which p is pp − 1 the minimal interesting number?
(Eugene Goryachko and Fedor Petrov, St. Petersburg)
Solution. (a) Let’s reformulate the property of being interesting: n is interesting if xn − 1 is divisible by xp − x + 1 in the
ring of polynomials over Fp (the field of residues modulo p). All further congruences are modulo xp − x + 1 in this ring. We
2 3 2
have xp ≡ x − 1, then xp = (xp )p ≡ (x − 1)p ≡ xp − 1 ≡ x − 2, xp = (xp )p ≡ (x − 2)p ≡ xp − 2p ≡ x − 2p − 1 ≡ x − 3 and
p
so on by Fermat’s little theorem, finally xp ≡ x − p ≡ x,
p
−1
x(xp − 1) ≡ 0.
p
−1
Since the polynomials xp − x + 1 and x are coprime, this implies xp − 1 ≡ 0.

1
(b) We write
2
+···+pp−1 2 p−1
x1+p+p = x · xp · xp · . . . · xp ≡ x(x − 1)(x − 2) . . . (x − (p − 1)) = xp − x ≡ −1,
2 p−1
hence x2(1+p+p +···+p ) ≡ 1 and a = 2(1 + p + p2 + · · · + pp−1 ) is an interesting number.
2
If p > 3, then a = p−1 (pp − 1) < pp − 1, so we have an interesting number less than pp − 1. On the other hand, we show
that p = 2 and p = 3 do satisfy the condition. First notice that by gcd(xm − 1, xk − 1) = xgcd(m,k) − 1, for every fixed p the
greatest common divisors of interesting numbers is also an interesting number. Therefore the minimal interesting number
divides all interesting numbers. In particular, the minimal interesting number is a divisor of pp − 1.
For p = 2 we have pp − 1 = 3, so the minimal interesting number is 1 or 3. But x2 − x + 1 does not divide x − 1, so 1 is
not interesting. Then the minimal interesting number is 3.
For p = 3 we have pp − 1 = 26 whose divisors are 1, 2, 13, 26. The numbers 1 and 2 are too small and x13 ≡ −1 6≡ +1 as
shown above, so none of 1,2 and 13 is interesting. So 26 is the minimal interesting number.
Hence, pp − 1 is the minimal interesting number if and only if p = 2 or p = 3.

Problem 4. Let A1 , A2 , . . . , An be finite, nonempty sets. Define the function


X
n X
f (t) = (−1)k−1 t|Ai1 ∪Ai2 ∪...∪Aik | .
k=1 1≤i1 <i2 <...<ik ≤n

Prove that f is nondecreasing on [0, 1].


(|A| denotes the number of elements in A.)
(Levon Nurbekyan and Vardan Voskanyan, Yerevan)
S
n
Solution 1. Let Ω = Ai . Consider a random subset X of Ω which chosen in the following way: for each x ∈ Ω, choose
i=1
the element x for the set X with probability t, independently from the other elements.
Then for any set C ⊂ Ω, we have
P (C ⊂ X) = t|C| .
By the inclusion-exclusion principle,

P (A1 ⊂ X) or (A2 ⊂ X) or . . . or (An ⊂ X) =

X
n X 
= (−1)k−1 P Ai1 ∪ Ai2 ∪ . . . ∪ Aik ⊂ X =
k=1 1≤i1 <i2 <...<ik ≤n

X
n X
= (−1)k−1 t|Ai1 ∪Ai2 ∪...∪Aik | .
k=1 1≤i1 <i2 <...<ik ≤n

The probability P (A1 ⊂ X) or . . . or (An ⊂ X) is a nondecreasing function of the probability t.

Problem 5. Let n be a positive integer and let V be a (2n − 1)-dimensional vector space over the two-element field.
Prove that for arbitrary vectors v1 , . . . , v4n−1 ∈ V , there exists a sequence 1 ≤ i1 < . . . < i2n ≤ 4n − 1 of indices such that
vi1 + . . . + vi2n = 0.
(Ilya Bogdanov, Moscow and Géza Kós, Budapest)
Solution. Let V = aff{v1 , . . . , v4n−1 }. The statement vi1 + · · · + vi2n = 0 is translation-invariant (i.e. replacing the vectors
by v1 − a, . . . , v4n−1 − a), so we may assume that 0 ∈ V . Let d = dim V .
Lemma. The vectors can be permuted in such a way that v1 + v2 , v3 + v4 , . . . , v2d−1 + v2d form a basis of V .
Proof. We prove by induction on d. If d = 0 or d = 1 then the statement is trivial.
First choose the vector v1 such a way that aff(v2 , v3 , . . . , v4n−1 ) = V ; this is possible since V is generated by some d + 1
vectors and we have d + 1 ≤ 2n < 4n − 1. Next, choose v2 such that v2 6= v1 . (By d > 0, not all vectors are the same.)
Now let ℓ = {0, v1 + v2 } and let V ′ = V /ℓ. For any w ∈ V , let w̃ = ℓ + w = {w, w + v1 + v2 } be the class of the factor
space V ′ containing w. Apply the induction hypothesis to the vectors v˜3 , . . . , v4n−1 ˜ . Since dim V ′ = d − 1, the vectors can

permuted in such a way that v˜3 + v˜4 , . . . , v2d−1
˜ + v˜2d is a basis of V . Then v1 + v2 , v3 + v4 , . . . , v2d−1 + v2d is a basis of V .
Now we can assume that v1 + v2 , v3 + v4 , . . . , v2d−1 + v2d is a basis of V . The vector w = (v1 + v3 + · · · + v2d−1 ) + (v2d+1 +
v2d+2 + · · · + v2n+d ) is the sum of 2n vectors, so w ∈ V . Hence, w + ε1 (v1 + v2 ) + · · · + εd (v2d−1 + v2d ) = 0 with some
ε1 , . . . , εd ∈ F2 , therefore
X d   X
2n+d
(1 − εi )v2i−1 + εi v2i + vi = 0.
i=1 i=2d+1

The left-hand side is the sum of 2n vectors.

2
IMC2011, Blagoevgrad, Bulgaria
Day 2, July 31, 2011

1
Problem 1. Let (an )∞
n=0 be a sequence with 2 < an < 1 for all n ≥ 0. Define the sequence (xn )∞
n=0 by

an+1 + xn
x 0 = a0 , xn+1 = (n ≥ 0).
1 + an+1 xn

What are the possible values of lim xn ? Can such a sequence diverge?
n→∞
Johnson Olaleru, Lagos

Solution 1. We prove by induction that


1
0 < 1 − xn < .
2n+1
Then we will have (1 − xn ) → 0 and therefore xn → 1.
1
The case n = 0 is true since 2 < x0 = a0 < 1.
Supposing that the induction hypothesis holds for n, from the recurrence relation we get
an+1 + xn 1 − an+1
1 − xn+1 = 1 − = (1 − xn ).
1 + an+1 xn 1 + an+1 xn

By
1 − an+1 1 − 12 1
0< < =
1 + an+1 xn 1+0 2
we obtain
1 1 1 1
0 < 1 − xn+1 < (1 − xn ) < · n+1 = n+2 .
2 2 2 2
Hence, the sequence converges in all cases and xn → 1.
Solution 2. As is well-known,
tanh u + tanh v
tanh(u + v) =
1 + tanh u tanh v
for all real numbers u and v.
Setting un = ar tanh an we have xn = tanh(u0 + u1 + · · · + un ). Then u0 + u1 + · · · + un > (n + 1)ar tanh 12
and lim xn = lim tanh u = 1.
n→∞ u→∞
Remark. If the condition an ∈ ( 21 , 1) is replaced by an ∈ (0, 1) then the sequence remains increasing and bounded,
but the limit can be less than 1.
Problem 2. An alien race has three genders: male, female, and emale. A married triple consists of three persons,
one from each gender, who all like each other. Any person is allowed to belong to at most one married triple. A
special feature of this race is that feelings are always mutual — if x likes y, then y likes x.
The race is sending an expedition to colonize a planet. The expedition has n males, n females, and n emales.
It is known that every expedition member likes at least k persons of each of the two other genders. The problem
is to create as many married triples as possible to produce healthy offspring so the colony could grow and prosper.

a) Show that if n is even and k = n2 , then it might be impossible to create even one married triple.

b) Show that if k ≥ 3n
4 , then it is always possible to create n disjoint married triples, thus marrying all of the
expedition members.

Fedor Duzhin and Nick Gravin, Singapore

1
Solution. (a) Let M be the set of males, F the set of females, and E the set of emales. Consider the (tripartite)
graph G with vertices M ∪ F ∪ E and edges for likes. A 3-cycle is then a possible family. We’ll call G the graph
of likes.
First, let k = n2 . Then n has to be even and we need to construct a graph of likes with no 3-cycles. We’ll do
the following: divide each of the sets M , F , and E into two equal parts and draw all edges between two parts as
shown below:
F E

E
F

Clearly, there is no 3-cycle.


(b) First divide the the expedition into male-emale-female triples arbitrarily. Let the unhappiness of such a
subdivision be the number of pairs of aliens that belong to the same triple but don’t like each other. We shall show
that if unhappiness is positive, then the unhappiness can be decreased by a simple operation. It will follow that
after several steps the unhappiness will be reduced to zero, which will lead to the happy marriage of everybody.
Assume that we have an emale which doesn’t like at least one member of its triple (the other cases are similar).
We perform the following operation: we swap this emale with another emale, so that each of these two emales will
like the members of their new triples. Thus the unhappiness related to this emales will decrease, and the other
pairs that contribute to the unhappiness remain unchanged, therefore the unhappiness will be decreased.
So, it remains to prove that such an operation is always possible. Enumerate the triples with 1, 2, . . . , n and
denote by Ei , Fi , Mi the emale, female, and male members of the ith triple, respectively. Without loss of generality
we may assume that E1 doesn’t like either F1 or M1 or both. We have to find an index i > 1 such that Ei likes
the couple F1 , M1 and E1 likes the couple Fi , Mi ; then we can swap E1 and Ei .
There are at most n/4 indices i for which E1 dislikes Fi and at most n/4 indices for which E1 dislikes Mi , so
there are no more than n/2 indices i for which E1 dislikes someone from the couple Mi , Fi , and the set of these
undesirable indexes includes 1. Similarly, there are no more than n/2 indices such that either M1 or F1 dislikes
Ei . Since both undesirable sets of indices have at most n/2 elements and both contain 1, their union doesn’t cover
all indices, so we have some i which satisfies all conditions. Therefore we can always perform the operation that
decreases unhappiness.
Solution 2 (for part b). Suppose that k ≥ 3n 4 and let’s show that it’s possible to marry all of the colonists.
First, we’ll prove that there exists a perfect matching between M and F . We need to check the condition of Hall’s
marriage theorem. In other words, for A ⊂ M , let B ⊂ F be the set of all vertices of F adjacent to at least one
vertex of A. Then we need to show that |A| ≤ |B|. Let us assume the contrary, that is |A| > |B|. Clearly, |B| ≥ k
if A is not empty. Let’s consider any f ∈ F \ B. Then f is not adjacent to any vertex in A, therefore, f has degree
in M not more than n − |A| < n − |B| ≤ n − k ≤ n4 , a contradiction.
Let’s now construct a new bipartite graph, say H. The set of its vertices is P ∪ E, where P is the set of pairs
male–female from the perfect matching we just found. We will have an edge from (m, f ) = p ∈ P to e ∈ E for
each 3-cycle (m, f, e) of the graph G, where (m, f ) ∈ P and e ∈ E. Notice that the degree of each vertex of P in
H is then at least 2k − n.
What remains is to show that H satisfies the condition of Hall’s marriage theorem and hence has a perfect
matching. Assume, on the contrary, that the following happens. There is A ⊂ P and B ⊂ E such that |A| = l,
|B| < l, and B is the set of all vertices of E adjacent to at least one vertex of A. Since the degree of each vertex
of P is at least 2k − n, we have 2k − n ≤ |B| < l. On the other hand, let e ∈ E \ B. Then for each pair
(m, f ) = p ∈ P , at most one of the pairs (e, m) and (e, f ) is joined by an edge and hence the degree of e in G is
at most |M \ A| + |F \ A| + |A| = 2(n − l) + l = 2n − l. But the degree of any vertex of G is 2k and thus we get
2k ≤ 2n − l, that is, l ≤ 2n − 2k.
Finally, 2k − n < l ≤ 2n − 2k implies that k < 3n4 . This contradiction concludes the solution.
Problem 3. Determine the value of
X
∞      
1 1 1
ln 1 + · ln 1 + · ln 1 + .
n 2n 2n + 1
n=1

Gerhard Woeginger, Utrecht

2
Solution. Define f (n) = ln( n+1
n ) for n ≥ 1, and observe that f (2n)+f (2n+1) = f (n). The well-known inequality
ln(1 + x) ≤ x implies f (n) ≤ 1/n. Furthermore introduce
X
2n−1
g(n) = f 3 (k) < n f 3 (n) ≤ 1/n2 .
k=n

Then

g(n) − g(n + 1) = f 3 (n) − f 3 (2n) − f 3 (2n + 1)


= (f (2n) + f (2n + 1))3 − f 3 (2n) − f 3 (2n + 1)
= 3 (f (2n) + f (2n + 1)) f (2n) f (2n + 1)
= 3 f (n) f (2n) f (2n + 1),
therefore
X
N
1 X
N
1
f (n) f (2n) f (2n + 1) = g(n) − g(n + 1) = (g(1) − g(N + 1)) .
3 3
n=1 n=1
Since g(N + 1) → 0 as N → ∞, the value of the considered sum hence is
X

1 1 3
f (n) f (2n) f (2n + 1) = g(1) = ln (2).
3 3
n=1

f (k) − f (m)
Problem 4. Let f (x) be a polynomial with real coefficients of degree n. Suppose that is an integer
k−m
for all integers 0 ≤ k < m ≤ n. Prove that a − b divides f (a) − f (b) for all pairs of distinct integers a and b.
Fedor Petrov, St. Petersburg

Solution 1. We need the following


Lemma. Denote the least common multiple of 1, 2, . . . , k by L(k), and define
 
x
hk (x) = L(k) · (k = 1, 2, . . .).
k
Then the polynomial hk (x) satisfies the condition, i.e. a − b divides hk (a) − hk (b) for all pairs of distinct integers
a, b.
Proof. It is known that
  X k   
a a−b b
= .
k j k−j
j=0

(This formula can be proved by comparing the coefficient of xk in (1 + x)a and (1 + x)a−b (1 + x)b .) From here we
get
    Xk    Xk   
a b a−b b L(k) a − b − 1 b
hk (a) − hk (b) = L(K) − = L(K) = (a − b) .
k k j k−j j j−1 k−j
j=1 j=1

L(k)
On the right-hand side all fractions j are integers, so the right-hand side is a multiple of (a, b). The lemma is
proved.
x x
Expand the polynomial f in the basis 1, 1 , 2 ,... as
     
x x x
f (x) = A0 + A1 + A2 + · · · + An . (1)
1 2 n
We prove by induction on j that Aj is a multiple of L(j) for 1 ≤ j ≤ n. (In particular, Aj is an integer for j ≥ 1.)
Assume that L(j) divides Aj for 1 ≤ j ≤ m − 1. Substituting m and some k ∈ {0, 1, . . . , m − 1} in (1),

f (m) − f (k) X Aj hj (m) − hj (k)


m−1
Am
= · + .
m−k L(j) m−k m−k
j=1

3
Am
Since all other terms are integers, the last term m−k is also an integer. This holds for all 0 ≤ k < m, so Am is an
integer that is divisible by L(m).
Hence, Aj is a multiple of L(j) for every 1 ≤ j ≤ n. By the lemma this implies the problem statement.
Solution 2. The statement of the problem follows immediately from the following claim, applied to the polynomial
g(x, y) = f (x)−f
x−y
(y)
.
Claim. Let g(x, y) be a real polynomial of two variables with total degree less than n. Suppose that g(k, m) is an
integer whenever 0 ≤ k < m ≤ n are integers. Then g(k, m) is a integer for every pair k, m of integers.
Proof. Apply induction on n. If n = 1 then g is a constant. This constant can be read from g(0, 1) which is an
integer, so the claim is true.
Now suppose that n ≥ 2 and the claim holds for n − 1. Consider the polynomials

g1 (x, y) = g(x + 1, y + 1) − g(x, y + 1) and g2 (x, y) = g(x, y + 1) − g(x, y). (1)

For every pair 0 ≤ k < m ≤ n − 1 of integers, the numbers g(k, m), g(k, m + 1) and g(k + 1, m + 1) are all
integers, so g1 (k, m) and g2 (k, m) are integers, too. Moreover, in (1) the maximal degree terms of g cancel out, so
deg g1 , deg g2 < deg g. Hence, we can apply the induction hypothesis to the polynomials g1 and g2 and we thus
have g1 (k, m), g2 (k, m) ∈ Z for all k, m ∈ Z.
In view of (1), for all k, m ∈ Z, we have that

(a) g(0, 1) ∈ Z;

(b) g(k, m) ∈ Z if and only if g(k + 1, m + 1) ∈ Z;

(c) g(k, m) ∈ Z if and only if g(k, m + 1) ∈ Z.

For arbitrary integers k, m, apply (b) |k| times then apply (c) |m − k − 1| times as

g(k, m) ∈ Z ⇔ . . . ⇔ g(0, m − k) ∈ Z ⇔ . . . ⇔ g(0, 1) ∈ Z.

Hence, g(k, m) ∈ Z. The claim has been proved.

Problem 5. Let F = A0 A1 . . . An be a convex polygon in the plane. Define for all 1 ≤ k ≤ n − 1 the operation
fk which replaces F with a new polygon

fk (F ) = A0 . . . Ak−1 A′k Ak+1 . . . An ,

where A′k is the point symmetric to Ak with respect to the perpendicular bisector of Ak−1 Ak+1 . Prove that
(f1 ◦ f2 ◦ . . . ◦ fn−1 )n (F ) = F . We suppose that all operations are well-defined on the polygons, to which they are
applied, i.e. results are convex polygons again. (A0 , A1 , . . . , An are the vertices of F in consecutive order.)
Mikhail Khristoforov, St. Petersburg

Solution. The operations fi are rational maps on the 2(n − 1)-dimensional phase space of coordinates of the
vertices A1 , . . . , An−1 . To show that (f1 ◦ f2 ◦ . . . ◦ fn−1 )n is the identity, it is sufficient to verify this on some
open set. For example, we can choose a neighborhood of the regular polygon, then all intermediate polygons in
the proof will be convex.
Consider the operations fi . Notice that (i) fi ◦ fi = id and (ii) fi ◦ fj = fj ◦ fi for |i − j| ≥ 2. We also show
that (iii) (fi ◦ fi+1 )3 = id for 1 ≤ i ≤ n − 1.
The operations fi and fi+1 change the order of side lengths by interchanging two consecutive sides; after
performing (fi ◦ fi+1 )3 , the side lengths are in the original order. Moreover, the sums of opposite angles in
the convex quadrilateral Ai−1 Ai Ai+1 Ai+2 are preserved in all operations. These quantities uniquely determine
the quadrilateral, because with fixed sides, both angles ∠A1 A2 A3 and ∠A1 A4 A3 decrease when A1 A3 increases.
Hence, property (iii) is proved.
In the symmetric group Sn , the transpositions σi = (i, i + 1), which from a generator system, satisfy the same
properties (i–iii). It is well-known that Sn is the maximal group with n − 1 generators, satisfying (i–iii). In Sn we
have (σ1 ◦ σ2 ◦ . . . ◦ σn−1 )n = (1, 2, 3, . . . , n)n = id, so this implies (f1 ◦ f2 ◦ . . . ◦ fn−1 )n = id.

4
IMC 2012, Blagoevgrad, Bulgaria
Day 1, July 28, 2012

Problem 1. For every positive integer n, let p(n) denote the number of ways to express n as a sum
of positive integers. For instance, p(4) = 5 because

4 = 3 + 1 = 2 + 2 = 2 + 1 + 1 = 1 + 1 + 1 + 1.

Also define p(0) = 1.


Prove that p(n) − p(n − 1) is the number of ways to express n as a sum of integers each of which is
strictly greater than 1.
(Proposed by Fedor Duzhin, Nanyang Technological University)

Solution 1. The statement is true for n = 1, because p(0) = p(1) = 1 and the only partition of 1
contains the term 1. In the rest of the solution we assume n ≥ 2.
Let Pn = {(a1 , . . . , ak ) : k ∈ N, a1 ≥ . . . ≥ ak , a1 + . . . + ak = n} be the set of partitions of n,
and let Qn = {(a1 , . . . , ak ) ∈ Pn : ak = 1} the set of those partitions of n that contain the term 1.
The set of those partitions of n that do not contain 1 as a term, is Pn \ Qn . We have to prove that
|Pn \ Qn | = |Pn | − |Pn−1 |.
Define the map ϕ : Pn−1 → Qn as

ϕ(a1 , . . . , ak ) = (a1 , . . . , ak , 1).

This is a partition of n containing 1 as a term (so indeed ϕ(a1 , . . . , ak ) ∈ Qn ). Moreover, each partition
(a1 , . . . , ak , 1) ∈ Qn uniquely determines (a1 , . . . , ak ). Therefore the map ϕ is a bijection between the
sets Pn−1 and Qn . Then |Pn−1 | = |Qn |. Since Qn ⊂ Pn ,

|Pn \ Qn | = |Pn | − |Qn | = |Pn | − |Pn−1 | = p(n) − p(n − 1).

Solution 2 (outline). Denote by q(n) the number of partitions of n not containing 1 as term (q(0) = 1
as the only partition of 0 is the empty sum), and define the generating functions

X ∞
X
n
F (x) = p(n)x and G(x) = q(n)xn .
n=0 n=0

Since q(n) ≤ p(n) < 2n , these series converge in some interval, say for |x| < 21 , and the values uniquely
determine the coefficients.
According to Euler’s argument, we have
∞ ∞ ∞
X
n
Y
k 2k
Y 1
F (x) = p(n)x = (1 + x + x + . . .) =
n=0
1 − xk
k=1 k=1

and ∞ ∞ ∞
X
n
Y
k 2k
Y 1
G(x) = q(n)x = (1 + x + x + . . .) = k
.
n=0 k=2 k=2
1 − x
Then G(x) = (1−x)F (x). Comparing the coefficient of xn in this identity we get q(n) = p(n)−p(n−1).

Problem 2. Let n be a fixed positive integer. Determine the smallest possible rank of an n × n matrix
that has zeros along the main diagonal and strictly positive real numbers off the main diagonal.

1
(Proposed by Ilya Bogdanov and Grigoriy Chelnokov, MIPT, Moscow)

Solution. For n = 1 the only matrix is (0) with rank 0. For n = 2 the determinant of such a matrix
is negative, so the rank is 2. We show that for all n ≥ 3 the minimal rank is 3.
Notice that the first three rows are linearly independent. Suppose that some linear combination of
them, with coefficients c1 , c2 , c3 , vanishes. Observe that from the first column one deduces that c2 and
c3 either have opposite signs or both zero. The same applies to the pairs (c1 , c2 ) and (c1 , c3 ). Hence
they all must be zero.
It remains to give an example of a matrix of rank (at most) 3. For example, the matrix
 
02 12 22 . . . (n − 1)2
 (−1)2 02 12 . . . (n − 2)2   n
2
.. .. .. . = (i − j) =
 
.. ..
.
 
 . . .  i,j=1
(−n + 1)2 (−n + 2)2 (−n + 3)2 . . . 02
     
12 1 1
 22  2 1
=  ..  (1, 1, . . . , 1) − 2  ..  (1, 2, . . . , n) +  ..  (12 , 22 , . . . , n2 )
     
. . .
2
n n 1

is the sum of three matrices of rank 1, so its rank cannot exceed 3.

Problem 3. Given an integer n > 1, let Sn be the group of permutations of the numbers 1, 2, . . . , n.
Two players, A and B, play the following game. Taking turns, they select elements (one element at a
time) from the group Sn . It is forbidden to select an element that has already been selected. The game
ends when the selected elements generate the whole group Sn . The player who made the last move
loses the game. The first move is made by A. Which player has a winning strategy?
(Proposed by Fedor Petrov, St. Petersburg State University)

Solution. Player A can win for n = 2 (by selecting the identity) and for n = 3 (selecting a 3-cycle).
We prove that B has a winning strategy for n ≥ 4. Consider the moment when all permitted
moves lose immediately, and let H be the subgroup generated by the elements selected by the players.
Choosing another element from H would not lose immediately, so all elements of H must have been
selected. Since H and any other element generate Sn , H must be a maximal subgroup in Sn .
If |H| is even, then the next player is A, so B wins. Denote by ni the order of the subgroup generated
by the first i selected elements; then n1 |n2 |n3 | . . . . We show that B can achieve that n2 is even and
n2 < n!; then |H| will be even and A will be forced to make the final – losing – move.
Denote by g the element chosen by A on his first move. If the order n1 of g is even, then B may
choose the identical permutation id and he will have n2 = n1 even and n2 = n1 < n!.
If n1 is odd, then g is a product of disjoint odd cycles, so it is an even permutation. Then B can
chose the permutation h = (1, 2)(3, 4) which is another even permutation. Since g and h are elements
of the alternating group An , they cannot generate the whole Sn . Since the order of h is 2, B achieves
2|n2 .

Remark. If n ≥ 4, all subgrups of odd order are subgroups of An which has even order. Hence, all maximal
subgroups have even order and B is never forced to lose.

Problem 4. Let f : R → R be a continuously differentiable function that satisfies f ′ (t) > f (f (t)) for
all t ∈ R. Prove that f (f (f (t))) ≤ 0 for all t ≥ 0.

2
(Proposed by Tomáš Bárta, Charles University, Prague)

Solution.
Lemma 1. Either lim f (t) does not exist or lim f (t) 6= +∞.
t→+∞ t→+∞
Proof. Assume that the limit is +∞. Then there exists T1 > 0 such that for all t > T1 we have f (t) > 2.
There exists T2 > 0 such that f (t) > T1 for all t > T2 . Hence, f ′ (t) > f (f (t)) > 2 for t > T2 . Hence,
there exists T3 such that f (t) > t for t > T3 . Then f ′ (t) > f (f (t)) > f (t), f ′ (t)/f (t) > 1, after
integration ln f (t) − ln T3 > t − T3 , i.e. f (t) > T3 et−T3 for all t > T3 . Then f ′ (t) > f (f (t)) > T3 ef (t)−T3
and f ′ (t)e−f (t) > T3 e−T3 . Integrating from T3 to t yields e−f (T3 ) −e−f (t) > (t−T3 )T3 e−T3 . The right-hand
side tends to infinity, but the left-hand side is bounded from above, a contradiction. 2
Lemma 2. For all t > 0 we have f (t) < t.
Proof. By Lemma 1, there are some positive real numbers t with f (t) < t. Hence, if the statement is
false then there is some t0 > 0 with f (t0 ) = t0 .
Case I: There exist some value t ≥ t0 with f (t) < t0 . Let T = inf{t ≥ t0 : f (t) < t0 }. By the
continuity of f , f (T ) = t0 . Then f ′ (T ) > f (f (T )) = f (t0 ) = t0 > 0. This implies f > f (T ) = t0 in a
right neighbourhood, contradicting the definition of T .
Case II: f (t) ≥ t0 for all t ≥ t0 . Now we have f ′ (t) > f (f (t)) ≥ t0 > 0. So, f ′ has a positive lower
bound over (t0 , ∞), which contradicts Lemma 1. 2
Lemma 3. (a) If f (s1 ) > 0 and f (s2 ) ≥ s1 , then f (s) > s1 for all s > s2 .
(b) In particular, if s1 ≤ 0 and f (s1 ) > 0, then f (s) > s1 for all s > s1 .
Proof. Suppose that there are values s > s2 with f (s) ≤ s1 and let S = inf{s > s2 : f (s) ≤ s1 }. By
the continuity we have f (S) = s1 . Similarly to Lemma 2, we have f ′ (S) > f (f (S)) = f (s1 ) > 0. If
S > s2 then in a left neighbourhood of S we have f < s1 , contradicting the definition of S. Otherwise,
if S = s2 then we have f > s1 in a right neighbourhood of s2 , contradiction again.
Part (b) follows if we take s2 = s1 . 2
With the help of these lemmas the proof goes as follows. Assume for contradiction that there exists
some t0 > 0 with f (f (f (t0))) > 0. Let t1 = f (t0 ), t2 = f (t1 ) and t3 = f (t2 ) > 0. We show that
0 < t3 < t2 < t1 < t0 . By lemma 2 it is sufficient to prove that t1 and t2 are positive. If t1 < 0, then
f (t1 ) ≤ 0 (if f (t1 ) > 0 then taking s1 = t1 in Lemma 3(b) yields f (t0 ) > t1 , contradiction). If t1 = 0
then f (t1 ) ≤ 0 by lemma 2 and the continuity of f . Hence, if t1 ≤ 0, then also t2 ≤ 0. If t2 = 0 then
f (t2 ) ≤ 0 by lemma 2 and the continuity of f (contradiction, f (t2 ) = t3 > 0). If t2 < 0, then by lemma
3(b), f (t0 ) > t2 , so t1 > t2 . Applying lemma 3(a) we obtain f (t1 ) > t2 , contradiction. We have proved
0 < t3 < t2 < t1 < t0 .
By lemma 3(a) (f (t1 ) > 0, f (t0 ) ≥ t1 ) we have f (t) > t1 for all t > t0 and similarly f (t) > t2 for all
t > t1 . It follows that for t > t0 we have f ′ (t) > f (f (t)) > t2 > 0. Hence, limt→+∞ f (t) = +∞, which
is a contradiction. This contradiction proves that f (f (f (t))) ≤ 0 for all t > 0. For t = 0 the inequality
follows from the continuity of f .

Problem 5. Let a be a rational number and let n be a positive integer. Prove that the polynomial
X 2 (X + a)2 + 1 is irreducible in the ring Q[X] of polynomials with rational coefficients.
n n

(Proposed by Vincent Jugé, École Polytechnique, Paris)

Solution. First let us consider the case a = 0. The roots of X 2 + 1 are exactly all primitive roots
n+1

of unity of order 2n+2 , namely e2πi 2n+2 for odd k = 1, 3, 5, . . . , 2n+2 − 1. It is a cyclotomic polynomial,
k

hence irreducible in Q[X].


Let now a 6= 0 and suppose that the polynomial in the question is reducible. Substituting X = Y − a2
2
we get a polynomial (Y − a2 )2 (Y + a2 )2 + 1 = (Y 2 − a4 )2 + 1. It is again a cyclotomic polynomial
n n n

2
in the variable Z = Y 2 − a4 , and therefore it is not divisible by any polynomial in Y 2 with rational

3
coefficients. Let us write this polynomial as the product of irreducible monic polynomials in Y with
appropriate multiplicities, i.e.
r
 a2 2n Y
Y2− +1= fi (Y )mi fi monic, irreducible, all different.
4 i=1

Since the left-hand side is a polynomial in Y 2 we must have i fi (Y )mi = i fi (−Y )mi . By the above
Q Q
argument non of the fi is a polynomial in Y 2 , i.e. fi (−Y ) 6= fi (Y ). Therefore for every i there is i′ 6= i
such that fi (−Y ) = ±fi′ (Y ). In particular r is even and irreducible factors fi split into pairs. Let us
renumber them so that f1 , . . . , f 2r belong to different pairs and we have fi+ r2 (−Y ) = ±fi (Y ). Consider
the polynomial f (Y ) = r/2 mi n 2 a2 2n
Q
i=1 fi (Y ) . nThis polynomial is monic of degree 2 and (Y − 4 ) +1 =
2
f (Y )f (−Y ). Let us write f (Y ) = Y + · · · + b where b ∈ Q is the constant term, i.e. b = f (0).
2n+1 2n−1
Comparing constant terms we then get a2 + 1 = b2 . Denote c = a2 . This is a nonzero
4 2
rational number and we have c + 1 = b .
It remains to show that there are no rational solutions c, b ∈ Q to the equation c4 +1 = b2 with c 6= 0
which will contradict our assumption that the polynomial under consideration is reducible. Suppose
there is a solution. Without loss of generality we can assume that c, b > 0. Write c = uv with u and
v coprime positive integers. Then u4 + v 4 = (bv 2 )2 . Let us denote w = bv 2 , this must be a positive
integer too since u, v are positive integers. Let us show that the set T = {(u, v, w) ∈ N3 | u4 + v 4 =
w 2 and u, v, w ≥ 1} is empty. Suppose the contrary and consider some triple (u, v, w) ∈ T such that
w is minimal. Without loss of generality, we may assume that u is odd. (u2, v 2 , w) is a primitive
Pythagorean triple and thus there exist relatively prime integers d > e ≥ 1 such that u2 = d2 − e2 ,
v 2 = 2de and w = d2 + e2 . In particular, considering the equation u2 = d2 − e2 in Z/4Z proves that
d is odd and e is even. Therefore, we can write d = f 2 and e = 2g 2 . Moreover, since u2 + e2 = d2 ,
(u, e, d) is also a primitive Pythagorean triple: there exist relatively prime integers h > i ≥ 1 such that
u = h2 − i2 , e = 2hi = 2g 2 and d = h2 + i2 . Once again, we can write h = k 2 and i = l2 , so that we
obtain the relation f 2 = d = h2 + i2 = k 4 + l4 and (k, l, f ) ∈ T . Then, the inequality w > d2 = f 4 ≥ f
contradicts the minimality of w.

Remark 1. One can also use Galois theory arguments in order to solve this question. Let us denote the
polynomial in the question by P (X) = X 2 (X + a)2 + 1 and we will also need the cyclotomic polynomial
n n

T (X) = X 2 + 1. As we already said, when a = 0 then P (X) is itself cyclotomic and hence irreducible. Let
n

now a 6= 0 and x be any complex root of P (x) = 0. Then ζ = x(x + a) satisfies T (ζ) = 0, hence it is a primitive
root of unity of order 2n+1 . The
 field Q[x] is then an extension of Q[ζ]. The latter field is cyclotomic and
its degree over Q is dimQ Q[ζ] = 2n . Since the polynomial in the question has degree 2n+1 we see that it is
reducible if and only if the above mentioned extension is trivial, i.e. Q[x] = Q[ζ]. For the sake of contradiction
we will now assume that this is indeed the case. Let S(X) be the minimal polynomial of x over Q. The
degree ofQS is then 2n and we can number its roots by odd numbers in the set I = {1, 3, . . . , 2n+1 − 1} so that
S(X) = k∈I (X − xk ) and xk (xk + a) = ζ k because Galois automorphisms of Q[ζ] map ζ to ζ k , k ∈ I. Then
one has
Y Y 
X(X + a) − ζ k = T X(X + a) = P (X) .

S(X)S(−a − X) = (X − xk )(−a − X − xk ) = (−1)|I|
k∈I k∈I

2n+1   n 2
2 a 2
 n−1
In particular P (− a2 ) = S(− a2 )2 , i.e. a2 +1 = a2 +1 . Therefore the rational numbers c = 2 6= 0
2n
and b = a2 + 1 satisfy c4 + 1 = b2 which is a contradiction as it was shown in the first proof.

Remark 2. It is well-known that the Diophantine equation x4 + y 4 = z 2 has only trivial solutions (i.e. with
x = 0 or y = 0). This implies immediately that c4 + 1 = b2 has no rational solution with nonzero c.

4
IMC 2012, Blagoevgrad, Bulgaria
Day 2, July 29, 2012

Problem 1. Consider a polynomial

f (x) = x2012 + a2011 x2011 + . . . + a1 x + a0 .

Albert Einstein and Homer Simpson are playing the following game. In turn, they choose one of the
coefficients a0 , . . . , a2011 and assign a real value to it. Albert has the first move. Once a value is assigned
to a coefficient, it cannot be changed any more. The game ends after all the coefficients have been
assigned values.
Homer’s goal is to make f (x) divisible by a fixed polynomial m(x) and Albert’s goal is to prevent
this.

(a) Which of the players has a winning strategy if m(x) = x − 2012?

(b) Which of the players has a winning strategy if m(x) = x2 + 1?

(Proposed by Fedor Duzhin, Nanyang Technological University)


Solution. We show that Homer has a winning strategy in both part (a) and part (b).
(a) Notice that the last move is Homer’s, and only the last move matters. Homer wins if and only if
f (2012) = 0, i.e.

20122012 + a2011 20122011 + . . . + ak 2012k + . . . + a1 2012 + a0 = 0. (1)

Suppose that all of the coefficients except for ak have been assigned values. Then Homer’s goal is to
establish (1) which is a linear equation on ak . Clearly, it has a solution and hence Homer can win.
(b) Define the polynomials

g(y) = a0 + a2 y + a4 y 2 + . . . + a2010 y 1005 + y 1006 and h(y) = a1 + a3 y + a5 y 2 + . . . + a2011 y 1005 ,

so f (x) = g(x2 ) + h(x2 ) · x. Homer wins if he can achieve that g(y) and h(y) are divisible by y + 1, i.e.
g(−1) = h(−1) = 0.
Notice that both g(y) and h(y) have an even number of undetermined coefficients in the beginning
of the game. A possible strategy for Homer is to follow Albert: whenever Albert assigns a value to a
coefficient in g or h, in the next move Homer chooses the value for a coefficient in the same polynomial.
This way Homer defines the last coefficient in g and he also chooses the last coefficient in h. Similarly
to part (a), Homer can choose these two last coefficients in such a way that both g(−1) = 0 and
h(−1) = 0 hold.
1
Problem 2. Define the sequence a0 , a1 , . . . inductively by a0 = 1, a1 = 2
and

na2n
an+1 = for n ≥ 1.
1 + (n + 1)an

X ak+1
Show that the series converges and determine its value.
k=0
ak
(Proposed by Christophe Debry, KU Leuven, Belgium)

1
Solution. Observe that
(1 + (k + 1)ak )ak+1 ak+1
kak = = + (k + 1)ak+1 for all k ≥ 1,
ak ak
and hence
n n
X ak+1 a1 X 1
= + (kak − (k + 1)ak+1 ) = + 1 · a1 − (n + 1)an+1 = 1 − (n + 1)an+1 (1)
k=0
ak a0 k=1 2

for all n ≥ 0.
n ∞
P ak+1 P ak+1
By (1) we have ak
< 1. Since all terms are positive, this implies that the series ak
is
k=0 k=0
a
convergent. The sequence of terms, k+1
ak
must converge to zero. In particular, there is an index n0 such
ak+1 1
that ak < 2 for n ≥ n0 . Then, by induction on n, we have an < 2Cn with some positive constant C.
From nan < Cn2n
→ 0 we get nan → 0, and therefore
∞ n
X ak+1 X ak+1  
= lim = lim 1 − (n + 1)an+1 = 1.
ak n→∞ ak n→∞
k=0 k=0

1
Remark. The inequality an ≤ 2n can be proved by a direct induction as well.

Problem 3. Is the set of positive integers n such that n! + 1 divides (2012n)! finite or infinite?
(Proposed by Fedor Petrov, St. Petersburg State University)

Solution 1. Consider a positive integer n with n! + 1 (2012n)!. It is well-known that for arbitrary
nonnegative integers a1 , . . . , ak , the number (a1 + . . . + ak )! is divisible by a1 ! · . . . · ak !. (The number
of sequences consisting of a1 digits 1, . . . , ak digits k, is (aa11+...+a k )!
!·...·ak !
.) In particular, (n!)2012 divides
(2012n)!.
Since n! + 1 is co-prime with (n!)2012 , their product (n! + 1)(n!)2012 also divides (2012n)!, and
therefore
(n! + 1) · (n!)2012 ≤ (2012n)! .
n
By the known inequalities n+1 e
< n! ≤ nn , we get
 n 2013n
< (n!)2013 < (n! + 1) · (n!)2012 ≤ (2012n)! < (2012n)2012n
e
n < 20122012 e2013 .

Therefore, there are only finitely many such integers n.


n+1 n

Remark. Instead of the estimate e < n!, we may apply the Multinomial theorem:
X N!
(x1 + · · · + xℓ )N = xk11 . . . xkℓ ℓ .
k1 ! · . . . · kℓ !
k1 +...+kℓ =N

Applying this to N = 2012n, ℓ = 2012 and x1 = . . . = xℓ = 1,

(2012n)!
< (1| + 1 +{z. . . + 1})2012n = 20122012n ,
(n!)2012
2012
(2012n)!
n! < n! + 1 ≤ < 20122012n .
(n!)2012

2
On the right-hand side we have a geometric progression which increases slower than the factorial
on the left-hand side, so this is true only for finitely many n.

Solution 2. Assume that n > 2012 is an integer with n! + 1 (2012n)!. Notice that all prime divisors
of n! + 1 are greater than n, and all prime divisors of (2012n)! are smaller than
h 2012n.
i
Consider a prime p with n < p < 2012n. Among 1, 2, . . . , 2012n there are 2012n
p
< 2012 numbers
divisible by p; by p2 > n2 > 2012n, none of them is divisible by p2 . Therefore, the exponent of p in the
prime factorization of (2012n)! is at most 2011. Hence,
Y
p2011 .

n! + 1 = gcd n! + 1, (2012n)! <
n<p<2012p

p < 4X ,
Q
Applying the inequality
p≤X
!2011
Y
2011
Y 2011 n
n! < p < p < 42012n = 42012·2011 . (2)
n<p<2012p p<2012n

Again, we have a factorial on the left-and side and a geometric progression on the right-hand side.

Problem 4. Let n ≥ 2 be an integer. Find all real numbers a such that there exist real numbers x1 ,
. . . , xn satisfying
x1 (1 − x2 ) = x2 (1 − x3 ) = . . . = xn−1 (1 − xn ) = xn (1 − x1 ) = a. (1)
(Proposed by Walther Janous and Gerhard Kirchner, Innsbruck)
Solution. Throughout the solution we will use the notation xn+1 = x1 .
We prove that the set of possible values of a is
  ( )
1 [ 1 n
−∞, ; k ∈ N, 1 ≤ k < .
4 4 cos2 kπ
n
2

In the case a ≤ 14 we can choose x1 such that x1 (1 − x1 ) = a and set x1 = x2 = . . . = xn . Hence we


will now suppose that a > 14 .
The system (1) gives the recurrence formula
a xi − a
xi+1 = ϕ(xi ) = 1 − = , i = 1, . . . , n.
xi xi
The fractional linear transform ϕ can be interpreted as a projective transform of the real projective
line R∪ {∞}; the map ϕ is an element of the group PGL2 (R), represented by the linear transform
1 −a
M = . (Note that det M 6= 0 since a 6= 0.) The transform ϕn can be represented by M n . A
1 0
point [u, v] (written in homogenous coordinates) is a fixed point of this transform if and only if (u, v)T
is an eigenvector of M n . Since the entries of M n and the coordinates u, v are real, the corresponding
eigenvalue is real, too.
The characteristic polynomial of M is x2 − x + a, which has no real root for a > 41 . So M has two

conjugate complex eigenvalues λ1.2 = 12 1 ± 4a − 1i . The eigenvalues of M n are λn1,2 , they are real
if and only if arg λ1,2 = ± kπ
n
with some integer k; this is equivalent with
√ kπ
± 4a − 1 = tan ,
n
1 1
1 + tan2 kπ

a= n
= kπ
.
4 4 cos2 n

3
If arg λ1 = kπ n
then λn1 = λn2 , so the eigenvalues of M n are equal. The eigenvalues of M are distinct,
so M and M have two linearly independent eigenvectors. Hence, M n is a multiple of the identity. This
n

means that the projective transform ϕn is the identity; starting from an arbitrary point x1 ∈ R ∪ {∞},
the cycle x1 , x2 , . . . , xn closes at xn+1 = x1 . There are only finitely many cycles x1 , x2 , . . . , xn containing
the point ∞; all other cycles are solutions for (1).
Remark. If we write xj = P + Q tan tj where P, Q and t1 , . . . , tn are real numbers, the recurrence relation
re-writes as
(P + Q tan tj )(1 − P − Q tan tj+1 ) = a
(1 − P )Q tan tj − P Q tan tj+1 = a + P (P − 1) + Q2 tan tj tan tj+1 (j = 1, 2, . . . , n).
tan α − tan β q
In view of the identity tan(α − β) = , it is reasonable to choose P = 21 , and Q = a − 41 . Then
1 + tan α tan β
the recurrence leads to √
tj − tj+1 ≡ arctan 4a − 1 (mod π).

Problem 5. Let c ≥ 1 be a real number. Let G be an abelian group and let A ⊂ G be a finite set
satisfying |A + A| ≤ c|A|, where X + Y := {x + y | x ∈ X, y ∈ Y } and |Z| denotes the cardinality of
Z. Prove that
k
|A
| +A+ {z. . . + A} | ≤ c |A|
k times
for every positive integer k. (Plünnecke’s inequality)
(Proposed by Przemyslaw Mazur, Jagiellonian University)
Solution. Let B be a nonempty subset of A for which the value of the expression c1 = |A+B||B|
is the
least possible. Note that c1 ≤ c since A is one of the possible choices of B.
Lemma 1. For any finite set D ⊂ G we have |A + B + D| ≤ c1 |B + D|.
Proof. Apply induction on the cardinality of D. For |D| = 1 the Lemma is true by the definition of c1 .
Suppose it is true for some D and let x 6∈ D. Let B1 = {y ∈ B | x + y ∈ B + D}. Then B + (D ∪ {x})
decomposes into the union of two disjoint sets:

B + (D ∪ {x}) = (B + D) ∪ (B \ B1 ) + {x}
and therefore |B + (D ∪ {x})| = |B + D| + |B| − |B1 |. Now we need to deal with the cardinality of the
set A + B + (D ∪ {x}). Writing A + B + (D ∪ {x}) = (A + B + D) ∪ (A + B + {x}) we count some
of the elements twice: for example if y ∈ B1 , then A + {y} + {x} ⊂ (A + B + D) ∩ (A + B + {x}).
Therefore all the elements of the set A + B1 + {x} are counted twice and thus
|A + B + (D ∪ {x})| ≤ |A + B + D| + |A + B + {x}| − |A + B1 + {x}| =
= |A + B + D| + |A + B| − |A + B1 | ≤ c1 (|B + D| − |B| − |B1 |) = c1 |B + (D ∪ {x})|,
|A+B|
where the last inequality follows from the inductive hypothesis and the observation that |B|
= c1 ≤
|A+B1 |
|B1 |
(or B1 is the empty set). 2
Lemma 2. For every k ≥ 1 we have | A . . + A} +B| ≤ ck1 |B|.
| + .{z
k times
Proof. Induction on k. For k = 1 the statement is true by definition of c1 . For greater k set D =
A . . + A} in the previous lemma: | |A + .{z
| + .{z . . + A} +B| ≤ c1 | A . . + A} +B| ≤ ck1 |B|.
| + .{z 2
k−1 times k times k−1 times
Now notice that
|A . . + A} | ≤ | A
| + .{z . . + A} +B| ≤ ck1 |B| ≤ ck |A|.
| + .{z
k times k times

Remark. The proof above due to Giorgios Petridis and can be found at http://gowers.wordpress.com/
2011/02/10/a-new-way-of-proving-sumset-estimates/

4
IMC 2012, Blagoevgrad, Bulgaria
Day 1, July 28, 2012

Problem 1. Let A and B be real symmetric matrices with all eigenvalues strictly greater than 1. Let
λ be a real eigenvalue of matrix AB. Prove that |λ| > 1.
(Proposed by Pavel Kozhevnikov, MIPT, Moscow)

Solution. The transforms given by A and B strictly increase the length of every nonzero vector, this
can be seen easily in a basis where the matrix is diagonal with entries greater than 1 in the diagonal.
Hence their product AB also strictly increases the length of any nonzero vector, and therefore its real
eigenvalues are all greater than 1 or less than −1.

Problem 2. Let f : R → R be a twice differentiable function. Suppose f (0) = 0. Prove that there
exists ξ ∈ (−π/2, π/2) such that
f 00 (ξ) = f (ξ)(1 + 2 tan2 ξ).
(Proposed by Karen Keryan, Yerevan State University, Yerevan, Armenia )

Solution. Let g(x) = f (x) cos x. Since g(−π/2) = g(0) = g(π/2) = 0, by Rolle’s theorem there exist
some ξ1 ∈ (−π/2, 0) and ξ2 ∈ (0, π/2) such that

g 0 (ξ1 ) = g 0 (ξ2 ) = 0.

Now consider the function


g 0 (x) f 0 (x) cos x − f (x) sin x
h(x) = = .
cos2 x cos2 x
We have h(ξ1 ) = h(ξ2 ) = 0, so by Rolle’s theorem there exist ξ ∈ (ξ1 , ξ2 ) for which

g 00 (ξ) cos2 ξ + 2 cos ξ sin ξg 0 (ξ)


0 = h0 (ξ) = =
cos4 ξ
(f 00 (ξ) cos ξ − 2f 0 (ξ) sin ξ − f (ξ) cos ξ) cos ξ + 2 sin ξ(f 0 (ξ) cos ξ − f (ξ) sin ξ)
= =
cos3 ξ
f 00 (ξ) cos2 ξ − f (ξ)(cos2 ξ + 2 sin2 ξ) 1
= 3
= (f 00 (ξ) − f (ξ)(1 + 2 tan2 ξ)).
cos ξ cos ξ
The last yields the desired equality.

Problem 3. There are 2n students in a school (n ∈ N, n ≥ 2). Each week n students go on a trip.
After several trips the following condition was fulfilled: every two students were together on at least
one trip. What is the minimum number of trips needed for this to happen?
(Proposed by Oleksandr Rybak, Kiev, Ukraine)

Solution. We prove that for any n ≥ 2 the answer is 6.


First we show that less than 6 trips is not sufficient. In that case the total quantity of students in
all trips would not exceed 5n. A student meets n − 1 other students in each trip, so he or she takes
part on at least 3 excursions to meet all of his or her 2n − 1 schoolmates. Hence the total quantity of
students during the trips is not less then 6n which is impossible.
Now let’s build an example for 6 trips.

1
If n is even, we may divide 2n students into equal groups A, B, C, D. Then we may organize the
trips with groups (A, B), (C, D), (A, C), (B, D), (A, D) and (B, C), respectively.
If n is odd and divisible by 3, we may divide all students into equal groups E, F , G, H, I, J.
Then the members of trips may be the following: (E, F, G), (E, F, H), (G, H, I), (G, H, J), (E, I, J),
(F, I, J).
In the remaining cases let n = 2x+3y be, where x and y are natural numbers. Let’s form the groups
A, B, C, D of x students each, and E, F , G, H, I, J of y students each. Then we apply the previous
cases and organize the following trips: (A, B, E, F, G), (C, D, E, F, H), (A, C, G, H, I), (B, D, G, H, J),
(A, D, E, I, J), (B, C, F, I, J).

n n
x2i
P P
Problem 4. Let n ≥ 3 and let x1 , . . . , xn be nonnegative real numbers. Define A = xi , B =
i=1 i=1
n
x3i . Prove that
P
and C =
i=1

(n + 1)A2 B + (n − 2)B 2 ≥ A4 + (2n − 2)AC.

(Proposed by Géza Kós, Eötvös University, Budapest)

Solution. Let
n
Y A2 − B n−2 A3 − 3AB + 2C n−3
p(X) = (X − xi ) = X n − AX n−1 + X − X + ....
i=1
2 6

The (n − 3)th derivative of p has three nonnegative real roots 0 ≤ u ≤ v ≤ w. Hence,

6 (n−3) 3A 2 3(A2 − B) A3 − 3AB + 2C


p (X) = X 3 − X + X− = (X − u)(X − v)(X − w),
n! n n(n − 1) n(n − 1)(n − 2)
so
3A 3(A2 − B) A3 − 3AB + 2C
u+v+w = , uv + vw + wu = and uvw = .
n n(n − 1) n(n − 1)(n − 2)
From these we can see that
n2 (n − 1)2 (n − 2)
(n + 1)A2 B + (n − 2)B 2 − A4 − (2n − 2)AC = . . . =

9
= u2 v 2 + v 2 w2 + w2 u2 − uvw(u + v + w) = uv(u − w)(v − w) + vw(v − u)(w − u) + wu(w − v)(u − v) ≥
≥ 0 + uw(v − u)(w − v) + wu(w − v)(u − v) = 0.

Problem 5. Does
P∞ there exist a sequence (an ) of complex numbers such that for every positive integer
p
p we have that n=1 an converges if and only if p is not a prime?
(Proposed by Tomáš Bárta, Charles University, Prague)

Solution. The answer is YES. We prove a more general statement; suppose that N = C ∪ D is an

P∞ p decomposition of N into two disjoint sets. Then there exists a sequence (an )n=1 such that
arbitrary
n=1 an is convergent for p ∈ C and divergent for p ∈ D.
Define Ck = C ∩ [1, k] and Dk ∩ [1, k].

2
Lemma. For every positive integer k there exists a positive integer Nk and a sequence Xk = (xk,1 , . . . , xk,Nk )
of complex numbers with the following properties:
N
Xk
(a) For p ∈ Dk , we have xpk,j ≥ 1.


j=1

Nk

X X m 1
(b) For p ∈ Ck , we have xpk,j = 0; moreover, xpk,j ≤ holds for 1 ≤ m ≤ Nk .

k
j=1 j=1

Proof. First we find some complex numbers z1 . . . , zk with


k
(
X 0 p ∈ Ck
zjp = (1)
j=1
1 p ∈ Dk

As is well-known, this system of equations is equivalent to another system σν (z1 , . . . , zk ) = wν (ν =


1, 2, . . . , k) where σν is the νth elementary symmetric polynomial, and the constants wν are uniquely
determined by the Newton-Waring-Girard formulas. Then the numbers z1 , . . . , zk are the roots of the
polynomial z k − w1 z k−1 + − . . . + (−1)k wk in some order.
Now let & m '
X p
M= max zj
1≤m≤k, p∈Ck
j=1
k z1 z2 zk
and let Nk = k·(kM ) . We define the numbers xk,1 . . . , xk,Nk by repeating the sequence ( kM , kM , . . . , kM )
z
(kM )k times, i.e. xk,` = kMj if ` ≡ j (mod k). Then we have
Nk k k
zj p
X X X
xpk,j = (kM ) k
kM
= (kM ) k−p
zjp ;
j=1 j=1 j=1

then from (1) the properties (a) and the first part of (b) follows immediately. For the second part of
(b), suppose that p ∈ Ck and 1 ≤ m ≤ Nk ; then m = kr + s with some integers r and 1 ≤ s ≤ k and
hence
m kr kr+s s 
X
p
X X X zj  p M 1
xk,j = + = ≤ ≤ .

kM (kM ) p k


j=1 j=1 j=kr+1 j=1

The lemma is proved.


Now let Sk = N1 . . . , Nk (we also define S0 = 0). Define the sequence (a) by simply concatenating
the sequences X1 , X2 , . . . :
(a1 , a2 , . . . ) = (x1,1 , . . . , x1,N1 , x2,1 , . . . , x2,N2 , . . . , xk,1 , . . . , xk,Nk , . . .); (1)
aSk +j = xk+1,j (1 ≤ j ≤ Nk+1 ). (2)
If p ∈ D and k ≥ p then S N
X k+1 X k+1
p p
a = x k+1,j ≥ 1;

j

j=Sk +1 j=1
P p
By Cauchy’s convergence criterion it follows that an is divergent.
If p ∈ C and Su < n ≤ Su+1 with some u ≥ p then
n−S
Xn X u−1 X Nk n−Su−1 X u−1 1
p
X p p
p
a = x + x = x u,j ≤ .

n k,j u,j
u

j=Sp +1 k=p+1 j=1 j=1

j=1


X ∞
X
Then it follows that apn = 0, and thus apn = 0 is convergent.
n=Sp +1 n=1

3
IMC 2013, Blagoevgrad, Bulgaria
Day 2, August 9, 2013

Problem 1. Let z be a complex number with |z + 1| > 2. Prove that |z 3 + 1| > 1.


(Proposed by Walther Janous and Gerhard Kirchner, Innsbruck)

Solution. Since z 3 + 1 = (z + 1)(z 2 − z + 1), it suffices to prove that |z 2 − z + 1| ≥ 12 .


Assume that z + 1 = reϕi , where r = |z + 1| > 2, and ϕ = arg(z + 1) is some real number. Then

z 2 − z + 1 = (reϕi − 1)2 − (reϕi − 1) + 1 = r 2 e2ϕi − 3reϕi + 3,

and

|z 2 − z + 1|2 = r 2 e2ϕi − 3reϕi + 3) r 2 e−2ϕi − 3re−ϕi + 3) =


= r 4 + 9r 2 + 9 − (6r 3 + 18r) cos ϕ + 6r 2 cos 2ϕ =
= r 4 + 9r 2 + 9 − (6r 3 + 18r) cos ϕ + 6r 2 (2 cos2 ϕ − 1) =
2
r2 + 3

1 1 1
= 12 r cos ϕ − + (r 2 − 3)2 > 0 + = .
4 4 4 4
This finishes the proof.

Problem 2. Let p and q be relatively prime positive integers. Prove that


pq−1
k  k  (
X p
+
q 0 if pq is even,
(−1) = (∗)
k=0
1 if pq is odd.

(Here ⌊x⌋ denotes the integer part of x.)


(Proposed by Alexander Bolbot, State University, Novosibirsk)

Solution.Suppose
  k  first that pq is even (which implies that p and q have opposite parities), and let
k
+
p q
ak = (−1) . We show that ak + apq−1−k = 0, so the terms on the left-and side of (∗) cancel out
in pairs.
For every positive integer k we have kp + p−1−k
  p−1
p
= p , hence
         
k pq − 1 − k k k pq − 1 − k −1 − k pq − 1 p − 1
+ = − + − = − = q−1
p p p p p p p p
and similarly    
pq − 1 − k k
+ = p − 1.
q q
Since p and q have opposite parities, it follows that kp + kq and pq−1−k
       pq−1−k 
p
+ q
have opposite
parities and therefore apq−1−k = −ak .
Now suppose that pq is odd. For every index k, denote by pk and qk the remainders of k modulo p
and q, respectively. (I.e., 0 ≤ pk < p and 0 ≤ qk < q such that k ≡ pk (mod p) and k ≡ qk (mod q).)
Notice that
       
k k k k
+ ≡p +q = (k − pk ) + (k − qk ) ≡ pk + qk (mod 2).
p q p q

1
Since p and q are co-prime, by the Chinese remainder theorem the map k 7→ (pk , qk ) is a bijection
between the sets {0, 1, . . . , pq − 1} and {0, 1, . . . , p − 1} × {0, 1, . . . , q − 1}. Hence
pq−1  k   k  pq−1 p−1 q−1 p−1 q−1
! !
+
X X X X X X
(−1) p q = (−1)pk +qk = (−1)i+j = (−1)i · (−1)j = 1.
k=0 k=0 i=0 j=0 i=0 j=0

Problem 3. Suppose that v1 , . . . , vd are unit vectors in Rd . Prove that there exists a unit vector u
such that √
|u · vi | ≤ 1/ d
for i = 1, 2, . . . , d.
(Here · denotes the usual scalar product on Rd .)
(Proposed by Tomasz Tkocz, University of Warwick)

Solution. If v1 , . . . , vd are linearly dependent then we can simply take a unit vector u perpendicular to
span(v1 , . . . , vd ). So assume that v1 , . . . , vd are linearly independent. Let w1 , . . . , wd be the dual basis
of (v1 , . . . , vd ), i.e. (
1 if i = j
wi · vj = δij = for 1 ≤ i, j ≤ d.
0 if i 6= j
From wi · vi = 1 we have |wi | ≥ 1.
For every sequence ε = (ε1 , . . . , εd ) ∈ {+1, −1}d of signs define uε = di=1 εi wi . Then we have
P

d d
X X
|uε · vk | = εi (wi · vk ) = εi δik = |εk | = 1 for k = 1, . . . , d.


i=1 i=1

Now estimate the average of |uε |2 .


d
! d
!
1 X 1 X X X
|uε |2 = d εi wi · εj wj =
2d 2 i=1 j=1
ε∈{+1,−1}
n ε∈{+1,−1}n
 
d X
d d X
d d
X 1 X X X
= (wi · wj )  d εi εj  = (wi · wj )δij = |wi |2 ≥ d.
i=1 j=1
2 i=1 j=1 i=1
ε∈{+1,−1}n


It follows that there is a ε such that |uε |2 ≥ d. For that ε the vector u = satisfies the conditions.
|uε |

Problem 4. Does there exist an infinite set M consisting of positive integers such that for any
a, b ∈ M, with a < b, the sum a + b is square-free?
(A positive integer is called square-free if no perfect square greater than 1 divides it.)
(Proposed by Fedor Petrov, St. Petersburg State University)

Solution. The answer is yes. We construct an infinite sequence 1 = n1 < 2 = n2 < n3 < . . . so that
ni + nj is square-free for all i < j. Suppose that we already have some numbers n1 < . . . < nk (k ≥ 2),
which satisfy this condition and find a suitable number nk+1 to be the next element of the sequence.
We will choose nk+1 of the form nk+1 = 1 + Mx, with M = ((n1 + . . . + nk + 2k)!)2 and some positive
integer x. For i = 1, 2, . . . , k we have ni + nk+1 = 1 + Mx + ni = (1 + ni )mi , where mi and M are
co-prime, so any perfect square dividing 1 + Mx + ni is co-prime with M.

2
In order to find a suitable x, take a large N and consider the values x = 1, 2, . . . , N. If a value
1 ≤ x ≤ N is not suitable, this means that there is an index 1 ≤ i ≤ k and some prime p such that
p2 |1 + Mx + ni . For p ≤ p2k this is impossible because p|M. Moreover, we also have p2 ≤ 1 + Mx + ni <
M(N + 1), so 2k < p < M(N + 1).
For any fixed i and p, the values for x for which p2 |1 + Mx + ni form an arithmetic progression
N
with difference p2 . Therefore, there are at most 2 + 1 such values. In total, the number of unsuitable
p
values x is less than
 
k  
X X N  X 1 X
+ 1 < k · N + 1 <

p 2 
p 2

i=1 2k<p< M (N +1) p>2k

p< M (N +1)
X 1 1

p N p
< kN − + k M(N + 1) < + k M(N + 1).
p>2k
p−1 p 2

If N is big enough then this is less than N, and there exist a suitable choice for x.

Problem 5. Consider a circular necklace with 2013 beads. Each bead can be painted either white or
green. A painting of the necklace is called good, if among any 21 successive beads there is at least one
green bead. Prove that the number of good paintings of the necklace is odd.
(Two paintings that differ on some beads, but can be obtained from each other by rotating or
flipping the necklace, are counted as different paintings.)
(Proposed by Vsevolod Bykov and Oleksandr Rybak, Kiev)

Solution 1. For k = 0, 1, . . . denote by Nk be the number of good open laces, consisting of k (white
and green) beads in a row, such that among any 21 successive beads there is at least one green bead.
For k ≤ 21 all laces have this property, so Nk = 2k for 0 ≤ k ≤ 20; in particular, N0 is odd, and
N1 , . . . , N20 are even.
For k ≥ 21, there must be a green bead among the last 21 ones. Suppose that the last green bead
is at the ℓth position; then ℓ ≥ k − 20. The previous ℓ − 1 beads have Nℓ−1 good colorings, and every
such good coloring provides a good lace of length k. Hence,

Nk = Nk−1 + Nk−2 + . . . + Nk−21 for k ≥ 21. (1)

From (1) we can see that N21 = N0 + . . . + N20 is odd, and N22 = N1 + . . . + N21 is also odd.
Applying (1) again to the term Nk−1 ,
 
Nk = Nk−1 + . . . + Nk−21 = Nk−2 + . . . + Nk−22 + Nk−2 + . . . + Nk−21 ≡ Nk−22 (mod 2)

so the sequence of parities in (Nk ) is periodic with period 22. We conclude that

• Nk is odd if k ≡ 0 (mod 22) or k ≡ 21 (mod 22);

• Nk is even otherwise.

Now consider the good circular necklaces of 2013 beads. At a fixed point between two beads cut
each. The resulting open lace may have some consecutive white beads at the two ends, altogether at
most 20. Suppose that there are x white beads at the beginning and y white beads at the end; then
we have x, y ≥ and x + y ≤ 20, and we have a good open lace in the middle, between the first and the
last green beads. That middle lace consist of 2011 − x − y beads. So, for any fixed values of x and y
the number of such cases is N2011−x−y .

3
x 2011 − x − y y

It is easy to see that from such a good open lace we can reconstruct the original circular lace.
Therefore, the number of good circular necklaces is
X
N2011−x−y = N2011 +2N2010 +3N2009 +. . .+21N1991 ≡ N2011 +N2009 +N2007 +. . .+N1991 (mod 2).
x+y≤20

By 91 · 22 − 1 = 2001 the term N2001 is odd, the other terms are all even, so the number of the good
circular necklaces is odd.
Solution 2 (by Yoav Krauz, Israel). There is just one good monochromatic necklace. Let us
count the parity of good necklaces having both colors.
For each necklace, we define an adjusted necklace, so that at position 0 we have a white bead and
at position 1 we have a green bead. If the necklace is satisfying the condition, it corresponds to itself;
if both beads 0 and 1 are white we rotate it (so that the bead 1 goes to place 0) until bead 1 becomes
green; if bead 1 is green, we rotate it in the opposite direction until the bead 0 will be white. This
procedure is called adjusting, and the place between the white and green bead which are rotated into
places 0 and 1 will be called distinguished place. The interval consisting of the subsequent green beads
after the distinguished place and subsequent white beads before it will be called distinguished interval.
For each adjusted necklace we have several necklaces corresponding to it, and the number of them
is equal to the length of distinguished interval (the total number of beads in it) minus 1. Since we
count only the parity, we can disregard the adjusted necklaces with even distinguished intervals and
count once each adjusted necklace with odd distinguished interval.
Now we shall prove that the number of necklaces with odd distinguished intervals is even by grouping
them in pairs. The pairing is the following. If the number of white beads with in the distinguished
interval is even, we turn the last white bead (at the distinguished place) into green. The white interval
remains, since a positive even number minus 1 is still positive. If the number of white beads in the
distinguished interval is odd, we turn the green bead next to the distinguished place into white. The
green interval remains since it was even; the white interval was odd and at most 19 so it will become
even and at most 20, so we still get a good necklace.
This pairing on good necklaces with distinguished intervals of odd length shows, that the number of
such necklaces is even; hence the total number of all good necklaces using both colors is even. Therefore,
together with monochromatic green necklace, the number of good necklaces is odd.

4
IMC 2014, Blagoevgrad, Bulgaria

Day 1, July 31, 2014

Problem 1. Determine all pairs (a, b) of real numbers for whi h there exists a unique
symmetri 2 × 2 matrix M with real entries satisfying trace(M) = a and det(M) = b.
(Proposed by Stephan Wagner, Stellenbos h University)
Solution 1. Let the matrix be 
x z
M= .
z y
The two onditions give us x + y = a and xy − z 2 = b. Sin e this is symmetri in x and
y , the matrix an only be unique if x = y . Hen e 2x = a and x2 − z 2 = b. Moreover,
if (x, y, z) solves the system of equations, so does (x, y, −z). So M an only be unique if
z = 0. This means that 2x = a and x2 = b, so a2 = 4b.
If this is the ase, then M is indeed unique: if x + y = a and xy − z 2 = b, then

(x − y)2 + 4z 2 = (x + y)2 + 4z 2 − 4xy = a2 − 4b = 0,

so we must have x = y and z = 0, meaning that


 
a/2 0
M=
0 a/2

is the only solution.


Solution 2. Note that trace(M) = a and det(M) = b if and only if the two eigenvalues
λ1 and λ2 of M are solutions of x2 − ax + b = 0. If λ1 6= λ2 , then
   
λ1 0 λ 0
M1 = and M2 = 2
0 λ2 0 λ1

are two distin t solutions, ontradi ting uniqueness. Thus λ1 = λ2 = λ = a/2, whi h
implies a2 = 4b on e again. In this ase, we use the fa t that M has to be diagonalisable
as it is assumed to be symmetri . Thus there exists a matrix T su h that
 
−1 λ 0
M =T · · T,
0 λ

however this redu es to M = λ(T −1 · I · T ) = λI , whi h shows again that M is unique.


Problem 2. Consider the following sequen e
(an )∞
n=1 = (1, 1, 2, 1, 2, 3, 1, 2, 3, 4, 1, 2, 3, 4, 5, 1, . . . ).
n
P
ak
Find all pairs (α, β) of positive real numbers su h that = β. lim k=1
n→∞ nα
(Proposed by Tomas Barta, Charles University, Prague)
Let Nn = n+1 (then aNn is the rst appearan e of number n in the sequen e)

Solution.
2
and onsider limit of the subsequen e
PNn Pn Pn k+1
 n+2
 1 3
k=1 ak k=1 1 + · · · + k k=1 n (1
+ 2/n)(1 + 1/n)
bNn := = n+1 α
= 2
n+1 α
= 3
n+1 α
= 6
.
Nnα (1/2)α n2α (1 + 1/n)α
 
2 2 2

We an see that lim bNn is positive and nite if and only if α = 3/2. In this ase the
n→∞√ √
limit is equal to β = 32 . So, this pair (α, β) = ( 23 , 32 ) is the only andidate for solution.
We will show onvergen e of the original sequen e for these values of α and β .
Let N be a positive integer in [Nn +1, Nn+1 ], i.e., N = Nn +m for some 1 ≤ m ≤ n+1.
Then we have n+2
 m+1

3
+ 2
bN = 3/2
n+1

2
+m
whi h an be estimated by
n+2 n+2
+ n+1
  
3 3 2
n+1
 3/2 ≤ bN ≤ n+1 3/2
 .
2
+n 2

Sin e both bounds onverge to 3
2
, the sequen e bN has the same limit and we are done.

Problem 3. Let n be a positive integer. Show that there are positive real numbers
a0 , a1 , . . . , an su h that for ea h hoi e of signs the polynomial

±an xn ± an−1 xn−1 ± · · · ± a1 x ± a0

has n distin t real roots.


(Proposed by Stephan Neupert, TUM, Mün hen)
Solution. We pro eed by indu tion on n. The statement is trivial for n = 1. Thus
assume that we have some an , . . . , a0 whi h satisfy the onditions for some n. Consider
now the polynomials
P̃ (x) = ±an xn+1 ± an−1 xn ± . . . ± a1 x2 ± a0 x

By indu tion hypothesis and a0 6= 0, ea h of these polynomials has n + 1 distin t zeros,


in luding the n nonzero roots of ±an xn ± an−1 xn−1 ± . . . ± a1 x ± a0 and 0. In parti ular
none of the polynomials has a root whi h is a lo al extremum. Hen e we an hoose some
ε > 0 su h that for ea h su h polynomial P̃ (x) and ea h of its lo al extrema s we have
|P̃ (s)| > ε. We laim that then ea h of the polynomials

P (x) = ±an xn+1 ± an−1 xn ± . . . ± a1 x2 ± a0 x ± ε


has exa tly n + 1 distin t zeros as well. As P̃ (x) has n + 1 distin t zeros, it admits a
lo al extremum at n points. Call these lo al extrema −∞ = s0 < s1 < s2 < . . . < sn <
sn+1 = ∞. Then for ea h i ∈ {0, 1, . . . , n} the values P̃ (si ) and P̃ (si+1 ) have opposite
signs (with the obvious onvention at innity). By hoi e of ε the same holds true for
P (si ) and P (si+1 ). Hen e there is at least one real zero of P (x) in ea h interval (si , si+1 ),
i.e. P (x) has at least (and therefore exa tly) n+ 1 zeros. This shows that we have found a
set of positive reals a′n+1 = an , a′n = an−1 , . . . , a′1 = a0 , a′0 = ε with the desired properties.

Problem 4. Let n > 6 be a perfe t number, and let n = pe11 · · · pekk be its prime
fa torisation with 1 < p1 < . . . < pk . Prove that e1 is an even number.
A number n is perfe t if s(n) = 2n, where s(n) is the sum of the divisors of n.
(Proposed by Javier Rodrigo, Universidad Ponti ia Comillas)
Solution. Suppose that e1Qis odd, ontrary to the statement.
We know that s(n) = ki=1 (1 + pi + p2i + · · · + pei i ) = 2n = 2pe11 · · · pekk . Sin e e1 is
an odd number, p1 + 1 divides the rst fa tor 1 + p1 + p21 + · · · + pe11 , so p1 + 1 divides
2n. Due to p1 + 1 > 2, at least one of the primes p1 , . . . , pk divides p1 + 1. The primes
p3 , . . . , pk are greater than p1 + 1 and p1 annot divide p1 + 1, so p2 must divide p1 + 1.
Sin e p1 + 1 < 2p2 , this possible only if p2 = p1 + 1, therefore p1 = 2 and p2 = 3. Hen e,
6|n.
Now n, n2 , n3 , n6 and 1 are distin t divisors of n, so
n n n
s(n) ≥ n + + + + 1 = 2n + 1 > 2n,
2 3 6
ontradi tion.

Remark. It is well-known that all even perfe t numbers have the form n = 2p−1 (2p − 1) su h
that p and 2p− 1 are primes. p
So if e1 is odd then k = 2, p1 = 2, p2 = 2 − 1, e1 = p − 1 and

e2 = 1. If n > 6 then p > 2 so p is odd and e1 = p − 1 should be even.

Problem 5. Let A1 A2 . . . A3n be a losed broken line onsisting of 3n line segments


in the Eu lidean plane. Suppose that no three of its verti es are ollinear, and for
ea h index i = 1, 2, . . . , 3n, the triangle Ai Ai+1 Ai+2 has ounter lo kwise orientation and
∠Ai Ai+1 Ai+2 = 60◦ , using the notation A3n+1 = A1 and A3n+2 = A2 . Prove that the
3
number of self-interse tions of the broken line is at most n2 − 2n + 1.
2
A3
A6

A4 A5
A1 A2

(Proposed by Martin Langer)


Solution. Pla e the broken line inside an equilateral triangle T su h that their sides are
parallel to the segments of the broken line. For every i = 1, 2, . . . , 3n, denote by xi the
distan e between the segment Ai Ai+1 and that side of T whi h is parallel to Ai Ai+1 . We
will use indi es modulo 3n everywhere.
It is easy to see that if i ≡ j (mod 3) then the polylines Ai Ai+1 Ai+2 and Aj Aj+1 Aj+2
interse t at most on e, and this is possible only if either xi < xi+1 and xj > xj+1 or
xi < xi+1 and xj > xj+1 . Moreover, su h ases over all self-interse tions. So, the number
of self-interse tions annot ex eed number of pairs (i, j) with the property

(∗) i ≡ j (mod 3), and (xi < xi+1 and xj > xj+1 ) or (xi > xi+1 and xj < xj+1 ).

Ai+2 Aj+2

xi+2 xi+1 Ai+2 xi+1


xj+1
Ai+3 Ai+4 Aj
Aj+1
Ai Ai+1
xi Ai xj Ai+1
xi+3 xi

Grouping the indi es 1, 2, . . . , 3n, by remainders modulo 3, we have n indi es in ea h


residue lass. Altogether there are 3 n2 index pairs (i, j) with i ≡ j (mod 3). We will
show that for every integer k with 1 ≤ k < n2 , there is some index i su h that the pair
(i, i + 6k) does not satisfy (∗). This is already n−1 2
pair; this will prove that there are
at most    
n n−1 3
3 − ≥ n2 − 2n + 1
2 2 2
self-interse tions.
Without loss of generality we may assume that x3n = x0 is the smallest among
x1 , . . . , x3n . Suppose that all of the pairs

(−6k, 0), (−6k + 1, 1), (−6k + 2, 2), ..., (−1, 6k − 1), (0, 6k) (∗∗)

satisfy (∗). Sin e x0 is minimal, we have x−6k > x0 . The pair (−6k, 0) satises (∗), so
x−6k+1 < x1 . Then we an see that x−6k+2 > x2 , and so on; nally we get x0 > x6k .
But this ontradi ts the minimality of x0 . Therefore, there is a pair in (**) that does not
satisfy (∗).

n  n−1  3 2

Remark. The bound 3 2 − 2 = 2n − 2n + 1 is sharp.
IMC 2014, Blagoevgrad, Bulgaria

Day 2, August 1, 2014

Problem 1. For a positive integer x, denote its nth de imal digit by dn(x), i.e. dn (x) ∈

{0, 1, . . . , 9} and x = dn (x)10n−1 . Suppose that for some sequen e an n=1 , there are
P ∞
n=1
only nitely many zeros in the sequen e dn(an ) n=1 . Prove that there are innitely many
∞

positive integers that do not o ur in the sequen e (an )∞


n=1 .
(Proposed by Alexander Bolbot, State University, Novosibirsk)
Solution 1. By the assumption there is some index n0 su h that dn(an ) 6= 1 for n ≥ n0 .
We show that
an+1 , an+2 , . . . > 10n for n ≥ n0 . (1)

Noti e that in the sum an = dk (an )10k−1 we have the term dn (an )10n−1 with dn (an ) ≥ 1.
P
k=1
Therefore, an ≥ 10n−1 . Then for m > n we have am ≥ 10m > 10n. This proves (1).
From (1) we know that only the rst n elements, a1 , a2 , . . . , an may lie in the interval
[1, 10n ]. Hen e, at least 10n − n integers in this interval do not o ur in the sequen e at
all. As lim(10n − n) = ∞, this shows that there are innitely many numbers that do not
appear among a1 , a2 , . . ..
Solution 2. We will use Cantor's diagonal method to onstru t innitely many positive
integers that do not o ur in the sequen e (an )
Assume that dn(an ) 6= 0 for n > n0 . Dene the sequen e of digits
(
2 dn (xn ) = 1
gn =
1 dn (xn ) 6= 1.

Hen e gn 6= dn (an ) for every positive integer n. Let


k
for k = 1, 2, . . . .
X
xk = gn · 10n−1
n=1

As xk+1 ≥ 10k > xk , the sequen e (xk ) is in reasing and so it ontains innitely many
distin t positive integers. We show that the numbers xn0 , xn0 +1 , xn0 +2 , . . . no not o ur in
the sequen e (an ); in other words, xk 6= an for every pair n ≥ 1 and k ≥ n0 of integers.
Indeed, if k ≥ n then dn (xk ) = gn 6= dn(an ), so xk 6= an .
If n > k ≥ n0 then dn (xk ) = 0 6= dn (an ), so xk 6= an .

Problem 2. Let A = (aij )ni,j=1 be a symmetri n × n matrix with real entries, and let
λ1 , λ2 , . . . , λn denote its eigenvalues. Show that
X X
aii ajj ≥ λi λj ,
1≤i<j≤n 1≤i<j≤n

and determine all matri es for whi h equality holds.


(Proposed by Martin Niepel, Comenius University, Bratislava)
Solution. Eigenvalues of a real symmetri matrix are real, hen e the inequality makes
sense. Similarly, for Hermitian matri es diagonal entries as well as eigenvalues have to be
real.
Sin e the tra e of a matrix is the sum of its eigenvalues, for A we have
n
X n
X
aii = λi ,
i=1 i=1

and onsequently
n
X X n
X X
a2ii + 2 aii ajj = λ2i + 2 λi λj .
i=1 i<j i=1 i<j

Therefore our inequality is equivalent to


n
X n
X
a2ii ≤ λ2i .
i=1 i=1

Matrix A , whi h is equal to A A (or A A in Hermitian ase), has eigenvalues λ21 , λ22 , . . . , λ2n.
2 T ∗

On the other hand, the tra e of AT A gives the square of the Frobenius norm of A, so we
have n n n
|aij |2 = tr(AT A) = tr(A2 ) =
X X X
a2ii ≤ λ2i .
i=1 i,j=1 i=1

The inequality follows, and it is lear that the equality holds for diagonal matri es
only.
Remark. Same statement is true for Hermitian matri es.

sin x
Problem 3. Let f (x) =
, for x > 0, and let n be a positive integer. Prove that
x
f (x) < 1 , where f (n) denotes the nth derivative of f .
(n)
n+1
(Proposed by Alexander Bolbot, State University, Novosibirsk)
Solution 1. Putting f (0) = 1 we an assume that the fun tion is analyti in R. Let
g(x) = x n+1 n 1
(f (x) − n+1 ). Then g(0) = 0 and
 
1
g (x) = (n + 1)x f (n) (x) −
′ n
+ xn+1 f (n+1) (x) =
n+1
 
= xn (n + 1)f (n) (x) + xf (n+1) (x) − 1 = xn (xf (x))(n+1 − 1 = xn (sin(n+1) (x) − 1) ≤ 0.


Hen e g(x) ≤ 0 for x > 0. Taking into a ount that g ′ (x) < 0 for 0 < x < π
2
we obtain
the desired (stri t) inequality for x > 0.
Solution 2.

(n) 1 1 1
dn ∂n

sin x
Z Z Z
= n − cos(xt)dt = (− cos(xt)) dt = tn gn (xt)dt
x dx 0 0 ∂xn 0

where the fun tion gn (u) an be ± sin u or ± cos u, depending on n. We only need that
|gn | ≤ 1 and equality o urs at nitely many points. So,

sin x (n) Z 1
Z 1
1
n
≤ t gn (xt) dt < tn dt = .

x n+1

0 0

Problem 4. We say that a subset of Rn is k-almost ontained by a hyperplane if there


are less than k points in that set whi h do not belong to the hyperplane. We all a nite
set of points k-generi if there is no hyperplane that k-almost ontains the set. For ea h
pair of positive integers k and n, nd the minimal number d(k, n) su h that every nite
k -generi set in Rn ontains a k -generi subset with at most d(k, n) elements.
(Proposed by Sha har Carmeli, Weizmann Inst. and Lev Radzivilovsky, Tel Aviv Univ.)
(
k · n k, n > 1
Solution. The answer is: d(k, n) =
k + n otherwise
Throughout the solution, we shall often say that a hyperplanes skips a point to signify
that the plane does not ontain that point.
For n = 1 the laim is obvious.
For k = 1 we have an arbitrary nite set of points in Rn su h that neither hyperplane
ontains it entirely. We an build a subset of n + 1 points step by step: on ea h step we
add a point, not ontained in the minimal plane spanned by the previous points. Thus
any 1-generi set ontains a non-degenerate simplex of n + 1 points, and obviously a
non-degenerate simplex of n + 1 points annot be redu ed without loosing 1-generality.
In the ase k, n > 1 we shall give an example of k · n points. On ea h of the Cartesian
axes hoose k distin t points, dierent from the origin. Let's show that this set is k-
generi . There are two types of planes: ontaining the origin and skipping it. If a plane
ontains the origin, it either ontains all the hose points of a axis or skips all of them.
Sin e no plane ontains all axes, it skips the k hosen points on one of the axes. If a plane
skips the origin, it it ontains at most one point of ea h axis. Therefore it skips at least
n(k − 1) points. It remains to verify a simple inequality n(k − 1) ≥ k whi h is equivalent
to (n − 1)(k − 1) ≥ 1 whi h holds for n, k > 1.
The example we have shown is minimal by in lusion: if any point is removed, say a
point from axis i, then the hyperplane xi = 0 skips only k − 1 points, and our set stops
being k-generi . Hen e d(k, n) ≥ kn.
It remains to prove that Hen e d(k, n) ≥ kn for k, n > 1, meaning: for ea h k-generi
nite set of points, it is possible to hoose a k-generi subset of at most kn points. Let
us all a subset of points minimal if by taking out any point, we loose k-generality.
It su es to prove that any minimal k-generi subset in Rn has at most kn points. A
hyperplane will be alled ample if it skips pre isely k points. A point annot be removed
from a k-generi set, if and only if it is skipped by an ample hyperplane. Thus, in a
minimal set ea h point is skipped by an ample hyperplane.
Organise the following pro ess: on ea h step we hoose an ample hyperplane, and paint
blue all the points whi h are skipped by it. Ea h time we hoose an ample hyperplane,
whi h skips one of the unpainted points. The unpainted points at ea h step (after the
beginning) is the interse tion of all hosen hyperplanes. The interse tion set of hosen
hyperplanes is redu ed with ea h step (sin e at least one point is being painted on ea h
step).
Noti e, that on ea h step we paint at most k points. So if we start with a minimal
set of more then nk points, we an hoose n planes and still have at least one unpainted
points. The interse tion of the hosen planes is a point (sin e on ea h step the dimension
of the interse tion plane was redu ed), so there are at most nk + 1 points in the set. The
last unpainted point will be denoted by O . The last unpainted line (whi h was formed on
the step before the last) will be denoted by ℓ1 .
This line is an interse tion of all the hosen hyperplanes ex ept the last one. If we
have more than nk points, then ℓ1 ontains exa tly k + 1 points from the set, one of whi h
is O .
We ould have exe uted the same pro ess with hoosing the same hyperplanes, but in
dierent order. Anyway, at ea h step we would paint at most k points, and after n steps
only O would remain unpainted; so it was pre isely k points on ea h step. On step before
the last, we might get a dierent line, whi h is interse tion of all planes ex ept the last
one. The lines obtained in this way will be denoted ℓ1 , ℓ2 , ..., ℓn , and ea h ontains exa tly
k points ex ept O . Sin e we have O and k points on n lines, that is the entire set. Noti e
that the ve tors spanning these lines are linearly independent (sin e for ea h line we have
a hyperplane ontaining all the other lines ex ept that line). So by removing O we obtain
the example that we've des ribed already, whi h is k-generi .
Remark. From the proof we see, that the example is unique.

Problem 5. For every positive integer n, denote by Dn the number of permutations


(x1 , . . . , xn ) of (1, 2, . . . , n) su h that xj 6= j for every 1 ≤ j ≤ n. For 1 ≤ k ≤ n2 , denote
by ∆(n, k) the number of permutations (x1 , . . . , xn ) of (1, 2, . . . , n) su h that xi = k + i
for every 1 ≤ i ≤ k and xj 6= j for every 1 ≤ j ≤ n. Prove that
k−1 
k − 1 D(n+1)−(k+i)
X 
∆(n, k) = .
i=0
i n − (k + i)

(Proposed by Combinatori s; Ferdowsi University of Mashhad, Iran; Mirzavaziri)


Solution. Let ar ∈ {i1 , . . . , ik } ∩ {a1 , . . . , ak }. Thus ar = is for some s 6= r. Now there
are two ases:
Case 1. as ∈ {i1 , . . . , ik }. Let as = it . In this ase a derangement x = (x1 , . . . , xn )
satises the ondition xij = aj if and only if the derangement x′ = (x′1 , . . . , x′it −1 , x′it +1 , x′n )
of the set [n] \ {it } satises the ondition x′ij = a′j for all j 6= t, where a′j = aj for j 6= s
and a′s = at . This provides a one to one orresponden e between the derangements
x = (x1 , . . . , xn ) of [n] with xij = aj for the given sets {i1 , . . . , ik } and {a1 , . . . , ak } with
ℓ elements in their interse tions, and the derangements x′ = (x′1 , . . . , x′it −1 , x′it +1 , x′n ) of
[n] \ {it } with xij = a′j for the given sets {i1 , . . . , ik } \ {it } and {a′1 , . . . , a′k } \ {a′t } with
ℓ − 1 elements in their interse tions.
Case 2. as ∈/ {i1 , . . . , ik }. In this ase a derangement x = (x1 , . . . , xn ) satises the
ondition xij = aj if and only if the derangement x′ = (x′1 , . . . , x′as −1 , x′as +1 , x′n ) of the
set [n] \ {as} satises the ondition x′ij = aj for all j 6= s. This provides a one to one
orresponden e between the derangements x = (x1 , . . . , xn ) of [n] with xij = aj for the
given sets {i1 , . . . , ik } and {a1 , . . . , ak } with ℓ elements in their interse tions, and the
derangements x′ = (x′1 , . . . , x′as −1 , x′as +1 , x′n ) of [n] \ {as } with xij = aj for the given sets
{i1 , . . . , ik } \ {is } and {a1 , . . . , ak } \ {as } with ℓ − 1 elements in their interse tions.
These onsiderations show that ∆(n, k, ℓ) = ∆(n − 1, k − 1, ℓ − 1). Iterating this
argument we have
∆(n, k, ℓ) = ∆(n − ℓ, k − ℓ, 0).
We an therefore assume that ℓ = 0. We thus evaluate ∆(n, k, 0), where 2k 6 n. For
k = 0, we obviously have ∆(n, 0, 0) = Dn . For k > 1, we laim that

∆(n, k, 0) = ∆(n − 1, k − 1, 0) + ∆(n − 2, k − 1, 0).

For a derangement x = (x1 , . . . , xn ) satisfying xij = aj there are two ases: xa1 = i1 or
xa1 6= i1 .
If the rst ase o urs then we have to evaluate the number of derangements of the
set [n] \ {i1 , a1 } for the given sets {i2 , . . . , ik } and {a2 , . . . , ak } with 0 elements in their
interse tions. The number is equal to ∆(n − 2, k − 1, 0).
If the se ond ase o urs then we have to evaluate the number of derangements of
the set [n] \ {a1 } for the given sets {i2 , . . . , ik } and {a2 , . . . , ak } with 0 elements in their
interse tions. The number is equal to ∆(n − 1, k − 1, 0).
We now use indu tion on k to show that
k−1 
k − 1 D(n+1)−(k+i)
X 
∆(n, k, 0) = , 2 6 2k 6 n.
i=0
i n − (k + i)

For k = 1 we have
Dn
∆(n, 1, 0) = ∆(n − 1, 0, 0) + ∆(n − 2, 0, 0) = Dn−1 + Dn−2 = .
n−1
Now let the result be true for k − 1. We an write
∆(n, k, 0) = ∆(n − 1, k − 1, 0) + ∆(n − 2, k − 1, 0)
k−2  k−2 
Dn−(k−1+i) D(n−1)−(k−1+i)
 
X k−2 X k−2
= +
i=0
i (n − 1) − (k − 1 + i) i=0 i (n − 2) − (k − 1 + i)
k−2  k−1 
k − 2 D(n+1)−(k+i) X k − 2 Dn−(k+i−1)
X  
= +
i=0
i n − (k + i) i=1
i − 1 (n − 1) − (k + i − 1)
k−2 
D(n+1)−k X k − 2 D(n+1)−(k+i)

= +
n−k i=1
i n − (k + i)
k−2 
D(n+1)−(2k−1) X k − 2 D(n+1)−(k+i)

+ +
n − (2k − 1) i=1
i − 1 n − (k + i)
k−2    
D(n+1)−k X  k − 2 k − 2  D(n+1)−(k+i) D(n+1)−(2k−1)
= + + +
n−k i=1
i i−1 n − (k + i) n − (2k − 1)
k−2  
D(n+1)−k X k − 1 D(n+1)−(k+i) D(n+1)−(2k−1)
= + +
n−k i=1
i n − (k + i) n − (2k − 1)
k−1  
X k − 1 D(n+1)−(k+i)
= .
i=0
i n − (k + i)

Remark. As a orollary of the above problem, we an solve the rst problem. Let n = 2k,
ij = j and aj = k + j for j = 1, . . . , k. Then a derangement x = (x1 , . . . , xn ) satises the
ondition xij = aj if and only if x′ = (xk+1 , . . . , xn ) is a permutation of [k]. The number of su h
permutations x′ is k!. Thus i=0 k−i = k!.
Pk−1 k−1 Dk+1−i
i

You might also like