BALTIC WAY 2015 Problems and Solutions ![](https://cdn.mathpix.com/cropped/2024_04_17_d4daccd4c48173d57f8eg-01.jpg?height=342&width=501&top_left_y=298&top_left_x=1251) # Problem 1. For $n \geq 2$, an equilateral triangle is divided into $n^{2}$ congruent smaller equilateral triangles. Determine all ways in which real numbers can be assigned to the $\frac{(n+1)(n+2)}{2}$ vertices so that three such numbers sum to zero whenever the three vertices form a triangle with edges parallel to the sides of the big triangle. Solution. We label the vertices (and the corresponding real numbers) as follows. ![](https://cdn.mathpix.com/cropped/2024_04_17_d4daccd4c48173d57f8eg-01.jpg?height=350&width=482&top_left_y=1136&top_left_x=819) For $n=2$, we see that $$ a_{2}+a_{4}+a_{5}=0=a_{2}+a_{3}+a_{5} $$ which shows that $a_{3}=a_{4}$ and similarly $a_{1}=a_{5}$ and $a_{2}=a_{6}$. Now the only additional requirement is $a_{1}+a_{2}+a_{3}=0$, so that all solutions are of the following form, for any $x, y$ and $z$ with $x+y+z=0$ : ![](https://cdn.mathpix.com/cropped/2024_04_17_d4daccd4c48173d57f8eg-01.jpg?height=256&width=452&top_left_y=1716&top_left_x=838) For $n=3$, observe that $a_{1}=a_{7}=a_{10}$ since they all equal $a_{5}$. Since also $a_{1}+a_{7}+a_{10}=0$, they all equal zero. By considering the top triangle, we get $x=a_{2}=-a_{3}$ and this uniquely determines the rest. It is easily checked that, for any real $x$, this is actually a solution: ![](https://cdn.mathpix.com/cropped/2024_04_17_d4daccd4c48173d57f8eg-02.jpg?height=292&width=112&top_left_y=373&top_left_x=1104) For $n \geq 3$ we can apply the same argument as above for any collection of 10 vertices. Any vertex not on the sides of the big triangle has to equal zero, since it is the centre of such a collection of 10 vertices. Any vertex $a$ on the sides of the big triangle forms some parallelogram similar to $a_{4}, a_{2}, a_{5}, a_{8}$, where the point opposite $a$ is in the interior of the big triangle. Since such opposite numbers are equal, all $a_{i}$ have to be zero in this case. ## Problem 2. Let $n$ be a positive integer and let $a_{1}, \ldots, a_{n}$ be real numbers satisfying $0 \leq a_{i} \leq 1$ for $i=1, \ldots, n$. Prove the inequality $$ \left(1-a_{1}^{n}\right)\left(1-a_{2}^{n}\right) \cdots\left(1-a_{n}^{n}\right) \leq\left(1-a_{1} a_{2} \cdots a_{n}\right)^{n} . $$ Solution. The numbers $1-a_{i}^{n}$ are positive by assumption. AM-GM gives $$ \begin{aligned} \left(1-a_{1}^{n}\right)\left(1-a_{2}^{n}\right) \cdots\left(1-a_{n}^{n}\right) & \leq\left(\frac{\left(1-a_{1}^{n}\right)+\left(1-a_{2}^{n}\right)+\cdots+\left(1-a_{n}^{n}\right)}{n}\right)^{n} \\ & =\left(1-\frac{a_{1}^{n}+\cdots+a_{n}^{n}}{n}\right)^{n} . \end{aligned} $$ By applying AM-GM again we obtain $$ a_{1} a_{2} \cdots a_{n} \leq \frac{a_{1}^{n}+\cdots+a_{n}^{n}}{n} \Rightarrow\left(1-\frac{a_{1}^{n}+\cdots+a_{n}^{n}}{n}\right)^{n} \leq\left(1-a_{1} a_{2} \cdots a_{n}\right)^{n} $$ and hence the desired inequality. Remark. It is possible to use Jensen's inequality applied to $f(x)=\log \left(1-e^{x}\right)$. ## Problem 3. Let $n>1$ be an integer. Find all non-constant real polynomials $P(x)$ satisfying, for any real $x$, the identity $$ P(x) P\left(x^{2}\right) P\left(x^{3}\right) \cdots P\left(x^{n}\right)=P\left(x^{\frac{n(n+1)}{2}}\right) . $$ Solution. Answer: $P(x)=x^{m}$ if $n$ is even; $P(x)= \pm x^{m}$ if $n$ is odd. Consider first the case of a monomial $P(x)=a x^{m}$ with $a \neq 0$. Then $$ a x^{\frac{m n(n+1)}{2}}=P\left(x^{\frac{n(n+1)}{2}}\right)=P(x) P\left(x^{2}\right) P\left(x^{3}\right) \cdots P\left(x^{n}\right)=a x^{m} \cdot a x^{2 m} \cdots a x^{n m}=a^{n} x^{\frac{m n(n+1)}{2}} $$ implies $a^{n}=a$. Thus, $a=1$ when $n$ is even and $a= \pm 1$ when $n$ is odd. Obviously these polynomials satisfy the desired equality. Suppose now that $P$ is not a monomial. Write $P(x)=a x^{m}+Q(x)$, where $Q$ is non-zero polynomial with $\operatorname{deg} Q=kk$. Consequently, no polynomial of the form $a x^{m}+Q(x)$ fulfils the given condition. ## Problem 4. A family wears clothes of three colours: red, blue and green, with a separate, identical laundry bin for each colour. At the beginning of the first week, all bins are empty. Each week, the family generates a total of $10 \mathrm{~kg}$ of laundry (the proportion of each colour is subject to variation). The laundry is sorted by colour and placed in the bins. Next, the heaviest bin (only one of them, if there are several that are heaviest) is emptied and its contents washed. What is the minimal possible storing capacity required of the laundry bins in order for them never to overflow? ## Solution. Answer: $25 \mathrm{~kg}$. Each week, the accumulation of laundry increases the total amount by $K=10$, after which the washing decreases it by at least one third, because, by the pigeon-hole principle, the bin with the most laundry must contain at least a third of the total. Hence the amount of laundry post-wash after the $n$th week is bounded above by the sequence $a_{n+1}=\frac{2}{3}\left(a_{n}+K\right)$ with $a_{0}=0$, which is clearly bounded above by $2 K$. The total amount of laundry is less than $2 K$ post-wash and $3 K$ pre-wash. Now suppose pre-wash state $(a, b, c)$ precedes post-wash state $(a, b, 0)$, which precedes pre-wash state $\left(a^{\prime}, b^{\prime}, c^{\prime}\right)$. The relations $a \leq c$ and $a^{\prime} \leq a+K$ lead to $$ 3 K>a+b+c \geq 2 a \geq 2\left(a^{\prime}-K\right) $$ and similarly for $b^{\prime}$, whence $a^{\prime}, b^{\prime}<\frac{5}{2} K$. Since also $c^{\prime} \leq K$, a pre-wash bin, and a fortiori a post-wash bin, always contains less than $\frac{5}{2} K$. Consider now the following scenario. For a start, we keep packing the three bins equally full before washing. Initialising at $(0,0,0)$, the first week will end at $\left(\frac{1}{3} K, \frac{1}{3} K, \frac{1}{3} K\right)$ pre-wash and $\left(\frac{1}{3} K, \frac{1}{3} K, 0\right)$ post-wash, the second week at $\left(\frac{5}{9} K, \frac{5}{9} K, \frac{5}{9} K\right)$ pre-wash and $\left(\frac{5}{9} K, \frac{5}{9} K, 0\right)$ post-wash, \&c. Following this scheme, we can get arbitrarily close to the state $(K, K, 0)$ after washing. Supposing this accomplished, placing $\frac{1}{2} K \mathrm{~kg}$ of laundry in each of the non-empty bins leaves us in a state close to $\left(\frac{3}{2} K, \frac{3}{2} K, 0\right)$ pre-wash and $\left(\frac{3}{2} K, 0,0\right)$ post-wash. Finally, the next week's worth of laundry is directed solely to the single non-empty bin. It may thus contain any amount of laundry below $\frac{5}{2} K \mathrm{~kg}$. ## Problem 5. Find all functions $f: \mathbf{R} \rightarrow \mathbf{R}$ satisfying the equation $$ |x| f(y)+y f(x)=f(x y)+f\left(x^{2}\right)+f(f(y)) $$ for all real numbers $x$ and $y$. Solution. Answer: all functions $f(x)=c(|x|-x)$, where $c \geq 0$. Choosing $x=y=0$, we find $$ f(f(0))=-2 f(0) $$ Denote $a=f(0)$, so that $f(a)=-2 a$, and choose $y=0$ in the initial equation: $$ a|x|=a+f\left(x^{2}\right)+f(a)=a+f\left(x^{2}\right)-2 a \quad \Rightarrow \quad f\left(x^{2}\right)=a(|x|+1) $$ In particular, $f(1)=2 a$. Choose $(x, y)=\left(z^{2}, 1\right)$ in the initial equation: $$ \begin{aligned} & z^{2} f(1)+f\left(z^{2}\right)=f\left(z^{2}\right)+f\left(z^{4}\right)+f(f(1)) \\ \Rightarrow & 2 a z^{2}=z^{2} f(1)=f\left(z^{4}\right)+f(f(1))=a\left(z^{2}+1\right)+f(2 a) \\ \Rightarrow & a z^{2}=a+f(2 a) \end{aligned} $$ The right-hand side is constant, while the left-hand side is a quadratic function in $z$, which can only happen if $a=0$. (Choose $z=1$ and then $z=0$.) We now conclude that $f\left(x^{2}\right)=0$, and so $f(x)=0$ for all non-negative $x$. In particular, $f(0)=0$. Choosing $x=0$ in the initial equation, we find $f(f(y))=0$ for all $y$. Simplifying the original equation and swapping $x$ and $y$ leads to $$ |x| f(y)+y f(x)=f(x y)=|y| f(x)+x f(y) . $$ Choose $y=-1$ and put $c=\frac{f(-1)}{2}$ : $$ |x| f(-1)-f(x)=f(x)+x f(-1) \Rightarrow f(x)=\frac{f(-1)}{2}(|x|-x)=c(|x|-x) \text {. } $$ One easily verifies that these functions satisfy the functional equation for any parameter $c \geq 0$. ## Problem 6. Two players take alternate turns in the following game. At the outset there are two piles, containing 10,000 and 20,000 tokens, respectively. A move consists of removing any positive number of tokens from a single pile or removing $x>0$ tokens from one pile and $y>0$ tokens from the other, where $x+y$ is divisible by 2015. The player who cannot make a move loses. Which player has a winning strategy? Solution. The first player wins. He should present his opponent with one of the following positions: $$ (0,0), \quad(1,1), \quad(2,2), \quad \ldots, \quad(2014,2014) . $$ All these positions have different total numbers of tokens modulo 2015. Therefore, if the game starts from two piles of arbitrary sizes, it is possible to obtain one of these positions just by the first move. In our case $$ 10,000+20,000 \equiv 1790 \bmod 2015, $$ and the first player can leave to his opponent the position $(895,895)$. Now the second type of move can no longer be carried out. If the second player removes $n$ tokens from one pile, the first player may always respond be removing $n$ tokens from the other pile. ## Problem 7. There are 100 members in a ladies' club. Each lady has had tea (in private) with exactly 56 of the other members of the club. The Board, consisting of the 50 most distinguished ladies, have all had tea with one another. Prove that the entire club may be split into two groups in such a way that, within each group, any lady has had tea with any other. Solution. Each lady in the Board has had tea with 49 ladies within the Board, and 7 ladies without. Each lady not in the Board has had tea with at most 49 ladies not in the Board, and at least 7 ladies in the Board. Comparing these two observations, we conclude that each lady not in the Board has had tea with exactly 49 ladies not in the Board and exactly 7 ladies in the Board. Hence the club may be split into Board members and non-members. ## Problem 8. With inspiration drawn from the rectilinear network of streets in New York, the Manhattan distance between two points $(a, b)$ and $(c, d)$ in the plane is defined to be $$ |a-c|+|b-d| \text {. } $$ Suppose only two distinct Manhattan distances occur between all pairs of distinct points of some point set. What is the maximal number of points in such a set? Solution. Answer: nine. Let $$ \left\{\left(x_{1}, y_{1}\right), \ldots,\left(x_{m}, y_{m}\right)\right\}, \quad \text { where } \quad x_{1} \leq \cdots \leq x_{m} $$ be the set, and suppose $m \geq 10$. A special case of the Erdős-Szekeres Theorem asserts that a real sequence of length $n^{2}+1$ contains a monotonic subsequence of length $n+1$. (Proof: Given a sequence $a_{1} \ldots, a_{n^{2}+1}$, let $p_{i}$ denote the length of the longest increasing subsequence ending with $a_{i}$, and $q_{i}$ the length of the longest decreasing subsequence ending with $a_{i}$. If $i2$ be an integer. A deck contains $\frac{n(n-1)}{2}$ cards, numbered $$ 1,2,3, \ldots, \frac{n(n-1)}{2} $$ Two cards form a magic pair if their numbers are consecutive, or if their numbers are 1 and $\frac{n(n-1)}{2}$. For which $n$ is it possible to distribute the cards into $n$ stacks in such a manner that, among the cards in any two stacks, there is exactly one magic pair? ## Solution 1. Answer: for all odd $n$. First assume a stack contains two cards that form a magic pair; say cards number $i$ and $i+1$. Among the cards in this stack and the stack with card number $i+2$ (they might be identical), there are two magic pairs - a contradiction. Hence no stack contains a magic pair. Each card forms a magic pair with exactly two other cards. Hence if $n$ is even, each stack must contain at least $\left\lceil\frac{n-1}{2}\right\rceil=\frac{n}{2}$ cards, since there are $n-1$ other stacks. But then we need at least $n \frac{n}{2}>\frac{n(n-1)}{2}$ cards - a contradiction. In the odd case we distribute the cards like this: Let $a_{1}, a_{2}, \ldots, a_{n}$ be the $n$ stacks and let $n=2 m+1$. Card number 1 is put into stack $a_{1}$. If card number $k m+i$, for $i=1,2, \ldots, m$, is put into stack $a_{j}$, then card number $k m+i+1$ is put into stack number $a_{j+i}$, where the indices are calculated modulo $n$. There are $$ \frac{n(n-1)}{2}=\frac{(2 m+1)(2 m)}{2}=m(2 m+1) $$ cards. If we look at all the card numbers of the form $k m+1$, there are exactly $n=2 m+1$ of these, and we claim that there is exactly one in each stack. Card number 1 is in stack $a_{1}$, and card number $k m+1$ is in stack $$ a_{1+k(1+2+3+\cdots+m)} $$ Since $$ 1+2+3+\cdots+m=\frac{m(m+1)}{2} $$ and $\operatorname{gcd}\left(2 m+1, \frac{m(m+1)}{2}\right)=1$, all the indices $$ 1+k(1+2+3+\cdots+m), \quad k=0,1,2, \ldots, 2 m $$ are different modulo $n=2 m+1$. In the same way we see that each stack contains exactly one of the $2 m+1$ cards with the numbers $k m+i$ for a given $i=2,3, \ldots, m$. Now look at two different stacks $a_{v}$ and $a_{u}$. Then, without loss of generality, we may assume that $u=v+i$ for some $i=1,2, \ldots, m$ (again we consider the index modulo $n=2 m+1$ ). Since there is a card in stack $a_{v}$ with number $k m+i$, the card $k m+i+1$ is in stack $a_{v+i}=a_{u}$. Hence among the cards in any two stacks there is at least one magic pair. Since there is the same number of pairs of stacks as of magic pairs, there must be exactly one magic pair among the cards of any two stacks. Solution 2 (found by Saint Petersburg). For the case of $n$ odd, consider the complete graph on the vertices $1, \ldots, n$ with $\frac{n(n-1)}{2}$ edges. The degree of each vertex is $n-1$, which is even, hence an Euler cycle $v_{1} v_{2} \cdots v_{\frac{n(n-1)}{2}} v_{1}$ exists. Place card number $i$ into stack number $v_{i}$. The magic pairs correspond to edges in the cycle. ## Problem 10. A subset $S$ of $\{1,2, \ldots, n\}$ is called balanced if for every $a \in S$ there exists some $b \in S, b \neq a$, such that $\frac{a+b}{2} \in S$ as well. (a) Let $k>1$ be an integer and let $n=2^{k}$. Show that every subset $S$ of $\{1,2, \ldots, n\}$ with $|S|>\frac{3 n}{4}$ is balanced. (b) Does there exist an $n=2^{k}$, with $k>1$ an integer, for which every subset $S$ of $\{1,2, \ldots, n\}$ with $|S|>\frac{2 n}{3}$ is balanced? Solution of part (a). Let $m=n-|S|$, thus $m<\frac{n}{4}$ and (as $n$ is a multiple of 4 ) $m \leq \frac{n}{4}-1$. Let $a \in S$. There are $\frac{n}{2}-1$ elements in $\{1,2, \ldots, n\}$ distinct from $a$ and with the same parity as $a$. At most $m$ of those elements are not in $S$, hence at least $\frac{n}{2}-1-m \geq \frac{n}{4}$ of them are in $S$. For each such $b$, the number $\frac{a+b}{2}$ is an integer, and all of these at least $\frac{n}{4}$ numbers are distinct. But at most $m<\frac{n}{4}$ of them are not in $S$, so at least one is a member of $S$. Hence $S$ is balanced. Solution 1 of part (b). For convenience we work with $\{0,1, \ldots, n-1\}$ rather than $\{1,2, \ldots, n\}$; this does not change the problem. We show that one can always find an unbalanced subset containing more than $\frac{2 n}{3}$ elements. Let $\operatorname{ord}_{2}(i)$ denote the number of factors 2 occurring in the prime factorisation of $i$. We set $$ T_{j}=\left\{i \in\{1,2, \ldots, n-1\} \mid \operatorname{ord}_{2}(i)=j\right\} $$ Then we choose $$ S=\{0,1,2, \ldots, n-1\} \backslash\left(T_{1} \cup T_{3} \cup \cdots \cup T_{l}\right), \quad \text { where } l= \begin{cases}k-1 & \text { if } k \text { even } \\ k-2 & \text { if } k \text { odd. }\end{cases} $$ Observe that $\left|T_{j}\right|=\frac{n}{2^{j+1}}$, so $$ |S|=n-\left(\frac{n}{4}+\frac{n}{16}+\cdots+\frac{n}{2^{l+1}}\right)=n-n \cdot \frac{\frac{1}{4}-\frac{1}{2^{l+3}}}{1-\frac{1}{4}}>n-\frac{n}{3}=\frac{2 n}{3} . $$ We show that $S$ is not balanced. Take $a=0 \in S$, and consider a $0 \neq b \in S$. If $b$ is odd, then $\frac{0+b}{2}$ is not integral. If $b$ is even, then $b \in T_{2} \cup T_{4} \cup \cdots$, so $\frac{b}{2} \in T_{1} \cup T_{3} \cup \cdots$, hence $\frac{b}{2} \notin S$. Thus $S$ is not balanced. Solution 2 of part (b). We define the sets $$ A_{j}=\left\{2^{j-1}+1,2^{j-1}+2, \ldots, 2^{j}\right\} $$ and set $$ S=A_{k} \cup A_{k-2} \cup \cdots \cup A_{l} \cup\{1\}, \quad \text { where } l= \begin{cases}2 & \text { if } k \text { even }, \\ 1 & \text { if } k \text { odd. }\end{cases} $$ Note that $A_{j} \subseteq\{1,2, \ldots, n\}$ whenever $j \leq k$, and that $\left|A_{j}\right|=2^{j-1}$. We find $$ |S|=2^{k-1}+2^{k-3}+\cdots+2^{l-1}+1=\frac{2^{l-1}-2^{k+1}}{1-4}+1=-\frac{2^{l-1}}{3}+\frac{2 n}{3}+1>\frac{2 n}{3} . $$ We show that $S$ is not balanced. Take $a=1 \in S$, and consider a $1 \neq b \in S$. Then $b \in A_{j}$ for some $j$. If $b$ is even, then $\frac{1+b}{2}$ is not integral. If $b$ is odd, then also $1+b \in A_{j}$, so $\frac{1+b}{2} \in A_{j-1}$ and does not lie in $S$. Thus $S$ is not balanced. Solution 3 of part (b). Let us introduce the concept of lonely element as an $a \in S$ for which there does not exist a $b \in S$, distinct from $a$, such that $\frac{a+b}{2} \in S$. We will construct an unbalanced set $S$ with $|S|>\frac{2 n}{3}$ for all $k$. For $n=4$ we can use $S=\{1,2,4\}$ (all elements are lonely), and for $n=8$ we can use $S=\{1,2,3,5,6,7\}$ (2 and 6 are lonely). We now construct an unbalanced set $S \subseteq\{1,2, \ldots, 4 n\}$, given an unbalanced set $T \subseteq\{1,2, \ldots, n\}$ with $|T|>\frac{2 n}{3}$. Take $$ S=\{i \in\{1,2, \ldots, 4 n\} \mid i \equiv 1 \bmod 2\} \cup\{4 t-2 \mid t \in T\} $$ Then $$ |S|=2 n+|T|>2 n+\frac{2 n}{3}=\frac{8 n}{3}=\frac{2 \cdot 4 n}{3} . $$ ![](https://cdn.mathpix.com/cropped/2024_04_17_d4daccd4c48173d57f8eg-08.jpg?height=393&width=393&top_left_y=291&top_left_x=866) Figure 1: Problem 11. Supposing $a \in T$ is lonely, we will show that $4 a-2 \in S$ is lonely. Indeed, suppose $4 a-2 \neq b \in S$ with $$ \frac{4 a-2+b}{2}=2 a-1+\frac{b}{2} \in S . $$ Then $b$ must be even, so $b=4 t-2$ for some $a \neq t \in T$. But then $$ \frac{4 a-2+4 t-2}{2}=4 \frac{a+t}{2}-2 $$ again an even element. However, as $a$ is lonely we know that $\frac{a+t}{2} \notin T$, and hence $4 \frac{a+t}{2}-2 \notin S$. We conclude that $4 a-2$ is lonely in $S$. Thus $S$ is an unbalanced set, and by induction we can find an unbalanced set of size exceeding $\frac{2 n}{3}$ for all $k>1$. ## Problem 11. The diagonals of the parallelogram $A B C D$ intersect at $E$. The bisectors of $\angle D A E$ and $\angle E B C$ intersect at $F$. Assume that $E C F D$ is a parallelogram. Determine the ratio $A B: A D$. Solution. Since $E C F D$ is a parallelogram, we have $E D \| C F$ and $\angle C F B=\angle E B F=\angle F B C(B F$ bisects $\angle D B C$ ). So $C F B$ is an isosceles triangle and $B C=C F=E D$ (ECFD is a parallelogram). In a similar manner, $E C=A D$. But since $A B C D$ is a parallelogram, $A D=B C$, whence $E C=E D$. So the diagonals of $A B C D$ are equal, which means that $A B C D$ is in fact a rectangle. Also, the triangles $E D A$ and $E B C$ are equilateral, and so $A B$ is twice the altitude of $E D A$, or $A B=\sqrt{3} \cdot A D$. ## Problem 12. A circle passes through vertex $B$ of the triangle $A B C$, intersects its sides $A B$ and $B C$ at points $K$ and $L$, respectively, and touches the side $A C$ at its midpoint $M$. The point $N$ on the $\operatorname{arc} B L$ (which does not contain $K)$ is such that $\angle L K N=\angle A C B$. Find $\angle B A C$ given that the triangle $C K N$ is equilateral. Solution. Answer: $\angle B A C=75^{\circ}$. Since $\angle A C B=\angle L K N=\angle L B N$, the lines $A C$ and $B N$ are parallel. Hence $A C N B$ is a trapezium. Moreover, $A C N B$ is an isosceles trapezium, because the segment $A C$ touches the circle $s$ in the midpoint (and so the trapezium is symmetrical with respect to the perpendicular bisectors of $B N$ ). ![](https://cdn.mathpix.com/cropped/2024_04_17_d4daccd4c48173d57f8eg-09.jpg?height=434&width=912&top_left_y=282&top_left_x=602) Figure 2: Problem 12. Denote by $K^{\prime}$ the intersection point of $s$ and $C N$. Then the line $K K^{\prime}$ is parallel to the bases of the trapezium. Hence $M$ is the midpoint of $\operatorname{arc} K K^{\prime}$ and the line $N M$ is an angle bisector of the equilateral triangle $K N C$. Thus we obtain that $M C=M K$. Therefore the length of median $K M$ of the triangle $A K C$ equals $\frac{1}{2} A C$; hence $\angle A K C=90^{\circ}$. We have $$ 2 \angle A=\angle K A C+\angle A C N=\angle K A C+\angle A C K+\angle K C N=90^{\circ}+60^{\circ}=150^{\circ} \text {, } $$ and so $\angle A=75^{\circ}$. ## Problem 13. Let $D$ be the footpoint of the altitude from $B$ in the triangle $A B C$, where $A B=1$. The incentre of triangle $B C D$ coincides with the centroid of triangle $A B C$. Find the lengths of $A C$ and $B C$. Solution. Answer: $A C=B C=\sqrt{\frac{5}{2}}$. The centroid of $A B C$ lies on the median $C C^{\prime}$. It will also, by the assumption, lie on the angle bisector through $C$. Since the median and the angle bisector coincide, $A B C$ is isosceles with $A C=$ $B C=a$. Furthermore, the centroid lies on the median $B B^{\prime}$ and the bisector of $\angle D B C$, again by hypothesis. By the Angle Bisector Theorem, $$ \frac{B^{\prime} D}{B D}=\frac{B^{\prime} C}{B C}=\frac{a / 2}{a}=\frac{1}{2} $$ The triangles $A B D \sim A C C^{\prime}$ since they have equal angles, whence $$ \frac{1}{a}=\frac{A B}{A C}=\frac{A D}{A C^{\prime}}=\frac{a / 2-B^{\prime} D}{1 / 2}=a-B D $$ Using the fact that the length of the altitude $C C^{\prime}$ is $\sqrt{a^{2}-\frac{1}{4}}$, this leads to $$ a^{2}-1=a B D=2|A B C|=\sqrt{a^{2}-\frac{1}{4}}, $$ or, equivalently, $$ a^{2}-1=\sqrt{a^{2}-\frac{1}{4}} $$ Clearly, $a>1$, and the only solution is $a=\sqrt{\frac{5}{2}}$. ## Problem 14. In the non-isosceles triangle $A B C$ the altitude from $A$ meets side $B C$ in $D$. Let $M$ be the midpoint of $B C$ and let $N$ be the reflection of $M$ in $D$. The circumcircle of the triangle $A M N$ intersects the side $A B$ in $P \neq A$ and the side $A C$ in $Q \neq A$. Prove that $A N, B Q$ and $C P$ are concurrent. Solution 1. Without loss of generality, we assume the order of the points on $B C$ to be $B, M, D, N$, $C$. This implies that $P$ is on the segment $A B$ and $Q$ is on the segment $A C$. Since $D$ is the midpoint of $M N$ and $A D$ is perpendicular to $M N$, the line $A D$ is the perpendicular bisector of $M N$, which contains the circumcentre of $\triangle A M N$. As $A$ is on the perpendicular bisector of $M N$, we have $|A M|=|A N|$. We now have $\angle A P M=\angle A Q N$. Therefore $$ \angle C Q N=180^{\circ}-\angle A Q N=180^{\circ}-\angle A P M=\angle B P M \text {. } $$ Furthermore, as $N M P Q$ is cyclic, we have $$ \angle N Q P=180^{\circ}-\angle N M P=\angle B M P \text {. } $$ Hence $$ \angle A Q P=180^{\circ}-\angle C Q N-\angle N Q P=180^{\circ}-\angle B P M-\angle B M P=\angle P B M=\angle A B C . $$ Similarly, $$ \angle A P Q=\angle B C A \text {. } $$ Now we have $\triangle A P Q \sim \triangle A C B$. So $$ \frac{|A P|}{|A Q|}=\frac{|A C|}{|A B|} $$ Furthermore, $\angle M A B=\angle M A P=\angle M N P=\angle B N P$, so $\triangle B M A \sim \triangle B P N$, and hence $$ \frac{|B N|}{|B P|}=\frac{|B A|}{|B M|} $$ We also have $\angle C A M=\angle Q A M=180^{\circ}-\angle Q N M=\angle Q N C$. This implies $\triangle C M A \sim \triangle C Q N$, so $$ \frac{|C Q|}{|C N|}=\frac{|C M|}{|C A|} $$ Putting everything together, we find $$ \frac{|B N|}{|B P|} \cdot \frac{|C Q|}{|C N|} \cdot \frac{|A P|}{|A Q|}=\frac{|B A|}{|B M|} \cdot \frac{|C M|}{|C A|} \cdot \frac{|A C|}{|A B|} $$ As $|B M|=|C M|$, the right-hand side is equal to 1 . This means that $$ \frac{|B N|}{|N C|} \cdot \frac{|C Q|}{|Q A|} \cdot \frac{|A P|}{|P B|}=1 $$ With Ceva's theorem we can conclude that $A N, B Q$ and $C P$ are concurrent. Solution 2. We consider the same configuration as in Solution 1. Let $K$ be the second intersection of $A D$ with the circumcircle of $\triangle A M N$. Since $D$ is the midpoint of $M N$ and $A D$ is perpendicular to $M N$, the line $A D$ is the perpendicular bisector of $M N$, which contains the circumcentre of $\triangle A M N$. So $A K$ is a diameter of this circumcircle. Now we have $\angle B P K=90^{\circ}=\angle B D K$, so $B P D K$ is a cyclic quadrilateral. Also, $A, M, N, K, P$ and $Q$ are concyclic. Using both circles, we find $$ 180^{\circ}-\angle C Q P=\angle A Q P=\angle A K P=\angle D K P=\angle D B P=\angle C B P . $$ This implies that $B P Q C$ is cyclic as well. Using the power theorem we find $A P \cdot A B=A Q \cdot A C$, with directed lengths. Also, $B N \cdot B M=B P \cdot B A$ and $C N \cdot C M=C Q \cdot C A$. Hence $$ A P \cdot A B \cdot B N \cdot B M \cdot C Q \cdot C A=A Q \cdot A C \cdot B P \cdot B A \cdot C N \cdot C M $$ Changing the signs of all six lengths on the right-hand side and replacing $M C$ by $B M$, we find $$ A P \cdot A B \cdot B N \cdot B M \cdot C Q \cdot C A=Q A \cdot C A \cdot P B \cdot A B \cdot N C \cdot B M $$ Cleaning this up, we have $$ A P \cdot B N \cdot C Q=Q A \cdot P B \cdot N C, $$ implying $$ \frac{B N}{N C} \cdot \frac{C Q}{Q A} \cdot \frac{A P}{P B}=1 $$ With Ceva's theorem we can conclude that $A N, B Q$ and $C P$ are concurrent. ## Problem 15. In triangle $A B C$, the interior and exterior angle bisectors of $\angle B A C$ intersect the line $B C$ in $D$ and $E$, respectively. Let $F$ be the second point of intersection of the line $A D$ with the circumcircle of the triangle $A B C$. Let $O$ be the circumcentre of the triangle $A B C$ and let $D^{\prime}$ be the reflection of $D$ in $O$. Prove that $\angle D^{\prime} F E=90^{\circ}$. Solution 1. Note that $A B \neq A C$, since otherwise the exterior angle bisector of $\angle B A C$ would be parallel to $B C$. So assume without loss of generality that $A B90^{\circ}$, the proof is similar (the cyclic quadrilateral will this time be $A M O N$ ). Solution 4. We consider the configuration where $C, D, B$ and $E$ are on the line $B C$ in that order. The other configuration can be solved analogously. Let $P$ and $R$ be the feet of the perpendiculars from $D^{\prime}$ and $O$ to the line $A D$, respectively, and let $Q$ and $S$ be the feet of the perpendiculars from $D^{\prime}$ and $O$ to the line $C D$, respectively. Since $D^{\prime}$ is the reflection of $D$ with respect to $O$, we have $P R=R D$. Since we also have $O A=O F$ and therefore $R A=R F$, we obtain $A D=P F$. Similarly, $C D=B Q$. By Pythagoras's theorem, $$ D^{\prime} F^{2}=D^{\prime} P^{2}+P F^{2}=4 O R^{2}+A D^{2}=4 O A^{2}-4 A R^{2}+A D^{2}=4 O A^{2}-A F^{2}+A D^{2} $$ and $$ D^{\prime} E^{2}=D^{\prime} Q^{2}+E Q^{2}=4 O S^{2}+E Q^{2}=4 O B^{2}-4 B S^{2}+E Q^{2}=4 O B^{2}-B C^{2}+(E B+C D)^{2} . $$ And since $\angle E A F=90^{\circ}$ we have $$ E F^{2}=A E^{2}+A F^{2} . $$ As $O A=O B$, we conclude that $$ \begin{array}{r} D^{\prime} F^{2}+E F^{2}-D^{\prime} E^{2}=\left(4 O A^{2}-A F^{2}+A D^{2}\right)+\left(A E^{2}+A F^{2}\right)-\left(4 O B^{2}-B C^{2}+(E B+C D)^{2}\right) \\ =A E^{2}+A D^{2}+B C^{2}-(E B+C D)^{2} \end{array} $$ By Pythagoras's theorem again, we obtain $A E^{2}+A D^{2}=E D^{2}$, and hence $$ D^{\prime} F^{2}+E F^{2}-D^{\prime} E^{2}=E D^{2}+B C^{2}-(E B+C D)^{2} . $$ We have $$ \begin{aligned} E D^{2}+B C^{2} & =(E B+B D)^{2}+(B D+C D)^{2} \\ & =E B^{2}+B D^{2}+2 \cdot E B \cdot B D+B D^{2}+C D^{2}+2 \cdot B D \cdot C D \\ & =E B^{2}+C D^{2}+2 \cdot B D \cdot(E B+B D+C D) \\ & =E B^{2}+C D^{2}+2 \cdot B D \cdot E C . \end{aligned} $$ By the internal and external bisector theorems, we have $$ \frac{B D}{C D}=\frac{B A}{C A}=\frac{B E}{C E}, $$ hence $$ E D^{2}+B C^{2}=E B^{2}+C D^{2}+2 \cdot C D \cdot B E=(E B+C D)^{2} . $$ So $$ D^{\prime} F^{2}+E F^{2}-D^{\prime} E^{2}=0, $$ which implies that $\angle D^{\prime} F E=90^{\circ}$. ## Problem 16. Denote by $P(n)$ the greatest prime divisor of $n$. Find all integers $n \geq 2$ for which $$ P(n)+\lfloor\sqrt{n}\rfloor=P(n+1)+\lfloor\sqrt{n+1}\rfloor . $$ (Note: $\lfloor x\rfloor$ denotes the greatest integer less than or equal to $x$.) Solution. Answer: The equality holds only for $n=3$. It is easy to see that $P(n) \neq P(n+1)$. Therefore we need also that $\lfloor\sqrt{n}\rfloor \neq\lfloor\sqrt{n+1}\rfloor$ in order for equality to hold. This is only possible if $n+1$ is a perfect square. In this case, $$ \lfloor\sqrt{n}\rfloor+1=\lfloor\sqrt{n+1}\rfloor $$ and hence $P(n)=P(n+1)+1$. As both $P(n)$ and $P(n+1)$ are primes, it must be that $P(n)=3$ and $P(n+1)=2$. It follows that $n=3^{a}$ and $n+1=2^{b}$, and we are required to solve the equation $3^{a}=2^{b}-1$. Calculating modulo 3 , we find that $b$ is even. Put $b=2 c$ : $$ 3^{a}=\left(2^{c}-1\right)\left(2^{c}+1\right) . $$ As both factors cannot be divisible by 3 (their difference is 2 ), $2^{c}-1=1$. From this we get $c=1$, which leads to $n=3$. ## Problem 17. Find all positive integers $n$ for which $n^{n-1}-1$ is divisible by $2^{2015}$, but not by $2^{2016}$. Solution. Since $n$ must be odd, write $n=2^{d} u+1$, where $u, d \in \mathbf{N}$ and $u$ is odd. Now $$ n^{n-1}-1=\left(n^{2^{d}}-1\right)(\underbrace{n^{2^{d} \cdot(u-1)}+\cdots+n^{2^{d} \cdot 1}+1}_{u}), $$ and hence $2^{2015} \|\left(n^{n-1}-1\right)$ iff $2^{2015} \|\left(n^{2^{d}}-1\right)$. (The notation $p^{k} \| m$ denotes that $p^{k} \mid m$ and $p^{k+1} \nmid m$.) We factorise once more: $$ \begin{aligned} n^{2^{d}}-1 & =(n-1)(n+1) \underbrace{\left(n^{2}+1\right) \cdots\left(n^{2^{d-1}}+1\right)}_{d-1} \\ & =2^{d} u \cdot 2\left(2^{d-1} u+1\right) \underbrace{\left(n^{2}+1\right) \cdots\left(n^{2^{d-1}}+1\right)}_{d-1} . \end{aligned} $$ If $k \geq 1$, then $2 \| n^{2^{k}}+1$, and so from the above $$ 2^{2 d} \| 2^{d} u \cdot 2 \cdot \underbrace{\left(n^{2}+1\right) \cdots\left(n^{2^{d-1}}+1\right)}_{d-1} \quad \text { and } \quad 2^{2015-2 d} \|\left(2^{d-1} u+1\right) $$ It is easy to see that this is the case exactly when $d=1$ and $u=2^{2013} v-1$, where $v$ is odd. Hence the required numbers are those of the form $$ n=2\left(2^{2013} v-1\right)+1=2^{2014} v-1 $$ for $v$ a positive odd number. ## Problem 18. Let $f(x)=x^{n}+a_{n-1} x^{n-1}+\cdots+a_{0}$ be a polynomial of degree $n \geq 1$ with $n$ (not necessarily distinct) integer roots. Assume that there exist distinct primes $p_{0}, p_{1}, \ldots, p_{n-1}$ such that $a_{i}>1$ is a power of $p_{i}$, for all $i=0, \ldots, n-1$. Find all possible values of $n$. Solution. Obviously all the roots have to be negative by the positivity of the coefficients. If at least two of the roots are unequal to -1 , then both of them have to be powers of $p_{0}$. Now Vieta's formulæ yield $p_{0} \mid a_{1}$, which is a contradiction. Thus we can factor $f$ as $$ f(x)=\left(x+a_{0}\right)(x+1)^{n-1} $$ Expanding yields $$ a_{2}=\left(\begin{array}{c} n-1 \\ 1 \end{array}\right)+a_{0}\left(\begin{array}{c} n-1 \\ 2 \end{array}\right) \quad \text { and } \quad a_{n-2}=a_{0}\left(\begin{array}{l} n-1 \\ n-2 \end{array}\right)+\left(\begin{array}{l} n-1 \\ n-3 \end{array}\right) $$ If $n \geq 5$, we see that $2 \neq n-2$ and so the two coefficients above are relatively prime, being powers of two distinct primes. However, depending on the parity of $n$, we have that $a_{2}$ and $a_{n-2}$ are both divisible by $n-1$ or $\frac{n-1}{2}$, which is a contradiction. For $n=1,2,3,4$, the following polynomials meet the requirements: $$ \begin{aligned} & f_{1}(x)=x+2 \\ & f_{2}(x)=(x+2)(x+1)=x^{2}+3 x+2 \\ & f_{3}(x)=(x+3)(x+1)^{2}=x^{3}+5 x^{2}+7 x+3 \\ & f_{4}(x)=(x+2)(x+1)^{3}=x^{4}+5 x^{3}+9 x^{2}+7 x+2 \end{aligned} $$ ## Problem 19. Three pairwise distinct positive integers $a, b, c$, with $\operatorname{gcd}(a, b, c)=1$, satisfy $$ a\left|(b-c)^{2}, \quad b\right|(c-a)^{2} \quad \text { and } \quad c \mid(a-b)^{2} \text {. } $$ Prove that there does not exist a non-degenerate triangle with side lengths $a, b, c$. Solution. First observe that these numbers are pairwise coprime. Indeed, if, say, $a$ and $b$ are divisible by a prime $p$, then $p$ divides $b$, which divides $(a-c)^{2}$; hence $p$ divides $a-c$, and therefore $p$ divides $c$. Thus, $p$ is a common divisor of these three numbers, a contradiction. Now consider the number $$ M=2 a b+2 b c+2 a c-a^{2}-b^{2}-c^{2} . $$ It is clear from the problem condition that $M$ is divisible by $a, b, c$, and therefore $M$ is divisible by $a b c$. Assume that a triangle with sides $a, b, c$ exists. Then $a0$, and hence $M \geq a b c$. On the other hand, $$ a^{2}+b^{2}+c^{2}>a b+b c+a c $$ and therefore $Mb>c$, we must have $M<3 a b$. Taking into account the inequality $M \geq a b c$, we conclude that $c=1$ or $c=2$ are the only possibilities. For $c=1$ we have $b