# Baltic Way 2013 Riga, Latvia ![](https://cdn.mathpix.com/cropped/2024_11_22_4ffd808d57e3e21b28deg-01.jpg?height=589&width=1707&top_left_y=1216&top_left_x=177) Problems and solutions ## Problem 1 Let $n$ be a positive integer. Assume that $n$ numbers are to be chosen from the table $$ \begin{array}{cccc} 0 & 1 & \cdots & n-1 \\ n & n+1 & \cdots & 2 n-1 \\ \vdots & \vdots & \ddots & \vdots \\ (n-1) n & (n-1) n+1 & \cdots & n^{2}-1 \end{array} $$ with no two of them from the same row or the same column. Find the maximal value of the product of these $n$ numbers. ## Solution The product is $R(\sigma)=\prod_{i=0}^{n-1}(n i+\sigma(i))$, for some permutation $\sigma:\{0,1, \ldots, n-1\} \rightarrow\{0,1, \ldots, n-1\}$. Let $\sigma$ be such that $R(\sigma)$ is maximal. We may assume that all the multipliers $n i+\sigma(i)$ are positive, because otherwise the product is zero, that is the smallest possible. Assume further that $\sigma(a)>\sigma(b)$ for some $a>b$. Let a permutation $\tau$ be defined by $$ \tau(i)= \begin{cases}\sigma(b), & i=a \\ \sigma(a), & i=b \\ \sigma(i), & \text { otherwise }\end{cases} $$ We have $$ \frac{R(\tau)}{R(\sigma)}=\frac{(n a+\tau(a))(n b+\tau(b))}{(n a+\sigma(a))(n b+\sigma(b))}=\frac{(n a+\sigma(b))(n b+\sigma(a))}{(n a+\sigma(a))(n b+\sigma(b))}>1 $$ as $(n a+\sigma(b))(n b+\sigma(a))-(n a+\sigma(a))(n b+\sigma(b))=n(a \sigma(a)+b \sigma(b)-a \sigma(b)-b \sigma(a))=n(a-b)(\sigma(a)-\sigma(b))>0$. This is a contradiction with the maximality of $R(\sigma)$, hence, $\sigma$ has to satisfy $\sigma(a)<\sigma(b)$ for all $a>b$. Thus, $\sigma(i)=n-1-i$ for all $i$, and $$ R(\sigma)=\prod_{i=0}^{n-1}(n i+n-1-i)=\prod_{i=0}^{n-1}(i+1)(n-1)=(n-1)^{n} n! $$ ## Problem 2 Let $k$ and $n$ be positive integers and let $x_{1}, x_{2}, \ldots, x_{k}, y_{1}, y_{2}, \ldots, y_{n}$ be distinct integers. A polynomial $P$ with integer coefficients satisfies $$ P\left(x_{1}\right)=P\left(x_{2}\right)=\ldots=P\left(x_{k}\right)=54 $$ and $$ P\left(y_{1}\right)=P\left(y_{2}\right)=\ldots=P\left(y_{n}\right)=2013 . $$ Determine the maximal value of $k n$. ## Solution Letting $Q(x)=P(x)-54$, we see that $Q$ has $k$ zeroes at $x_{1}, \ldots, x_{k}$, while $Q\left(y_{i}\right)=1959$ for $i=1, \ldots, n$. We notice that $1959=3 \cdot 653$, and an easy check shows that 653 is a prime number. As $$ Q(x)=\prod_{j=1}^{k}\left(x-x_{j}\right) S(x) $$ and $S(x)$ is a polynomial with integer coefficients, we have $$ Q\left(y_{i}\right)=\prod_{j=1}^{k}\left(y_{i}-x_{j}\right) S\left(x_{j}\right)=1959 . $$ Now all numbers $a_{i}=y_{i}-x_{1}$ have to be in the set $\{ \pm 1, \pm 3, \pm 653, \pm 1959\}$. Clearly, $n$ can be at most 4 , and if $n=4$, then two of the $a_{i}$ 's are $\pm 1$, one has absolute value 3 and the fourth one has absolute value 653 . Assuming $a_{1}=1, a_{2}=-1, x_{1}$ has to be the average of $y_{1}$ and $y_{2}$. Let $\left|y_{3}-x_{1}\right|=3$. If $k \geq 2$, then $x_{2} \neq x_{1}$, and the set of numbers $b_{i}=y_{i}-x_{2}$ has the same properties as the $a_{i}$ 's. Then $x_{2}$ is the average of, say $y_{2}$ and $y_{3}$ or $y_{3}$ and $y_{1}$. In either case $\left|y_{4}-x_{2}\right| \neq 653$. So if $k \geq 2$, then $n \leq 3$. In a quite similar fashion one shows that $k \geq 3$ implies $n \leq 2$. The polynomial $P(x)=653 x^{2}\left(x^{2}-4\right)+2013$ shows the $n k=6$ indeed is possible. ## Problem 3 Let $\mathbb{R}$ denote the set of real numbers. Find all functions $f: \mathbb{R} \rightarrow \mathbb{R}$ such that $$ f(x f(y)+y)+f(-f(x))=f(y f(x)-y)+y \quad \text { for all } x, y \in \mathbb{R} $$ ## Solution Let $f(0)=c$. We make the following substitutions in the initial equation: 1) $x=0, y=0 \Longrightarrow f(0)+f(-c)=f(0) \Longrightarrow f(-c)=0$. 2) $x=0, y=-c \Longrightarrow f(-c)+f(-c)=f\left(c-c^{2}\right)-c \Longrightarrow f\left(c-c^{2}\right)=c$. 3) $x=-c, y=-c \Longrightarrow f(-c)+f(0)=f(c)-c \Longrightarrow f(c)=2 c$. 4) $x=0, y=c \Longrightarrow f(c)+f(-c)=f\left(c^{2}-c\right)+c \Longrightarrow f\left(c^{2}-c\right)=c$. 5) $x=-c, y=c^{2}-c \Longrightarrow f(-c)+f(0)=f\left(c-c^{2}\right)+c^{2}-c \Longrightarrow c=c^{2} \Longrightarrow c=0$ or 1 . Suppose that $c=0$. Let $f(-1)=d+1$. We make the following substitutions in the initial equation: 1) $x=0 \Longrightarrow f(y)+f(0)=f(-y)+y \Longrightarrow y-f(y)=-f(-y)$ for any $y \in \mathbb{R}$. 2) $y=0 \Longrightarrow f(0)+f(-f(x))=f(0) \Longrightarrow f(-f(x))=0$ for any $x \in \mathbb{R}$. 3) $x=-1 \Longrightarrow f(y-f(y))+0=f(d y)+y \Longrightarrow f(d y)=-y+f(-f(-y))=-y$ for any $y \in \mathbb{R}$. Thus, for any $x \in \mathbb{R}$ we have $f(x)=f(-f(d x))=0$. However, this function does not satisfy the initial equation. Suppose that $c=1$. We take $x=0$ in the initial equation: $$ f(y)+f(-c)=f(0)+y \Longrightarrow f(y)=y+1 $$ for any $y \in \mathbb{R}$. The function satisfies the initial equation. Answer: $\quad f(x) \equiv x+1$. ## Problem 4 Prove that the following inequality holds for all positive real numbers $x, y, z$ : $$ \frac{x^{3}}{y^{2}+z^{2}}+\frac{y^{3}}{z^{2}+x^{2}}+\frac{z^{3}}{x^{2}+y^{2}} \geq \frac{x+y+z}{2} $$ ## Solution The inequality is symmetric, so we may assume $x \leq y \leq z$. Then we have $$ x^{3} \leq y^{3} \leq z^{3} \quad \text { and } \quad \frac{1}{y^{2}+z^{2}} \leq \frac{1}{x^{2}+z^{2}} \leq \frac{1}{x^{2}+y^{2}} $$ Therefore, by the rearrangement inequality we have: $$ \begin{gathered} \frac{x^{3}}{y^{2}+z^{2}}+\frac{y^{3}}{x^{2}+z^{2}}+\frac{z^{3}}{x^{2}+y^{2}} \geq \frac{y^{3}}{y^{2}+z^{2}}+\frac{z^{3}}{x^{2}+z^{2}}+\frac{x^{3}}{x^{2}+y^{2}} \\ \frac{x^{3}}{y^{2}+z^{2}}+\frac{y^{3}}{x^{2}+z^{2}}+\frac{z^{3}}{x^{2}+y^{2}} \geq \frac{z^{3}}{y^{2}+z^{2}}+\frac{x^{3}}{x^{2}+z^{2}}+\frac{y^{3}}{x^{2}+y^{2}} \\ \frac{x^{3}}{y^{2}+z^{2}}+\frac{y^{3}}{x^{2}+z^{2}}+\frac{z^{3}}{x^{2}+y^{2}} \geq \frac{1}{2}\left(\frac{y^{3}+z^{3}}{y^{2}+z^{2}}+\frac{x^{3}+z^{3}}{x^{2}+z^{2}}+\frac{x^{3}+y^{3}}{x^{2}+y^{2}}\right) \end{gathered} $$ What's more, by the rearrangement inequality we have: $$ \begin{gathered} x^{3}+y^{3} \geq x y^{2}+x^{2} y \\ 2 x^{3}+2 y^{3} \geq\left(x^{2}+y^{2}\right)(x+y) \\ \frac{x^{3}+y^{3}}{x^{2}+y^{2}} \geq \frac{x+y}{2} \end{gathered} $$ Applying it to the previous inequality we obtain: $$ \frac{x^{3}}{y^{2}+z^{2}}+\frac{y^{3}}{x^{2}+z^{2}}+\frac{z^{3}}{x^{2}+y^{2}} \geq \frac{1}{2}\left(\frac{y+z}{2}+\frac{x+z}{2}+\frac{x+y}{2}\right) $$ Which is the thesis. ## Problem 5 Numbers 0 and 2013 are written at two opposite vertices of a cube. Some real numbers are to be written at the remaining 6 vertices of the cube. On each edge of the cube the difference between the numbers at its endpoints is written. When is the sum of squares of the numbers written on the edges minimal? ## Solution 1 Answer: $$ \left\{x_{1}, \ldots, x_{6}\right\}=\left\{\frac{2 \cdot 2013}{5}, \frac{2 \cdot 2013}{5}, \frac{2 \cdot 2013}{5}, \frac{3 \cdot 2013}{5}, \frac{3 \cdot 2013}{5}, \frac{3 \cdot 2013}{5}\right\} $$ The function $$ (x-a)^{2}+(x-b)^{2}+(x-c)^{2} $$ attains its minimum when $x=\frac{a+b+c}{3}$. Let's call the vertices of the cube adjacent, if they are connected with an edge. If $S$ is minimal then numbers $x_{1} \ldots, x_{6}$ are such that any of them is the arithmetic mean of the numbers written on adjacent vertices (otherwise, S can be made smaller). This gives us 6 equalities: $$ \left\{\begin{array}{l} x_{1}=\frac{x_{4}+x_{5}}{3} \\ x_{2}=\frac{x_{4}+x_{6}}{3} \\ x_{3}=\frac{x_{5}+x_{6}}{3} \\ x_{4}=\frac{x_{1}+x_{2}+2013}{3} \\ x_{5}=\frac{x_{1}+x_{3}+2013}{3} \\ x_{6}=\frac{x_{2}+x_{3}+2013}{3} \end{array}\right. $$ Here $x_{1}, x_{2}, x_{3}$ are written on vertices that are adjacent to the vertex that contains 0 . By solving this system we get the answer. ![](https://cdn.mathpix.com/cropped/2024_11_22_4ffd808d57e3e21b28deg-05.jpg?height=506&width=515&top_left_y=441&top_left_x=776) ## Solution 2 $$ \begin{gathered} S=\left(x_{1}^{2}+x_{2}^{2}+x_{3}^{2}+\left(x_{4}-x_{1}\right)^{2}+\left(x_{4}-x_{2}\right)^{2}+\left(x_{5}-x_{1}\right)^{2}+\left(x_{5}-x_{3}\right)^{2}+\right. \\ \left(x_{6}-x_{2}\right)^{2}+\left(x_{6}-x_{3}\right)^{2}+\left(2013-x_{4}\right)^{2}+\left(2013-x_{5}\right)^{2}+\left(2013-x_{6}\right)^{2}= \\ =\left(\frac{1}{2} x_{1}^{2}+\left(x_{4}-x_{1}\right)^{2}+\frac{1}{2}\left(2013-x_{4}\right)^{2}\right)+\left(\frac{1}{2} x_{1}^{2}+\left(x_{5}-x_{1}\right)^{2}+\frac{1}{2}\left(2013-x_{5}\right)^{2}\right)+ \\ +\left(\frac{1}{2} x_{2}^{2}+\left(x_{4}-x_{2}\right)^{2}+\frac{1}{2}\left(2013-x_{4}\right)^{2}\right)+\left(\frac{1}{2} x_{2}^{2}+\left(x_{6}-x_{2}\right)^{2}+\frac{1}{2}\left(2013-x_{6}\right)^{2}\right)+ \\ +\left(\frac{1}{2} x_{3}^{2}+\left(x_{5}-x_{3}\right)^{2}+\frac{1}{2}\left(2013-x_{5}\right)^{2}\right)+\left(\frac{1}{2} x_{3}^{2}+\left(x_{6}-x_{3}\right)^{2}+\frac{1}{2}\left(2013-x_{6}\right)^{2}\right) \end{gathered} $$ Consider the expression $$ \begin{aligned} S_{1} & =\left(\frac{1}{2} x_{1}^{2}+\left(x_{4}-x_{1}\right)^{2}+\frac{1}{2}\left(2013-x_{4}\right)^{2}\right)= \\ & =\left(\frac{x_{1}}{2}\right)^{2}+\left(\frac{x_{1}}{2}\right)^{2}+\left(x_{4}-x_{1}\right)^{2}+\left(\frac{2013-x_{4}}{2}\right)^{2}+\left(\frac{2013-x_{4}}{2}\right)^{2} \end{aligned} $$ and note that $$ \left(\frac{x_{1}}{2}\right)+\left(\frac{x_{1}}{2}\right)+\left(x_{4}-x_{1}\right)+\left(\frac{2013-x_{4}}{2}\right)+\left(\frac{2013-x_{4}}{2}\right)=2013 $$ If the sum of 5 numbers is fixed, then the sum of their squares is minimal if all of them are equal. It follows that: $$ \frac{x_{1}}{2}=x_{4}-x_{1}=\frac{2013-x_{4}}{2} $$ from where we get $x_{1}=2 \cdot 2013 / 5$ and $x_{4}=3 \cdot 2013 / 5$. Values for $x_{2}, x_{3}, x_{5}, x_{6}$ can be obtained similarly. ## Problem 6 Santa Claus has at least $n$ gifts for $n$ children. For $i \in\{1,2, \ldots, n\}$, the $i$-th child considers $x_{i}>0$ of these items to be desirable. Assume that $$ \frac{1}{x_{1}}+\ldots+\frac{1}{x_{n}} \leq 1 $$ Prove that Santa Claus can give each child a gift that this child likes. ## Solution Evidently the age of the children is immaterial, so we may suppose $$ 1 \leq x_{1} \leq x_{2} \leq \ldots \leq x_{n} $$ Let us now consider the following procedure. First the oldest child chooses its favourite present and keeps it, then the second oldest child chooses its favourite remaining present, and so it goes on until either the presents are distributed in the expected way or some unlucky child is forced to take a present it does not like. Let us assume, for the sake of a contradiction, that the latter happens, say to the $k$-th oldest child, where $1 \leq k \leq n$. Since the oldest child likes at least one of the items Santa Claus has, we must have $k \geq 2$. Moreover, at the moment the $k$-th child is to make its decision, only $k-1$ items are gone so far, which means that $x_{k} \leq k-1$. For this reason, we have $$ \frac{1}{x_{1}}+\ldots+\frac{1}{x_{k}} \geq \underbrace{\frac{1}{k-1}+\ldots+\frac{1}{k-1}}_{k}=\frac{k}{k-1}>1 $$ contrary to our assumption. This proves that the procedure considered above always leads to a distribution of the presents to the children of the desired kind, whereby the problem is solved. ## Problem 7 A positive integer is written on a blackboard. Players $A$ and $B$ play the following game: in each move one has to choose a divisor $m$ of the number $n$ written on the blackboard for which $1k$, there is a room with males that aren't known by the additional guy. Then he may enter the room and his wife may enter an empty room ( $n$-th room). If $m \leq k$ we have $n-2-kA B$, let $D$ be the projection of $A$ on $B C$, and let $E$ and $F$ be the projections of $D$ on $A B$ and $A C$, respectively. Let $G$ be the intersection point of the lines $A D$ and $E F$. Let $H$ be the second intersection point of the line $A D$ and the circumcircle of triangle $A B C$. Prove that $$ A G \cdot A H=A D^{2} $$ ## Solution 1 ![](https://cdn.mathpix.com/cropped/2024_11_22_4ffd808d57e3e21b28deg-09.jpg?height=615&width=764&top_left_y=475&top_left_x=649) From similar right triangles we get $$ \frac{B E}{A E}=\frac{\frac{B D}{A D} E D}{\frac{A D}{B D} E D}=\left(\frac{B D}{A D}\right)^{2} $$ and analogously $$ \frac{C F}{A F}=\left(\frac{C D}{A D}\right)^{2} $$ Now, because $A C>A B$, the lines $B C$ and $E F$ intersect in a point $X$ on the extension of segment $B C$ beyond $B$. Menelaus' theorem gives $$ B X \frac{C F}{A F}=C X \frac{B E}{A E}, \quad C X \frac{D G}{A G}=D X \frac{C F}{A F}, \quad D X \frac{B E}{A E}=B X \frac{D G}{A G} $$ Adding these relations and rerranging terms we arrive at $$ B C \frac{D G}{A G}=B D \frac{C F}{A F}+C D \frac{B E}{A E}=B C \frac{B D \cdot C D}{A D^{2}}=B C \frac{A D \cdot H D}{A D^{2}}=B C \frac{H D}{A D} $$ whence $$ \frac{D G}{A G}=\frac{H D}{A D} $$ Hence follows $$ \frac{A D}{A G}=\frac{A G+D G}{A G}=\frac{A D+H D}{A D}=\frac{A H}{A D} $$ which is equivalent to the problem's assertion. ## Solution 2 ![](https://cdn.mathpix.com/cropped/2024_11_22_4ffd808d57e3e21b28deg-10.jpg?height=618&width=621&top_left_y=502&top_left_x=746) Inversion in the circle with centre $A$ and radius $A D$ maps the line $B C$ and the circle with diameter $A D$, passing through $E$ and $F$, therefore $B$ and $E$ and $C$ and $F$, therefore the circumcircle and the line $E F$ and therefore $H$ and $G$ onto one another. Hence the assertion follows. ## Solution 3 Since $\angle A E D$ and $\angle A F D$ are right angles, $A F D E$ is cyclic. Then $$ \angle A E F=\angle A D F $$ Segment $D F$ is an altitude in a right triangle $A D C$, so $$ \angle A D F=\angle A C D $$ and $$ \angle A C D=\angle A H B $$ as angles inscribed in the circumcircle of $\triangle A B C$. Thus $\angle A E F=\angle A H B$, and $B E G H$ is cyclic. Then by the power of the point $$ A E \cdot A B=A G \cdot A H $$ On the other hand, since $D E$ is an altitude in a right triangle $A D B$, $$ A E \cdot A B=A D^{2} $$ It follows that $A G \cdot A H=A D^{2}$, and the result follows. ## Problem 12 A trapezoid $A B C D$ with bases $A B$ and $C D$ is such that the circumcircle of the triangle $B C D$ intersects the line $A D$ in a point $E$, distinct from $A$ and $D$. Prove that the circumcircle of the triangle $A B E$ is tangent to the line $B C$. ## Solution 1 ![](https://cdn.mathpix.com/cropped/2024_11_22_4ffd808d57e3e21b28deg-11.jpg?height=783&width=798&top_left_y=454&top_left_x=635) If point $E$ lies on the segment $A D$ it is sufficient to prove $\angle C B E=\angle B A E$. It is true, since both angles are equal to $180^{\circ}-\angle A D C$. If point $D$ lies on the segment $A E$ we have $\angle C B E=\angle C D E=\angle B A E$, which proves the thesis. In the end, if point $A$ lies on the segment $D E$ we have $180^{\circ}-\angle C B E=\angle C D E=\angle B A E$. ## Solution 2 By $\measuredangle$ denote a directed angle modulo $\pi$. Since $A B C D$ is a trapezoid, $\measuredangle B A E=\measuredangle C D E$, and since $B C D E$ is cyclic, $\measuredangle C D E=\measuredangle C B E$. Hence $\measuredangle B A E=\measuredangle C B E$, and the result follows. ## Problem 13 All faces of a tetrahedron are right-angled triangles. It is known that three of its edges have the same length $s$. Find the volume of the tetrahedron. ## Solution ![](https://cdn.mathpix.com/cropped/2024_11_22_4ffd808d57e3e21b28deg-11.jpg?height=607&width=475&top_left_y=2021&top_left_x=793) The three equal edges clearly cannot bound a face by themselves, for then this triangle would be equilateral and not right-angled. Nor can they be incident to the same vertex, for then the opposite face would again be equilateral. Hence we may name the tetrahedron $A B C D$ in such a way that $A B=B C=C D=s$. The angles $\angle A B C$ and $\angle B C D$ must then be right, and $A C=B D=s \sqrt{2}$. Suppose that $\angle A D C$ is right. Then by the Pythagorean theorem applied to $A C D$, we find $A D=s$. The reverse of the Pythagorean theorem applied to $A B D$, we see that $\angle D A B$ is right too. The quadrilateral $A B C D$ then has four right angles, and so must be a square. From this contradiction, we conclude that $\angle A D C$ is not right. Since we already know that $A C>C D, \angle C A D$ cannot be right either, and the right angle of $A C D$ must be $\angle A C D$. The Pythagorean theorem gives $A D=s \sqrt{3}$. From the reverse of the Pythagorean theorem, we may now conclude that $\angle A B D$ is right. Consequently, $A B$ is perpendicular to $B C D$, and the volume of the tetrahedron may be simply calculated as $$ \frac{A B \cdot B C \cdot C D}{6}=\frac{s^{3}}{6} $$ ## Problem 14 Circles $\alpha$ and $\beta$ of the same radius intersect in two points, one of which is $P$. Denote by $A$ and $B$, respectively, the points diametrically opposite to $P$ on each of $\alpha$ and $\beta$. A third circle of the same radius passes through $P$ and intersects $\alpha$ and $\beta$ in the points $X$ and $Y$, respectively. Show that the line $X Y$ is parallel to the line $A B$. ## Solution Let $M$ be the third circle, and denote by $Z$ the point on $M$ diametrically opposite to $P$. Since $\angle A X P=\angle P X Z=90^{\circ}$, the three points $A, X, Z$ are collinear. Likewise, the three points $B, Y, Z$ are collinear. Point $P$ is equidistant to the three vertices of triangle $A B Z$, for $P A=P B=P Z$ is the common diameter of the circles. Therefore $P$ is the circumcentre of $A B Z$, which means the perpendiculars $P X$ and $P Y$ bisect the sides $A Z$ and $B Z$. Ergo, $X$ and $Y$ are midpoints on $A Z$ and $B Z$, which leads to the desired conclusion $X Y \| A B$. Remark. Note that $A$ and $Z$ are symmetric with respect to $P X$, thus we immediately obtain $A X=X Z$, and similarly $B Y=Y Z$. ## Problem 15 Four circles in a plane have a common center. Their radii form a strictly increasing arithmetic progression. Prove that there is no square with each vertex lying on a different circle. ## Solution ![](https://cdn.mathpix.com/cropped/2024_11_22_4ffd808d57e3e21b28deg-13.jpg?height=584&width=600&top_left_y=462&top_left_x=728) First we prove the following lemma: Lemma 1. If $A B C D$ is a square then for arbitrary point $E$ $$ E A^{2}+E C^{2}=E B^{2}+E D^{2} $$ Proof. Let $A^{\prime}, C^{\prime}$ be projections of $E$ on sides $A B$, and $C D$ respectively. Then $$ \begin{aligned} & E A^{2}+E C^{2}=\left(E A^{\prime 2}+A A^{\prime 2}\right)+\left(E C^{\prime 2}+C C^{\prime 2}\right) \\ & E B^{2}+E D^{2}=\left(E A^{\prime 2}+A^{\prime} B^{2}\right)+\left(E C^{\prime 2}+C^{\prime} D^{2}\right) \end{aligned} $$ As $A^{\prime} B=C C^{\prime}$ and $A A^{\prime}=C^{\prime} D$ then $E A^{2}+E C^{2}=E B^{2}+E D^{2}$. Note that $E$ does not have to be inside the square, it is true for arbitrary point. Now let $O$ be the common center of circles and $A B C D$ be a square with each vertex lying on a different circle, assume that $A$ lies on the largest circle. If $a$ is the radius of the smallest circle and $p$ is the difference of the arithmetic progression then the radii of the circles are $a, a+p, a+2 p$ and $a+3 p$, these are also distances from $O$ to the vertices of the square $A B C D, O A=a+3 p$. Consider the expression $O A^{2}+O C^{2}-O B^{2}-O D^{2}$. Its smallest possible value is attained when $O C=a$, therefore $$ O A^{2}+O C^{2}-O B^{2}-O D^{2} \geq(a+3 p)^{2}+a^{2}-(a+p)^{2}-(a+2 p)^{2}=4 p^{2}>0 $$ what contradicts the lemma. ## Problem 16 We call a positive integer $n$ delightful if there exists an integer $k, 1c$ be positive integers. Mary's teacher writes $n$ positive integers on a blackboard. Is it true that for all $n$ and $c$ Mary can always label the numbers written by the teacher by $a_{1}, \ldots, a_{n}$ in such an order that the cyclic product $\left(a_{1}-a_{2}\right) \cdot\left(a_{2}-a_{3}\right) \cdot \ldots \cdot\left(a_{n-1}-a_{n}\right) \cdot\left(a_{n}-a_{1}\right)$ would be congruent to either 0 or $c$ modulo $n$ ? ## Solution Answer: Yes. Solution: If some two of these $n$ integers are congruent modulo $n$ then Mary can choose them consecutively and obtain a product divisible by $n$. Hence we may assume in the rest that these $n$ integers written by the teacher are pairwise incongruent modulo $n$. This means that they cover all residues modulo $n$. If $n$ is composite then Mary can find integers $k$ and $l$ such that $n=k l$ and $2 \leq k \leq l \leq n-2$. Let Mary denote $a_{1}, a_{2}, a_{3}, a_{4}$ such that $a_{1} \equiv k, a_{2} \equiv 0, a_{3} \equiv l+1$ and $a_{4} \equiv 1$. The remaining numbers can be denoted in arbitrary order. The product is divisible by $n$ as the product of the first and the third factor is $(k-0) \cdot((l+1)-1)=k l=n$. If $n$ is prime then the numbers $c i$, where $i=0,1, \ldots, n-1$, cover all residues modulo $n$. Let Mary denote the numbers in such a way that $a_{i} \equiv c(n-i)$ for every $i=1, \ldots, n$. Then every factor in the product is congruent to $c$ modulo $n$, meaning that the product is congruent to $c^{n}$ modulo $n$. But $c^{n} \equiv c$ by Fermat's theorem, and Mary has done. ## Problem 18 Find all pairs $(x, y)$ of integers such that $y^{3}-1=x^{4}+x^{2}$. ## Solution If $x=0$, we get a solution $(x, y)=(0,1)$. This solution will turn out to be the only one. If $(x, y)$ is a solution then $(-x, y)$ also is a solution therefore we can assume that $x \geq 1$. We add 1 to both sides and factor: $y^{3}=x^{4}+x^{2}+1=\left(x^{2}+x+1\right)\left(x^{2}-x+1\right)$. We show that the factors $x^{2}+x+1$ and $x^{2}-x+1$ are co-prime. Assume that a prime $p$ divides both of them. Then $p \mid x^{2}+x+1-\left(x^{2}-x+1\right)=2 x$. Since $x^{2}+x+1$ is always odd, $p \mid x$. But then $p$ does not divide $x^{2}+x+1$, a contradiction. Since $x^{2}+x+1$ and $x^{2}-x+1$ have no prime factors in common and their product is a cube, both of them are cubes by a consequence of the fundamental theorem of arithmetic. Therefore, $x^{2}+x+1=a^{3}$ and $x^{2}-x+1=b^{3}$ for some non-negative integers $a$ and $b$. As $x \geq 1$ the first equation implies that $a>x^{\frac{2}{3}}$. But since clearly $b0$ and $$ a_{54}=f^{54}\left(a_{0}\right)=f^{54}\left(g^{54}(0)\right) \equiv 0 \quad(\bmod 2013) $$ ## Problem 20 Find all polynomials $f$ with non-negative integer coefficients such that for all primes $p$ and positive integers $n$ there exist a prime $q$ and a positive integer $m$ such that $f\left(p^{n}\right)=q^{m}$. ## Solution Notice that among the constant polynomials the only solutions are $P(t)=q^{m}$ where $q$ is a prime and $m$ a positive integer. Assume that $$ P(t)=a_{k} t^{k}+\cdots a_{0} $$ where $a_{k} \neq 0$ and $a_{0}, a_{1}, \ldots, a_{k}$ are non-negative integers, is a polynomial that fullfills the conditions. First consider the case $a_{0} \neq 1$. Since $a_{0}$ is a non-negative integer different from 1 , there exists a prime $p$ such that $p$ divides $a_{0}$, and hence $p$ divides $P\left(p^{n}\right)$ for all $n$. Thus $P\left(p^{n}\right)$ is a power of $p$ for all positive integers $n$. If there exists a $k^{\prime}a_{k-1}\left(p^{n}\right)^{k-1}+\cdots+a_{0}>0 $$ and hence $P\left(p^{n}\right) \not \equiv 0\left(\bmod p^{n k}\right)$, but this contradicts $P\left(p^{n}\right)=p^{m}$ for some integer $m$ since obviously $P\left(p^{n}\right)>$ $p^{n k}$ and therefore $m$ must be greater than $n k$. We conclude that in this case $P(t)=a_{k} t^{k}$, and it is easy to see that only $a_{k}=1$ is a possibility. Now consider the case $a_{0}=1$. Let $Q(t)=P(P(t))$. Now $Q$ must as well as $P$ satisfy the conditions. Since $Q(0)=P(P(0))=P(1)>1$ and $Q$ is not constant, we know from the previous that $Q(t)=t^{k}$, which contradicts that $Q(0)>1$. Hence there are no solutions in this case. Thus all polynomials that satisfy the conditions are $P(t)=t^{m}$ where $m$ is a positive integer, and $P(t)=q^{m}$ where $q$ is a prime and $m$ is a positive integer. ## The 20 contest problems were submitted by 9 countries: | Country | | Proposed problems | | | | :--- | :--- | :---: | :--- | :--- | | Denmark | 1 | 11 | 16 | 20 | | Estonia | 17 | | | | | Finland | 2 | 18 | 19 | | | Germany | 6 | | | | | Lithuania | 3 | | | | | Latvia | 5 | 10 | 15 | | | Poland | 4 | 7 | 8 | | | St. Petersburg | 9 | | | | | Sweden | 13 | 14 | | | The solution 2 of the problem 19 originate from the contest paper of the Germany team. Some solutions have been added by coordinators.