You are on page 1of 51

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
10
BALKAN MATHEMATICAL OLYMPIAD
Kragujevac , 30.04.2009.

1. Find all integer solutions of the equation


(Greece)
3x − 5y = z 2 .

2. In a triangle ABC, points M and N on the sides AB and AC respectively are


such that M N k BC. Let BN and CM intersect at point P . The circumcircles
of triangles BM P and CN P intersect at two distinct points P and Q. Prove that
∠BAQ = ∠CAP . (Moldova)

3. A 9 × 12 rectangle is divided into unit squares. The centers of all the unit squares,
except the four corner squares and the eight squares adjacent (by side) to them,
are colored red. Is it possible to numerate the red centers by C1 , C2 , . . . , C96 so
that the following two conditions are fulfilled:

1◦ All segments C1 C2 , C2 C3 , . . . C95 C96 , C96 C1 have the length 13;
2◦ The poligonal line C1 C2 . . . C96 C1 is centrally symmetric? (Bulgaria)

4. Determine all functions f : N → N satisfying


 (Bulgaria)
f f (m)2 + 2f (n)2 = m2 + 2n2 for all m, n ∈ N.

Time allowed: 270 minutes.


Each problem is worth 10 points.
11

SOLUTIONS

1. We start by observing that z must be even, so z 2 = 3x − 5y ≡ (−1)x − 1 (mod 4)


is divisible by 4, which implies that x is even, say x = 2t. Then our equation can
be rewritten as (3t − z)(3t + z) = 5y , which means that both 3t − z = 5k and
3t + z = 5y−k for some nonnegative integer k. Since 5k + 5y−k = 2 · 3t is not
divisible by 5, it follows that k = 0 and

2 · 3t = 5y + 1.

Suppose that t ≥ 2. Then 5y + 1 is divisible by 9, which is only possible if y ≡ 3


(mod 6). However, in this case 5y + 1 ≡ 53 + 1 ≡ 0 (mod 7), so 5y + 1 is also
divisible by 7, which is impossible.
Therefore we must have t ≤ 1, which yields a (unique) solution (x, y, z) = (2, 1, 2).

2. Since the quadrilaterals BM P Q and CN P Q are cyclic, we have ∠BQN = ∠BQP +


∠P QN = ∠AM C + ∠M CA = 180◦ − A
∠CAB, so ABQN is cyclic as well.
sin ∠BAQ BQ
Hence sin ∠NAQ = NQ . Moreover, tri-
angles M BQ and CN Q are similar, so
M N
sin ∠BAQ BQ BM AB
= = = . P
sin ∠CAQ NQ CN AC
A1
On the other hand, if AP meets BC at B Q C
A1 , then by the Cheva theorem BA 1
A1 C
=
BM AN
·
M A NC = 1, so A 1 is the midpoint of BC and
sin ∠CAP AB AC · AA1 sin ∠CAP AB S4CAA1 AB
= · = · = .
sin ∠BAP AC AB · AA1 sin ∠BAP AC S4BAA1 AC
Therefore, if we denote ∠CAP = ϕ, ∠BAQ = ψ and ∠BAC = α, we have
sin ψ sin ϕ
sin(α−ψ)
= sin(α−ϕ) , which is equivalent to sin ψ sin(α − ϕ) = sin ϕ sin(α − ψ). The
addition formulas reduce the last equality to 0 = sin α(sin ϕ cos ψ − sin ψ cos ϕ) =
sin α sin(ϕ − ψ), from which we conclude that ψ = ϕ, as desired.

3. Place the given rectangle into the coordinate plane so that the center of the square
at the intersection of i-th column and j-th row has the coordinates (i, j). Suppose
that a desired numeration of the red points exists; it corresponds
√ to a path, i.e. a
closed poligonal line consisting of 96 segments of length 13, passing through each
red point exactly once. Note that points (i, j) and (k, l) are adjacent in the path
if and only if {|i − k|, |j − l|} = {2, 3}.
12

The center of symmetry must be at point C(5 21 , 5). Consider the points A(2, 2),
B(11, 8). These two points are symmetric with respect to C and divide the path
into two parts γ1 and γ2 . Note that,
if the rectangular board is colored al-
ternately white and black (like a chess- Q 
r r
JQ 
B
board), A and B are of different colors, J Q Qpr r


and each segment connects two squares JJr p p p p qpb p p p p
r

pr
of different colors. It follows that each p p p p ppr J
J
pp
Q
of γ1 , γ2 consists of an odd number of
 Q J
Q
segments. Thus these two parts are of 

r Q
Jr
A
different lengths and cannot be sym-
metric to each other. Therefore each
of γ1 , γ2 is centrally symmetric itself.
Being of an odd length, each of the parts γ1 , γ2 must contain a segment which
is centrally symmetric with respect to C. There are only two such segments -
one connecting (5, 4) and (8, 6), and one connecting (5, 6) and (8, 4), so these two
segments must be parts of our path. Moreover, point (2, 2) is connected with only
two points, namely (4, 5) and (5, 4), so these three points are directly connected.
Analogous conclusions can be made about points (2, 8), (11, 2) and (11, 8), so the
closed path (5, 4) − (2, 2) − (4, 5) − (2, 8) − (5, 6) − (8, 4) − (11, 2) − (9, 5) − (11, 8) −
(8, 6) − (5, 4) is entirely contained in our path, which is clearly a contradiction.

4. We start by observing that f is injective. From the known identity

(a2 + 2b2 )(c2 + 2d2 ) = (ac ± 2bd)2 + 2(ad ∓ bc)2

we obtain f (ac + 2bd)2 + 2f (ad − bc)2 = f (ac − 2bd)2 + 2f (ad + bc)2 , assuming
that the arguments are positive integers. Specially, for b = c = d = 1 and a ≥ 3
we have f (a + 2)2 + 2f (a − 1)2 = f (a − 2)2 + 2f (a + 1)2 . Denoting g(n) = f (n)2
we get a recurrent relation g(a + 2) − 2g(a + 1) + 2g(a − 1) − g(a − 2) = 0 whose
characteristic polynomial is (x + 1)(x − 1)3 , which leads to

g(n) = A(−1)n + B + Cn + Dn2 . (†)

Substituting m = n in the original equation yields g(3g(n)) = 9n4 , which together


with (†) gives us
+B+Cn+Dn2 )
L = 9n4 = A(−1)3(A(−1) + B + 3C[A(−1)n + B + Cn + Dn2 ]
n

| {z }
n 2 2
+ 9D[A(−1) + B + Cn + Dn ] = R.

Since 0 = limn→∞ R−L


n4
= 9D3 − 9, we have D3 = 1 (so D 6= 0); similarly,
0 = limn→∞ R−L
n3
= 18D2 C, so C = 0. Moreover, for n = 2k and n = 2k + 1
13

R−L 2 R−L
respectively we obtain 0 = limk→∞ (2k)2 = 18D (A+B) and 0 = limk→∞ (2k+1)2
=
18D2 (−A + B), implying A + B = −A + B = 0; hence A = B = 0.
Finally, g(n) = Dn2 , D3 = 1 and g : N → N gives us D = 1, i.e. f (n) = n. It is
directly verified that this function satisfies the conditions of the problem.
Remark. Using limits can be avoided. Since the rigth-hand side in (†) takes only
integer values, it follows that A, B, C, D are rational, so taking suitable multiples
of integers for n eliminates the powers of −1 and leaves a polynomial equality.

::::
::::::::
::::::::::::
::::::::::::::::
::::::::::::::::::::
::::::::
::::
10

BALKAN MATHEMATICAL OLYMPIAD


Chişinău, Moldova , 04.05.2010.

1. If a, b and c are positive real numbers, prove that

a2 b(b − c) b2 c(c − a) c2 a(a − b)


+ + ≥0 (Saudi Arabia)
a+b b+c c+a

2. Let ABC be an acute-angled triangle with orthocenter H and let M be the midpoint
of AC. The foot of the altitude from C is C1 . Point H1 is symmetric to H in AB.
The projections of C1 on lines AH1 , AC and BC are P, Q and R respectively. If
M1 is the circumcenter of triangle P QR, prove that the point symmetric to M
with respect to M1 lies on line BH1 . (Serbia)

3. We define a w-strip as the set of all points in the plane that are between or on two
parallel lines on a mutual distance w. Let S be a set of n points in the plane such
that any three points from S can be covered by a 1-strip. Show that the entire set
S can be covered by a 2-strip. (Romania)

4. For every integer n ≥ 2, denote by f (n) the sum of positive integers not exceeding
n that are not coprime to n. Prove that f (n + p) 6= f (n) for any such n and any
prime number p. (Turkey)

Time allowed: 270 minutes.


Each problem is worth 10 points.
11

SOLUTIONS

1. The left-hand side is equal to


a3 b3 + b3 c3 + c3 a3 − a3 b2 c − b3 c2 a − c3 a2 b
,
(a + b)(b + c)(c + a)

so it is enough to show that a3 b3 +b3 c3 +c3 a3ó a3 b2 c+b3 c2 a+c3 a2 b. The AM-GM
inequality gives us a3 b3 + a3 b3 + a3 c3 ≥ 3 a3 b3 · a3 b3 · a3 c3 = 3a3 b2 c; summing
3

this inequality and its cyclic analogs yields the desired inequality.
Equality holds if and only if a = b = c.

2. We shall use the following simple statement.


Lemma. Let A1 A2 A3 A4 be a convex cyclic quadrilateral whose diagonals
are orthogonal and meet at X. If Bi is the midpoint of side Ai Ai+1 and
Xi the projection of X on this side (A5 = A1 ), then the eight points Bi , Xi
(i = 1, 2, 3, 4) lie on a circle.
Proof. Quadrilateral B1 B2 B3 B4 is a rectangle because B1 B2 k B3 B4 k A1 A3
and B2 B3 k B4 B1 k A2 A4 . Denote by k the circumcircle of B1 B2 B3 B4 .
Since ∠B3 XA3 = ∠A4 A3 A1 = ∠A4 A2 A1 = ∠A1 XX1 , points B3 , X, X1
are collinear, so X1 lies on the circle with diameter B1 B3 , i.e. k. Similarly,
X2 , X3 , X4 lie on k. C

It is known that H1 lies on the circum- R


circle of ABC. By the lemma, points M
P, Q, R all lie on the circle with diam-
eter M N , where N is the midpoint of Q
M1
BH1 . Therefore N is symmetric to M A C1 B
with respect to M1 and lies on BH1 as P N
desired.
H1

3. Of all triangles with the vertices in S, consider one with a maximum area, say
4ABC. Let A0 , B 0 , C 0 be the points symmetric to A, B, C with respect to the
midpoints of BC, CA, AB, respectively. We claim that all points from S must lie
inside or on the boundary of 4A0 B 0 C 0 . Indeed, if X ∈ S is outside 4A0 B 0 C 0 ,
we can assume without loss of generality that X and BC are on different sides of
B 0 C 0 , and then 4BCX has an area greater than 4ABC, a contradiction.
The triangle ABC can be covered by a 1-strip, so the triangle A0 B 0 C 0 , being similar
to ABC with ratio 2, can be covered by a 2-strip, also covering all of S.
12

4. There are n + 1 − ϕ(n) nonnegative integers not coprime with n, and whenever r is
among them, so is n−r. This gives us the formula f (n) = 12 n(n+1−ϕ(n)). Suppose
that f (n) = f (n + p). We observe first that n and n + p divide 2f (n) < n(n + p),
so n and n + p are not coprime, which implies that n = kp for some k ∈ N. Then
the equality f (n) = f (n + p) is equivalent to k(kp + 1 − ϕ(kp)) = (k + 1)(kp + p +
1 − ϕ(kp + p)), so

kp + 1 − ϕ(kp) = (k + 1)x and kp + p + 1 − ϕ(kp + p) = kx (1)

for some x ∈ N, x < p. Subtraction gives us x = ϕ(kp + p) − ϕ(kp) − p. Since


ϕ(kp) and ϕ(kp+p) are both divisible by p−1 (by the formula for ϕ(n)), we obtain
x ≡ −1 (mod p − 1).
If p = 2 then x = 1 and ϕ(2k + 2) = k + 3, which is impossible because ϕ(2k + 2) ≤
k + 1. If p = 3 then x = 1 and ϕ(3k + 3) = 2k + 4, again impossible because
ϕ(3k + 3) ≤ 2k + 2. Therefore p ≥ 5, so x ≡ −1 (mod p − 1) implies x = p − 2.
Plugging this value in (1) leads to

ϕ(kp) = 2k + 3 − p and ϕ(kp + p) = 2k + 1 + p.

If k is divisible by p, then ϕ(kp) is also divisible by p, so p | 2k + 3 and hence


p | 3, a contradiction. Similarly, p - k + 1. It follows that ϕ(kp) = (p − 1)ϕ(k) and
ϕ(kp + p) = (p − 1)ϕ(k + 1) which together with (1) yields

2k + 2 2k + 2
ϕ(k) = − 1 and ϕ(k + 1) = + 1.
p−1 p−1

From here we see that ϕ(t) is not divisible by 4 either for t = k or for t = k + 1,
which is only possible if t = q i or t = 2q i for some odd prime q and i ∈ N, or
t ∈ {1, 2, 4}. The cases t = 1, 2, 4 are easily ruled out, so either k or k + 1 is of the
form q i or 2q i . For t = k = q i , ϕ(q i ) + 1 = q i−1 (q − 1) + 1 divides 2q i + 2 which
is impossible because q i + 1 > q i−1 (q − 1) + 1 > 23 (2q i + 2). The other three cases
are similarly shown to be impossible.

::::
::::::::
::::::::::::
::::::::::::::::
::::::::::::::::::::
::::::::
::::
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.
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+ .
10
BALKAN MATHEMATICAL OLYMPIAD
Agros, Cyprus , 30.06.2013.

1. In a triangle ABC, the excircle ωa opposite A touches AB at P and AC at Q,


and the excircle ωb opposite B touches BA at M and BC at N . Let K be the
projection of C onto M N , and let L be the projection of C onto P Q.
Show that the quadrilateral M KLP is cyclic. (Bulgaria)

2. Determine all positive integers x, y and z such that


x5 + 4y = 2013z .
(Serbia)

3. Let S be the set of positive real numbers. Find all functions f : S 3 → S such
that, for all positive real numbers x, y, z and k, the following three conditions are
satisfied:
(i) xf (x, y, z) = zf (z, y, x);
(ii) f (x, ky, k 2z) = kf (x, y, z);
(iii) f (1, k, k + 1) = k + 1. (United Kingdom)

4. In a mathematical competition some competitors are friends; friendship is always


mutual, that is to say that when A is a friend of B, then also B is a friend of A. We
say that n ≥ 3 different competitors A1 , A2 , . . . , An form a weakly-friendly cycle if
Ai is not a friend of Ai+1 for 1 ≤ i ≤ n (An+1 = A1 ), and there are no other pairs
of non-friends among the components of this cycle.
The following property is satisfied:
for every competitor C, and every weakly-friendly cycle S of competi-
tors not including C, the set of competitors D in S which are not
friends of C has at most one element.
Prove that all competitors of this mathematical competition can be arranged into
three rooms, such that every two competitors that are in the same room are friends.
(Serbia)
Time allowed: 270 minutes.
Each problem is worth 10 points.
11

SOLUTIONS

1. We denote the angles of the triangle by α, β and γ as usual. Since ∠KM P = 90◦ − β2 ,
it suffices to prove that ∠KLP = 90◦ + β2 , which is equivalent to ∠KLC = β2 .
Let I be the incenter of triangle ABC and let D be the tangency point of the
incircle with AB. Since CK k IB and CL k IA, it holds that ∠KCL = ∠AIB.
Moreover, from CN = AD = b+c−a 2
and ∠KCN = β2 we obtain CK = CN cos β2 =
AD cos β2 = AI cos α2 cos β2 and analogously CL = BI cos α2 cos β2 , which imply
CK AI
CL = BI . Hence the triangles KCL and AIB are similar, and thus ∠KLC =
∠ABI = β2 .

2. Reducing modulo 11 yields x5 + 4y ≡ 0 (mod 11), where x5 ≡ ±1 (mod 11), so


we also have 4y ≡ ±1 (mod 11). Congruence 4y ≡ −1 (mod 11) does not hold for
any y, whereas 4y ≡ 1 (mod 11) holds if and only if 5 | y.
Setting t = 4y/5 , the equation becomes x5 + t5 = A · B = 2013z , where (x, t) = 1
and A = x + t, B = x4 − x3 t + x2 t2 − xt3 + t4 . Furthermore, from B = A(x3 −
2x2 t + 3xt2 − 4t3 ) + 5t4 we deduce (A, B) = (A, 5t4 ) | 5, but 5 ∤ 2013z , so we must
have (A, B) = 1. Therefore A = az and B = bz for some positive integers a and b
with a · b = 2013.
1
On the other hand, from 16 A4 ≤ B ≤ A4 (which is a simple consequence of the
1 4 1 5
mean inequality) we obtain 16 a ≤ b ≤ a4 , i.e. 16 a ≤ ab = 2013 ≤ a5 . Therefore
5 ≤ a ≤ 8, which is impossible because 2013 has no divisors in the interval [5, 8].

3. It follows from the properties of function f that, for all x, y, z, a, b > 0,


z bz b
f (a2 x, aby, b2z) = bf (a2 x, ay, z) = b· 2
f (z, ay, a2x) = f (z, y, x) = f (x, y, z).
a x ax a
We shall choose a and b in such a way that the triple (a2 x, aby, b2z) is of the form
(1, k, k+1) for some k: namely, we take a = √1x and b satisfying b2 z−aby = 1, which
√ √
y+ y 2 +4xz y(y+ y 2 +4xz)
upon solving the quadratic equation yields b = √
2z x
and k = 2xz
.
Now we easily obtain
p
a 2 2 a a y + y 2 + 4xz
f (x, y, z) = f (a x, aby, b z) = f (1, k, k + 1) = (k + 1) = .
b b b 2x
It is directly verified that f satisfies the problem conditions.

4. Consider the graph G whose vertices are the contestants, where there is an edge
between two contestants if and only if they are not friends.
12

Lemma. There is a vertex in graph G with degree at most 2.

Proof. Suppose that each vertex has a degree at least three. Consider the longest
induced path P = u0 u1 u2 . . . uk in the graph (that is, the path in which no two
nonadjacent vertices are connected by an edge). The vertex u0 is connected
to another two vertices v and w, which must be outside the path P . Since
P is the longest induced path, v and w have neighbors in it. Let ui and uj
be the neighbors of v and w respectively with the smallest i and j; assume
without loss of generality that i ≥ j. Then u0 , u1 , . . . , ui , v form a weakly
friendly cycle, but w has two neighbors in it (u0 and uj ), a contradiction.

We now prove the problem statement by induction on the number n of vertices in


G. For n ≤ 3 the statement is trivial; assume that it holds for n−1. By the Lemma,
there is a vertex v in G of degree at most two. Graph G ′ , obtained by removing
vertex v (and all edges incident to it), clearly satisfies the problem conditions, so
its vertices can be partitioned into three rooms in a desired way. Since v has no
neighbors in at least one of the rooms, we can place v in that room, finishing the
proof.

::::
::::::::
::::::::::::::::::::
::::::::::::::::
::::::::::::
::::::::
::::
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

n
X n
X n
X n
X
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

n n n  2
X n(n + 1) X 2 n(n + 1)(2n + 1) X
3 n(n + 1)
Since m = , m = and m = it is
m=1
2 m=1
6 m=1
2
 2
n(n + 1)
easily checked that N = .
2
32th BALKAN MATHEMATICAL OLYMPIAD
Athens, Hellas (May 5, 2015)

Problem 1. Let a, b and c be positive real numbers. Prove that

a3 b6 + b3 c6 + c3 a6 + 3a3 b3 c3 ≥ abc(a3 b3 + b3 c3 + c3 a3 ) + a2 b2 c2 (a3 + b3 + c3 ).

Solution. After dividing both sides of the given inequality by a3 b3 c3 it becomes


Å ã3 Å ã3 Å ã3
b c a a b b c c a a a b b c c
Å ã Å ã
+ + +3≥ · + · + · + · + · + · . (1)
c a b c c a a b b b c a c a b
Set
b 1 c 1 a 1
= , = , = . (2)
a x b y c z

Then we have that xyz = 1 and by substituting (2) into (1), we find that
y z x x y z
Å ã Å ã
3 3 3
x +y +z +3≥ + + + + + . (3)
z x y z x y

Multiplying the inequality (3) by xyz, and using the fact that xyz = 1, the inequality is equivalent to

x3 + y 3 + z 3 + 3xyz − xy 2 − yz 2 − zx2 − yx2 − zy 2 − xz 2 ≥ 0. (4)

Finally, notice that by the special case of Schur’s inequality

xr (x − y)(x − z) + y r (y − x)(y − z) + z r (z − y)(z − x) ≥ 0, x, y, z ≥ 0, r > 0,

with r = 1 there holds

x(x − y)(x − z) + y(y − x)(y − z) + z(z − y)(z − x) ≥ 0 (5)

which after expansion actually coincides with the congruence (4).

Remark 1. The inequality (5) immediately follows by supposing (without loss of generality) that
x ≥ y ≥ z, and then writing the left hand side of the inequality (5) in the form

(x − y)(x(x − z) − y(y − z)) + z(y − z)(x − z),

which is obviously ≥ 0.
Remark 2. One can obtain the relation (4) using also the substitution x = ab2 , y = bc2 and z = ca2 .
Problem 2. Let ABC be a scalene triangle with incentre I and circumcircle (ω). The lines AI, BI, CI
intersect (ω) for the second time at the points D, E, F , respectively. The lines through I parallel to
the sides BC, AC, AB intersect the lines EF, DF, DE at the points K, L, M , respectively. Prove that
the points K, L, M are collinear.

Solution. First we will prove that KA is tangent to (ω).


Indeed, it is a well-known fact that F A = F B = F I and EA = EC = EI, so F E is the perpendicular
bisector of AI. It follows that KA = KI and

∠KAF = ∠KIF = ∠F CB = ∠F EB = ∠F EA,

so KA is tangent to (ω). Similarly we can prove that LB, M C are tangent to (ω) as well.

A
L E

F
B0
C0
K
I

B C
A0

Let A0 , B 0 , C 0 the intersections of AI, BI, CI with BC, CA, AB respectively. From Pascal’s The-
orem on the cyclic hexagon AACDEB we get K, C 0 , B 0 collinear. Similarly L, C 0 , A0 collinear and
M, B 0 , A0 collinear.
Then from Desargues’ Theorem for 4DEF, 4A0 B 0 C 0 which are perspective from the point I, we
get that points K, L, M of the intersection of their corresponding sides are collinear as wanted.
Remark (P.S.C.). After proving that KA, LB, M C are tangent to (ω), we can argue as follows:
KA KF AF KF AF 2
Å ã
It readily follows that 4KAF ∼ 4KAE and so = = , thus = . In a similar
ã2
KE KA
ã2
AE KE AE
ME CE LD BD KF M E LD
Å Å
way we can find that = and = . Multiplying we obtain · · = 1,
MD CD LF BF KE M D LF
so by the converse of Menelaus theorem applied in the triangle DEF we get that the points K, L, M
are collinear.
Problem 3. A jury of 3366 film critics are judging the Oscars. Each critic makes a single vote for
his favourite actor, and a single vote for his favourite actress. It turns out that for every integer
n ∈ {1, 2, . . . , 100} there is an actor or actress who has been voted for exactly n times. Show that
there are two critics who voted for the same actor and for the same actress.

Solution. Let us assume that every critic votes for a different pair of actor and actress. We’ll arrive
at a contradiction proving the required result. Indeed:
Call the vote of each critic, i.e his choice for the pair of an actor and an actress, as a double-vote,
and call as a single-vote each one of the two choices he makes, i.e. the one for an actor and the other
one for an actress. In this terminology, a double-vote corresponds to two single-votes.
For each n = 34, 35, . . . , 100 let us pick out one actor or one actress who has been voted by exactly
n critics (i.e. appears in exactly n single-votes) and call S the set of these movie stars. Calling a, b
the number of men and women in S, we have a + b = 67.
Now let S1 be the set of double-votes, each having exactly one of its two corresponding single-
votes in S, and let S2 be the set of double-votes with both its single-votes in S. If s1 , s2 are the
number of elements in S1 , S2 respectively, we have that the number of all double-votes with at least
one single-vote in S is s1 + s2 , whereas the number of all double-votes with both single-votes in S is
s2 ≤ ab.
Since all double-votes are distinct, there must exist at least s1 + s2 critics. But the number of all
single-votes in S is s1 + 2s2 = 34 + 35 + · · · + 100 = 4489, and moreover s ≤ ab. So there exist at least
s1 + s2 = s1 + 2s2 − s2 ≥ 4489 − ab critics.
Now notice that as a + b = 67, the maximum value of ab with a, b integers is obtained for {a, b} =
(a + b)2 − (a − b)2
{33, 34}, so ab ≤ 33 · 34 = 1122. A quick proof of this is the following: ab = =
4
67 − (a − b)
2 2
which is maximized (for not equal integers a, b as a + b = 67) whenever |a − b| = 1,
4
thus for {a, b} = {33, 34}.
Thus there exist at least 4489 − 1122 = 3367 critics which is a contradiction and we are done.

Remark. We are going here to give some motivation about the choice of number 34, used in the
above solution.
Let us assume that every critic votes for a different pair of actor and actress. One can again start by
picking out one actor or one actress who has been voted by exactly n critics for n = k, k + 1, . . . , 100.
Then a+b = 100−k +1 = 101−k and the number of all single-votes is s1 +2s2 = k +k +1+· · ·+100 =
k(k − 1) k(k − 1)
5050 − , so there exist at least s1 + s2 = s1 + 2s2 − s2 ≥ 5050 − − ab and
2 2
(a + b)2 − (a − b)2 (101 − k)2 − (a − b)2 (101 − k)2 − 1
ab = = ≤ .
4 4 4
After all, the number of critics is at least

k(k − 1) (101 − k)2 − 1


5050 − − .
2 4
In order to arrive at a contradiction we have to choose k such that
k(k − 1) (101 − k)2 − 1
5050 − − ≥ 3367
2 4
and solving the inequality with respect to k, the only value that makes the last one true is k = 34.
Problem 4. Prove that among any 20 consecutive positive integers there exists an integer d such
that for each positive integer n we have the inequality
√ √ 5
n d {n d} >
2
where {x} denotes the fractional part of the real number x. The fractional part of a real number x is
x minus the greatest integer less than or equal to x.

Solution. Among the given numbers there is a number of the form 20k + 15 = 5(4k + 3). We shall
prove that d = 5(4k + 3) satisfies the statement’s condition. Since d ≡ −1(mod 4), it √ follows that d is
not a perfect square, and thus for any n ∈ N there exists a ∈ N such that a + 1 > n d > a, that is,
(a + 1)2 > n2 d > a2 . Actually, we are going to prove that n2 d ≥ a2 + 5. Indeed:
It is known that each positive integer of the form 4s + 3 has a prime divisor of the same form. Let
p | 4k + 3 and p ≡ −1(mod 4). Because of the form of p, the numbers a2 + 12 and a2 + 22 are not
divisible by p, and since p | n2 d, it follows that n2 d 6= a2 + 1, a2 + 4. On the other hand, 5 | n2 d, and
since 5 - a2 + 2, a2 + 3, we conclude n2 d 6= a2 + 2, a2 + 3. Since n2 d > a2 we must have n2 d ≥ a2 + 5
as claimed. Therefore,
√ √ √ √ p a2 + (a2 + 5) 5
n d{n d} = n d(n d − a) ≥ a2 + 5 − a a2 + 5 > a2 + 5 − = ,
2 2
which was to be proved.
Language: English

The 33rd Balkan Mathematical Olympiad


Tirana, May 7, 2016

Problem 1.
Find all injective functions f : R → R such that for every real number x and every positive
integer n,
n Å ã
X



i f (x + i + 1) − f (f (x + i)) < 2016.
i=1

Solution. From the condition of the problem we get



n−1 Å ã
X
i f (x + i + 1) − f (f (x + i))


< 2016 (1)
i=1
Then Å ã
n f (x + n + 1) − f (f (x + n))



n
X Å ã n−1
X Å ã
i f (x + i + 1) − f (f (x + i)) − i f (x + i + 1) − f (f (x + i))

=
i=1 i=1
<2 · 2016 = 4032 (2)
implying
4032
|f (x + n + 1) − f (f (x + n))| < (3)
n
for every real number x and every positive integer n.
Let y ∈ R be arbitrary. Then there exists x such that y = x + n. We obtain
4032
|f (y + 1) − f (f (y))| < (4)
n
for every real number y and every positive integer n. The last inequality holds for every positive
integer n from where f (y +1) = f (f (y)) for every y ∈ R and since the function f is an injection,
then f (y) = y + 1. The function f (y) = y + 1 satisfies the required condition. 
Problem 2.
Let ABCD be a cyclic quadrilateral with AB < CD. The diagonals intersect at the point F
and lines AD and BC intersect at the point E. Let K and L be the orthogonal projections
of F onto lines AD and BC respectively, and let M , S and T be the midpoints of EF , CF
and DF respectively. Prove that the second intersection point of the circumcircles of triangles
M KT and M LS lies on the segment CD.

Solution. Let N be the midpoint of CD. We will prove that the circumcircles of the triangles
M KT and M LS pass through N . (1)
First will prove that the circumcircle of M LS passes through N .
Let Q be the midpoint of EC. Note that the circumcircle of M LS is the Euler circle (2) of
the triangle EF C, so it passes also through Q. (*)(3)

We will prove that


∠SLQ = ∠QN S or ∠SLQ + ∠QN S = 180◦ (4)
Indeed, since F LC is right-angled and LS is its median, we have that SL = SC and
∠SLC = ∠SCL = ∠ACB (5)

In addition, since N and S are the midpoints of DC and F C we have that SN k F D and
similarly, since Q and N are the midpoints of EC and CD , so QN k ED.
It follows that the angles ∠EDB and ∠QN S have parallel sides, and since AB < CD, they
are acute, and as a result we have that
∠EDB = ∠QN S or ∠EDB + ∠QN S = 180◦ (6)
But, from the cyclic quadrilateral ABCD, we get that
∠EDB = ∠ACB (7)
Now, from (2),(3) and (4) we obtain immediately (1), so the quadrilateral LN SQ is cyclic.
Since from (*), its circumcircle passes also through M , we get that the points M, L, Q, S, N are
cocylic and this means that the circumcircle of M LS passes through N .
Similarly, the circumcircle of M KT passes also through N and we have the desired. 
Problem 3.
Find all monic polynomials f with integer coefficients satisfying the following condition: there
exists a positive integer N such that p divides 2 (f (p)!) + 1 for every prime p > N for which
f (p) is a positive integer.
Note: A monic polynomial has leading coefficient equal to 1.
Solution. If f is a constant polynomial then it’s obvious that the condition cannot hold for
p ≥ 5 since f (p) = 1 (1)

From the divisibility relation p|2 (f (p))! + 1 we conclude that:


f (p) < p, for all primes p > N (∗) (2)
In fact, if for some prime number p we have f (p) ≥ p, then p| (f (p))! and then p|1, which is
absurd.
Now suppose that degf = m > 1. Then f (x) = xm + Q(x), degQ(x) ≤ m − 1 and so f (p) =
pm +Q(p). Hence for some large enough prime number p holds that f (p) > p , which contradicts
(*). Therefore we must have degf (x) = 1 and f (x) = x − a, for some positive integer a. (3)
Thus the given condition becomes:
p|2(p − a)! + 1 (4)
But we have (using Wilsons theorem)
2(p − 3)! ≡ −(p − 3)!(p − 2) ≡ −(p − 2)! ≡ −1 (mod p)
⇒ p|2(p − 3)! + 1 (5)
From (1) and (2) we get
(p − 3)! ≡ (p − a)! (mod p)
(p − 3)!(−1)a (a − 1)! ≡ (p − a)!(−1)a (a − 1)! (mod p)
(p − 3)!(−1)a (a − 1)! ≡ 1 (mod p)
Since −2(p − 3)! ≡ 1 (mod p), it follows that
(−1)a (a − 1)! ≡ −2 (mod p) (6)

Taking p > (a − 1)!, we conclude that a = 3 and so f (x) = x − 3, for all x.


The function f (x) = x − 3 satisfies the required condition. 
Problem 4.
The plane is divided into unit squares by two sets of parallel lines, forming an infinite grid.
Each unit square is coloured with one of 1201 colours so that no rectangle with perimeter 100
contains two squares of the same colour. Show that no rectangle of size 1 × 1201 or 1201 × 1
contains two squares of the same colour.
Note: Any rectangle is assumed here to have sides contained in the lines of the grid.
Solution. Let the centers of the unit squares be the integer points in the plane, and denote
each unit square by the coordinates of its center.
Consider the set D of all unit squares (x, y) such that |x| + |y| ≤ 24. Any integer translate of
D is called a diamond.
Since any two unit squares that belong to the same diamond also belong to some rectangle of
perimeter 100, a diamond cannot contain two unit squares of the same colour. Since a diamond
contains exactly 242 + 252 = 1201 unit squares, a diamond must contain every colour exactly
once.
Choose one colour, say, green, and let a1 , a2 , . . . be all green unit squares. Let Pi be the
diamond of center ai . We will show that no unit square is covered by two P ’s and that every
unit square is covered by some Pi .
Indeed, suppose first that Pi and Pj contain the same unit square b. Then their centers lie
within the same rectangle of perimeter 100, a contradiction.
Let, on the other hand, b be an arbitrary unit square. The diamond of center b must contain
some green unit square ai . The diamond Pi of center ai will then contain b.
Therefore, P1 , P2 , . . . form a covering of the plane in exactly one layer. It is easy to see, though,
that, up to translation and reflection, there exists a unique such covering. (Indeed, consider
two neighbouring diamonds. Unless they fit neatly, uncoverable spaces of two unit squares are
created near the corners: see Fig. 1.)

Pi

Pj

Figure 1:

Without loss of generality, then, this covering is given by the diamonds of centers (x, y) such
that 24x+25y is divisible by 1201. (See Fig. 2 for an analogous covering with smaller diamonds.)
It follows from this that no rectangle of size 1 × 1201 can contain two green unit squares, and
analogous reasoning works for the remaining colours.
Figure 2:

Language English Time: 4 hours and 30 minutes


Each problem is worth 10 point
The problems
1. Find all ordered pairs (x, y) of positive integers such that:

x3 + y 3 = x2 + 42xy + y 2 .

2. Let ABC be an acute triangle with with AB < AC and let Γ be its circumcircle. Let the tangents
to Γ at B and C be tB and tC respectively and let their point of intersection be L. The line
through B parallel to AC intersects tC at D. The line through C parallel to AB intersects tB at
E. The circumcircle of triangle BDC meets the side AC at T where T lies between A and C. The
circumcircle of triangle BEC meets the line AB at S where B lies between A and S.
Prove that the lines ST, BC and AL are concurrent.
3. Let N be the set of positive integers. Find all functions f : N → N such that:

n + f (m) divides f (n) + nf (m)

for all m, n ∈ N.

4. There are n > 2 students sitting at a round table. Initially each student has exactly one candy.
At each step, each student chooses one of the following operations:
(a) Pass one candy to the student on their left or the student on their right.
(b) Divide all their candies into two, possibly empty, sets and pass one set to the student on their
left and the other to the student on their right.

At each step the students perform their chosen operations simultaneously.


An arrangement of candies is legal if it can be obtained in a finite number of steps.
Find the number of legal arrangements.
(Two arrangements are different if there is a student who has different numbers of candies in each
one.)

Solutions
The outline solutions below are not full formal write ups, I have omitted some (hopefully) easy details,
and also tried to indicated how the different solutions might have been arrived at naturally.

2
Problem 1
Possible initial thoughts about this equation might include:
(i) I can factorise the sum of cubes on the left.

(ii) How can I use the 42?


(iii) The left is cubic and the right is quadratic, so if x or y is very large there will be no solutions.
The first two might lead us to rewrite the equation as (x + y)(x2 − xy + y 2 ) = x2 − xy + y 2 + 43xy. The
number 43 = 42 + 1 is prime which is good news since we have (x + y − 1)(x2 − xy + y 2 ) = 43xy.
Now we can employ some wishful thinking: if x and y happen to be coprime, then (x2 − xy + y 2 )
has no factors in common with x or y so it must divide 43. This feels like a significant step except for
the fact that x and y may not be coprime.
This suggests writing x = dX and y = dY where d is the highest common factor of x and y.
We end up with (dX + dY − 1)(X 2 − XY + Y 2 ) = 43XY so X 2 − XY + Y 2 equals 1 or 43.
The first of these readily gives X = Y = 1. A neat way to deal with the second is to assume Y ≤ X
so 43 = X 2 − XY + Y 2 ≥ Y 2 . This gives six cases for Y which can be checked in turn. Alternatively
you can solve X 2 − XY + Y 2 = 43 for X and fuss about the discriminant.
In the end the only solutions turn out to be (x, y) = (22, 22), (1, 7) or (7, 1).
Another reasonable initial plan is to bound x+y (using observation (iii) above) and then use modular
arithmetic to eliminate cases until only the correct solutions remain. Working modulo 7 is particularly
appealing since 7|42 and the only cubes modulo 7 are 0, 1 and −1.
We have x3 + y 3 = (x + y)3 − 3xy(x + y) and also x2 + 42xy + y 2 = (x + y)2 + 40xy so the equation
2
becomes (x + y)3 = (x + y)2 + xy(3xy + 40). Now using xy ≤ x+y 2 leads to x + y ≤ 44.
This leaves a mere 484 cases to check! The modulo 7 magic is not really enough to cut this down to
an attractive number, and although the approach can obviously be made to work, to call it laborious is
an understatement.
Other possible approaches, such as substituting u = x + y, v = x − y, seem to lie somewhere between
the two described above in terms of the amount of fortitude needed to pull them off.

3
Problem 2
How we attack this problem depends on how much triangle geometry we can effortlessly recall – a good
knowledge of some standard results helps a great deal.
We might instantly note that AL is a symmedian of ABC, and so divides the line BC in the ratio
c2 : b2 . Now the plan is to show that ST also divides BC in this ratio.
Since we are working with ratios of distances, Menelaus’ theorem may prove useful.
A

C G
B
X

D
L

E
A key step is to notice (based on a careful diagram) that AC is tangent to circle CBS. Once spotted
this is easy to prove. The parallels give us ∠B = ∠BCE, and, since BE is tangent to circle ABC, we
have ∠EBC = ∠A by the alternate segment theorem. Now angles in a triangle give ∠C = ∠CEB, and
we have the converse to the alternate segment theorem. We obtain AB is tangent to circle CBD in the
same way.
Now we have some tangencies and want some ratios.
Tangent-secant yields AT.b = c2 and c.AS = b2 or, equivalently, b.CT = b2 − c2 and c.BS = b2 − c2 .
By Menelaus we know that ST divides BC in the ratio AT.BS : AS.CT and it’s all over bar the
shouting.
If we are not lucky enough to have the stuff about the symmedian at our fingertips, we can still get
essentially the same solution with a bit more work. We begin with the second half of the proof above,
and establish that ST divides BC in the ratio c2 : b2 . Now we need to prove that AL divides BC in
the same ratio.
The next (non-obvious!) step G is to draw a parallel to BC through A as shown.
1
B0 A C0

B C
X

Now 4ABC ∼ 4B 0 AB ∼ 4CC 0 A and the ratio B 0 A : AC 0 which equals BX : XC drops out as c2 : b2
as required.
Clearly knowing the standard symmedian configuration and corresponding ratio is an enormous
advantage.
Finally it is worth noting that, to the right sort of mind, the problem screams out for areal coordi-
nates. These turn out to kill it fairly easily, not least because all three circles pass through at least two
vertices of 4ABC.

4
Problem 3
The striking thing about this problem is that the relation concerns divisibility rather than equality. How
can we exploit this? We are given that n + f (m)|f (n) + nf (m) but we can certainly add or subtract
multiples of the left hand side from the right hand side and preserve the divisibility. This leads to a key
idea:
‘Eliminate one of the variables from the right hand side.’
Clearly n + f (m)|f (n) + nf (m) − n(n + f (m)) so for any n, m we have

n + f (m)|f (n) − n2 (?)

This feels like a strong condition: if we fix n and let f (m) go to infinity, then f (n) − n2 will have
arbitrarily large factors, which implies it must be zero.
We must be careful: this argument is fine, so long as the function f takes arbitrarily large values.
(We also need to check that f (n) = n2 satisfies the original statement which it does.)
We are left with the case where f takes only finitely many values.
In this case f must take the same value infinitely often, so it is natural to focus on an infinite set
S ⊂ N such that f (s) = k for all s ∈ S. If n, m ∈ S then the original statement gives n + k|k + nk where
k is fixed and n can be as large as we like.
Now we recycle our key idea and eliminate n from the right.
n + k|k + nk − k(n + k) so n + k|k − k 2 for arbitrarily large n. This means that k − k 2 = 0 so k = 1,
since it must be positive.
At this point we suspect that f (n) = 1 for all n is the only bounded solution, so we pick some t such
that f (t) = L > 1 and try to get a contradiction.
In the original statement we can set m = t and get n + L|f (n) + nL. Eliminating L from the right
gives us nothing new, so how can we proceed? Well, we have an infinite set S such that f is constantly
1 on S so we can take n ∈ S to obtain n + L|1 + nL
Using our key idea one more time and eliminating n from the right, we get n+L|1−L2 for arbitrarily
large n which is impossible if L > 1.
A rather different solution can be found by playing around with small values of m and n.
As before it helps to establish (?) but now (n, m) = (1, 1) gives 1 + f (1)|f (1) − 1.
The left is bigger than the right, so the right must be zero - f (1) = 1.
Now try (n, m) = (2, 1) and obtain 2 + f (2)|f (2) − 4. Subtracting the left from the right gives
2 + f (2)| − 6. Since f (2) ∈ N the left is a factor of −6 which is bigger than 2. This gives f (2) = 1 or
f (2) = 4.
In the first case we can plug this back into the orginal statement to get 2 + f (m)|1 + 2f (m). Now
taking two copies of the left away from the right we have 2 + f (m)| − 3.
Thus 2 + f (m) must a factor of −3 which is bigger than 2, so f (m) = 1 for any m.
Before proceeding with the case f (2) = 4 we take another look at our strong result (?). Setting
n = m gives n + f (n)|f (n) − n2 so taking f (n) − n2 away from n + f (n) shows that

n + f (n)|n + n2 (†)

Let see if we can use (?) and (†) to pin down the value of f (3), using f (2) = 4.
From (?) we have 3 + 4|f (3) − 9 and from (†) we have 3 + f (3)|12. The second of these shows f (3)
is 1, 3 or 9, but 1 and 3 are too small to work in the first relation.
Similarly, setting (n, m) = (4, 3) in (?) gives 4 + 9|f (4) − 16 while n = 4 in (†) gives 4 + f (4)|20. The
latter shows f (4) ≤ 16 so 13|16 − f (4). The only possible multiples of 13 are 0 and 13, of which only
the first one works. Thus f (4) = 16.
Now we are ready to try induction. Assume f (n − 1) = (n − 1)2 and use (?) and (†) to obtain
n + (n − 1)2 |f (n) − n2 and n + f (n)|n + n2 . The latter implies f (n) ≤ n2 so the former becomes
n2 − n + 1|n2 − f (n). If f (n) 6= n2 then n2 − f (n) = 1 × (n2 − n + 1) since any other multiple would
be too large. However, putting f (n) = n − 1 into n + f (n)|n + n2 implies 2n − 1|n(1 + n). This is a
contradiction since 2n − 1 is coprime to n and clearly cannot divide 1 + n.

5
Problem 4
One possible initial reaction to this problem is that there is rather too much movement of caramels2 at
each step to keep track of easily. This leads to the question: ‘How little can I do in, say, two steps?’
If every student passes all their caramels left on one step using (b), and all their caramels right on the
next step, then no caramels move. (This is rather too little movement.) Let us see what a small change
to this sequence can accomplish. We choose a student with at least one caramel. At the first step, she
passes one caramel to the right and any others she has to the left. Every one else passes everything
left. At the next step everybody passes everything right. The effect of this is that exactly one caramel
has moved exactly two places to the right. Similarly, there is a double step which moves exactly one
caramel to places to the left.
If we have not already done so, now is the time to start working through some small values of n.
The case n = 3 yields a useful observation. Going two places (let’s call this a double jump) to the
left on a triangle is the same as going one place to the right. Indeed if n is odd, say 2k + 1, then k
double jumps to the left moves the caramel one place to the right and vice versa.
It is now clear that, if n is odd, any arrangement of caramels is possible. We simply move them into
position one at a time.
In the case n = 4 it seems hard to get all the caramels into one place. Indeed, if we limit ourselves to
double jumps, then we can only get (1, 1, 1, 1), (1, 2, 1, 0), (2, 2, 0, 0) and rotations of these arrangements.
What can we say about these? Well it seems that students one and three always hold two candies between
them. Having noticed this, it is not too hard to make a more general observation: if n is even then a
double jump cannot change the total number of caramels held by the odd numbered students. However,
double jumps are not the only moves available to us. For example, it is possible to go from (2, 2, 0, 0)
to (3, 1, 0, 0). A double jump now gives (2, 1, 1, 0) as well.
To squeeze maximum value out of the n = 4 case, it is worth looking at the arrangements we have
not yet managed to get to. They are (rotations of) (4, 0, 0, 0), (3, 0, 1, 0) and (2, 0, 2, 0). What do these
have in common? They are precisely the arrangements where the even numbered students hold all the
caramels. Can we prove that these are illegal? Well, what can we say about an arrangement which
precedes one of these elusive ones? This question leads to the last big idea in the solution to this
problem. If after some step the even numbered students have all the caramels, they cannot have had
any at all before the step, else they would have passed at least one caramel to an odd numbered student.
Turning this around gives a crucial lemma for even values of n. Let’s call a caramel held by an
odd numbered student an odd caramel and define even caramels similarly. Let’s call an arrangement
with at least one odd caramel and at least one even caramel balanced. If the arrangement is balanced
before some step, then it will be balanced after the step. The initial position is balanced, so every legal
position is balanced.
Finally we are on the home straight. We claim that every balanced position is legal. Using double
jumps we can move to (. . . , n2 , n2 , 0, . . . ). Now we need to tinker with the numbers of odd and even
caramels. There are lots of usable sequences. For example:

(. . . , a, b, 0, . . . )
(. . . , a − 1, 1, b, . . . )
(. . . , a − 1, b + 1, 0, . . . )
can be used to change the number of odd caramels provided a − 1 ≥ 1.
Once we have the correct number of odd and even caramels, they can be moved into place using
double jumps.
It remains to observe that there are 2n−1

n possible arrangements of caramels, and that if n is even,
3n
then 2 2 n−1 of these are not balanced.


Another sensible approach is to think about which steps are reversible. It turns out that many are,
including all those where the students all use option (b).
It is possible to argue that if n is odd, then we can start with any position, move to (. . . , n, . . . )
reversibly, then move to the initial position reversibly. Playing the whole tape backwards shows all
positions are legal.
If n is even it is possible to start from any balanced position and reversibly move to (. . . , n − 1, 1, . . . )
and thence to the initial position so we are done.

2 The word ‘candy’ was a little too grating for my delicate British ears. I am grateful to the Italians for suggesting the

more elegant alternative.

6
35th BALKAN MATHEMATICAL OLYMPIAD
Belgrade, Serbia (May 9, 2018)

Problem 1.
A quadrilateral ABCD is inscribed in a circle k, where AB > CD and AB is not
parallel to CD. Point M is the intersection of the diagonals AC and BD and the
perpendicular from M to AB intersects the segment AB at the point E. If EM bisects
the angle CED, prove that AB is a diameter of the circle k.

Problem 2.
Let q be a positive rational number. Two ants are initially at the same point X in the
plane. In the n-th minute (n = 1, 2, . . . ) each of them chooses whether to walk due
north, east, south or west and then walks the distance of q n metres. After a whole
number of minutes, they are at the same point in the plane (not necessarily X), but
have not taken exactly the same route within that time. Determine all possible values
of q.

Problem 3.
Alice and Bob play the following game: They start with two non-empty piles of coins.
Taking turns, with Alice playing first, each player chooses a pile with an even number
of coins and moves half of the coins of this pile to the other pile. The game ends if a
player cannot move, in which case the other player wins.
Determine all pairs (a, b) of positive integers such that if initially the two piles have a
and b coins respectively, then Bob has a winning strategy.

Problem 4.
Find all primes p and q such that 3pq−1 + 1 divides 11p + 17p .

Time allowed: 4 hours and 30 minutes.


Each problem is worth 10 points.

1
SOLUTIONS

Problem 1.
Let the line through M parallel to AB meet the segments AD, DH, BC, CH at points
K, P , L, Q, respectively. Triangle HP Q is isosceles, so MP = MQ. Now from
MP DM KM MQ CM ML
= = and = =
BH DB AB AH CA AB
we obtain AH/HB = KM/ML.
Let the lines AD and BC meet at point S and let the line SM meet AB at H  . Then
AH  /H B = KM/ML = AH/HB, so H  ≡ H, i.e. S lies on the line MH.
The quadrilateral ABCD is not a trapezoid, so AH = BH. Consider the point A on
the ray HB such that HA = HA. Since SA M = SAM = SBM, quadrilateral
A BSM is cyclic and therefore ABC = A BS = A MH = AMH = 90◦ −BAC,
which implies that ACB = 90◦ .
S

D
P M L
K Q

A H A B

Problem 2.
Answer: q = 1.
(n) (n)
Let xA (resp. xB ) be the x-coordinates of the first (resp. second) ant’s position after
(n) (n−1) (n) (n)
n minutes. Then xA − xA ∈ {q n , −q n , 0}, and so xA , xB are given by polynomials
in q with coefficients in {−1, 0, 1}. So if the ants meet after n minutes, then
(n) (n)
0 = xA − xB = P (q),

where P is a polynomial with degree at most n and coefficients in {−2, −, 1, 0, 1, 2}.


Thus if q = ab (a, b ∈ N), we have a | 2 and b | 2, i.e. q ∈ { 12 , 1, 2}.
It is clearly possible when q = 1.

2
We argue that q = 12 is not possible. Assume that the ants diverge for the first time
after the kth minute, for k  0. Then
   
 (k+1) (k+1)   (k+1) (k+1) 
xB − xA  + yB − yA  = 2q k . (1)
   
 (+1) ()   (+1) () 
But also xA − xA  + yA − yA  = q  for each l  k + 1, and so
   
 (n) (k+1)   (n) (k+1) 
xA − xA  + yA − yA   q k+1 + q k+2 + . . . + q n−1 . (2)

and similarly for the second ant. Combining (1) and (2) with the triangle inequality,
we obtain for any n  k + 1
     k+1 
 (n) (n)   (n) (n)  k
x
 B − xA  + y
 B − y A   2q − 2 q + q k+2 + . . . + q n−1 ,

which is strictly positive for q = 12 . So for any n  k + 1, the ants cannot meet after n
minutes. Thus q = 12 .
Finally, we show that q = 2 is also not possible. Suppose to the contrary that there is
a pair of routes for q = 2, meeting after n minutes. Now consider rescaling the plane
by a factor 2−n , and looking at the routes in the opposite direction. This would then
be an example for q = 1/2 and we have just shown that this is not possible.
Solution 2.
Consider the ants’ positions αk and βk after k steps in the complex plane, assuming
that their initial positions are at the origin and that all steps are parallel to one of the
axes. We have αk+1 − αk = ak q k and βk+1 − βk = bk q k with ak , bk ∈ {1, −1, i, −i}.
If αn = βn for some n > 0, then

n−1
(ak − bk )q k = 0, where ak − bk ∈ {0, ±1 ± i, ±2, ±2i}.
k=0

Note that the coefficient ak − bk is always divisible by 1 + i in Gaussian integers: indeed,


ak − bk
ck = ∈ {0, ±1, ±i, ±1 ± i}.
1+i
Canceling 1 + i, we obtain c0 + c1 q + · · · + cn−1 q n−1 = 0. Therefore if q = ab (a, b ∈ N),
we have a | c0 and b | cn−1 in Gaussian integers, which is only possible if a = b = 1.

Problem 3.
By v2 (n) we denote the largest nonnegative integer r such that 2r | n.
A position (a, b) (i.e. two piles of sizes a and b) is said to be k-happy if v2 (a) = v2 (b) = k
for some integer k  0, and k-unhappy if min{v2 (a), v2 (b)} = k < max{v2 (a), v2 (b)}.
We shall prove that Bob has a winning strategy if and only if the initial position is
k-happy for some even k.
• Given a 0-happy position, the player in turn is unable to play and loses.
• Given a k-happy position (a, b) with k  1, the player in turn will transform it into
one of the positions (a + 12 b, 12 b) and (b + 12 a, 12 a), both of which are (k − 1)-happy
because v2 (a + 12 b) = v2 ( 12 b) = v2 (b + 12 a) = v2 ( 12 a) = k − 1.

3
Therefore, if the starting position is k-happy, after k moves they will get stuck at a
0-happy position, so Bob will win if and only if k is even.

• Given a k-unhappy position (a, b) with k odd and v2 (a) = k < v2 (b) = , Alice
can move to position ( 12 a, b + 12 a). Since v2 ( 12 a) = v2 (b + 12 a) = k − 1, this position
is (k − 1)-happy with 2 | k − 1, so Alice will win.

• Given a k-unhappy position (a, b) with k even and v2 (a) = k < v2 (b) = , Alice
must not play to position ( 12 a, b + 12 a), because the new position is (k − 1)-happy
and will lead to Bob’s victory. Thus she must play to position (a + 12 b, 12 b). We
claim that this position is also k-unhappy. Indeed, if  > k + 1, then v2 (a + 12 b) =
k < v2 ( 12 b) =  − 1, whereas if  = k + 1, then v2 (a + 12 b) > v2 ( 12 b) = k.

Therefore a k-unhappy position is winning for Alice if k is odd, and drawing if k is


even.

Problem 4.
Answer: (p, q) = (3, 3).
For p = 2 it is directly checked that there are no solutions. Assume that p > 2.
Observe that N = 11p + 17p ≡ 4 (mod 8), so 8  3pq−1 + 1 > 4. Consider an odd prime
divisor r of 3pq−1 + 1. Obviously, r ∈ {3, 11, 17}. There exists b such that 17b ≡ 1
(mod r). Then r | bp N ≡ ap +1 (mod r), where a = 11b. Thus r | a2p −1, but r  ap −1,
which means that ordr (a) | 2p and ordr (a)  p, i.e. ordr (a) ∈ {2, 2p}.
Note that if ordr (a) = 2, then r | a2 − 1 ≡ (112 − 172 )b2 (mod r), which gives r = 7
as the only possibility. On the other hand, ordr (a) = 2p implies 2p | r − 1. Thus, all
prime divisors of 3pq−1 + 1 other than 2 or 7 are congruent to 1 modulo 2p, i.e.

3pq−1 + 1 = 2α 7β pγ11 · · · pγkk , (∗)

where pi ∈ {2, 7} are prime divisors with pi ≡ 1 (mod 2p).


We already know that α  2. Also, note that
11p + 17p
= 11p−1 − 11p−2 17 + 11p−3172 − · · · + 17p−1 ≡ p · 4p−1 (mod 7),
28
so 11p + 17p is not divisible by 72 and hence β  1.
If q = 2, then (∗) becomes 3p+1 = 2α 7β pγ11 · · · pγkk , but pi  2p+1, which is only possible
if γi = 0 for all i, i.e. 3p + 1 = 2α 7β ∈ {2, 4, 14, 28}, which gives us no solutions.
Thus q > 2, which implies 4 | 3pq−1 + 1, i.e. α = 2. Now the right hand side of (∗) is
congruent to 4 or 28 modulo p, which gives us p = 3. Consequently 3q + 1 | 6244, which
is only possible for q = 3. The pair (p, q) = (3, 3) is indeed a solution.

4
n Mathematic
lka al
Ba O
h
36th Balkan Mathematical Olympiad

ly
t
36

mp
The

iad
Chisinau, Republic of Moldova, 30.04 – 05.05.2019

5.2 019
C hisin a u

5.0
,R

-0
ep

ub

4
lic .0
of M 30
o ld o v a,

Problem 1.
Let P be the set of all prime numbers. Find all functions f : P → P such that

f (p)f (q) + q p = f (q)f (p) + pq

holds for all p, q ∈ P.


Proposed by Albania

Solution. Obviously, the identical function f (p) = p for all p ∈ P is a solution. We will
show that this is the only one.
First we will show that f (2) = 2. Taking q = 2 and p any odd prime number, we have

f (p)f (2) + 2p = f (2)f (p) + p2 .

Assume that f (2) 6= 2. It follows that f (2) is odd and so f (p) = 2 for any odd prime
number p.
Taking any two different odd prime numbers p, q we have

22 + q p = 22 + pq ⇒ pq = q p ⇒ p = q,

contradiction. Hence, f (2) = 2.


So for any odd prime number p we have

f (p)2 + 2p = 2f (p) + p2 .

Copy this relation as


2p − p2 = 2f (p) − f (p)2 . (1)
Let T be the set of all positive integers greater than 2, i.e. T = {3, 4, 5, . . .}. The
function g : T → Z, g(n) = 2n − n2 , is strictly increasing, i.e.

g(n + 1) − g(n) = 2n − 2n − 1 > 0 (2)

for all n ∈ T . We show this by induction. Indeed, for n = 3 it is true, 23 − 2 · 3 − 1 > 0.


Assume that 2k − 2k − 1 > 0. It follows that for n = k + 1 we have

2k+1 − 2(k + 1) − 1 = (2k − 2k − 1) + (2k − 2) > 0

for any k ≥ 3. Therefore, (2) is true for all n ∈ T .


As consequence, (1) holds if and only if f (p) = p for all odd prime numbers p, as well
as for p = 2.
Therefore, the only function that satisfies the given relation is f (p) = p, for all p ∈ P.

Problem 2.
√ real numbers, such that 0 ≤ a ≤ b ≤ c and a + b + c = ab + bc + ca > 0.
Let a, b, c be
Prove that bc(a + 1) ≥ 2. Find all triples (a, b, c) for which equality holds.
Proposed by Romania

Solution. Let a + b + c = ab + bc + ca = k. Since (a + b + c)2 ≥ 3(ab + bc + ca), we get


that k 2 ≥ 3k. Since k > 0, we obtain that k ≥ 3.
We have bc ≥ ca ≥ ab, √ so from the above relation we deduce that bc ≥ 1.
By AM-GM, b + c ≥ 2 bc and consequently b + c ≥ 2. The equality holds iff b = c.
The constraint gives us
√ √
b + c − bc bc − 1 bc − 1 bc(2 − bc)
a= =1− ≥1− √ = √ .
b+c−1 b+c−1 2 bc − 1 2 bc − 1
√ √
For √bc = 2 condition a ≥ 0 gives bc(a+1) ≥ 2 with equality iff a = 0 and b = c = 2.
For bc < 2, taking into account the estimation for a, we get

√ bc(2 − bc) bc √
a bc ≥ √ = √ (2 − bc).
2 bc − 1 2 bc − 1

Since 2√bc
bc−1
≥ 1, with equality for bc = 1, we get bc(a + 1) ≥ 2 with equality iff
a = b =√c = 1. √
For bc > 2 we have bc(a + 1) > 2(a + 1) ≥ 2.
The proof is complete.
The equality holds iff a = b = c = 1 or a = 0 and b = c = 2. 
Problem 3.
Let ABC be an acute scalene triangle. Let X and Y be two distinct interior points of the
segment BC such that ∠CAX = ∠Y AB. Suppose that:
1) K and S are the feet of perpendiculars from B to the lines AX and AY respectively;
2) T and L are the feet of perpendiculars from C to the lines AX and AY respectively.
Prove that KL and ST intersect on the line BC.
Proposed by Greece

Solution. Denote φ = XAB


\ = Y[ AC, α = CAX
\ = BAY
[ . Then, because the quadrilat-
erals ABSK and ACTL are cyclic, we have

BSK \ = 180◦ = BSK


\ + BAK \ + φ = LAC
[ + LT
[ C = LT
[ C + φ,

so, due to the 90-degree angles formed, we have KSL


[ = KT
[L. Thus, KLST is cyclic.

Figure 1: G6

Consider M to be the midpoint of BC and K 0 to be the symmetric point of K with


respect to M . Then, BKCK 0 is a parallelogram, and so BKkCK 0 . But BKkCT , because
they are both perpendicular to AX. So, K 0 lies on CT and, as KT
\ K 0 = 90 and M is the
0
midpoint of KK , M K = M T . In a similar way, we have that M S = M L. Thus, the
center of (KLST ) is M .
Consider D to be the foot of altitude from A to BC. Then, D belongs in both (ABKS)
and (ACLT ). So,

ADT [ = 180◦ = ABS


[ + ACT [ + ADS [ + 90◦ − α = ADS
[ = ADT [ + 90◦ − α,

and AD is the bisector of SDT


[.
Because DM is perpendicular to AD, DM is the external bisector of this angle, and,
as M S = M T , it follows that DM ST is cyclic. In a similar way, we have that DM LK is
also cyclic.
So, we have that ST , KL and DM are the radical axes of these three circles, (KLST ),
(DM ST ), (DM KL). These lines are, therefore, concurrent, and we have proved the
desired result. 
Problem 4.
A grid consists of all points of the form (m, n) where m and n are integers with |m| 6 2019,
|n| 6 2019 and |m| + |n| < 4038. We call the points (m, n) of the grid with either
|m| = 2019 or |n| = 2019 the boundary points. The four lines x = ±2019 and y = ±2019
are called boundary lines. Two points in the grid are called neighbours if the distance
between them is equal to 1.
Anna and Bob play a game on this grid.
Anna starts with a token at the point (0, 0). They take turns, with Bob playing first.
1) On each of his turns, Bob deletes at most two boundary points on each boundary
line.
2) On each of her turns, Anna makes exactly three steps, where a step consists of
moving her token from its current point to any neighbouring point which has not been
deleted.
As soon as Anna places her token on some boundary point which has not been deleted,
the game is over and Anna wins.
Does Anna have a winning strategy?
Proposed by Cyprus

Solution. Anna does not have a winning strategy. We will provide a winning strategy
for Bob. It is enough to describe his strategy for the deletions on the line y = 2019.
Bob starts by deleting (0, 2019) and (−1, 2019). Once Anna completes her turn, he
deletes the next two available points on the left if Anna decreased her x-coordinate, the
next two available points on the right if Anna increased her x-coordinate, and the next
available point to the left and the next available point to the right if Anna did not change
her x-coordinate. The only exception to the above rule is on the very first time Anna
decreases x by exactly 1. In that turn, Bob deletes the next available point to the left
and the next available point to the right.
Bob’s strategy guarantees the following: If Anna makes a sequence of steps reaching
(−x, y) with x > 0 and the exact opposite sequence of steps in the horizontal direction
reaching (x, y), then Bob deletes at least as many points to the left of (0, 2019) in the first
sequence than points to the right of (0, 2019) in the second sequence.
So we may assume for contradiction that Anna wins by placing her token at (k, 2019)
for some k > 0.
Define ∆ = 3m − (2x + y), where m is the total number of points deleted by Bob to
the right of (0, 2019), and (x, y) is the position of Anna’s token.
For each sequence of steps performed first by Anna and then by Bob, ∆ does not
decrease. This can be seen by looking at the following table exhibiting the changes in 3m
and 2x + y. We have excluded the cases where 2x + y < 0.

Turn (0,3) (1,2) (-1,2) (2,1) (0,1) (3,0) (1,0) (2,-1) (1,-2)
m 1 2 0 (or 1) 2 1 2 2 2 2
3m 3 6 0 (or 3) 6 3 6 6 6 6
2x + y 3 4 0 5 1 6 2 3 0
The table also shows that, if in this sequence of turns Anna changes y by +1 or −2,
then ∆ is increased by 1. Also, if Anna changes y by +2 or −1, then the first time this
happens ∆ is increased by 2. (This also holds if her turn is (0, −1) or (−2, −1), which
are not shown in the table.)
Since Anna wins by placing her token at (k, 2019) we must have m 6 k − 1 and
k 6 2018. So at that exact moment we have:

∆ = 3m − (2k + 2019) = k − 2022 6 −4.

So in her last turn she must have decreased ∆ by at least 4. So her last turn must have
been (1, 2) or (2, 1), which give a decrease of 4 and 5 respectively. (It could not be (3, 0)
because then she must have already won. Also she could not have done just one or two
steps in her last turn since this is not enough for the required decrease in ∆.)
If her last turn was (1, 2), then just before doing it we had y = 2017 and ∆ = 0. This
means that in one of her turns the total change in y was not 0 mod 3. However, in that
case we have seen that ∆ > 0, a contradiction.
If her last turn was (2, 1), then just before doing it we had y = 2018 and ∆ = 0 or
∆ = 1. So she must have made at least two turns with the change of y being +1 or −2
or at least one step with the change of y being +2 or −1. In both cases, consulting the
table, we get an increase of at least 2 in ∆, a contradiction.

Note 1: If Anna is allowed to make at most three steps at each turn, then she
actually has a winning strategy.

Note 2: If 2019 is replaced by N > 1, then Bob has a winning strategy if and only if
3 | N. 

You might also like