# BALTIC WAY 2010 - SOLUTIONS REYKJAVIK, NOVEMBER 6TH 2010 Time allowed: $4 \frac{1}{2}$ hours. Questions may be asked during the first 30 minutes. The only tools allowed are a ruler and a compass. Each problem is worth 5 points. Problem 1. Find all quadruples of real numbers $(a, b, c, d)$ satisfying the system of equations $$ \left\{\begin{array}{l} (b+c+d)^{2010}=3 a \\ (a+c+d)^{2010}=3 b \\ (a+b+d)^{2010}=3 c \\ (a+b+c)^{2010}=3 d \end{array}\right. $$ Solution. There are two solutions: $(0,0,0,0)$ and $\left(\frac{1}{3}, \frac{1}{3}, \frac{1}{3}, \frac{1}{3}\right)$. If $(a, b, c, d)$ satisfies the equations, then we may as well assume $a \leq b \leq c \leq d$. These are non-negative because an even power of a real number is always non-negative. It follows that $$ b+c+d \geq a+c+d \geq a+b+d \geq a+b+c $$ and since $x \mapsto x^{2010}$ is increasing for $x \geq 0$ we have that $$ 3 a=(b+c+d)^{2010} \geq(a+c+d)^{2010} \geq(a+b+d)^{2010} \geq(a+b+c)^{2010}=3 d $$ We conclude that $a=b=c=d$ and all the equations take the form $(3 a)^{2010}=3 a$, so $a=0$ or $3 a=1$. Finally, it is clear that $a=b=c=d=0$ and $a=b=c=d=\frac{1}{3}$ solve the system. Problem 2. Let $x$ be a real number such that $01, x_{2}>1,\left|x_{1}-x_{2}\right|<1$ and moreover $x_{1} \leq x_{2}$. Then $$ \frac{x_{1}}{x_{2}}+\frac{x_{2}}{x_{1}} \leq 1+\frac{x_{2}}{x_{1}}<1+\frac{x_{1}+1}{x_{1}}=2+\frac{1}{x_{1}}<2+1=2 \cdot 2-1 . $$ Now we proceed to the inductive step, and assume that the numbers $x_{1}, x_{2}, \ldots, x_{n}, x_{n+1}>1$ are given such that $\left|x_{i}-x_{i+1}\right|<1$ for $i=1,2, \ldots, n-1, n$. Let $$ S=\frac{x_{1}}{x_{2}}+\frac{x_{2}}{x_{3}}+\ldots+\frac{x_{n-1}}{x_{n}}+\frac{x_{n}}{x_{1}}, \quad S^{\prime}=\frac{x_{1}}{x_{2}}+\frac{x_{2}}{x_{3}}+\ldots+\frac{x_{n-1}}{x_{n}}+\frac{x_{n}}{x_{n+1}}+\frac{x_{n+1}}{x_{1}} $$ The inductive assumption is that $S<2 n-1$ and the goal is that $S^{\prime}<2 n+1$. From the above relations involving $S$ and $S^{\prime}$ we see that it suffices to prove the inequality $$ \frac{x_{n}}{x_{n+1}}+\frac{x_{n+1}-x_{n}}{x_{1}} \leq 2 $$ We consider two cases. If $x_{n} \leq x_{n+1}$, then using the conditions $x_{1}>1$ and $x_{n+1}-x_{n}<1$ we obtain $$ \frac{x_{n}}{x_{n+1}}+\frac{x_{n+1}-x_{n}}{x_{1}} \leq 1+\frac{x_{n+1}-x_{n}}{x_{1}}<1+\frac{1}{x_{1}}<2, $$ and if $x_{n}>x_{n+1}$, then using the conditions $x_{n}1$ we get $$ \frac{x_{n}}{x_{n+1}}+\frac{x_{n+1}-x_{n}}{x_{1}}<\frac{x_{n}}{x_{n+1}}<\frac{x_{n+1}+1}{x_{n+1}}=1+\frac{1}{x_{n+1}}<1+1=2 . $$ The induction is now complete. Problem 4. Find all polynomials $P(x)$ with real coefficients such that $$ (x-2010) P(x+67)=x P(x) $$ for every integer $x$. Solution. Taking $x=0$ in the given equality leads to $-2010 P(67)=0$, implying $P(67)=0$. Whenever $i$ is an integer such that $1 \leq i<30$ and $P(i \cdot 67)=0$, taking $x=i \cdot 67$ leads to $(i \cdot 67-2010) P((i+1) \cdot 67)=0$; as $i \cdot 67<2010$ for $i<30$, this implies $P((i+1) \cdot 67)=0$. Thus, by induction, $P(i \cdot 67)=0$ for all $i=1,2, \ldots, 30$. Hence $$ P(x) \equiv(x-67)(x-2 \cdot 67) \ldots(x-30 \cdot 67) Q(x) $$ where $Q(x)$ is another polynomial. Substituting this expression for $P$ in the original equality, one obtains $$ (x-2010) \cdot x(x-67) \ldots(x-29 \cdot 67) Q(x+67)=x(x-67)(x-2 \cdot 67) \ldots(x-30 \cdot 67) Q(x) $$ which is equivalent to $$ x(x-67)(x-2 \cdot 67) \ldots(x-30 \cdot 67)(Q(x+67)-Q(x))=0 . $$ By conditions of the problem, this holds for every integer $x$. Hence there are infinitely many roots of polynomial $Q(x+67)-Q(x)$, implying that $Q(x+67)-Q(x) \equiv 0$. Let $c=Q(0)$; then $Q(i \cdot 67)=c$ for every integer $i$ by easy induction. Thus polynomial $Q(x)-c$ has infinitely many roots whence $Q(x) \equiv c$. Consequently, $P(x)=c(x-67)(x-2 \cdot 67) \ldots(x-30 \cdot 67)$ for some real number $c$. As equation (1) shows, all such polynomials fit. Problem 5. Let $\mathbb{R}$ denote the set of real numbers. Find all functions $f: \mathbb{R} \rightarrow \mathbb{R}$ such that $$ f\left(x^{2}\right)+f(x y)=f(x) f(y)+y f(x)+x f(x+y) $$ for all $x, y \in \mathbb{R}$. Solution. Setting $x=0$ in the equation we get $f(0) f(y)=(2-y) f(0)$. If $f(0) \neq 0$, then $f(y)=2-y$ and it is easy to verify that this is a solution to the equation. Now assume $f(0)=0$. Setting $y=0$ in the equation we get $f\left(x^{2}\right)=x f(x)$. Interchanging $x$ and $y$ and subtracting from the original equation we get $$ x f(x)-y f(y)=y f(x)-x f(y)+(x-y) f(x+y) $$ or equivalently $$ (x-y)(f(x)+f(y))=(x-y) f(x+y) \text {. } $$ For $x \neq y$ we therefore have $f(x+y)=f(x)+f(y)$. Since $f(0)=0$ this clearly also holds for $x=0$, and for $x=y \neq 0$ we have $$ f(2 x)=f\left(\frac{x}{3}\right)+f\left(\frac{5 x}{3}\right)=f\left(\frac{x}{3}\right)+f\left(\frac{2 x}{3}\right)+f(x)=f(x)+f(x) . $$ Setting $x=y$ in the original equation, using $f\left(x^{2}\right)=x f(x)$ and $f(2 x)=2 f(x)$ we get $$ 0=f(x)^{2}+x f(x)=f(x)(f(x)+x) . $$ So for each $x$, either $f(x)=0$ or $f(x)=-x$. But then $$ f(x)+f(y)=f(x+y)= \begin{cases}0 & \text { or } \\ -(x+y)\end{cases} $$ and we conclude that $f(x)=-x$ if and only if $f(y)=-y$ when $x, y \neq 0$. We therefore have either $f(x)=-x$ for all $x$ or $f(x)=0$ for all $x$. It is easy to verify that both are solutions to the original equation. Problem 6. An $n \times n$ board is coloured in $n$ colours such that the main diagonal (from top-left to bottom-right) is coloured in the first colour; the two adjacent diagonals are coloured in the second colour; the two next diagonals (one from above and one from below) are coloured in the third colour, etc.; the two corners (top-right and bottom-left) are coloured in the $n$-th colour. It happens that it is possible to place on the board $n$ rooks, no two attacking each other and such that no two rooks stand on cells of the same colour. Prove that $n \equiv 0(\bmod 4)$ or $n \equiv 1$ $(\bmod 4)$. Solution. Use the usual coordinate system for which the cells of the main diagonal have coordinates $(k, k)$, where $k=1, \ldots, n$. Let $(k, f(k))$ be the coordinates of the $k$-th rook. Then by color restrictions for rooks we have $$ \sum_{k=1}^{n}(f(k)-k)^{2}=\sum_{i=0}^{n-1} i^{2}=\frac{n(n-1)(2 n-1)}{6} . $$ Since the rooks are non-attacking we have $$ \sum_{k=1}^{n}(f(k))^{2}=\sum_{i=1}^{n} i^{2}=\frac{n(n+1)(2 n+1)}{6} . $$ By subtracting these equalities we obtain $$ \sum_{k=1}^{n} k f(k)=\frac{n\left(2 n^{2}+9 n+1\right)}{12} $$ Now it is trivial to check that the last number is integer if and only if $n \equiv 0$ or $1(\bmod 4)$. Problem 7. There are some cities in a country; one of them is the capital. For any two cities $A$ and $B$ there is a direct flight from $A$ to $B$ and a direct flight from $B$ to $A$, both having the same price. Suppose that all round trips with exactly one landing in every city have the same total cost. Prove that all round trips that miss the capital and with exactly one landing in every remaining city cost the same. Solution. Let $C$ be the capital and $C_{1}, C_{2}, \ldots, C_{n}$ be the remaining cities. Denote by $d(x, y)$ the price of the connection between the cities $x$ and $y$, and let $\sigma$ be the total price of a round trip going exactly once through each city. Now consider a round trip missing the capital and visiting every other city exactly once; let $s$ be the total price of that trip. Suppose $C_{i}$ and $C_{j}$ are two consecutive cities on the route. Replacing the flight $C_{i} \rightarrow C_{j}$ by two flights: from $C_{i}$ to the capital and from the capital to $C_{j}$, we get a round trip through all cities, with total price $\sigma$. It follows that $\sigma=s+d\left(C, C_{i}\right)+d\left(C, C_{j}\right)-$ $d\left(C_{i}, C_{j}\right)$, so it remains to show that the quantity $\alpha(i, j)=d\left(C, C_{i}\right)+d\left(C, C_{j}\right)-d\left(C_{i}, C_{j}\right)$ is the same for all 2-element subsets $\{i, j\} \subset\{1,2, \ldots, n\}$. For this purpose, note that $\alpha(i, j)=\alpha(i, k)$ whenever $i, j, k$ are three distinct indices; indeed, this equality is equivalent to $d\left(C_{j}, C\right)+d\left(C, C_{i}\right)+d\left(C_{i}, C_{k}\right)=d\left(C_{j}, C_{i}\right)+d\left(C_{i}, C\right)+d\left(C, C_{k}\right)$, which is true by considering any trip from $C_{k}$ to $C_{j}$ going through all cities except $C$ and $C_{i}$ exactly once and completing this trip to a round trip in two ways: $C_{j} \rightarrow C \rightarrow C_{i} \rightarrow C_{k}$ and $C_{j} \rightarrow C_{i} \rightarrow C \rightarrow C_{k}$. Therefore the values of $\alpha$ coincide on any pair of 2-element sets sharing a common element. But then clearly $\alpha(i, j)=\alpha\left(i, j^{\prime}\right)=\alpha\left(i^{\prime}, j^{\prime}\right)$ for all indices $i, j, i^{\prime}, j^{\prime}$ with $i \neq j, i^{\prime} \neq j^{\prime}$, and the solution is complete. Problem 8. In a club with 30 members, every member initially had a hat. One day each member sent his hat to a different member (a member could have received more than one hat). Prove that there exists a group of 10 members such that no one in the group has received a hat from another one in the group. Solution. Let $S$ be the given group of 30 people. Consider all subsets $A \subset S$ such that no member of $A$ received a hat from a member of $A$. Among such subsets, let $T$ be a subset of maximal cardinality. The assertion of the problem is that $|T| \geq 10$. Let $U \subset S$ consist of all people that have received a hat from a person belonging to $T$. Now consider any member $x \in S \backslash(T \cup U)$. Since $x \notin U$, no member of $T$ sent his hat to $x$. It follows that no member of $T$ sent a hat to a person from $T \cup\{x\}$. But the maximality of $T$ implies that some person from $T \cup\{x\}$ sent his hat to a person from the same subset. This means that $x$ sent his hat to a person from $T$. Consequently, all members of the subset $S \backslash(T \cup U)$ sent their hats to people in $T$. In particular, $S \backslash(T \cup U)$ has the property described in the beginning. The maximality of $T$ gives $|S \backslash(T \cup U)| \leq|T|$. Finally, we obviously have $|U| \leq|T|$, so $$ |T| \geq|S \backslash(T \cup U)|=|S|-|T|-|U| \geq|S|-2|T|, $$ or $|T| \geq \frac{1}{3}|S|=10$, as desired. Problem 9. There is a pile of 1000 matches. Two players each take turns and can take 1 to 5 matches. It is also allowed at most 10 times during the whole game to take 6 matches, for example 7 exceptional moves can be done by the first player and 3 moves by the second and then no more exceptional moves are allowed. Whoever takes the last match wins. Determine which player has a winning strategy. Solution. The second player wins. Let $r$ be the number of the remaining exceptional moves in the current position (at the beginning of the game $r=10$ and $r$ decreases during the game). The winning strategy of the second player is the following. After his move the number of matches in the pile must have the form $6 n+r$, where $n>r$, or $7 n$, where $n \leq r$ (observe that $6 n+r=7 n$ for $n=r$ ). At the beginning of the game the initial number of matches $1000=6 \cdot 165+10$ agrees with this strategy. What happens during two consecutive moves? Consider the case $n>r$ first. If the first player takes $k=1,2, \ldots 5$ matches (and hence $r$ is not changing during his move) then the second player takes $6-k$ matches. So players take 6 matches together and the pile contains now $6(n-1)+r$ matches. If the first player takes 6 matches, then $r$ decreases by 1 . The second player takes 1 match. After his turn the pile contains $6(n-1)+(r-1)$ matches as he wish. Now consider the case $n \leq r$. In this situation we have much enough exceptional moves, and we may assume that now each move the players can take up to 6 matches. Then if the first player takes $k$ matches, the second player takes $7-k$ matches. Problem 10. Let $n$ be an integer with $n \geq 3$. Consider all dissections of a convex $n$-gon into triangles by $n-3$ non-intersecting diagonals, and all colourings of the triangles with black and white so that triangles with a common side are always of a different colour. Find the least possible number of black triangles. Solution 1. The answer is $\left\lfloor\frac{n-1}{3}\right\rfloor$. Let $f(n)$ denote the minimum number of black triangles in an $n$-gon. It is clear that $f(3)=0$ and that $f(n)$ is at least 1 for $n=4,5,6$. It is easy to see that for $n=4,5,6$ there is a coloring with only one black triangle, so $f(n)=1$ for $n=4,5,6$. First we prove by induction that $f(n) \leq\left\lfloor\frac{n-1}{3}\right\rfloor$. The case for $n=3,4,5$ has already been established. Given an $(n+3)$-gon, draw a diagonal that splits it into an $n$-gon and a 5 -gon. Color the $n$-gon with at most $\left\lfloor\frac{n-1}{3}\right\rfloor$ black triangles. We can then color the 5 -gon compatibly with only one black triangle so $f(n+3) \leq\left\lfloor\frac{n-1}{3}\right\rfloor+1=\left\lfloor\frac{n+3-1}{3}\right\rfloor$. Now we prove by induction that $f(n) \geq\left\lfloor\frac{n-1}{3}\right\rfloor$. The case for $n=3,4,5$ has already been established. Given an $(n+3)$-gon, we color it with $f(n+3)$ black triangles and pick one of the black triangles. It separates theree polygons from the $(n+3)$-gon, say an $(a+1)$-gon, $(b+1)$-gon and a $(c+1)$-gon such that $n+3=a+b+c$. We write $r_{m}$ for the remainder of the integer $m$ when divided by 3 . Then $$ \begin{aligned} f(n+3) & \geq f(a+1)+f(b+1)+f(c+1)+1 \\ & \geq\left\lfloor\frac{a}{3}\right\rfloor+\left\lfloor\frac{b}{3}\right\rfloor+\left\lfloor\frac{c}{3}\right\rfloor+1 \\ & =\frac{a-r_{a}}{3}+\frac{b-r_{b}}{3}+\frac{c-r_{c}}{3}+1 \\ & =\frac{n+3-1-r_{n}}{3}+\frac{4+r_{n}-\left(r_{a}+r_{b}+r_{c}\right)}{3} \\ & =\left\lfloor\frac{n+3-1}{3}\right\rfloor+\frac{4+r_{n}-\left(r_{a}+r_{b}+r_{c}\right)}{3} . \end{aligned} $$ Since $0 \leq r_{n}, r_{a}, r_{b}, r_{c} \leq 2$, we have that $4+r_{n}-\left(r_{a}+r_{b}+r_{c}\right) \geq 4+0-6=-2$. But since this number is divisible by 3 , it is in fact $\geq 0$. This completes the induction. Solution 2. Call two triangles neighbours if they have a common side. Let the dissections of convex $n$-gons together with appropriate colourings be called $n$-colourings. Observe that all triangles of an arbitrary $n$-colouring can be listed, starting with an arbitrary triangle and always continuing the list by a triangle that is a neighbour to some triangle already in the list. Indeed, suppose that some triangle $\Delta$ is missing from the list. Choose a point $A$ inside a triangle in the list, as well as a point $D$ inside $\Delta$. By convexity, the line segment $A D$ is entirely inside the polygon. As the vertices of the triangles are vertices of the polygon, $A D$ crosses the sides of the triangles only outside their vertices. Hence any consecutive triangles that $A D$ passes through are neighbours. The first triangle that ray $A D$ visits and that is not in the list is one that the list can be continued with. Consider such a list of all triangles that starts with a white triangle. Each triangle has at most three neighbours and each black triangle has at least one neighbour occurring in the list before it. Thus at most two neighbours of any black triangle are following it in the list. Each white triangle except for the first one is a neighbour of some triangle preceding it in the list, and according to the construction, that triangle is black. Hence among all triangles except for the first one, there are at most twice as many white triangles as there are black triangles. Altogether, this means $w \leq 2 b+1$ where $b$ and $w$ are the numbers of black and white triangles in the construction, respectively. Observe that this formula holds also if there are no white triangles. Hence there are at most $3 b+1$ triangles altogether, i.e., $n-2 \leq 3 b+1$. In integers, this implies $b \geq\left\lceil\frac{n}{3}\right\rceil-1$ which is equivalent to $b \geq\left\lfloor\frac{n-1}{3}\right\rfloor$. This number of black triangles can be achieved as follows. Number all vertices of the polygon by 0 through $n-1$. If $n=3 k, k \in \mathbb{N}^{+}$, then draw diagonals $(0,3 i-1),(3 i-1,3 i+1),(3 i+1,0)$ for all $i=1, \ldots, k-1$. Colour black every triangle whose vertices are $0,3 i-1$ and $3 i+1$ for some $i=1, \ldots, k-1$. If $n=3 k-1$ or $n=3 k-2$ then take a described $3 k$-colouring and cut out 1 or 2 white triangles, respectively (e.g., triangles with vertices $0,1,2$ and $0, n-1, n-2$ ). Problem 11. Let $A B C D$ be a square and let $S$ be the point of intersection of its diagonals $A C$ and $B D$. Two circles $k, k^{\prime}$ go through $A, C$ and $B, D$; respectively. Furthermore, $k$ and $k^{\prime}$ intersect in exactly two different points $P$ and $Q$. Prove that $S$ lies on $P Q$. Solution. It is clear that $P Q$ is the radical axis of $k$ and $k^{\prime}$. The power of $S$ with respect to $k$ is $-|A S| \cdot|C S|$ and the power of $S$ with respect to $k^{\prime}$ is $-|B S| \cdot|D S|$. Because $A B C D$ is a square, these two numbers are clearly the same. Thus, $S$ has the same power with respect to $k$ and $k^{\prime}$ and lies on the radical axis $P Q$ of $k$ and $k^{\prime}$. Problem 12. Let $A B C D$ be a convex quadrilateral with precisely one pair of parallel sides. a) Show that the lengths of its sides $A B, B C, C D, D A$ (in this order) do not form an arithmetic progression. b) Show that there is such a quadrilateral for which the lengths of its sides $A B, B C, C D$, $D A$ form an arithmetic progression after the order of the lengths is changed. Solution. Assume that the lengths of the sides form an arithmetic progression with the first term $a$ and the difference $d$. Suppose that sides $A B$ and $C D$ are parallel, $|A B|>|C D|$ and let $E$ be a point on $A B$ such that $|B E|=|C D|$. Then $|D E|=|C B|$ as opposite sides of a parallelogram, so $|A D|$ and $|D E|$ are two non-consequent terms of the arithmetic progression and $|A D|-|D E|= \pm 2 d$. Further, $|A E|=|A B|-|D C|=2 d$. We get a contradiction to the triangle inequality $|A E|>|| A D|-| D E \mid$. We take a triangle with sides $3,3,2$ and add a parallelogram with sides 1 and 2 on the side of length 2 to obtain a trapezoid. Then the lengths of the sides are 1, 2, 4, 3 . Problem 13. In an acute triangle $A B C$, the segment $C D$ is an altitude and $H$ is the orthocentre. Given that the circumcentre of the triangle lies on the line containing the bisector of the angle $D H B$, determine all possible values of $\angle C A B$. Solution. The value is $\angle C A B=60^{\circ}$. Denote by $\ell$ the line containing the angle bisector of $D H B$, and let $E$ be the point where the ray $C D \rightarrow$ intersects the circumcircle of the triangle $A B C$ again. The rays $H D \rightarrow$ and $H B \rightarrow$ are symmetric with respect to $\ell$ by the definition of $\ell$. On the other hand, if the circumcenter of $A B C$ lies on $\ell$, then the circumcircle is symmetric with respect to $\ell$. It follows that the intersections of the rays $H D^{\rightarrow}$ and $H B^{\rightarrow}$ with the circle, which are $E$ and $B$, are symmetric with respect to $\ell$. Moreover, since $H \in \ell$, we conclude that $H E=H B$. However, as $E$ lies on the circumcircle of $A B C$, we have $$ \angle A B E=\angle A C E=90^{\circ}-\angle C A B=\angle H B A . $$ This proves that the points $H$ and $E$ are symmetric with respect to the line $A B$. Thus $H B=E B$ and the triangle $B H E$ is equilateral. Finally, $\angle C A B=\angle C E B=60^{\circ}$. Obviously the value $\angle C A B=60^{\circ}$ is attained for an equilateral triangle $A B C$. Problem 14. Assume that all angles of a triangle $A B C$ are acute. Let $D$ and $E$ be points on the sides $A C$ and $B C$ of the triangle such that $A, B, D$, and $E$ lie on the same circle. Further suppose the circle through $D, E$, and $C$ intersects the side $A B$ in two points $X$ and $Y$. Show that the midpoint of $X Y$ is the foot of the altitude from $C$ to $A B$. Solution. We write the power of the point $A$ with respect to the circle $\gamma$ trough $D, E$, and $C$ : $$ |A X||A Y|=|A D \| A C|=|A C|^{2}-|A C||C D| . $$ Similarly, if we calculate the power of $B$ with respect to $\gamma$ we get $$ |B X||B Y|=|B C|^{2}-|B C||C E| \text {. } $$ We have also that $|A C||C D|=|B C||C E|$, the power of the point $C$ with respect to the circle through $A, B, D$, and $E$. Further if $M$ is the middle point of $X Y$ then $$ |A X||A Y|=|A M|^{2}-|X M|^{2} \quad \text { and } \quad|B X||B Y|=|B M|^{2}-|X M|^{2} \text {. } $$ Combining the four displayed identities we get $$ |A M|^{2}-|B M|^{2}=|A C|^{2}-|B C|^{2} . $$ By the theorem of Pythagoras the same holds for the point $H$ on $A B$ such that $C H$ is the altitude of the triangle $A B C$. Then since $H$ lies on the side $A B$ we get $|A B|(|A M|-|B M|)=|A M|^{2}-|B M|^{2}=|A C|^{2}-|B C|^{2}=|A H|^{2}-|B H|^{2}=|A B|(|A H|-|B H|)$. We conclude that $M=H$. Problem 15. The points $M$ and $N$ are chosen on the angle bisector $A L$ of a triangle $A B C$ such that $\angle A B M=\angle A C N=23^{\circ} . X$ is a point inside the triangle such that $B X=C X$ and $\angle B X C=2 \angle B M L$. Find $\angle M X N$. Solution. Answer: $\angle M X N=2 \angle A B M=46^{\circ}$. Let $\angle B A C=2 \alpha$. The triangles $A B M$ and $A C N$ are similar, therefore $\angle C N L=\angle B M L=$ $\alpha+23^{\circ}$. Let $K$ be the midpoint of the arc $B C$ of the circumcircle of the triangle $A B C$. Then $K$ belongs to the the line $A L$ and $\angle K B C=\alpha$. Both $X$ and $K$ belong to the perpendicular bisector of the segment $B C$, hence $\angle B X K=\frac{1}{2} \angle B X C=\angle B M L$, so the quadrilateral $B M X K$ is inscribed. Then $$ \angle X M N=\angle X B K=\angle X B C+\angle K B C=\left(90^{\circ}-\angle B M L\right)+\alpha=90^{\circ}-(\angle B M L-\alpha)=67^{\circ} . $$ Analogously we have $\angle C X K=\frac{1}{2} \angle B X C=\angle C N L$, therefore the quadrilateral $C X N K$ is inscribed also and $\angle X N M=\angle X C K=67^{\circ}$. Thus, the triangle $M X N$ is equilateral and $\angle M X N=180^{\circ}-2 \cdot 67^{\circ}=46^{\circ}$. ![](https://cdn.mathpix.com/cropped/2024_04_17_4538b08bc60536405202g-08.jpg?height=537&width=580&top_left_y=511&top_left_x=744) Problem 16. For a positive integer $k$, let $d(k)$ denote the number of divisors of $k$ (e.g. $d(12)=6$ ) and let $s(k)$ denote the digit sum of $k$ (e.g. $s(12)=3$ ). A positive integer $n$ is said to be amusing if there exists a positive integer $k$ such that $d(k)=s(k)=n$. What is the smallest amusing odd integer greater than 1 ? Solution. The answer is 9 . For every $k$ we have $s(k) \equiv k(\bmod 9)$. Calculating remainders modulo 9 we have the following table | $m$ | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | | $m^{2}$ | 0 | 1 | 4 | 0 | 7 | 7 | 0 | 4 | 1 | | $m^{6}$ | 0 | 1 | 1 | 0 | 1 | 1 | 0 | 1 | 1 | If $d(k)=3$, then $k=p^{2}$ with $p$ a prime, but $p^{2} \equiv 3(\bmod 9)$ is impossible. This shows that 3 is not an amusing number. If $d(k)=5$, then $k=p^{4}$ with $p$ a prime, but $p^{4} \equiv 5(\bmod 9)$ is impossible. This shows that 5 is not an amusing number. If $d(k)=7$, then $k=p^{6}$ with $p$ a prime, but $p^{6} \equiv 7(\bmod 9)$ is impossible. This shows that 7 is not an amusing number. To see that 9 is amusing, note that $d(36)=s(36)=9$. Problem 17. Find all positive integers $n$ such that the decimal representation of $n^{2}$ consists of odd digits only. Solution. The only such numbers are $n=1$ and $n=3$. If $n$ is even, then so is the last digit of $n^{2}$. If $n$ is odd and divisible by 5 , then $n=10 k+5$ for some integer $k \geq 0$ and the second-to-last digit of $n^{2}=(10 k+5)^{2}=100 k^{2}+100 k+25$ equals 2 . Thus we may restrict ourselves to numbers of the form $n=10 k \pm m$, where $m \in\{1,3\}$. Then $$ n^{2}=(10 k \pm m)^{2}=100 k^{2} \pm 20 k m+m^{2}=20 k(5 k \pm m)+m^{2} $$ and since $m^{2} \in\{1,9\}$, the second-to-last digit of $n^{2}$ is even unless the number $20 k(5 k-m)$ is equal to zero. We therefore have $n^{2}=m^{2}$ so $n=1$ or $n=3$. These numbers indeed satisfy the required condition. Problem 18. Let $p$ be a prime number. For each $k, 1 \leq k \leq p-1$, there exists a unique integer denoted by $k^{-1}$ such that $1 \leq k^{-1} \leq p-1$ and $k^{-1} \cdot k \equiv 1(\bmod p)$. Prove that the sequence $$ 1^{-1}, \quad 1^{-1}+2^{-1}, \quad 1^{-1}+2^{-1}+3^{-1}, \quad \ldots, \quad 1^{-1}+2^{-1}+\cdots+(p-1)^{-1} $$ (addition modulo $p$ ) contains at most $(p+1) / 2$ distinct elements. Solution. Calculating modulo $p$ we have that $(p-k) k^{-1}=-1$ so $(p-k)^{-1}=-k^{-1}$. If $p$ is odd, we set $m=\frac{p-1}{2}$ and it follows that $$ \sum_{k=1}^{p-1} k^{-1}=\sum_{k=1}^{m}\left(k^{-1}+(p-k)^{-1}\right)=0 $$ For $\ell$ such that $m<\ell2010$ we see that $k \leq 14$. Now we note that $p^{2} \equiv 1 \bmod 8$ if $p$ is an odd prime. We also have that $2010 \equiv 2 \bmod 8$. If all the primes are odd, then writing the original equation modulo 8 we get $$ k \cdot 1 \equiv 2 \bmod 8 $$ so either $k=2$ or $k=10$. $k=2:$ As $2010 \equiv 0 \bmod 3$ and $x^{2} \equiv 0$ or $x^{2} \equiv 1 \bmod 3$ we conclude that $p_{1} \equiv p_{2} \equiv 0$ mod 3. But that is impossible. $k=10$ : The sum of first 10 odd prime squares is already greater than $2010(961+841+$ $529+\cdots>2010)$ so this is impossible. Now we consider the case when one of the primes is 2 . Then the original equation modulo 8 takes the form $$ 4+(k-1) \cdot 1 \equiv 2 \quad \bmod 8 $$ so $k \equiv 7 \bmod 8$ and therefore $k=7$. For $k=7$ there are 4 possible solutions: $$ \begin{aligned} 4+9+49+169+289+529+961 & =2010 \\ 4+9+25+121+361+529+961 & =2010 \\ 4+9+25+49+121+841+961 & =2010 \\ 4+9+49+121+169+289+1369 & =2010 \end{aligned} $$ Finding them should not be too hard. We are already asuming that 4 is included. Considerations modulo 3 show that 9 must also be included. The square 1681 together with the 6 smallest prime squares gives a sum already greater than 2010 , so only prime squares up to $37^{2}=1369$ can be considered. If 25 is included, then for the remaining 4 prime squares considerations modulo 10 one can see that 3 out of 4 prime squares from $\{121,361,841,961\}$ have to be used and two of four cases are successful. If 25 is not included, then for the remaining 5 places again from considerations modulo 10 one can see, that 4 of them will be from the set $\{49,169,289,529,1369\}$ and two out of five cases are successful. Problem 20. Determine all positive integers $n$ for which there exists an infinite subset $A$ of the set $\mathbb{N}$ of positive integers such that for all pairwise distinct $a_{1}, \ldots, a_{n} \in A$ the numbers $a_{1}+\cdots+a_{n}$ and $a_{1} \cdots a_{n}$ are coprime. Solution. For $n=1$ the statement is obviously false. We assert that it is true for all $n>1$. We first consider the sequence $x_{0}, x_{1}, \ldots$ of positive integers which is recursively defined by $x_{0}=n$ and $x_{k+1}=\left(x_{0}+\cdots+x_{k}\right) !+1$ for $k \geq 0$. We claim that the set $A:=\left\{x_{k} \mid k \geq 1\right\}$ satisfies the condition. Suppose the contrary that there exist $1 \leq i_{1}<\cdotsi_{j}$. This implies $p \mid x_{i_{1}}+\ldots x_{i_{j-1}}+n-j=: S$. Because of $S>0$ and $S \leq x_{0}+\cdots+x_{i_{j}-1}$ we have $p \mid\left(x_{0}+\cdots+x_{i_{j}-1}\right) !=x_{i_{j}}-1$ which contradicts $p \mid x_{i_{j}}$. Thus, for every pairwise distinct $a_{1}, \ldots, a_{n} \in A$ the numbers $a_{1}+\cdots+a_{n}$ and $a_{1} \cdots a_{n}$ are indeed coprime.