0% found this document useful (0 votes)
257 views166 pages

EMC 2012-21 en With Solutions

The document contains a collection of mathematical problems from various competitions, including the Balkan Student Mathematical Competition and the European Mathematical Cup. Each problem is designed to challenge students' understanding of advanced mathematical concepts and requires proof or solution within a set time limit. The problems cover a range of topics, including inequalities, geometry, number theory, and combinatorics.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
257 views166 pages

EMC 2012-21 en With Solutions

The document contains a collection of mathematical problems from various competitions, including the Balkan Student Mathematical Competition and the European Mathematical Cup. Each problem is designed to challenge students' understanding of advanced mathematical concepts and requires proof or solution within a set time limit. The problems cover a range of topics, including inequalities, geometry, number theory, and combinatorics.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 166

MLADI NADARENI MATEMATIČARI

Marin Getaldic

1st BALKAN STUDENT MATHEMATICAL COMPETITION


1. Matematičko natjecanje učenika Balkana
November 2008.

2nd grade

Problem 1. If x, y and z are positive real numbers for which x + y + z = 1, prove the inequality
1 1 1 1
√ +√ +√ ≤√ .
x+y y+z z+x 2xyz

(Adrian Satja Kurdija)

Problem 2. A natural number is written in each cell of 10 × 10 table. It is known that, no matter
which 5 columns i 5 rows of this table we choose, the sum of numbers in their 25 intersection cells
is even. Prove that all the numbers in the table are even.

Problem 3. Let Mn and Nn be points on sides CA and CB of triangle ABC, respectively, such
that
1 1
|CMn | = |CA| , |CNn | = |CB| , ∀n ∈ N.
n n+1
Find the locus of points Mi Ni ∩ Mj Nj , where i and j are different natural number.
Note. Mi Ni ∩ Mj Nj denotes the intersection of lines Mi Ni and Mj Nj .

Problem 4. a, b and c are natural numbers. It is known that a2 + b2 + abc has no more than 2008
natural divisors and that it is divisible by (c + 2)1004 . Prove that a and b are not relatively prime.
(Adrian Satja Kurdija)

Time allowed: 240 minutes.


Each problem is worth 10 points.
Write each problem on a separate paper.
Calculators or any other helping items, excluding rulers and compasses, are not allowed.
1st European Mathematical Cup
24th November 2012–1st December 2012 MLADI NADARENI MATEMATIČARI

Marin Getaldic
Junior Category

Problem 1. Let ABC be a triangle and Q a point on the internal angle bisector of ∠BAC. Circle ω1 is
circumscribed to triangle BAQ and intersects the segment AC in point P 6= C. Circle ω2 is circumscribed to
the triangle CQP . Radius of the cirlce ω1 is larger than the radius of ω2 . Circle centered at Q with radius QA
intersects the circle ω1 in points A and A1 . Circle centered at Q with radius QC intersects ω1 in points C1 and
C2 . Prove ∠A1 BC1 = ∠C2 P A.
(Matija Bucić)

Problem 2. Let S be the set of positive integers. For any a and b in the set we have GCD(a, b) > 1. For any
a, b and c in the set we have GCD(a, b, c) = 1. Is it possible that S has 2012 elements?
GCD(x, y) and GCD(x, y, z) stand for the greatest common divisor of the numbers x and y and numbers x, y
and z respectively.
(Ognjen Stipetić)

Problem 3. Do there exist positive real numbers x, y and z such that

x4 + y 4 + z 4 = 13,

x3 y 3 z + y 3 z 3 x + z 3 x3 y = 6 3,

x3 yz + y 3 zx + z 3 xy = 5 3?

(Matko Ljulj)

Problem 4. Let k be a positive integer. At the European Chess Cup every pair of players played a game in
which somebody won (there were no draws). For any k players there was a player against whom they all lost,
and the number of players was the least possible for such k. Is it possible that at the Closing Ceremony all
the participants were seated at the round table in such a way that every participant was seated next to both a
person he won against and a person he lost against.
(Matija Bucić)

Time allowed: 240 minutes.


Each problem is worth 10 points.
Calculators are not allowed.
2nd European Mathematical Cup
7th December 2013–15th December 2013 MLADI NADARENI MATEMATIČARI

Marin Getaldic
Junior Category

Problem 1. For a positive integer m let m? be the product of first m prime numbers.
Determine if there exist positive integers m and n with the following property:

m? = n(n + 1)(n + 2)(n + 3).

(Matko Ljulj)

Problem 2. Let P be a point inside a triangle ABC. A line through P parallel to AB meets BC and CA
at points L and F , respectively. A line through P parallel to BC meets CA and BA at points M and D
respectively, and a line through P parallel to CA meets AB and BC at points N and E respectively. Prove

(P DBL) · (P ECM ) · (P F AN ) = 8 · (P F M ) · (P EL) · (P DN ),

where (XY Z) and (XY ZW ) denote the area of the triangle XY Z and the area of quadrilateral XY ZW .
(Steve Dinh)

Problem 3. We are given a combination lock consisting of 6 rotating discs. Each disc consists of digits
0, 1, 2, . . . , 9, in that order (after digit 9 comes 0). Lock is opened by exactly one combination. A move consists
of turning one of the discs one digit in any direction and the lock opens instantly if the current combination is
correct. Discs are initially put in the position 000000, and we know that this combination is not correct.

a) What is the least number of moves necessary to ensure that we have found the correct combination?
b) What is the least number of moves necessary to ensure that we have found the correct combination, if we
know that none of the combinations 000000, 111111, 222222, . . ., 999999 is correct?

(Ognjen Stipetić, Grgur Valentić)

Problem 4. Let a, b, c be positive real numbers satisfying

a b c ab bc ca
+ + > + + .
1+b+c 1+c+a 1+a+b 1+a+b 1+b+c 1+c+a
Prove

a2 + b2 + c2 √ √ √
+ a + b + c + 2 > 2( ab + bc + ca).
ab + bc + ca
(Dimitar Trenevski)

Time allowed: 240 minutes.


Each problem is worth 10 points.
Calculators are not allowed.
3rd European Mathematical Cup
6th December 2014–14th December 2014 MLADI NADARENI MATEMATIČARI

Marin Getaldic
Junior Category

Problem 1. Which of the following claims are true, and which of them are false? If a fact is true you should
prove it, if it isn’t, find a counterexample.
a) Let a, b, c be real numbers such that a2013 + b2013 + c2013 = 0. Then a2014 + b2014 + c2014 = 0.
b) Let a, b, c be real numbers such that a2014 + b2014 + c2014 = 0. Then a2015 + b2015 + c2015 = 0.
c) Let a, b, c be real numbers such that a2013 + b2013 + c2013 = 0 and a2015 + b2015 + c2015 = 0. Then
a2014 + b2014 + c2014 = 0.
(Matko Ljulj)

Problem 2. In each vertex of a regular n-gon A1 A2 ...An there is a unique pawn. In each step it is allowed:

1. to move all pawns one step in the clockwise direction or


2. to swap the pawns at vertices A1 and A2 .

Prove that by a finite series of such steps it is possible to swap the pawns at vertices:
a) Ai and Ai+1 for any 1 6 i < n while leaving all other pawns in their initial place
b) Ai and Aj for any 1 6 i < j 6 n leaving all other pawns in their initial place.
(Matija Bucić)

Problem 3. Let ABC be a triangle. The external and internal angle bisectors of ∠CAB intersect side BC at
D and E, respectively. Let F be a point on the segment BC. The circumcircle of triangle ADF intersects AB
and AC at I and J, respectively. Let N be the mid-point of IJ and H the foot of E on DN . Prove that E is
the incenter of triangle AHF .
(Steve Dinh)

Problem 4. Find all infinite sequences a1 , a2 , a3 , . . . of positive integers such that


a) anm = an am , for all positive integers n, m, and
b) there are infinitely many positive integers n such that {1, 2, . . . , n} = {a1 , a2 , . . . , an }.

(Matko Ljulj)

Time allowed: 240 minutes.


Each problem is worth 10 points.
Calculators are not allowed.
4th European Mathematical Cup
5th December 2015–13th December 2015 MLADI NADARENI MATEMATIČARI

Marin Getaldic
Junior Category

Problem 1. We are given an n × n board. Rows are labeled with numbers 1 to n downwards and columns
are labeled with numbers 1 to n from left to right. On each field we write the number x2 + y 2 where (x, y) are
its coordinates. We are given a figure and can initially place it on any field. In every step we can move the
figure from one field to another if the other field has not already been visited and if at least one of the following
conditions is satisfied:
• the numbers in those 2 fields give the same remainders when divided by n,
• those fields are point reflected with respect to the center of the board.
Can all the fields be visited in case:

a) n = 4,
b) n = 5?
(Josip Pupić)

Problem 2. Let m, n, p be fixed positive real numbers which satisfy mnp = 8. Depending on these constants,
find the minimum of
x2 + y 2 + z 2 + mxy + nxz + pyz,
where x, y, z are arbitrary positive real numbers satisfying xyz = 8. When is the equality attained?
Solve the problem for:
a) m = n = p = 2,
b) arbitrary (but fixed) positive real numbers m, n, p.

(Stijn Cambie)

Problem 3. Let d(n) denote the number of positive divisors of n. For positive integer n we define f (n) as

f (n) = d(k1 ) + d(k2 ) + . . . + d(km ),

where 1 = k1 < k2 < · · · < km = n are all divisors of the number n. We call an integer n > 1 almost perfect if
f (n) = n. Find all almost perfect numbers.
(Paulius Ašvydis)

Problem 4. Let ABC be an acute angled triangle. Let B 0 , A0 be points on the perpendicular bisectors of
AC, BC respectively such that B 0 A ⊥ AB and A0 B ⊥ AB. Let P be a point on the segment AB and O
the circumcenter of the triangle ABC. Let D, E be points on BC, AC respectively such that DP ⊥ BO and
EP ⊥ AO. Let O0 be the circumcenter of the triangle CDE. Prove that B 0 , A0 and O0 are collinear.
(Steve Dinh)

Time allowed: 240 minutes.


Each problem is worth 10 points.
Calculators are not allowed.
5th European Mathematical Cup
3rd December 2016–11th December 2016 MLADI NADARENI MATEMATIČARI

Marin Getaldic
Junior Category

Problem 1. A grasshopper is jumping along the number line. Initially it is situated at zero. In k-th step, the
length of his jump is k.
a) If the jump length is even, then it jumps to the left, otherwise it jumps to the right (for example, firstly
it jumps one step to the right, then two steps to the left, then three steps to the right, then four steps to
the left...). Will it visit on every integer at least once?
b) If the jump length is divisible by three, then it jumps to the left, otherwise it jumps to the right (for
example, firstly it jumps one step to the right, then two steps to the right, then three steps to the left,
then four steps to the right...). Will it visit every integer at least once?
(Matko Ljulj)

Problem 2. Two circles C1 and C2 intersect at points A and B. Let P, Q be points on circles C1 , C2 respectively,
such that |AP | = |AQ|. The segment P Q intersects circles C1 and C2 in points M, N respectively. Let C be
the center of the arc BP of C1 which does not contain point A and let D be the center of arc BQ of C2 which
does not contain point A. Let E be the intersection of CM and DN . Prove that AE is perpendicular to CD.
(Steve Dinh)

Problem 3. Prove that for all positive integers n there exist n distinct, positive rational numbers with sum of
their squares equal to n.
(Daniyar Aubekerov)

Problem 4. We will call a pair of positive integers (n, k) with k > 1 a lovely couple if there exists a table n × n
consisting of ones and zeros with following properties:
• In every row there are exactly k ones.
• For each two rows there is exactly one column such that on both intersections of that column with the
mentioned rows, number one is written.

Solve the following subproblems:


a) Let d 6= 1 be a divisor of n. Determine all remainders that d can give when divided by 6.
b) Prove that there exist infinitely many lovely couples.

(Miroslav Marinov, Daniel Atanasov)


6th European Mathematical Cup
9th December 2017–17th December 2017 MLADI NADARENI MATEMATIČARI

Marin Getaldic
Junior Category

Problem 1. Find all pairs (x, y) of integers that satisfy the equation

x2 y + y 2 = x3 .

(Daniel Paleka)

Problem 2. A regular hexagon in the plane is called sweet if its area is equal to 1. Is it possible to place
2000000 sweet hexagons in the plane such that the union of their interiors is a convex polygon of area at least
1900000?

Remark: A subset S of the plane is called convex if for every pair of points in S, every point on the straight
line segment that joins the pair of points also belongs to S. The hexagons may overlap.
(Josip Pupić, Borna Vukorepa)

Problem 3. Let ABC be an acute triangle. Denote by H and M the orthocenter of ABC and the midpoint
of side BC, respectively. Let Y be a point on AC such that Y H is perpendicular to M H and let Q be a point
on BH such that QA is perpendicular to AM . Let J be the second point of intersection of M Q and the circle
with diameter M Y . Prove that HJ is perpendicular to AM .
(Steve Dinh)

Problem 4. The real numbers x, y, z satisfy x2 + y 2 + z 2 = 3. Prove the inequality



x3 − (y 2 + yz + z 2 )x + y 2 z + yz 2 ≤ 3 3

and find all triples (x, y, z) for which equality holds.


(Miroslav Marinov)
7th European Mathematical Cup
8th December 2018 - 16th December 2018 MLADI NADARENI MATEMATIČARI

Marin Getaldic
Junior Category

Problem 1. Let a, b, c be non-zero real numbers such that


1
a2 + b + c = ,
a
1
b2 + c + a = ,
b
1
c2 + a + b = .
c
Prove that at least two of a, b, c are equal.
(Daniel Paleka)

Problem 2. Find all pairs (x, y) of positive integers such that

xy | x2 + 2y − 1.

(Ivan Novak)

Problem 3. Let ABC be an acute triangle with |AB| < |AC| and orthocenter H. The circle with center A
and radius |AC| intersects the circumcircle of 4ABC at point D and the circle with center A and radius |AB|
intersects the segment AD at point K. The line through K parallel to CD intersects BC at the point L. If M
is the midpoint of BC and N is the foot of the perpendicular from H to AL, prove that the line M N bisects
the segment AH.
(Miroslav Marinov)

Problem 4. Let n be a positive integer. Ana and Banana are playing the following game:
First, Ana arranges 2n cups in a row on a table, each facing upside-down. She then places a ball under a cup
and makes a hole in the table under some other cup. Banana then gives a finite sequence of commands to Ana,
where each command consists of swapping two adjacent cups in the row.
Her goal is to achieve that the ball has fallen into the hole during the game. Assuming Banana has no information
about the position of the hole and the position of the ball at any point, what is the smallest number of commands
she has to give in order to achieve her goal?
(Adrian Beker)
8th European Mathematical Cup
14th December 2019 - 22th December 2019 MLADI NADARENI MATEMATIČARI

Marin Getaldic
Junior Category

Problem 1. Every positive integer is marked with a number from the set {0, 1, 2}, according to the following
rule:
if a positive integer k is marked with j, then the integer k + j is marked with 0.
Let S denote the sum of marks of the first 2019 positive integers. Determine the maximum possible value of S.
(Ivan Novak)

Problem 2. Define a sequence x1 , x2 , x3 , . . . such that x1 = 2 and
1
xn+1 = xn + for n ∈ N.
xn
Prove that the following inequality holds:

x21 x22 x22018 x22019 20192


+ + ... + + > 2 .
2x1 x2 − 1 2x2 x3 − 1 2x2018 x2019 − 1 2x2019 x2020 − 1 x2019 + x21
2019

(Ivan Novak)

Problem 3. Let ABC be a triangle with circumcircle ω. Let lB and lC be two lines through the points B and
C, respectively, such that lB k lC . The second intersections of lB and lC with ω are D and E, respectively.
Assume that D and E are on the same side of BC as A. Let DA intersect lC at F and let EA intersect lB
at G. If O, O1 and O2 are circumcenters of the triangles ABC, ADG and AEF , respectively, and P is the
circumcenter of the triangle OO1 O2 , prove that lB k OP k lC .
(Stefan Lozanovski)

Problem 4. Let u be a positive rational number and m be a positive integer. Define a sequence q1 , q2 , q3 , . . .
such that q1 = u and for n > 2:
a a + mb
if qn−1 = for some relatively prime positive integers a and b, then qn = .
b b+1
Determine all positive integers m such that the sequence q1 , q2 , q3 , . . . is eventually periodic for any positive
rational number u.

Remark: A sequence x1 , x2 , x3 , . . . is eventually periodic if there are positive integers c and t such that xn = xn+t
for all n > c.
(Petar Nizić-Nikolac)

Time: 240 minutes.


Each problem is worth 10 points.
The use of calculators or any other instruments except rulers and compasses is not permitted.
9th European Mathematical Cup
12th December 2020 - 20th December 2020 MLADI NADARENI MATEMATIČARI

Marin Getaldic
Junior Category

Problem 1. Let ABC be an acute-angled triangle. Let D and E be the midpoints of sides AB and AC
respectively. Let F be the point such that D is the midpoint of EF . Let Γ be the circumcircle of triangle F DB.
Let G be a point on the segment CD such that the midpoint of BG lies on Γ. Let H be the second intersection
of Γ and F C. Show that the quadrilateral BHGC is cyclic.
(Art Waeterschoot)

Problem 2. A positive integer k > 3 is called fibby if there exists a positive integer n and positive integers
d1 < d2 < . . . < dk with the following properties:
• dj+2 = dj+1 + dj for every j satisfying 1 6 j 6 k − 2,
• d1 , d2 , . . . , dk are divisors of n,
• any other divisor of n is either less than d1 or greater than dk .

Find all fibby numbers.


(Ivan Novak)

Problem 3. Two types of tiles, depicted on the figure below, are given.

Tile F: Tile Z:

Find all positive integers n such that an n × n board consisting of n2 unit squares can be covered without gaps
with these two types of tiles (rotations and reflections are allowed) so that no two tiles overlap and no part of
any tile covers an area outside the n × n board.
(Art Waeterschoot)

Problem 4. Let a, b, c be positive real numbers such that ab+bc+ac = a+b+c. Prove the following inequality:
r
a √
r r  
b c a b c b c a
a + + b + + c + 6 2 · min + + , + + .
c a b b c a a b c

(Dorlir Ahmeti)

Time: 240 minutes.


Each problem is worth 10 points.
The use of calculators or any other instruments except rulers and compasses is not permitted.
10th European Mathematical
Cup MLADI NADARENI MATEMATIČARI

11th December 2021 - 19th December 2021 Marin Getaldic


Junior Category

Problem 1. We say that a quadruple of nonnegative real numbers (a, b, c, d) is balanced if

a + b + c + d = a2 + b2 + c2 + d2 .

Find all positive real numbers x such that

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

for every balanced quadruple (a, b, c, d).


(Ivan Novak)

Problem 2. Let ABC be an acute-angled triangle such that |AB| < |AC|. Let X and Y be points on the
_
minor arc BC of the circumcircle of ABC such that |BX| = |XY | = |Y C|. Suppose that there exists a point
N on the segment AY such that |AB| = |AN | = |N C|. Prove that the line N C passes through the midpoint of
the segment AX.
(Ivan Novak)

Problem 3. Let ` be a positive integer. We say that a positive integer k is nice if k! + ` is a square of an
integer. Prove that for every positive integer n > `, the set {1, 2, . . . , n2 } contains at most n2 − n + ` nice
integers.
(Théo Lenoir)

Problem 4. Let n be a positive integer. Morgane has coloured the integers 1, 2, . . . , n. Each of them is coloured
in exactly one colour. It turned out that for all positive integers a and b such that a < b and a + b 6 n, at least
two of the integers among a, b and a + b are of the same colour. Prove that there exists a colour that has been
used for at least 2n/5 integers.
(Vincent Jugé)

Time: 240 minutes.


Each problem is worth 10 points.
The use of calculators or any other instruments except rulers and compasses is not permitted.
MLADI NADARENI MATEMATIČARI

Marin Getaldic

1st BALKAN STUDENT MATHEMATICAL COMPETITION


1. Matematičko natjecanje učenika Balkana
November 2008.

3rd and 4th grade

Problem 1. Find all functions f : R → R such that for every two real numbers x and y,
f (f (x) + xy) = f (x) · f (y + 1) .
(Marko Radovanović)

Problem 2. Paralampius the Gnu stands on number 1 on number line. He wants to come to a
natural number k by a sequence of consecutive jumps. Let us denote the number of ways on which
Paralampius can come from number 1 to number k with f (k) (f : N → N0 ). Specially, f (1) = 0. A
way is a sequence of numbers (with order) which Paralampius has visited on his travel from number
1 to number k. Paralampius can, from number b, jump to number
• 2b (always),
• 3b (always),
b4
 
2
• b if ∈ N, where k is a natural number on which he wants to come to in the end .
6k
Prove that, for every natural number n, there exists a natural number m0 such that for every natural
number m > m0 ,
f (m) < 2α1 +α2 +...+αi −n ,
where m = pα1 1 · pα2 2 · . . . · pαi i (p1 < p2 < . . . < pi are prime divisors of number m and i, α1 , α2 , . . . , αi
are natural numbers) is a prime factorization of natural number m. It is known that this factoriza-
tion is unique for every natural number m > 1.
(Melkior Ornik, Ivan Krijan)

Problem 3. A convex n-gon (n ∈ N, n > 2) is given in the plane. Its area is less than 1. For each
point X of this plane, we shall denote with F (X) the area of the convex hull of point X and a given
n-gon (the area of the minimal convex polygon which includes both the point X and a given n-gon).
Prove that the set of points for which F (X) = 1 is a convex polygon with 2n sides or less.

Problem 4. Prove that for every natural number k, there exists infinitely many natural numbers
n such that
n − d (nr )
∈ Z, for every r ∈ {1, 2, . . . , k} .
r
Here, d (x) denotes the number of natural divisors of a natural number x, including 1 and x itself.
(Melkior Ornik)

Time allowed: 240 minutes.


Each problem is worth 10 points.
Write each problem on a separate paper.
Calculators or any other helping items, excluding rulers and compasses, are not allowed.
1st European Mathematical Cup
24th November 2012–1st December 2012 MLADI NADARENI MATEMATIČARI

Marin Getaldic
Senior Category

Problem 1. Find all positive integers a, b, n and prime numbers p that satisfy

a2013 + b2013 = pn .

(Matija Bucić)

Problem 2. Let ABC be an acute triangle with orthocenter H. Segments AH and CH intersect segments
BC and AB in points A1 and C1 respectively. The segments BH and A1 C1 meet at point D. Let P be the
midpoint of the segment BH. Let D0 be the reflection of the point D in AC. Prove that quadrilateral AP CD0
is cyclic.
(Matko Ljulj)

Problem 3. Prove that the following inequality holds for all positive real numbers a, b, c, d, e and f :
r s
3 abc def p
+ 3 < 3 (a + b + d)(c + e + f ).
a+b+d c+e+f

(Dimitar Trenevski)

Problem 4. Olja writes down n positive integers a1 , a2 , . . . , an smaller than pn where pn denotes the n-th
prime number. Oleg can choose two (not necessarily different) numbers x and y and replace one of them with
their product xy. If there are two equal numbers Oleg wins. Can Oleg guarantee a win?
(Matko Ljulj)

Time allowed: 240 minutes.


Each problem is worth 10 points.
Calculators are not allowed.
2nd European Mathematical Cup
7th December 2013–15th December 2013 MLADI NADARENI MATEMATIČARI

Marin Getaldic
Senior Category

Problem 1. In each field of a table there is a real number. We call such n × n table silly if each entry equals
the product of all the numbers in the neighbouring fields.

a) Find all 2 × 2 silly tables.


b) Find all 3 × 3 silly tables.

(Two fields of a table are neighbouring if they share a common side.) (Borna Vukorepa)

Problem 2. Palindrome is a sequence of digits which doesn’t change if we reverse the order of its digits. Prove

that a sequence (xn )n=0 defined as

xn = 2013 + 317n
contains infinitely many numbers with their decimal expansions being palindromes.
(Stijn Cambie)

Problem 3. We call a sequence of n digits one or zero a code. Subsequence of a code is a palindrome if it is
the same after we reverse the order of its digits. A palindrome is called nice if its digits occur consecutively in
the code.(Code (1101) contains 10 palindromes, of which 6 are nice.)

a) What is the least number of palindromes in a code?


b) What is the least number of nice palindromes in a code?

(Ognjen Stipetić)

Problem 4. Given a triangle ABC let D, E, F be orthogonal projections from A, B, C to the opposite sides
respectively. Let X, Y, Z denote midpoints of AD, BE, CF respectively. Prove that perpendiculars from D to
Y Z, from E to XZ and from F to XY are concurrent.
(Matija Bucić)

Time allowed: 240 minutes.


Each problem is worth 10 points.
Calculators are not allowed.
3rd European Mathematical Cup
6th December 2014–14th December 2014 MLADI NADARENI MATEMATIČARI

Marin Getaldic
Senior Category

Problem 1. Prove that there are infinitely many positive integers which can’t be expressed as ad(a) + bd(b)
where a and b are positive integers.
For positive integer a expression d(a) denotes the number of positive divisors of a. (Borna Vukorepa)

Problem 2. Jeck and Lisa are playing a game on an m × n board, with m, n > 2. Lisa starts by putting a
knight onto the board. Then in turn Jeck and Lisa put a new piece onto the board according to the following
rules:

1. Jeck puts a queen on an empty square that is two squares horizontally and one square vertically, or
alternatively one square horizontally and two squares vertically, away from Lisa’s last knight.
2. Lisa puts a knight on an empty square that is on the same, row, column or diagonal as Jeck’s last queen.
The one who is unable to put a piece on the board loses the game. For which pairs (m, n) does Lisa have a
winning strategy?
(Stijn Cambie)

Problem 3. Let ABCD be a cyclic quadrilateral with the intersection of internal angle bisectors of ∠ABC
and ∠ADC lying on the diagonal AC. Let M be the midpoint of AC. The line parallel to BC that passes
through D intersects the line BM in E and the circumcircle of ABCD at F where F 6= D. Prove that BCEF
is a parallelogram.
(Steve Dinh)

Problem 4. Find all functions f : R → R such that for all x, y ∈ R the following holds:

f (x2 ) + f (2y 2 ) = (f (x + y) + f (y))(f (x − y) + f (y)).

(Matija Bucić)

Time allowed: 240 minutes.


Each problem is worth 10 points.
Calculators are not allowed.
4th European Mathematical Cup
5th December 2015–13th December 2015 MLADI NADARENI MATEMATIČARI

Marin Getaldic
Senior Category

Problem 1. A = {a, b, c} is a set containing three positive integers. Prove that we can find a set B ⊂ A,
B = {x, y} such that for all odd positive integers m, n we have

10|xm y n − xn y m .

(Tomi Dimovski)

Problem 2. Let a, b, c be positive real numbers such that abc = 1. Prove that
a+b+c+3 1 1 1
> + + .
4 a+b b+c c+a

(Dimitar Trenevski)

Problem 3. Circles k1 and k2 intersect in points A and B, such that k1 passes through the center O of the
circle k2 . The line p intersects k1 in points K and O and k2 in points L and M , such that the point L is between
K and O. The point P is orthogonal projection of the point L to the line AB. Prove that the line KP is
parallel to the M -median of the triangle ABM . (Matko Ljulj)

Problem 4. A group of mathematicians is attending a conference. We say that a mathematician is k-content


if he is in a room with at least k people he admires or if he is admired by at least k other people in the room.
It is known that when all participants are in a same room then they are all at least 3k + 1-content. Prove that
you can assign everyone into one of 2 rooms in a way that everyone is at least k-content in his room and neither
room is empty. Admiration is not necessarily mutual and no one admires himself.
(Matija Bucić)

Time allowed: 240 minutes.


Each problem is worth 10 points.
Calculators are not allowed.
5th European Mathematical Cup
3rd December 2016–11th December 2016 MLADI NADARENI MATEMATIČARI

Marin Getaldic
Senior Category

Problem 1. Is there a sequence a1 , . . . , a2016 of positive integers, such that every sum

ar + ar+1 + . . . + as−1 + as

(with 1 6 r 6 s 6 2016) is a composite number, but

a) GCD(ai , ai+1 ) = 1 for all i = 1, 2, . . . , 2015;


b) GCD(ai , ai+1 ) = 1 for all i = 1, 2, . . . , 2015 and GCD(ai , ai+2 ) = 1 for all i = 1, 2, . . . , 2014?

GCD(x, y) denotes the greatest common divisor of x, y.


(Matija Bucić)

Problem 2. For two positive integers a and b, Ivica and Marica play the following game: Given two piles of a
and b cookies, on each turn a player takes 2n cookies from one of the piles, of which he eats n and puts n of
them on the other pile. Number n is arbitrary in every move. Players take turns alternatively, with Ivica going
first. The player who cannot make a move, loses. Assuming both players play perfectly, determine all pairs of
numbers (a, b) for which Marica has a winning strategy.
(Petar Orlić)

Problem 3. Determine all functions f : R → R such that equality

f (x + y + yf (x)) = f (x) + f (y) + xf (y)

holds for all real numbers x, y.


(Athanasios Kontogeorgis)

Problem 4. Let C1 , C2 be circles intersecting in X, Y . Let A, D be points on C1 and B, C on C2 such that


A, X, C are collinear and D, X, B are collinear. The tangent to circle C1 at D intersects BC and the tangent to
C2 at B in P, R respectively. The tangent to C2 at C intersects AD and tangent to C1 at A, in Q, S respectively.
Let W be the intersection of AD with the tangent to C2 at B and Z the intersection of BC with the tangent
to C1 at A. Prove that the circumcircles of triangles Y W Z, RSY and P QY have two points in common, or are
tangent in the same point.
(Misiakos Panagiotis)
6th European Mathematical Cup
9th December 2017–17th December 2017 MLADI NADARENI MATEMATIČARI

Marin Getaldic
Senior Category

Problem 1. Find all functions f : N → N such that the inequality

f (x) + yf (f (x)) ≤ x(1 + f (y))

holds for all positive integers x, y.


(Adrian Beker)

Problem 2. A friendly football match lasts 90 minutes. In this problem, we consider one of the teams, coached
by Sir Alex, which plays with 11 players at all times.

a) Sir Alex wants for each of his players to play the same integer number of minutes, but each player has to
play less than 60 minutes in total. What is the minimum number of players required?
b) For the number of players found in a), what is the minimum number of substitutions required, so that each
player plays the same number of minutes?

Remark: Substitutions can only take place after a positive integer number of minutes, and players who have
come off earlier can return to the game as many times as needed. There is no limit to the number of substitutions
allowed.
(Athanasios Kontogeorgis, Demetres Christofides)

Problem 3. Let ABC be a scalene triangle and let its incircle touch sides BC, CA and AB at points D, E and
F respectively. Let line AD intersect this incircle at point X. Point M is chosen on the line F X so that the
quadrilateral AF EM is cyclic. Let lines AM and DE intersect at point L and let Q be the midpoint of segment
AE. Point T is given on the line LQ such that the quadrilateral ALDT is cyclic. Let S be a point such that
the quadrilateral T F SA is a parallelogram, and let N be the second point of intersection of the circumcircle of
triangle ASX and the line T S. Prove that the circumcircles of triangles T AN and LSA are tangent to each
other.
(Andrej Ilievski)

Problem 4. Find all polynomials P with integer coefficients such that P (0) 6= 0 and

P n (m) · P m (n)

is a square of an integer for all nonnegative integers n, m.

Remark: For a nonnegative integer k and an integer n, P k (n) is defined as follows: P k (n) = n if k = 0
and P k (n) = P (P k−1 (n)) if k > 0.
(Adrian Beker)
7th European Mathematical Cup
8th December 2018 - 16th December 2018 MLADI NADARENI MATEMATIČARI

Marin Getaldic
Senior Category

Problem 1. A partition of a positive integer is even if all its elements are even numbers. Similarly, a partition
is odd if all its elements are odd. Determine all positive integers n such that the number of even partitions of
n is equal to the number of odd partitions of n.

Remark: A partition of a positive integer n is a non-decreasing sequence of positive integers whose sum of
elements equals n. For example, (2, 3, 4), (1, 2, 2, 2, 2) and (9) are partitions of 9.
(Ivan Novak)

Problem 2. Let ABC be a triangle with |AB| < |AC|. Let k be the circumcircle of 4ABC and let O be the
center of k. Point M is the midpoint of the arc BC
d of k not containing A. Let D be the second intersection of
the perpendicular line from M to AB with k and E be the second intersection of the perpendicular line from
M to AC with k. Points X and Y are the intersections of CD and BE with OM respectively. Denote by kb
and kc circumcircles of triangles BDX and CEY respectively. Let G and H be the second intersections of kb
and kc with AB and AC respectively. Denote by ka the circumcircle of triangle AGH.
Prove that O is the circumcenter of 4Oa Ob Oc , where Oa , Ob , Oc are the centers of ka , kb , kc respectively.
(Petar Nizić-Nikolac)

Problem 3. For which real numbers k > 1 does there exist a bounded set of positive real numbers S with at
least 3 elements such that
k(a − b) ∈ S
for all a, b ∈ S with a > b?

Remark: A set of positive real numbers S is bounded if there exists a positive real number M such that
x < M for all x ∈ S.
(Petar Nizić-Nikolac)

Problem 4. Let x, y, m, n be integers greater than 1 such that


x y
·· ··
xx yy
| {z } = y| {z } .
x
m times n times

Does it follow that m = n?

m
Remark: This is a tetration operation, so we can also write x = n y for the initial condition.
(Petar Nizić-Nikolac)
8th European Mathematical Cup
14th December 2019 - 22th December 2019 MLADI NADARENI MATEMATIČARI

Marin Getaldic
Senior Category

Problem 1. For positive integers a and b, let gcd(a, b) denote their greatest common divisor. Determine all
pairs of positive integers (m, n) such that for any two positive integers x and y such that x | m and y | n,

gcd(x + y, mn) > 1.

(Ivan Novak)

Problem 2. Let n be a positive integer. A n × n board consisting of n2 cells, each being a unit square coloured
either black or white, is called convex if for every black coloured cell, both the cell directly to the left of it (if it
exists) and the cell directly above it (if it exists) are also coloured black. We define the beauty of a board as the
number of pairs of its cells (u, v) such that u is black, v is white and u and v are in the same row or column.
Determine the maximum possible beauty of a convex n × n board.
(Ivan Novak)

Problem 3. In an acute triangle ABC with |AB| = 6 |AC|, let I be the incenter and O the circumcenter. The
incircle is tangent to BC, CA and AB in D, E and F respectively. Prove that if the line parallel to EF passing
through I, the line parallel to AO passing through D and the altitude from A are concurrent, then the point of
concurrence is the orthocenter of the triangle ABC.
(Petar Nizić-Nikolac)

Problem 4. Find all functions f : R → R such that

f (x) + f (yf (x) + f (y)) = f (x + 2f (y)) + xy

for all x, y ∈ R.
(Adrian Beker)

Time: 240 minutes.


Each problem is worth 10 points.
The use of calculators or any other instruments except rulers and compasses is not permitted.
9th European Mathematical Cup
12th December 2020 - 20th December 2020 MLADI NADARENI MATEMATIČARI

Marin Getaldic
Senior Category

Problem 1. Let ABCD be a parallelogram such that |AB| > |BC|. Let O be a point on the line CD such
that |OB| = |OD|. Let ω be a circle with center O and radius |OC|. If T is the second intersection of ω and
CD, prove that AT, BO and ω are concurrent.
(Ivan Novak)

Problem 2. Let n and k be positive integers. An n-tuple (a1 , a2 , . . . , an ) is called a permutation if every
number from the set {1, 2, . . . , n} occurs in it exactly once. For a permutation (p1 , p2 , . . . , pn ), we define its
k-mutation to be the n-tuple
(p1 + p1+k , p2 + p2+k , . . . , pn + pn+k ),
where indices are taken modulo n. Find all pairs (n, k) such that every two distinct permutations have distinct
k-mutations.

Remark: For example, when (n, k) = (4, 2), the 2-mutation of (1, 2, 4, 3) is (1 + 4, 2 + 3, 4 + 1, 3 + 2) = (5, 5, 5, 5).
(Borna Šimić)

Problem 3. Let p be a prime number. Troy and Abed are playing a game. Troy writes a positive integer X
on the board, and gives a sequence (an )n∈N of positive integers to Abed. Abed now makes a sequence of moves.
The n-th move is the following:

Replace Y currently written on the board with either Y + an or Y · an .

Abed wins if at some point the number on the board is a multiple of p. Determine whether Abed can win,
regardless of Troy’s choices, if
a) p = 109 + 7;
b) p = 109 + 9.

Remark: Both 109 + 7 and 109 + 9 are prime.


(Ivan Novak)

Problem 4. Let R+ denote the set of all positive real numbers. Find all functions f : R+ → R+ such that

xf (x + y) + f (xf (y) + 1) = f (xf (x))

for all x, y ∈ R+ .
(Amadej Kristjan Kocbek, Jakob Jurij Snoj)

Time: 240 minutes.


Each problem is worth 10 points.
The use of calculators or any other instruments except rulers and compasses is not permitted.
10th European Mathematical
Cup MLADI NADARENI MATEMATIČARI

11th December 2021 - 19th December 2021 Marin Getaldic


Senior Category

Problem 1. Alice drew a regular 2021-gon in the plane. Bob then labelled each vertex of the 2021-gon with a
real number, in such a way that the labels of consecutive vertices differ by at most 1. Then, for every pair of
non-consecutive vertices whose labels differ by at most 1, Alice drew a diagonal connecting them. Let d be the
number of diagonals Alice drew. Find the least possible value that d can obtain.
(Ivan Novak)

Problem 2. Let ABC be a triangle and let D, E and F be the midpoints of sides BC, CA and AB, respectively.
Let X 6= A be the intersection of AD with the circumcircle of ABC. Let Ω be the circle through D and X,
tangent to the circumcircle of ABC. Let Y and Z be the intersections of the tangent to Ω at D with the
perpendicular bisectors of segments DE and DF , respectively. Let P be the intersection of Y E and ZF and
let G be the centroid of ABC. Show that the tangents at B and C to the circumcircle of ABC and the line
P G are concurrent.
(Jakob Jurij Snoj)

Problem 3. Let N denote the set of all positive integers. Find all functions f : N → N such that

x2 − y 2 + 2y(f (x) + f (y))

is a square of an integer for all positive integers x and y.


(Ivan Novak)

Problem 4. Find all positive integers d for which there exist polynomials P (x) and Q(x) with real coefficients
such that degree of P equals d and
P (x)2 + 1 = (x2 + 1)Q(x)2 .

(Ivan Novak)

Time: 240 minutes.


Each problem is worth 10 points.
The use of calculators or any other instruments except rulers and compasses is not permitted.
MLADI NADARENI MATEMATIČARI

Marin Getaldic

1st BALKAN STUDENT MATHEMATICAL COMPETITION


1. Matematičko natjecanje učenika Balkana
November 2008.

2nd grade
Solutions

Problem 1. If x, y and z are positive real numbers for which x + y + z = 1, prove the inequality
1 1 1 1
√ +√ +√ ≤√ .
x+y y+z z+x 2xyz
(Adrian Satja Kurdija)

Solution. Multiplying the given inequality by 2 xyz, we get an equivalent inequality
√ √ √
xyz xyz xyz √
2 +2 +2 ≤ 2.
x+y y+z z+x
xy x+y xy x+y
Let us notice that ≤ ⇐⇒ (x − y)2 ≥ 0, so ≤ . Now,
x+y 4 x+y 4
√ √ √
xyz xy x+y √
2 =2 ·z ≤2 · z = z (x + y).
x+y x+y 4
(2 points)
Using Arithmetic Mean - Geometric Mean inequality (or using the fact that the square of a real
√ x+y
number is always nonnegative) on numbers z 2 and √ , we get
2
√ ( ) √
√ √ x+y 1 √ x+y (x + y + 2z) 2
z (x + y) = z 2 · √ ≤ z 2+ √ = .
2 2 2 4
(3 points)
With this, we have shown that
√ √
xyz (x + y + 2z) 2
2 ≤ .
x+y 4
Analogously, we show that
√ √
xyz (y + z + 2x) 2
2 ≤ ,
y+z 4
√ √
xyz (z + x + 2y) 2
2 ≤ .
z+x 4
By adding these three inequalities we get
√ √ √ √
xyz xyz xyz (4x + 4y + 4z) 2 √
2 +2 +2 ≤ = 2.
x+y y+z z+x 4

1
We have, hence, proven the inequality in question. (5 points)


Problem 2. A natural number is written in each cell of 10 × 10 table. It is known that, no matter
which 5 columns and 5 rows of this table we choose, the sum of numbers in their 25 intersection
cells is even. Prove that all the numbers in the table are even.

Solution. Let us first prove the following lemma.


Lemma 1. If the sum of each 5 of the given 10 natural numbers is even, then all these numbers are
even.
Proof. Let’s assume the opposite. It is clear that not all numbers can be odd. Therefore, there has
to be at least one odd and at least one even number. Then, if there are 5 or more odd numbers, by
choosing 5 odd numbers we reach a contradiction. If there are less than 5 odd numbers, by choosing
4 even and one odd number, we also reach a contradiction. Hence, this lemma is proven. (2 points)

Let us observe any 5 columns of the given table. For every row of the table, let’s compute the sum
of numbers in cells which we get by intersecting the row with these 5 columns. That way we get 10
natural numbers (one for each row). The sum of any 5 of these numbers is even (this follows from
the conditions of the problem). Now, using Lemma 1, we conclude that each of these 10 sums is
even. (4 points)
By observing all possible choices of 5 columns of the given table, we get that the sum of each 5
numbers of every row is even. Again, using Lemma 1, we conclude that every number in each row
is even. Therefore, all numbers in the table is even. (4 points)


Problem 3. Let Mn and Nn be points on sides CA and CB of triangle ABC, respectively, such
that
1 1
|CMn | = |CA| , |CNn | = |CB| , ∀n ∈ N.
n n+1
Find the locus of points Mi Ni ∩ Mj Nj , where i and j are different natural number.
Note. Mi Ni ∩ Mj Nj denotes the intersection of lines Mi Ni and Mj Nj .

Solution. We intend to show that all the mentioned lines intersect in one point. That will be point
D such that quadrilateral ABDC is a parallelogram. (1 point)

Let n be any natural number. We draw line p parallel to line AC such that B is on p . Let D be the
intersection of p i Mn Nn . Let us notice that ]Mn CNn = ]ACB = ]CBD = ]Nn BD (alternate
interior angles) and ]CNn Mn = ]BNn D (vertical angles). So, we have shown that triangles CMn Nn
and BDNn are similar (they have two equal angles). (2 points)

2
Now,
|BD| |BNn |
= ,
|CMn | |CNn |
which means
|CMn | · |BNn | 1
· |CA| · (|CB| − |CNn |)
|BD| = = n
|CNn | |CNn |
( )
1
|CA| · |CB| − n+1 |CB|
1
= n 1
n+1
|CB|
1
n
|CA| · n
n+1
|CB|
= 1
n+1
|CB|
= |CA| .

With this, we have shown that |BD| = |AC| and, since we know that BD ∥ AC, it follows that
quadrilateral ABDC is a parallelogram. (4 points)
Now we know that line Mn Nn goes through point D such that quadrilateral ABDC is a parallelogram
for each natural number n. Finally, we conclude that the locus of Mi Ni ∩ Mj Nj , where i and j are
different natural numbers, is point D such that quadrilateral ABDC is a parallelogram. (3 points)


Problem 4. a, b and c are natural numbers. It is known that a2 + b2 + abc has no more than 2008
natural divisors and that it is divisible by (c + 2)1004 . Prove that a and b are not relatively prime.
(Adrian Satja Kurdija)

Solution. Let A = a2 + b2 + abc and p = c + 2, having in mind that then p ≥ 3. Let’s assume that
there exists a prime number q such that q 2 | p. Then, q 2008 | A, and as q 2008 itself has 2009 > 2008
divisors, we reach a contradiction. So, there does not exist a prime number q such that q 2 | p.
Further, let us assume that there exist different prime numbers r and s which divide p. Then,
r1004 s1004 | A and, obviously, 10052 > 2008 and we, again, have a contradiction. Hence, there do not
exist two different prime numbers which both divide p. With all of this, we have shown that p is
prime. (2 points)
Now, c = p − 2, and, for that reason,

A = a2 + b2 + abc = a2 + b2 + ab (p − 2) = a2 − 2ab + b2 + abp = (a − b)2 + abp.

Since p | A and p | abp, it follows that p | (a − b)2 and, since p is prime, it further follows that
p | a − b. From this, we conclude finally that p2 | (a − b)2 . (2 points)
Furthermore, p2 | A and p2 | (a − b)2 , so p2 | abp, which leads to p | ab, must also be true. (1 point)
Now we know that p | a − b, p | ab and that p is prime. Since p | ab, this means that p divides at
least one of the numbers a and b. (1 point)
Without loss of generality, we may assume that p | a. Then, from p | a − b, it directly follows that
p | b. So, numbers a and b are not relatively prime. (4 points)

3
1st European Mathematical Cup
24th November 2012–1st December 2012 MLADI NADARENI MATEMATIČARI

Marin Getaldic
Junior Category

Problems and solutions


Problem 1. Let ABC be a triangle and Q a point on the internal angle bisector of ∠BAC. Circle ω1 is
circumscribed to triangle BAQ and intersects the segment AC in point P 6= C. Circle ω2 is circumscribed to
the triangle CQP . Radius of the cirlce ω1 is larger than the radius of ω2 . Circle centered at Q with radius QA
intersects the circle ω1 in points A and A1 . Circle centered at Q with radius QC intersects ω1 in points C1 and
C2 . Prove ∠A1 BC1 = ∠C2 P A.
(Matija Bucić)

Solution. From the conditions in the problem we have |QC1 | = |QC2 | and |QA| = |QA1 |. Also as Q lies on the internal
angle bisector of∠CAB we have ∠P AQ = ∠QAB =⇒ |QP | = |QB|.
Now noting from this that pairs of points A and A1 , C1 and C2 , B and P are symmetric in line QS1 , where S1 is the
center of ω1 . We can directly conclude ∠A1 BC1 = ∠AP C2 as these is the image of the angle in symmetry.
This way we have avoided checking many cases but there are many ways to prove this problem.

Problem 2. Let S be the set of positive integers. For any a and b in the set we have GCD(a, b) > 1. For any
a, b and c in the set we have GCD(a, b, c) = 1. Is it possible that S has 2012 elements?
GCD(x, y) and GCD(x, y, z) stand for the greatest common divisor of the numbers x and y and numbers x, y
and z respectively.
(Ognjen Stipetić)

Solution. There is such a set.


We will construct it in the following way: Let a1 , a2 , . . . a2012 equal to 1 in the begining. Then we take 2012·2011
2
different
prime numbers, and assign a different prime to every pair ai , aj (where i 6= j) and multiply them with this assigned
number. (I.e. for the set of 4 elements we can take 2, 3, 5, 7, 11, 13, so S would be {2 · 3 · 5, 2 · 7 · 11, 3 · 7 · 13, 5 · 11 · 13}.
The construction works as we have multiplied any pair of numbers with some prime so the condition gcd(a, b) > 1 is
satisfied for all a, b. As well as each prime divides exactly 2 primes so no three numbers a, b, c can have gcd(a, b, c) > 1.

Problem 3. Do there exist positive real numbers x, y and z such that

x4 + y 4 + z 4 = 13,

x3 y 3 z + y 3 z 3 x + z 3 x3 y = 6 3,

x3 yz + y 3 zx + z 3 xy = 5 3?

(Matko Ljulj)

Solution. Let’s assume that such x, y, z exist. Let a = x2 , b = y 2 , c = z 2 . As well, let A = a + b + c, B = ab + bc + ca,
C = abc. The upper system can be rewritten as:

a2 + b2 + c2 = 13 =⇒ (a + b + c)2 − 2(ab + bc + ca) = 13 =⇒ A2 − 2B = 13


√ √ √
xyz(x2 y 2 + y 2 z 2 + z 2 x2 ) = 6 3 =⇒ CB = 6 3
√ √ √
xyz(x2 + y 2 + z 2 ) = 5 3 =⇒ CA = 5 3.

1
√ √
We can note that a, b and c are positive reals (They are not negaitve from the definition; and as CB = 6 3 they are
not 0).

When we cancel out C from the second and third equation we get 5B = 6A. When we express B in terms of A and
put int the first equation we get a quadratic equation
12
A2 − A − 13 = 0.
5
with solutions 5 and − 13
5
. As a, b and c are positive reals, and the sum must be positive so their sum is poistive real
number as well. So A = 5 =⇒ B = 6 =⇒ C = 3.
By AM-GM inequality we get
ab + bc + ca √
3
> ab · bc · ca
3
B √3
⇐⇒ > C2
3
6 √
> 9 /3
3
⇐⇒
3
⇐⇒ 8 > 9.

so we reached a contradiction, thus such x, y, z don’t exist.

Problem 4. Let k be a positive integer. At the European Chess Cup every pair of players played a game in
which somebody won (there were no draws). For any k players there was a player against whom they all lost,
and the number of players was the least possible for such k. Is it possible that at the Closing Ceremony all
the participants were seated at the round table in such a way that every participant was seated next to both a
person he won against and a person he lost against.
(Matija Bucić)

Solution. The answer is yes.


In this problem we could use graph theory terminology but as this problem was intended for younger students we shall
avoid mentioning any specific graph theory terms.
Let’s take the largest number of participants whom we can seat around the table as desired. If we have seated all the
participants we are done. Otherwise there is a person not seated at the table. As well there is at least one person seated
at the table so let’s name it a.
WLOG we can assume that for each person seated at the table to his right there is a person he won against and to his
left a person he lost against.
Denote by W the set of people who won against person a, and are not seated at the table. Similarly, let L denote the
set of all people who lost against a and are not seated at the table.
Let’s consider any person p from W . If person p lost against the left neighbour of a, then we could seat p in between a
and his (former) left neighbour, which is a contradiction with the assumption that we have seated the maximal possible
number of people. So p won against the left neighbour of a. Using similar deduction we conclude that p won against the
next left neighbour as well etc. So p must have won against everybody seated at the table.
In the same way if we consider any person q from L and consider the right neighbour of a, we can conclude that q lost
against every person seated at the table.
If some person r from W lost against some person s in L, then instead of seating a we can seat s and r respectively by
which we would reach a contradiction to the number of people seated being maximal.
So we conclude that all the people in W won against all people not in W and all the people in L lost against all people
not in L.
As there is a someone who is not seated either W or L is non-empty. If W is non-empty, we can consider the set W as
an independent chess cup. It is a cup with smaller number of participants but still satisfying problem conditions which
would be the contradiction with the fact that our starting cup is the smallest such cup.
As well if L is non-empty, the smaller cup made by people seated at the table and people in W also satisfies the problem
conditions and gives us a contradiction.
So the only possibility is that both W and L are empty so indeed it is possible to seat everyone at such table.

2
2nd European Mathematical Cup
7th December 2013–15st December 2013 MLADI NADARENI MATEMATIČARI

Marin Getaldic
Junior Category

Problems and Solutions


Problem 1. For a positive integer m let m? be the product of first m prime numbers.
Determine if there exist positive integers m and n with the following property:

m? = n(n + 1)(n + 2)(n + 3).

(Matko Ljulj)

Solution. Such numbers don’t exist.


Let’s assume the contrary i.e. there are such m and n.
We can note that there is only one prime divisible by 2 and that it 2 itself thus m? isn’t divisble by 4. On the other
hand, the product n(n + 1)(n + 2)(n + 3) is product of 4 consecutive integers so two of them are even making the product
divisble by 4.
Thus equality m? = n(n + 1)(n + 2)(n + 3) gives us a contradiction as LHS is not divisble by 4 while RHS is.

Problem 2. Let P be a point inside a triangle ABC. A line through P parallel to AB meets BC and CA
at points L and F , respectively. A line through P parallel to BC meets CA and BA at points M and D
respectively, and a line through P parallel to CA meets AB and BC at points N and E respectively. Prove

(P DBL) · (P ECM ) · (P F AN ) = 8 · (P F M ) · (P EL) · (P DN ),

where (XY Z) and (XY ZW ) denote the area of the triangle XY Z and the area of quadrilateral XY ZW .
(Steve Dinh)

Solution.

Let’s denote the areas as on the sketch.


The problem is equivalent to
U · V · W = X · Y · Z.
Let x and y be lengths of altitudes from I and D in the triangle BID and let a and b be lenghts of sides BI and BD.
We can deduce
1 BC
X = (P ED) = · a · y · ,
2 BA
1 BA
Z = (P IH) = ·b·x· and
2 BC

1
1 1
U = (BID) = ·a·x= ·b·y
2 2
This gives U 2 = X · Z. Analogously we get W 2 = Y · Z and V 2 = X · Y . Multiplying all three equalities we get the
desired equation.

Second solution. Let’s denote the areas of triangles P EL, P F M , P DN as PA , PB , PC respectively and let’s denote the
areas of quadrilaterals P F AN , P DBL, P ECM as QA , QB , QC respectively. We want to prove QA QB QC = 8PA PB PC .
Triangles P EL, P F M , and P DN are similar to the triangle ABC (they have respective pairs of sides on parallel lines).
Let’s denote the respective similarity coefficients as kA , kB , kC . As triangles P EL, P F M , and P DN are in the interior
of ABC, all those coefficients are less than 1.
Triangle EN B is similar to the triangle ABC. Its similarity coefficient is
EN EF + F N EF FN
= = + = kA + kC .
AC AC AC AC
From all these similarity relations we get area relations. Namely:
 2  2
kA kA
PA : PB = (PA : (ABC)) : (PB : (ABC)) = =⇒ PA = PB ,
kB kB
 2  2
kC kC
PC : PB = (PC : (ABC)) : (PB : (ABC)) = =⇒ PC = PB .
kB kB

Using this we get:

(PA + PC + QB ) : PB = (EN B) : (P F M ) = (kA + kC )2 : (kB )2


2 2
kA + 2kA kC + kC k2 2kA kC k2 2kA kC
=⇒ PA + PC + QB = 2
PB = A
2
PB + 2
PB + C
2
PB = PA + 2
PB + PC
kB kB kB kB kB
2kA kC
=⇒ QB = 2
PB .
kB

Similary by the same process applied to F LC and M DA we get QC = 2kkB2kA PC i QA = 2kkC2kB PA . Multiplying what
C A
we got we have
2 2 2
2kC kB 2kA kC 2kB kA k kB kC
QA QB QC = 2
PA 2
PB 2
PC = 8 A
2 2 2
PA PB PC = 8PA PB PC ,
kA kB kC kA kB kC
Q.E.D.

Problem 3. We are given a combination lock consisting of 6 rotating discs. Each disc consists of digits
0, 1, 2, . . . , 9, in that order (after digit 9 comes 0). Lock is opened by exactly one combination. A move consists
of turning one of the discs one digit in any direction and the lock opens instantly if the current combination is
correct. Discs are initially put in the position 000000, and we know that this combination is not correct.

a) What is the least number of moves necessary to ensure that we have found the correct combination?
b) What is the least number of moves necessary to ensure that we have found the correct combination, if we
know that none of the combinations 000000, 111111, 222222, . . ., 999999 is correct?

(Ognjen Stipetić, Grgur Valentić)

Solution. We will solve the subproblems seperately.

a) In order to ensure that we have discovered the code we need to check all but one of the combinations (as otherwise
all unchecked codes can be the correct combination). Total number of combinations is 106 (as each of the 6 discs
consists of 10 digits). As we are given that 000000 is not the correct combination we require at least 106 − 2 moves.
We will now prove that there is a sequence of 106 − 2 moves each checking a different combination. We will prove
this by induction on the number of wheels where the case n = 6 is given in the problem.
Claim: For a lock of n wheels and for any starting combination of the wheels (a1 a2 . . . an ) there is a sequence of
moves checking all 106 combinations exactly once, for all n ∈ N.
Basis: For n = 1 and for the starting combination (a), we consider the sequence of moves

a → a + 1 → a + 2 → ... → 9 → 0 → 1 → ... → a − 1

2
Assumption: The induction claim is valid for some n ∈ N.
Step: We will prove that the claim holds for n+1 as well. We consider an arbitrary starting state (a1 a2 . . . an an+1 ).
By the induction hypothesis there is a sequence of moves such that starting from this state we can check all the
states showing an+1 on the last disc. Let this sequence of moves end with the combination (b1 b2 . . . bn an+1 ).
Now we make the move (b1 b2 . . . bn an+1 ) → (b1 b2 . . . bn an+1 + 1) (if an+1 is 9, then we turn the disc to show 0).
We continue in the same way applying the induction hypothesis on first n discs and the rotation the n + 1-st disc.
This way we get the sequence of moves
(a1 a2 . . . an an+1 ) → (b1 b2 . . . bn an+1 ) → (b1 b2 . . . bn an+1 + 1)
→ (c1 c2 . . . cn an+1 + 1) → (c1 c2 . . . cn an+1 + 2)
...
→ (j1 j2 . . . jn an+1 − 2) → (j1 j2 . . . jn an+1 − 1).

This sequence checks each combination exactly once finishing the induction and proving our claim.
b) As in the a) part, we conclude that we have to check all the combinations apart from 000000, 111111, ..., 999999
and we can be sure as to what is the solution before the move checking the last combination.
We denote the combination as black if the sum of its digits is even and white if that sum is odd. We can notice
that all the combinations 000000, 111111, ..., 999999 are black and by each move we swap the color of the current
combination.
6
Number of black combinations all of which we need to check at least once is 102 − 10 while number of such white
6
combinations is 102 .
6
As we are checking white combinations every second move, in order to check all 102 white combination swe need
6
at least 2 102 − 1 = 106 − 1 moves, thus we need at least 106 − 2 moves to find the correct combination.
An example doing this in 106 − 2 moves has been given in part a).

Problem 4. Let a, b, c be positive real numbers satisfying

a b c ab bc ca
+ + > + + .
1+b+c 1+c+a 1+a+b 1+a+b 1+b+c 1+c+a
Prove

a2 + b2 + c2 √ √ √
+ a + b + c + 2 > 2( ab + bc + ca).
ab + bc + ca
(Dimitar Trenevski)

Solution. We start with the given condition:

a b c ab bc ca
+ + > + + ⇐⇒
1+b+c 1+c+a 1+a+b 1+a+b 1+b+c 1+c+a
a + ab + bc b + bc + ba c + ca + cb ab + ac + bc bc + ab + bc ca + bc + ab
+ + > + + ⇐⇒
1+b+c 1+c+a 1+a+b 1+a+b 1+b+c 1+c+a
a(1 + b + c) b(1 + c + a) c(1 + a + b) ab + bc + ca ab + bc + ca ab + bc + ca
+ + > + + ⇐⇒
1+b+c 1+c+a 1+a+b 1+a+b 1+b+c 1+c+a
 
1 1 1
a + b + c > (ab + bc + ca) + + .
1+a+b 1+b+c 1+c+a
Now using Cauchy-Schwarz inequality we get:

√ √ √
 
1 1 1
+ + (c(1 + a + b) + a(1 + b + c) + b(1 + c + a)) > ( a + b + c)2 .
1+a+b 1+b+c 1+c+a
Combining the last two inequalities we get:
(a + b + c)(a + b + c + 2(ab + bc + ca)) >
 
1 1 1
> (ab + bc + ca) + + (a + b + c + 2(ab + bc + ca)) =
1+a+b 1+b+c 1+c+a
 
1 1 1
= (ab + bc + ca) + + (c(1 + a + b) + a(1 + b + c) + b(1 + c + a)) >
1+a+b 1+b+c 1+c+a
√ √ √
> (ab + bc + ca)( a + b + c)2 ,

3
which now by some algebraic manipulation gives:
√ √ √
(a + b + c)(a + b + c + 2(ab + bc + ca)) > (ab + bc + ca)( a + b + c)2 ⇐⇒
√ √ √
(a + b + c)2 + 2(a + b + c)(ab + bc + ca) > (ab + bc + ca)(a + b + c + 2( ab + bc + ca)) ⇐⇒
√ √ √
(a2 + b2 + c2 ) + (2(a + b + c) + 2)(ab + bc + ca) > (ab + bc + ca)(a + b + c + 2( ab + bc + ca)) ⇐⇒
a2 + b2 + c2 √ √ √
+ a + b + c + 2 > 2( ab + bc + ca),
ab + bc + ca
where the last inequality is exactly the one we wanted to prove.

Time allowed: 240 minutes.


Each problem is worth 10 points.
Calculators are not allowed.

4
3rd European Mathematical Cup
6th December 2014–14th December 2014 MLADI NADARENI MATEMATIČARI

Marin Getaldic
Junior Category

Problems and Solutions


Problem 1. Which of the following claims are true, and which of them are false? If a fact is true you should
prove it, if it isn’t, find a counterexample.
a) Let a, b, c be real numbers such that a2013 + b2013 + c2013 = 0. Then a2014 + b2014 + c2014 = 0.
b) Let a, b, c be real numbers such that a2014 + b2014 + c2014 = 0. Then a2015 + b2015 + c2015 = 0.
c) Let a, b, c be real numbers such that a2013 + b2013 + c2013 = 0 and a2015 + b2015 + c2015 = 0. Then
a2014 + b2014 + c2014 = 0.
(Matko Ljulj)

Solution. Firstly, we know that for every real number x, x2 > 0 holds.
The key idea in this problem is to realize that the expression a2014 + b2014 + c2014 is a sum of squares (which are
nonnegative numbers). Thus a2014 + b2014 + c2014 = 0 ⇐⇒ a = b = c = 0.
th
a) NO: It √ √ real numbers whose sum equals 0, and then take their 2013 roots. For example:
is sufficient√to find three
a = 2013 1, b = 2013 2, c = 2013 −3.
b) YES: From the key idea we conclude a = b = c = 0, and then we conclude a2015 + b2015 + c2015 = 0 + 0 + 0 = 0.
c) NO: Again we have to find a counterexample, for instance a = 1, b = 0, c = −1.

Problem 2. In each vertex of a regular n-gon A1 A2 ...An there is a unique pawn. In each step it is allowed:

1. to move all pawns one step in the clockwise direction or


2. to swap the pawns at vertices A1 and A2 .

Prove that by a finite series of such steps it is possible to swap the pawns at vertices:
a) Ai and Ai+1 for any 1 6 i < n while leaving all other pawns in their initial place
b) Ai and Aj for any 1 6 i < j 6 n leaving all other pawns in their initial place.
(Matija Bucić)

Solution. We denote a pawn that was initially at point Ai as i. We will prove part a) and then use it to show part b).

a) We apply first operation i − 1 times which will bring i and i + 1 to points A1 and A2 and move every other pawn
i − 1 steps in clockwise direction.
We can now apply second operation to swap i and i + 1 as they are at points A1 and A2 . This does not affect the
position of any other pawn.
We now apply first operation n − i + 1 times returning pawn k 6= i, i + 1 to point Ak while moving pawn i to Ai+1
and pawn i + 1 to Ai which is exactly what we wanted.
b) We present 2 possible solutions, one using induction and one not using induction.
Solution 1: By using the previous problem we can swap pawns (i, i + 1) as they are at points (Ai , Ai+1 ) then
(i, i + 2) as they are at points (Ai+1 , Ai+2 ) and carry on until we swap (i, j) as they were at points (Aj−1 , Aj ). This
brings us to the state where i is at Aj and each i + 1 6 k 6 j is at point Ak−1 .
We can now apply part a to swap j with j − 1 and similarly carry on till we swap j with i + 1. This will place j at
Ai and move each i + 1 6 k 6 j − 1 to Ak .
This brings us to the state where we swapped pawns i and j leaving others where they were just as was desired.

1
Solution 2: We use induction on n for the following claim:
We can swap any two pawns 1 6 i < j 6 k.
We note that the basis is exactly part a.
We assume we the claim holds for some k.
Hence we can swap any pawns 1 6 i < j 6 k and only need to show that we can swap i and k + 1 for any 1 6 i 6 k.
This follows as we can swap i and k then k and k + 1 by part a). then again k + 1 and i as they are now on points
Ak and Ai .

Problem 3. Let ABC be a triangle. The external and internal angle bisectors of ∠CAB intersect side BC at
D and E, respectively. Let F be a point on the segment BC. The circumcircle of triangle ADF intersects AB
and AC at I and J, respectively. Let N be the mid-point of IJ and H the foot of E on DN . Prove that E is
the incenter of triangle AHF .
(Steve Dinh)

Solution. Denote by ω the circumcircle of 4AHF .

The key idea in the problem is to introduce a new point X which we define as the second intersection of DN and ω.
We now note that the ∠JAD = ∠CAD = 90◦ ± α2 and ∠IAD = ∠BAD = 90◦ ± α2 where α = ∠CAB. As AD is an
external bisector of ∠CAB.
The ± signs depend on the picture and student shouldn’t be deducted any points for not noticing this.
Hence we have either ∠JAD = ∠BAD or ∠JAD + ∠IAD = 180◦ so in both cases DI = DJ.
Now as N is midpoint of IJ this means that DN is bisector of IJ and hence pasess through the centre of the. This
shows that DX is a diameter of ω and EH||IJ.
We also notice that ∠EAD = 90◦ as angle between bisectors and ∠XAD = 90◦ as DX is a diameter. Hence X, A, E are
collinear.
Now this gives us ∠DHE = ∠XHE = 90◦ and ∠XF E = ∠DF E = 90◦ as DX is a diameter of ω and finally again
∠EAD = 90◦ . All this gives us that quadrilaterals XF EH and ADEH are cyclic.
Final step is to use some angle chasing to get ∠AHE = ∠ADH = ∠AXF = ∠EXF = ∠EHF where first, second and
fourth equalities are due to cyclicity of ADEH, ADXF and XF EH respectively. Also ∠DF H = ∠EF H = ∠EXH =
∠AF D = ∠AF E where the second and forth equalities are due to cyclicity of XF EH and ADXF respectively. This
shows E is the incenter of 4AF H as desired.

Problem 4. Find all infinite sequences a1 , a2 , a3 , . . . of positive integers such that


a) anm = an am , for all positive integers n, m, and
b) there are infinitely many positive integers n such that {1, 2, . . . , n} = {a1 , a2 , . . . , an }.

2
(Matko Ljulj)

Solution. Instead of sequence an , we’ll use notation with the function f (n) with same properties.
There exists only one such function: f (n) = n. We’ll solve the problem with many separate facts.
Fact 1: f (1) = 1.
Proof: According to a) it holds f (1) = f (1)f (1) = f (1)2 . Since f (1) is positive integer, it can’t be f (1) = 0, so it must
be f (1) = 1.
Fact 2: Function f is bijective.
Proof: Firstly, we’ll show that f is injective. Let a 6= b be two arbitrary positive integers and let’s assume f (a) = f (b).
Since {1, 2, . . . , n} = {f (1), f (2), . . . , f (n)} holds for infinitely many positive integers n, it holds for some integer greater
than a and b. Then, since f (a) = f (b), set {f (1), f (2), . . . , f (n)} contains n − 1 or less (different) elements, but according
to b), it contains n elements.
Secondly, we’ll show that f is surjective. Let c be arbitrary integer and let’s assume that f (n) 6= c for all positive integers
n. Similarly as in first part of proof, let’s take positive integer n such that {1, 2, . . . , n} = {f (1), f (2), . . . , f (n)} holds.
Since c ∈ {1, 2, . . . , n}, c is also element of the set {f (1), f (2), . . . , f (n)}, so there exists positive integer m 6 n such that
f (m) = c.
Fact 3: Positive integer n is prime if and only if f (n) is prime.
Proof: Let’s assume that n is prime, but f (n) isn’t. Then it must be f (n) = a0 b0 = f (a)f (b) = f (ab), where a0 , b0 are
positive integers greater than 1, and a, b are unique positive integers such that f (a) = a0 , f (b) = b0 (they exist since f
is bijective). Since f is injective, f (1) = 1 and a0 , b0 are not equal to 1, integers a, b are also not equal to 1. Since f is
injective and f (n) = f (ab), we have n = ab, so n is composite.
Let’s assume that f (n) is prime, but n isn’t. Then there exist positive integers a, b greater than one such that n = ab.
From there we have f (n) = f (ab) = f (a)f (b). Again from injectivity of f and f (1) = 1, we see that f (n) is product of
two integers greater than 1.
a
Fact 4: If n = p1a1 pa2 2 . . . pkk is unique factorization of positive integer n, then

f (n) = f (p1 )a1 f (p2 )a2 . . . f (pk )ak

is unique factorization of positive integer f (n).


Proof: From multiple use of the condition a) we get identity f (n) = f (p1 )a1 f (p2 )a2 . . . f (pk )ak . From Fact 3, numbers
f (pi ) are prime. Since f is injective, none of two numbers f (pi ) and f (pj ) are equal.
Fact 5: (Technical result) For all positive integers y < x there exist positive integer n0 such that for all positive integers
n > n0 holds inequality
y n+1 < xn .
Proof: It is sufficient to prove the fact only for consecutive integers y and y +1 (because we’ll have y n+1 < (y +1)n 6 xn ).
By binomial theorem we have
(y + 1)n > y n + ny n−1 = y n−1 (y + n).
Thus if we define n0 = y 2 − y + 1, then for all n > n0 we have

(y + 1)n > y n−1 (y + n) > y n−1 (y + n0 ) = y n−1 (y 2 + 1) > y n+1 .

Another proof: Inequality is equivalent to  n


x
> y.
y
The fact follows from the fact that the expression on the left hand side is increasing and it is unbounded, while the right
hand side is fixed.
Fact 6: For all prime numbers p we have f (p) 6 p.
Proof: Let p1 , p2 , . . . , pn , . . . be the increasing sequence 2, 3, 5, 7, . . . of all prime numbers. Let’s take arbitrary prime
number pn . From the Fact 3 we have that f (pn ) is also a prime. Let’s take positive integer n0 as the integer from
the Fact 5, for positive integers y = pn < pn+1 = x. Since b) holds for infinitely many positive integers, it holds for
some positive integer N such that {1, 2, . . . , N } = {f (1), f (2), . . . , f (N )}, and such that N > pn n . Let α be the greatest
0

positive integer such that pα n 6 N . From definitions of N and α we have α > n 0 .


In set {1, 2, . . . , N } we’ll observe all positive integers which are αth power of a prime number. Since N > pα n , we have
that pα α α
n is in that set. It is easy to see that all numbers p1 , . . . , pn−1 are also in that set. On the contrary, number pn+1
α
α+1 α
is not in that set, because from the definition of α and N respectively we have N < pn 6 pn+1 (remember Fact 5 and
α > n0 ). Similarly, neither of the numbers pα m (for m > n) is not in the set {1, 2, . . . , N }.
Let us now observe all positive integers which are αth power of a prime and they are in the set {f (1), f (2), . . . , f (N )}.
According to Fact 4, we have that f (n) is αth power of a prime if and only if n is αth power of a prime. From that and
from previous paragraph we conclude that only such numbers are f (pα α
1 ), . . . , f (pn ).
Now we have {p1 , . . . , pn } = {f (p1 ), . . . , f (pn )}. Thus f (pn ) ∈ {p1 , . . . , pn }, so f (pα
α α α α α α α α
n ) = pi for some 1 6 i 6 n, which
α α
implies f (pn ) = pi , for some 1 6 i 6 n =⇒ f (pn ) = pi 6 pn , which completes the proof.
Fact 7: For every positive integer we have f (n) = n.

3
Proof: From Fact 3 we have that f (p) if and only if p is prime. Let p1 , p2 , . . . , pn , . . . be the increasing sequence 2, 3, 5, 7, . . .
of all prime numbers. From Fact 6 we have f (p1 ) 6 p1 =⇒ f (2) = 2. For n > 2, inductively and from injectivity of f
we have f (pn ) > pn−1 and from Fact 6 we have f (pn ) 6 pn , thus is must be f (pn ) = pn , for all positive integers n.
Now for arbitrary positive integer n from Fact 4 we have
a
f (n) = f (p1 )a1 f (p2 )a2 . . . f (pk )ak = pa1 1 pa2 2 . . . pkk = n,

which completes our proof.


Remark: We can prove Fact 6 differently (without using Fact 5). We observe numbers 1·2·. . .·n and f (1)·f (2)·. . .·f (n),
and their unique factorizations. They coincide for infinitely many positive integers n. For fixed primes p, q, if we take
sufficiently great n, we can use well-known formula for νp (n!) to prove that νp (n!) > νq (n!) for all q > p (here positive
integer n depends on p, q).

4
4th European Mathematical Cup
5th December 2015–13th December 2015 MLADI NADARENI MATEMATIČARI

Marin Getaldic
Junior Category

Problems and Solutions


Problem 1. We are given an n × n board. Rows are labeled with numbers 1 to n downwards and columns are
labeled with numbers 1 to n from left to right. On each field of the board we write the number x2 + y 2 where
(x, y) are its coordinates. We are given a figure and can initially place it on any field. In every step we can
move the figure from one field to another if the other field has not already been visited and if at least one of
the following conditions is satisfied:
• the numbers in those 2 fields give the same remainders when divided by n,
• those fields are point reflected with respect to the center of the board.
Can all the fields be visited in case:
a) n = 4,
b) n = 5?

(Josip Pupić)

Solution. a) The answer is NO.

1 2 3 4 1 2 3 4
1 2 5 10 17 1 2 1 2 1
2 5 8 13 20 2 1 0 1 0
3 10 13 18 25 3 2 1 2 1
4 17 20 25 36 4 1 0 1 0
On the left we have the board from the problem, on the right we have the same board, but with remainders of the
values from the board instead of the values themselves.
We will denote field i for a field with number i written on it in the right table. Let’s assume that we can visit all
of the fields. That means that at some point we will visit a field 1. Obviously, when using the first type of move,
we can visit any other field 1 which hasn’t yet been visited. Also, it easy to notice, that for field 1, the reflection
of that field is also a field 1. That means that both types of moves lead to another field 1. Also, in same fashion
we conclude that for the each step, if the figure is on the field 1, then in the step after (if that wasn’t the last one)
and in the step before (if that wasn’t the first one) should be field 1.
Now we conclude that the first visited field 1 must be the field visited in the first step. Same way we conclude
that the last visited field 1 must be the field visited in the last step. But, we know that all of field s 1 are visited
consecutively, in exactly 8 moves (because there are 8 field s 1), while there are exactly 16 moves that we have to
make. This leads to contradiction.
b) The answer is YES.

1 2 3 4 5 1 2 3 4 5
1 2 5 10 17 26 1 2 0 0 2 1
2 5 8 13 20 29 2 0 3 3 0 4
3 10 13 18 25 34 3 0 3 3 0 4
4 17 20 25 36 41 4 2 0 0 2 1
5 26 29 34 41 50 5 1 4 4 1 0
Again, on the left we have the board from the problem, on the right we have the same board, but with remainders
of the values from the board instead of the values themselves.
We can move from any field to another with the same number written on the field in the right table by using the
second move.
One idea to visit all the fields is the following:

1
• Find the 4 pairs of the fields of types field i and field j, such that all 8 fields are different, in each pair i 6= j,
those two field in one pair are symmetric, and the second member of the n-th pair has the same value on the
right board as the first member of the (n + 1)-th pair. Also, we want that all the values of the right table are
mentioned through members of those pairs. For example:

((2, 2), (4, 4)), ((1, 4), (5, 2)), ((3, 5), (3, 1)), ((2, 1), (4, 5))

• Now, the algorithm is: after second member of n-th pair and before the first member of the (n + 1)-th pair
visit all fields by using the first step. Of course, before first pair and after fourth pair move in similar way.
Jump from the first member of the pair to the second member of the pair by using second step.
This is one of the ways to do it: We start with the field (3, 3). Then we visit all of the field s 3, using the first move,
in any way as long as the last visited field is (2, 2). Then, using the second move, we visit the field (4, 4). Again,
using the first move we visit all field s 2 in any way as long as the last visited field is (1, 4). Using the second move
we visit the field (5, 2). Then, using the first move we visit all field s 4 in any way as long as the last visited field is
(3, 5). In same fashion, using the second move we visit the field (3, 1). After visiting all field s 0 in any way as long
as the last visited field is (2, 1), we visit the field (4, 5) using the second move. We conclude by visiting all field s 1
in any way.

2
Problem 2. Let m, n, p be fixed positive real numbers which satisfy mnp = 8. Depending on these constants,
find the minimum of
x2 + y 2 + z 2 + mxy + nxz + pyz,
where x, y, z are arbitrary positive real numbers satisfying xyz = 8. When is the equality attained?
Solve the problem for:
a) m = n = p = 2,
b) arbitrary (but fixed) positive real m, n, p.
(Stijn Cambie)

First Solution. a) Use AM-GM and xyz = 8 to get


p
x2 + y 2 + z 2 + xy + xy + yz + yz + xz + xz > 9 9 x6 y 6 z 6 = 36.

We have equality for x = y = z = 2.

b) Using xyz = 8, we can transform the given expression:


8p 8n 8m
x2 + y 2 + z 2 + mxy + nxz + pyz = x2 + + y2 + + z2 +
x y z

Since all numbers are positive reals, we can apply AM-GM inequality to get:
8p 4p 4p p
x2 + = x2 + + > 6 3 2p2
x x x

When we apply the same procedure for x, y, z and sum the inequalities, we get:
8p 8n 8m √ √
3

3
p
x2 + y 2 + z 2 + mxy + nxz + pyz = x2 + + y2 + + z2 +
3
> 6 2( m2 + n2 + 3 p2 ).
x y z

In order to get equality, we must have equality in all above inequalities and that happens for
p
x = 3 4p,

3
y = 4n,
√3
z = 4m.
Desired minimum is therefore √ √ √
3 3
3
p
6 2( m2 + n2 + 3 p2 ).

Second Solution. We only present solution for b) part here, marking scheme for a) part is the same as in first solution.
We use weighted AM-GM:
x2 + y 2 + z 2 + mxy + nxz + pyz =
p3 x2 √
3 y 2 √3 z2 √
3 mxy √
3 nxz p pyz
p2 p
3
+ n2 √
3
+ m 2 √
3
+ 2 m2 √ 3
+ 2 n2 √ 3
+ 2 3 p2 p ≥
p 2 n 2 m 2 2 m 2 2 n 2 2 3 p2
!√
v
√ 3 2
√ √
u
√ √ p  3 2  3
√ √ n m2

u
3 3 3 2
3 3
p3
 3 m2 + n2 + p2u x y2 z2
3 m + n + p ·
2 2 2 t p
3

3
√3
·
p2 n2 m2

2 √
v
√
3 √
3

3 2u
  √
u
3
2 √3
m2  √3
2 √
3 2  √
n 3 pyz
3 2
p
3 m2 + n2 + p t mxy nxz
2 2 2

s
 xyz 2( √ √ √
√ √ p  3 √ √ 3 3
m2 + n2 + 3 p2 )
 
3 3 3 2
3 3 m2 + n2 + p
=3 m2 + n2 + 3 p2 ·
2
√ √ √ √ √ √ √ √
r
3 3
p 3 xyz 2
3 3
p 3 3 3 3
p 
= 3( m2 + n2 + 3 p2 ) · = 3( m2 + n2 + 3 p2 ) · 42 = 6 2 m2 + n2 + 3 p2
2
√ √ 3

3
p 
We have shown that the minimum value the expression can take is 6 3 2 m2 + n2 + 3 p2 . Equality can only be
√ √ √
achieved when x = 3 4p, y = 3 4n, z = 3 4m.

3
Problem 3. Let d(n) denote the number of positive divisors of n. For positive integer n we define f (n) as

f (n) = d(k1 ) + d(k2 ) + . . . + d(km ),

where 1 = k1 < k2 < · · · < km = n are all divisors of the number n. We call an integer n > 1 almost perfect if
f (n) = n. Find all almost perfect numbers.
(Paulius Ašvydis)

First Solution. Alternative way to define f (n) is


X
f (n) = d(k).
k|n,k≥1

r
Y
Let n = pa1 1 pa2 2 · · · par r be the prime factorisation of n. We have d(n) = (ai + 1).
i=1
We prove the function f is multiplicative, in particular, given coprime n, m we have f (nm) = f (n)f (m).
Using n, m are coprime for the second inequality and the fact that function d is multiplicative we get:
  
X X X X X
f (nm) = d(k) = d(k1 k2 ) = d(k1 )d(k2 ) =  d(k1 )  d(k2 ) = f (n)f (m)
k|nm k1 |n,k2 |m k1 |n,k2 |m k1 |n k2 |n

a1
X (a1 + 1)(a1 + 2)
If r = 1 we have n = pa1 1 . We note that divisors of n are 1, p1 , p21 , · · · , pa1 1 so f (n) = (i + 1) = .
i=0
2
r
Y (ai + 1)(ai + 2)
Combining this with the multiplicativity result for f we deduce f (n) = .
i=1
2
We now prove that for primes p ≥ 5 and p = 3 provided a ≥ 3 we have f (pa ) = (a+1)(a+2) 2
< 32 pa by induction on a. As
a basis 3 < 2p3
for p ≥ 5 and 6 < 2
3
· 33
. For the step it is enough to notice that a+3
a+1
≤ 2 < p in both cases.
a a
Similarly we can prove for p = 2 that f (p ) < p provided a ≥ 4. By explicitly checking the remaining cases p = 2 and
a = 1, 2, 3 and p = 3 a = 1, 2 we conclude f (pa ) ≤ 23 pa for all p, a and f (pa ) ≤ pa for all p ≥ 3 and p = 2, a ≥ 4.
k
Y f (pai i )
Assuming f (n) = n we would have = 1 so the above considerations imply that only possible prime divisors
i=1
pai
are 2, 3. If k = 1 the only possible solution is n = 3. If k = 2 we have p1 = 2, p2 = 3 and 1 ≤ a1 ≤ 2 and 1 ≤ a2 ≤ 2
which give 4 cases to check giving the other 2 solutions n = 18, 36.
So, all almost perfect numbers are 3, 18, 36.

Second Solution. We hereby present one similar but different solution which does not use a lot of properties of the
function f .
Firstly, we will prove the following lemma:
Lemma: For any positive integer n > 1 and prime p we have

f (pn) 6 3f (n).

The equality holds if and only if GCD(p, n) = 1. Proof: For every integer m we have that the set of divisors of the
number pm is the union of the following two sets:
• set of divisors of m,
• set of divisors of m multiplied by p.
Also, those two mentioned sets are disjoint if and only if GCD(p, m) = 1 (if we have that p, m are disjoint, then it is
obvious that none of the divisors of pm are in both sets; if they are not coprime, then the number p belongs to both
sets).
This is why we have d(pm) 6 2d(m) and
X X X X
f (pn) = d(k) 6 d(k) + d(pk) 6 f (n) + 2d(k) = 3f (n).
k|pn k|n k|n k|n

In both inequalities equality holds if and only if sets from before are disjoint, i.e. when GCD(p, n) = 1.

(k+1)(k+2)
Also, we simply see that f (2k ) = d(1) + d(2) + . . . + d(2k ) = 1 + 2 + . . . + (k + 1) = 2
.

4
Notice that if for some positive integer n we have f (n) < n, then for every p > 3 we have f (pn) 6 3f (n) 6 pf (n) < pn.
Consequently, if f (n) < n, then for every odd m we have f (mn) < mn. Because of this, we will introduce new terms.
Number n is nice multiple of m if m | n and m n
is odd number. Analogously, we define nice divisor. Our statement from
above is: if for some n we have f (n) < n, then neither of its nice multiples is almost perfect number. Our strategy will be
the following: check the cases of the "small" numbers and see ratio of numbers n and f (n). When we have that n > f (n),
conclude that there are not almost perfect numbers among their nice multiples. With formula for f (2k ) conclude that
for sufficiently big k (when f (2k ) < 2k ) this is enough to conclude that there are no more almost perfect numbers. By
induction, it is simple to prove that f (2k ) < 2k for k > 4. Thus, there are no almost perfect numbers of the form 2k · m,
where k > 4 and m is odd, since they all have 2k as their nice divisor. We only have to check the numbers of the form
2k · m, where where k 6 3 and m is odd.
First case: k = 0
For any odd prime p we have f (p) = d(1) + d(p) = 3 6 p. From that we see that n = 3 is solution. Moreover, we do not
have any more solutions: if some odd number has a prime divisor different from 3, since f (p) < p this number can not
be almost perfect number; if it is a power of 3 bigger than 3, since f (9) < 3f (3) = 9, there are no more solutions as well
(9 is nice divisor of every power of 3 bigger that 3).
Second case: k = 1
For any odd prime we have f (2p) = 3f (2) = 9. If p > 5 then we have 2p > f (2p), so for all almost perfect numbers of
the form 21 · m number m has to have prime divisors 3 and/or 5.
We directly see that neither 6 or 10 is almost perfect. So, in this case, almost perfect number has to have a nice divisor
of the form 2 · 9, 2 · 15 or 2 · 25. For n = 18 we have another solution, in other two cases we have inequality f (n) < n. If
we want to seek new solution in this case, since they cannot be nice multiples of 30 and 50, the only possibility is that
almost perfect number has nice divisor 2 · 27. But we have (equality case in lemma) that f (2 · 27) < 3f (2 · 9) = 2 · 27.
So, there are no more solutions in this case.
Third case: k = 2
For any odd prime we have f (4p) = 3f (4) = 18. If p > 5 then we have 4p > f (4p), so for all almost perfect numbers of
the form 21 · m number m has to have prime divisors 3 and/or 5.
We directly see that neither 12 or 20 is almost perfect. So, in this case, almost perfect number has to have a nice divisor
of the form 4 · 9, 4 · 15 or 4 · 25. For n = 36 we have another solution, in other two cases we have inequality f (n) < n. If
we want to seek new solution in this case, since they cannot be nice multiples of 60 and 100, the only possibility is that
almost perfect number has nice divisor 4 · 27. But we have (equality case in lemma) that f (4 · 27) < 3f (4 · 9) = 4 · 27.
So, there are no more solutions in this case.
Fourth case: k = 3
For any odd prime we have f (8p) = 3f (8) = 30. Similarly to other cases, we only observe candidates of the form 8 · 3l .
Number 8 · 3 is not almost perfect, all other candidates have nice divisor 8 · 9. But, we have f (72) = 60 < 72. As we
always concluded, we do not have any new solutions.
So, all almost perfect numbers are 3, 18, 36.

5
Problem 4. Let ABC be an acute angled triangle. Let B 0 , A0 be points on the perpendicular bisectors of
AC, BC respectively such that B 0 A ⊥ AB and A0 B ⊥ AB. Let P be a point on the segment AB and O
the circumcenter of the triangle ABC. Let D, E be points on BC, AC respectively such that DP ⊥ BO and
EP ⊥ AO. Let O0 be the circumcenter of the triangle CDE. Prove that B 0 , A0 and O0 are collinear.
(Steve Dinh)

Solution. Remark We first start by giving some intuition on how the problem can be approached. We won’t go into
detail here but do give partial marks for correct ideas. We believe that any essentially correct solution should have them
in the background so we don’t require them to be written down explicitly.
We notice that if P ≡ A then O0 ≡ B 0 while if P ≡ B we have O0 ≡ A0 . So the problem is equivalent to showing that as
P varies on the segment AB respective O0 map to a segment and we are now interested in identifying this segment.
It is hence natural to draw a picture not containing anything dependent on P and try to identify the line A0 B 0 . Which
turns out to be perpendicular to CM where M is the midpoint of AB.
Furthermore we note that B 0 M 2 − B 0 C 2 = AM 2 = A0 M 2 − A0 C 2 and this defines the line uniquely (and shows
A0 B 0 ⊥ CM ).
The following sketch represents the problem setting when we do include the elements depending on P .

We now start with the formal proof.


It is enough to show that O0 M 2 − O0 C 2 = AM 2 for all P , including P = A, B. Which allows us to draw the following
sketch omitting B 0 , C 0 .
We first prove that O0 EP D is a cyclic quadrilateral. This follows as EO0 D = 2ACB = AP E + BP D = π − EP D as
ACB = AP E = BP D. This in turn implies P O0 is an angle bisector of the angle EP D and P O0 ⊥ AB.
We now have all the ingredients to show O0 M 2 − O0 C 2 = AM 2 . The following sketch illustrates the last part of the
proof.

We introduce the point D0 as the second intersection of the line P E and the circumcircle of CDE so that O0 P 2 − O0 C 2 =
P E · P D0 .
Now as P O0 is the angle bisector of EP D we have P D = P D0 by the extended S − S − K congruency theorem and
the following observation. There is some care needed here, mainly the options we get by S − S − K are P D = P D0 or

6
P D = P E but if P D = P E triangles P 0 EO0 and P 0 DO0 are congruent by S − S − S congruency theorem so in particular
EO0 P = DO0 P = CAB while EP O0 = DP O0 = π2 − CAB so P D and P E are tangents so in fact D0 ≡ E so the above
claim is still true.
Now noticing triangles AP E and BP D are similar we get P AP
E
= PPB
D
implying AP · BP = P E · P D = P E · P D0
As P O ⊥ AB by using pythagoras theorem we get O M − O C − AM 2 = O0 P 2 − O0 C 2 + P M 2 − AM 2 = P D0 · P E −
0 0 2 0 2

AP · BP = 0. Where we used O0 P 2 − O0 C 2 = P E · P D0 by the power of the point P to the circumcircle of CDE and
AM 2 − P M 2 = (BM + P M )(AM − P M ) = AP · P B.
This completes the proof. 

7
5th European Mathematical Cup
3rd December 2016–11th December 2016 MLADI NADARENI MATEMATIČARI

Marin Getaldic
Junior Category

Problems and Solutions


Problem 1. A grasshopper is jumping along the number line. Initially it is situated at zero. In k-th step, the
length of his jump is k.

a) If the jump length is even, then it jumps to the left, otherwise it jumps to the right (for example, firstly
it jumps one step to the right, then two steps to the left, then three steps to the right, then four steps to
the left...). Will it visit on every integer at least once?
b) If the jump length is divisible by three, then it jumps to the left, otherwise it jumps to the right (for
example, firstly it jumps one step to the right, then two steps to the right, then three steps to the left,
then four steps to the right...). Will it visit every integer at least once?

(Matko Ljulj)

Solution. Let us denote with xk position in the k-th step.

a) For even n = 2k we have


x2k = 1 − 2 + 3 + . . . + (2k − 1) − 2k =
(1 + 2 + 3 + . . . + 2k) − 2(2 + 4 + 6 + . . . + 2k) =
3k(3k + 1) k(k + 1)
−4 = −k.
2 2
For odd n = 2k + 1 we have
x2k+1 = x2k + (2k + 1) = k + 1.
Hence we see that all integers occur exactly once in sequence (xk )k : positive integer n occur in (2n − 1)-th place,
negative integer −n (for some n > 0) occurs in (2n)-th place.
b) For n = 3k we have
x3k = 1 + 2 − 3 + . . . + (3k − 2) + (3k − 1) − 3k =
(1 + 2 + 3 + . . . + 3k) − 2(3 + 6 + 9 + . . . + 3k) =
2k(2k + 1) k(k + 1) 3k(k − 1)
−6 = .
2 2 2
For k = 0, 1 we have that x3k = 0. For all other k we have x3k > 0 since it is a product of positive numbers. For
n = 3k + 1, n = 3k + 2 we have

x3k+1 = x3k + (3k + 1) > 0, x3k+2 = x3k + (3k + 1) + (3k + 2) > 0.

Thus, all xk are non-negative, and grasshopper will not reach any negative integer.

1
Problem 2. Two circles C1 and C2 intersect at points A and B. Let P, Q be points on circles C1 , C2 respectively,
such that |AP | = |AQ|. The segment P Q intersects circles C1 and C2 in points M, N respectively. Let C be
the center of the arc BP of C1 which does not contain point A and let D be the center of arc BQ of C2 which
does not contain point A. Let E be the intersection of CM and DN . Prove that AE is perpendicular to CD.
(Steve Dinh)

First Solution. We present the following sketch:

As AP = AQ the triangle AP Q is isosceles, which implies ∠AP Q = ∠AQP .


Angles over the same chord AM of C1 imply ∠ACM = ∠AP M .
As C is the midpoint of the chord BP , we have ∠P AC = ∠CAB, analogously ∠DAQ = ∠BAD.
This implies that 2∠CAD = ∠P AQ.
Combining the results above we get as sum of the angles in triangle AP Q that 2∠CAD + 2∠AP Q = 180◦ which in turn
implies ∠ACN + ∠DAC = 90◦ and in particular AD ⊥ CM . Analogously we conclude DN ⊥ AC.
We now conclude that this implies E is the orthocenter of the triangle ACD implying AE ⊥ CD completing the proof.

Second Solution. As AP = AQ the triangle AP Q is isosceles, which implies ∠AP Q = ∠AQP .


Angles over the same chord AM of C1 imply ∠M BA = ∠AP M, analogouslythisimplies∠ABM = ∠AP Q
Combining the above we conclude ∠M BA = ∠N BA so in particular AB is angle bisector of ∠M BN .
As C is the midpoint of the arc BP we have ∠P M C = ∠BM C.
We note this implies E lies on 2 angle bisectors of the triangle BN M , so is its incenter.
This implies that A, E, B are collinear.
We are now able to remove M, N, E from the picture and it is enough to show CD ⊥ AB. Let α = ∠CAB and
β = ∠BAD. Then this is equivalent to AC · cos α = AD · cos β.
Ptolomey’s theorem for cyclic quadrilateral AP CB implies that

BC · AP + AB · CP BC(AP + AB)
AC = =
BP 2 cos α · BC
After simplifying and taking an analogous equality for C2 and cyclic quadrilateral ABDC gives

2
AP + AB AQ + AB
AC cos α = = = AD cos β
2 2
completing the proof.
Remark: Note that we are using only the very basic trigonometry, namely for a right angled triangle (BP = 2 cos α · BC
follows by taking the midpoint of BP and considering 2 right-angled triangles this creates.) This can be alltogether
avoided using similar triangles.

3
Problem 3. Prove that for all positive integers n there exist n distinct, positive rational numbers with sum of
their squares equal to n.
(Daniyar Aubekerov)

First Solution. We will prove this claim by induction. For basis, we find solutions for n = 1, 2, 3:
 2  2  2  2
1 7 1 7
12 = 1, + = 2, 1, 12 + + = 3.
5 5 5 5

Now, let us assume that for all integers less than n the claim is true. Let us prove the claim for n. If n = 4k for some
integer k, then, by induction hypothesis, there exist rationals x1 , . . . , xk such that
x21 + . . . + x2k = k.
=⇒ (2x1 )2 + . . . + (2xk )2 = 4k.
Let a be the smallest rational number from the left hand side of the above equation. We will replace this number with
numbers
3 4
a, a.
5 5
By this, we get one more summand on the left hand side, but the equality still holds. Since a was the smallest and
3
5
a < 45 a < a, all rationals are still distinct. We will continue this procedure until we get n = 4k rationals.
Before we continue, notice the following: let those n = 4k rationals denote with
p1 pn
,..., ,
q1 qn
where GCD(pi , qi ) = 1, for all 1 6 i 6 n. Then, all p1 , . . . , pn are even numbers. That is because of multiplying first
k rationals with 4, and because of the fact that multiplying rationals with 45 and 35 cannot turn even numerator to the
odd numerator.
Now, we observe the case n 6= 4k. We will use a combination of solution for n = 4k and for n = 1, 2, 3:
 2  2
p1 pn
n = 4k + 1 : + ... + + 12 = n,
q1 qn
 2  2  2  2
p1 pn 1 7
n = 4k + 2 : + ... + + + = n,
q1 qn 5 5
 2  2  2  2
p1 pn 1 7
n = 4k + 3 : + ... + + 12 + + = n.
q1 qn 5 5
All numbers are still distinct because first 4k numbers have even numerators, while the others do not have. This concludes
the induction and the proof of the problem.

Second Solution. Firstly, let us prove that there are infinitely many pairs of rationals such that
x2 + y 2 = 2.
b−a b+a
Let us take any Pythagorean triple (a, b, c), with b > a. Then we can take x = c
,y = c
.
Now, we take any number n. If it is even, then we will take n/2 pairs of rationals with sum of squares equal 2. If it is
odd, we will take (n − 1)/2 of such pairs, and one number 1.
To be sure that all numbers are distinct, we can take primitive Pythagorean triples such that all of them have unique
third member c of the triple.
b−a b+a
It is clear that they are nonzero. Let us now prove that all rationals are distinct. Firstly, if c
= c
, that implies
a = 0, which is impossible for a member of Pythagorean triple.
Let us now assume that two different primitive Pythagorean triples (a, b, c) and (a0 , b0 , c0 ) (with c 6= c0 ) generate at least
two same rational numbers. Since sum of squares of those rationals is the same, another pair of rationals must be equal
as well. Thus we have to have either
b−a b0 − a0 b+a b0 + a0 b−a b+a c
= and = =⇒ 0 = 0 = 0 = λ ∈ Q, or
c c0 c c0 b − a0 b + a0 c
b−a b0 + a0 b+a b0 − a0 b−a b+a c
= and = =⇒ 0 = 0 = 0 = λ ∈ Q.
c c0 c c0 b + a0 b − a0 c
In both cases we have a2 + b2 = c2 = λ2 (c0 )2 = λ2 ((a0 )2 + (b0 )2 ) and b2 − a2 = λ2 ((b0 )2 − (a0 )2 ). Hence c2 = λ2 (c0 )2 ,
a2 = λ2 (a0 )2 , b2 = λ2 (b0 )2 . But then, if λ = p/q, then either p | a, b, c or q | a0 , b0 , c0 or λ = 1, which contradicts the fact
that our triples are primitive or that c0 6= c. All in all, we get contradiction, thus all rationals are distinct.

4
Problem 4. We will call a pair of positive integers (n, k) with k > 1 a lovely couple if there exists a table n × n
consisting of ones and zeros with following properties:

• In every row there are exactly k ones.


• For each two rows there is exactly one column such that on both intersections of that column with the
mentioned rows, number one is written.

Solve the following subproblems:

a) Let d 6= 1 be a divisor of n. Determine all remainders that d can give when divided by 6.
b) Prove that there exist infinitely many lovely couples.

(Miroslav Marinov, Daniel Atanasov)

Solution. Let us firstly prove several lemmas. Before that, notice that changing two columns or two rows of the table
will not change the properties of our table.
Lemma 1: In every column there are exactly k ones.
Proof: It is impossible that one column contains n ones. If we suppose the contrary, then on the rest of the table,
consisting of n − 1 columns, we would have to have n(k − 1) > n ones such that no two ones are in the same column,
which is impossible.
Thus, every column contains at least one zero. Let us now suppose that there exists a column with more than k ones.
Without loss of generality, let this column be the first column, where ones are written in the first k + 1 rows, and at least
one digit zero, which this column must contain, is written in last row. Again, without loss of generality, let the last row
contain ones in the second, third, . . ., (k + 1)-th column.
On the intersection of 2nd column and first k + 1 rows there can be at most one digit one, because, in the contrary, some
two of the first k + 1 rows would have first and second column in common. Same argument holds for intersection of the
3rd column and first k + 1 rows, . . ., (k + 1)-th column and first k + 1 rows. Hence, on the intersection of first k + 1 rows,
and 2nd, 3rd, . . ., (k + 1)-th row there are at most k ones.
However, for the last row and for every row among the first k + 1 rows, there must exist exactly one column such that
both rows contain digit one in that column. This is only possible if those ones are on the intersection of first k + 1
rows, and 2nd, 3rd, . . ., (k + 1)-th row. Thus, in the mentioned zone there must be exactly k + 1 ones, which leads to
contradiction.
Thus we conclude that every column contains at most k digits one. Since the whole table consists of nk digits one, we
have that every column contains exactly k digits one.

Lemma 2: We have n = k2 − k + 1.
Proof: Let us count the pairs of ones in the same column. On the one hand, since there are n columns, every column
contains k ones, there are !
k
n
2
pairs of ones in the same column. On the other hand, every pair of ones from the same column determine exactly one
pair of rows, since each pair of rows has exactly one column in common. Thus, the number of pairs of ones from the
same column is also equal to !
n
.
2
Identifying mentioned two expressions we get n = k2 − k + 1.

Now, we will prove the problem.


Solution of a) part: When varying k, we see that n ≡ 1 (mod 6) or n ≡ 3 (mod 6). Both options are possible, see
examples for k = 2, k = 3 below.

5
Let q be a prime divisor of the number n = k2 − k + 1. Since n is odd, q is odd as well, thus possible remainders
modulo 6 are 1, 3, 5. We will prove that remainder 5 is not possible. Let us suppose that q = 6t + 5. Then, since
q | k3 + 1 = (k + 1)(k2 − k + 1) we have k3 ≡ −1 (mod q). On the other hand, we have kq−1 = k6t+4 ≡ 1 (mod q). From
those last two identities we get k ≡ −1 (mod q) =⇒ n ≡ 3(mod q), i.e. q | 3, contradiction.
Let d be any divisor of the number n. From above, it is either 1 or a product of prime numbers of the form 6t + 1 and
3. Anyhow, we have that remainder of d when divided by six is either 1 or 3.

Solution of b) part: We will prove that for any prime p, the pair of numbers (p2 + p + 1, p + 1) is a lovely couple. Let
us denote with A(i, j) the number in the table on the intersection of the i-th row and j-th column, with the convention
that we count rows and columns from the zero in this part of the solution.
We define our table in the following way (example for p = 5 is at the end)

Rule a For α, β, γ ∈ {0, . . . , p − 1} we have

A(αp + β, γp + δ) = 1 ⇐⇒ δ ≡ αγ + β (mod p),

Rule b A(p2 + α, αp + β) = 1, for all α ∈ {0, . . . , p}, β ∈ {0, . . . , p − 1},


Rule c A(αp + β, p2 + α) = 1, for all α ∈ {0, . . . , p}, β ∈ {0, . . . , p − 1},
Rule d A(p2 + p, p2 + p) = 1,
Rule e On all other unmentioned fields are zero.

Let us prove that this table has all properties. Firstly, let us prove that in every row there is exactly p + 1 ones.

Case 1: In i-th row, i < p2 : i = αp + β, for some 0 6 α, β 6 p − 1. Then for every γ ∈ {0, . . . , p − 1} there exists exactly
one δ ∈ {0, . . . , p − 1} such that δ ≡ αγ + β (mod p) =⇒ there are exactly p digits one in first p2 columns. Last
digit k is in the column p2 + α, according to the Rule c.
Case 2: In i-th row, i > p2 : i = p2 + α, for some 0 6 α 6 p. Those ones are written in the columns (according to the Rule
b) αp + 0, . . . , αp + p − 1 and (according to the Rule c or d) in the last column.

In the same manner it can be proved that every column contains exactly p + 1 ones. Thus, it is sufficient to prove that
every two rows have at least one column in common.
Case 1: i, j > p2 : i = p2 + αi , j = p2 + αj for some 0 6 αi , αj 6 p. According to the Rule c or d: A(i, p2 + p) =
A(j, p2 + p) = 1.
Case 2: i < p2 , j = p2 + p: i = αi p + βi for some 0 6 αi 6 p, 0 6 αj 6 p − 1. According to the Rule c we have
A(i, p2 + αi ) = 1, and according to the Rule b: A(j, p2 + αi ) = 1.
From now on, all mentioned variables αi , αj , βi , βj , γ, δ are from the set {0, . . . , p − 1}.
Case 3: i < p2 , p2 6 j < p2 + p: i = αi p + βi , j = p2 + αj . According to Rule a, there is exactly one δ such that
A(i, αj p + δ). According to the Rule b: A(j, αj p + δ).
Case 4a: i, j < p2 : i = αi p + βi , j = αj + βj with αi = αj := α. According to the Rule c: A(i, p2 + α) = A(j, p2 + α) = 1.
Case 4b: i, j < p2 : i = αi p + βi , j = αj + βj with αi 6= αj := α. Let us define

γ = (αi − αj )−1 (βj − βi ).

It is clear that then we have αi γ + βi = αj γ + βj =: δ. According to the Rule a: A(i, γp + δ) = A(j, γp + δ) = 1.

6
7
6th European Mathematical Cup
9th December 2017–23rd December 2017 MLADI NADARENI MATEMATIČARI

Marin Getaldic
Junior Category

Problems and Solutions


Problem 1. Find all pairs (x, y) of integers that satisfy the equation

x2 y + y 2 = x3 .

(Daniel Paleka)

First Solution. Firstly, let us consider the case x = 0. In that case, it is trivial to see that y = 0, and thus we get the
solution (0, 0). From now on, we can assume x 6= 0.
1 point.
2 3 2 2 2 2 2
From the trivial x |x , the equation gives x |x y + y ⇒ x |y , which means x|y.
1 point.
We use the substitution y = kx, where k ∈ Z.
1 point.
The substitution gives us
kx3 + k2 x2 = x3
kx + k2 = x
k2 = x(1 − k)
.
2 points.
2
Considering the greatest common divisor of k and 1 − k, we get

GCD(k2 , 1 − k) = GCD(k2 + k(1 − k), 1 − k) = GCD(k, 1 − k) = GCD(k, 1 − k + k) = GCD(k, 1) = 1

3 points.
That leaves us with two possibilities.

a) 1 − k = 1 ⇒ k = 0 ⇒ x = 0 which is not possible since x 6= 0.


1 point.
b) 1 − k = −1 ⇒ k = 2 ⇒ x = −4, y = −8, which gives a solution to the original equation.
1 point.

Second Solution. We rearrange the equation into:

y 2 = x2 (x − y).

It can easily be shown that if y 6= 0, x − y must be square.


1 point.

1
If y = 0, from the starting equation we infer x = 0, and we have a solution (x, y) = (0, 0).
In the other case, we set x = y + a2 , where a is a positive integer. Taking the square root of the equation gives:

|y| = |x|a

.
1 point.
Because x = y + a2 > y, it is impossible for y to be a positive integer, because then the equation would say y = xa > x,
which is false. That means y < 0, and also:
−y = |x|a
2 points.
If x is positive, we can write:
−y = xa = (y + a2 )a = ay + a3
which rearranges into
−y(a + 1) = a3 ,
so a3 is divisible by a + 1, which is not possible for positive a due to a3 = (a + 1)(a2 − a + 1) − 1.
2 points.
We see that x cannot be zero due to y being negative, so the only remaining option is that x < 0 also. We write:

−y = xa = −(y + a2 )a = −ay + a3

which can similarly be rearranged into


−y(a − 1) = a3 ,
and this time a3 is divisible by a − 1.
1 point.
Analogously, we decompose a3 = (a − 1)(a2 + a + 1) + 1, so a − 1 divides 1 and the unique possibility is a = 2.
2 points.
The choice a = 2 gives y = −8 and x = −4, which is a solution to the original equation.
1 point.
Notes on marking:
• Points awarded for different solutions are not additive, a student should be awarded the maximal number of points
he is awarded following only one of the schemes.
• Saying that (0, 0) is a solution is worth 0 points. The point is awarded only if the student argues that, disregarding
the solution (0, 0), we must only consider x 6= 0, or a similar proposition.
• Failing to check that (0, 0) is a solution shall not be punished. Failing to check that (−4, −8) is a solution shall
result in the deduction of 1 point only if a student did not use a chain of equivalences to discover the solution.

2
Problem 2. A regular hexagon in the plane is called sweet if its area is equal to 1. Is it possible to place
2000000 sweet hexagons in the plane such that the union of their interiors is a convex polygon of area at least
1900000?

Remark: A subset S of the plane is called convex if for every pair of points in S, every point on the straight
line segment that joins the pair of points also belongs to S. The hexagons may overlap.
(Josip Pupic, Borna Vukorepa)

Solution. It is possible to make such arrangement.


0 points.
We will stack hexagons in a triangular pattern shown below, where the first row has one hexagon, second row has two
and so on. The pattern on the picture is a triangle with four rows.

3 points.
n(n+1)
Such triangle with n rows has an area of 2
since that is the total number of hexagons used for that pattern.
1 point.
Setting n = 1950 gives us a triangle with 1950 rows. That figure has an area of 1902225 and the same number of hexagons
is used. The only problem is that it is not convex.
1 point.
We can use the remaining hexagons to fix the non-convex parts of the figure, as shown below.

3 points.

Every non-convex part can be fixed with two hexagons, so in total we will need 1949 · 3 · 2 = 11694 hexagons to make
the figure convex. This is because there are 1949 non-convex parts on every side of our triangular pattern. Obviously,
this is much less hexagons than we have remaining. The resulting figure is now convex, so this completes the proof.
2 points.
Notes on marking:
• Sketches of stacking the hexagons in any pattern will not be worth any points if there is no work done on them.

3
• No points are awarded for the claim that the construction is possible.
• There are many patterns for stacking the hexagons which can give the correct solution. Each of them should be
marked the same way as this one.
• Work on patterns which can’t produce the desired area will not be worth any points.

4
Problem 3. Let ABC be an acute triangle. Denote by H and M the orthocenter of ABC and the midpoint
of side BC, respectively. Let Y be a point on AC such that Y H is perpendicular to M H and let Q be a point
on BH such that QA is perpendicular to AM . Let J be the second point of intersection of M Q and the circle
with diameter M Y . Prove that HJ is perpendicular to AM .
(Steve Dinh)

Solution. We present the following diagram:

0 points.

Since ∠M HY = 90◦ , Y lies on the circle with diameter M Y , so the quadrilateral HM JY is cyclic.
1 point.
It follows that ∠HJM = ∠HY M . Since QA ⊥ AM ,

HJ ⊥ AM ⇐⇒ HJ k QA ⇐⇒ ∠HJM = ∠AQM ⇐⇒ ∠HY M = ∠AQM.

Since ∠Y HM = ∠QAM = 90◦ , the latter is to equivalent to 4AQM ∼ 4HY M .


1 point.
Now we have two different approaches to finish the solution:

5
First Approach (Synthetic). Let P, R be the reflections of A, H in M , respectively.
Then since ∠Y HM = ∠QAM = 90◦ , i.e. ∠Y HR = ∠QAP = 90◦ ,
1
AQ AM AQ 2
AP AQ AP
4AQM ∼ 4HY M ⇐⇒ = ⇐⇒ = 1 ⇐⇒ = ⇐⇒ 4AQP ∼ 4HY R ⇐⇒ ∠QP A = ∠Y RH.
HY HM HY 2
HR HY HR

3 points.
Since M is the midpoint of BC, the quadrilaterals ABP C and HBRC are parallelograms.
1 point.
◦ ◦
Since CR k HB and HB ⊥ AC, it follows that ∠ACR = 90 . Hence ∠Y CR = ∠RHY = 90 , so the quadrilateral
Y HRC is cyclic.
1 point.
It follows that ∠Y RH = ∠Y CH = ∠ACF = 90◦ − ∠BAC.
1 point.
◦ ◦
Since BP k AC and AC ⊥ BQ, we have P BQ = 90 . Hence ∠P BQ = ∠P AQ = 90 , so the quadrilateral ABP Q is
cyclic.
1 point.

It follows that ∠QP A = ∠QBA = ∠EBA = 90 − ∠BAC.
1 point.
Finally, we conclude that ∠Y RH = ∠QP A, as desired.

Second Approach (Trigonometric). We will show that 4AQM ∼ 4HY M by proving that
AQ HY
= .
AM HM
To begin with, let a = BC, b = CA, c = AB and α = ∠BAC, β = ∠CBA, γ = ∠ACB.

AE AE
From right-angled 4AEQ we get AQ = = .
cos ∠EAQ sin ∠M AC
c cos α AQ c cos α
Then from right-angled 4ABE we obtain AE = AB cos ∠BAE = c cos α, so AQ = , i.e. = .
sin ∠M AC AM AM sin ∠M AC
AM MC
By the sine law applied to 4AM C, we obtain = , i.e. AM sin ∠M AC = a2 sin γ.
sin ∠ACM sin ∠M AC
AQ c cos α c 2 cos α a 2 cos α
It follows that = a = · = · = 2 cot α, where we used the sine law applied to
AM 2
sin γ sin γ a sin α a
4ABC.
4 points.

To conclude, note that 4AHY ∼ 4BM H since ∠HAY = ∠M BH = 90 − γ and ∠Y HA = ∠HM B (angles with
HY AH
perpendicular rays). Then = = 2 cot α, so we are done.
HM BM
4 points.
Notes on marking:
• The points from different approaches are not additive, a student should be awarded the maximum of points obtained
from one of them.

6
Problem 4. The real numbers x, y, z satisfy x2 + y 2 + z 2 = 3. Prove the inequality

x3 − (y 2 + yz + z 2 )x + y 2 z + yz 2 ≤ 3 3

and find all triples (x, y, z) for which equality holds.


(Miroslav Marinov)

Solution. First let us notice the factorization of the left-hand side

x3 − (y 2 + yz + z 2 )x + y 2 z + yz 2 = (x − y)(x − z)(x + y + z)

.
2 points.
Now we get the following inequalities
2
(x3 − (y 2 + yz + z 2 )x + y 2 z + yz 2 ) 3
p
= 3 (x − y)2 (x − z)2 (x + y + z)2
1 point.
G−A 1
6 ((x − y)2 + (x − z)2 + (x + y + z)2 )
3
3 points.
1
= (3x2 + 2y 2 + 2z 2 + 2yz)
3
1
= (6 + x2 + 2yz)
3
G−A 1
6 (6 + x2 + y 2 + z 2 )
3
1 point.
9
= =3
3
3
from where we get the required inequality by raising to the power of 2
.

In the case of equality, expressions |x − y|, |x − z| and |x + y + z| are all equal to 3 which we conclude from the
√ first
G-A inequality. From the case of equality in the second G-A inequality we conclude y = z. Now from |x − y| = 3 we
get 2 cases:
√ √ √ √ √
a) x − y = 3 ⇒ |3y + 3| = 3 from where we get y = 0 or y = − 2 3 3 which gives us potential solutions ( 3, 0, 0)
√ √ √ √
and ( 33 , − 2 3 3 , − 2 3 3 ). By checking only ( 3, 0, 0) remains.
√ √ √ √ √
b) x − y = − 3 ⇒ |3y − 3| = 3 from where we get y = 0 or y = 2 3 3 which gives us potential solutions (− 3, 0, 0)
√ √ √ √ √ √
and (− 33 , 2 3 3 , 2 3 3 ). By checking only (− 33 , 2 3 3 , 2 3 3 ) remains.
3 points.
Notes on marking:
• Factorization from the beginning can be spotted because y and z are obviously roots of the polynomial equation
x3 − (y 2 + yz + z 2 )x + y 2 z + yz 2 = 0 in the variable x.
√ √ √ √
• 1 point is to be deducted if potential solutions aren’t checked out i.e. either ( 33 , − 2 3 3 , − 2 3 3 ) or (− 3, 0, 0) is
stated as solutions for the case of equality and.
• Proving the inequality is worth 7 points while the rest is worth 3 points non-depending on the way in which it
was proved.

7
7th European Mathematical Cup
8th December 2018 - 16th December 2018 MLADI NADARENI MATEMATIČARI

Marin Getaldic
Junior Category

Problems and Solutions


Problem 1. Let a, b, c be non-zero real numbers such that
1
a2 + b + c = ,
a
1
b2 + c + a = ,
b
1
c2 + a + b = .
c
Prove that at least two of a, b, c are equal.
(Daniel Paleka)

First Solution. Let’s assume the opposite, i.e. a, b and c are pairwise non-equal. By subtracting the second equality
from the first one, we obtain
1 1
(a2 + b + c) − (b2 + c + a) = −
a b
2 2 b−a
(a − b ) + (b − a) =
ab
a−b
(a − b)(a + b) − (a − b) + =0
 ab
1
(a − b) a + b − 1 + =0
ab
1 point.
Since a 6= b we may conclude
1
a+b−1+ =0 (1)
ab
1 point.
Similarly, subtracting the third equality from the second one, combined with b 6= c, gives us
1
b+c−1+ =0 (2)
bc
1 point.
Expressions on the left side in (1) and (2) are both equal to 0 which specifically implies
1 1
a+b−1+ =b+c−1+
 ab
 bc
1 1 1
(a − c) + · − =0
b a c
1 c−a
(a − c) + · =0
 b ac
1 1
(a − c) 1 − · =0
b ac
1
1− =0
abc
abc = 1

1
2 points.
Inserting that back into (1) results with

1 abc
0=a+b−1+ =a+b−1+ =a+b−1+c
ab ab

⇒ b+c=1−a (3)

2 points.
Finally, combining (3) with the first of the 3 given equations results with
1
a2 + b + c =
a
1
a2 + 1 − a =
  a
1
(a2 − a)+ 1 − =0
a
a−1
a(a − 1) + =0
 a
1
(a − 1) a + =0
a
a2 + 1
(a − 1) · =0
a
Because of a2 + 1 > 0 we obtain a − 1 = 0, i.e. a = 1.
2 points.
Analogously we also find b = c = 1 which is a contradiction with the assumption so we conclude that at least two of
a, b, c are equal.
1 point.

2
Second Solution. Let’s assume the contrary, i.e. a, b and c are pairwise different. After multiplying the first equation
with a, the second with b, and the third with c, we get:

a3 + ab + ac = b3 + bc + ba = c3 + ca + cb = 1.

0 points.
In particular, the first two expressions are equal. Subtracting them and factorizing leads to:

a3 − b3 + ac − bc = 0
(a − b)(a2 + ab + b2 + c) = 0

1 point.
Since a 6= b we may conclude:

a2 + ab + b2 + c = 0

1 point.
Similarly, we can get the same thing for b and c:

b2 + bc + c2 + a = 0

1 point.
Subtracting these two equations yields:

a2 − c2 + ab − bc + c − a = 0
(a − c)(a + c + b − 1) = 0

2 points.
Because a 6= c, we obtain:

a+b+c=1

2 points.
Now we proceed to arrive to a contradiction in the same way as in the previous solution.
3 points.
Notes on marking:
• After obtaining a = 1, we may use that fact in (3) to conclude b + c = 0, i.e. c = −b. That gives us

1 = abc = 1 · b · (−b) = −b2

which isn’t satisfied for any b ∈ R. Again we reach contradiction with the assumption and conclude that at least
two of a, b, c are equal. This part of the solution should be awarded with 1 point.

3
Problem 2. Find all pairs (x, y) of positive integers such that

xy | x2 + 2y − 1.

(Ivan Novak)

First Solution. Notice that the condition implies

x | 2y − 1.

1 point.
kx+1
This implies that there exists a positive integer k such that kx = 2y − 1, so y = 2
.
1 point.
Returning to the starting assertion, we get that
x(kx + 1)
| x2 + kx =⇒ kx + 1 | 2(k + x).
2
2 points.
For all positive integers k, x, the following inequality is satisfied, with equality if and only if k = 1 or x = 1:

2(k + x)
6 2 ⇐⇒ 2(k − 1)(x − 1) > 0.
kx + 1
2 points.
2(k+x) 2(k+x)
So as kx+1
∈ N, then we conclude that kx+1
∈ {1, 2}.
1 point.
We now have two possible cases.
1. k + x = kx + 1. In this case, k = 1 or x = 1.
(a) If x = 1, then y can be any positive integer.
(b) If k = 1, then x = 2y − 1, where y is any positive integer.

1 point.

2. 2k + 2x = kx + 1. Then 2x − 1 = k(x − 2) =⇒ x − 2 | 2x − 1 =⇒ x − 2 | 3. This has only two solutions, both of


which are true by an easy check: x = 3, k = 5, y = 8 or x = 5, k = 3, y = 8.
2 points.
Therefore, the set of solutions is
(x, y) ∈ {(1, t), (2t − 1, t), (3, 8), (5, 8) | t ∈ N.}

4
2
Second Solution. Let (x, y) be a solution, and let x +2y−1
xy
= g. This equation is equivalent with x2 −(gy)x+2y−1 = 0.
We know x is one root of the equation. Let R be the other root. Using Vieta’s formulas, we obtain the following system
of equations:
x + R = gy
xR = 2y − 1.
3 points.
From the first equation we get that R is an integer, and from the second equation we get that it is a positive integer.
1 point.
Using the same inequality as in Solution 1, we get that gy 6 2y, which implies g = 1 or g = 2.
3 points.
We now split into two cases:
1. If g = 1, then x2 + 2y − 1 = xy =⇒ x2 − 1 = y(x − 2) =⇒ x − 2 | x2 − 1 =⇒ x − 2 | 3. This has only two
solutions, both of which are true by an easy check: x = 5, y = 8 or x = 3, y = 8.
2 points.
2 2
2. If g = 2, then x + 2y − 1 = 2xy =⇒ x − 1 = 2y(x − 1) =⇒ x = 1 or x = 2y − 1, and y can be any positive
integer.
1 point.
Therefore, the set of solutions is
(x, y) ∈ {(1, t), (2t − 1, t), (3, 8), (5, 8) | t ∈ N.}

5
x2 +2y−1
Third Solution. Let (x, y) be a solution, and let xy
= g. This equation is equivalent with x2 − (gy)x + 2y − 1 = 0.
1 point.
The condition of the problem is satisfied if and only if the discriminant is a square of a positive integer.
1 point.
2
Let the discriminant be equal to k . Then

k2 = g 2 y 2 − 8y + 4 ⇐⇒ k2 = (gy − 2)2 + 4gy − 8y ⇐⇒

(k − gy + 2)(k + gy − 2) = 4y(g − 2).


2 points.
We now split into 3 cases depending on the size of g.
1. If g > 2, then 4y(g − 2) > 0 and k + gy − 2 > 0, which implies

k − gy + 2 > 0.

1 point.
Adding 2gy − 4y = 2y(g − 2) to the both sides, we obtain

(k + gy − 2)(k − gy + 2)
k + gy − 2 > k + gy + 2 − 4y > 2y(g − 2) = =⇒
2
k − gy + 2 < 2,
so the only possibility is k − gy + 2 = 1, k + gy − 2 = 4y(g − 2).
However, summing up the two equalities yields 2k = 4y(g − 2) + 1, which is a contradiction modulo 2. Therefore,
there are no solutions in this case.
2 points.
2. If g = 1, then x2 + 2y − 1 = xy =⇒ x2 − 1 = y(x − 2) =⇒ x − 2 | x2 − 1 =⇒ x − 2 | 3. This has only two
solutions, both of which are true by an easy check: x = 5, y = 8 or x = 3, y = 8.
2 points.
3. If g = 2, then x2 + 2y − 1 = 2xy =⇒ x2 − 1 = 2y(x − 1) =⇒ x = 1 or x = 2y − 1, and y can be any positive
integer.
1 point.

Notes on marking:
• Points from separate solutions can not be added. The competitor should be awarded the maximum of the points
scored in the 2 presented solutions, or an appropriate number of points on an alternative solution.

6
Problem 3. Let ABC be an acute triangle with |AB| < |AC| and orthocenter H. The circle with center A
and radius |AC| intersects the circumcircle of 4ABC at point D and the circle with center A and radius |AB|
intersects the segment AD at point K. The line through K parallel to CD intersects BC at the point L. If M
is the midpoint of BC and N is the foot of the perpendicular from H to AL, prove that the line M N bisects
the segment AH.
(Miroslav Marinov)

First Sketch.
A

T E

S
F N
H
K
B L M C

D
First Solution. We start with the following:

Lemma 1. AL is the angle bisector of ∠BAC.

Proof: Since A, B, C and D lie on the same circle we obtain that ∠ABC = ∠ADC = ∠ACD.
1 point.
From that we get the following three equations:
∠CAD = 180◦ − 2∠ADC = 180◦ − 2∠ABC
1 point.

∠BCD = ∠BAD = ∠BAK = ∠BAC − (180 − 2∠ABC) = ∠ABC − ∠ACB
1 point.
∠BAK ∠ABC − ∠ACB
∠ABK = ∠AKB = 90◦ − = 90◦ −
2 2
1 point.
Next from LK k CD it follows that ∠CLK = ∠LCD = ∠BCD = ∠BAK so A, B, L and K are concyclic.
1 point.
Now we have
∠BAC
∠BAL = ∠BAK − ∠LAK = ∠BAK − ∠LBK = (∠ABC − ∠ACB) − (∠ABC − ∠ABK) =
2
hence AL is the angle bisector of ∠BAC.
1 point.
Let E and F be the feet of the altitudes from B and C in 4ABC. Observe that ∠AEH = ∠AF H = ∠AN H = 90◦ so
A, E, H, N and F lie on the circle with diameter AH.
1 point.
Since AL is the angle bisector of ∠BAC its follows that |N E| = |N F |.
1 point.

7
Denote by T the midpoint of AH. Since T is the circumcenter of AEHN F we get |T E| = |T F |.
1 point.
Also since ∠BEC = ∠CF B, E and F lie on the circle with diameter BC from where we get |M E| = |M F | so M , N
and T lie on the bisector of EF .
1 point.
Alternative proof of Lemma 1.

Similarly as in the first proof, we obtain that ∠ABC = ∠ADC = ∠ACD.


1 point.
Let S be the intersection of KL and AC. Since LS k DC, we have ∠ASL = ∠ACD = ∠ABC = ∠ABL.
2 points.
We also get ∠AKS = ∠ADC = ∠ASK, hence |AS| = |AK| = |AB|.
1 point.
Since B, L, S are not collinear (this is since SL is parallel to CD, which in turn isn’t parallel to BC since |AB| < |AC|),
we may conclude that 4ABL and 4ASL are congruent. The claim now follows.
2 points.

Second Sketch.
A

N
H

B L M C

Second Solution. We get similarly as in the First Solution that AL is the angle bisector of ∠BAC.
6 points.
Denote by T the midpoint of AH. As 4HN A is right-angled, we have that ∠N T H = 2∠N AH.
1 point.
Denote by O the circumcenter of 4ABC. It is known that (as a consequence of existence of Euler line)
|AH|
|AH| = 2|OM | =⇒ |AT | = = |OM |
2
and as AT and OM are both orthogonal to BC, they are parallel, so AT M O is an parallelogram.
1 point.
Now as ∠HAB = 90◦ − ∠ABC = ∠OAC, we know that AL is the angle bisector of OAH.
1 point.
Then we have that ∠M T H = ∠OAH = 2∠N AH = ∠N T H and we conclude that T , N and M are colinear.
1 point.
Notes on marking:
• If a student has a partial solution with analytic methods, only points for proving facts that can be expressed in
geometric ways and lead to a compete solution can be awarded.

8
Problem 4. Let n be a positive integer. Ana and Banana are playing the following game:
First, Ana arranges 2n cups in a row on a table, each facing upside-down. She then places a ball under a cup
and makes a hole in the table under some other cup. Banana then gives a finite sequence of commands to Ana,
where each command consists of swapping two adjacent cups in the row.
Her goal is to achieve that the ball has fallen into the hole during the game. Assuming Banana has no information
about the position of the hole and the position of the ball at any point, what is the smallest number of commands
she has to give in order to achieve her goal?
(Adrian Beker)

First Solution. We claim that the minimum number of commands is n(3n − 2).

Call a finite sequence of commands valid if it results in the ball falling into the hole while performing the commands,
regardless of the inital position of the ball and the position of the hole. Also call a position an endpoint if it is either the
first or the last position in the row.

Lemma 1. A sequence of commands is valid if and only if it results in each cup visiting both endpoints.

Proof. Suppose there exists a cup c that hasn’t visited an endpoint p. Then the ball fails to fall into the hole in
the case when it is under c and the hole is at p. Hence, the sequence is not valid. Conversely, if each cup has visited
both endpoints, by discrete continuity it must have also visited all positions in between. Hence, the ball has certainly
fallen into the hole, so the sequence is valid.
2 points.
Now consider a valid sequence of commands. We will show that it has length at least n(3n − 2). Let C be the set of
cups. For each c ∈ C, let kc be the P c. Since each command involves two cups, the
P total number of commands involving
total number of commands is 12 c∈C kc . So it suffices to show that c∈C kc > 2n(3n − 2).
1 point.
For each c ∈ C, let xc be the number of commands involving c before its first visit to an endpoint. Similarly, let yc be
the number of commands involving c after its last visit to an endpoint. Since c visited both endpoints, the number of
commands between its first and last visit to an endpoint must be at least 2n − 1. Hence, kc > xc + yc + 2n − 1.
2 points.
Now for each 1 6 i 6 2n, let ai be the cup at the i-th position from the left in the initial arrangement and similarly
let bi be the cup at the i-th position in the final arrangement. Then it follows that xai , ybi > min(i − 1, 2n − i) for all
1 6 i 6 2n. Hence
X X2n X2n
xc = xai > min(i − 1, 2n − i) = n(n − 1),
c∈C i=1 i=1

X 2n
X 2n
X
yc = ybi > min(i − 1, 2n − i) = n(n − 1),
c∈C i=1 i=1
X X
kc > (xc + yc + 2n − 1) > n(n − 1) + n(n − 1) + 2n(2n − 1) = 2n(3n − 2),
c∈C c∈C

as desired. It remains to exhibit a valid sequence consisting of n(3n − 2) commands.


2 points.
n(n−1)
Lemma 2. Consider n cups in a row. Then there is a sequence of 2
commands resulting in each cup visiting the
first position (and similarly for the last position).

Proof. For each 1 6 i 6 n in increasing order, for each 1 6 j < i in decreasing order, swap the cupsPcurrently at the j-th
n(n−1)
and (j + 1)-st positions. This clearly results in each cup visiting the first position and consist of n
i=1 (i − 1) = 2
commands, as desired (the case for the last position is analogous).

Corollary. For 2n cups in a row, there is a sequence of n(n − 1) steps resulting in each of the first n cups visiting
the first position and each of the last n cups visiting the last position.
2 points.
Now first apply the algorithm from the corollary. Then for each 1 6 i 6 n in decreasing order, for each 0 6 j < n in
increasing order, swap the cups currently at the (i + j)-th and (i + j + 1)-st positions. Finally, apply the algorithm from
the corollary again. It is easy to see that the performed sequence of commands is valid and it has length n(n − 1) + n2 +
n(n − 1) = n(3n − 2), as desired.
1 point.

9
Second Solution. The starting lemma and the proof of the upper bound are the same as in the first solution and are
worth the same number of points. In this solution we present a different way to obtain the lower bound on the answer.

Let L be the set of cups that visit the first position before the last position and similarly let R be the set of cups
that visit the last position before the first position. Then C is the disjoint union of L and R, in particular |L| + |R| = 2n.
1 point.
Now consider two cups a and b such that a is to the left of b at the beginning. Then note that a and b have to be swapped
at least once since otherwise a wouldn’t visit the last position (and b wouldn’t visit the first position). Moreover, if a
and b are swapped exactly once, then note that we must have a ∈ L, b ∈ R.
2 points.
Hence, it follows that the total number of swaps is at least
!
2n
· 2 − |L| · |R| > 2n(2n − 1) − n2 = n(3n − 2),
2

|L|+|R|
where we used the AM-GM inequality to obtain |L| · |R| 6 2
) = n2 .
2 points.
Notes on marking:
• Points obtained for different proofs of the lower bound are not additive, a student should be awarded the maximum
of points obtained for a single approach.

• If a student states that a sequence of commands being valid is equivalent to each cup visiting each position, it
should be awarded 0 points. The reason for this is that this characterisation of valid sequences is trivial and not
directly useful, whereas both solutions extensively make use of the characterisation presented in Lemma 1.

10
8th European Mathematical Cup
14th December 2019 - 22th December 2019 MLADI NADARENI MATEMATIČARI

Marin Getaldic
Junior Category

Problems and Solutions


Problem 1. Every positive integer is marked with a number from the set {0, 1, 2}, according to the following
rule:
if a positive integer k is marked with j, then the integer k + j is marked with 0.
Let S denote the sum of marks of the first 2019 positive integers. Determine the maximum possible value of S.
(Ivan Novak)

First Solution. Consider an arbitrary marking scheme which follows the given rule.

Let a denote the number of positive integers from the set {1, . . . , 2019} which are marked with a 2, b the number
of those marked with a 1, and c the number of those marked with a 0.
1 point.
We have S = 2a + b.
1 point.
For every positive integer j ∈ {1, . . . , 2017} which is marked with a 2, the number j + 2 is marked with a 0. This implies
that the number of positive integers less than 2017 marked with 2 is less than or equal to c.
1 point.
Hence, this implies a 6 c + 2. We then have

S = 2a + b 6 a + b + c + 2 = 2019 + 2 = 2021.

3 points.
Consider the following marking scheme:

210|210|210| 2200|2200|2200 . . . 2200 |22|0000 . . . .


| {z }
502 blocks of 2200

Here the i-th digit in the sequence denotes the mark of positive integer i. For this marking, S = 2021, and therefore
2021 is the maximum possible value of S.
4 points.

1
Second Solution. The marking scheme for which S = 2021 is the same as in the first solution.
4 points.
Let Sn denote the sum of marks of first n positive integers, and let ak denote the mark of k. Without loss of generality
we may assume aj = 0 for all integers j 6 0. We’ll prove the following claim by strong mathematical induction:

for every positive integer n, Sn 6 n + 2 and if equality holds, then an = 2.

1 point.
The base cases for n ∈ {1, 2} trivially hold. Suppose the claim is true for all k 6 n for some n > 2.
Suppose there exists a marking scheme for which Sn+1 > n + 4. Then if an+1 < 2, we have Sn > n + 3, which is a
contradiction. Hence, an+1 = 2.
1 point.
This implies that an ∈ {0, 2}. If an = 0, then Sn−1 > n + 2, which is a contradiction. So, an = 2.
1 point.
Now an−1 = 0 because both an and an+1 are nonzero. We now have Sn−2 > n, and by the induction hypothesis, it must
hold that Sn−2 = n and an−2 = 2. However, this is in contradiction with an being nonzero. Hence, Sn+1 6 n + 3.
1 point.
Suppose Sn+1 = n + 3 and an+1 6= 2. If an+1 = 0, then Sn > n + 3, which is a contradiction. Thus, an+1 = 1.
1 point.
Then Sn = n + 2, which implies an = 2. Then we must have an−1 = 0, and then Sn−2 = n, which implies an−2 = 2,
but an is nonzero, which is a contradiction. Therefore, the claim is true for n + 1, which implies it is true for all positive
integers. In particular, S2019 6 2021, which combined with the construction implies that the maximum value of S is
2021.
1 point.
Notes on marking:
• If a student forgets to write additional zeros beyond the first 2019 digits in his construction, but the construction
is otherwise valid, he should be awarded all 4 points for this part.
• There are many different optimal marking schemes. For example, 2200|210|210| . . . |210|22|000 . . ., where the block
|210| repeats 671 times.
• In the Second Solution, if the student writes only the first part of the induction hypothesis without the assumption
that an = 2 in the case of equality: he should be awarded 0 points, unless he reaches additional conclusions which
lead to the solution.
• In the Second Solution, if the student doesn’t comment on the base case/cases at all, he should be deducted 1
point.
• If the student proves any nontrivial lemma useful for any of the solutions, but the lemma itself isn’t worth any
points and the student wouldn’t otherwise get any of the 6 points given for proving the bound, he should get 1
point for this part.

2

Problem 2. Let (xn )n∈N be a sequence defined recursively such that x1 = 2 and
1
xn+1 = xn + for n ∈ N.
xn
Prove that the following inequality holds:

x21 x22 x22018 x22019 20192


+ + ... + + > 2 .
2x1 x2 − 1 2x2 x3 − 1 2x2018 x2019 − 1 2x2019 x2020 − 1 x2019 + x21
2019

(Ivan Novak)

First Solution. Notice that by squaring the assertion xn+1 = xn + 1


xn
we obtain the equality x2n+1 = x2n + 1
x2
+ 2 =⇒
n
2
2019
x2n + 1
x2
= x2n+1 − 2, which implies that the right hand side equals .
n x22020 − 2
1 point.
On the other hand, we have
1
2xn xn+1 − 1 = 2xn (xn + ) − 1 = 2x2n + 1.
xn
1 point.
This implies that the sum on the left hand side can be written as
1 1 1
+ + ... +
2 + x12 2 + x12 2 + x21
1 2 2019

1 point.
By squaring the given assertion, we get the equality 2 + 1
x2
= x2n+1 − x2n . This implies that the left hand side equals
n

1 1 1 1
+ 2 + ... + 2 + 2 .
x22 − x21 x3 − x22 x2019 − x22018 x2020 − x22019
1 point.
Using the inequality between arithmetic and harmonic mean, we find that the left hand side is greater than or equal to

20192
.
(x22 − x21 ) + (x23 − x22 ) + . . . + (x22020 − x22019 )
4 points.
We now notice that the denominator is a telescoping sum and it equals x22020 − x21 , which implies the right hand side
equals
20192 20192
= ,
x22020 − x21 x22020 − 2
which is exactly equal to the right hand side.
1 point.
The equality cannot hold because x22 − x21 6= x23 − x22 .
1 point.

3
Second Solution. As in the first solution, we obtain that the left hand side equals
1 1 1 1
1 + 1 + ... + + .
2 + x2 2 + x2 2 + x21 2+ x2
1
1 2 2018 2019

2 points.
Using the inequality between arithmetic and harmonic mean, we get that the left hand side is greater than or equal to

20192
1 .
2 · 2019 + x2
+ x12 + . . . + x2
1
1 2 2019

4 points.
We now prove by mathematical induction that
1 1 1
2·n+ + 2 + ... + 2 = x2n
x21 x2 xn−1

holds for every n ∈ N.


1 point.
√ 2
For n = 1, we have 2 · 1 = 2 . Suppose the claim is true for some n ∈ N. Then
1 1 1 1 1
x2n+1 = 2 + x2n + = 2 + 2n + 2 + 2 + . . . + 2 + 2,
x2n x1 x2 xn−1 xn

where we used the induction hypothesis for the last equality. This proves the claim.
2 points.
In particular, for n = 2019, we have that

20192 20192
= ,
2 · 2019 + x12 + x12 + . . . + x2
1
x22019 + x21
1 2 2019 2019

which proves the inequality.

1 1
The equality cannot hold because x2
+ 2 6= x2
+ 2.
1 2

1 point.

4
Third Solution. We prove by mathematical induction that for every n > 2 the following inequality holds:

x21 x22 x2n n2


+ + ... + > 2 .
2x1 x2 − 1 2x2 x3 − 1 2xn xn+1 − 1 xn + x12
n

2 4.5 17 4 72 17
For n = 2, the left hand side equals 5
+ 10
= 20
, and the right hand side equals 9+2 = 85
< 20
, which proves the base
2 9
case.

Suppose the claim was true for some n ∈ N. Then by the induction hypothesis, we know that

x21 x22 x2n x2n+1 n2 x2n+1


+ + ... + + > 2 1 + .
2x1 x2 − 1 2x2 x3 − 1 2xn xn+1 − 1 2xn+1 xn+2 − 1 xn + x 2 2x n+1 xn+2 − 1
n

It suffices to prove that


n2 x2n+1 (n + 1)2
1 + > 2 .
2
xn + x 2 2x x
n+1 n+2 − 1 xn+1 + x21
n n+1

1 point.
We now prove that 2xn+1 xn+2 − 1 = 2x2n+1 + 1 as in the first solution.
1 point.
We then have
n2 x2n+1 n2 x2n+1 n2 1
1 + = 2 1 + = 2 +
1
.
x2n + x2 2x x
n+1 n+2 − 1 xn + x2 2x2
n+1 + 1 xn + x12 2+ 2
n n n
xn+1
1 point.
By the inequality of arithmetic and harmonic mean, this is greater than or equal to

(n + 1)2
.
x2n + x12 + 2 + x2
1
n n+1

5 points.
1
Notice that squaring the assertion xn+1 = xn + xn
, we obtain

1
x2n + + 2 = x2n+1 .
x2n
1 point.
This implies that
(n + 1)2 (n + 1)2
= ,
x2n + x12 + 2 + x2
1
x2n+1+ x21
n n+1 n+1

which is exactly equal to the right hand side. Therefore, the claim is proven by the principle of mathematical induction.
In particular, the claim is true for n = 2019, which proves the inequality.
1 point.
Notes on marking:
• Points from separate solutions can not be added. The student should be awarded the maximum of the points scored
in the 3 presented solutions, or an appropriate number of points on an alternative solution.
• The third solution gives 5 points for the use of AM-HM inequality as opposed to 4 points in the first solution
because in the third solution it is not necessary to comment the equality case. However, if a student has n = 1 as
a basis of induction and doesn’t comment the equality case, he should be deducted 1 point out of possible 5.
• The point for proving that the equality cannot be achieved is only awarded if the student has proved the non-strict
version of inequality.

5
Problem 3. Let ABC be a triangle with circumcircle ω. Let lB and lC be two lines through the points B and
C, respectively, such that lB k lC . The second intersections of lB and lC with ω are D and E, respectively.
Assume that D and E are on the same side of BC as A. Let DA intersect lC at F and let EA intersect lB
at G. If O, O1 and O2 are circumcenters of the triangles ABC, ADG and AEF , respectively, and P is the
circumcenter of the triangle OO1 O2 , prove that lB k OP k lC .
(Stefan Lozanovski)

Sketch.

O2

E
A
S
G P

O1

B C

lB lC

Solution. Let us write ∠BAC = α, ∠ABC = β, ∠ACB = γ.

Lemma. Triangles AGD and AEF are similar to the triangle ABC.
Proof. As DBCAE is a cylic pentagon we have
∠GDA = ∠BCA = γ.
1 point.
Now from lB k lC we get that
∠DBA = ∠DBC − β = 180◦ − ∠BCE − β = α + γ − ∠BCE = α − ∠ACE
1 point.
so from the cyclicity
∠BCD = ∠BAD = 180◦ − ∠DBA − ∠ADB = 180◦ − (α − ∠ACE) − (180◦ − γ) = γ − α + ∠ACE
1 point.
Hence
∠DAG = ∠DCE = ∠BCA − ∠BCD + ∠ACE = α
1 point.
Therefore AGD is similar to the triangle ABC, and similarly for AEF .

6
Now as G, A and E are collinear and F , A and D are collinear, using Lemma we get that O, O1 and O2 are collinear.
1 point.
As O1 is the circumcenter of the triangle ADG and O1 D is the bisector of the chord AD we get that
1
∠AO1 O = ∠AO1 D = ∠AGD = β
2
and similarly ∠AO1 O = γ, so the triangle OO1 O2 is similar to the triangle ABC.
2 points.
Now as P is the circumcenter of the triangle OO1 O2 from the previous similarity we get that

∠O1 OP = ∠BAO

1 point.
Hence
∠DOP = ∠DOO1 + ∠O1 OP = ∠DBA + ∠BAO = ∠DBA + ∠ABO = ∠DBO = ∠ODB
so lB k OP k lC .
2 points.
Notes on marking:
• If a student has a partial solution with analytic methods, only points for proving facts that can be expressed in
geometric ways and lead to a compete solution can be awarded.

7
Problem 4. Let u be a positive rational number and m be a positive integer. Define a sequence q1 , q2 , q3 , . . .
such that q1 = u and for n > 2:
a a + mb
if qn−1 = for some relatively prime positive integers a and b, then qn = .
b b+1
Determine all positive integers m such that the sequence q1 , q2 , q3 , . . . is eventually periodic for any positive
rational number u.

Remark: A sequence x1 , x2 , x3 , . . . is eventually periodic if there are positive integers c and t such that xn = xn+t
for all n > c.
(Petar Nizić-Nikolac)

Solution. We will prove that the sequence is eventually periodic if and only if m is odd.
Let a1 , a2 , a3 , . . . and b1 , b2 , b3 , . . . be sequences of numerators and denumerators of q1 , q2 , q3 , . . . respectively when written
in the irreducible form, i.e. for n ∈ N:
an
qn = gcd(an , bn ) = 1
bn
Say that there was reduction in the nth step if gcd(an + mbn , bn + 1) > 1.

Case 1. m is even
Set u = 11 . Assume for the sake of contradiction that q1 , q2 , q3 , . . . is eventually periodic. Then (bn )n∈N is bounded so
there is r > 1 (pick the smallest one) such that there was reduction in the rth step. Easy to see that
r

1 m+1 3m + 1 6m + 1 10m + 1 m+1
q1 = , q 2 = , q3 = , q4 = , q5 = , . . . , qr = 2
1 2 3 4 5 r
2 points.
Now as m is even we have
! ! ! !
r r+1  m 
gcd (ar + mbr , br + 1) = gcd m + 1 + mr, r + 1 = gcd m + 1, r + 1 = gcd (r + 1)r + 1, r + 1 = 1
2 2 2

so this is a contradiction, and hence it is not eventually periodic for any positive rational number u.
1 point.
Case 2. m is odd
Assume that there is r ∈ N such that there was no reduction in the steps r, r + 1, r + 2 and r + 3. Then for i ∈ {1, 2}:

(ar+i+2 , br+i+2 ) ≡ (ar+i + mbr+i + mbr+i+1 , br+i + 1 + 1) ≡ (ar+i + 2mbr+i + m, br+i + 2) ≡ (ar+i + 1, br+i ) (mod 2)

so at least one of the following pairs: (ar+1 , br+1 ), (ar+2 , br+2 ), (ar+3 , br+3 ), (ar+4 , br+4 ) has both even entries which is
impossible (as they are coprime). Hence there was at least one reduction in the steps r, r + 1, r + 2 and r + 3.
2 points.
Therefore for all n > 1:
1
max{bn+1 , bn+2 , bn+3 , bn+4 } 6 min{bn+1 , bn+2 , bn+3 , bn+4 } + 3 6 max{bn , bn+1 , bn+2 , bn+3 } + 3
2
so there exists C > 1 such that bn 6 6 for all n > C.
2 points.
Similarly for all n > C:
1
max{an+1 , an+2 , an+3 , an+4 } 6 min{an+1 , an+2 , an+3 , an+4 } + 3 · 6m 6 max{an , an+1 , an+2 , an+3 } + 18m
2
so there exists D > C such that an 6 36m for all n > D.
2 points.
We conclude that for all n > D there are finitely many pairs (6 · 36m = 216m) that (an , bn ) attains so it becomes
eventually periodic for any positive rational number u.
1 point.
Notes on marking:
• Case 1 and Case 2 are always worth 3 points and 7 points respectively.

8
9th European Mathematical Cup
12th December 2020 - 20th December 2020 MLADI NADARENI MATEMATIČARI

Marin Getaldic
Junior Category

Problems and Solutions


Problem 1. Let ABC be an acute-angled triangle. Let D and E be the midpoints of sides AB and AC
respectively. Let F be the point such that D is the midpoint of EF . Let Γ be the circumcircle of triangle F DB.
Let G be a point on the segment CD such that the midpoint of BG lies on Γ. Let H be the second intersection
of Γ and F C. Show that the quadrilateral BHGC is cyclic.
(Art Waeterschoot, Belgium)

Sketch for the First Solution.


J A A

F D E F D E
G G
H
Γ
I I
B M C B C
First Solution. Since D and E are midpoints, the diagonals AB and EF of the quadrilateral AF BE bisect each other,
so AF BE is a parallelogram. Hence BF k AE.
2 points.
Lemma. If I is the second intersection of Γ and BG, then F I k CD. (We will present two different proofs.)
First proof. Let J be the point such that BCAJ is a | Second proof. Let M be the midpoint of BC. As
parallelogram. Since BF k AE, we have that B, F , J are |
| |BC|
colinear. | |M C| = = |DE| = |DF |
2
2 points. ||
Since D is the midpoint of AB, C, D, J are collinear. | and F D k M C, then M CDF is a parallelog., so M F k CD.
| 2 points.
1 point. |
| As M and I are midpoints of BC and BG, then M I k CD.
As F and I are midpoints of BJ and BG, then F I k CD. |
| 2 points.
|
2 points. | Hence M , I and F are collinear and F I k CD.
|
| 1 point.
Now as we know that F I k CD, we have ∠BIF = ∠BGD.
1 point.
As BIHF is a cyclic quadrilateral, we have ∠BIF = ∠BHF .
1 point.
Hence
∠CHB = 180◦ − ∠BHF = 180◦ − ∠BGD = ∠CGB,
so BHGC is cyclic as desired.

1
1 point.

Sketch for the Second Solution.

J A

F D E
Γ1 G
H
Γ

B C
Second Solution. Since D and E are midpoints, the diagonals AB and EF of the quadrilateral AF BE bisect each
other, so AF BE is a parallelogram. Hence BF k AE.
2 points.
Let J be the point such that BCAJ is a parallelogram. Since BF k AE, we have that B, F , J are collinear.
2 points.
Since D is the midpoint of AB, C, D, J are collinear.
1 point.
Now let Γ1 be the circumcircle of triangle JAB. As F and D are midpoints of BJ and BA, and the midpoint of BG
lies on Γ, we can redefine G as the second intersection of Γ1 and CJ.
2 points.
As AJBG is a cyclic quadrilateral, we have ∠BGJ = ∠BAJ.
1 point.
As F D is parallel to JA, we have ∠BAJ = ∠BDF .
0 points.
As BHDF is a cyclic quadrilateral, we have ∠BDF = ∠BHF .
1 point.
Hence
∠CHB = 180◦ − ∠BHF = 180◦ − ∠BGD = ∠CGB,
so BHGC is cyclic as desired.
1 point.
Notes on marking:
• If a student has a partial solution with analytic methods, only points for proving facts that can be expressed in
geometric ways and lead to a complete solution can be awarded.

2
Problem 2. A positive integer k > 3 is called fibby if there exists a positive integer n and positive integers
d1 < d2 < . . . < dk with the following properties:
• dj+2 = dj+1 + dj for every j satisfying 1 6 j 6 k − 2,
• d1 , d2 , . . . , dk are divisors of n,
• any other divisor of n is either less than d1 or greater than dk .
Find all fibby numbers.
(Ivan Novak)

Solution. Note that (1, 2, 3, 5) is a sequence of length 4 such that all its elements are divisors of 30 and every other
divisor of 30 is either less than 1 or greater than 5. Also 3 = 1 + 2 and 5 = 2 + 3, which means 4 is fibby. Consequently,
3 is also fibby.
1 point.
Suppose there exist positive integers n, d1 < d2 < . . . < dk satisfying the problem’s conditions, with k > 5.
d
Suppose for the sake of contradiction that dj is even for some j > 3. Then 2j is also a divisor of n.
1 point.
However,
dj−1 + dj−2 dj
d1 6 dj−2 < = < dj−1 < dk .
2 2
d
This implies 2j is a divisor of n which is neither less than d1 nor greater than dk and is distinct from the numbers
d1 , d2 , . . . , dk , which is a contradiction.
6 points.
This implies that d3 and d4 are odd. However, this means that d5 = d3 + d4 is even, which is a contradiction. Therefore,
any number greater than 4 is not fibby.
2 points.
Notes on marking:
• The part of the proof where we prove all k ≥ 5 are not fibby is worth 9 points. It may happen that a contestant
proves a weaker statement in that direction.
– If a contestant proves that there exists C such that no k ≥ C is fibby, they should get 1 point.
– If the C above is explicit, they should get an additional 1 point.
– If in addition C = 6, they should get 1 point more.
The points above (at most 3 points) are not additive with the points for proving C = 5 in the official solution.
Thus, without using ideas that can solve the C = 5 case, the contestant should not get more than 1 point for the
construction, plus the points above if applicable.
• Many solutions proceed by cases on the parity of d1 and d2 . However, in all solutions that the Problem Selection
Committee were aware of, the only parity that matters is the parity of some dj , j ≥ 3.
Thus, stating and proving that some of d3 , d4 and d5 is even is worth 2 points, as in the official solution, and no
other points are awarded for parity concerns.

3
Problem 3. Two types of tiles, depicted on the figure below, are given.

Tile F: Tile Z:

Find all positive integers n such that an n × n board consisting of n2 unit squares can be covered without gaps
with these two types of tiles (rotations and reflections are allowed) so that no two tiles overlap and no part of
any tile covers an area outside the n × n board.
(Art Waeterschoot)

Solution. We claim such a tiling exists whenever n is divisible by 4 and greater than 4.
0 points.
We now prove the existence of a tiling in the case where n is divisible by 4 and greater than 4. The figure below shows
that if k ≥ 1, we can tile a (2k + 1) × 4-rectangle.

...

...

1 point.
By gluing a 3 × 4 rectangle to the above tiling, we get a tiling of any (4k + 4) × 4 rectangle, where k > 1. We can now
stack k + 1 such rectangles next to each other to obtain a (4k + 4) × (4k + 4) square, which proves the claim.
1 point.
Suppose we can tile a n × n square with the given tiles. Let a and b be the number of F -tiles and Z-tiles used in the
tiling, respectively. Then 6a + 4b = n2 , which implies n is even. This implies that a is also even. Let n = 2k, where k is
a positive integer.
0 points.
Consider the following colouring of the square: divide up the square into k smaller squares of size 2 × 2 and colour these
2

squares with a chessboard colouring (see the figure below). Every F -tile covers exactly 3 black unit squares and every
Z-tile covers an odd number of black unit squares.
1 point.
Because there are an even number of black squares, we obtain that a and b have equal parity. Since a is even, this implies
that b is even.

3 points.

4
Now colour all unit squares in an even row and odd column black (see the figure below). Now every F -tile covers an
even number of black unit squares and every Z-tile covers exactly one black unit square.
1 point.
Since the number of black squares is k , we obtain that b and k have equal parity. Since b is even, this implies k is even.
2 2

3 points.

Therefore, n is a multiple of 4.
0 points.
Furthermore, it is easily seen a 4 × 4-square cannot be tiled, as there are no positive integers (a, b) such that b is even
and 6a + 4b = 16.
0 points.
Notes on marking:
• Colouring a square in a certain way without drawing any relevant conclusions from the colouring is worth 0 points.
• Another possible solution is to consider a colouring with 4 colours by dividing up into small 2 × 2-squares. In fact
this is equivalent to our solution, because is the same as considering both colourings above at once. Considering
such a colouring and drawing the same conclusions is worth the same amount of points as considering the colourings
one by one.
• If a student doesn’t check the case when n = 4, they can score at most 9 points on the problem.
• The standard chessboard colouring gives only that a is even, which is considered trivial by the Jury, thus it is worth
0 points.
• If a student has another colouring which proves that 2|b, this is worth 4 points, as in the official solution.
• If a student has another colouring which proves that 4|a, this is worth 4 points, as in the official solution.

5
Problem 4. Let a, b, c be positive real numbers such that ab+bc+ac = a+b+c. Prove the following inequality:
r
a √
r r  
b c a b c b c a
a + + b + + c + 6 2 · min + + , + + .
c a b b c a a b c

(Dorlir Ahmeti)

First Solution. We can rewrite the inequality as


s    
X b a b c b c a
2 2 a+ 6 4 · min + + , + +
cyc
c b c a a b c

and distinguish two cases based on what the right hand side is.
 
a b c b c a a b c
Case 1. min + + , + + = + + .
b c a a b c b c a
Using AM-GM inequality, we have
s   X 
X b b a b c
2 2 a+ 6 2+a+ =6+a+b+c+ + + .
cyc
c cyc
c b c a

2 points.
Hence, it is enough to prove  
a b c a b c
6+a+b+c+ + + 64 + +
b c a b c a
 
a b c
⇐⇒ 6 + a + b + c 6 3 + + . (1)
b c a
Applying AM-GM inequality we obtain
  r
a b c 3 a b c
2 + + >2·3 · · =6 (2)
b c a b c a
and using Cauchy-Schwarz inequality together with the condition allows us to conclude:
 
a b c
(ab + bc + ac) + + > (a + b + c)2 = (a + b + c)(ab + bc + ac)
b c a
a b c
=⇒ + + > a + b + c. (3)
b c a
2 points.
Combining results (2) and (3) yields (1).
 
a b c b c a b c a
Case 2. min + + , + + = + + .
b c a a b c a b c
Using AM-GM inequality, we have
s   X s   X   
X b 2a b 2a b b c a
2 2 a+ = 2 c+ 6 +c+ =a+b+c+3 + + .
cyc
c cyc
c a cyc
c a a b c

4 points.
Hence, it is enough to prove    
b c a b c a
a+b+c+3 + + 64 + +
a b c a b c
b c a
⇐⇒ a + b + c 6 + + .
a b c
Using Cauchy-Schwarz inequality together with the condition allows us to conclude
 
b c a
(ab + bc + ac) + + > (a + b + c)2 = (a + b + c)(ab + bc + ac)
a b c
b c a
=⇒ + + >a+b+c
a b c
2 points.
which is exactly what we wanted to prove.

6
 
a b c b c a
Second Solution. Using the substitution m = min + + , + + , we can rewrite the inequality as
b c a a b c
r r r ! √
1 b c a m 2
a+ + b+ + c+ 6 .
3 c a b 3

Recognizing the left hand side as an arithmetic mean, we may apply the QM-AM inequality to obtain
r ! s
a + cb + b + ac + c + ab
r r
1 b c a
a+ + b+ + c+ 6 .
3 c a b 3

We’re now left with proving √ 2


b c a 
a+ c
+b+ a
+c+ b m 2
6
3 3
which can be written as:  
3  3 a b c
a+b+c + + + 6 m2 . (1)
2 2 b c a
1 point.
We distinguish two cases based on the value of m:
b c a
Case 1. m = + + .
a b c  
a b c 3
Expanding the right hand side of (1) and cancelling out+ + turns the inequality into
b c a 2

b2 c2 a2
 
3  1 a b c
a+b+c 6 2 + 2 + 2 + + + .
2 a b c 2 b c a

Multiplying both sides by 2(ab + bc + ac) and making use of the given condition on the left hand side gives us:
 2
c2 a2
  
b a b c
3(a + b + c)2 6 2 + + (ab + bc + ac) + + + (ab + bc + ac).
a2 b2 c2 b c a
 
a b c
We may now apply Cauchy-Schwarz inequality to obtain + + (ab + bc + ac) > (a + b + c)2
b c a
2 points.
and this leaves us with proving the following:

b2 c2 a2
 
(a + b + c) 62
2
+ 2 + 2 (ab + bc + ac). (2)
a b c

We now make use of a well known lemma:


x y z x+y+z
Lemma 1. For positive real numbers x, y, z one has + + > √ .
y z x 3 xyz

Proof. Applying AM-GM inequality we obtain:


s
x x y x2 y 3x
+ + >33 2 = √ ,
y y z y z 3 xyz

r
y y z 2
3 y z 3y
+ + >3 2
= √ ,
z z x z x 3 xyz
s
z z x z2x 3z
+ + >33 2 = √ .
x x y x y 3 xyz

Summing up the above three inequalities finishes the proof of the lemma.

3 points.

b 2
c a2 2
a +b +c 2 2 2 √
Applying the lemma we obtain and applying AM-GM we obtain ab+bc+ac > 3 a2 b2 c2 ,
3
+ + > √
a2 b2 c2 3 2 2 2
a b c
which together used in (2) mean that we only need to prove

(a + b + c)2 6 3(a2 + b2 + c2 )

and this is equivalent to (a − b)2 + (b − c)2 + (a − c)2 > 0.


1 point.

7
a b c
Case 2. m = + + .
b c a
Expanding the right hand side of (1) turns the inequality into

a2 b2 c2
   
3  3 a b c b c a
a+b+c + + + 6 2 + 2 + 2 +2 + + . (3)
2 2 b c a b c a a b c
   
a b c 3 a b c 3 b c a
Since m = + + , we have that + + 6 + + and using this in (3), we’re left with
b c a 2 b c a 2 a b c
proving:
 a2 b2 c2
 
3 1 b c a
a+b+c 6 2 + 2 + 2 + + + .
2 b c a 2 a b c
1 point.
The rest of the proof is now analogous to the steps we used to solve the first case, namely multiplying both
sides by 2(ab+ bc + ac) and making use of the given condition, applying Cauchy-Schwarz inequality to prove
a2 b2 c2 a2 + b2 + c2

b c a
+ + (ab + bc + ac) > (a + b + c)2 , making use of the lemma to prove 2 + 2 + 2 > √ 3 2 2 2
, making
a b c √ b c a a b c
use of AM-GM inequality to obtain ab + bc + ac > 3 a b c and finally proving (a + b + c) 6 3(a + b + c2 ).
3 2 2 2 2 2 2

2 points.

8
   
a b c b c a a b c b c a
Third Solution. Let m = min + + , + + and n = max + + , + + .
b c a a b c b c a a b c

0 points.
Using Cauchy-Schwarz inequality, we obtain the following:
v !2
r r r u r r r
b c a u ac + b ab + c bc + a
a+ + b+ + c+ = t + +
c a b c a b
s  
1 1 1
6 (ac + b + ab + c + bc + a) + +
c a b

2 points.
Now by using ab + bc + ac = a + b + c, we get:
s   s  
1 1 1 1 1 1
(ac + b + ab + c + bc + a) + + = 2 (a + b + c) + + .
c a b a b c

Therefore, we want to show s  


1 1 1
(a + b + c) + + 6 m. (1)
a b c
0 points.
We proceed by proving
m2 > 3 + 2n. (2)

Proof. Using AM-GM inequality, we get the following:

b2 c2 a2
+ + > 3.
a2 b2 c2
Applying this result, we see that
2
b2 c2 a2
    
b c a a b c a b c
+ + = 2 + 2 + 2 +2 + + >3+2 + + .
a b c a b c b c a b c a
 2  
a b c b c a
Analogously, we also get that + + >3+2 + + , which proves (2).
b c a a b c
2 points.

Now m 6 n along with (2) yields


s   s    
1 1 1 a b c b c a
(a + b + c) + + = 3+ + + + + +
a b c b c a a b c

= 3+m+n

6 3 + 2n

6 m2 = m

which is exactly (1).


6 points.
Notes on marking:
• In the third solution, considering only one case for m 6= n and completing the proof is worth 8 points. Full points
are awarded if the analogy to the other case is mentioned.
a b c
• Proving + + > 3 should not be awarded any points as this claim is considered trivial.
b c a
a b c
• In the first solution, proving + + > a + b + c (or the analogous version) and not applying this inequality in
b c a
both cases such that the application leads to the solution should only be awarded 2 points.

9
10th European Mathematical
Cup MLADI NADARENI MATEMATIČARI

11th December 2021 - 19th December 2021 Marin Getaldic


Junior Category

Problems and Solutions


Problem 1. We say that a quadruple of nonnegative real numbers (a, b, c, d) is balanced if

a + b + c + d = a2 + b2 + c2 + d2 .

Find all positive real numbers x such that

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

for every balanced quadruple (a, b, c, d).


(Ivan Novak)

First Solution. We’ll call any x ∈ h0, ∞i satisfying the problem’s condition great. Let (a, b, c, d) be a balanced quadru-
ple. Without loss of generality let a > b > c > d. We can rewrite the equation a2 + b2 + c2 + d2 = a + b + c + d
as  2  2  2  2
1 1 1 1
a− + b− + c− + d− = 1,
2 2 2 2
which implies (a − 21 )2 6 1, meaning that a 6 32 .
6 points.
If we take x > 23 , the values of x − a, x − b, x − c and x − d are all nonnegative. Thus, any x > 3
2
is great.
1 point.
If we take (a, b, c, d) = ( 32 , 21 , 12 , 12 ), then for any x ∈ h 12 , 23 i we have (x − a)(x − b)(x − c)(x − d) < 0. Thus, no x ∈ h 12 , 32 i
is great.
2 points.
If we take (a, b, c, d) = (1, 0, 0, 0), then for any x ∈ h0, 1i we have (x − a)(x − b)(x − c)(x − d) < 0. Thus, no x ∈ h0, 1i is
great.
1 point.
We conclude that a number x is great if and only if x > 23 .

Second Solution. Here we present another way to conclude that all x > 32 satisfy the condition. As in the first solution,
we call any x ∈ h0, ∞i which satisfies the problem’s condition great, and without loss of generality let (a, b, c, d) be a
balanced quadruple satisfying a > b > c > d. We notice that for all y ∈ R we have
 2
1 1
y− > 0 =⇒ y 2 > y − .
2 4

Applying this inequality to b, c and d separately and summing the inequalities we get the following:

2 1
b > b − 4

3
2
c > c − 14 =⇒ b2 + c2 + d2 > b + c + d − .

 2 1
4
d >d− 4

1
3 points.
Using the equality b + c + d = a + b + c + d − a transforms the inequality above into
2 2 2 2

 2
3 1
a > a2 − =⇒ 1 > a − ,
4 2

which implies a 6 23 ,
3 points.
meaning that all x > 3
2
are great.
1 point.
The rest of the solution is the same as the previous solution.

2
Problem 2. Let ABC be an acute-angled triangle such that |AB| < |AC|. Let X and Y be points on the
minor arc BC of the circumcircle of ABC such that |BX| = |XY | = |Y C|. Suppose that there exists a point
N on the segment AY such that |AB| = |AN | = |N C|. Prove that the line N C passes through the midpoint of
the segment AX.
(Ivan Novak)

B C

X Y

First Solution. Let the line CN intersect the circumcircle of ABC at T 6= C.


Since |BX| = |XY | = |Y C|, we have ^BAX = ^XAY = ^Y AC. Denote that angle by ϕ. Furthermore, since
|AN | = |N C|, we have ^N AC = ^N CA = ϕ, which means that |AT | = |CY |.
1 point.
Furthermore, from |AB| = |AN | and ^BAX = ^XAY it follows that AX is the perpendicular bisector of BN , so
|XN | = |BX|. Since |BX| = |CY | = |AT |, we have |XN | = |AT |.
3 points.
Now AT BX is an isosceles trapezoid because |AT | = |BX| and because it’s cyclic, which means that |AB| = |T X|,
which, combined with the fact that |AB| = |AN |, yields |T X| = |AN |.
3 points.
Therefore, from |T X| = |AN | and |XN | = |AT | we have that triangles AT X and AN X are congruent, as well as triangles
AT N and XT N . Therefore, ^AT X = ^AN X and ^T AN = ^T XN , which means that AT XN is a parallelogram.
Now, as N T and AX are diagonals of a parallelogram, N T passes through the midpoint of AX, which proves the claim.
3 points.

Second Solution. Let l be the line parallel to AB through C, and let P be the intersection of l and AY . Let α denote
the angle ∠BAC.

From |AN | = |N C| it follows that ∠ABX = ∠XAN = ∠N AC = ∠N CA = α


3
. Then it’s easy to see that ∠CN P =
∠N AC + ∠N CA = 2α 3
.
1 point.
Similarly, ∠N P C = ∠P AB = 2α
3
by definition of P .
2 points.

3
Thus, the triangle CN P is isosceles. Therefore, we conclude that |CN | = |P C|.
1 point.
However, |CN | = |AN | = |AB|, which implies |AB| = |P C|. Since AB and P C are parallel, this means that ABP C is
a parallelogram.
2 points.
This implies that AY is the A-median of triangle ABC. Since AX is isogonal to AY with respect to ^BAC, we conclude
that AX is the A-symmedian in the triangle ABC.
1 point.
From a well-known lemma, it now follows that CB is the C-symmedian in the triangle AXC. Note that

∠BCX = ∠BAX = ∠N AC = ∠N CA.

We now see that CN and CB are isogonal with respect to ∠ACX. Hence, CN is the C-median of triangle ACX and
we are done.
3 points.

Third Solution. Denote the angles of ABC by α, β and γ in a standard way, so that α = ∠BAC, β = ∠CBA and
γ = ∠ACB.

Note that ∠BCX = α3 and ∠W CA = ∠N CA = ∠N AC = α


3
since N CA is isosceles. Thus, ∠W CX = ∠BCA = γ.
Also, note that ∠W AC = 2α
3
.

|AN | |AC| |AB|


From sine law in triangle AN C, we have sin α
= sin 2α
. Using the fact that |AC|
= sin γ
sin β
and |AB| = |AN |, we get the
3 3
equality
2α α
sin γ sin = sin β sin . (1)
3 3
3 points.
Let W denote the intersection of AX and N C. From sine law in triangle AW C, we have

|AW | sin α3
= .
|W C| sin 2α3

1 point.
From sine law in W XC, we have
|W X| sin γ
= .
|W C| sin β
1 point.
From these two equalities we get
|AW | sin β sin α3
= ,
|W X| sin γ sin 2α
3
which equals 1 by (1). Thus, |AW | = |W X|.
5 points.
Notes on marking:
• In the second solution, proving that it suffices to prove that AY is the A-median of ABC (last 4 points) is worth
at most 2 points if a student doesn’t prove the parts before that.

4
Problem 3. Let ` be a positive integer. We say that a positive integer k is nice if k! + ` is a square of an
integer. Prove that for every positive integer n > `, the set {1, 2, . . . , n2 } contains at most n2 − n + ` nice
integers.
(Theo Lenoir)

Solution. We claim that for every k > ` + 1, at most one number among k2 − 1 and k2 is nice.
1 point.
Suppose for the sake of contradiction that both k − 1 and k are nice for some k > ` + 1.
2 2

Let u = (k2 − 1)! + ` and v = (k2 )! + `. Then


p p

v 2 − ` = (k2 )! = k2 (u2 − `),


which can be rearranged into
(ku)2 − v 2 = (k2 − 1)`. (1)
2 points.
Note that this implies ku > v and, furthermore,
p p
(ku)2 − v 2 = (ku − v)(ku + v) > ku + v > ku > k (k2 − 1)! = (k2 )!
Furthermore, we have the following bounds:
(k2 )! > k2 (k2 − 1)(k2 − 2) > k2 (k2 − 1)(k − 1)2 > (k2 − 1)2 (k − 1)2 > (k2 − 1)2 `2 ,
where we used the fact that k2 − 2 > (k − 1)2 = k2 − 2k + 1 for k > 2 and the assumption ` 6 k − 1. But this implies
that the left hand side in (1) is greater than the right hand side, which is a contradiction.
7 points.
Thus, there is at least one integer which is not good among {k2 − 1, k2 } for every k ∈ {` + 1, . . . , n}, which means there
are at least n − ` integers which aren’t good. Thus, the claim is proven.

Partial solution. This is a sketch of a partial solution using analytic number theory. This is not a solution to the
original problem, but it provides a better asymptotic bound on the number of nice integers. This solution is worth 5
points in total.
We first solve the case where ` is not a perfect square. Let p be a prime such that νp (`) is odd. Then for every k > 2p,
we have νp (k! + `) = νp (`), which is odd. Hence, every k > 2p is not nice, so there are at most 2` nice numbers and
2` 6 n2 − n + ` for ` > 2.
1 point.
Now consider the case when ` is a square. Then ` + 1 is not a perfect square. Note that (p − 2)! ≡ 1 (mod p) for every
prime number p, and thus (p − 2)! + ` ≡ ` + 1 (mod p). If we pick p to be a prime such that ` + 1 is not a quadratic
residue modulo p, we conclude that (p − 2)! + ` is not a square.
1 point.
Note that, by quadratic reciprocity, ` + 1 being a quadratic residue modulo p for p > ` + 1 depends only on the remainder
of p modulo 8(` + 1), and since ` + 1 is not a square, there must exist a class of residues modulo 8(` + 1) such that ` + 1
is not a quadratic residue modulo primes from that class.
1 point.
By Dirichlet’s theorem on arithmetic progressions, the number of primes less than some N which are from a given class
of residues modulo 8(` + 1) is asymptotically
1
π(N ),
ϕ(8(` + 1))
where π(N ) is the number of primes less than N and ϕ is the Euler’s Totient function. By Prime number theorem, π(N )
is asymptotically N/ log(N ). Hence, for large n, the number of integers less than n2 which are not nice is at least
n2
c· ,
log(n2 )
where c > 0 is some constant. For n large enough, this is obviously bigger than n − `.
2 points.
Notes on marking:
• In the second solution, if a contestant isn’t rigorous enough with the bounds in the end, they shouldn’t get more
than 1 point for the last part.
• Points from the second solution are not additive with the points from the first solution.

5
Problem 4. Let n be a positive integer. Morgane has coloured the integers 1, 2, . . . , n. Each of them is coloured
in exactly one colour. It turned out that for all positive integers a and b such that a < b and a + b 6 n, at least
two of the integers among a, b and a + b are of the same colour. Prove that there exists a colour that has been
used for at least 2n/5 integers.
(Vincent Juge)

First Solution. Throughout the solution, instead of colourings, we will consider partitions, and ’being coloured in the
same colour’ will be interpreted as ’being in the same element of a partition’, and the colours will be interpreted as the
blocks of partitions.
Let A denote the first colour that appears, i.e. the block that contains 1. Also, let B denote the block which contains
the first integer not in A.
We shall prove that either A or B has at least 2n/5 elements.
Let C be the union of all blocks other than A and B, and let b be the smallest element of B.

Lemma 1. For any x, if x ∈ C then x − 1 ∈ A and either x + 1 ∈ A or x = n.

Proof. We’ll actually prove a stronger claim: If x ∈ C, then x−1, x−2, . . . , x−(b−1) ∈ A and x+1, x+2, . . . , x+(b−1) ∈ A
if they’re not greater than n.
1 point.
For the sake of contradiction, consider the least x for which this claim doesn’t hold. But then x − j 6∈ C for any j < b
since otherwise x − j would be the least counterexample since (x − j) + j ∈ C. Since j ∈ A for j < b, we conclude that
x − j ∈ A for all j < b.
Now, for any i < b, we have b ∈ B and x + i − b ∈ A, which implies x + i ∈ A ∪ B. We also have x ∈ C and i ∈ A, which
implies x + i ∈ C ∪ A. Hence, x + i ∈ A. But then x + 1, . . . , x + b − 1 are all in A, a contradiction.
We conclude that the stronger claim holds for every x. Thus, the lemma is proven.
1 point.

Lemma 2. There do not exist x and y such that x ∈ B, x + 1 ∈ B, y ∈ C, y + 2 ∈ C.

Proof. Assume that there exist such x and y and assume that such x is minimal. Note that then x − 1 6∈ B and 1 ∈ A,
so x − 1 ∈ A.
We now distinguish two cases, depending on whether x > y or not.
• If x > y, consider the integer r = x − y = (x + 1) − (y + 1). Since x ∈ B and y ∈ C, r ∈ B ∪ C. Since x + 1 ∈ B
and y + 1 ∈ A, r ∈ B ∪ A. Hence, r ∈ B. Similarly, consider r + 1 = (x + 1) − y = x − (y − 1). Since x + 1 ∈ B
and y ∈ C, r + 1 ∈ B ∪ C. Since x ∈ B and y − 1 ∈ A, r + 1 ∈ A ∪ B. Hence, r + 1 ∈ B.
• If x < y, consider the integer r = (y + 1) − x = (y + 2) − (x + 1). Since y + 1 ∈ A and x ∈ B, r ∈ A ∪ B. Since
y + 2 ∈ C and x + 1 ∈ B, e r ∈ C ∪ B. We conclude that r ∈ B.
However, y ∈ C and y + 1 − x ∈ B implies that the integer x − 1 = y − (y + 1 − x) is either in B or C, but we’ve
already proven that x − 1 ∈ A. Thus, we’ve reached a contradiction.
3 points.
However, since r = x − y < x, this contradicts the minimality of x and we’ve reached a contradiction again.
3 points.

Now we’ve proved that there either doesn’t exist x ∈ B such that x + 1 ∈ B, or that there doesn’t exist y ∈ C such that
y + 2 ∈ C.
In the first case, for every x ∈ B, we have x − 1 6∈ B and 1 ∈ A. Hence, x − 1 ∈ A. But then |A| > n/2, since x 7→ x − 1
is an injective function from B ∪ C to A.
1 point.
In the second case, for every y ∈ C, both y + 1 and y − 1 are either in A or greater than n, while y + 2 and y − 2 are not
in A. Thus, y 7→ y − 1 and y 7→ y + 1 are injective functions from C to A and A ∪ {n + 1} respectively, and their images
are disjoint. Additionally noting that 1 ∈ A and 1 6= y − 1, y + 1 for any y ∈ C, we conclude that |C| 6 |A| 2
. But then
n = |A| + |B| + |C| 6 3|A|+2|B|
2
, so either |A| or |B| must be greater than or equal to 2n
5
.
1 point.

6
Second Solution. We give an alternative proof of Lemma 1.
Assume for the sake of contradiction that there are two consecutive integers x and x + 1 such that both are in C. Let x
be the smallest integer with that property. Consider the integer (x + 1) − b = x − (b − 1). Since x + 1 ∈ C and b ∈ B, we
have either x + 1 − b ∈ C or x + 1 − b ∈ B. Since x ∈ C and b − 1 ∈ A, we have either x + 1 − b ∈ C or x + 1 − b ∈ A.
We conclude that x + 1 − b ∈ C.
Furthermore, considering x − b = (x + 1 − b) − 1, we have x ∈ C, b ∈ B, x + 1 − b ∈ C and 1 ∈ A. We conclude that
x − b ∈ C, but then x − b and x + 1 − b are both in C, contradicting the minimality of x. We conclude that there are no
consecutive integers in C.
1 point.
Now, for all x ∈ C, the integers x − 1 and x + 1 must either be equal to n + 1 or belong to A, since 1 ∈ A, x − 1 6∈ C
and x + 1 6∈ C.
1 point.

We also give a slightly different proof of Lemma 2.

Proof. We first prove that if x and x + 1 are both in B and are greater than y ∈ C, then x − y + 1 and x − y are both
in B. Note that y + 1 ∈ A and y − 1 ∈ A by Lemma 1.
Note that x − y = (x + 1) − (y + 1), so x − y ∈ B ∪ C and x − y ∈ B ∪ A, which implies x − y ∈ B. Similarly, considering
(x + 1) − y = x − (y − 1), we can conclude that x − y + 1 ∈ B.
2 points.
To now prove Lemma 2, it suffices to consider the case x < y, where x and y are from the statement of the lemma.
1 point.
We deal with that case in the same way as in the first solution.
3 points.

The remainder of the solution is the same.


2 points.
Notes on marking:
• Lemma 2 is worth 6 points. If a contestant states Lemma 2 and they don’t prove any of its two subcases, they
should get 1 point for Lemma 2.
• In the second solution, proving the first part of Lemma 2 is worth less than the case x > y in the first solution,
because one can prove this part without stating Lemma 2. Proving this part in the context of Lemma 2 is worth
3 points, and without the context of Lemma 2 it’s worth 2 points.

7
MLADI NADARENI MATEMATIČARI

Marin Getaldic

1st BALKAN STUDENT MATHEMATICAL COMPETITION


1. Matematičko natjecanje učenika Balkana
November 2008.

3rd and 4th grade


Solutions

Problem 1. Find all functions f : R → R such that for every two real numbers x and y,

f (f (x) + xy) = f (x) · f (y + 1) .

(Marko Radovanović)

Solution. Obvious solutions are f (x) ≡ 0, ∀x ∈ R; f (x) ≡ 1, ∀x ∈ R and f (x) ≡ x, ∀x ∈ R.


(1 point)
Let x := 0, y := t − 1. Then, f (f (0)) = f (0) f (t) , ∀t ∈ R. (1 point)
Let us consider two cases.
f (f (0))
1◦ f (0) ̸= 0. Then, for each t ∈ R , it is true that f (t) = = k. (1 point)
f (0)
By plugging t = 0, we reach f (0)2 = f (f (0)) or k 2 = k. If k = 0, we get f (0) = 0, which gives
a contradiction. So, k = 1 must hold. In that case, we reach this solution: f (x) ≡ 1, ∀x ∈ R.
(2 points)
2◦ f (0) = 0. Now we shall consider following two cases:

• f (x) = 0 if and only if x = 0. Then, if we plug y := −1, we reach

f (f (x) − x) = f (x) f (0) = 0 =⇒ f (x) − x = 0 =⇒ f (x) = x.

So, in this case we reach this solution: f (x) ≡ x, ∀x ∈ R. (2 points)


t
• There exists a real number x0 = ̸ 0 such that f (x0 ) = 0. Then, let x := x0 and y :=
x0
for some real number t. Then,
( ) ( )
t t
f f (x0 ) + x0 · = f (x0 ) f + 1 = 0 =⇒ f (t) = 0.
x0 x0

Finally, we reach the solution f (x) ≡ 0, ∀x ∈ R. (2 points)

We can see that functions mentioned in the beginning (and only those functions) satisfy the condi-
tions of the problem. (1 point)


Problem 2. Paralampius the Gnu stands on number 1 on number line. He wants to come to a
natural number k by a sequence of consecutive jumps. Let us denote the number of ways on which
Paralampius can come from number 1 to number k with f (k) (f : N → N0 ). Specially, f (1) = 0. A
way is a sequence of numbers (with order) which Paralampius has visited on his travel from number
1 to number k. Paralampius can, from number b, jump to number

1
• 2b (always),

• 3b (always),
( )
b4
• b if
2
∈ N, where k is a natural number on which he wants to come to in the end .
6k
Prove that, for every natural number n, there exists a natural number m0 such that for every natural
number m > m0 ,
f (m) < 2α1 +α2 +...+αi −n ,
where m = pα1 1 · pα2 2 · . . . · pαi i (p1 < p2 < . . . < pi are prime divisors of number m and i, α1 , α2 , . . . , αi
are natural numbers) is a prime factorization of natural number m. It is known that this factoriza-
tion is unique for every natural number m > 1.
(Melkior Ornik, Ivan Krijan)

Solution. Let’s notice that Paralampius can only reach numbers of the form 2a · 3b (a, b ∈ N0 ).
That is because neither one of the allowed jumps “introduces” a prime factor different than 2 or
3 (first jump “introduces” 2, second one “introduces” 3, while the last one doubles the number of
each of already existing prime numbers). Therefore, for each natural number m divisible by a prime
number p > 3, it holds that f (m) = 0 < 2α1 +α2 +...+αi −n , ∀n ∈ N. Specially, the same claim holds for
f (1). Let us continue by observing only numbers of the form 2a · 3b (a, b ∈ N0 ), where at least one
of numbers a and b differs from 0. Let’s introduce the following symbols.

1. (k, l) , k, l ∈ N0 , k 2 + l2 ≥ 1 will denote number 2k · 3l . This k can be any nonnegative


integer – it has no connection to k from the text of the problem.
( )
2. g : N0 × N0 → N0 , g (k, l) = f 2k · 3l , k 2 + l2 ≥ 1.

Now we can write that Paralampius can jump from pair (k, l) to pair

• (k + 1, l) (always),

• (k, l + 1) (always),

• (2k, 2l) (if 4k ≥ a + 1 and 4l ≥ b + 1 with pair (a, b) being the goal).

Let pair (a, b) in further text always mark the number which is Paralampius’ goal. Let’s show that
Paralampius can jump according to the third rule once, at most. Let’s assume the opposite, that is,
that Paralampius has jump from pair (k, l) to pair (2k, 2l) and after a couple of jumps, again from
pair (k1 , l1 ) to pair (2k1 , 2l1 ). It is obvious that none of these rules decrease any element in a pair.
On the contrary, every rule increases at leas one number in a pair, while the third rule increases
a+1
(doubles) both numbers. So, it is true that k1 ≥ 2k ≥ , so 2k1 ≥ a + 1 > a, and, as it has been
2
mentioned previously, none of the rules will decrease numbers in a pair, so Paralampius will never
be able to reach pair (a, b). Contradiction! So, Paralampius will jump according to the third rule
at mose once. If he never jumps according to the third rule, he can jump from (0, 0) to (a, b) in
( )
a+b
b

ways. Further, if Paralampius jumps once according to the third rule, for instance from pair (k, l) to
pair (2k, 2l), then it must hold for k and l that 4k ≥ a + 1 and 4l ≥ b + 1 (condition of the problem),
but also (to keep Paralampius from “overjumping” the goal, because, as we have shown, he can not
return) 2k ≤ a and 2l ≤ b. So, Paralampius can come from (0, 0) to (a, b), if he jumps once from
(k, l) to (2k, 2l) in ( ) ( )
k+l a + b − 2k − 2l
·
l b − 2l

2
ways. According to that, Paralampius can come from (0, 0) to (a, b) in, altogether,
( ) ∑ ∑ (k + l) (a + b − 2k − 2l)
a+b
g (a, b) = + ·
b l b − 2l
a+1
4
≤k≤ 2
a b+1 b
4
≤l≤ 2

ways. (2 points)
Now our problem boils down to showing that for each natural
( number n there exists
) a natural
number m0 such that for every natural number 2 · 3 > m0 a, b ∈ N0 , a + b ≥ 1 , it holds that
a b 2 2

g (a, b) < 2a+b−n .

Let us now show three lemmas.


( )
x
Lemma 1. For all natural numbers x and y, ≤ 2x−1 holds.
y
( ) ( )
x x
Proof. We know that ≤ ⌊ x ⌋ , so it suffices to prove that, for every natural number x,
( ) y 2 ( )
x 1
⌊ x ⌋ ≤ 2 . We will show this using mathematical induction. For x = 1,
x−1
≤ 21−1 . Let’s
2 ( ) 0
x
assume that for some x ∈ N, ⌊ x ⌋ ≤ 2x−1 . Then,
2
( ) ( ) ( )
x+1 x x
⌊ x+1 ⌋ = ⌊ x+1 ⌋ + ⌊ x−1 ⌋ ≤ 2x−1 + 2x−1 = 2x .
2 2 2

We shall notice that equality is only possible if x = 1 or x = 2. This proves our first lemma.
(1 point)


Lemma 2. There exists a natural number c1 such that, if a > c1 or b > c1 (then a + b > c1 ), then
a+b
(a + 3) (b + 3) < 2 4 .

Proof. If we fix a + b, then the left side reaches its maximum for a = b. Let then be M = a + b + 6.
Then, √
M = (a + 3) + (b + 3) ≥ [using AM-GM inequality] ≥ 2 (a + b) (b + 3).
So, it suffices to show that there exists a natural number c1 such that for every natural number
x > c1 it holds that
x
(x + 3)2 < 2 2 ⇐⇒ (x + 3)4 < 2x .
It is obvious that the left side of this inequality “grows more slowly” than the right side, so it is
enough to show that there exists at least one such natural number x. We can directly see that, for
example, x = 20 has this property. (1 point)


Lemma 3. For every natural number n there exists natural number c such that, if a > c or b > c
(then a + b > c), then ( )
a+b
< 2a+b−n−1 .
b

Proof. We know that ( ) ( )


a+b a+b
≤ ⌊ a+b
⌋ ,
b 2

3
so, in general, ( ) ( ) ⌈ ⌉
a+b 2x a+b
≤ , where x = .
b x 2
Now, it is enough to show that for each natural number n there exists natural number c such that,
if x > c, then ( )
2x
< 22x−n−1 .
x
( ) ( )
2x + 2 2x
Further, let us notice that <4· ⇐⇒ 2 > 0, and 22x+2−n−1 = 4 · 22x−n−1 . So, it
x+1 x ( )
2c
inductively follows that, if we show that there exists c ∈ N such that < 22c−n−1 , then, for
( ) c
2x
every natural number x > c, < 22x−n−1 will hold. Let us now prove that such c ∈ N exists.
x
( )
2c
< 22c−n−1
c
(2c)!
⇐⇒ < 22c−n−1
c! · c!
(2c) (2c − 1) (2c − 2) · . . . · 2 · 1
⇐⇒ < 22c−n−1
c2 (c − 1)2 (c − 2)2 · . . . · 22 · 12
2c · c (c − 1) (c − 2) · . . . · 2 · 1 · (2c − 1) (2c − 3) · . . . · 3 · 1
⇐⇒ < 22c−n−1
c (c − 1) · . . . · 2 · 1
2 2 2 2

(2c − 1) (2c − 3) · . . . · 3 · 1
⇐⇒ < 2c−n−1
c (c − 1) · . . . · 2 · 1
(2c − 1) (2c − 3) · . . . · 3 · 1
⇐⇒ < 2−n−1
2c · c (c − 1) · . . . · 2 · 1
(2c) (2c − 2) (2c − 4) · . . . · 4 · 2
⇐⇒ > 2n+1
(2c − 1) (2c − 3) · . . . · 3 · 1
( )( ) ( )
1 1 1
⇐⇒ 1+ 1+ · ... · 1 + > 2n+1 .
2c − 1 2c − 3 1
( )( ) ( )
1 1 1 1 1 1
Obviously 1 + 1+ · ... · 1 + ≥ + + . . . + for every natu-
2c − 1 2c − 3 1 2c − 1 2c − 3 1
ral number c, so it suffices to show that there exists a natural number c such that
1 1 1
+ + . . . + > 2n+1 .
2c − 1 2c − 3 1
1 1 1 1 1 1
Since + + ... + ≥ + + . . . + , that is,
2c − 1 2c − 3 1 2c 2c − 2 2
1
1 1 1 + 1 + . . . + 11
+ + . . . + ≥ c c−1 ,
2c − 1 2c − 3 1 2
it is enough for us to show that there exists a natural number c such that
1 1 1
+ + . . . + > 2n+2 .
c c−1 1
1 1 1 1
Let’s notice that for every nonnegative integer t, t + t + . . . + t+1 ≥ . This follows from
2 +1 2 +2 2 2
the fact that, on the left side of the inequality, we have 2t summands, each one of which is larger or
1
equal than t+1 . Now it directly follows that
2
1 1 1 1
+ + + . . . + > 2n+2 .
2 2n+3
2 2n+3
−1 2 2n+3
−2 1

4
With this, we have finally proven this lemma. (3 points)

Now, we wish to show that for every natural number n there exists a natural number t such that, if
a > t or b > t, then
∑ ∑ (k + l) (a + b − 2k − 2l)
· < 2a+b−n−1 .
l b − 2l
a+1 a b+1
4
b≤k≤ 2 4
≤l≤ 2

Further, let’s fix n. Let t be such natural number that t > c1 and t > c, where c1 and c are numbers
of Lemma 2, that is, from Lenma 3. Let us observe numbers defined by pair (a, b), where a + 1 > 4t
or b + 1 > 4t. Then, if Paralampius jumps on his travel from pair (k, l) to pair (2k, 2l), for numbers
a+1 b+1
k and l it holds that k + l > t because k ≥ and l ≥ , so k > t or l > t. So, because of
( ) 4 4
k+l
Lemma 3, < 2k+l−n−1 . According to Lemma 1, we have that for all x, y ∈ N, it holds that
( ) l
x
≤ 2x−1 , so, because of that,
y
∑ ∑ (k + l) (a + b − 2k − 2l) ∑ ∑
· < 2k+l−n−1 · 2a+b−2k−2l−1 .
l b − 2l
a+1
4
≤k≤ 2
a b+1
4
≤l≤ 2
b a+1 a b+1 b
4
≤k≤ 2 4
≤l≤ 2

a b a
Since k > and l > , we can see that it suffices to show that (we set k to be exactly equal to
4 4 4
and the same for l) ∑ ∑ 3 3
2 4 a+ 4 b−n−2 < 2a+b−n−1 .
a+1
4
≤k≤ a2 b+1
4
≤l≤ 2b

a a+1 a+3
It is obvious that there exists at most − +1= possible numbers k. The same is true
2 4 4
for numbers l. So, it is enough for us to show
3 3
(a + 3) (b + 3) · 2 4 a+ 4 b−n−5 < 2a+b−n .

Since a > 4t − 1 or b > 4t − 1, then a > t or b > t and, since t > c1 , where c1 is the number from
Lemma 2, it is obvious that a > c1 or b > c1 , so, because of Lemma 2, wanted inequality directly
follows. With this we have shown that for every natural number n, there exists a natural number t
such that, if a > t or b > t, then
∑ ∑ (k + l) (a + b − 2k − 2l)
· < 2a+b−n−1 .
l b − 2l
a+1 a b+1
4
≤k≤ 2
b
4
≤l≤ 2

In our case, this natural number t is such that t > 4c1 and t > 4c, where c1 and c are numbers from
Lemma 2, that is, from Lemma 3. (2 points)
It is obvious that, for such natural number t, because of Lemma 3, the following holds:
( )
a+b
< 2a+b−n−1 .
b
By adding the last two inequalities (we have shown that they hold), we reach that

g (a, b) < 2a+b−n ,

what we have wanted to show. That is, we have shown that for every natural
( number n there exists
)
a natural number m0 such that for every natural number 2 · 3 > m0 a, b ∈ N0 , a2 + b2 ≥ 1 , it
a b

holds that
g (a, b) < 2a+b−n .

5
(1 point)


Problem 3. A convex n-gon (n ∈ N, n > 2) is given in the plane. Its area is less than 1. For each
point X of this plane, we shall denote with F (X) the area of the convex hull of point X and a given
n-gon (the area of the minimal convex polygon which includes both the point X and a given n-gon).
Prove that the set of points for which F (X) = 1 is a convex polygon with 2n sides or less.

Solution. Let S be the set of all points T of the given plane such that F (T ) = 1. If is obvious that
all these points T are outside the given n-gon. Area of the given n-gon is less than 1, and when
point T belongs to the interior (or the edge) of the given n-gon, it itself becomes our wanted convex
hull. (1 point)
Point T is outside the n-gon if there exists a line which passes through T such that it has no common
points with the n-gon. Let’s observe the following image.

Let A0 , A1 , . . . , An−1 be vertices of the given n-gon. Also, let Aj = A(j mod n) (j ∈ Z), where
(j mod n) = x is a number from the set {0, 1, . . . , n − 1} such that j ≡ x (mod n). We say that a
diagonal of the given n-gon is visible if the entire n-gon is inside the angle with its vertex in T whose
chord is that diagonal. For example, (observe image) diagonal Ai Ak (i, k ∈ Z), with respect to X,
is visible. (1 point)
Ai Ak is a visible diagonal. Inside the triangle Ai XAk there are vertices Ai+1 , Ai+2 , . . . , Ak−1 and
outside of it all the remaining vertices of the given n-gon. So, the area F (X) is equal to the sum of
areas of the triangle Ai XAk and polygon Ak Ak+1 . . . Ai−1 Ai . (1 point)
Let l be a line through X parallel to the line Ai Ak and let A and B be the intersections of l and
lines Ai−1 Ai i Ak+1 Ak , respectively. (1 point)
If F (X) = 1, then X is an element of S. Then, it is obvious that all points T that are on line l
and for which Ai Ak is a visible diagonal are also elements of set S. Furthermore, diagonal Ai Ak is
no longer visible to the point T as T moves on l and becomes colinear with some side of the given
n-gon. So, all points T of line l that are possibly in S (which they are if X is in S) are on the
segment AB. (2 points)
Now we can easily deduce the following conclusion: By observing all points T ∈ S we can see that,
as they “go around” the given n-gon, with them also rotate their respective visible diagonals. Every
point of the given n-gon can, therefore, become one endpoint of some of the visible diagonals (vis-
ible diagonals interesting to us – those who are visible with respect to some point from the set S)

6
exactly once, and only exactly once stop being the endpoint. Because of that, there can be at most
2n interesting visible diagonals. It is clear that we will get a convex polygon – as point T rotates
around the given n-gon, segments AB rotate with her and one always “connects” itself to the other
one.
(5 points)


Problem 4. Prove that for every natural number k, there exist infinitely many natural numbers n
such that
n − d (nr )
∈ Z, for every r ∈ {1, 2, . . . , k} .
r
Here, d (x) denotes the number of natural divisors of a natural number x, including 1 and x itself.
(Melkior Ornik)

Solution. Let us first prove the following lemma.


Lemma 1. d (nr ) ≡ 1 (mod r).
Proof. Let n = pα1 1 · pα2 2 · . . . · pαi i , where p1 < p2 < . . . < pi are all prime divisors of the natural
number n and i, α1 , α2 , . . . , αi are natural numbers, be the prime factorization of n. Then,

nr = prα
1
1
· prα
2
2
· . . . · prα
i ,
i

that is, d (nr ) = (rα1 + 1) · (rα2 + 1) · . . . · (rαi + 1). (1 point)


Clearly, for every j ∈ {1, 2, . . . , i}, the following holds: rαj + 1 ≡ 1 (mod r), so

d (nr ) ≡ (rα1 + 1) · (rα2 + 1) · . . . · (rαi + 1) ≡ 1i ≡ 1 (mod r).

This has proven the lemma. (1 point)



Now, our problem (because of Lemma 1) boils down to showing that for every natural number k
there exists infinitely many natural numbers n such that

r | n − 1, ∀r ∈ {1, 2, . . . , k} .

Let n = m · k! + 1, m being a natural number. (1 point)


Now it is obvious that n ≡ m · k! + 1 ≡ [because of r | k!] ≡ 1 (mod r) for every r ∈ {1, 2, . . . , k}.
Because of that, for this choice of number n we have r | n − 1 for every r ∈ {1, 2, . . . , k}. (1 point)
As m can be any natural number, for every natural number k there exists infinitely many natural
numbers n such that r | n − 1 for every r ∈ {1, 2, . . . , k}. This is, because of Lemma 1, equivalent
to the problem claim. (6 points)


7
1st European Mathematical Cup
24th November 2012–1st December 2012 MLADI NADARENI MATEMATIČARI

Marin Getaldic
Senior Category

Problems and solutions


Problem 1. Find all positive integers a, b, n and prime numbers p that satisfy

a2013 + b2013 = pn .

(Matija Bucić)

a
First solution. Let’s denote d = D(a, b), x = d
,y = db . With this we get

d2013 (a2013 + b2013 ) = pn .

So d must be a power of p, so let d = pk , k ∈ N0 . We can divide the equality by p2013k . Now let’s denote m =
n − 2013k, A = x671 , B = y 671 . So we get
A3 + B 3 = pm ,
and after factorisation
(A + B)(A2 − AB + B 2 ) = pm .
(From the definition, A and B are coprime.)
Let’s observe the case when some factor is 1: A + B = 1 is impossible as both A and B are positive integers. And
A2 − AB + B 2 = 1 ⇔ (A − B)2 + AB = 1 ⇔ A = B = 1, so we get a solution a = b = 2k , n = 2013k + 1, p = 2, ∀k ∈ N0 .
If both factors are larger than 1 we have

p|A+B
p | A − AB + B 2 = (A + B)2 − 3AB
2

=⇒ p | 3AB.

If p | AB, in accordance with p | A + B we get p | A and p | B, which is in contradiction with A and B being coprime.
So, p | 3 =⇒ p = 3.
Now we are left with 2 cases:
• First case: A2 −AB +B 2 = 3 ⇔ (A−B)2 +AB = 3 – so the only possible solutions are A = 2, B = 1 i A = 1, B = 2,
but this turns out not to be a solution as 2 = x671 does not have a solution in positive integers.
• Second case: 32 | A2 − AB + B 2 – then we have:

3 | A + B =⇒ 32 | (A + B)2
32 | A2 − AB + B 2 = (A + B)2 − 3AB
=⇒ 32 | 3AB
=⇒ 3 | AB.

And as we have already commented the case p - AB =⇒ doesn’t have any solutions.
So all the solutions are given by
a = b = 2k , n = 2013k + 1, p = 2, ∀k ∈ N0 .

1
Second solution. As in the first solution, we take the highest common factor of a and b (which must be of the form
pk ). Factorising the given equality we get

(x + y)(x2012 − x2011 y + x2010 y 2 − · · · − xy 2011 + y 2012 ) = pm .

(We’re using the same notation as in the first solution.) Denote the right hand side factor by A. As x and y are natural
numbers, we have x + y > 1 =⇒ p | x + y. So p - x and p - y (as x and y are coprime). Now by applying LTE (Lifting
the Exponent Lemma):
νp (x2013 + y 2013 ) = νp (x + y) + νp (2013)
Now we know νp (2013) = 0 fo all primes p except 3, 11, 61, and in the remaining cases νp (2013) = 1. Note A = 1 and
(x, y) = (1, 1) and A > 61 for (x, y) 6= (1, 1). This inequality holds because for (x, y) 6= (1, 1) (WLOG x > y), we can
write A as
x2011 (x − y) + x2009 y 2 (x − y) + · · · + xy 2010 (x − y) + y 2012 ,
which is greater than 61 in cases x > y and y 6= 1.
• If νp (2013) = 1 =⇒ νp (A) = 1 =⇒ A ∈ {3, 11, 61} which is clearly impossible.
• If νp (2013) = 0 =⇒ νp (A) = 0 =⇒ A = 1 =⇒ (x, y) = (1, 1), so we get a solution

a = b = 2k , n = 2013k + 1, p = 2, ∀k ∈ N0 .

Problem 2. Let ABC be an acute triangle with orthocenter H. Segments AH and CH intersect segments
BC and AB in points A1 and C1 respectively. The segments BH and A1 C1 meet at point D. Let P be the
midpoint of the segment BH. Let D0 be the reflection of the point D in AC. Prove that quadrilateral AP CD0
is cyclic.
(Matko Ljulj)

First solution. We shall prove that D is the orthocenter of triangle AP C. From that the problem statement follows as

∠AD0 C = ∠ADC = 180◦ − ∠DAC − ∠DCA = (90◦ − ∠DAC) + (90◦ − ∠DCA) =


= ∠P CA + ∠P AC = 180◦ − ∠AP C.

We can note that quadrilateral BA1 HC1 is cyclic. Lines BA1 and C1 H intersect in C, lines BC1 and A1 H intersect in
A, lines BH and C1 A1 intersect in D, and point P is the circumcenter of BA1 HC1 . So by the corollary of the Brocard’s
theorem point D is indeed the orthocenter of triangle AP C as desired.

Second solution. Denote by B1 the orthogonal projection of B on AC. By cyclic quadrilaterals B1 C1 P A1 (Euler’s
circle), HA1 CB1 , AC1 A1 C and C1 HB1 A we get the following equations:

∠A1 P B1 = ∠DC1 B1
∠A1 B1 P = ∠A1 CC1 = ∠A1 AC1 = ∠DB1 C1 .

From these equalities we get that triangles B1 P A1 and B1 C1 D are similar, which implies
|B1 D| |B1 C1 |
= =⇒ |B1 A1 | · |B1 C1 | = |B1 D| · |B1 P |.
|B1 A1 | |B1 P |
Analogously, using cyclic quadrilateral ABA1 B1 and C1 BCB1 we get the following angle equations:

∠B1 AC1 = 180◦ − ∠B1 A1 B = ∠B1 A1 C


∠AB1 C1 = 180◦ − ∠C1 B1 C = ∠CBA = 180◦ − ∠A1 B1 A = ∠A1 B1 C.

From these equalities we get that triangles B1 AC1 and B1 AC are similar so
|B1 C1 | |AB1 |
= =⇒ |B1 A1 | · |B1 C1 | = |B1 A| · |B1 C|.
|B1 C| |A1 B1 |

Thus we get |B1 D0 | · |B1 P | = |B1 D| · |B1 P | = |B1 A1 | · |B1 C1 | = |B1 A| · |B1 C| so by the reverse of the power of the point
theorem the quadrilateral AP CD0 is cyclic as desired.

2
Problem 3. Prove that the following inequality holds for all positive real numbers a, b, c, d, e and f :
r s
3 abc def p
+ 3 < 3 (a + b + d)(c + e + f ).
a+b+d c+e+f

(Dimitar Trenevski)

Solution. The inequality is equivalent to


s s
3 abc 3 def
+ < 1.
(a + b + d)2 (c + e + f ) (a + b + d)(c + e + f )2

By AM-GM inequality we have


s  
3 abc 1 a b c
6 + + ,
(a + b + d)2 (c + e + f ) 3 a+b+d a+b+d c+e+f
s  
3 def 1 d e f
6 + + .
(a + b + d)(c + e + f )2 3 a+b+d c+e+f c+e+f
Adding the inequalities we get
s s  
3 abc 3 def 1 a+b+d c+e+f 2
+ 6 + = < 1,
(a + b + d)2 (c + e + f ) (a + b + d)(c + e + f )2 3 a+b+d c+e+f 3

as desired.

Problem 4. Olja writes down n positive integers a1 , a2 , . . . , an smaller than pn where pn denotes the n-th
prime number. Oleg can choose two (not necessarily different) numbers x and y and replace one of them with
their product xy. If there are two equal numbers Oleg wins. Can Oleg guarantee a win?
(Matko Ljulj)

Solution. For n = 1, Oleg won’t be able to write 2 equal numbers on the board as there will be only one number written
on the board. We shall now consider the case n > 2.
Let’s note that as all the numbers are strictly smaller than pn we have all their prime factors are from the set
{p1 , p2 , . . . , pn−1 }, so there are at most n − 1 of them in total. We will represent each number a1 , a2 , . . . , an by the
α α αi,(n−1)
ordered (n − 1)-tuple of non-negative integers in the following way if ai = p1 i,1 · p2 i,2 · . . . · pn−1 , then we assign
vi = (αi,1 , αi,2 , . . . , αi,(n−1) ), for all i ∈ {1, 2, . . . , n}.
Let’s consider the following system of equations:

α1,1 x1 + α2,1 x2 + · · · + αn,1 xn = 0


α1,2 x1 + α2,2 x2 + · · · + αn,2 xn = 0
···
α1,(n−1) x1 + α2,(n−1) x2 + · · · + αn,(n−1) xn = 0

There is a trivial solution x1 = x2 = · · · = xn = 0. But as this system has less equalities than variables we can deduce
that it has infinitely many solutions in the set of rational numbers (as all the coefficients are rational). Let (y1 , y2 , . . . , yn )
be a not trivial solution (so the solution in which not all of yi equal 0). Then we can rewrite the initial system using
a1 , a2 , . . . , an :
n n n−1 n−1
Y Y α yi α yi α yi Y α y1 +α2,j y2 +···+αn,j yn
Y
ayi i = p1 i,1 · p2 i,2 i,(n−1)
· . . . · pn−1 = pj 1,j = p0j = 1
i=1 i=1 j=1 j=1

n
Y
=⇒ ayi i = 1.
i=1

Considering the numbers y1 , y2 , . . . , yn as rational numbers in which the respective nominator and denominator are
coprime, Denote by L the lowest common multiplier of their denominators. Taking the L-th power of the upper equality
we get integer exponents in the upper equation (which don’t have a common factor). Furthermore, WLOG we can
assume that a1 , a2 , . . . , ak are those elements ai whose exponents are negative and numbers ak+1 , ak+2 , . . . , ak+l are

3
those elements with postivie exponent (for some k, l ∈ N, k + l 6 n). Then, when we shift all ai -s with negative exponent
to the opposite side of the equation and when those with zero exponent get ruled out we get that the following equality

k
Y l
Y
ari i = ari i (1)
i=1 i=k+1

holds for some positive integers r1 , r2 , . . . , rk+l for which D(r1 , r2 , . . . , rk+l ) = 1 and for some numbers a1 , a2 , . . . , ak+l .
(We can note that there is at least one number ai on both sides of the equality otherwise we have only ones on the
board.)
We shall prove that there is a sequence of transformations by which using this relation we will get two equal numbers
among a1 , a2 , . . . an .

Lemma 1. Let (a, b) ∈ N2 and (x1 , x2 ) ∈ N2 be such that GCD(x1 , x2 ) = 1. Then there exists a sequence of transfor-
mations which replaces the numbers (a, b) with (a0 , b0 ), where one of these numbers a0 , b0 is equal to ax1 bx2 .

Proof. We’ll prove this by induction on x1 + x2 , for all (a, b) ∈ N2 . As the basis consider x1 + x2 = 2 =⇒ x1 = x2 = 1.
The number ab we can get by applying transformation (a, b) → (a, ab).
Let’s assume that the claim holds for all (x1 , x2 ) such that x1 + x2 < n, and for all (a, b). Let’s take some numbers
(x1 , x2 ) such that x1 + x2 = n and some arbitrary numbers (a, b). If x1 = x2 is satisfied, since x1 and x2 are coprime, we
could conclude that both numbers are equal to 1, but we have already proved this case in basis. Let’s assume x1 6= x2 .
WLOG x1 > x2 . Then we apply the transformation (a, b) → (a, ab), and then apply the induction hypothesis on numbers
(a, ab) and (x1 − x2 , x2 ):
(a, b) → (a, ab) → (γ, ax1 −x2 (ab)x2 ) = (γ, ax1 bx2 ),
where γ is some positive integer, what we wanted to prove.

Lemma 2. Let k ∈ N, (b1 , b2 , . . . bk ) ∈ Nk and (x1 , x2 , . . . xk ) ∈ Nk . Then there exists sequence of transformations which
instead of numbers (b1 , b2 , . . . bk ) writes down numbers (b01 , b02 , . . . b0k ) such that one of those numbers is equal to
x 1
(bx1 1 bx2 2 · · · bkk ) d ,

where d denotes greatest common divisor of numbers x1 , x2 , . . . xk .

Proof. Intuitively, this lemma is just Lemma 1 repeated (k − 1) times.


We’ll prove this by induction on k, for all b1 , b2 , . . . bk and x1 , x2 , . . . xk . In the basis, for k = 1, it holds d = x1 , so it we
don’t have to do any transformation to reach desired situation.
Let’s assume that the claim holds for some k ∈ N. Let’s take arbitrary (b1 , b2 , . . . bk , bk+1 ) and (x1 , x2 , . . . xk , xk+1 ). Then
x
we apply Lemma 1 on numbers (bk , bk+1 ) and (x0k , x0k+1 ), where x0k = xdk1 , x0k+1 = k+1 d1
, d1 = GCD(xk , xk+1 ), and then
k+1 x0 x0
we apply the induction hypothesis on numbers (b1 , b2 , . . . bkk bk+1 ) and (x1 , x2 , . . . xk−1 , d1 ):

x0 x0 x x0 x0 1
k+1
(b1 , b2 , . . . bk , bk+1 ) → (b1 , b2 , . . . bk−1 , γk , bkk bk+1 ) → (γ1 , γ2 , . . . , γk , (bx1 1 bx2 2 · · · bk−1
k−1 k+1 d1 d
(bkk bk+1 ) ) 2 ),

where γ1 , γ2 , . . . , γk are some positive integers and d2 = GCD(x1 , x2 , . . . xk−1 , d) = GCD(x1 , x2 , . . . xk−1 , xk , xk+1 ) = d.
Notice that last number in upper relation is the one we wanted to get.

Lemma 3. Let (a, b) ∈ N2 and (x1 , x2 ) ∈ N2 such that GCD(x1 , x2 ) = 1. Then there exists sequence of transformations
which instead of numbers (a, b) writes down numbers (a0 , b0 ) for which it is satisfied a0 /b0 = ax1 /bx2 .

Proof. We’ll prove this by induction on x1 + x2 , for all (a, b) ∈ N2 . In the basis is x1 + x2 = 2 =⇒ x1 = x2 = 1, so we
don’t have to do any transformation to reach desired situation.
Ler’s assume that the claim hold for all (x1 , x2 ) such that x1 + x2 < n, and for all (a, b). Let’s take some numbers (x1 , x2 )
such that x1 + x2 = n and arbitrary numbers (a, b).
• If one of the numbers x1 and x2 is even (WLOG x1 is even): we apply tranformation (a, b) → (a2 , b), and then we
apply induction hypothesis on numbers (a2 , b) and ( x21 , x2 ).
• Both numbers x1 and x2 are odd, and they are equal: then they are both equal to 1, which we have already solved
in the basis.
• Numbers x1 and x2 are odd and distinct (WLOG x1 > x2 ): we make following transformations (a, b) → (a, ab) →
(a2 , ab), and then we apply induction hypothesis on numbers (a2 , ab) and ( x1 +x
2
2
, x2 ):
x1 +x2
(a, b) → (a, ab) → (a2 , ab) → (c · (a2 ) 2 , c · (ab)x2 ) = ((ax2 c) · ax1 , (ax2 c) · bx2 ),

where c is some positive integer, what we wanted to prove.

4
In the equality (1), let d1 = GCD(r1 , r2 , . . . , rk ), d2 = GCD(rk+1 , rk+2 , . . . , rk+l ), zi = dr1i , ∀i ∈ {1, 2, . . . , k}, zi = dr2i ,
∀i ∈ {k + 1, k + 2, . . . , k + l}. As well let A be the left hand side of the equality (1), and let B be the right hand side. Let
1 1
A0 = A d1 and B 0 = B d2 . We want to do such transformations that we get x i y which will have same ratio as A and B.
If we apply Lemma 2 on the numbers (a1 , a2 , . . . , ak ) and (z1 , z2 , . . . , zk ); we get (among other numbers we get) the
number A0 . As well applying the same lemma on the numbers (ak+1 , ak+2 , . . . , ak+l ) and (zk+1 , zk+2 , . . . , zk+l ), we will
get the number B 0 on the board.
Numbers d1 and d2 are coprime (otherwise there would be some prime p which would divide d1 and d2 which would
imply it divides r1 , r2 , . . . , rk+l as well which is in contradiction to the assumption they do not have a common factor).
So we can apply Lemma 3 on the numbers (A0 , B 0 ) and (d1 , d2 ). Now we get two numbers with the same ratio as A i B.
But as by (1) we have A = B, we get 2 equal numbers on the board.
Thus Oleg can guarantee a win for any n > 1.

Comment: We can get to the relation (1) by concluding that the set {v1 , v2 , . . . , vn } is linearly dependant subset of
(n − 1)-dimensional space Qn−1 .

5
2nd European Mathematical Cup
7th December 2013–15st December 2013 MLADI NADARENI MATEMATIČARI

Marin Getaldic
Senior Category

Problems and Solutions


Problem 1. In each field of a table there is a real number. We call such n × n table silly if each entry equals
the product of all the number in the neighbouring fields.

a) Find all 2 × 2 silly tables.


b) Find all 3 × 3 silly tables.

(Two fields of a table are neighbouring if they share a common side.) (Borna Vukorepa)

Solution. We solve the subproblems separately.


a) Denote the numbers in the table as on the picture:

a b
c d
By the problem condition we have the following:

a = bc
b = ad
c = ad
d = bc.

From here we can see a = bc = d and b = ad = c. When we apply this to the upper relations we get a = b2 and
b = a2 and so a = b2 = a4 ⇐⇒ a(a − 1)(a2 + a + 1) = 0. The real solutions to this problem are a = 0 and a = 1.
Now we can see that all 2 × 2 silly tables are those with all element equal and furthermore equal to zero or one.
b) Denote by a, b, c, d the elements in the table which have exactly three neighbours. We denote the remaining elements
in terms of these and get the following table:
ab a ad
b abcd d
bc c cd
Let’s assume that abcd = 0. This implies that the middle element is zero which further implies all its neighbours
are zero and consequently every element in the table is zero. And thus only silly table under in this case is all zeros
table.
Now assume that abcd 6= 0, i.e. none of the table elements is equal to zero. Using the remaining conditions we get:

a = (ab)(abcd)(ad) = a3 b2 d2 c ⇐⇒ a2 b2 d2 c = 1,

Analogously we get a2 b2 c2 d = 1, a2 c2 d2 b = 1 i b2 c2 d2 a = 1 (we are allowed to divide by a, b, c, d as they are all


non-zero). Equating the LHSs of these equations we get a = b = c = d. Inserting this in any of these equations we
get a7 = 1 =⇒ a = 1.
Thus all 3 × 3 silly tables are all ones and all zeros tables.

Problem 2. Palindrome is a sequence of digits which doesn’t change if we reverse the order of its digits. Prove

that a sequence (xn )n=0 defined as

xn = 2013 + 317n
contains infinitely many numbers with their decimal expansions being palindromes.
(Stijn Cambie)

1
First solution. We will prove the following lemma providing two proofs:
Lema 1. There is infinitely many numbers divisible with 317 with their decimal expansions consisting only of ones.

Proof. Considering the sequence 1, 11, 111, . . . consisting of infinitely many numbers. This numbers have some residues
modulo 317. By The Pigeonhole Principle there are at least two numbers in this sequence with the same residue modulo
317. Let the smaller of these two have l digits and larger k. Their difference is

111
| {z. . . 1} − 111
| {z. . . 1} = 111
| {z. . . 1} 000
| {z. . . 0}
k times l times (k−l) times l times

divisible by 317. It will also remain divisible by 317 if we divide it by 10l (as 10 and 317 are coprime). This way we get
a number consisting only of ones divisible by 317. Let’s denote the number of its digits by k. We get infinitely many
such numbers by considering numbers consisting of k, 2k, 3k, . . . ones.

Proof. As 317 is prime, and as it is coprime with 10 by Fermat’s Little Theorem

10316 ≡ 1 (mod 317) =⇒ 317 | 10316m − 1, ∀m ∈ Z, m > 1.

As 9 is coprime with 317 as well, numbers of the form 1


9
(10316m − 1), m ∈ Z, m > 1 have the property we desire.

Continuing with the solution we can note that some integer m is in the sequence (xn )∞ n=0 if and only if m > 2013 and
m ≡ 2013 ≡ 111 (mod 317). Let (yn )∞ n=0 be a sequence of infinitely many positive integers with their decimal expansions
consisting only of ones and each being divisible by 317 (we are using our lemma here). Now numbers

1000yn + 111

are in the sequence (as they have the remainder 111 modulo 317) and their decimal expansions are palindromes. Thus
there is infinitely many members of the sequence (xn )∞
n=0 whose decimal expansions are palindromes.

Second solution. We will prove the generalised version of the problem for the sequence (xn )∞ n=0 defined as xn = a + nb,
where a, b are arbitrary positive integers with the property that b is coprime with 10. The problem is a special case of
this for a = 2013 i b = 317.
We define the sequence (yn )∞ n=0 in the following way: yn = 10
nϕ(b)
. Using The Euler’s Theorem, yn ≡ 1 (mod b).
Considering the number 1 + yn + yn2 + . . . yna−1 , its decimal expansion is:

1 000
| {z. . . 0} 1 000
| {z. . . 0} ... 1 000
| {z. . . 0} 1
nϕ(b)−1 times nϕ(b)−1 times nϕ(b)−1 times

where the digit one is repeated a times. It is clear now that the decimal expansion of this number is a palindrome. On
the other hand 1 + yn + yn2 + . . . yna−1 ≡ 1 + 1 + . . . 1 = a (mod b), so this number is in the sequence (xn )∞
n=0 , for each
number n. Thus we have found infinitely many members of the sequence (xn )∞ n=0 with their decimal expansions being
palindromes as we wanted.

Problem 3. We call a sequence of n digits one or zero a code. Subsequence of a code is a palindrome if it is
the same after we reverse the order of its digits. A palindrome is called nice if its digits occur consecutively in
the code.(Code (1101) contains 10 palindromes, of which 6 are nice.)

a) What is the least number of palindromes in a code?


b) What is the least number of nice palindromes in a code?

(Ognjen Stipetić)

Solution. We will consider the two subproblems separately:

a) Consider any code. Assume there is k digits one and n − k digits zero. We now transform this code into

|111{z
. . . 1} |000{z
. . . 0}
k puta n−k puta

by preserving the order among same digits. Lets note that each palindrome consisting of same digits is in the initial
code if and only if it is in the transformed code. The transformed code doesn’t have a palindrome not consisting
of same digits and thus the transformed code has less or equal palindromes than the initial one.
Thus we conclude that it is enough to consider only the codes starting with k digits one and ending in n − k zeros,
for some k ∈ {0, 1, . . . n}.

2
Let us fix a k ∈ {0, 1, . . . n}. The code consisting of k ones and n − k zeros has 2k − 1 + 2n−k − 1 = 2k + 2n−k − 2
palindromes. We now seek k which minimizes this expression.

If n is even (n = 2m), by the AM-GM inequality 2k + 2n−k > 2 · 2k+n−k = 2m + 2m =⇒ the least possible
number of palindromes in the code with 2m digits is 2m + 2m − 2 = 2m+1 − 2, and this number is clearly attained
for the code with m digits one and ending in m digits zero.
If n is odd (n = 2m + 1) we have the following inequality for each k ∈ {0, 1, . . . m − 1}:

2k + 2n−k > 2k+1 + 2n−k−1 ( ⇐⇒ 2n−k−1 > 2k )

From this we also get 2k + 2n−k−1 < 2k−1 + 2n−k+1 for all k ∈ {m + 1, m + 2, . . . 2m + 1}. So:

20 + 2n > 21 + 2n−1 > . . . > 2m + 2m+1 = 2m+1 + 2m < 2m+2 + 2m−1 < . . . < 2n + 20

Now it is clear that the least number of palindromes in the code with 2m + 1 digits is 2m + 2m+1 − 2 and this
number is attained by the code of m digits one and m + 1 digits zero.
b) For n = 1 we clearly see that the answer is 1. From now on we assume n > 2.
As well for simplicity of the write-up we will not consider the one-digit palindromes as nice as we know that each
code of n digits consists of n one-digit palindromes, each of which is nice. So we will find the smallest possible
number of multi-digit nice palindromes and we will add n to this number to get the desired solution.
As a last remark: in this part of the solution for brevity we will denote as palindromes only those that are nice by
the definitions in the problem statement.
Code consisting of n digits 1 contains one n-digit palindrome, two (n − 1)-digit palindromes, ..., n − 2 three digit
palindromes and n − 1 two digit palindromes. After summing up we get that this code has n(n−1) 2
palindromes.
Analogously the code consisting of n digits 0 contains the same number of palindromes.
We now consider the code which contains at least one digit one and at least one digit zero. Then each digit 1 except
the rightmost one is the start of at least one palindrome (the sequence of digits starting with it and ending in the
first digit one to the right of it is of the form 100 . . . 01 and is thus a palindrome). Analogously we conclude that
each digit 0 apart from the rightmost one is a start of at least one palindrome. As we have at least one digit 1 and
one digit 0 we conclude that each code consists of at least n − 2 palindromes (where we have deducted 2 for the
rightmost digit 1 and 0).
By induction on n we will show that for each n ∈ N, n > 2 we can find a code with exactly n − 2 palindromes.
We can note that for n = 2, 3, 4 this is possible as the examples are (10), (101), (1101). Now let’s assume that the
induction claim holds for some n ∈ N, n > 4, and let (x1 . . . xn ) be a code with exactly n − 2 palindromes.
That code is certainly not (011 . . . 1) or (100 . . . 0) (similarly as in the case with all digits equal we conclude that
these codes have (n−1)(n−2) 2
> n − 2 palindromes).
We now that each of the digits one/zero apart from the rightmost ones is the start of at least one palindrome.
In order for total number of palindromes to be n − 2 all such digits are starts of exactly one palindrome. As
(x1 . . . xn ) 6= (011 . . . 1) and (x1 . . . xn ) 6= (100 . . . 0), digit x1 is not the rightmost digit one/zero =⇒ x1 is the
start of exactly one palindrome.
We now show that we can choose a digit x0 such that (x0 x1 x2 . . . xn ) contains exactly n − 1 palindromes. As there
are n − 2 palindromes (x1 x2 . . . xn ) we need to show that we can choose x0 such that x0 is a start of exactly one
palindrome in (x0 x1 . . . xn ). We know that x0 is a start of at least one palindrome so we actually only have to show
it is a start of at most one palindromes.
Let’s consider to which palindromes can x0 be a start:
• (x0 x1 ) is a palindrome ⇐⇒ x0 = x1
• (x0 x1 x2 ) is a palindrome ⇐⇒ x0 = x2
• (x0 x1 x2 . . . xk xk+1 ) is a palindrome, for some k ∈ {2, 3, 4, . . . , n−1} ⇐⇒ x0 = xk+1 and (x1 x2 . . . xk ) is a palindrome
As there is exactly one palindrome for which x1 is the start we conclude there is at most one palindrome such that
x0 is its start and it has the form as in the third case above. Thus there are at most three palindromes to which
x0 can be the first digit as we have two options for the choice of x0 ∈ {0, 1}. Thus, by The Pigeonhole Principle
we can choose a digit such that x0 is a start of at most one palindrome, as desired.
Now using this and the remarks given before we have shown that the smallest possible number of nice palindromes
with n digits is 1 (for n = 1) and 2n − 2 (for n > 2).

Problem 4. Given a triangle ABC let D, E, F be orthogonal projections from A, B, C to the opposite sides
respectively. Let X, Y, Z denote midpoints of AD, BE, CF respectively. Prove that perpendiculars from D to
Y Z, from E to XZ and from F to XY are concurrent.
(Matija Bucić)

3
First solution. Let H be the orthocenter of the triangle ABC. We denote the midpoint of EF as P . As P Z is a midline
of the triangle CEF we have P Z||AC, and as Y H is perpendicular to AC, we get that Y H is perpendicular to P Z.
Analogously we conclude that the line ZH is perpendicular to P Y , so H has to be the orthocenter of the triangle P Y Z.
From this we can deduce that the line P H is perpendicular to Y Z, and thus P H is parallel to the line perpendicular to
Y Z which passes through D.
Now denote as N the tangency point of the incircle of the triangle DEF with its side EF . Let N 0 be the point symmetric
to N with respect to H and let M be the tangency point of the D-excircle of the triangle DEF with the side EF . As
P is the midpoint of N M and as is H the midpoint of N N 0 , we have that P H is parallel to N 0 M . As we know that M
is the map of the point N 0 under the homothety with centre D which maps the incircle to excircle of the triangle DEF ,
we can conclude that D, N 0 and M are collinear.
We can now conclude that the line perpendicular to Y Z passing through D is parallel to P H while this line is parallel
to N 0 M . As D lies on N 0 M we conclude that DM is the line through D perpendicular to Y Z.
Analogously we can conclude that perpendiculars from E to XZ and from F to XY are lines joining vertices with the
corresponding excircle tangency point of the triangle DEF . Using the Ceva’s Theorem gives us the result.

Remark: The intersection of the lines connecting the vertices of the triangle respective tangency points intersect in the
point which is called Nagel’s point of the triangle (so we have proved that the three lines in the problem intersect in the
Nagel’s point of the triangle DEF ).

Second solution. By applying The Carnot’s Theorem to the triangle XY Z and points D, E, F , three lines in the
problem are concurrent if and only if:

F X 2 − F Y 2 + DY 2 − DZ 2 + EZ 2 − EX 2 = 0 (1)

In the triangle AF D and EF B lines F X and F Y are medians, so


1
F X2 = (2AF 2 + 2F D2 − AD2 )
4
1
F Y 2 = (2F B 2 + F E 2 − EB 2 ).
4

4
Noting that the other sides on the LHS of (1) are medians in the respective triangles we deduce:

F X 2 − F Y 2 + DY 2 − DZ 2 + EZ 2 − EX 2 =
1
[(2AF 2 +  D2 − H
2F
 AD2 ) − (2F B 2 +  E2 − H
2F
 EB 2 )+
H H
4
2 2
 − EB 2 2 2 2
H) − (2DC +   −H
+(2DB +  2DE
 H 2DF
 CFH )+
+(2EC 2 +  2 − H 2
) − (2EA2 +  2 −H H2 )] =
2EF
 CFH 2ED

AD
1
(AF 2 − F B 2 + DB 2 − DC 2 + EC 2 − EA2 ).
2
From right-angled triangles AF C and F BC we get:

AF 2 − F B 2 = (AC 2 − F C 2 ) − (BC 2 − F C 2 ) = AC 2 − BC 2 .

Applying this analogously to triangles AEB, EBC, ADC, ADB we get:

F X 2 − F Y 2 + DY 2 − DZ 2 + EZ 2 − EX 2 =
1
(AF 2 − F B 2 + DB 2 − DC 2 + EC 2 − EA2 ) =
2
1
(AC 2 − BC 2 + AB 2 − AC 2 + BC 2 − AB 2 ) = 0,
2
Q.E.D.

5
3rd European Mathematical Cup
6th December 2014–14th December 2014 MLADI NADARENI MATEMATIČARI

Marin Getaldic
Senior Category

Problems and Solutions


Problem 1. Prove that there are infinitely many positive integers which can’t be expressed as ad(a) + bd(b)
where a and b are positive integers.
For positive integer a expression d(a) denotes the number of positive divisors of a. (Borna Vukorepa)

Solution. We will show that ad(a) is a square of an integer for every positive integer a.
If a is a square of an integer, any its power is also a square of an integer.
If a is not a perfect square, number of it’s positive divisors is even. We can prove this by pairing divisiors of a as d and
a
d
. A divisor d won’t be paired with itself because that would imply a = d2 . This proves that d(a) is even and hence
d(a)
a is a perfect square for every positive integer a.
The expression in the problem is hence a sum of two squares. Every number of the form 4t + 3 can’t be written as a sum
of two squares because 0 and 1 are the only quadratic residues modulo 4, so it is impossible for a sum of two squares to
give remainder 3 modulo 4.

Problem 2. Jeck and Lisa are playing a game on an m × n board, with m, n > 2. Lisa starts by putting a
knight onto the board. Then in turn Jeck and Lisa put a new piece onto the board according to the following
rules:
1. Jeck puts a queen on an empty square that is two squares horizontally and one square vertically, or
alternatively one square horizontally and two squares vertically, away from Lisa’s last knight.
2. Lisa puts a knight on an empty square that is on the same, row, column or diagonal as Jeck’s last queen.
The one who is unable to put a piece on the board loses the game. For which pairs (m, n) does Lisa have a
winning strategy?
(Stijn Cambie)

Solution. We shall show that Lisa has a winning strategy if and only if m and n are both odd.
Lisa’s winning strategy
Suppose the game is played on an m × n board with m and n both odd. Then Lisa puts her first knight in a corner
and partitions the remaining squares of the board into ‘dominoes’. In each turn Jeck has to put a queen in one of these
dominoes and Lisa puts a knight on the other square of the domino. As the board is finite, Jeck can’t keep finding new
dominoes and so Lisa will win.
Jeck’s winning strategy
Suppose the game is played on an m × n board with m or n even. We shall show that Jeck is able to partition the board
into pairs of squares that are two squares horizontally and one square vertically, or alternatively one square horizontally
and two squares vertically, away from each other. In each turn Lisa has to put a knight in one of these and Jeck puts
a queen on the other square of the pair. As the board is finite, Lisa can’t keep finding new pairs and so Jeck will win.
Now we prove that Jeck can make the required partition.
Case 1. Suppose 4|m or 4|n. We know that any k × 4l board (k ≥ 2) can be divided into 2 × 4 and 3 × 4 boards (firstly
divide k × 4l board in l boards of dimensions k × 4; after that every k × 4 board divide in k2 boards of dimensions 2 × 4,
or in k−3
2
boards of dimensions 2 × 4 and one 3 × 4 board, dependently on parity of k). The following diagrams show
that every 2 × 4 and every 3 × 4 board allows a required partition.

1 2 3 4
1 2 3 4
3 5 1 6
3 4 1 2
2 6 4 5
1 point.

1
Case 2. Suppose m, n ≡ 1, 2 (mod 4) . Any (5 + 4k) × (6 + 4l) board can be divided into a 5 × 6 board, a 4k × 6 board,
a 5 × 4l board and a 4k × 4l board. The following diagram shows that a 5 × 6 board allows a required partition.

1 2 14 13 12 11
3 4 12 11 14 15
2 1 13 15 7 8
4 3 5 6 9 10
5 6 9 10 8 7

According to case 1 a 4k × 6 board, a 5 × 4l board and a 4k × 4l board also allow a partition.


Case 3. Suppose m, n ≡ 2, 3 (mod 4). Any (3 + 4k) × (6 + 4l) board can be divided into a 3 × 6 board, a 4k × 6 board,
a 3 × 4l board and a 4k × 4l board. The following diagram shows that a 3 × 6 board allows a required partition.

1 2 3 4 7 8
3 4 1 6 9 5
2 6 9 5 8 7

According to case 1 a 4k × 6 board, a 3 × 4l board and a 4k × 4l board also allow a partition.


Case 4. Suppose m, n ≡ 2 (mod 4) .Any (6 + 4k) × (6 + 4l) board can be divided into a 6 × 6 board, a 4k × 6 board, a
6 × 4l board and a 4k × 4l board. The 6 × 6 board can be partitioned in two 3 × 6 boards, which were already solved.
According to case 1 a 4k × 6 board, a 6 × 4l board and a 4k × 4l board also allow a partition.

Problem 3. Let ABCD be a cyclic quadrilateral with the intersection of internal angle bisectors of ∠ABC
and ∠ADC lying on the diagonal AC. Let M be the midpoint of AC. The line parallel to BC that passes
through D intersects the line BM in E and the circumcircle of ABCD at F where F 6= D. Prove that BCEF
is a parallelogram.
(Steve Dinh)

Solution. We prove the problem in reverse as this is much more natural in this problem.

We note that if BCEF is a parallelogram then its diagonals are bisecting each other so the point G ≡ BE ∩ CF should
be the midpoint of CF .
If G is the midpoint of CF then 4GBC and 4GEF are congruent as CG = GF and F E||BC gives ∠GEF = ∠GBC
and ∠GF E = ∠GCB. Hence this implies BG = GE and in particular BCEF is a paralelogram as its diagonals bisect
each other. Hence G being midpoint of CF is equivalent to our problem.
As M is the midpoint of AC by the midline theorem applied to triangle ACF we have G is the midpoint of CG if and
only if M G||AF . Hence we only need to prove BM ||AF .
Now we further notice that, using F D||BC, this is equivalent to ∠AF D = ∠M BC.
We further see that ∠AF D = ∠ABD as they are angles over the same chord. So our claim is equivalent to ∠ABD =
∠M BC.
We add that here depending on the relative position of F on the circles we might have π − ∠AF D = ∠M BC but then
π − ∠AF D = ∠ABD so the final conclusion still holds.

2
We know that ∠BDA = ∠BCM as they are angles over the same chord. Now this gives us that our claim is equivalent
to the claim 4BCM ∼ 4BDA.
BC AD
The same angle equality shows that this is equivalent to CM = BD . Using the fact M is the midpoint of AC we have
AC
CM = 2 so our claim is equivalent to 2AD · BC = BD · AC.
We further have by the angle bisector theorem applied to 4ABC and 4CDA:

AB AI AD
= =
BC CI CD
So using this our claim is equivalent to AB · CD + AD · BC = BD · AC which we can recognise to be the Ptolomeys
theorem for cyclic quadrilaterals.

Problem 4. Find all functions f : R → R such that for all x, y ∈ R the following holds:

f x2 + f 2y 2 = (f (x + y) + f (y))(f (x − y) + f (y)).
 

(Matija Bucić)

Solution. Let P (x, y) be the assertion f x2 + f 2y 2 = (f (x + y) + f (y)) (f (x − y) + f (y)).


 

P (0, x) gives us
f (0) + f 2x2 = 2f (x) (f (x) + f (−x))

(1)
and P (0, −x) gives us
f (0) + f 2x2 = 2f (−x) (f (x) + f (−x)) .

(2)
By combining (1) and (2) we get
f (x)2 = f (−x)2 . (3)
2
P (0, 0) gives us 2f (0) = 4f (0) , thus we have two cases:
1. f (0) = 12 .
P (x, 0) gives us
 2
2 1 1
f (x ) = f (x) + − , (4)
2 2
while P (−x, 0) gives us
 2
1 1
f (x2 ) = f (−x) + − . (5)
2 2
Combining (4) and (5) and using (3) we get
f (x) = f (−x). (6)
The assertion P x2 , x2 can be written as


 
4 4 2 2  1 2
f x + f 2x = f 2x +f x +f x . (7)
2
For an arbitrary x ∈ R, let us denote a = f (x). Using (4) we get:
 2
1 1
f x2 = a +

− ,
2 2
 2  4
4 2 1 1 1 1
f x = f x + − = a+ − .
2 2 2 2

Using (1) and (6) we get:


1 1
f 2x2 = 4f (x)2 − = 4a2 − ,

2 2
 2 !2
1 1 1 1
f (2x4 ) = 4f (x2 )2 − = 4 a+ − − .
2 2 2 2

Plugging the last 4 equations in (7) we get:


 4  2 !2  2 !  2
1 1 1 2 1 1
a+ +4 a+ − −1= 4a − 1 + a + a+ ,
2 2 2 2 2

which is equivalent to
 2
1
a+ (4a − 2) = 0.
2

3
Therefore a = ± 21 and f (x) = ± 12 . Now if we use (6) in (1) we get

f (0) + f 2x2 = 4(f (x))2 = 1




so f 2x2 = 1 1

2
for every x, now using (6) we conclude f (x) = 2
for all x which is easily checked to be a solution.
2. f (0) = 0.
We immediately see using P (x, 0) that
f (x2 ) = f (x)2 . (8)
By comparing P (x, y) and P (x, −y) and using (3) we get:

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

If there exists c ∈ R such that f (c) 6= f (−c) we have for all x

f (x + c) = −f (x − c),

Plugging in x + c in x here gives us:


f (x + 2c) = −f (x). (9)
Specially, f (2c) = 0. Now, P (2c − y, y):

f ((2c − y)2 ) + f (2y 2 ) = (f (2c) + f (y))(f (2c − 2y) + f (y)),


(−f (−y))2 + f (2y 2 ) = f (y)f (2c − 2y) + f (y)2 ,
f (2y 2 ) = f (y)f (2c − 2y) = −f (y)f (−2y) (10)

Let S(x) denote the statement (x 6= 0)∧(f (x) = f (−x) 6= 0). If there is no d ∈ R such that S(d) then f (x) = −f (−x)
for all x ∈ R. P (0, x) gives us
f (2x2 ) = 2f (x)(f (x) + f (−x)) = 0,
which gives us another solution f (x) = 0. Now, let us assume that there exists d ∈ R such that S(d) holds.
Obviously, S(−d) holds, as well. P (0, d) gives us

f (2d2 ) = 4f (d)2

and (10) gives us

f (2d2 ) = −f (d)f (−2d)


f (−2d) = −4f (d)
f (2d) = −4f (−d) = −4f (d) = f (−2d)

Therefore, S(2d) also holds. Inductively, we deduce that S(2n d) holds for every n ∈ N. Also, f (2n d) = (−4)n f (d),
which means that f is unbounded.
P (x, c), using the fact f (x2 ) = f (x)2 :

f (x)2 + f (2c2 ) = f (x + c)f (x − c) + f (c)(f (x + c) + f (x − c)) + f (c)2 ,

and since f (x + c) = −f (x − c) and f (2c2 ) = 0 (this follows from P (0, c)) we have

f (x)2 + f (x + c)2 = f (c)2 ,

which implies that f is bounded and that is contradiction. Therefore, there is no c ∈ R such that f (c) = −f (c)
and therefore
f (x) = f (−x), for all x ∈ R. (11)
P (0, x):
f (2x2 ) = 4f (x)2 = 4f (x2 ).
Therefore, using (11)
f (2x) = 4f (x), for all x ∈ R. (12)
P (x, y) can now be written as follows:

f (x)2 + 3f (y)2 = f (y)(f (x + y) + f (x − y)) + f (x + y)f (x − y),

and similarly, P (y, x) can be written as

f (y)2 + 3f (x)2 = f (x)(f (x + y) + f (x − y)) + f (x + y)f (x − y).

subtracting the previous two equalities

(f (x) − f (y))(2f (x) + 2f (y) − f (x + y) − f (x − y)) = 0. (13)

Assume that for some x, y ∈ R f (x) = f (y) = a. Let f (x + y) = b and f (x − y) = c.

4
Now we have:
4a2 = bc + ab + ac (14)
P (x + y, x − y):
f (x + y)2 + 4f (x − y)2 = (f (2x) + f (x − y))(f (2y) + f (x − y)),
i.e.
b2 + 4c2 = (4a + c)2 (15)
If we plug in x → x + y, y → x − y in (13) we get

(f (x + y) − f (x − y))(2f (x + y) + 2f (x − y) − f (2x) − f (2y)) = 0

i.e.
(b − c)(2b + 2c − 8a) = 0.
If b = c (15) gives us

5b2 = (4a + b)2 ,


b2 = 4a2 + 2ab

while (14) gives us


4a2 = b2 + 2ab
Thus, ab = 0 and a = b = c = 0 which implies 2a + 2a − b − c = 0. On the other hand, if b 6= c we also have
2a + 2a − b − c = 0
Therefore, f (x) = f (y) implies 2f (x) + 2f (y) = f (x + y) + f (x − y) while f (x) 6= f (y), using (13) also implies
2f (x) + 2f (y) = f (x + y) + f (x − y).
Therefore, for all x, y:
2f (x) + 2f (y) = f (x + y) + f (x − y) (16)
Now we have:

f (x)2 + 3f (y)2 = f (x + y)f (x − y) + f (y)(f (x + y) + f (x − y))


= f (x + y)f (x − y) + f (y)(2f (x) + 2f (y)),
2
(f (x) − f (y)) = f (x + y)f (x − y). (17)

Combining (16) i (17) gives us


(f (x + y) − f (x) − f (y))2 = 4f (x)f (y). (18)
Let g : R → R+ 2 2 2
0 be the function such that f (x) = g(x) . Equations (8), (11) and (12) imply that g(x ) = g(x) ,
g(−x) = g(x) and g(2x) = 2g(x), respectively.
Equation (16) can be written as

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

If f (x+y)−f (x)−f (y) > 0, from (18) we conclude that g(x+y) = g(x)+g(y). Otherwise, f (x−y)−f (x)−f (y) > 0
and equation (18) can be rewritten as

(f (x − y) − f (x) − f (y))2 = 4f (x)f (y).

From the last equation we can conclude that g(x − y) = g(x) + g(y).
Therefore
g(x + y) = g(x) + g(y) or g(x − y) = g(x) + g(y) (19)
and thus one of the following two equations hold:

g(x2 + y 2 ) + 2g(xy) = g(x2 + y 2 + 2xy) = g(x + y)2 (20)

or
g(x2 + y 2 ) + 2g(xy) = g(x2 + y 2 − 2xy) = g(x − y)2 (21)
From (18) we conclude:
g(x + y) = g(x) + g(y) or g(x + y) = |g(x) − g(y)|. (22)
By putting −y instead of y in (22) and using g(−y) = g(y) we get:

g(x − y) = g(x) + g(y) or g(x − y) = |g(x) − g(y)|. (23)

Equations (22) and (23) imply that each of g(x − y)2 and g(x + y)2 can be written as either (g(x) + g(y))2 or
(g(x) − g(y))2 . Thus, no matter whether (20) or (21) holds, one of the following equations must hold:

g(x2 + y 2 ) + 2g(xy) = (g(x) + g(y))2 (24)

5
or
g(x2 + y 2 ) + 2g(xy) = (g(x) − g(y))2 (25)
2 2 2 2
Without loss of generality we may assume that g(x) > g(y). If g(x + y ) = g(x) + g(y) then equations (24) i (25)
imply that g(xy) = g(x)g(y) or g(xy) = −g(x)g(y) and because g is non-negative we conclude that g(xy) = g(x)g(y).
Otherwise, g(x2 + y 2 ) = |g(x2 ) − g(y 2 )| = g(x)2 − g(y)2 and we have

g(x)2 + g(y)2 ± 2g(x)g(y) = g(x)2 − g(y)2 + 2g(xy)

and
g(y)2 ± g(x)g(y) = g(xy).
However, since g(x) > g(y) and g(xy) > 0 we get

g(y)2 + g(x)g(y) = g(xy).

Therefore, we conclude that

g(xy) = g(y)2 + g(x)g(y) (for g(y) 6 g(x)) or g(xy) = g(x)g(y). (26)

Thus,
g(xy) > g(x)g(y). (27)
2 2 2 2 2 2
If for some a, b it holds that g(a + b ) 6= g(a) + g(b) we may assume that g(a) > g(b) and we have g(a + b ) =
g(a)2 − g(b)2 , and
g(ab) = g(b)2 + g(a)g(b).
Let us denote a0 = 2a and b0 = 21 b. We have g(a0 ) = 2g(a) and g(b0 ) = 21 g(b). Therefore, g(a0 ) > g(a) > g(b) > g(b0 ).
Note that g(a0 b0 ) = g(ab) and g(a0 )g(b0 ) = g(a)g(b). From (26) we conclude that either g(a0 b0 ) = g(a0 )g(b0 ) or
g(a0 b0 ) = g(b0 )2 + g(a0 )g(b0 ). Each of these two cases is only possible when g(b) = 0. However, this implies that
g(a2 + b2 ) = g(a2 ) − g(b2 ) = g(a2 ) + g(b2 ) which is a contradiction.
Therefore, there are no a, b such that g(a2 + b2 ) 6= g(a)2 + g(b)2 and for all x, y > 0 g(x + y) = g(x) + g(y) which,
together with the fact that g is non-negative, means that g satisfies a Cauchy functional equation whose only
solution is g(x) = g(1)x. Since g(1) = g(1)2 we get that g(1) = 1 and f (x) = x2 for all x.

Therefore there are 3 solutions which are given by


• f (x) = 0 ∀x ∈ R,
• f (x) = 21 ∀x ∈ R and
• f (x) = x2 ∀x ∈ R.

6
4th European Mathematical Cup
5th December 2015–13th December 2015 MLADI NADARENI MATEMATIČARI

Marin Getaldic
Senior Category

Problems and Solutions


Problem 1. A = {a, b, c} is a set containing three positive integers. Prove that we can find a set B ⊂ A,
B = {x, y} such that for all odd positive integers m, n we have

10|xm y n − xn y m .

(Tomi Dimovski)

Solution. Let f (x, y) = xm y n − xn y m . If n = m, the problem statement will be fulfilled no matter how we choose B so
from now on, without loss of generality, we consider n > m. Since m and n are both odd, we have that n − m is even
and we get
f (x, y) = xm y m (y n−m − xn−m )

=⇒ f (x, y) = xm y m (y 2 − x2 )Q(x, y)

=⇒ f (x, y) = xm y m (y − x)(y + x)Q(x, y),


where Q(x, y) = y n−m−2 + y n−m−4 x2 + · · · + xn−m−2 .
Now if one of x, y is even, f (x, y) is even. If both are odd, then f (x, y) is again even since x + y and x − y are even in
that case. This shows that we only need to consider divisibility by 5. If A contains at least one element divisible by 5,
we can put it in B and that will give us the solution easily. Now we consider the case when none of the elements in A is
divisible by 5. If some two numbers in A give the same remainder modulo 5, we can choose them and then x − y will be
divisible by 5 which solves the problem. Now we consider the case when all remainders modulo 5 in A are different. Take
a look at the pairs (1, 4) and (2, 3). Since we have three different remainders modulo 5 in A, by pigeonhole principle one
of these pairs has to be completely in A (when elements are considered modulo 5). Then if we pick the numbers from A
that correspond to those two remainders we get that x + y is divisible by 5 so the problem statement is fulfilled again.
This completes the proof.

1
Problem 2. Let a, b, c be positive real numbers such that abc = 1. Prove that
a+b+c+3 1 1 1
> + + .
4 a+b b+c c+a

(Dimitar Trenevski)

First Solution. Rewrite the left hand side of inequality in following way:
a+b+c+3 a+b+c+3 a+1 b+1 c+1
= √ = √ + √ + √ .
4 4 abc 4 abc 4 abc 4 abc
Rewrite denominators:
a+1 b+1 c+1 a+1 b+1 c+1
√ + √ + √ = √ √ + √ √ + √ √ ,
4 abc 4 abc 4 abc 2 ab · c + 2 ac · b 2 bc · a + 2 ab · c 2 ac · b + 2 bc · a
and then by artithmetic mean – geometric mean inequality, we have
a+1 b+1 c+1 a+1 b+1 c+1
= √ √ + √ √ + √ √ > + + .
2 ab · c + 2 ac · b 2 bc · a + 2 ab · c 2 ac · b + 2 bc · a ab + c + ac + b bc + a + ab + c ac + b + bc + a

This problem is now solved, because


a+1 b+1 c+1 a+1 b+1 c+1
+ + = + + =
ab + c + ac + b bc + a + ab + c ac + b + bc + a (a + 1)(b + c) (b + 1)(a + c) (c + 1)(a + b)
1 1 1
= + +
a+b b+c c+a

Second Solution. We introduce change of variables: a = x3 , b = y 3 , c = z 3 . We now have the condition xyz = 1.
We apply Schur inequality (with exponent r = 1) to the numerator of the left hand side:

x3 + y 3 + z 3 + 3xyz > x2 y + x2 z + y 2 x + y 2 z + z 2 x + z 2 y,

to obtain inequality
x2 y + x2 z + y 2 x + y 2 z + z 2 x + z 2 y 1 1 1
> 3 + 3 + 3 .
4 x + y3 y + z3 z + x3
We apply arithmetic mean – geometric mean inequality for the denominators of the right hand side:
1 1 1 √
x3 + y 3 > 2x3/2 y 3/2 =⇒ 6 = z 2 yz,
x3 + y 3 2x3/2 y 3/2 2
and similarly to the other terms. We now have to prove

x2 y + x2 z + y 2 x + y 2 z + z 2 x + z 2 y √ √ √
> x2 yz + y 2 xz + z 2 xy.
2
We apply arithmetic mean – geometric mean inequality in pairs on the left hand side:

x2 y + x2 z √
> x2 yz,
2
y2 x + y2 z √
> y 2 xz,
2
z2x + z2y √
> z 2 xy.
2
Summing up inequalities from above finishes the proof.

2
Problem 3. Circles k1 and k2 intersect in points A and B, such that k1 passes through the center O of the
circle k2 . The line p intersects k1 in points K and O and k2 in points L and M , such that the point L is between
K and O. The point P is orthogonal projection of the point L to the line AB. Prove that the line KP is
parallel to the M -median of the triangle ABM .
(Matko Ljulj)

Solution. Let the point C be the midpoint of the line segment AB. We have to prove M C k KP .

Let us introduce angle α := ∠BKA. Notice that


1 1 1
∠BLA = 180 − ∠BM A = 180 − ∠BOA = 180 − (180 − ∠BKA) = 90 + α.
2 2 2
_
Also, notice that the point O is midpoint of the arc AB. Thus the line KO is bisector of the angle ∠BKA. From the
two claims above, we deduce that L is incenter of the triangle ABK. Moreover, notice that M L is diameter of the circle
k2 , thus ∠ABM = 90. Since BL is angle bisector of the angle ∠ABK, we deduce that BM is exterior angle bisector
of the same angle. Thus, since M lies on angle bi sector KM and exterior angle bisector BM , M is the center of the
excircle for the triangle ABK. Thus, we have to prove that the line passing through the incenter L of the triangle ABK
and point of the tangency of incircle of the same triangle is parallel to the line passing through the center of the excircle
M and the midpoint C of the line segment AB. This is a well known lemma, which completes the proof.

3
Problem 4. A group of mathematicians is attending a conference. We say that a mathematician is k-content
if he is in the room with at least k people he admires or if he is admired by at least k other people in the room.
It is known that when all participants are in the same room then they are all at least 3k + 1-content. Prove
that you can assign everyone into one of the 2 rooms in a way that everyone is at least k-content in his room
and neither room is empty. Admiration is not necessarily mutual and no one admires himself.
(Matija Bucić)

Solution. We will for simplicity and clarity of presentation use some basic graph theoretic terms, this is in no way
essential.
We represent the situation by a directed graph (abbr. digraph) G(V, E) where each vertex v ∈ V (G) represents a
mathematician and each edge e ∈ E(G) represents an admiration relation. Given v ∈ V (G) we define out-degree of v
denoted o(v) as the number of edges starting in v (so the number of mathematicians v admires) and in-degree i(v) as
the number of edges ending in v (so the number of mathematicians who admire v). Given X ⊆ V by G(X) we denote
the induced subgraph (a graph with vertex set X and edges inherited from G). We say that a digraph is a k-digraph if
for every v ∈ V (G) we have i(v) ≥ k or o(v) ≥ k.
So the question can be reformulated as: Given G is a 3k + 1-digraph we can split its vertices into 2 vertex disjoint classes
such that each induced subgraph on class is a k digraph.
We call a subset X of vertices of G k-tight if for any Y ⊆ X we have a vertex v ∈ Y such that iG(Y ) (v) ≤ k and
oG(Y ) (v) ≤ k. A partition of V , (A1 , A2 ) is feasible if A1 is k-tight and A2 is k-tight.
We first assume there are no feasible partitions.
In this case consider a minimal size subset A1 ⊆ V (G) subject to G(A1 ) being a k-digraph, we define A2 ≡ V (G) − A1 .
Given a subset X ⊂ A1 , G(X) is not a k-digraph so there is a vertex v ∈ X such that oG(X) (v) < k and iG(X) (v) < k
which shows that any proper subset of A1 satisfies the condition of k-tightness. For the case of X ≡ A1 by removing
any vertex v ∈ A1 the graph G0 ≡ G(A1 − {v}), by minimality assumption on A1 , must contain a vertex w such that
oG0 (w) < k and iG0 (w) < k so as there is only one extra vertex in G(A1 ), namely v oG(A1 ) (w) ≤ k, iG(A1 ) (w) ≤ k. In
particular this shows A1 is k-tight.
This implies A2 is not k-tight by our assumption so there exists an A02 ⊆ A2 such that A02 is a k + 1 digraph. Now
applying the following proposition to extend the pair (A1 , A02 ) to a full partition which satisfies the conditions of the
problem.
Given disjoint subsets A, B ⊆ V (G) we say (A, B) is a solution pair if both G(A) and G(B) are k-digraphs.
Proposition: If a 2k + 1 digraph G admits a solution pair it admits a partition with both induced graphs of both classes
being k-digraphs.
Proof. Take a maximal solution pair (A, B), the condition in the lemma guaranteeing it exists. Let C = V (G)−(A∪B),
if C is empty we are done so assume |C| > 0. By our assumption (A, B ∪ C) is not a solution pair so there is some
x ∈ C such that oG(B∪C) (x), iG(B∪C) (x) < k so as G is 2k + 1 digraph iG (x) ≥ 2k + 1 or oG (x) ≥ 2k + 1 so either
oG(A∪{x}) (x) > k + 1 or iG(A∪{x}) (x) > k + 1 so in particular (A ∪ {x}, B) is a solution pair contradicting maximality
and completing our argument. 
Hence we are left with the case in which we have at least one feasible partition. We pick the feasible partition (A, B)
maximizing w(A, B) = |E(G(A))| + |E(G(B))|. The fact that A is k-tight implies there is an x with oG(A) (x) ≤ k,
iG(A) (x) ≤ k so x needs to have at least k + 1 edges in or out of B so |B| ≥ k + 1 and by symmetry |A| ≥ k + 1.
We now prove that there exist an X ⊆ A such that G(X) is a k-digraph, by contradiction. Assuming the opposite we
notice that for any x ∈ B, B − {x} is still k-tight while B being k-tight implies there is an x ∈ B such that oG(B) (x) ≤ k,
iG(B) (x) ≤ k so for this x we have A ∪ {x} is also k-tight. Hence, for A0 = A ∪ {x} and B 0 = B − {x}, (A0 , B 0 ) is a feasible
partition. We considering the change in edges which moving x causes we have w(A0 , B 0 )−w(A, B) ≥ 3k +1−k −k −k = 1
as we know iG (x) ≥ 3k + 1 or oG (x) ≥ 3k + 1 so moving x from B to A increases number of edges in A by at least
3k + 1 − k while the choice of x in B means we lose at most k + k edges in B. This is a contradiction to maximality of
(A, B).
Analogously we can find Y ⊆ B with G(Y ) a k-digraph. Now applying the above proposition yet again we are done. 
Remark: The same argument with slightly modified weight function can be used to show the result for non symmetric
rooms, in particular if the graph is a k + l + max(k, l) + 1 digraph it can be partitioned into k- digraph and l digraph
parts.

4
5th European Mathematical Cup
3rd December 2016–11th December 2016 MLADI NADARENI MATEMATIČARI

Marin Getaldic
Senior Category

Problems and Solutions


Problem 1. Is there a sequence a1 , . . . , a2016 of positive integers, such that every sum

ar + ar+1 + . . . + as−1 + as

(with 1 6 r 6 s 6 2016) is a composite number, but

a) GCD(ai , ai+1 ) = 1 for all i = 1, 2, . . . , 2015;


b) GCD(ai , ai+1 ) = 1 for all i = 1, 2, . . . , 2015 and GCD(ai , ai+2 ) = 1 for all i = 1, 2, . . . , 2014?

GCD(x, y) denotes the greatest common divisor of x, y.


(Matija Bucić)

First Solution. We will solve this problem for any length n of the sequence.

a) Yes, there is such sequence.


For this part, we will construct solution by taking n consecutive positive integers ai = m + i, for some positive
integer m. We will determine number m at the end of the proof.
Firstly, notice that two consecutive elements of the sequence are coprime, since they are consecutive numbers.
Every sum of consecutive members of sequence is of the form
b(b + 1) a(a + 1) (b − a)(b + a + 1)
(a + 1) + (a + 2) + . . . + (b − 1) + b = − = .
2 2 2
For b > a + 3, numerator of the expression above consists of two factors, each greater or equal to 3, and at least
one of them is even, thus number is composite.
Thus, we have to choose m such that all sums of one and all sums of two consecutive members of sequence are
composite. That is, following numbers need to be composite:

m + 1, m + 2, . . . , m + n, 2m + 3, 2m + 5, . . . 2m + (2n − 1).

This is achieved for m = (2n + 1)! + 1. Namely, numbers (2n + 1)! + k and 2 · (2n + 1)! + k are composite for all
2 6 k 6 2n + 1 since they are divisible by k, and greater than k.
b) Again, the answer is yes.
Similarly like in first part, we will take some n consecutive odd numbers: ai = 2m + (2i − 1), for some positive
integer m.
It is clear that they are integers, and they are positive.
We will have GCD(ai , ai+1 ) = GCD(ai , ai+2 ) = 1 because differences of mentioned numbers are always 2 or 4.
Since numbers are odd, they have to be coprime.
Every sum of consecutive members of sequence is of the form

(2a + 1) + (2a + 3) + . . . + (2b − 3) + (2b − 1) = b2 − a2 = (b − a)(b + a).

For b > a + 2 number from above is composite because both factors are greater or equal to 2.
Thus, we have to choose m such that all numbers

2m + 1, 2m + 3, . . . , 2m + (2n − 1)

are composite. This is achieved by taking m = (2n)! + 1, with similar arguments like in first part.

1
Second Solution. (For part b) only.)
We will show that there exists a sequence for b) part of the problem.
It is obvious that this will imply that the answer for the a) part of the solution is yes.
We will form the sequence by induction. For the basis, we will take a1 = 4, a2 = 35. Those numbers are composite,
their sum is composite and they are coprime.
Let us assume that we have n positive integers with properties from the text of the problem. Let p1 , p2 , . . . , pn , pn+1 be
some prime numbers greater than
a1 + a2 + . . . + an .
Notice that this immediately means that those primes are greater than any sum of consecutive numbers, and specially,
that all those sums (including solely integers ai ) are coprime with mentioned primes.
We will get an+1 by solving system of modular equations. Existence of such positive integer is provided by Chinese
remainder theorem. The system is the following:

an+1 ≡ 1 (mod an , an+1 ≡ 1 (mod an−1 ),

an+1 ≡ −(an + . . . + an−k ) (mod pk ), k = 0, 1, 2, . . . , n − 1


an+1 ≡ 0 (mod pn+1 ).

In first row we provided that GCD(an+1 , an ) = GCD(an+1 , an−1 ) = 1.

In second two rows we provided that all sums of consecutive numbers including an+1 are composite.

Chinese remainder theorem can be applied here since all primes are greater than an and an−1 , and thus they are coprime.

Third Solution. (For part b) only.) As before, it is sufficient to prove the existence of the sequence for b) part only.
We will form recursion: a−1 = 1, a0 = 3, ak = a2k−1 − a2k−2 , for k > 1. (Here values a−1 and a0 are just auxiliary terms).
All numbers are positive integers, moreover we will prove that ak > ak−1 + 2, which we get from induction:

ak = a2k−1 − a2k−2 > a2k−1 − (ak−1 − 2)2 = 4ak−1 − 4 > ak−1 + 2,

since ak−1 > a0 = 3.


If there is some index k and some prime p such that p divides ak and ak−1 or divides ak and ak−2 , then from equation
ak = a2k−1 − a2k−2 we get that p divides ak−1 and ak−2 . In the same manner, p then divides ak−2 and ak−3 , it divides
ak−3 and ak−4 , and so on, thus it divides a−1 and a0 , which is impossible.
Let us now prove that all sums of consecutive elements are composite:

ar + . . . + as = (a2r−1 − a2r−2 ) + . . . + (a2s−1 − a2s−2 ) = a2s−1 − a2r−2 = (as−1 − ar−2 )(as−1 + ar−2 ).

First factor is greater than 1 since as−1 > ar−1 > ar−2 + 2. Second factor is clearly greater than 1, hence the product is
composite.

Fourth Solution. (For part a) only.)


The answer is yes.
Similarly like in the first solution, we will take sequence of consecutive third powers of positive integers: ai = (i + 1)3 .
Like in first solution, consecutive elements are coprime. It is clear that all numbers are positive integers.
All possible sums of consecutive elements are of the form
 2  2   
b(b + 1) a(a + 1) b(b + 1) a(a + 1) b(b + 1) a(a + 1)
(a + 1)3 + (a + 2)3 + . . . + (b − 1)3 + b3 = − = − + =
2 2 2 2 2 2
 
b(b + 1) a(a + 1)
= ((a + 1) + (a + 2) + . . . + (b − 1) + b) + .
2 2
Second factor is greater or equal than first one. Second is greater than 1 if all elements of sequence are greater than 1.
Since we chose numbers in that way, the number is composite.

2
Problem 2. For two positive integers a and b, Ivica and Marica play the following game: Given two piles of a
and b cookies, on each turn a player takes 2n cookies from one of the piles, of which he eats n and puts n of
them on the other pile. Number n is arbitrary in every move. Players take turns alternatively, with Ivica going
first. The player who cannot make a move, loses. Assuming both players play perfectly, determine all pairs of
numbers (a, b) for which Marica has a winning strategy.
(Petar Orlić)

Solution. Marica wins the game if |a − b| 6 1, otherwise Ivica wins.


We will say that a player is in a losing position if it is his turn and |a − b| 6 1, while calling all other positions winning
positions. It is easy to see that the only positions in which one cannot make a move are (0, 0),(0, 1),(1, 0),(1, 1) and that
they are all losing positions.
Claim 1. If a player is in a losing position, then regardless of his move he must leave a winning position for the other
player.

Proof. If the piles are of sizes x and x + 1, then after a move they will have sizes x − 2k i x + k + 1 (their difference is
3k + 1) or x + k i x − 2k + 1 (their difference is 3k − 1). In both cases, the difference is at least 2. If the piles have x and
x cookies each, then after a move they will have x − 2k and x + k cookies (there difference is 3k, which is at least 3).
Since the difference of the number of cookies is always bigger than 1, we have proven that this is a winning position.
Claim 2. A player who is in a winning position can always leave a losing position after his turn.

Proof. If the piles are of sizes x and x + 3a (where a > 0), one can take 2a cookies from the second pile and and leave
two piles containing x + a and x + a cookies. If the piles are of sizes x and x + 3a + 1 (where a > 0), one can take 2a
cookies from the second pile and leave two piles containing x + a and x + a + 1 cookies.
If the piles are of sizes x and x + 3a − 1 (where a > 0), one can take 2a cookies from the second pile and and leave two
piles containing x + a and x + a − 1 cookies. Since the difference in each case is less than 2, thus a player can always
leave a loosing position if he is in a winning position.

We have now proven that if Ivica is in a loosing position in the begging, Marica can always ensure that he is in a winning
position and win. Similarly, if Ivica is in a winning position in the begging, he can always ensure that he is in a winning
position and win. So, Marica wins only when Ivica is in a losing position in his first turn. This is true only when
|a − b| 6 1.

3
Problem 3. Determine all functions f : R → R such that equality
f (x + y + yf (x)) = f (x) + f (y) + xf (y)
holds for all real numbers x, y.
(Athanasios Kontogeorgis)

Solution. We easily see that f (x) = 0, x ∈ R and f (x) = x, x ∈ R are solutions. Let us assume that f satisfies the given
equation but is not a constant or identity.
Throughout the proof, we denote by (x0 , y0 ) the initial equation with x = x0 , y = y0 .
Then, (−1, y) implies f (−1 + y(1 + f (−1))) = f (−1). Let us assume that 1 + f (−1) = c 6= 0. Then, for any cy − 1
achieves all real numbers and hence f (z) = f (−1) ∀z ∈ R so f is a constant, a contradiction. Hence, f (−1) = −1.
Let us assume that there is some α ∈ R such that f (α) = −1, but α 6= −1. Then, (α, y) : f (α) = f (α)+f (y)+αf (y) =⇒
0 = f (y)(1 + α). Since α 6= −1, we get f (y) = 0, y ∈ R, a contradiction. Thus, we have shown
f (x) = −1 ⇐⇒ x = −1 (1)

(x, −1) : f (x − 1 − f (x)) = f (x) − 1 − x. (2)


Since we assumed that f is not the identity, there exists a real number x0 such that f (x0 ) 6= x0 . We set a := f (x0 )−x0 =
6 0.
Putting x = x0 in the above equation gives:
f (−1 − a) = a − 1. (3)
We get from (−1 − a, y) : and equation (3)
f (−1 − a + ya) = a − 1 − af (y). (4)
If we now put y = 1, we get a(1 − f (1)) = 0 so as a 6= 0 we get f (1) = 1.
Now (1, 1) gives us f (3) = 3.
Putting (1, y − 1) gives us
f (2y − 1) = 2f (y − 1) + 1. (5)
Using f (3) = 3 in (3) with y = 3 we get f (2a − 1) = −2a − 1, while using y = a in (5) we get f (2a − 1) = 2f (a − 1) + 1,
combining the two gives us
f (a − 1) = −1 − a. (6)
We get from (a − 1, 2 − y) :
f (−a − 1 + ay) = −1 − a + af (2 − y). (7)
Combining this with (4) we get:
a(f (y) + f (2 − y) − 2) = 0. (8)
So as a 6= 0, we get f (y) + f (2 − y) = 2 for all y.
Putting y = 1 + 2x here, gives f (1 + 2x) + f (1 − 2x) = 2, which when combined with 5 with y = x + 1 gives,
f (1 − 2x) = 1 − 2f (x).
While (5) for y = 1 − x gives f (1 − 2y) = 1 + 2f (−y), which combined with the above implies f (−x) = −f (x) for all x.
Let us put (x, −y) in initial equation, and then subtract the original equation (for (x, y)). We obtain:
f (x + y(1 + f (x))) + f (x − y(1 + f (x))) = 2f (x). (9)
We substitute y with
y
1 + f (x)
and get
f (x + y) + f (x − y) = 2f (x), (10)
which is valid for all x, y, with f (x) + 1 6= 0 ⇐⇒ x 6= −1. But, from f being odd and (8), we see that this is valid for
x = −1, as well. In (10) we put x = y to obtain f (2x) = 2f (x). In the same equation we put x−y
2
, x+y
2
and obtain
f (x) + f (y) = f (x + y). (11)
Using this additivity, we can simplify the original equation:
f (xf (y)) = yf (x) (12)
In the last equation we can firstly put (1, y) =⇒ f (f (y)) = y and secondly f (y) instead of y: f (xy) = f (x)f (y).
It is well known that from identities f (1) = 1, f (xy) = f (x)f (y) and f (x + y) = f (x) + f (y) we can conclude that
f (x) = x. Which is a contradiction.
For the well known claim, we notice that f (x2 ) = f (x)2 implies f (x) ≥ 0 for x ≥ 0, which implies, combined with
f (x + y) = f (x) + f (y) that f is non-decreasing which in turn is enough to combine with the standard density of rationals
argument to solve Cauchy’s equation.
Hence, the functions presented at the start give all possible solutions.

4
Problem 4. Let C1 , C2 be circles intersecting in X, Y . Let A, D be points on C1 and B, C on C2 such that
A, X, C are collinear and D, X, B are collinear. The tangent to circle C1 at D intersects BC and the tangent to
C2 at B in P, R respectively. The tangent to C2 at C intersects AD and tangent to C1 at A, in Q, S respectively.
Let W be the intersection of AD with the tangent to C2 at B and Z the intersection of BC with the tangent
to C1 at A. Prove that the circumcircles of triangles Y W Z, RSY and P QY have two points in common, or are
tangent in the same point.
(Misiakos Panagiotis)

Solution. We present the following sketch:

Consider K, L the intersections of the pairs of tangents at (A, D) to C1 and (B, C) to C2 respectively.

5
Notice that ∠W AZ = ∠KAD = ∠AXD = ∠BXC = ∠LBC = ∠ZBW . So W ZBA is a cyclic quadrilateral. Further-
more, ∠AZB = ∠AZC = 180◦ − ∠ZAC − ∠ZCA = 180◦ − ∠AY X − ∠BY X = 180◦ − ∠AY B. Thus the circle from
A, Y, B passes from Z, and since W, Z, B, A are concyclic W, Z, B, Y, A belong to the same circle.
Analogous angle chase gives P, Q, C, Y, D concyclic.
K, Y, L, S, R are also concyclic, this follows from ∠ASC = 180◦ − ∠SAC − ∠SCA = 180◦ − ∠AY C.
We have, ∠XDY = ∠XAY and ∠Y BX = ∠Y CX which implies 4DY B ∼ 4Y AC. This implies ∠DY B = ∠AY C.
We have ∠DRB = 180◦ − ∠RDB − ∠DBR = 180◦ − ∠DY X − ∠XY B = 180◦ − ∠DY B = 180◦ − ∠AY C = 180◦ −
∠AY X − ∠XY C = 180◦ − ∠XCS − ∠XAS = ∠ASC. This implies KRSL is cyclic.
4DY B ∼ 4Y AC also implies ∠DY A = ∠BY C, as well as DY AY
= YY BC
which implies 4DY A ∼ 4BY C. This further
implies the isosceles triangles AKD and LBC have same angles so quadrilaterals DY AK and BY CL are also similar,
in particular implying ∠KY D = ∠LY B. This in turn implies 180◦ − ∠DRL = ∠DY B = ∠KY L which in turn implies
Y is on the same circle as K, R, S, L.
We now proceed to show circumcircles of Y KL, Y DC, Y AB have two common points.

6
Let F, J be the points of intersections of AC, BD with circle DY C respectively and G, I be the points of intersection of
BD,AC with circle ABY .

7
Now let M be the intersection of lines F G, JI. We will eventually prove that this will be a second common point for the
three circles.
First we show that the F DY, BJY are similar. For this note that ∠F XJ = ∠XJC + ∠XCJ = ∠F Y J + ∠DJC =
∠F Y J + 180◦ − ∠DY C =⇒ ∠F Y J = ∠F XJ − 180◦ + ∠DY C = ∠DY C − ∠AXD = ∠AY C = ∠DY B. Thus
∠F Y J = ∠DY B and so ∠F Y D ∼ ∠JY B. While ∠DJY = ∠DF Y showing 4F DY ∼ JBY as claimed.
Also 4DGY ∼ 4BIY are similar , since ∠AXB = ∠XBI + ∠BIX = ∠XBI + ∠AY B = 180◦ − ∠GY I + ∠AY B =
180◦ − ∠AY G − ∠BY I =⇒ ∠AXD = ∠AY G + ∠IY B =⇒ ∠AY G + ∠GY D = ∠AY G + ∠IY B =⇒ ∠GY D = ∠IY B.
Also, ∠BIY = ∠DGY , ∠Y BI = ∠Y AI = ∠Y AX = ∠Y DX = ∠Y DG and we get our result.
Now we get that the spiral similarity that sends D → B and F → J also sends G → I, so 4F GY ∼ 4JIY , so
∠Y GM = ∠Y IM and ∠Y F M = ∠Y JM , so M belongs to both of the circumcircles of F Y J and GIY , hence M is the
(other than Y ) common point of circumcircles of ABY and CDY .
Since ∠F M J = ∠F Y J = ∠DY B = ∠KY L it remains to show that K, L belong on the Lines F G, JI respectively (then
circle KY L would pass through M .)

8
Let H denote the point of intersection of lines AG, F D. Then ∠HDX = 180◦ − ∠F DX = 180◦ − ∠F M J = ∠GAI =
∠GAX, so H belongs to the circumcircle of triangle ADX.
Similarly denote N (the intersection of lines BI, JC) and it will for analogous reasons belong to the circumcircle of
4BXC.
Now from Pascal’s theorem for the hexagons AAXDDH and BBXCCN we derive that F, K, G as well as J, L, I are
collinear. The conclusion follows.

9
6th European Mathematical Cup
9th December 2017–23rd December 2017 MLADI NADARENI MATEMATIČARI

Marin Getaldic
Senior Category

Problems and Solutions


Problem 1. Find all functions f : N → N such that the inequality

f (x) + yf (f (x)) ≤ x(1 + f (y))

holds for all positive integers x, y.


(Adrian Beker)

Solution. We claim that f (x) = x is the only function that satisfies the inequality for all positive integers x, y.
We can see that it is indeed the solution because x + yx = x(1 + y).
Setting x = 1 and y = 1, we obtain:
f (1) + f (f (1)) ≤ 1 + f (1),
which implies f (f (1)) ≤ 1, so f (f (1)) = 1 because it must be a positive integer.
1 point.
Setting x = 1 and y = f (1), we obtain:
f (1) + f (1) ≤ 1 + f (1),
which similarly implies f (1) = 1.
3 points.
Now, setting x = 1 gives:
1 + y ≤ 1 + f (y),
so f (y) ≥ y for all positive integers y.
Setting y = 1 and using the previous fact, we write:

f (x) + f (f (x)) ≤ 2x ≤ 2f (x) = f (x) + f (x) ≤ f (x) + f (f (x)),

so equality holds on each step. In particular, f (x) = x for every positive integer x.
6 points.
Notes on marking:
• Checking that f (x) = x satisfies the inequality is worth 0 points. If a student shows that a solution, if it exists,
must be the identity function ("solves the problem"), but fails to show that the identity function is indeed the
solution, he or she shall be deducted 1 point. A sentence saying something along the lines of "it is trivial to show
that the identity function satisfies the inequality", due to the sentence being true, shall not be deducted the point.

1
Problem 2. A friendly football match lasts 90 minutes. In this problem, we consider one of the teams, coached
by Sir Alex, which plays with 11 players at all times.

a) Sir Alex wants for each of his players to play the same integer number of minutes, but each player has to
play less than 60 minutes in total. What is the minimum number of players required?
b) For the number of players found in a), what is the minimum number of substitutions required, so that each
player plays the same number of minutes?

Remark: Substitutions can only take place after a positive integer number of minutes, and players who have
come off earlier can return to the game as many times as needed. There is no limit to the number of substitutions
allowed.
(Athanasios Kontogeorgis, Demetres Christofides)

Solution. a) Since exactly 11 players play at all times, the total number of minutes played by all of the players
combined is 11 · 90 = 990. Let n be the number of Sir Alex’s players that have participated in the match and let k
be the number of minutes which each of them spent playing, with k < 60 and k ∈ Z. Now the equality nk = 990
holds.
1 point.
From that fact combined with k < 60 we get n > 17 and n|990 as well. Finally, it is easy to conclude that the
minimal such n is 18.
1 point.
Construction.
1 point.
b) We can formulate the problem by using graphs. Let us construct a graph with 18 vertices that represent the players.
Two vertices are connected by an edge if one of the corresponding players substituted the other.
1 point.
Suppose that less than 17 substitutions were made. Then the graph isn’t connected and the smallest connected
component consists of k 6 9 players among which all of their substitutions were made.
1 point.
Let us suppose that exactly r of them are on the pitch at all times. It is easy to determine that each of the 18 players
will play exactly 55 minutes. So the players from the smallest connected component will spend the combined total
of 55k minutes playing. But, from the same conclusion as earlier, we get the equality 55k = 90r. It follows that
11|r which implies r > 9 and so we reach a contradiction. ⇒ The graph is connected and at least 17 substitutions
are required.
3 points.
The following table shows a match in which each of the 18 players played 55 minutes and exactly 17 substitutions
were made (the shaded regions correspond to the time intervals played by each player).

2
2 points.
Notes on marking:
• An example for construction in a) is the construction from b) but there are far easier examples than that and any
correct one can bring that 1 point. If a student didn’t make the construction in a) but finds one in b), he or she
shall be awarded both the 1 point from a) and 2 points from b) for it but if the student doesn’t write a construction
neither in a) nor b), all 3 mentioned points are to be deducted.
• There can be an argument made for b) without observing graphs and has to be evaluated accordingly. If a student
reaches the conclusion equivalent to the smallest connected component, 2 points have to be given, one for that
conclusion and one that is intended for observing the graph in the official solution.

3
Problem 3. Let ABC be a scalene triangle and let its incircle touch sides BC, CA and AB at points D, E and
F respectively. Let line AD intersect this incircle at point X. Point M is chosen on the line F X so that the
quadrilateral AF EM is cyclic. Let lines AM and DE intersect at point L and let Q be the midpoint of segment
AE. Point T is given on the line LQ such that the quadrilateral ALDT is cyclic. Let S be a point such that
the quadrilateral T F SA is a parallelogram, and let N be the second point of intersection of the circumcircle of
triangle ASX and the line T S. Prove that the circumcircles of triangles T AN and LSA are tangent to each
other.
(Andrej Ilievski)

Solution. We present the following diagram:

0 points.

Let P be the midpoint of segment AF and let R be the second intersection of EX and the circumcircle of 4AF E. Let
K denote the intersection of lines AR and DF .

By the tangent-chord theorem, we have ∠EDX = ∠AEX. Since DEXF is cyclic, we have ∠EDX = ∠EF X = ∠EF M .
Since AF EM is cyclic, we have ∠EF M = EAM = ∠EAL. Hence, ∠AEX = EAL, so AL k EX, and analogously
AK k F X. Furthermore, we have ∠EDX = ∠EAL, i.e. ∠EDA = ∠EAL, so by the converse of the tangent-chord
theorem, LA is tangent to the circumcircle of 4AED.
2 points.
2
By power of a point, we have LA = LE · LD. If we denote the radical axis of the incircle of 4ABC and the degenerate
circle A by `, this means that L lies on `. Analogously, K lies on `.
1 point.
2 2 2 2
Now, since QA = QE , P A = P F and QE, P F are tangents to the incircle of 4ABC, it follows that P, Q both lie
on `. Since P Q is the midline of 4AEF , we have ` k EF .
1 point.
Since AL k EX, AK k F X and XF DE is cyclic, it follows that AKDL is also cyclic. Hence, K is the second intersection
of LQ and the circumcircle of 4ALD, so we must have K ≡ T , i.e. T, F, D are collinear.
1 point.
Since T F SA is a parallelogram, T S bisects the segment AF , i.e. T, P, S are collinear, which means that S lies on `.
Moreover, since AT k F S and AT k F X, it follows that F, X, S are collinear.

4
1 point.
Then since AN XS is cyclic, ∠N AX = ∠N SX. Since N S k F E, ∠N SX = ∠EF X. Since ALDT and XEDF are both
cyclic, we have ∠N T A = ∠LT A = ∠LDA = ∠EDX = ∠EF X, so ∠N AX = ∠N T A. Hence, by the converse of the
tangent-chord theorem, AX is tangent to the circumcircle of 4T AN .
2 points.
Finally, since AS k T F , i.e. AS k F D, we have ∠XAS = ∠XDF . Again, using the cyclicity of ALDT and XEDF , we
have ∠ALS = ∠ALT = ∠ADT = ∠XDF , so ∠XAS = ∠ALS. Hence, by the converse of the tangent-chord theorem,
AX is tangent to the circumcircle of 4LSA.
2 points.
Since AX is the common tangent of the circumcircles of triangles T AN and LSA, it follows that they are tangent to
each other at A, as desired.

Notes on marking:
• There are many different ways to finish the solution once the collinearities of T, F, D and F, X, S are established.
One can, for example, show that E, X, N are also collinear by noting that ∠XN S = ∠XAS = ∠XDF = ∠XEF
and using the fact that SN k F E, for which a student should be awarded 2 points. Then one can establish the
result by introducing the tangent to the circumcircle of 4T AN at A and using the tangent-chord theorem and
its converse together with the fact that ∠N T A + ∠ALS = ∠N AS holds. This part is worth 2 points. However,
points from different approaches are not additive, a student should be awarded the maximum of points obtained
from one of them.

5
Problem 4. Find all polynomials P with integer coefficients such that P (0) 6= 0 and

P n (m) · P m (n)

is a square of an integer for all nonnegative integers n, m.

Remark: For a nonnegative integer k and an integer n, P k (n) is defined as follows: P k (n) = n if k = 0
and P k (n) = P (P k−1 (n)) if k > 0.
(Adrian Beker)

Solution. Let Q(n, m) denote the assertion "P n (m) · P m (n) is a square of an integer".
We claim that P (x) = x + 1 is the unique polynomial with integer coefficients such that P (0) 6= 0 and Q(n, m) is true
for all n, m ∈ N0 .

First we check that this polynomial indeed satisfies the conditions. An easy induction on k shows that P k (n) = n + k
for all n, k ∈ N0 . Then P n (m) · P m (n) = (m + n)2 , which is clearly a square of an integer, hence Q(n, m) is true for all
n, m ∈ N0 .
1 point.
Now we show that P (x) = x + 1 is the only polynomial satisfying all the conditions.
Consider the sequence (an )n>0 defined by an = P n (0) for all n > 0. Then Q(n, 0) implies that n · an is a square of an
integer for all n ∈ N0 .
1 point.
Lemma 1. For all sufficiently large primes p, the sequence (an ) modulo p is periodic with minimal period of length
exactly p. In particular, for all sufficiently large primes p, P is bijective when considered modulo p.

Proof: Fix a prime p > max {|P (0)|, 2}. Let t be the smallest positive integer for which there exists a nonnegative
integer s < t such that as ≡ at (mod p), such a t exists by the Pigeonhole principle. Then the sequence (an ) modulo p
is eventually periodic with minimal period as , . . . , at−1 .
1 point.
Suppose that t − s < p holds, i.e. the length of the period is less than p. Note that there exists r ∈ {s, . . . , t − 1} such
that ar 6≡ 0 (mod p) since otherwise we would have P (0) ≡ 0 (mod p). Now let n be an arbitrary nonnegative integer.
Then take a positive integer k such that n + kp > s and n + kp ≡ r (mod t − s), such a k exists since p and t − s are
relatively prime.

We know that (n + kp) · an+kp is a quadratic residue modulo p, i.e. n · ar is a quadratic residue modulo p since
an+kp ≡ ar (mod p) and n + kp ≡ n (mod p). But this is impossible since n · ar attains all residues modulo p (recall
that ar 6≡ 0 (mod p)), and we know there exists a quadratic nonresidue modulo p since p > 2.

Finally, we conclude that t − s = p must hold, i.e. the length of the minimal period is p. In particular, P is sur-
jective and hence bijective when considered modulo p.
2 points.
Alternative proof: Again, fix a prime p > |P (0)|. Since p · ap is a perfect square, ap must be divisible by p. It follows
that for all n > 0, an+p = P n (ap ) ≡ P n (0) ≡ an (mod p), hence (an ) modulo p is periodic with period of length p.
1 point.
Now suppose there exist i, j ∈ {0, 1, . . . , p − 1} with i < j and ai ≡ aj (mod p). If we let l = j − i, then for each n > i we
have an+l = P n−j+l (aj ) ≡ P n−i (ai ) ≡ an (mod p). Then it immediately follows inductively that an ≡ an+kl (mod p)
for all k ∈ N0 and similarly an ≡ an+mp (mod p) for all m ∈ N0 . Since p and l are relatively prime, there exist k, m ∈ N0
such that kl − mp = 1, so we have an ≡ an+1 (mod p). It follows that the sequence is eventually constant and thus equal
to 0 modulo p, which is a contradiction. Hence, the length of the minimal period is indeed p and we conclude similarly
as in the first proof.
2 points.
Lemma 2. The degree of P is at most 1.

Proof: Assume the contrary and consider the polynomial Q(x) = P (x + 1) − P (x). Then Q is a polynomial with
integer coefficients and deg Q = deg P − 1 > 1, so Q is nonconstant. A well-known fact due to Schur implies that there
are infinitely many primes that divide Q(n) for some integer n. So there are infinitely many primes p such that P is not
bijective modulo p, contradicting the result of Lemma 1. Hence, the lemma is proved.
3 points.

6
By Lemma 2, we can write P (x) = ax + b for some a, b ∈ Z. Q(1, 0) implies that b is a perfect square, so b is a positive
integer since P (0) 6= 0.

An easy induction shows that P k (0) = b(1 + a + . . . + ak−1 ) for all k ∈ N. Q(p, 0) implies that pb(1 + a + . . . + ap−1 ) is
a perfect square, i.e. p(1 + a + . . . + ap−1 ) is a perfect square for all primes p. So 1 + a + . . . + ap−1 must be divisible
by p, but then (1 + a + . . . + ap−1 )(a − 1) = ap − 1 is also divisible by p. By Fermat’s little theorem, we know that
ap − 1 ≡ a − 1 (mod p), hence p divides a − 1 for all primes p, so we must have a = 1, i.e. P (x) = x + b.
1 point.
2 2 2 2 2
Finally, Q(1, 4) implies that 4b + 17b + 4 is a perfect square, but since (2b + 2) < 4b + 17b + 4 < (2b + 5) , 4b + 17b + 4
must be of the form (2b+k)2 for some k ∈ {3, 4}. It is easily checked that b = 1 is the only possibility, leaving P (x) = x+1
as the only solution.
1 point.
Notes on marking:
• The points from different proofs of Lemma 1 are not additive, a student should be awarded the maximum of points
obtained from one of them.

7
7th European Mathematical Cup
8th December 2018 - 16th December 2018 MLADI NADARENI MATEMATIČARI

Marin Getaldic
Senior Category

Problems and Solutions


Problem 1. A partition of a positive integer is even if all its elements are even numbers. Similarly, a partition
is odd if all its elements are odd. Determine all positive integers n such that the number of even partitions of
n is equal to the number of odd partitions of n.

Remark: A partition of a positive integer n is a non-decreasing sequence of positive integers whose sum of
elements equals n. For example, (2, 3, 4), (1, 2, 2, 2, 2) and (9) are partitions of 9.
(Ivan Novak)

Solution. Answer: n ∈ {2, 4}.

We first notice that if n is a solution, n must be even, otherwise there are no even partitions of n, and (n) is an
odd partition, so the number of odd partitions is greater then the number of even partitions.
1 point.
We now construct an injection f from the set of even partitions of n of cardinality k to odd partitions of n of cardinality 2k.

If p = (a1 , . . . , ak ), where 2 6 a1 6 a2 6 . . . 6 ak is an even partition, let

f (p) = (1, . . . , 1, a1 − 1, . . . , ak − 1).


| {z }
k times

5 points.
Obviously, f (p) is an odd partition of n. It is easy to see that f is injective because if f (p) = f (q) then the largest k
elements of f (p) and f (q) are equal, and then p and q must be equal.
2 points.
Number of odd partitions is equal to the number of even partitions if and only if f is surjective.
1 point.
It can be checked that for n = 2, n = 4, f is a bijection. Check (no points deducted if missing):

n=2 n=4
(2) → (1, 1) (4) → (1, 3)
(2, 2) → (1, 1, 1, 1)
For n > 4, partition (3, n − 3) is not in the image of f , since every element of the image contains at least one number 1,
so the number of even partition is equal to the the number of odd partitions if and only if n ∈ {2, 4}.
1 point.
Notes on marking:
• Stating that n = 2, 4 are the only solutions on its own is worth 0 points.
• Clearly attempting to construct an injection from the set of even partitions to the set of odd partitions without
success is worth 1 point.

1
Problem 2. Let ABC be a triangle with |AB| < |AC|. Let k be the circumcircle of 4ABC and let O be the
center of k. Point M is the midpoint of the arc BC
d of k not containing A. Let D be the second intersection of
the perpendicular line from M to AB with k and E be the second intersection of the perpendicular line from
M to AC with k. Points X and Y are the intersections of CD and BE with OM respectively. Denote by kb
and kc circumcircles of triangles BDX and CEY respectively. Let G and H be the second intersections of kb
and kc with AB and AC respectively. Denote by ka the circumcircle of triangle AGH.
Prove that O is the circumcenter of 4Oa Ob Oc , where Oa , Ob , Oc are the centers of ka , kb , kc respectively.
(Petar Nizić-Nikolac)

First Sketch.
k
A

ka

Oa kc

H
O
G
E
Oc
kb
Ob Y

B C

X
D
M
First Solution. We introduce standard angle notation, ∠CAB = α, ∠ABC = β and ∠BCA = γ.

∠COB
As M is midpoint of arc BC,
d we know that ∠M OB = ∠COM =
2
= ∠CAB = α, so
◦ ◦
180 − ∠BDX = 180 − ∠BDC = ∠BAC = ∠BOM = ∠BOX
implying that BDXO is a cyclic quadrilateral. Analogously we get that CEOY is a cyclic quadrilateral.
2 points.
α
Another property of M being a midpoint of arc BC
d is that ∠CAM = ∠M AB =
2
, so
 α β−γ
∠DAB = 180◦ − ∠ABD − ∠BDA = (∠BDM − 90◦ ) − ∠BCA = (90◦ − ∠M AB) − γ = 90◦ − −γ = (1)
2 2
 α  β−γ
∠EAC = 180◦ − ∠CEA − ∠ACE = ∠ABC − (90◦ − ∠CEM ) = β − (90◦ − ∠CAM ) = β − 90◦ − = (2)
2 2
Combining (1) and (2) we obtain that |BD| = |EC|.
2 points.
As B,C,D and E lie on circumcircle, |BO| = |CO| = |DO| = |EO|, thus 4BOD ∼ = 4COD. As kb and kc are
circumcircles of triangles BOD and COE respectively, we conclude that kb ∼
= kc , thus |OOb | = |OOc |.
2 points.
Now see that
∠DOB
∠AGO = ∠ODB = 90◦ − = 90◦ − ∠DAB (3)
 2 
∠EOC
∠OHA = 180◦ − ∠OEC = 180◦ − 90◦ − = 90◦ + ∠EAC (4)
2
Combining (1), (2), (3) and (4) we obtain that AGOH is a cyclic quadrilateral.
2 points.

Now as |AO| = |BO| and ∠AGO = ∠BDO we conclude that ka = kb , thus |OOa | = |OOb | = |OOc |, so O is the
circumcenter of 4Oa Ob Oc .
2 points.

2
Second Sketch.
k
A

ka

Oa kc

H
O
G
E
Oc
kb
Ob Y

B S C

X
D
M
Second Solution. We introduce standard angle notation, ∠CAB = α, ∠ABC = β and ∠BCA = γ. As M is midpoint
d we know that ∠CAM = ∠M AB = α , so
of arc BC, 2
 α β−γ
∠DAB = 180◦ − ∠ABD − ∠BDA = (∠BDM − 90◦ ) − ∠BCA = (90◦ − ∠M AB) − γ = 90◦ − −γ = (1)
2 2
 α  β−γ
∠EAC = 180◦ − ∠CEA − ∠ACE = ∠ABC − (90◦ − ∠CEM ) = β − (90◦ − ∠CAM ) = β − 90◦ − = (2)
2 2
Combining (1) and (2) we obtain that |BD| = |EC|, so BDCE is an isoscales trapezoid.
2 points.
Let S be the intersection of diagonals of BDCE. Then using (1) and (2) we have

∠DSB = ∠SBE + ∠SDC = 2∠EAC = 2∠DAB = ∠DOb D

so S lies on kb . Analogously we get that S lies on kc as well.


2 points.
Let O0 be the second intersection of kb and kc . Then

∠EO0 B = ∠EO0 S + ∠SO0 B = 360◦ − ∠SCE − ∠BDS = 2(180◦ − ∠SCE) = 2(∠EAB) = ∠EOB

and as kb is symmetric to kc over OS (perpendicular bisector of BE and CE), we conclude that O and O0 lie on that
line so O ≡ O0 , and we conclude that O is the second intersection of kb and kc .
2 points.
As kb is symmetric to kc over OS, we conclude that |OOb | = |OOc |.
1 point.
As ka = (AGH), kb = (BSOG) and kc = (CEOS), due to Miquel’s theorem we have that O lies on ka .
1 point.
Now as |AO| = |BO| and ∠AGO = ∠BDO we conclude that ka ∼
= kb , thus |OOa | = |OOb | = |OOc |, so O is the
circumcenter of 4Oa Ob Oc .
2 points.
Notes on marking:
• If a student has a partial solution with analytic methods, only points for proving facts that can be expressed in
geometric ways and lead to a compete solution can be awarded.

3
Problem 3. For which real numbers k > 1 does there exist a bounded set of positive real numbers S with at
least 3 elements such that
k(a − b) ∈ S
for all a, b ∈ S with a > b?

Remark: A set of positive real numbers S is bounded if there exists a positive real number M such that
x < M for all x ∈ S.
(Petar Nizić-Nikolac)

First Solution. Set of solutions:  √ 


1+ 5
k∈ ,2
2
Verification:

• If k = φ = 1+2 5 we can choose set {φ, 1 + φ, 1 + 2φ}. It works as φ(1 + φ − φ) = φ, φ(1 + 2φ − 1 − φ) = φ2 = 1 + φ
and φ(1 + 2φ − φ) = φ + φ2 = 1 + 2φ (all these properties are true as φ is a root of the quadratic x2 − x − 1 = 0).
• If k = 2 we can choose set {2, 3, 4}. It works as 2(3 − 2) = 2, 2(4 − 3) = 2 and 2(4 − 2) = 4.
1 point.
Now we prove that these are the only possible values of k. Suppose k > 1 such that all required properties are satisfied.

Lemma 1. k(a − b) 6 a for all a, b ∈ S with a > b

Proof. Assume the opposite, that there exist a, b ∈ S with a > b such that k(a − b) > a. Fix b and denote f (x) = k(x − b).
We have f (a) > a. Consider these two conclusion for some x such that f (x) > x:
f (x) > x =⇒ k(x − b) − b > x − b =⇒ k(k(x − b) − b) − kb > k(x − b) − kb =⇒ f (f (x)) > f (x) (1)
1 point.
f (x) > x =⇒ (k − 1)f (x) > (k − 1)x =⇒ k(f (x) − b) − k(x − b) > f (x) − x =⇒ f (f (x)) − f (x) > f (x) − x (2)
1 point.
By (1) we have that f n (a) > f n−1 (a) > . . . > f (a) > a > b so f n (a) ∈ S, ∀n ∈ N. On the other hand, by (2) we have
f k (a) − f k−1 (a) > f (a) − a for all natural k. Summing up for k from 1 to n, we obtain
n
X
f n (a) − a = (f k (a) − f k−1 (a)) > n(f (a) − a)
k=1

However, this means that f n (a) ∈ S is unbounded as n grows, which is impossible. Hence, the lemma is proved.
1 point.
Lemma 2. S has a minimum and it is greater than 0

Proof. Now, denote m = inf S. Let’s first settle the case m = 0. However, then by fixing a and taking b small
enough such that k(a − b) > a we contradict the lemma. Therefore, we have m > 0.
1 point.
Without loss of generality we can take that m = 1 as we can scale the whole set. Assume that 1 6∈ S, and then there
exists an infinite sequence of elements of S tending to 1, i.e., for every a ∈ S there exists b ∈ S with 1 < b < a. Therefore,
1 1
k(a − b) > 1 =⇒ a > b + =⇒ a > 1 +
k k
1 1
However, then every a in S is larger than 1 + k
so 1 = inf S > 1 + k
> 1, which is a contradiction. Hence min S = 1.
1 point.
1 1
Lemma 3. For some x ∈ S, if x > Gn−1 then x > Gn for all n ∈ N, where Gn = 1 + k
+ ... + kn

Proof. We prove by induction on n. Basis for n = 0 is true as


1
k(x − 1) > min S = 1 =⇒ x > 1 +
k
Now we proceed with the inductive step. Take x > Gn . This implies that
k(x − 1) > k(Gn − 1) = Gn−1
Obviously, k(x − 1) ∈ S. However, by the induction hypothesis, it follows that k(x − 1) > Gn which rearranges into
1
x> (Gn + k) = Gn+1
k
so the lemma is proved by mathematical induction.

4
1 point.
Let T = {G0 , G1 , G2 , . . .}. Assume that exists some a ∈ S \ T . Then using Lemma 3 we get that

a > Gn and a 6∈ T =⇒ a > Gn+1 and a 6∈ T =⇒ a > Gn+1


k
and as a 6= G0 = 1 = min S, then a > sup T = k−1
.
1 point.
k k
However, a 6 k−1
holds as a consequence of Lemma 2, so the only member of S \ T is k−1
. Therefore,
 
k
S⊆ , G 0 , G1 , G 2 , . . .
k−1

1 point.
However, if for some n > 1, Gn ∈ S, then Gn−1 = k(Gn − 1) ∈ S, so we have that
1
k(Gn − Gn−1 ) = ∈S
kn−1
which is impossible due to k > 1, so we in fact have
 
k+1 k
S⊆ 1, ,
k k−1

and due to |S| > 3 all three numbers must belong to the set (easy to see that they are distinct). However, then
   
k k+1 1 k+1 k
k − = ∈ 1, ,
k−1 k k−1 k k−1
n √ o
which gives k ∈ 1+2 5 , 2 , both of which satisfy the condition by verification.

1 point.

Second Solution. Verification is the same and also worth 1 point. For a set A ⊆ R+ , we will write 4A = {a − b |
a, b ∈ A, a > b}. Suppose k > 1 is such that there exists a set S with the required properties.

Lemma 1. If d ∈ 4S is not a maximal element, then kd ∈ 4S.

Proof. Let a, b ∈ S be such that a − b = d > 0. Since d is not maximal in 4S, either a is not maximal in S
or b is not minimal in S. If the former is true, then ∃c ∈ S with c > a, hence k(c − a), k(c − b) ∈ S. But then
k(c − b) − k(c − a) = k(a − b) = kd ∈ 4S, as desired. Otherwise, ∃c ∈ S with c < b, so k(b − c), k(a − c) ∈ S, hence
k(a − c) − k(b − c) = k(a − b) = kd, so we are done.
2 points.
Lemma 2. 4S is a finite geometric progression with common ratio k. In particular, S is finite.

Proof. First note that 4S must have a maximal element M . Indeed, otherwise we could take d ∈ 4S and induc-
tively obtain kn d ∈ 4S for all n ∈ N, which is absurd since 4S is bounded as S is bounded.
1 point.
n i
Now for any d ∈ 4S, take the maximal n ∈ N0 such that k d 6 M . Then it follows inductively that k d ∈ 4S for
0 6 i 6 n. By maximality of n, kn+1 d > M , so we must have kn d = M (otherwise we would have kn+1 d ∈ 4S by the
Lemma 1). It follows that d = kMn and also Mki
∈ 4S for all 0 6 i < n. Hence, 4S is a (possibly infinite) geometric
progression with common ratio k1 .
2 points.
1
Suppose that 4S is infinite. Then S contains an infinite geometric progression with ratio Then for any a, b ∈ S with
k
.
a > b, one can choose c in this progression with c < b, so that a − c > a − b. This contradicts the fact that 4S has a
maximal element, so 4S must be finite.
1 point.
m−1 2 m
Now by scaling WLOG assume that 4S = {1, k, . . . , k } for some m ∈ N. Then {k, k , . . . , k } ⊆ S, hence
4{k, k2 , . . . , km } ⊆ 4S. But note that ki+1 − ki < ki+2 − ki+1 for all 1 6 i < m − 1 and km − ki > km − ki+1
for all 1 6 i < m − 1, so it follows that |4{k, k2 , . . . , km }| > 2m − 3. Hence, 2m − 3 6 m, i.e. m 6 3.
1 point.

5
Now m > |S| − 1, so |S| 6 4. If |S| = 4, then m = 3 and it can easily be checked that S is an arithmetic progression, say
with difference d > 0. But then 4S = {d, 2d, 3d}, which is not a geometric progression. Hence, |S| = 3.
1 point.
Now we can write S = {a, b, c}, with a < b < c. As k(b − a), k(c − b) < k(c − a) and k4S ⊆ {a, b, c}, five cases arise:
k+1
• If k(b − a) = a, k(c − b) = a and k(c − a) = b. Then k
a = b = k(c − a) = k(c − b) + k(b − a) = 2a, so k = 1. 7
k
• If k(b − a) = a, k(c − b) = a and k(c − a) = c. Then k−1
a = c = k(c − a) = k(c − b) + k(b − a) = 2a, so k = 2. 3
√ √
k+1 k k2 1+ 5 1− 5
• If k(b − a) = a, k(c − b) = b and k(c − a) = c. Then k
a =b= k+1
c = (k+1)(k−1)
a, so k = 2
or 2
. 3 or 7
k
• If k(b − a) = b, k(c − b) = a and k(c − a) = c. Then b = k−1
a = c, which is impossible. 7
k+1
• If k(b − a) = b, k(c − b) = b and k(c − a) = c. Then k
b = c = k(c − a) = k(c − b) + k(b − a) = 2b, so k = 1. 7

1 point.

Third Solution. Verification is the same and also worth 1 point. We use the same notation as in the Second Solution.

Lemma 1. S is finite.

Proof. Let m = inf S, M = sup S (these exist since S is bounded both below and above as a subset of R). Then
note that sup 4S = M − m. This holds since for any a, b ∈ S we have a − b 6 M − m and moreover given any ε > 0,
there exist a, b ∈ S such that a > M − 2ε , b < m + 2ε , so that a − b > M − m − ε.
1 point.
M M k−1
Since k4S ⊆ S, we have sup(k4S) 6 M , i.e. sup 4S 6 k
, M −m6 k
,m> k
M.

m k−1
Again since k4S ⊆ S, we have inf(k4S) > m, i.e. inf 4S > k
> k2
M.
1 point.
k−1
So if a1 , a2 , . . . , an are some elements of S with m 6 a1 < a2 < . . . < an 6 M , we have ai+1 − ai > k2
M for all
1 6 i < n, so we get
n−1
M X k−1
> M − m > an − a1 = ai+1 − ai > (n − 1) · M,
k i=1
k2
2k−1
hence n 6 k−1
. In particular, S is finite.
1 point.
Lemma 2. |S| = 3.

Proof. Let a1 < a2 < . . . < an be the elements of S, and assume for the sake of contradiction that |S| > 4.

We know k(an − a1 ) > k(an−1 − a1 ) > . . . > k(a2 − a1 ) are elements of S, and there are at least n − 2 elements
of S greater than k(a2 − a1 ). This implies k(a2 − a1 ) ∈ {a1 , a2 }. Using a similar argument, k(a3 − a1 ) ∈ {a2 , a3 },
k(a3 − a2 ) ∈ {a1 , a2 } and k(a4 − a1 ) ∈ {a3 , a4 }.
2 points.
k
If k(a2 − a1 ) = a2 , then k(a3 − a1 ) = a3 , so a2 = a1 k−1 = a3 , which is impossible, therefore k(a2 − a1 ) = a1 which
implies that a2 = a1 (1 + k1 ).
1 point.
If k(a3 − a1 ) = a2 , then a3 = a1 + ak2 = a1 (1 + k1 + k12 ), so k(a3 − a2 ) = ka1 (1 + 1
k
+ 1
k2
− 1 − k1 ) = a1
k
< a1 , which is
k
impossible. Therefore, k(a3 − a1 ) = a3 which implies that a3 = a1 k−1 .
1 point.
Now, because k(a4 − a1 ) > k(a3 − a1 ) = a3 , we know that k(a4 − a1 ) = a4 as there are n − 4 differences greater than
k
this, but this implies a4 = a1 k−1 = a3 , a contradiction. Therefore, |S| = 3.
1 point.
Similar finish as in the Second Solution which is also worth 1 point.

6
Alternative proof of Lemma 2.

Fact. Let A = {a1 , a2 , . . . , an } with a1 < a2 < . . . < an and n > 3 be a finite set of real numbers such that |4A| 6 |A|.
Then either
• there exist j ∈ {1, . . . , n − 1} and 0 < d 6 aj+1 − aj such that ai+1 − ai = d for all 1 6 i < n with i 6= j or
• a2 − a1 = an − an−1 and there exists 0 < d < a2 − a1 such that ai+1 − ai = d for all 1 < i < n − 1.
Proof. Take j ∈ {1, . . . , n − 1} that maximizes aj+1 − aj . Suppose first that j can be taken so that 1 < j < n − 1.
If at+1 − at = aj+1 − aj for all 1 6 t < n, then we are done, so suppose ∃t ∈ {1, . . . , n − 1} such that at+1 − at < aj+1 − aj .

Now call a sequence of pairs of indices (l1 , r1 ), (l2 , r2 ), . . . , (ln−1 , rn−1 ) a path if (l1 , r1 ) = (j, j + 1) and (li+1 , ri+1 ) ∈
{(li , ri + 1), (li − 1, ri )} for all 1 6 i < n − 1. Define the signature of a path to be the sequence (ari − ali )16i6n−1 .

We claim that any two paths have the same signature. Indeed, note that for any path, at+1 − at , ar1 − al1 , ar2 −
al2 , . . . , arn−1 − aln−1 is a strictly increasing sequence of n elements of 4A, so the elements of the signature are fixed
since |4A| 6 n.

Now given any p < j, q > j, we can choose two paths (li , ri ) and (li0 , ri0 ) such that (lq−p , rq−p ) = (p, q) and (lq−p
0 0
, rq−p )=
(p + 1, q + 1). By the previous observation, it follows that aq − ap = aq+1 − ap+1 , i.e. ap+1 − ap = aq+1 − aq . Since
1 < j < n − 1, it follows that aq+1 − aq = a2 − a1 for all q > j and also ap+1 − ap = an − an−1 for all p < j. Since
a2 − a1 = an − an−1 , we have ai+1 − ai = a2 − a1 for all i 6= j, as desired.

It remains to deal with the case when ai+1 − ai < aj+1 − aj for 1 < i < n − 1. Note that |{ai+1 − ai | 1 6 i < n}| 6 2 since
otherwise we could choose 1 6 s, t < n and a path (li , ri ) such that as+1 −as , at+1 −at , ar1 −al1 , ar2 −al2 , . . . , arn−1 −aln−1
is a strictly increasing sequence of n + 1 elements of 4A, which is absurd. The claim now follows.
3 points.
Now we proceed by proving |S| = 3. Suppose for the sake of contradiction that |S| > 4. Enumerate S as x1 < x2 <
. . . < xn , where n > 4, Since S satisfies the hypothesis of the lemma, we may consider the following cases:

Case 1. (xi ) is an arithmetic sequence


Let d be the difference of (xi ). Then the enumeration of k4S is an arithmetic subsequence of (xi ) of length n − 1, with
difference kd. Since n > 4, it is either x1 , . . . , xn−1 or x2 , . . . , xn , so it must have difference d, contradiction.

Case 2. ∃a, b > 0, j ∈ {1, . . . , n − 1} such that a < b, xj+1 − xj = b and xi+1 − xi = a for 1 6 i < n, i 6= j
Then k4S = {ka, kb, k(b + a), . . . , k(b + (n − 2)a)}, where ka < kb < k(b + a) < . . . < k(b + (n − 2)a). Hence,
x2 − x1 = k(b − a) and xi+1 − xi = ka for 1 < i < n. It follows that j = 1, k(b − a) = b and ka = a, which is absurd
since k > 1.

Case 3. ∃a, b > 0 such that a < b, x2 − x1 = xn − xn−1 = b and xi+1 − xi = a for 1 < i < n − 1
Then k4S = {ka, kb, k(b+a), . . . , k(b+(n−3)a), k(2b+(n−3)a)}, where ka < kb < . . . < k(b+(n−3)a) < k(2b+(n−3)a).
Hence, xn − xn−1 = kb, which is absurd since k > 1.
2 points.
Notes on marking:
• A student cannot be awarded with points from two different solutions.
• In all solutions, if a student states that verification "is trivial" it should be awarded 0 points. However, it is
enough to give examples of sets for two possible values of k and then the student should be awarded 1 point. This
point can be awarded even if student hasn’t solved the problem completely.
n o
k k
• In First Solution, if a student writes explicitly that a 6 k−1 without showing that S ⊆ k−1 , G0 , G1 , G2 , . . . it
should also be awarded 1 point.

1+ 5
• In Second Solution, if a student states that deduction from |S| = 3 to k = 2
or 2 "is trivial" it should be
awarded 0 points.
• In Third Solution, if a student states that |4A| = |A| − 1 iff A is an aritmetic sequence, it should be awarded 1
point. However, if a student states just that |4A| > |A| − 1 for all sequences, it should be awarded 0 points.
• In Alternative proof of Lemma 2, if a student states correctly the whole class of sequences satisfying |4A| = |A|,
it should be awarded 1 point.
• If student’s solution is true with fact that S is finite, it should be awarded at most 7 points.
• If student proves that |S| 6 c for some c ∈ N independent of k, it should be awarded 5 points) (1 point for
verification is not included and can also be awarded separetly).

7
Problem 4. Let x, y, m, n be integers greater than 1 such that
· x ·y
x· y·
x y
x
| {z } = y| {z } .
m times n times

Does it follow that m = n?

m
Remark: This is a tetration operation, so we can also write x = n y for the initial condition.
(Petar Nizić-Nikolac)

Solution. Yes, it does. Assume for the sake of contradiction that x < y. Then m > n. Define function f recursively
(
f (logx (r)) + 1 if logx (r) ∈ N
f (r) =
0 else
 3
for example, if x = 2, then f (256) = f 22 = 2. Essentially it is the least possible height of an exponent different from x.

Lemma 1. f (y) > 1.

Proof. Let p be a prime number such that p | x (it exists as x > 1). Then p | y , so write x = pa · x0 and y = pb · y 0 ,
where p - x0 , y 0 . Let a0 = (a,b)
a
and b0 = (a,b)
b
. Let vp (r) denote the largest integer such that pvp (r) | r. Then
 n−1 
 m−1
 y m−1 n−1
x
vp (m x) = vp (n y) =⇒ vp (pa ) = vp pb =⇒ a · m−1 x = b · n−1 y =⇒ xa· x
= xb· y
=⇒
n−1 n−1 n−1 n−1 0 0
=⇒ (m x)a = xb· y
=⇒ (n y)a = xb· y
=⇒ y a· y
= xb· y
=⇒ y a = xb =⇒ y a = xb
0 0
so there exists z such that x = z a and y = z b .
2 points.
0 0 0 0
As 1 6 a < b and (a , b ) = 1, then
 0
n−2 y
b0
b n−1
y zb 0 n−2
· y−a0 ·m−2 x 0
a · m−1 x = b · n−1 y =⇒ = = = m−2 x = zb =⇒ a0 | b0 =⇒ a0 = 1 =⇒ y = xb
a0 a m−1 x
(z )a0

so we conclude that f (y) > 1.


1 point.
n
Lemma 2. f ( y) 6 2.

Proof. We have two cases depending on f (y).

Case 1. f (y) = 1

Write y = xk where f (k) = 0. Then


 n−1 
y  n−1   n−2

f (n y) = f xk = f xk· y
= f k · n−1 y + 1 = f k · xk· y

+1=1

n−2
 n−2

as if k · xk· y
= xl =⇒ f (k) = 1 or k = 1 which is impossible, so f k · xk· y
= 0.
3 points.
Case 2. f (y) > 2
k
Write y = xx . Then

k
n−1 y   k n−1     k n−2
  
f (n y) = f xx = f xx · y
= f xk · n−1 y + 1 = f xk · xx · y
+ 1 = f k + xk · n−2 y + 2 = 2

as if k + xk · n−2 y = xl =⇒ xk | k which is impossible, so f k + xk · n−2 y = 0.




3 points.
Using this conlusion we have that
2 6 m = f (m x) = f (LHS) = f (RHS) = f (n y) 6 2 =⇒ m = 2 =⇒ xx < y y = 2 y 6 n y = xx
which is impossible, so we conclude m = n.
1 point.

8
8th European Mathematical Cup
14th December 2019 - 22th December 2019 MLADI NADARENI MATEMATIČARI

Marin Getaldic
Senior Category

Problems and Solutions


Problem 1. For positive integers a and b, let M (a, b) denote their greatest common divisor. Determine all
pairs of positive integers (m, n) such that for any two positive integers x and y such that x | m and y | n,

M (x + y, mn) > 1.

(Ivan Novak)

First Solution. We will prove that there are no solutions. Let m and n be any positive integers.

Let P denote the product of all primes which divide n and don’t divide m. Then m is a divisor of m and P is a
divisor of n, but we’ll prove that m + P and mn are relatively prime.
4 points.
Let p be any prime divisor of mn.
If p divides m, then p doesn’t divide P and therefore p doesn’t divide m + P .
3 points.
If p doesn’t divide m, then p divides n, and then p divides P by definition of P , which implies that p doesn’t divide
m + P.
3 points.
Hence, m + P and mn have no common prime factors, which implies they are relatively prime. Hence, there are no
solutions.

1
Second Solution. We will prove that there are no solutions. Assume for the sake of contradiction that (m, n) was a
solution. We will recursively construct an infinite unbounded sequence of pairs of positive integers (xk , yk )k∈N such that
xk | m, yk | n and M (xk , yk ) = 1.
1 point.
Then either (xk )k∈N or (yk )k∈N will be unbounded, but xk 6 m and yk 6 n for all k ∈ N, which will yield a contradiction.
1 point.
Let (x1 , y1 ) = (1, 1). Let k ∈ N. Suppose we have constructed (xk , yk ) satisfying all of the above conditions. Then since
(m, n) is a solution, there exists a prime divisor p of both mn and xk + yk .
1 point.
If p divides m, then let (xk+1 , yk+1 ) = (pxk , yk ).
2 points.
If p divides n and doesn’t divide m, let (xk+1 , yk+1 ) = (xk , pyk ).
2 points.
In both cases xk+1 divides m and yk+1 divides n.
1 point.
Also, M (xk+1 , yk+1 ) = 1 because p does not divide neither xk nor yk (as xk and yk are relatively prime and p divides
xk + yk ). Hence, the construction is valid.
2 points.
Notes on marking:
• In the First solution, there are different choices for pairs of divisors whose sum is relatively prime with mn. For
rad(mn)
example, one can take (rad(m), ), where rad(x) denotes the product of all prime divisors of x. If a student
rad(m)
finds such a pair and claims that it is a solution without proving that their sum is relatively prime with mn, and
if the proof is as straightforward as in the official solution, he should still get 4 points from the first part of the
solution.

2
Problem 2. Let n be a positive integer. An n×n board consisting of n2 cells, each being a unit square coloured
either black or white, is called convex if for every black coloured cell, both the cell directly to the left of it and
the cell directly above it are also coloured black. We define the beauty of a board as the number of pairs of its
cells (u, v) such that u is black, v is white and u and v are in the same row or column. Determine the maximum
possible beauty of a convex n × n board.
(Ivan Novak)

First Solution. We colour the board so that in the i-th row, the leftmost n + 1 − i cells are black. We’ll call this board
the Unicorn.
1 point.
The beauty of this board equals
n−1 n−1 n−1  2
n3 − n

X X X n (n − 1) n(n − 1)(2n − 1)
2 k(n − k) = 2( nk − k2 ) = 2 − = .
2 6 3
k=1 k=1 k=1

1 point.
We’ll call any pair (u, v) such that u is white, v is black and u and v are in the same row or column a pretty pair. Now
we will prove that the beauty of every convex board is less than or equal to the beauty of the Unicorn. We will do this
by performing an algorithm which turns an arbitrary board into the Unicorn in finitely many steps.

Consider an arbitrary convex board. Let ai be the number of black coloured cells in the i-th row. We perform the
following algorithm:

If the board is equal to the Unicorn, we are done. Otherwise, find the first row in which ai 6= n + 1 − i. Then,
we consider two cases:
1. ai < n + 1 − i. We colour the ai + 1-th cell in the i-th row black.
1 point.
We claim that the beauty of the board didn’t decrease.
We now count the number of black/white cells which are in the same row or column as the cell we colored and
which are distinct from it.
The number of black cells in the same row is equal to ai , and the number of black cells in the same column is i − 1.
On the other hand, the number of white cells in the same row is n − 1 − ai and the number of white cells in the
same column is n − i.
1 point.
Therefore, the difference of beauties of the board before and after coloring the ai + 1-th cell of i-th row black is
ai + (i − 1) − (n − 1 − ai ) − (n − i) = 2(ai + i − n) 6 0, which implies that the new board’s beauty is not smaller.
1 point.
2. ai > n + 1 − i. Let j > i be the biggest index such that aj = ai . We colour the ai -th cell of the j-th column white.
1 point.
We claim that the beauty of the board didn’t decrease.
As in the first case, we count the number of black/white cells which are in the same row or column as the cell we
colored and which are distinct from it.
The number of white cells in the same row equals n − aj , and the number of white cells in the same column equals
n − j. On the other hand, the number of black cells in the same row equals aj − 1, and the number of black cells
in the same column equals j − 1.
1 point.
Therefore, the difference of beauties of the board before and after coloring the aj -th cell of j-th row white is
(n − aj ) + (n − j) − (aj − 1) − (j − 1) = 2(n + 1 − j − aj ) 6 2(n + 1 − i − ai ) < 0, which implies that the new
board’s beauty is bigger.
1 point.
The algorithm terminates because after each step, the number of positions where the board differs from the Unicorn
decreases by 1. Therefore, the maximum beauty is achieved for the Unicorn.
1+1 points.

3
Second Solution. Consider an arbitrary convex board. Let ai denote the number of black cells in the i-th row.
Furthermore, we define a0 = n and an+1 = 0. Then the number of pretty pairs (u, v) such that u and v are in the same
row equals
Xn
ai (n − ai ).
i=1

1 point.
The number of columns with at least i black cells equals ai .
1 point.
This implies that the number of columns with exactly i black cells equals the difference between the number of columns
with at least i black cells and the number of columns with at least i + 1 black cells. Therefore, the number of columns
with exactly i black cells equals ai − ai+1 .
2 points.
This implies that the number of pretty pairs (u, v) such that u and v are in the same column equals
n
X
(ai − ai+1 )i(n − i).
i=1

1 point.
Therefore, the beauty of the board equals
n
X n
X n
X
ai (n − ai ) + (ai − ai+1 )i(n − i) = ai (n − ai + i(n − i) − (i − 1)(n + 1 − i)) = ai (2n + 1 − 2i − ai ).
i=1 i=1 i=1

1 point.
For a fixed i ∈ {1, . . . , n}, ai (2n + 1 − 2i − ai ) is a quadratic function of ai , which is increasing for ai ∈ [0, n − i + 21 ] and
decreasing for ai ∈ [n − i + 12 , n], and the maximum among all integer ai is then achieved if ai ∈ {n − i, n − i + 1}.
1 point.
Therefore, the whole sum is maximised if ai ∈ {n − i, n − i + 1} for all i ∈ {1, . . . , n}.
1 point.
Any board with ai ∈ {n − i, n − i + 1} is convex since then ai > ai+1 for any of the possible choices.
1 point.
In this case, the sum equals
n n n
X X X n(n + 1)(2n + 1) − 3n(n + 1) n3 − n
(n − i)(n − i + 1) = i(i − 1) = i2 − i = = .
i=1 i=1 i=1
6 6

1 point.
Notes on marking:
• A student is awarded the maximum of the two scores he gets by following either of the two marking schemes. Points
from different solutions are not additive.
• If the student produces an optimal board, writes down its beauty, but does not simplify the expression to a closed
form, then:
a) if the student does not prove the optimality of the board (a “0+” solution), he is awarded 0 points for this part;
b) if the student proves the optimality of the board (a “10-” solution), he is awarded 1 point for this part.
• In the First Solution, the last 2 points are only awarded if he gives a correct algorithm.
• In the First Solution, if the student has a correct algorithm, but fails to prove that it terminates, he should be
deducted 1 point.
• In the Second Solution, the “other direction” is implicit in the last part of the solution. This is because the
Unicorn configuration is covered by the given equality cases. If the student gives an optimal board as in the other
solutions, and then shows that his optimal board is contained in the equality case, his solution is complete.
However, if the student does not in any way show that his lower and upper bounds match, he should be deducted
1 point.

4
Problem 3. In an acute triangle ABC with |AB| = 6 |AC|, let I be the incenter and O the circumcenter. The
incircle is tangent to BC, CA and AB in D, E and F respectively. Prove that if the line parallel to EF passing
through I, the line parallel to AO passing through D and the altitude from A are concurrent, then the point of
concurrence is the orthocenter of the triangle ABC.
(Petar Nizić-Nikolac)

Sketch.
A

T
S E

F
I
O
H

B D M D1 C
Solution. Let H be that concurrence point. We shall prove that H is the orthocenter of the triangle ABC.
Firstly we observe that AF IE is a deltoid (because |AE| = |AF | and |IE| = |IF |), so AI ⊥ EF k HI.
1 point.
Using the fact that AI is the bisector of ∠OAH and AH k ID we conclude that
∠OAH ∠HDI
∠DIH = ∠AID − 90◦ = 180◦ − ∠IAH − 90◦ = 90◦ − = 90◦ −
2 2
so triangle IHD is an isoscales one.
1 point.
Denote by T the second intersection of the line DI and the incircle and S as the point such that SHDI is a rhombus.
It follows that S lies on AH, but also that triangle ISH is an isoscales one, so
∠SIA = 90◦ − ∠SIH = 90◦ − ∠SHI = 90◦ − ∠HID = ∠AIT = ∠IAS.
Hence |AS| = |SI| = |ID| = |IT | (we used that I is the midpoint of T D), so ASIT is a rhombus.
3 points.
Lemma. A, T , O and D1 are collinear, where D1 is the point where A-excircle is tangent to BC.
Proof. Firstly, A, T and O are collinear as AT k SI k HD k AO.
1 point.
Secondly, A, T and D1 are collinear as there is homothety from A sending incircle to A-excircle, so the "highest" points
(w.r.t. BC) of these circles (T and D1 ) and the center of homothety (A) are collinear. Therefore, A, T , O and D1 are
collinear.
1 point.
|AB|+|BC|−|AC|
Denote by M the midpoint of BC. We know that |BD| = 2
= |CD1 |, so M is the midpoint of DD1 .
1 point.

As T DD1 is a right triangle and ∠OM D1 = 90 we conclude that OM is a D1 -midline in the triangle T DD1 , hence
2|OM | = |T D| = |T I| + |ID| = |AS| + |SH| = |AH|.
1 point.
Now we can conclude in various ways (for example, using the Euler line argument) that H is the orthocenter of the
triangle ABC.
1 point.

5
Notes on marking:
• Essentially, 5 points are awarded for proving that AHDT is a parallelogram with longer side being twice the size
of the shorter side, next 4 points are awarded for proving that 2|OM | = |AH| is true, and 1 point is awarded for
deduction that H is indeed an orthocenter.
• If a student states that A, T, D1 are collinear in a general triangle without using it to prove the problem (for
example, by introducing the point O and stating that it should be on the line), it should be awarded 0 points. On
the other hand, if a student uses this fact to prove the problem, it does not have to prove this fact and it is enough
to state it. In that case it is awarded 1 point.
• If a student states that 2|OM | = |AH| in a general triangle without using it to prove the problem (for example, by
noting that |OM | = |ID|), it should be awarded 0 points. On the other hand, if a student uses this fact to prove
the problem, it does not have to prove this fact and it is enough to state it. In that case it is awarded 1 point.
• If a student has a partial solution with analytic methods, only points for proving facts that can be expressed in
geometric ways and lead to a compete solution can be awarded.

6
Problem 4. Find all functions f : R → R such that
f (x) + f (yf (x) + f (y)) = f (x + 2f (y)) + xy
for all x, y ∈ R.
(Adrian Beker)

Solution. It is easily checked that f (x) = x + 1 is a valid solution. We will prove that it is the only solution. Let P (x, y)
denote the assertion
f (x) + f (yf (x) + f (y)) = f (x + 2f (y)) + xy
and let a = f (0). We will first prove the following claim:

Claim. f is injective
Proof: Suppose that f (x) = f (y) = t for some x, y ∈ R. We have:
P (x, x) =⇒ t + f (xt + t) = f (x + 2t) + x2
P (x, y) =⇒ t + f (yt + t) = f (x + 2t) + xy
Subtracting the last two equations yields f (xt+t)−f (yt+t) = x(x−y). Similarily, we have f (yt+t)−f (xt+t) = y(y −x)
which implies (x − y)2 = 0 =⇒ x = y, hence f is injective.

4 points.
We have:
P (x, 0) =⇒ f (x) + f (a) = f (x + 2a) (1)
Setting x = −a yields f (−a) = 0. Now we have:
P (x, −a) =⇒ f (−af (x)) = −ax (2)
2
Again, setting x = −a yields a = a , hence a ∈ {0, 1}.
1 point.
Case 1. a = 0
P (0, y) =⇒ f (f (y)) = f (2f (y))
Since f is injective, we have f (y) = 2f (y) =⇒ f (y) = 0 for all y ∈ R, which is clearly impossible.
1 point.
Case 2. a = 1
Now (2) implies f (−f (x)) = −x for all x ∈ R This means that f is bijective. On the other hand, (1) implies that
f (x) + f (1) = f (x + 2) for all x ∈ R.
P (x + 2, y) =⇒ f (x + 2) + f (yf (x + 2) + f (y)) = f (x + 2 + 2f (y)) + (x + 2)y
f (x) + f (y) + f (yf (x) + f (y) + yf (1)) = f (x + 2f (y)) + f (1) + xy + 2y
1 point.
By subtracting the initial equation from this one, we obtain:
f (yf (x) + f (y) + yf (1)) = f (yf (x) + f (y)) + 2y
If y 6= 0, we can choose x ∈ R such that f (x) = − f (y)
y
because f is surjective, hence the last equation yields:
f (yf (1)) = 2y + 1
2 points.
for all y 6= 0, but it is also true for y = 0. In particular, setting y = − 12
yields f (− f (1)
2
)
= 0. Since f is injective and
f (−1) =0, it follows that f (1) = 2 =⇒ f (2y) = 2y + 1 for all y ∈ R. Finally, we deduce that f (x) = x + 1 for all x ∈ R,
as desired.
1 point.
Notes on marking:
• The case a = 1 can be finished without injectivity. If a student deduces that f is linear and checks that the only
option for f is f (x) = x + 1, he should get 1 point.
• If a student manages to prove that f is injective in the case a = 0, he should get 4 points from the first part of
the solution since in the case a = 1 the proof can be finished without injectivity.
• If a student doesn’t check that f (x) = x + 1 is indeed a solution or at least mention that it can be easily checked,
he should lose 1 point.

7
9th European Mathematical Cup
12th December 2020 - 20th December 2020 MLADI NADARENI MATEMATIČARI

Marin Getaldic
Senior Category

Problems and Solutions


Problem 1. Let ABCD be a parallelogram in which |AB| > |BC|. Let O be a point on the line CD such that
|OB| = |OD|. Let ω be a circle with center O and radius |OC|. If T is the second intersection of ω and CD,
prove that AT, BO and ω are concurrent.

First Solution. Let R denote the intersection od ω and line BO such that O is located between B and R. We will
prove that A, T and R are collinear.
0 points.
Let X be the intersection of the diagonals of ABCD.

A B

C
D T O

We know that X is the midpoint of AC and O is the midpoint of T C so we conclude that XO||AT .
2 points.
X is also the midpoint of BD so, since triangle OBD is isosceles, OX ⊥ BD.
2 points.
This means that AT ⊥ BD.
1 point.
Now because of |DO| = |BO| we have
∠DOR = 2∠ODB
and because |OT | = |OR| we have
∠OT R = 90o − ∠ODB

1
2 points.
Finally we have
∠AT D = 90o − ∠BDC = ∠OT R
and so A, T and R are collinear as desired.
3 points.

Second Solution. Define R as the intersection of the ray BO with ω such that O is between B and R. We will prove
that A, T and R are collinear.
0 points.
Since |BO| = |DO| and |OR| = |OC|, we have:

|BR| = |BO| + |OR| = |DO| + |OC| = |CD| = |BA|.


Therefore, triangle BRA is isosceles.
5 points.
Now, due to the triangles T OR and BRA being isosceles, we have:
180◦ − |∠RBA|
|∠BRA| =
2
and
180◦ − |∠ROT |
= |∠ORT | = |∠BRT |
2
.
2 points.
Finally, since |∠RBA| = |∠T OR|, we have
|∠BRA| = |∠BRT |
, so R, T and A are collinear, which proves the claim.
3 points.

Third Solution. Let R0 be the intersection of line AT and ω different from T . We will prove that points B, O and R0
are collinear.
0 points.
Let X be the intersection of the diagonals of the parallelogram ABCD.

A B

C
D T O

R0

Now as in the first solution we conclude that XO||AT and OX ⊥ BD, which leads to AT being perpendicular to BD.

2
5 points.
Let S be the intersection of ω and ray OB. Since triangles ODB and OT S are isosceles with ∠DOB = ∠T OS, these
triangles are similar, which means that T S||BD.
2 points.
From this it follows that ST ⊥ AT , i.e. ∠ST R0 = 90◦ . This means that SR0 is the diameter of ω, and as we know that
B, S and O are collinear, we conclude that B, O and R0 are collinear.
3 points.

Fourth Solution. Let R00 be the intersection of lines AT and BO. We will show that R00 lies on the circle ω.
0 points.
Let X be the intersection of the diagonals of the parallelogram ABCD.

A B

C
D T O

R00

As in the first solution we conclude that XO||AT , OX ⊥ BD and AT ⊥ BD.


5 points.
Denote ∠T R00 O = α. Since AT ⊥ BD, we have

∠OBD = 90◦ − α.

Now, due to the triangle ODB being isosceles, we have

∠ODB = 90◦ − α.

2 points.
Using again the fact that AT ⊥ BD, it follows that

∠R00 T O = ∠AT D = α.

We can now conclude that |OT | = |OR00 |, which proves the claim.
3 points.
Notes on marking:
• Points from different solutions are not additive. Student’s score should be the maximum of points scored over all
solutions.
• If a student has a partial solution with analytic methods, only points for proving facts that can be expressed in
geometric ways and lead to a complete solution can be awarded.

3
Problem 2. Let n and k be positive integers. An n-tuple (a1 , a2 , . . . , an ) is called a permutation if every
number from the set {1, 2, . . . , n} occurs in it exactly once. For a permutation (p1 , p2 , . . . , pn ), we define its
k-mutation to be the n-tuple
(p1 + p1+k , p2 + p2+k , . . . , pn + pn+k ),
where indices are taken modulo n. Find all pairs (n, k) such that every two distinct permutations have distinct
k-mutations.

Remark: For example, when (n, k) = (4, 2), the 2-mutation of (1, 2, 4, 3) is (1 + 4, 2 + 3, 4 + 1, 3 + 2) = (5, 5, 5, 5).
(Borna Šimić)

First Solution. Let f denote the function that, when given a permutation, returns its k-mutation.
Let M (a, b) denote the greatest common divisor of a and b.
The answer is all (n, k) such that n/M (n, k) is odd.

Suppose that n/M (n, k) is odd.


Consider permutations p, q such that f (p) = f (q). Suppose for the sake of contradiction that there exists some t 6 n
such that pt > qt . We have:
pt + pt+k = qt + qt+k
so we must have pt+k < qt+k , and pt+2k > qt+2k . Inductively, we obtain pt+dk < qt+dk for all odd d (where the indices
are taken modulo n).
2 points.
However, n/M (n, k) is odd and we have pt+nk/M (n,k) = pt and qt+nk/M (n,k) = qt . However, then pt < qt , which is a
contradiction. Therefore, p = q, which proves that all (n, k) for which n/M (n, k) is odd are solutions.
3 points.
We will now show that when n/M (n, k) is even, there exist distinct permutations p, q such that f (p) = f (q).
Firstly, fix n, and for (n, k) = (2m, 1) for some m ∈ N take:
p1 = (1, 2, 3, . . . 2m − 1, 2m)
q 1 = (2, 1, 4, . . . 2m, 2m − 1)
It’s easy to see that f (p1 ) = f (q 1 ).
1 point.
Now, if k = 2u − 1 for some u > 1 such that M (n, 2u − 1) = 1, define permutations p , q by taking
u u

pu(m−1)k+1 = p1m and q(i−1)k+1


u
= qi1 ,
where indices are taken modulo n. (For example, for p1 and pu , pu1 = p11 = 1, puk+1 = p12 = 2 and so on).
As k and n are relatively prime, pu and q u are well defined, because the map x 7→ (x − 1)k + 1 is a bijection on the set
of residues modulo n. Furthermore, it’s easy to see that f (pu ) = f (q u ) holds, because f (p1 ) = f (q 1 ) holds.
2 points.

Finally, a construction for (n, 2u − 1) can be expanded to a construction for (ln, l(2u − 1)), by defining p(lj) = pu (j) and
q(lj) = q u (j) for every j, and setting p(x) = q(x) for x which are not divisible by l (it is not important how p and q are
defined on the set of numbers not divisible by l, it’s only important that they are equal on this set). Since f (pu ) = f (q u ),
we conclude that f (p) = f (q) also holds.

Since any pair of positive integers (n, k) for which n/M (n, k) is even can be written in this form, we’ve proved the
claim.
2 points.

Second Solution. Let the notation be the same as in the first solution. Let d be an odd positive integer. Consider
some permutations p, q such that f (p) = f (q). This gives us the following sequence of equations for i = 1, 2, . . . , n:
pi + pi+k = qi + qi+k (1)
pi+k + pi+2k = qi+k + qi+2k (2)
.. ..
. = .
pi+(d−2)k + pi+(d−1)k = qi+(d−2)k + qi+(d−1)k (d − 1)
pi+(d−1)k + pi+dk = qi+(d−1)k + qi+dk (d)

4
We telescope the equations: (d − 1) − (d − 2) + (d − 3) − . . . + . . . − (1). Since d is odd, we obtain:

pi+(d−1)k − pi = qi+(d−1)k − qi

We subtract that from (d) and obtain: pi+dk + pi = qi+dk + qi .


2 points.
Since this equality holds for every odd d, it also holds for n/M (n, k). Since pi+nk/M (n,k) = pi and qi+nk/M (n,k) = qi , we
conclude that 2pi = 2qi for all i. Therefore, p = q.
3 points.
The case where n/M (n, k) is even is the same as in the first solution.
5 points.
Notes on marking:
• Note that the set of solutions can also be characterized as the set of all pairs (n, k) such that ν2 (n) 6 ν2 (k), where
ν2 (x) denotes the largest nonnegative integer y such that 2y | x. Of course, this characterization or any other
trivially equivalent characterization of the set of solutions is valid.

5
Problem 3. Let p be a prime number. Troy and Abed are playing a game. Troy writes a positive integer X
on the board, and gives a sequence (an )n∈N of positive integers to Abed. Abed now makes a sequence of moves.
The n-th move is the following:

Replace Y currently written on the board with either Y + an or Y · an .

Abed wins if at some point the number on the board is a multiple of p. Determine whether Abed can win,
regardless of Troy’s choices, if
a) p = 109 + 7;
b) p = 109 + 9.
Remark: Both 109 + 7 and 109 + 9 are prime.
(Ivan Novak)

Solution. We will prove that Abed cannot win in either case.


0 points.
We now explain Troy’s strategies. Throughout the solution, we will use fractions modulo p.

a) Suppose p = 109 + 7. Note that p ≡ 2 (mod 3). Let X = 2. We will define the sequence (an )n∈N recursively. Note
that neither 2 nor 2 − 1 is divisible by p.

Suppose we’ve defined a1 , . . . , an−1 , where n ∈ N, and suppose that whatever Abed’s first n − 1 moves are, the number
on the board after these n − 1 moves is congruent to Y modulo p, and neither Y nor Y − 1 are divisible by p.
We now prove that there exists a positive integer k such that Y + k ≡ Y k (mod p), and neither Y k nor Y k − 1 are not
divisible by p.

Y2
Indeed, let k ≡ Y
Y −1
(mod p). Note that this is well defined since Y − 1 is not divisible by p. Then Y + k ≡ Y k ≡ Y −1
Y2
(mod p). Note that Y −1
6≡ 0 (mod p) since Y 6≡ 0 (mod p).
1 point.
Y2
Suppose for the sake of contradiction that ≡ 1 (mod p). This implies that p | Y − Y + 1. However, this would
Y −1
2

imply p | (−Y )3 − 1.
This means that ordp (−Y ) | 3. Since p ≡ 2 (mod 3) and ordp (−Y ) | p − 1, it follows that ordp (−Y ) 6= 3. This forces
2
ordp (−Y ) = 1. However, then Y ≡ −1 (mod p), which implies Y 2 − Y + 1 ≡ 3 6≡ 0 (mod p). Therefore, YY−1 6≡ 1
(mod p).
2 points.
We define an := k. No matter what Abed’s first n moves are, the number on the board after n moves is congruent to
Y2
Y −1
modulo p, which is not congruent to 0 or 1 modulo p. Therefore, Abed cannot win after n steps. Since this claim
is true for any positive integer n, we conclude that Abed cannot win.
1 point.
b) Suppose p = 109 + 9. Note that p ≡ 1 (mod 4), which means that there exists a positive integer z such that
z 2 ≡ −1 (mod p). Then there also exists a positive integer t such that (2t − 1)2 ≡ −1 (mod p).
Let X = t. Note that neither X nor X − 1 are divisible by p, and note that 4X 2 − 4X + 2 ≡ 0 (mod p).
1 point.
2
Let a1 ≡ X
X−1
(mod p). Then a1 + X ≡ a1 X ≡ X
X−1
(mod p). Therefore, whatever Abed’s first move is, the number on
X2 X2
the board after the first move will be congruent to X−1 modulo p. Furthermore, X−1 is not divisible by p since X isn’t.
X2
Suppose for the sake of contradiction that X−1
≡ 1 (mod p). Then 4X 2 − 4X + 4 ≡ 0 (mod p), but, by definition of X,
X2
4X 2 − 4X + 2 ≡ 0 (mod p), which implies 2 ≡ 0 (mod p), which is a contradiction. Therefore, X−1
6≡ 1 (mod p).
1 point.
X2
Let a2 ≡ X 2 −X+1
(mod p). Note that this is well defined since X − X + 1 6≡ 0 (mod p). Whatever Abed’s second move
2

X2 X2 X4
is, the number on the board will be congruent to X−1
+ X 2 −X+1
≡ (X 2 −X+1)(X−1)
(mod p). Now note that

X4
≡X (mod p) ⇐⇒ X 3 ≡ (X 2 − X + 1)(X − 1) (mod p) ⇐⇒ 2X 2 − 2X + 1 ≡ 0 (mod p),
(X 2 − X + 1)(X − 1)
which is true by definition of X. Therefore, whatever Abed’s first two moves are, the number written on the board after
the first two moves will be congruent to X modulo p.

6
4 points.
Thus, if we define a2j−1 := a1 and a2j := a2 for j > 2, no matter what moves Abed makes, the number on the board
will never be divisible by p.
0 points.
Notes on marking:
• Part a) is worth 4 points, and part b) is worth 6 points.
• The idea of making it impossible for Abed to affect the numbers on the board modulo p, although used in both
parts, is worth 0 points on its own.
• In part a), if a student doesn’t prove that x2 − x + 1 doesn’t have prime divisors of the form 3k + 2, but instead
states that this fact is well known and checks that 109 + 7 is of the form 3k + 2, they should be awarded all the
points intended for this part.
• In part b), the idea of 2-periodicity of the game state is worth 0 points on its own.
• Due to overlapping arguments, if a student solves b), but does not solve a), then they get 0 points for the very
first point in part a). This point is then merged with the second block of 2 points in part a).

7
Problem 4. Let R+ denote the set of all positive real numbers. Find all functions f : R+ → R+ such that

xf (x + y) + f (xf (y) + 1) = f (xf (x))

for all x, y ∈ R+ .
(Amadej Kristjan Kocbek, Jakob Jurij Snoj)

First Solution. Let f be a function satisfying the equation. We split the solution into a series of claims.
Claim 1. f (x) < f (f (1)) for all x > 1.
Proof. Substituting x = 1 gives

f (y + 1) + f (f (y) + 1) = f (f (1)). (3)

Since the function only attains positive values, we have f (y + 1) < f (f (1)) for all y, and the conclusion follows.

Claim 2. The function f is injective.


Proof. Assume the contrary and choose a < b such that f (a) = f (b). Substituting y = a and, afterwards, y = b into the
original equations and comparing the equations gives

f (x + a) = f (x + b) for all x ∈ R+ .

Hence, f is periodic for all x > P for some constant P ∈ R+ with period p = b − a. Fix some x1 , y1 ∈ R+ with
x1 > P and pick a positive integer n such that (x1 + np)f (x1 + y1 ) > f (f (1)) and (x1 + np)f (x1 ) > 1. Substituting
x = x1 + np, y = y1 gives

(x1 + np)f ((x1 + np) + y1 ) + f ((x1 + np)f (y1 ) + 1) = f ((x1 + np)f (x1 + np))
(x1 + np)f (x1 + y1 ) + f ((x1 + np)f (y1 ) + 1) = f ((x1 + np)f (x1 ))

after using periodicity to simplify the equation. Due to our choice of n and the function only attaining positive values,
we have
f ((x1 + np)f (x1 )) > (x1 + np)f (x1 + y1 ) > f (f (1)).
However, since we have (x1 + np)f (x1 ) > 1, Claim 1 implies f ((x1 + np)f (x1 )) < f (f (1)), leading to a contradiction.
Therefore, such a and b do not exist and f is injective.
2 points.
Claim 3. f (f (x)) = x for all x ∈ R .
+

Proof. We substitute y = f (y) into (1). Comparing the resulting equation with (1) gives:

f (f (y) + 1) + f (f (f (y)) + 1) = f (y + 1) + f (f (y) + 1)


f (f (f (y)) + 1) = f (y + 1)

Using injectivity, we get f (f (y)) = y for all y ∈ R+ .


1 point.
Claim 4. For all x ∈ R , xf (x) 6 1. In particular, f (a) 6 for all a > x.
+ 1
x
Proof. Assume the contrary - there exists some c ∈ R+ such that cf (c) > 1. Substituting y = f (y) and using Claim 3,
we transform the original equation:
xf (x + f (y)) + f (xy + 1) = f (xf (x)).
Substituting x = c, y = cf (c)−1
c
into the above equation gives cf (c + f ((cf (c) − 1)/c)) = 0 after cancellation of the terms,
a clear contradiction. The second part of the claim follows immediately.
1 point.
Claim 5. For all x ∈ R , we have f (xf (x)) 6 1.
+

Proof. We notice
x
f (xf (x)) = xf (x + y) + f (xf (y) + 1) < xf (x + y) + 1 6 + 1,
x+y
where the inequalities hold due to Claim 1 and Claim 4, respectively, as well as the identity f (f (1)) = 1. Assume there
exists a c such that f (cf (c)) > 1: therefore, it should hold that
c
f (cf (c)) < + 1.
c+y
However, the left hand side of the above inequality is independent of y. Thus, for y sufficiently large, the opposite
direction of the inequality will hold since c/(c + y) can get arbitrarily small, which leads to a contradiction.
1 point.

8
Claim 6. For all x ∈ R+ , f (xf (x)) > 1.
Proof. Assume the contrary. Therefore, there exists some a such that f (af (a)) < 1, let f (af (a)) = 1 − e. By Claim 4,
there exists a Y ∈ R+ such that f (y + 1) < e for all y > Y . Let d > Y . Observing (1) after substituting y = d, we notice

f (f (d) + 1) = 1 − f (d + 1) > 1 − e.
 
Substituting x = a, y = f f (d)
a
into the original equation gives
  
f (d)
1 − e = f (af (a)) = af a + f + f (f (d) + 1) > 1 − e,
a

a contradiction.
4 points.
Finally, observe Claims 5 and 6 together yield f (xf (x)) = 1 for all x ∈ R . By injectivity, xf (x) is constant, hence
+

f (x) = xc for some constant c ∈ R+ . By checking, we see c = 1 yields the only valid solution, f (x) = x1 .
1 point.

Second Solution. We present an alternative way of proving f (xf (x)) is constant after obtaining the first four claims
of the first solution.
Assume there exist a and b such that f (af (a)) − f (bf  (b)) 6= 0. Without loss of generality, we can assume f (af (a)) −
f (bf (b)) > 0. We now substitute (x, y) with a, f xa and b, f xb and subtract the resulting equations to obtain


  x    x     x      x  
f (af (a)) − f (bf (b)) = af a + f − bf b + f + f af f + 1 − f bf f +1
 xa   xb   x a  x  b
= af a + f − bf b + f +f a· +1 −f b· +1
 xa   xb  a b
= af a + f − bf b + f .
a b
1 point.
This shows that, as x varies, the expression af a + f x
is constant. As f is an involution and thus
x
 
− bf b + f
a b
surjective, we can choose a number x1 ∈ R+ such that a + f xa1 > f (af (a))−f a
(bf (b))
. Substituting x with x1 in the above
equation and using Claim 4, we obtain
  x    x 
1 1
f (af (a)) − f (bf (b)) = af a + f − bf b + f
 a
 x  b
1
< af a + f
a
a
6 x 
1
a+f
a
< f (af (a)) − f (bf (b)),

which leads to a contradiction. Therefore, f (xf (x)) is constant.


4 points.
As in the first solution, this now implies xf (x) is constant, therefore, f is of the form f (x) = c
x
for some constant c. We
can easily check f (x) = x1 is the only valid solution.
1 point.

Notes on marking:
• If a student doesn’t check that f (x) = 1
x
is indeed a solution or at least mention that it can be easily checked, they
should lose 1 point.
• Points from two marking schemes are not additive.

9
10th European Mathematical
Cup MLADI NADARENI MATEMATIČARI

11th December 2021 - 19th December 2021 Marin Getaldic


Senior Category

Problems and Solutions


Problem 1. Alice drew a regular 2021-gon in the plane. Bob then labelled each vertex of the 2021-gon with a
real number, in such a way that the labels of consecutive vertices differ by at most 1. Then, for every pair of
non-consecutive vertices whose labels differ by at most 1, Alice drew a diagonal connecting them. Let d be the
number of diagonals Alice drew. Find the least possible value that d can obtain.
(Ivan Novak)

First Solution. Consider the following labelling of the vertices, where the i-th number of the 2021-tuple below is the
label of the i-th vertex:
(0.5, 1.5, 2.5, . . . , 1009.5, 1010.5, 1010, 1009, 1008, . . . , 2, 1).
It’s easy to see that in this case, Alice will draw 2018 diagonals, those connecting the vertices whose pairs of labels are
{1.5, 1}, {2.5, 2}, . . . , {1009.5, 1009} and {1.5, 2}, {2.5, 3}, . . . , {1009.5, 1010}.
3 points.
We now prove that 2018 is the minimum amount of diagonals Alice could have drawn. Call any labelling of a convex
n-gon which satisfies the condition that consecutive vertices have labels which differ by at most 1 a sweet labelling, and
also call the corresponding n-gon sweet.
We will prove by mathematical induction that for every n > 3, in any sweet labelling of an n-gon, there are at least n − 3
pairs of nonconsecutive vertices whose labels differ by at most 1. The claim is obvious for n = 3. Suppose that the claim
is true for some positive integer n.
Consider a sweet labelling of some n + 1-gon P . Consider a vertex v with the maximum label, L. Then both of its
neighbouring vertices have labels in the set [L − 1, L], which means that their labels differ by at most 1.
1 point.
Then the n-gon P obtained from P by erasing v and connecting its neighbouring vertices is also sweet.
0

2 points.
Applying the inductive hypothesis on it, there are at least n − 3 pairs of nonconsecutive vertices of P whose labels differ
0

by at most 1. Adding the pair of neighbours of v, we conclude that P has at most n − 2 pairs of such vertices. This
completes the step of the induction.
4 points.

Second Solution. The example which achieves the desired bound is the same as in the previous solution.
3 points.
Let the labels of the vertices of the 2021-gon be v1 , . . . , v2021 , where we assume the labels to be ordered so that
v1 6 . . . 6 v2021 . Note that this is not necessarily the order in which the values appear on the 2021-gon.

We claim that |vi − vi+2 | 6 1, for all i = 1, 2, . . . , 2019.


Assume for the sake of contradiction that there exists an i ∈ {1, 2, . . . , 2019} for which vi+2 −vi > 1. Start a circular walk
around the 2021-gon, going from the vertex which has the value v1 , visiting all of the vertices one by one, and returning
back to the starting vertex. Doing so visits the values v1 , . . . , v2021 in a certain permuted order, starting and ending on v1 .

1
We look at the first time during the walk when we step on a value whose index is greater than or equal to i + 2. Let
this index be j > i + 2. Let’s say that on the previous step, we were on value vb , where b 6 i + 1. Note that if b 6 i,
then vj − vb > vi+2 − vi > 1, so it must be the case that b = i + 1. Next, we look at the first time we return to an index
which is smaller than or equal to i. Such an index must exist since we eventually return back to v1 , and we’ll denote it
by k. A similar argument as for vj shows that in the step before reaching vk , we must have been on index b. This is a
contradiction as no vertex can be visited more than once, except for the one we started with.
5 points.
We now have |vi − vj | 6 1, for all i = 3, . . . , 2019 and j ∈ {i − 1, i − 2, i + 1, i + 2}, |v1 − vi | 6 1 for j ∈ {2, 3} and
|vj − v2021 | 6 1 for j ∈ {2019, 2020}, which gives at least 12 (2 + 3 + 4 · 2017 + 3 + 2) − 2021 = 2018 diagonals.
2 points.

Third Solution. The example which achieves the desired bound is the same as in the previous solution.
3 points.
Note that
We label the vertices v1 , v2 , . . ., v2021 , and, respectively, their labels x1 , x2 , . . ., x2021 and view the indices modulo 2021.
We’ll say vertices (vi , vj ) are a nigh pair if their labels differ by at most 1.
Without loss of generality, let 1 and g be the indices among {1, 2, . . . , 2021} of the vertices with the smallest and greatest
label, respectively. Without loss of generality we can also assume g 6 1011 since we can otherwise mirror the 2021-gon.
Additionally, we will assume that g > 4 , and the cases g = 3 and g = 2 are dealt with separately. We make use of the
following lemmas.
Lemma 1. For every 1 < k < g, there are at least two indices g 6 i, j 6 2022 such that (vk , vi ) and (vk , vj ) are pairs of
nigh vertices. Similarly, for every g < k < 2022, there are at least two indices 1 6 i, j 6 g such that (vk , vi ) and (vk , vj )
are pairs of nigh vertices.
Proof. As the statement is obviously symmetric, we will only prove the first half. Let m and M be the smallest and the
biggest label, respectively. If xk 6 m + 1, v2021 and v1 satisfy the condition of the lemma. Similarly, if xk > M − 1,
vg and vg+1 satisfy the condition of the lemma. Otherwise, there are at least two indices within the desired range with
labels in [x − 1, x + 1] due to the Intermediate Value Theorem. Namely, if we imagine jumping along the vertices from v1
do vg , at the vertex v1 the label is less than x − 1 and at the vertex vg the label is greater than x + 1. Then at some point
in between we must have been at a vertex whose label is from [x − 1, x) and at a vertex whose label is from [x, x + 1).
4 points.
Lemma 2. At most one of the vertices v2021 and v2 and at most one of the vertices vg−1 and vg+1 can be elements of
three nigh pairs.
Proof. Clearly, due to Lemma 1, both v2021 and v2 are elements of at least three nigh pairs. Assume both vertices are
elements of exactly three nigh pairs. Assume that x2021 6 x2 . It follows that x2 − 1 6 x1 6 x2020 6 x2021 + 1 6 x2 + 1,
therefore, v2020 , v2021 , v1 and v3 are four vertices forming nigh pairs with v2 , a contradiction. We treat the other cases
analogously.

2 points.

Finally, due to Lemma 1, each vertex not neighbouring with g or 1 forms at least 4 nigh pairs. The vertices v1 and vg
form at least 2 nigh pairs and at most two of their neighbouring vertices form 3 nigh pairs. The minimal number of nigh
pairs is therefore 12 · (2017 · 4 + 2 · 3 + 2 · 2) = 4039.
1 point.
Assume g 6 3. If g = 2, all the pairs of vertices are nigh as their labels are all in the set [x1 , x2 ]. If g = 3, each vertex
forms a nigh pair with at least one of v1 or v3 . Without loss of generality, more than half of the remaining vertices form
nigh pairs with v1 . But then all of those vertices are nigh as well, so there are at least 1015
2
> 4039 nigh pairs, making
this case suboptimal as well.
0 points.
Notes on marking:
• Points from different solutions are not additive. Student’s score should be the maximum of points scored over all
solutions.
• Miscounting the number d in the optimal example or making a similar minor mistake in that part should be awarded
2 points out of possible 3 for that part of the solution.
• In the first solution, just stating the idea of induction is worth no points on its own.
• In the third solution, dealing with the case g 6 3 is worth no points on its own. However, a contestant who doesn’t
comment these cases can get at most 9 points for their solution.

2
Problem 2. Let ABC be a triangle and let D, E and F be the midpoints of sides BC, CA and AB, respectively.
Let X 6= A be the intersection of AD with the circumcircle of ABC. Let Ω be the circle through D and X,
tangent to the circumcircle of ABC. Let Y and Z be the intersections of the tangent to Ω at D with the
perpendicular bisectors of segments DE and DF , respectively. Let P be the intersection of Y E and ZF and
let G be the centroid of ABC. Show that the tangents at B and C to the circumcircle of ABC and the line
P G are concurrent.
(Jakob Jurij Snoj)

E
F

Z
D C

B
Y
X

First Solution. Due to the collinearity of A, X and D, there is a homothety at X sending the circumcircle of ABC to
Ω. This homothety also sends the tangent at A to the circumcircle of ABC to the tangent at D of Ω.
1 point.
The homothety in G with ratio − 12sends the circumcircle of ABC to its nine-point circle and the tangent at A to the
circumcircle to the tangent at D to the nine-point circle. These tangents are therefore parallel. It follows that Ω and
the nine-point circle of ABC share a tangent at D.
2 points.
As Y and Z lie on the perpendicular bisectors of DE and DF , respectively, it follows that |Y D| = |Y E| and Y E is also
tangent to the nine-point circle of ABC - similarly, ZF is also tangent to this circle. We conclude that the nine-point
circle of ABC is the incircle of P Y Z.
3 points.
Finally, the homothety at G sending the circumcircle of ABC to its nine-point circle sends the tangents through A, B
and C to the circumcircle of ABC respectively to the tangents at D, E and F to the nine-point circle of ABC. It,
therefore, sends the intersection of tangents at B and C to the circumcircle of ABC to the point P , thus proving the
desired collinearity.
4 points.

3
A P

F E
G

Y
T
B D C

X
Z

Second Solution. As in the previous solution, we prove that the tangent at D to Ω is parallel to the tangent at A to
the circumcircle of ABC.
1 point.
Let ^BAC = α, ^ABC = β, ^ACB = γ. Let Q be the intersection of the tangents at B and C to the circumcircle of
ABC. It now suffices to prove that G lies on P Q.
0 points.
Let T be the point on BC such that the line T A is tangent to the circumcircle of ABC at A. By the tangent-chord
theorem, we have ^T AB = γ, which implies ^AT B = β − γ. Since ZY k T A and ^Y DC = ^AT B = β − γ.
1 point.
By definion of Y , we have |EY | = |DY |. Since DE is a midline of ABC, we have ^EDC = ^ABC = β. Thus
^DEY = ^EDY = ^EDC − ^Y DC = β − (β − γ) = γ.
2 points.
Furthermore, note that ^BED + ^DBE = ^EDC = β, and ^QBC = α, by the tangent-chord theorem. This implies
^QBE + ^BEY = (^QBC + ^DBE) + (^BED + ^DEY ) = α + β + γ = 180◦
so QB k P E. By analogous reasoning we conclude that QC k P F .
2 points.
Since EF is a midline of ABC, we have that the sides EP , P F , EF of triangle P EF are parallel to the sides QB, QC,
BC of triangle QBC, respectively. Those triangles are not congruent because EF = BC 2
, so there exists a homothety
which maps P EF to QBC. The centre of the homothety is the intersection of BE, CF , and P Q, which implies that G
lies on P Q and we are done.
4 points.
Notes on marking:
• In the second solution, once we obtain ^DEY = ^EDY = γ, we can conclude that Y E is tangent to the circumcircle
of DEF and finish as in the first solution.
• The final 4 points in either solution can only be awarded if the student correctly proves the other steps of the
problem. Otherwise, a contestant can only obtain up to 2 points for this part of the solution.
• No points are deducted if the student fails to argue that 4P Y Z and the triangle formed by the tangents through
A, B and C to the circumcircle of ABC are not congruent.
• Analytic approaches are only awarded points if their results are correctly interpreted by geometric means.

4
Problem 3. Let N denote the set of all positive integers. Find all functions f : N → N such that

x2 − y 2 + 2y(f (x) + f (y))

is a square of an integer for all positive integers x and y.


(Ivan Novak)

First Solution. Throughout the solution, let P (a, b) denote the assertion "a2 − b2 + 2b(f (a) + f (b)) is a perfect square".

Let p be a prime. Then P (p, p) implies 4pf (p) is a perfect square, which implies p | f (p).
1 point.
Let y be any positive integer, and let p be any prime. P (p, y) implies p + 2yf (p) + 2yf (y) − y is a perfect square.
2 2

Taking the assertion modulo p, it follows that 2yf (y) − y 2 is a quadratic residue modulo p. It is a well known fact that
if a positive integer is a quadratic residue modulo all primes, it must be a perfect square. We conclude that 2yf (y) − y 2
is a perfect square for all y ∈ N.
3 points.
Define g(y) to be 2yf (y) − y2 .
p

P (1, y) implies 1 − y 2 + 2yf (1) + 2yf (y) = g(y)2 + 2yf (1) + 1 is a perfect square, and since

g(y)2 + 2yf (1) + 1 > g(y)2 ,

we have a following chain of inequalities:

g(y)2 + 2yf (1) + 1 > (g(y) + 1)2 =⇒ 2yf (1) + 1 > 2g(y) + 1 =⇒

f (1)2 + 1
yf (1) > g(y) =⇒ y 2 f (1)2 > 2yf (y) − y 2 =⇒ y > f (y).
2
1 point.
2
Since p | f (p) and f (p)
p
6 f (1)2 +1 for any prime p, it follows from Pigeonhole principle that there exists a positive integer
a such that f (p) = ap for infinitely many primes p.
2 points.
Let p be any prime such that f (p) = ap and let n be any positive integer. P (p, n) implies

p2 − n2 + 2nap + 2nf (n) = (p + na)2 − n2 a2 − n2 + 2nf (n)

is a perfect square.

However, this means that 2nf (n) − n2 − n2 a2 can be written as a difference of squares in infinitely many ways, which is
2
only possible if it equals 0. Thus, 2nf (n) = n2 a2 + n2 , or, equivalently, f (n) = n(a 2+1) for all n ∈ N. This also implies
a2 +1
2
= a, which gives us a = 1.
Therefore, f (n) = n for all n ∈ N. It can be easily checked that the identity function is indeed a solution.
3 points.

Second Solution. Similarly as in the first solution, we conclude that p | f (p). Also, from P (4p, 4p), we also conclude
that p | f (4p) for every odd prime p.
1 point.
Fix an odd prime number p, and let A = f (p)
p
and B = f (4p)
p
.
Now, from P (4p, p), we have that 15p2 + 2p (A + B) is a square, which means 15 + 2(A + B) is also a square. Multiplying
2

by 4 yields the fact that 60 + 8(A + B) is a square.


From P (p, 4p), we have that −15p2 + 8p2 (A + B) is a square, which means −15 + 8(A + B) is a square.
We then have
75 = 60 + 8(A + B) − (−15 + 8(A + B)).
Since there are finitely many ways to write 75 as a difference of two squares, we conclude that A + B can take only
finitely many different values as p ranges over all primes. The same is true for A.
4 points.
Therefore, by Pigeonhole principle, there exists a positive integer a such that f (p) = ap for infinitely many primes p.
2 points.

5
The problem can now be finished the same way as in the first solution.
3 points.
Notes on marking:
• Both solutions follow a similar structure. In the first part, a constant a is found such that f (p) = ap for infinitely
many primes p, and in the second part the problem is completed using the first fact. The points from different
solutions are not additive.
• In the first solution, it is not expected from the students to prove the key lemma about quadratic residues that is
used; it suffices to state it. On the other hand, merely stating the lemma is not worth any points on its own.
• If a student solves the problem under the assumption that f (p) = ap for infinitely many p, but they don’t prove
this fact, they can get at most 1 point out of the last 3 points.
• In the second solution, if a student discusses P (1, 4) and P (4, 1) similarly to how P (p, 4p) and P (4p, p) are discussed,
and concludes that f (1) and f (4) can take on finitely many different values, they should get 1 point out of 4 for
that part of the solution.

6
Problem 4. Find all positive integers d for which there exist polynomials P (x) and Q(x) with real coefficients
such that degree of P equals d and
P (x)2 + 1 = (x2 + 1)Q(x)2 .

(Ivan Novak)

First Solution.
P (x)2 + 1 = (x2 + 1)Q(x)2 (1)
Let P and Q be polynomials satisfying the conditions. Note that the degree of the left hand side in (1) the equality is
2d, and the degree of the right hand side is 2 + 2 deg Q, which implies deg Q = d − 1.
Suppose that r is a real root of Q. Then P (r)2 + 1 = 0, which is clearly impossible. We conclude that Q has no real
roots. Since Q has real coefficients, we conclude that Q has even degree since its roots must come in conjugate pairs.
Thus, d must be odd.
1 point.

Now we prove that for any odd
√ d, there exist polynomials satisfying the conditions. Let R[x, + 1] be the set of all
x2
functions of the form A + B x2 + 1, where A and B are polynomials with real coefficients. Note that each
√ element of
R[x, x2 + 1] can be uniquely associated with a pair of polynomials (A, B). Consider a function n : R[x, x2 + 1] → R
defined by p
n(A + B x2 + 1) = A2 − (x2 + 1)B 2
for all real polynomials A and B. Note that the equality (1) is equivalent to the equality
p
n(P + x2 + 1Q) = −1.

1 point.
Note that
p p p
n((A+ x2 + 1B)(C+ x2 + 1D)) = n(AC+(x2 +1)BD+ x2 + 1(AD+BC)) = (AC+(x2 +1)BD)2 −(x2 +1)(AD+BC)2 .

On the other hand,


p p
n(A + x2 + 1B)n(C + x2 + 1D) = (A2 − (x2 + 1)B 2 )(C 2 − (x2 + 1)D2 ).

It can easily be checked that the two expressions are equal. Hence, the function n is multiplicative.
1 point.

Note that n(x + x2 + 1) = −1.
1 point.
√ √ √
Then, using the multiplicative property, n((x + x2 + 1) ) = −1 as well. Let (x + x2 + 1) = P + x2 + 1Q for some
d d

polynomials P and Q. By binomial theorem, we have


! !
p p d
X d d−j 2 d−j X d j 2 d−1−j p
2
P + x + 1Q = (x + x + 1) =2 x (x + 1) 2 + x (x + 1) 2 x2 + 1.
j j even
j
j odd

It’s now easy to see that P has degree d, since it is a sum of polynomials which have degree d and positive leading
coefficients, and P and Q satisfy the starting equality. Thus, all odd positive integers are solutions.
6 points.

Second Solution.
P (x)2 + 1 = (x2 + 1)Q(x)2 (2)
Similarly as in the first solution, we conclude that d needs to be odd.
1 point.
Let us now prove that for every odd d such polynomials P (x) and Q(x) exist. Fix an odd positive integer d. Observing
the roots of polynomials P (x) and Q(x), we can easily see from (2) that P (x) and Q(x) don’t have a common root.
Differentiating (2), we get :

P 0 (x)P (x) = x · Q(x)2 + (x2 + 1) · Q0 (x)Q(x) = Q(x) x · Q(x) + (x2 + 1) · Q0 (x) . (3)


Since P (x) and Q(x) don’t have common roots, from (3) we conclude that Q(x) must divide P 0 (x). Since they have the
same degree, there must exist a real number u such that uP 0 (x) = Q(x).
1 point.
Comparing coefficients in (2), we get that u must be 1
d
or − d1 .

7
1 point.
We’ll take u = 1
d
. Plugging in Q(x) = P (x)/d in (3), we get
0

 
1 1 1
P (x) = x · P 0 (x) + (x2 + 1)P 00 (x) . (4)
d d d

We will now find all polynomials P of degree d which satisfy (4). Note that, by multiplying both sides with P 0 (x) and
0 2
integrating, each of these polynomials satisfies the equation P (x)2 + C = (x2 + 1) (P d(x)) 2 for some C ∈ R.
Denote P (x) = i=0 ai x . Then P (x) = i=1 iai x and P (x) = i=2 i(i − 1)ai x . Writing out the coefficients in
Pd i 0 P d i−1 00 P d i−2

(4), we get
d d d
!
X i 1 X 2 i
X i−2
ai x = 2 i ai x + i(i − 1)ai x
i=0
d i=1 i=2

Comparing the coefficients of xk for all k on the left hand side and the right hand side of the above equation for k > 0,
we get:
1
ad−1 = 2 (d − 1)2 ad−1 which implies ad−1 = 0,

d
and also
1
k2 ak + (k + 2)(k + 1)ak+2 which can be rewritten as

ak =
d2
2 2
d −k
ak+2 = · ak for all 0 6 k 6 d − 2.
(k + 2)(k + 1)

1 point.
From here, we now have that ak = 0 for all even 0 6 k 6 d − 2 and that for all odd 0 6 k 6 d − 2, we have ak = qk a1
for some nonzero real coefficient qk which is uniquely determined by the above recursion.
1 point.
It’s easy to see that any such choice of coefficients (ak )k with a1 6= 0 gives a solution to (4) which has degree d.
0 2
As we’ve already said, any solution to (4) is a solution to P (x)2 + C = (x2 + 1) (P d(x))
2 for some C ∈ R. Considering the
coefficient alongside x0 in both sides and noting a0 = 0, we get C = a21 /d2 . Thus, taking a solution with a1 = d, we get
0 2
the solution to P (x)2 + 1 = (x2 + 1) (P d(x))
2 , which proves that every odd d is a solution to the problem.
5 points.

Third Solution.
P (x)2 + 1 = (x2 + 1)Q(x)2 (5)
Similarly as in the first solution, we conclude that d needs to be odd.
1 point.
Note that d = 1 is a solution, taking P (x) = x and Q(x) = 1. Henceforth assume d > 3.
From x2 + 1 | P (x)2 + 1 we get x2 + 1 | P (x)2 − x2 =⇒ x2 + 1 | (P (x) − x)(P (x) + x). It is not hard to see that
the irreducible polynomial x2 + 1 divides exactly one of the two factors. We can replace P by −P , so without loss of
generality it is safe to assume that P (x) = A(x)(x2 + 1) + x for some real polynomial A. If we put this in (5), we obtain

(A(x) · x + 1)2 + A(x)2 = Q(x)2 .

We will find real polynomials α and β such that A(x) = 2α(x)β(x), Q(x) = α(x)2 + β(x)2 , xA(x) + 1 = α(x)2 − β(x)2
and deg α + deg β = d − 2. Note that then A(x) and Q(x) satisfy the conditions due to the identities for Pythagorean
triples.
2 points.
We thus need to find solutions to the equation

2xα(x)β(x) + 1 = α(x)2 − β(x)2 (6)

where α, β ∈ R[x] are polynomials with real coefficients. Notice that (α, β) = (1, −2x) is a pair of solutions.
1 point.

8
If we look at (6) as a quadratic equation in α we have

α2 − α · 2xβ + 1 − β 2 = 0.

Roots α1 , α2 must then satisfy α1 + α2 = 2xβ. It is now easily verified that if (α, β) is a pair of polynomials which satisfy
(6), then (β, 2xβ − α) is another such pair.
1 point.
Thus starting with solution (α0 , β0 ) = (1, −2x), we can recursively generate a sequence of solutions

(αi+1 , βi+1 ) = (βi , 2xβi − αi ).

The degrees of (αi , βi )i>0 now follow the pattern

(0, 1), (1, 2), (2, 3), (3, 4) . . .

More precisely, deg αi = i, deg βi = i + 1 for all i > 0.


But then, if d = 2i+1 for some i > 0, the pair (αi , βi ) gives a pair (A, Q) = (2αβ, α2 +β 2 ) such that (xA(x)+1)2 +A(x)2 =
Q(x)2 and deg A = i + (i − 1) = d − 2. Then, taking P (x) = (x2 + 1)A(x) + x yields a pair (P, Q) satisfying the original
equation such that deg P = d. We conclude that every odd d is a solution.
5 points.

Notes on marking:
• Points from different marking schemes are not additive.

You might also like