Navvye/Olympiad-Problems-CSV huggingface dataset:
2017 EGMO
Find the smallest positive integer $k$ for which there exists a colouring of the positive integers $\mathbb{Z}_{>0}$ with $k$ colours and a function $f:\mathbb{Z}_{>0}\to \mathbb{Z}_{>0}$ with the following two properties:



$(i)$ For all positive integers $m,n$ of the same colour, $f(m+n)=f(m)+f(n).$



$(ii)$ There are positive integers $m,n$ such that $f(m+n)\ne f(m)+f(n).$



In a colouring of $\mathbb{Z}_{>0}$ with $k$ colours, every integer is coloured in exactly one of the $k$ colours. In both $(i)$ and $(ii)$ the positive integers $m,n$ are not necessarily distinct.
2017 EGMO
There are $2017$ lines in the plane such that no three of them go through the same point. Turbo the snail sits on a point on exactly one of the lines and starts sliding along the lines in the following fashion: she moves on a given line until she reaches an intersection of two lines. At the intersection, she follows her journey on the other line turning left or right, alternating her choice at each intersection point she reaches. She can only change direction at an intersection point. Can there exist a line segment through which she passes in both directions during her journey?
2017 EGMO
Let $n\geq1$ be an integer and let $t_1<t_2<\dots<t_n$ be positive integers. In a group of $t_n+1$ people, some games of chess are played. Two people can play each other at most once. Prove that it is possible for the following two conditions to hold at the same time:



(i) The number of games played by each person is one of $t_1,t_2,\dots,t_n$.



(ii) For every $i$ with $1\leq i\leq n$, there is someone who has played exactly $t_i$ games of chess.
2017 EGMO
Let $n\geq2$ be an integer. An $n$-tuple $(a_1,a_2,\dots,a_n)$ of not necessarily different positive integers is expensive if there exists a positive integer $k$ such that $$(a_1+a_2)(a_2+a_3)\dots(a_{n-1}+a_n)(a_n+a_1)=2^{2k-1}.$$a) Find all integers $n\geq2$ for which there exists an expensive $n$-tuple.



b) Prove that for every odd positive integer $m$ there exists an integer $n\geq2$ such that $m$ belongs to an expensive $n$-tuple.



There are exactly $n$ factors in the product on the left hand side.
2017 EGMO
Let $ABC$ be an acute-angled triangle in which no two sides have the same length. The reflections of the centroid $G$ and the circumcentre $O$ of $ABC$ in its sides $BC,CA,AB$ are denoted by $G_1,G_2,G_3$ and $O_1,O_2,O_3$, respectively. Show that the circumcircles of triangles $G_1G_2C$, $G_1G_3B$, $G_2G_3A$, $O_1O_2C$, $O_1O_3B$, $O_2O_3A$ and $ABC$ have a common point.



The centroid of a triangle is the intersection point of the three medians. A median is a line connecting a vertex of the triangle to the midpoint of the opposite side.
2016 EGMO
Let $n$ be an odd positive integer, and let $x_1,x_2,\cdots ,x_n$ be non-negative real numbers. Show that $$ \min_{i=1,\ldots,n} (x_i^2+x_{i+1}^2) \leq \max_{j=1,\ldots,n} (2x_jx_{j+1}) $$where $x_{n+1}=x_1$.
2016 EGMO
Let $ABCD$ be a cyclic quadrilateral, and let diagonals $AC$ and $BD$ intersect at $X$.Let $C_1,D_1$ and $M$ be the midpoints of segments $CX,DX$ and $CD$, respecctively. Lines $AD_1$ and $BC_1$ intersect at $Y$, and line $MY$ intersects diagonals $AC$ and $BD$ at different points $E$ and $F$, respectively. Prove that line $XY$ is tangent to the circle through $E,F$ and $X$.
2016 EGMO
Let $m$ be a positive integer. Consider a $4m\times 4m$ array of square unit cells. Two different cells are related to each other if they are in either the same row or in the same column.No cell is related to itself.Some cells are coloured blue, such that every cell is related to at lest two blue cells.Determine the minimum number of blue cells.
2016 EGMO
Two circles $\omega_1$ and $\omega_2$, of equal radius intersect at different points $X_1$ and $X_2$. Consider a circle $\omega$ externally tangent to $\omega_1$ at $T_1$ and internally tangent to $\omega_2$ at point $T_2$. Prove that lines $X_1T_1$ and $X_2T_2$ intersect at a point lying on $\omega$.
2016 EGMO
Let $k$ and $n$ be integers such that $k\ge 2$ and $k \le n \le 2k-1$. Place rectangular tiles, each of size $1 \times k$, or $k \times 1$ on a $n \times n$ chessboard so that each tile covers exactly $k$ cells and no two tiles overlap. Do this until no further tile can be placed in this way. For each such $k$ and $n$, determine the minimum number of tiles that such an arrangement may contain.
2016 EGMO
Let $S$ be the set of all positive integers $n$ such that $n^4$ has a divisor in the range $n^2 +1, n^2 + 2,...,n^2 + 2n$. Prove that there are infinitely many elements of $S$ of each of the forms $7m, 7m+1, 7m+2, 7m+5, 7m+6$ and no elements of $S$ of the form $7m+3$ and $7m+4$, where $m$ is an integer.
2015 EGMO
Let $\triangle ABC$ be an acute-angled triangle, and let $D$ be the foot of the altitude from $C.$ The angle bisector of $\angle ABC$ intersects $CD$ at $E$ and meets the circumcircle $\omega$ of triangle $\triangle ADE$ again at $F.$

If $\angle ADF = 45^{\circ}$, show that $CF$ is tangent to $\omega .$
2015 EGMO
A domino is a $2 \times 1$ or $1 \times  2$ tile. Determine in how many ways exactly $n^2$ dominoes can be placed without overlapping on a $2n \times  2n$ chessboard so that every $2 \times  2$ square contains at least two uncovered unit squares which lie in the same row or column.
2015 EGMO
Let $n, m$ be integers greater than $1$, and let $a_1, a_2, \dots, a_m$ be positive integers not greater than $n^m$. Prove that there exist positive integers $b_1, b_2, \dots, b_m$ not greater than $n$, such that $$ \gcd(a_1 + b_1, a_2 + b_2, \dots, a_m + b_m) < n, $$ where $\gcd(x_1, x_2, \dots, x_m)$ denotes the greatest common divisor of $x_1, x_2, \dots, x_m$.
2015 EGMO
Determine whether there exists an infinite sequence $a_1, a_2, a_3, \dots$ of positive integers

which satisfies the equality $$a_{n+2}=a_{n+1}+\sqrt{a_{n+1}+a_{n}} $$ for every positive integer $n$.
2015 EGMO
Let $m, n$ be positive integers with $m > 1$. Anastasia partitions the integers $1, 2, \dots , 2m$ into $m$ pairs. Boris then chooses one integer from each pair and finds the sum of these chosen integers.

Prove that Anastasia can select the pairs so that Boris cannot make his sum equal to $n$.
2015 EGMO
Let $H$ be the orthocentre and $G$ be the centroid of acute-angled triangle $ABC$ with $AB\ne AC$. The line $AG$ intersects the circumcircle of $ABC$ at $A$ and $P$. Let $P'$ be the reflection of $P$ in the line $BC$. Prove that $\angle CAB = 60$ if and only if $HG = GP'$
2014 EGMO
Determine all real constants $t$ such that whenever $a$, $b$ and $c$ are the lengths of sides of a triangle, then so are $a^2+bct$, $b^2+cat$, $c^2+abt$.
2014 EGMO
Let $D$ and $E$ be points in the interiors of sides $AB$ and $AC$, respectively, of a triangle $ABC$, such that $DB = BC = CE$. Let the lines $CD$ and $BE$ meet at $F$. Prove that the incentre $I$ of triangle $ABC$, the orthocentre $H$ of triangle $DEF$ and the midpoint $M$ of the arc $BAC$ of the circumcircle of triangle $ABC$ are collinear.
2014 EGMO
We denote the number of positive divisors of a positive integer $m$ by $d(m)$ and the number of distinct prime divisors of $m$ by $\omega(m)$. Let $k$ be a positive integer. Prove that there exist infinitely many positive integers $n$ such that $\omega(n) = k$ and $d(n)$ does not divide $d(a^2+b^2)$ for any positive integers $a, b$ satisfying $a + b = n$.
2014 EGMO
Determine all positive integers $n\geq 2$ for which there exist integers $x_1,x_2,\ldots ,x_{n-1}$ satisfying the condition that if $0<i<n,0<j<n, i\neq j$ and $n$ divides $2i+j$, then $x_i<x_j$.
2014 EGMO
Let $n$ be a positive integer. We have $n$ boxes where each box contains a non-negative number of pebbles. In each move we are allowed to take two pebbles from a box we choose, throw away one of the pebbles and put the other pebble in another box we choose. An initial configuration of pebbles is called solvable if it is possible to reach a configuration with no empty box, in a finite (possibly zero) number of moves. Determine all initial configurations of pebbles which are not solvable, but become solvable when an additional pebble is added to a box, no matter which box is chosen.
2014 EGMO
Determine all functions $f:\mathbb R\rightarrow\mathbb R$ satisfying the condition

$$f(y^2+2xf(y)+f(x)^2)=(y+f(x))(x+f(y))$$

for all real numbers $x$ and $y$.
2013 EGMO
The side $BC$ of the triangle $ABC$ is extended beyond $C$ to $D$ so that $CD = BC$.  The side $CA$ is extended beyond $A$ to $E$ so that $AE = 2CA$.  Prove that, if $AD=BE$, then the triangle $ABC$ is right-angled.
2013 EGMO
Determine all integers $m$ for which the $m \times m$ square can be dissected into five rectangles, the side lengths of which are the integers $1,2,3,\ldots,10$ in some order.
2013 EGMO
Let $n$ be a positive integer.



(a) Prove that there exists a set $S$ of $6n$ pairwise different positive integers, such that the least common multiple of any two elements of $S$ is no larger than $32n^2$.



(b) Prove that every set $T$ of $6n$ pairwise different positive integers contains two elements the least common multiple of which is larger than $9n^2$.
2013 EGMO
Find all positive integers $a$ and $b$ for which there are three consecutive integers at which the polynomial $$ P(n) = \frac{n^5+a}{b} $$ takes integer values.
2013 EGMO
Let $\Omega$ be the circumcircle of the triangle $ABC$. The circle $\omega$ is tangent to the sides $AC$ and $BC$, and it is internally tangent to the circle $\Omega$ at the point $P$.  A line parallel to $AB$ intersecting the interior of triangle $ABC$ is tangent to $\omega$ at $Q$.



Prove that $\angle ACP = \angle QCB$.
2013 EGMO
Snow White and the Seven Dwarves are living in their house in the forest.  On each of $16$ consecutive days, some of the dwarves worked in the diamond mine while the remaining dwarves collected berries in the forest.  No dwarf performed both types of work on the same day.  On any two different (not necessarily consecutive) days, at least three dwarves each performed both types of work.  Further, on the first day, all seven dwarves worked in the diamond mine.



Prove that, on one of these $16$ days, all seven dwarves were collecting berries.
2012 EGMO
Let $ABC$ be a triangle with circumcentre $O$. The points $D,E,F$ lie in the interiors of the sides $BC,CA,AB$ respectively, such that $DE$ is perpendicular to $CO$ and $DF$ is perpendicular to $BO$. (By interior we mean, for example, that the point $D$ lies on the line $BC$ and $D$ is between $B$ and $C$ on that line.)

Let $K$ be the circumcentre of triangle $AFE$. Prove that the lines $DK$ and $BC$ are perpendicular.



Netherlands (Merlijn Staps)
2012 EGMO
Let $n$ be a positive integer. Find the greatest possible integer $m$, in terms of $n$, with the following property: a table with $m$ rows and $n$ columns can be filled with real numbers in such a manner that for any two different rows $\left[ {{a_1},{a_2},\ldots,{a_n}}\right]$ and $\left[ {{b_1},{b_2},\ldots,{b_n}} \right]$ the following holds: $$\max\left( {\left| {{a_1} - {b_1}} \right|,\left| {{a_2} - {b_2}} \right|,...,\left| {{a_n} - {b_n}} \right|} \right) = 1$$

Poland (Tomasz Kobos)
2012 EGMO
Find all functions $f:\mathbb{R}\to\mathbb{R}$ such that $$f\left( {yf(x + y) + f(x)} \right) = 4x + 2yf(x + y)$$ for all $x,y\in\mathbb{R}$.



Netherlands (Birgit van Dalen)
2012 EGMO
A set $A$ of integers is called sum-full if $A \subseteq A + A$, i.e. each element $a \in A$ is the sum of some pair of (not necessarily different) elements $b,c \in A$. A set $A$ of integers is said to be zero-sum-free if $0$ is the only integer that cannot be expressed as the sum of the elements of a finite nonempty subset of $A$.

Does there exist a sum-full zero-sum-free set of integers?



Romania (Dan Schwarz)
2012 EGMO
The numbers $p$ and $q$ are prime and satisfy

$$\frac{p}{{p + 1}} + \frac{{q + 1}}{q} = \frac{{2n}}{{n + 2}}$$

for some positive integer $n$. Find all possible values of $q-p$.



Luxembourg (Pierre Haas)
2012 EGMO
There are infinitely many people registered on the social network Mugbook. Some pairs of (different) users are registered as friends, but each person has only finitely many friends. Every user has at least one friend. (Friendship is symmetric; that is, if $A$ is a friend of $B$, then $B$ is a friend of $A$.)

Each person is required to designate one of their friends as their best friend. If $A$ designates $B$ as her best friend, then (unfortunately) it does not follow that $B$ necessarily designates $A$ as her best friend. Someone designated as a best friend is called a $1$-best friend. More generally, if $n> 1$ is a positive integer, then a user is an $n$-best friend provided that they have been designated the best friend of someone who is an $(n-1)$-best friend. Someone who is a $k$-best friend for every positive integer $k$ is called popular.

(a) Prove that every popular person is the best friend of a popular person.

(b) Show that if people can have infinitely many friends, then it is possible that a popular person is not the best friend of a popular person.



Romania (Dan Schwarz)
2012 EGMO
Let $ABC$ be an acute-angled triangle with circumcircle $\Gamma$ and orthocentre $H$. Let $K$ be a point of $\Gamma$ on the other side of $BC$ from $A$. Let $L$ be the reflection of $K$ in the line $AB$, and let $M$ be the reflection of $K$ in the line $BC$. Let $E$ be the second point of intersection of $\Gamma $ with the circumcircle of triangle $BLM$.

Show that the lines $KH$, $EM$ and $BC$ are concurrent. (The orthocentre of a triangle is the point on all three of its altitudes.)



Luxembourg (Pierre Haas)
2012 EGMO
A word is a finite sequence of letters from some alphabet. A word is repetitive if it is a concatenation of at least two identical subwords (for example, $ababab$ and $abcabc$ are repetitive, but $ababa$ and $aabb$ are not). Prove that if a word has the property that swapping any two adjacent letters makes the word repetitive, then all its letters are identical. (Note that one may swap two adjacent identical letters, leaving a word unchanged.)



Romania (Dan Schwarz)
2021 European Mathematical Cup
We say that a quadruple of nonnegative real numbers $(a,b,c,d)$ is balanced if $$a+b+c+d=a^2+b^2+c^2+d^2.$$Find all positive real numbers $x$ such that $$(x-a)(x-b)(x-c)(x-d)\geq 0$$for every balanced quadruple $(a,b,c,d)$.



(Ivan Novak)
2021 European Mathematical Cup
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|=|YC|$. Suppose that there exists a point $N$ on the segment $\overline{AY}$ such that $|AB|=|AN|=|NC|$. Prove that the line $NC$ passes through the midpoint of the segment $\overline{AX}$.



(Ivan Novak)
2021 European Mathematical Cup
Let $\ell$ be a positive integer. We say that a positive integer $k$ is nice  if $k!+\ell$ is a square of an integer. Prove that for every positive integer $n \geqslant \ell$, the set $\{1, 2, \ldots,n^2\}$ contains at most $n^2-n +\ell$ nice integers.



(Théo Lenoir)
2021 European Mathematical Cup
Let $n$ be a positive integer. Morgane has coloured the integers $1,2,\ldots,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 \leqslant 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é)
2021 European Mathematical Cup
Alice drew a regular $2021$-gon in the plane. Bob then labeled 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.
2021 European Mathematical Cup
Let $ABC$ be a triangle and let $D, E$ and $F$ be the midpoints of sides $BC, CA$ and $AB$, respectively.

Let $X\ne A$ be the intersection of $AD$ with the circumcircle of $ABC$. Let $\Omega$ be the circle through $D$ and $X$,

tangent to the circumcircle of $ABC$. Let $Y$ and $Z$ be the intersections of the tangent to $\Omega$ at $D$ with the

perpendicular bisectors of segments $DE$ and $DF$, respectively. Let $P$ be the intersection of $YE$ 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 $PG$ are concurrent.
2021 European Mathematical Cup
Let $\mathbb{N}$ denote the set of all positive integers. Find all functions $f:\mathbb{N}\to\mathbb{N}$ such that

$$x^2-y^2+2y(f(x)+f(y))$$is a square of an integer for all positive integers $x$ and $y$.
2021 European Mathematical Cup
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=(x^2+1)Q(x)^2.$$
2020 European Mathematical Cup
Let $ABC$ be an acute-angled triangle. Let $D$ and $E$ be the midpoints of sides $\overline{AB}$ and $\overline{AC}$ respectively. Let $F$ be the point such that $D$ is the midpoint of $\overline{EF}$. Let $\Gamma$ be the circumcircle of triangle $FDB$. Let $G$ be a point on the segment $\overline{CD}$ such that the midpoint of $\overline{BG}$ lies on $\Gamma$. Let $H$ be the second intersection of $\Gamma$ and $FC$. Show that the quadrilateral $BHGC$ is cyclic.



Proposed by Art Waeterschoot.
2020 European Mathematical Cup
A positive integer $k\geqslant 3$ is called fibby if there exists a positive integer $n$ and positive integers $d_1 < d_2  < \ldots < d_k$ with the following properties:

$\bullet$ $d_{j+2}=d_{j+1}+d_j$ for every $j$ satisfying $1\leqslant j \leqslant k-2$,

$\bullet$ $d_1, d_2, \ldots, d_k$ are divisors of $n$,

$\bullet$ any other divisor of $n$ is either less than $d_1$ or greater than $d_k$.



Find all fibby numbers.



Proposed by Ivan Novak.
2020 European Mathematical Cup
Two types of tiles, depicted on the figure below, are given.





Find all positive integers $n$ such that an $n\times n$ board consisting of $n^2$ 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\times n$ board.



Proposed by Art Waeterschoot
2020 European Mathematical Cup
Let \(a,b,c\) be positive real numbers such that \(ab+bc+ac = a+b+c\). Prove the following inequality:

$$\sqrt{a+\frac{b}{c}} + \sqrt{b+\frac{c}{a}} + \sqrt{c+\frac{a}{b}} \leq \sqrt{2} \cdot \min \left\{ \frac{a}{b}+\frac{b}{c}+\frac{c}{a},\ \frac{b}{a}+\frac{c}{b}+\frac{a}{c} \right\}.$$



Proposed by Dorlir Ahmeti.
2020 European Mathematical Cup
Let $ABCD$ be a parallelogram such that $|AB| > |BC|$. Let $O$ be a point on the line $CD$ such that $|OB| = |OD|$. Let $\omega$ be a circle with center $O$ and radius $|OC|$. If $T$ is the second intersection of ω and $CD$, prove that $AT, BO$ and $\omega$ are concurrent.



Proposed by Ivan Novak
2020 European Mathematical Cup
Let $n$ and $k$ be positive integers. An $n$-tuple $(a_1, a_2,\ldots , a_n)$ is called a permutation if every number from the set $\{1, 2, . . . , n\}$ occurs in it exactly once. For a permutation $(p_1, p_2, . . . , p_n)$, we define its $k$-mutation to be the $n$-tuple

$$(p_1 + p_{1+k}, p_2 + p_{2+k}, . . . , p_n + p_{n+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)$.



Proposed by Borna Šimić
2020 European Mathematical Cup
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 $(a_n)_{n\in\mathbb{N}}$ of positive integers to Abed. Abed now makes a sequence of moves. The $n$-th move is the following:

$$\text{ Replace } Y \text{ currently written on the board with either } Y + a_n \text{ or } Y \cdot a_n.$$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 = 10^9 + 7$;

$b) p = 10^9 + 9$.

Remark: Both $10^9 + 7$ and $10^9 + 9$ are prime.



Proposed by Ivan Novak
2020 European Mathematical Cup
Let $\mathbb{R^+}$ denote the set of all positive real numbers. Find all functions $f: \mathbb{R^+}\rightarrow \mathbb{R^+}$ such that

$$xf(x + y) + f(xf(y) + 1) = f(xf(x))$$for all $x, y \in\mathbb{R^+}.$



Proposed by Amadej Kristjan Kocbek, Jakob Jurij Snoj
2019 European Mathematical Cup
Every positive integer is marked with a number from the set $\{ 0,1,2\}$, according to the following rule:

$$\text{if a positive integer }k\text{ is marked with }j,\text{ then the integer }k+j\text{ is marked with }0.$$Let $S$ denote the sum of marks of the first $2019$ positive integers. Determine the maximum possible value of $S$.



Proposed by Ivan Novak
2019 European Mathematical Cup
Let $(x_n)_{n\in \mathbb{N}}$ be a sequence defined recursively such that $x_1=\sqrt{2}$ and

$$x_{n+1}=x_n+\frac{1}{x_n}\text{ for }n\in \mathbb{N}.$$Prove that the following inequality holds:

$$\frac{x_1^2}{2x_1x_2-1}+\frac{x_2^2}{2x_2x_3-1}+\dotsc +\frac{x_{2018}^2}{2x_{2018}x_{2019}-1}+\frac{x_{2019}^2}{2x_{2019}x_{2020}-1}>\frac{2019^2}{x_{2019}^2+\frac{1}{x_{2019}^2}}.$$

Proposed by Ivan Novak
2019 European Mathematical Cup
Let $ABC$ be a triangle with circumcircle ω. Let $l_B$ and $l_C$ be two lines through the points $B$ and $C$, respectively, such that $l_B || l_C$. The second intersections of $l_B$ and $l_C$ with ω are $D$ and $E$, respectively. Assume that $D$ and  $E$ are on the same side of $BC$ as $A$. Let $DA$ intersect $l_C$ at $F$ and let $EA$ intersect $l_B$ at $G$. If $O$, $O_1$ and $O_2$ are circumcenters of the triangles $ABC$, $ADG$ and $AEF$, respectively, and $P$ is the circumcenter of the triangle $OO_1O_2$, prove that $l_B || OP || l_C$.



Proposed by Stefan Lozanovski, Macedonia
2019 European Mathematical Cup
Let $u$ be a positive rational number and $m$ be a positive integer. Define a sequence $q_1,q_2,q_3,\dotsc$ such that $q_1=u$ and for $n\geqslant 2$:

$$\text{if }q_{n-1}=\frac{a}{b}\text{ for some relatively prime positive integers }a\text{ and }b, \text{ then }q_n=\frac{a+mb}{b+1}.$$Determine all positive integers $m$ such that the sequence $q_1,q_2,q_3,\dotsc$ is eventually periodic for any positive rational number $u$.



Remark: A sequence $x_1,x_2,x_3,\dotsc $ is eventually periodic if there are positive integers $c$ and $t$ such that $x_n=x_{n+t}$ for all $n\geqslant c$.



Proposed by Petar Nizié-Nikolac
2019 European Mathematical Cup
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\mid m$ and $y\mid n$,

$$M(x+y,mn)>1.$$

Proposed by Ivan Novak
2019 European Mathematical Cup
Let $n$ be a positive integer. An $n\times n$ board consisting of $n^2$ cells, each being a unit square colored either black or white, is called convex if for every black colored cell, both the cell directly to the left of it and the cell directly above it are also colored 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\times n$ board.



Proposed by Ivan Novak
2019 European Mathematical Cup
In an acute triangle $ABC$ with $|AB| \not= |AC|$, let $I$ be the incenter and $O$ the circumcenter. The incircle is tangent to $\overline{BC}, \overline{CA}$ and $\overline{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$.



Proposed by Petar Nizié-Nikolac
2019 European Mathematical Cup
Find all functions $f:\mathbb{R}\to \mathbb{R}$ such that

$$f(x)+f(yf(x)+f(y))=f(x+2f(y))+xy$$for all $x,y\in \mathbb{R}$.



Proposed by Adrian Beker