13. A7 (RUS) For a polynomial $P$ of degree 2000 with distinct real coefficients let $M(P)$ be the set of all polynomials that can be produced from $P$ by permutation of its coefficients. A polynomial $P$ will be called $n$-independent if $P(n)=0$ and we can get from any $Q$ in $M(P)$ a polynomial $Q_{1}$ such that $Q_{1}(n)=0$ by interchanging at most one pair of coefficients of $Q$. Find all integers $n$ for which $n$-independent polynomials exist.

Solution: 13. One can easily find $n$-independent polynomials for $n=0,1$. For example, $P_{0}(x)=2000 x^{2000}+\cdots+2 x^{2}+x+0$ is 0 -independent (for $Q \in M\left(P_{0}\right)$ it suffices to exchange the coefficient 0 of $Q$ with the last term), and $P_{1}(x)=2000 x^{2000}+\cdots+2 x^{2}+x-(1+2+\cdots+2000)$ is 1-independent (since any $Q \in M\left(P_{1}\right)$ vanishes at $\left.x=1\right)$. Let us show that no $n$-independent polynomials exist for $n \notin\{0,1\}$. Consider separately the case $n=-1$. For any set $T$ we denote by $S(T)$ the sum of elements of $T$. Suppose that $P(x)=a_{2000} x^{2000}+\cdots+a_{1} x+a_{0}$ is $-1-$ independent. Since $P(-1)=\left(a_{0}+a_{2}+\cdots+a_{2000}\right)-\left(a_{1}+a_{3}+\cdots+a_{1999}\right)$, this means that for any subset $E$ of the set $C=\left\{a_{0}, a_{1}, \ldots, a_{2000}\right\}$ having 1000 or 1001 elements there exist elements $e \in E$ and $f \in C \backslash E$ such that $S(E \cup\{f\} \backslash\{e\})=\frac{1}{2} S(C)$, or equivalently that $S(E)-\frac{1}{2} S(C)=e-f$. We may assume w.l.o.g. that $a_{0}<a_{1}<\cdots<a_{2000}$. Suppose that $E$ is a 1000 -element subset of $C$ containing $b_{0}, b_{1}$ but not $b_{1999}, b_{2000}$. By the -1 -independence of $P$ there exist $e \in E$ and $f \in$ $C \backslash E$ such that $S(E)-\frac{1}{2} S(C)=e-f$. The same must hold for the set $E^{\prime}=E \cup\left\{b_{1999}, b_{2000}\right\} \backslash\left\{b_{0}, b_{1}\right\}$, so for some $e^{\prime} \in E^{\prime}$ and $f^{\prime} \in C \backslash E^{\prime}$ we have $S\left(E^{\prime}\right)-\frac{1}{2} S(C)=e^{\prime}-f^{\prime}$. It follows that $b_{1999}+b_{2000}-b_{0}-b_{1}=$ $S\left(E^{\prime}\right)-S(E)=e+e^{\prime}-f-f^{\prime}$. Therefore the transposition $e \leftrightarrow f$ must involve at least one of the elements $b_{0}, b_{1}, b_{1999}, b_{2000}$.  There are 7994 possible transpositions involving one of these four elements. On the other hand, by (SL93-12) the subsets $E$ of $C$ containing $b_{0}, b_{1}$ but not $b_{1999}, b_{2000}$ give at least $998 \cdot 999+1$ distinct sums of elements, far exceeding 7994. This is a contradiction. For the case $|n| \geq 2$ we need the following lemma. Lemma. Let $n \geq 2$ be a natural number and $P(x)=a_{m} x^{m}+\cdots+a_{1} x+a_{0}$ a polynomial with distinct coefficients. Then the set $\{Q(n) \mid Q \in M(P)\}$ contains at least $2^{m}$ elements. Proof. We shall use induction on $m$. The statement is easily verified for $m=1$. Assume w.l.o.g. that $a_{m}<\cdots<a_{1}<a_{0}$. Consider two polynomials $Q_{k}$ and $Q_{k+1}$ of the form  $$ \begin{aligned} Q_{k}(x) & =a_{m} x^{m}+\cdots+a_{k} x^{k}+a_{0} x^{k-1}+b_{k-1} x^{k-2}+\cdots+b_{1}, \\ Q_{k+1}(x) & =a_{m} x^{m}+\cdots+a_{k+1} x^{k+1}+a_{0} x^{k}+c_{k} x^{k-1}+\cdots+c_{1}, \end{aligned} $$  where $\left(b_{k-1}, \ldots, b_{1}\right)$ and $\left(c_{k}, \ldots, c_{1}\right)$ are permutations of the sets $\left\{a_{k-1}, \ldots, a_{1}\right\}$ and $\left\{a_{k}, \ldots, a_{1}\right\}$ respectively. We claim that $Q_{k+1}(n) \geq$ $Q_{k}(n)$. Indeed, since $a_{0}-c_{k} \leq a_{0}-a_{k}$ and $b_{j}-c_{j}<a_{0}-a_{k}$ for $1 \leq j \leq n-1$, we have $Q_{k+1}(n)-Q_{k}(x)=\left(a_{0}-a_{k}\right) n^{k}-\left(a_{0}-c_{k}\right) n^{k-1}-$ $\left(b_{k-1}-c_{k-1}\right) n^{k-2}-\cdots-\left(b_{1}-c_{1}\right) \geq\left(a_{0}-a_{k}\right)\left(n^{k}-n^{k-1}-\cdots-n-1\right)>0$. Furthermore, by the induction hypothesis the polynomials of the form $Q_{k}(x)$ take at least $2^{k-2}$ values at $x=n$. Hence the total number of values of $Q(n)$ for $Q \in M(P)$ is at least $1+1+2+2^{2}+\cdots+2^{m-1}=2^{m}$. Now we return to the main result. Suppose that $P(x)=a_{2000} x^{2000}$ $+a_{1999} x^{1999}+a_{0}$ is an $n$-independent polynomial. Since $P_{2}(x)=a_{2000} x^{2000}$ $+a_{1998} x^{1998}+\cdots+a_{2} x^{2}+a_{0}$ is a polynomial in $t=x^{2}$ of degree 1000 , by the lemma it takes at least $2^{1000}$ distinct values at $x=n$. Hence $\{Q(n) \mid Q \in$ $M(P)\}$ contains at least $2^{1000}$ elements. On the other hand, interchanging the coefficients $b_{i}$ and $b_{j}$ in a polynomial $Q(x)=b_{2000} x^{2000}+\cdots+b_{0}$ modifies the value of $Q$ at $x=n$ by $\left(b_{i}-b_{j}\right)\left(n^{i}-n^{j}\right)=\left(a_{k}-a_{l}\right)\left(n^{i}-n^{j}\right)$ for some $k, l$. Hence there are fewer than $2001^{4}$ possible modifications of the value at $n$. Since $2001^{4}<2^{1000}$, we have arrived at a contradiction.


14. N1 (JAP) Determine all positive integers $n \geq 2$ that satisfy the following condition: For all integers $a, b$ relatively prime to $n$,  $$ a \equiv b(\bmod n) \quad \text { if and only if } \quad a b \equiv 1(\bmod n) $$

Solution: 14. The given condition is obviously equivalent to $a^{2} \equiv 1(\bmod n)$ for all integers $a$ coprime to $n$. Let $n=p_{1}^{\alpha_{1}} p_{2}^{\alpha_{2}} \cdots p_{k}^{\alpha_{k}}$ be the factorization of $n$ onto primes. Since by the Chinese remainder theorem the numbers coprime to $n$ can give any remainder modulo $p_{i}^{\alpha_{i}}$ except 0 , our condition is equivalent to $a^{2} \equiv 1\left(\bmod p_{i}^{\alpha_{i}}\right)$ for all $i$ and integers $a$ coprime to $p_{i}$. Now if $p_{i} \geq 3$, we have $2^{2} \equiv 1\left(\bmod p_{i}^{\alpha_{i}}\right)$, so $p_{i}=3$ and $\alpha_{i}=2$. If $p_{j}=2$, then $3^{2} \equiv 1\left(\bmod 2^{\alpha_{j}}\right)$ implies $\alpha_{j} \leq 3$. Hence $n$ is a divisor of $2^{3} \cdot 3=24$. Conversely, each $n \mid 24$ has the desired property.


15. N2 (FRA) For a positive integer $n$, let $d(n)$ be the number of all positive divisors of $n$. Find all positive integers $n$ such that $d(n)^{3}=4 n$.

Solution: 15. Let $n=p_{1}^{\alpha_{1}} p_{2}^{\alpha_{2}} \cdots p_{k}^{\alpha_{k}}$ be the factorization of $n$ onto primes $\left(p_{1}<p_{2}<\right.$ $\cdots<p_{k}$ ). Since $4 n$ is a perfect cube, we deduce that $p_{1}=2$ and $\alpha_{1}=$ $3 \beta_{1}+1, \alpha_{2}=3 \beta_{2}, \ldots, \alpha_{k}=3 \beta_{k}$ for some integers $\beta_{i} \geq 0$. Using $d(n)=$ $\left(\alpha_{1}+1\right) \cdot\left(\alpha_{2}+1\right) \cdots\left(\alpha_{k}+1\right)$ we can rewrite the equation $d(n)^{3}=4 n$ as  $$ \left(3 \beta_{1}+2\right) \cdot\left(3 \beta_{2}+1\right) \cdots\left(3 \beta_{k}+1\right)=2^{\beta_{1}+1} p_{2}^{\beta_{2}} \cdots p_{k}^{\beta_{k}} $$  Since $d(n)$ is not divisible by 3 , it follows that $p_{i} \geq 5$ for $i \geq 2$. Thus the above equation is equivalent to  $$ \frac{3 \beta_{1}+2}{2^{\beta_{1}+1}}=\frac{p_{2}^{\beta_{2}}}{3 \beta_{2}+1} \cdots \frac{p_{k}^{\beta_{k}}}{3 \beta_{k}+1} $$  For $i \geq 2$ we have $p_{i}^{\beta_{i}} \geq(1+4)^{\beta_{i}} \geq 1+4 \beta_{i}$; hence (1) implies that $\frac{3 \beta_{1}+2}{2^{\beta_{1}+1}} \geq 1$, which leads to $\beta_{1} \leq 2$. For $\beta_{1}=0$ or $\beta_{1}=2$ we have that $\frac{3 \beta_{1}+2}{2^{\beta_{1}+1}}=1$, and therefore $\beta_{2}=\cdots=$ $\beta_{k}=0$. This yields the solutions $n=2$ and $n=2^{7}=128$. For $\beta_{1}=1$ the left-hand side of (1) equals $\frac{5}{4}$. On the other hand, if $p_{i}>5$ or $\beta_{i}>1$, then $\frac{p_{i}^{\beta_{i}}}{3 \beta_{i}+1}>\frac{5}{4}$, which is impossible. We conclude that $p_{2}=5$ and $k=2$, so $n \stackrel{2000}{=}$. Hence the solutions for $n$ are 2, 128, and 2000.


16. N3 (RUS) ${ }^{\mathrm{IMO} 5}$ Does there exist a positive integer $n$ such that $n$ has exactly 2000 prime divisors and $2^{n}+1$ is divisible by $n$ ?

Solution: 16. More generally, we will prove by induction on $k$ that for each $k \in \mathbb{N}$ there exists $n_{k} \in \mathbb{N}$ that has exactly $k$ distinct prime divisors such that $n_{k} \mid 2^{n_{k}}+1$ and $3 \mid n_{k}$. For $k=1, n_{1}=3$ satisfies the given conditions. Now assume that $k \geq 1$ and $n_{k}=3^{\alpha} m$ where $3 \nmid m$, so that $m$ has exactly $k-1$ prime divisors. Then the number $3 n_{k}=3^{\alpha+1} m$ has exactly $k$ prime divisors and $2^{3 n_{k}}+1=$ $\left(2^{n_{k}}+1\right)\left(2^{2 n_{k}}-2^{n_{k}}+1\right)$ is divisible by $3 n_{k}$, since $3 \mid 2^{2 n_{k}}-2^{n_{k}}+1$. We shall find a prime $p$ not dividing $n_{k}$ such that $n_{k+1}=3 p n_{k}$. It is enough to find $p$ such that $p \mid 2^{3 n_{k}}+1$ and $p \nmid 2^{n_{k}}+1$. Moreover, we shall show that for every integer $a>2$ there exists a prime number $p$ that divides $a^{3}+1=(a+1)\left(a^{2}-a+1\right)$ but not $a+1$. To prove this we observe that $\operatorname{gcd}\left(a^{2}-a+1, a+1\right)=\operatorname{gcd}(3, a+1)$. Now if $3 \nmid a+1$, we can simply take $p=3$; otherwise, if $a=3 b-1$, then $a^{2}-a+1=9 b^{2}-9 b+3$ is not divisible by $3^{2}$; hence we can take for $p$ any prime divisor of $\frac{a^{2}-a+1}{3}$.


17. N4（BRA）Determine all triples of positive integers $(a, m, n)$ such that $a^{m}+1$ divides $(a+1)^{n}$.

Solution: 17. Trivially all triples $(a, 1, n)$ and $(1, m, n)$ are solutions. Assume now that $a>1$ and $m>1$. If $m$ is even, then $a^{m}+1 \equiv(-1)^{m}+1 \equiv 2(\bmod a+1)$, which implies that $a^{m}+1=2^{t}$. In particular, $a$ is odd. But this is impossible, since $2<a^{m}+1=\left(a^{m / 2}\right)^{2}+1 \equiv 2(\bmod 4)$. Hence $m$ is odd. Let $p$ be an arbitrary prime divisor of $m$ and $m=p m_{1}$. Then $a^{m}+1 \mid$ $(a+1)^{n} \mid\left(a^{m_{1}}+1\right)^{n}$, so $b^{p}+1 \mid(b+1)^{n}$ for $b=a^{m_{1}}$. It follows that  $$ \left.P=\frac{b^{p}+1}{b+1}=b^{p-1}-b^{p-2}+\cdots+1 \right\rvert\,(b+1)^{n} $$  Since $P \equiv p(\bmod b+1)$, we deduce that $P$ has no prime divisors other than $p$; hence $P$ is a power of $p$ and $p \mid b+1$. Let $b=k p-1, k \in \mathbb{N}$. Then by the binomial formula we have $b^{i}=(k p-1)^{i} \equiv(-1)^{i+1}(i k p-1)\left(\bmod p^{2}\right)$, and therefore $P \equiv-k p((p-1)+(p-2)+\cdots+1)+p \equiv p\left(\bmod p^{2}\right)$. We conclude that $P \leq p$. But we also have $P \geq b^{p-1}-b^{p-2} \geq b^{p-2}>p$ for $p>3$, so we must have $P=p=3$ and $b=2$. Since $b=a^{m_{1}}$, we obtain $a=2$ and $m=3$. The triple $(2,3, n)$ is indeed a solution if $n \geq 2$. Hence the set of solutions is $\{(a, 1, n),(1, m, n) \mid a, m, n \in \mathbb{N}\} \cup\{(2,3, n) \mid$ $n \geq 2\}$. Remark. This problem is very similar to (SL97-14).


18. N5 (BUL) Prove that there exist infinitely many positive integers $n$ such that $p=n r$, where $p$ and $r$ are respectively the semiperimeter and the inradius of a triangle with integer side lengths.

Solution: 18. It is known that the area of the triangle is $S=p r=p^{2} / n$ and $S=$ $\sqrt{p(p-a)(p-b)(p-c)}$. It follows that $p^{3}=n^{2}(p-a)(p-b)(p-c)$, which by putting $x=p-a, y=p-b$, and $z=p-c$ transforms into  $$ (x+y+z)^{3}=n^{2} x y z . $$  We will be done if we show that (1) has a solution in positive integers for infinitely many natural numbers $n$. Let us assume that $z=k(x+y)$ for an integer $k>0$. Then (1) becomes $(k+1)^{3}(x+y)^{2}=k n^{2} x y$. Further, by setting $n=3(k+1)$ this equation reduces to  $$ (k+1)(x+y)^{2}=9 k x y $$  Set $t=x / y$. Then (2) has solutions in positive integers if and only if $(k+$ 1) $(t+1)^{2}=9 k t$ has a rational solution, i.e., if and only if its discriminant $D=k(5 k-4)$ is a perfect square. Setting $k=u^{2}$, we are led to show that $5 u^{2}-4=v^{2}$ has infinitely many integer solutions. But this is a classic Pell-type equation, whose solution is every Fibonacci number $u=F_{2 i+1}$. This completes the proof.


19. N6 (ROM) Show that the set of positive integers that cannot be represented as a sum of distinct perfect squares is finite.

Solution: 19. Suppose that a natural number $N$ satisfies $N=a_{1}^{2}+\cdots+a_{k}^{2}, 2 N=$ $b_{1}^{2}+\cdots+b_{l}^{2}$, where $a_{i}, b_{j}$ are natural numbers such that none of the ratios $a_{i} / a_{j}, b_{i} / b_{j}, a_{i} / b_{j}, b_{j} / a_{i}$ is a power of 2. We claim that every natural number $n>\sum_{i=0}^{4 N-2}(2 i N+1)^{2}$ can be represented as a sum of distinct squares. Suppose $n=4 q N+r, 0 \leq r<4 N$. Then  $$ n=4 N s+\sum_{i=0}^{r-1}(2 i N+1)^{2} $$  for some positive integer $s$, so it is enough to show that $4 N s$ is a sum of distinct even squares. Let $s=\sum_{c=1}^{C} 2^{2 u_{c}}+\sum_{d=1}^{D} 2^{2 v_{d}+1}$ be the binary expansion of $s$. Then  $$ 4 N s=\sum_{c=1}^{C} \sum_{i=1}^{k}\left(2^{u_{c}+1} a_{i}\right)^{2}+\sum_{d=1}^{D} \sum_{j=1}^{l}\left(2^{u_{d}+1} b_{j}\right)^{2} $$  where all the summands are distinct by the condition on $a_{i}, b_{j}$.  It remains to choose an appropriate $N$ : for example $N=29$, because $29=5^{2}+2^{2}$ and $58=7^{2}+3^{2}$. Second solution. It can be directly checked that every odd integer $67<$ $n \leq 211$ can be represented as a sum of distinct squares. For any $n>211$ we can choose an integer $m$ such that $m^{2}>\frac{n}{2}$ and $n-m^{2}$ is odd and greater than 67 , and therefore by the induction hypothesis can be written as a sum of distinct squares. Hence $n$ is also a sum of distinct squares.


2. C2 (ITA) A brick staircase with three steps of width 2 is made of twelve unit cubes. Determine all integers $n$ for which it is possible to build a cube of side $n$ using such bricks. ![](https://cdn.mathpix.com/cropped/2024_11_18_8e985d6b9c83aa3e9d0eg-317.jpg?height=175&width=141&top_left_y=739&top_left_x=725)

Solution: 2. Since the volume of each brick is 12 , the side of any such cube must be divisible by 6 . Suppose that a cube of side $n=6 k$ can be built using $\frac{n^{3}}{12}=18 k^{3}$ bricks. Set a coordinate system in which the cube is given as $[0, n] \times[0, n] \times[0, n]$ and color in black each unit cube $[2 p, 2 p+1] \times[2 q, 2 q+1] \times[2 r, 2 r+1]$. There are exactly $\frac{n^{3}}{9}=27 k^{3}$ black cubes. Each brick covers either one or three black cubes, which is in any case an odd number. It follows that the total number of black cubes must be even, which implies that $k$ is even. Hence $12 \mid n$. On the other hand, two bricks can be fitted together to give a $2 \times 3 \times 4$ box. Using such boxes one can easily build a cube of side 12 , and consequently any cube of side divisible by 12 .


20. G1 (NET) In the plane we are given two circles intersecting at $X$ and $Y$. Prove that there exist four points $A, B, C, D$ with the following property: For every circle touching the two given circles at $A$ and $B$, and meeting the line $X Y$ at $C$ and $D$, each of the lines $A C, A D, B C, B D$ passes through one of these points.

Solution: 20. Denote by $k_{1}, k_{2}$ the given circles and by $k_{3}$ the circle through $A, B, C, D$. We shall consider the case that $k_{3}$ is inside $k_{1}$ and $k_{2}$, since the other case is analogous. Let $A C$ and $A D$ meet $k_{1}$ at points $P$ and $R$, and $B C$ and $B D$ meet $k_{2}$ at $Q$ and $S$ respectively. We claim that $P Q$ and $R S$ are the common tangents to $k_{1}$ and $k_{2}$, and therefore $P, Q, R, S$ are the desired points. The circles $k_{1}$ and $k_{3}$ are tangent to each other, so we have $D C \| R P$. Since ![](https://cdn.mathpix.com/cropped/2024_11_18_8e985d6b9c83aa3e9d0eg-680.jpg?height=374&width=468&top_left_y=669&top_left_x=848)  $$ A C \cdot C P=X C \cdot C Y=B C \cdot C Q $$  the quadrilateral $A B Q P$ is cyclic, implying that $\angle A P Q=\angle A B Q=$ $\angle A D C=\angle A R P$. It follows that $P Q$ is tangent to $k_{1}$. Similarly, $P Q$ is tangent to $k_{2}$.


21. G2 (RUS) ${ }^{\mathrm{IMO} 1}$ Two circles $G_{1}$ and $G_{2}$ intersect at $M$ and $N$. Let $A B$ be the line tangent to these circles at $A$ and $B$, respectively, such that $M$ lies closer to $A B$ than $N$. Let $C D$ be the line parallel to $A B$ and passing through $M$, with $C$ on $G_{1}$ and $D$ on $G_{2}$. Lines $A C$ and $B D$ meet at $E$; lines $A N$ and $C D$ meet at $P$; lines $B N$ and $C D$ meet at $Q$. Show that $E P=E Q$.

Solution: 21. Let $K$ be the intersection point of the lines $M N$ and $A B$. Since $K A^{2}=K M \cdot K N=K B^{2}$, it follows that $K$ is the midpoint of the segment $A B$, and consequently $M$ is the midpoint of $A B$. Thus it will be enough to show that $E M \perp$ $P Q$, or equivalently that $E M \perp$ $A B$. However, since $A B$ is tangent to the circle $G_{1}$ we have $\angle B A M=$ ![](https://cdn.mathpix.com/cropped/2024_11_18_8e985d6b9c83aa3e9d0eg-680.jpg?height=356&width=509&top_left_y=1295&top_left_x=812) $\angle A C M=\angle E A B$, and similarly $\angle A B M=\angle E B A$. This implies that the triangles $E A B$ and $M A B$ are congruent. Hence $E$ and $M$ are symmetric with respect to $A B$; hence $E M \perp A B$. Remark. The proposer has suggested an alternative version of the problem: to prove that $E N$ bisects the angle $C N D$. This can be proved by noting that $E A N B$ is cyclic.


22. G3 (IND) Let $O$ be the circumcenter and $H$ the orthocenter of an acute triangle $A B C$. Show that there exist points $D, E$, and $F$ on sides $B C$, $C A$, and $A B$ respectively such that $O D+D H=O E+E H=O F+F H$ and the lines $A D, B E$, and $C F$ are concurrent.

Solution: 22. Let $L$ be the point symmetric to $H$ with respect to $B C$. It is well known that $L$ lies on the circumcircle $k$ of $\triangle A B C$. Let $D$ be the intersection point of $O L$ and $B C$. We similarly define $E$ and $F$. Then  $$ O D+D H=O D+D L=O L=O E+E H=O F+F H $$  We shall prove that $A D, B E$, and $C F$ are concurrent. Let line $A O$ meet $B C$ at $D^{\prime}$. It is easy to see that $\angle O D^{\prime} D=\angle O D D^{\prime}$; hence the perpendicular bisector of $B C$ bisects $D D^{\prime}$ as well. Hence $B D=C D^{\prime}$. If we define $E^{\prime}$ and $F^{\prime}$ analogously, we have $C E=A E^{\prime}$ and $A F=B F^{\prime}$. Since the lines $A D^{\prime}, B E^{\prime}, C F^{\prime}$ meet at $O$, it follows that $\frac{B D}{D C} \cdot \frac{C E}{E A} \cdot \frac{A F}{F B}=$ ![](https://cdn.mathpix.com/cropped/2024_11_18_8e985d6b9c83aa3e9d0eg-681.jpg?height=399&width=430&top_left_y=252&top_left_x=867) $\frac{B D^{\prime}}{D^{\prime} C} \cdot \frac{C E^{\prime}}{E^{\prime} A} \cdot \frac{A F^{\prime}}{F^{\prime} B}=1$. This proves our claim by Ceva's theorem.


23. G4 (RUS) Let $A_{1} A_{2} \ldots A_{n}$ be a convex polygon, $n \geq 4$. Prove that $A_{1} A_{2} \ldots A_{n}$ is cyclic if and only if to each vertex $A_{j}$ one can assign a pair $\left(b_{j}, c_{j}\right)$ of real numbers, $j=1,2, \ldots n$, such that  $$ A_{i} A_{j}=b_{j} c_{i}-b_{i} c_{j} \quad \text { for all } i, j \text { with } 1 \leq i \leq j \leq n $$

Solution: 23. First, suppose that there are numbers $\left(b_{i}, c_{i}\right)$ assigned to the vertices of the polygon such that  $$ A_{i} A_{j}=b_{j} c_{i}-b_{i} c_{j} \quad \text { for all } i, j \text { with } 1 \leq i \leq j \leq n $$  In order to show that the polygon is cyclic, it is enough to prove that $A_{1}, A_{2}, A_{3}, A_{i}$ lie on a circle for each $i, 4 \leq i \leq n$, or equivalently, by Ptolemy's theorem, that $A_{1} A_{2} \cdot A_{3} A_{i}+A_{2} A_{3} \cdot A_{i} A_{1}=A_{1} A_{3} \cdot A_{2} A_{i}$. But this is straightforward with regard to (1). Now suppose that $A_{1} A_{2} \ldots A_{n}$ is a cyclic quadrilateral. By Ptolemy's theorem we have $A_{i} A_{j}=A_{2} A_{j} \cdot \frac{A_{1} A_{i}}{A_{1} A_{2}}-A_{2} A_{i} \cdot \frac{A_{1} A_{j}}{A_{1} A_{2}}$ for all $i, j$. This suggests taking $b_{1}=-A_{1} A_{2}, b_{i}=A_{2} A_{i}$ for $i \geq 2$ and $c_{i}=\frac{A_{1} A_{i}}{A_{1} A_{2}}$ for all $i$. Indeed, using Ptolemy's theorem, one easily verifies (1).


24. G5 (GBR) The tangents at $B$ and $A$ to the circumcircle of an acuteangled triangle $A B C$ meet the tangent at $C$ at $T$ and $U$ respectively. $A T$ meets $B C$ at $P$, and $Q$ is the midpoint of $A P ; B U$ meets $C A$ at $R$, and $S$ is the midpoint of $B R$. Prove that $\angle A B Q=\angle B A S$. Determine, in terms of ratios of side lengths, the triangles for which this angle is a maximum.

Solution: 24. Since $\angle A B T=180^{\circ}-\gamma$ and $\angle A C T=180^{\circ}-\beta$, the law of sines gives $\frac{B P}{P C}=\frac{S_{A B T}}{S_{A C T}}=\frac{A B \cdot B T \cdot \sin \gamma}{A B \cdot B T \cdot \sin \beta}=\frac{A B \sin \gamma}{A C \sin \beta}=\frac{c^{2}}{b^{2}}$, which implies $B P=\frac{c^{2} a}{b^{2}+c^{2}}$. Denote by $M$ and $N$ the feet of perpendiculars from $P$ and $Q$ on $A B$. We have $\cot \angle A B Q=\frac{B N}{N Q}=\frac{2 B N}{P M}=\frac{B A+B M}{B P \sin \beta}=\frac{c+B P \cos \beta}{B P \sin \beta}=\frac{b^{2}+c^{2}+a c \cos \beta}{c a \sin \beta}=$ $\frac{2\left(b^{2}+c^{2}\right)+a^{2}+c^{2}-b^{2}}{2 c a \sin \beta}=\frac{a^{2}+b^{2}+3 c^{2}}{4 S_{A B C}}=2 \cot \alpha+2 \cot \beta+\cot \gamma$. Similarly, $\cot \angle B A S=2 \cot \alpha+2 \cot \beta+\cot \gamma$; hence $\angle A B Q=\angle B A S$. Now put $p=\cot \alpha$ and $q=\cot \beta$. Since $p+q \geq 0$, the A-G mean inequality gives us $\cot \angle A B Q=2 p+2 q+\frac{1-p q}{p+q} \geq 2 p+2 q+\frac{1-(p+q)^{2} / 4}{p+q}=\frac{7}{4}(p+q)+$ $\frac{1}{p+q} \geq 2 \sqrt{\frac{7}{4}}=\sqrt{7}$. Hence $\angle A B Q \leq \arctan \frac{1}{\sqrt{7}}$. Equality holds if and only if $\cot \alpha=\cot \beta=\frac{1}{\sqrt{7}}$, i.e., when $a: b: c=1: 1: \frac{1}{\sqrt{2}}$.


25. G6 (ARG) Let $A B C D$ be a convex quadrilateral with $A B$ not parallel to $C D$, let $X$ be a point inside $A B C D$ such that $\measuredangle A D X=\measuredangle B C X<90^{\circ}$ and $\measuredangle D A X=\measuredangle C B X<90^{\circ}$. If $Y$ is the point of intersection of the perpendicular bisectors of $A B$ and $C D$, prove that $\measuredangle A Y B=2 \measuredangle A D X$.

Solution: 25. By the condition of the problem, $\triangle A D X$ and $\triangle B C X$ are similar. Then there exist points $Y^{\prime}$ and $Z^{\prime}$ on the perpendicular bisector of $A B$ such that $\triangle A Y^{\prime} Z^{\prime}$ is similar and oriented the same as $\triangle A D X$, and $\triangle B Y^{\prime} Z^{\prime}$ is (being congruent to $\triangle A Y^{\prime} Z^{\prime}$ ) similar and oriented the same as $\triangle B C X$. Since then $A D / A Y^{\prime}=A X / A Z^{\prime}$ and $\angle D A Y^{\prime}=\angle X A Z^{\prime}, \triangle A D Y^{\prime}$ and $\triangle A X Z^{\prime}$ are also similar, implying $\frac{A D}{A X}=\frac{D Y^{\prime}}{X Z^{\prime}}$. Analogously, $\frac{B C}{B X}=\frac{C Y^{\prime}}{X Z^{\prime}}$. It follows from $\frac{A D}{A X}=\frac{B C}{B X}$ that $C Y^{\prime}=D Y^{\prime}$, which means that $Y^{\prime}$ lies on the perpendicular bisector of $C D$. Hence $Y^{\prime} \equiv Y$.  Now $\angle A Y B=2 \angle A Y Z^{\prime}=2 \angle A D X$, as desired.


26. G7 (IRN) Ten gangsters are standing on a flat surface, and the distances between them are all distinct. At twelve o'clock, when the church bells start chiming, each of them fatally shoots the one among the other nine gangsters who is the nearest. At least how many gangsters will be killed?

Solution: 26. The problem can be reformulated in the following way: Given a set $S$ of ten points in the plane such that the distances between them are all distinct, for each point $P \in S$ we mark the point $Q \in S \backslash\{P\}$ nearest to $P$. Find the least possible number of marked points. Observe that each point $A \in S$ is the nearest to at most five other points. Indeed, for any six points $P_{1}, \ldots, P_{6}$ one of the angles $P_{i} A P_{j}$ is at most $60^{\circ}$, in which case $P_{i} P_{j}$ is smaller than one of the distances $A P_{i}, A P_{j}$. It follows that at least two points are marked. Now suppose that exactly two points, say $A$ and $B$, are marked. Then $A B$ is the minimal distance of the points from $S$, so by the previous observation the rest of the set $S$ splits into two subsets of four points according to whether the nearest point is $A$ or $B$. Let these subsets be $\left\{A_{1}, A_{2}, A_{3}, A_{4}\right\}$ and $\left\{B_{1}, B_{2}, B_{3}, B_{4}\right\}$ respectively. Assume that the points are labelled so that the angles $A_{i} A A_{i+1}$ are successively adjacent as well as the angles $B_{i} B B_{i+1}$, and that $A_{1}, B_{1}$ lie on one side of $A B$, and $A_{4}, B_{4}$ lie on the other side. Since all the angles $A_{i} A A_{i+1}$ and $B_{i} B B_{i+1}$ are greater than $60^{\circ}$, it follows that  $$ \angle A_{1} A B+\angle B A A_{4}+\angle B_{1} B A+\angle A B B_{4}<360^{\circ} . $$  Therefore $\angle A_{1} A B+\angle B_{1} B A<180^{\circ}$ or $\angle A_{4} A B+\angle B_{4} B A<180^{\circ}$. Without loss of generality, let us assume the first inequality. On the other hand, note that the quadrilateral $A B B_{1} A_{1}$ is convex because $A_{1}$ and $B_{1}$ are on different sides of the perpendicular bisector of $A B$. From $A_{1} B_{1}>A_{1} A$ and $B B_{1}>A B$ we obtain $\angle A_{1} A B_{1}>\angle A_{1} B_{1} A$ and $\angle B A B_{1}>\angle A B_{1} B$. Adding these relations yields $\angle A_{1} A B>\angle A_{1} B_{1} B$. Similarly, $\angle B_{1} B A>\angle B_{1} A_{1} A$. Adding these two inequalities, we get  $$ 180^{\circ}>\angle A_{1} A B+\angle B_{1} B A>\angle A_{1} B_{1} B+\angle B_{1} A_{1} A $$  hence the sum of the angles of the quadrilateral $A B B_{1} A_{1}$ is less than $360^{\circ}$, which is a contradiction. Thus at least 3 points are marked. An example of a configuration in which exactly 3 gangsters are killed is shown below. ![](https://cdn.mathpix.com/cropped/2024_11_18_8e985d6b9c83aa3e9d0eg-682.jpg?height=250&width=441&top_left_y=1700&top_left_x=579)


27. G8 (RUS) ${ }^{\mathrm{IMO}} A_{1} A_{2} A_{3}$ is an acute-angled triangle. The foot of the altitude from $A_{i}$ is $K_{i}$, and the incircle touches the side opposite $A_{i}$ at $L_{i}$. The line $K_{1} K_{2}$ is reflected in the line $L_{1} L_{2}$. Similarly, the line $K_{2} K_{3}$ is reflected in $L_{2} L_{3}$, and $K_{3} K_{1}$ is reflected in $L_{3} L_{1}$. Show that the three new lines form a triangle with vertices on the incircle.

Solution: 27. Denote by $\alpha_{1}, \alpha_{2}, \alpha_{3}$ the angles of $\triangle A_{1} A_{2} A_{3}$ at vertices $A_{1}, A_{2}, A_{3}$ respectively. Let $T_{1}, T_{2}, T_{3}$ be the points symmetric to $L_{1}, L_{2}, L_{3}$ with respect to $A_{1} I, A_{2} I$, and $A_{3} I$ respectively. We claim that $T_{1} T_{2} T_{3}$ is the desired triangle.  Denote by $S_{1}$ and $R_{1}$ the points symmetric to $K_{1}$ and $K_{3}$ with respect to $L_{1} L_{3}$. It is enough to show that $T_{1}$ and $T_{3}$ lie on the line $R_{1} S_{1}$. To prove this, we shall prove that $\angle K_{1} S_{1} T_{1}=\angle K^{\prime} K_{1} S_{1}$ for a point $K^{\prime}$ on the line $K_{1} K_{3}$ such that $K_{3}$ and $K^{\prime}$ lie on different sides of $K_{1}$. We show first that $S_{1} \in A_{1} I$. Let $X$ be the point of intersection of lines $A_{1} I$ and $L_{1} L_{3}$. We see from the triangle $A_{1} L_{3} X$ that $\angle L_{1} X I=$ $\alpha_{3} / 2=\angle L_{1} A_{3} I$, which implies that ![](https://cdn.mathpix.com/cropped/2024_11_18_8e985d6b9c83aa3e9d0eg-683.jpg?height=489&width=559&top_left_y=289&top_left_x=805) $L_{1} X A_{3} I$ is cyclic. We now have $\angle A_{1} X A_{3}=90^{\circ}=\angle A_{1} K_{1} A_{3}$; hence $A_{1} K_{1} X A_{3}$ is also cyclic. It follows that $\angle K_{1} X I=\angle K_{1} A_{3} A_{1}=\alpha_{3}=2 \angle L_{1} X I$; hence $X_{1} L_{1}$ bisects the angle $K_{1} X_{1} I$. Hence $S_{1} \in X I$ as claimed. Now we have $\angle K_{1} S_{1} T_{1}=\angle K_{1} S_{1} L_{1}+2 \angle L_{1} S_{1} X=\angle S_{1} K_{1} L_{1}+2 \angle L_{1} K_{1} X$. It remains to prove that $K_{1} X$ bisects $\angle A_{3} K_{1} K^{\prime}$. From the cyclic quadrilateral $A_{1} K_{1} X A_{3}$ we see that $\angle X K_{1} A_{3}=\alpha_{1} / 2$. Since $A_{1} K_{3} K_{1} A_{3}$ is cyclic, we also have $\angle K^{\prime} K_{1} A_{3}=\alpha_{1}=2 \angle X K_{1} A_{3}$, which proves the claim.


3. C3 (COL) Let $n \geq 4$ be a fixed positive integer. Given a set $S=$ $\left\{P_{1}, P_{2}, \ldots, P_{n}\right\}$ of points in the plane such that no three are collinear and no four concyclic, let $a_{t}, 1 \leq t \leq n$, be the number of circles $P_{i} P_{j} P_{k}$ that contain $P_{t}$ in their interior, and let  $$ m(S)=a_{1}+a_{2}+\cdots+a_{n} $$  Prove that there exists a positive integer $f(n)$, depending only on $n$, such that the points of $S$ are the vertices of a convex polygon if and only if $m(S)=f(n)$.

Solution: 3. Clearly $m(S)$ is the number of pairs of point and triangle $\left(P_{t}, P_{i} P_{j} P_{k}\right)$ such that $P_{t}$ lies inside the circle $P_{i} P_{j} P_{k}$. Consider any four-element set $S_{i j k l}=\left\{P_{i}, P_{j}, P_{k}, P_{l}\right\}$. If the convex hull of $S_{i j k l}$ is the triangle $P_{i} P_{j} P_{k}$, then we have $a_{i}=a_{j}=a_{k}=0, a_{l}=1$. Suppose that the convex hull is the quadrilateral $P_{i} P_{j} P_{k} P_{l}$. Since this quadrilateral is not cyclic, we may suppose that $\angle P_{i}+\angle P_{k}<180^{\circ}<\angle P_{j}+\angle P_{l}$. In this case $a_{i}=a_{k}=0$ and $a_{j}=a_{l}=1$. Therefore $m\left(S_{i j k l}\right)$ is 2 if $P_{i}, P_{j}, P_{k}, P_{l}$ are vertices of a convex quadrilateral, and 1 otherwise. There are $\binom{n}{4}$ four-element subsets $S_{i j k l}$. If $a(S)$ is the number of such subsets whose points determine a convex quadrilateral, we have $m(S)=$ $2 a(S)+\left(\binom{n}{4}-a(S)\right)=\binom{n}{4}+a(S) \leq 2\binom{n}{4}$. Equality holds if and only if every four distinct points of $S$ determine a convex quadrilateral, i.e. if and only if the points of $S$ determine a convex polygon. Hence $f(n)=2\binom{n}{4}$ has the desired property.


4. C4 (CZE) Let $n$ and $k$ be positive integers such that $n / 2<k \leq 2 n / 3$. Find the least number $m$ for which it is possible to place $m$ pawns on $m$ squares of an $n \times n$ chessboard so that no column or row contains a block of $k$ adjacent unoccupied squares.

Solution: 4. By a good placement of pawns we mean the placement in which there is no block of $k$ adjacent unoccupied squares in a row or column. We can make a good placement as follows: Label the rows and columns with $0,1, \ldots, n-1$ and place a pawn on a square $(i, j)$ if and only if $k$ divides $i+j+1$. This is obviously a good placement in which the pawns are placed on three lines with $k, 2 n-2 k$, and $2 n-3 k$ squares, which adds up to $4 n-4 k$ pawns in total. Now we shall prove that a good placement must contain at least $4 n-4 k$ pawns. Suppose we have a good placement of $m$ pawns. Partition the board into nine rectangular regions as shown in the picture. Let $a, b, \ldots, h$ be the numbers of pawns in the rectangles $A, B, \ldots, H$ respectively. Note that each row that ![](https://cdn.mathpix.com/cropped/2024_11_18_8e985d6b9c83aa3e9d0eg-671.jpg?height=394&width=450&top_left_y=962&top_left_x=850) passes through $A, B$, and $C$ either contains a pawn inside $B$, or contains a pawn in both $A$ and $C$. It follows that $a+c+2 b \geq 2(n-k)$. We similarly obtain that $c+e+2 d, e+g+2 f$, and $g+a+2 h$ are all at least $2(n-k)$. Adding and dividing by 2 yields $a+b+\cdots+h \geq 4(n-k)$, which proves the statement.


5. C5 (RUS) In the plane we have $n$ rectangles with parallel sides. The sides of distinct rectangles lie on distinct lines. The boundaries of the rectangles cut the plane into connected regions. A region is nice if it has at least one of the vertices of the $n$ rectangles on its boundary. Prove that the sum of the numbers of the vertices of all nice regions is less than $40 n$. (There can be nonconvex regions as well as regions with more than one boundary curve.)

Solution: 5. We say that a vertex of a nice region is convex if the angle of the region at that vertex equals $90^{\circ}$; otherwise (if the angle is $270^{\circ}$ ), we say that a vertex is concave. For a simple broken line $C$ contained in the boundary of a nice region $R$ we call the pair $(R, C)$ a boundary pair. Such a pair is called outer if the region $R$ is inside the broken line $C$, and inner otherwise. Let $\mathcal{B}_{i}, \mathcal{B}_{o}$ be the sets of inner and outer boundary pairs of nice regions respectively, and let $\mathcal{B}=\mathcal{B}_{i} \cup \mathcal{B}_{o}$. For a boundary pair $b=(R, C)$ denote by $c_{b}$ and $v_{b}$ respectively the number of convex and concave vertices of $R$ that belong to $C$. We have the following facts: (1) Each vertex of a rectangle corresponds to one concave angle of a nice region and vice versa. This correspondence is bijective, so $\sum_{b \in \mathcal{B}} v_{b}=$ $4 n$. (2) For a boundary pair $b=(R, C)$ the sum of angles of $R$ that are on $C$ equals $\left(c_{b}+v_{b}-2\right) 180^{\circ}$ if $b$ is outer, and $\left(c_{b}+v_{b}+2\right) 180^{\circ}$ if $b$ is inner. On the other hand the sum of angles is obviously equal to $c_{b} \cdot 90^{\circ}+v_{b} \cdot 270^{\circ}$. It immediately follows that $c_{b}-v_{b}=\left\{\begin{array}{r}4 \text { if } b \in \mathcal{B}_{o}, \\ -4 \text { if } b \in \mathcal{B}_{i} .\end{array}\right.$ (3) Since every vertex of a rectangle appears in exactly two boundary pairs and each boundary pair contains at least one vertex of a rectangle, the number $K$ of boundary pairs is less than or equal to $8 n$. (4) The set $\mathcal{B}_{i}$ is nonempty, because every boundary of the infinite region is inner. Consequently, the sum of the numbers of the vertices of all nice regions is equal to  $$ \sum_{b \in \mathcal{B}}\left(c_{b}+v_{b}\right)=\sum_{b \in \mathcal{B}}\left(2 v_{b}+\left(c_{b}-v_{b}\right)\right) \leq 2 \cdot 4 n+4(K-1)-4 \leq 40 n-8 $$


6. C6 (FRA) Let $p$ and $q$ be relatively prime positive integers. A subset $S$ of $\{0,1,2, \ldots\}$ is called ideal if $0 \in S$ and for each element $n \in S$, the integers $n+p$ and $n+q$ belong to $S$. Determine the number of ideal subsets of $\{0,1,2 \ldots\}$.

Solution: 6. Every integer $z$ has a unique representation $z=p x+q y$, where $x, y \in \mathbb{Z}$, $0 \leq x \leq q-1$. Consider the region $T$ in the $x y$-plane defined by the last inequality and $p x+q y \geq 0$. There is a bijective correspondence between lattice points of this region and nonnegative integers given by $(x, y) \mapsto$ $z=p x+q y$. Let us mark all lattice points of $T$ whose corresponding integers belong to $S$ and color in black the unit squares whose left-bottom vertices are at marked points. Due to the condition for $S$, this coloring has the property that all points lying on the right or above a colored point are colored as well. In particular, since the point $(0,0)$ is colored, all points above or on the line $y=0$ are colored. What we need is the number of such colorings of $T$. The border of the colored subregion $C$ of $T$ determines a path from $(0,0)$ to $(q,-p)$ consisting of consecutive unit moves either to the right or downwards. There are $\binom{p+q}{p}$ such paths in total. We must find the number of such paths not going below the line $l: p x+q y=0$. Consider any path $\gamma=A_{0} A_{1} \ldots A_{p+q}$ from $A_{0}=(0,0)$ to $A_{p+q}=(q,-p)$. We shall see the path $\gamma$ as a sequence $G_{1} G_{2} \ldots G_{p+q}$ of moves to the right $(R)$ or downwards ( $D$ ) with exactly $p D$ 's and $q R$ 's. Two paths are said to be equivalent if one is obtained from the other by a circular shift of the corresponding sequence $G_{1} G_{2} \ldots G_{p+q}$. We note that all the $p+q$ circular shifts of a path are distinct. Indeed, $G_{1} \ldots G_{p+q} \equiv$ $G_{i+1} \ldots G_{i+p+q}$ would imply $G_{1}=G_{i+1}=G_{2 i+1}=\cdots$ (where $G_{j+p+q}=$ $G_{j}$ ), so $G_{1}=\cdots=G_{p+q}$, which is impossible. Hence each equivalence class contains exactly $p+q$ paths. Let $l_{i}, 0 \leq i<p+q$, be the line through $A_{i}$ that is parallel to the line $l$. Since $\operatorname{gcd}(p, q)=1$, all these lines are distinct. Let $l_{m}$ be the unique lowest line among the $l_{i}$ 's. Then the path $G_{m+1} G_{m+2} \ldots G_{m+p+q}$ is above the line $l$. Every other cyclic shift gives rise to a path having at least one vertex below the line $l$. Thus each equiv- alence class contains exactly one path above the line $l$, so the number of such paths is equal to $\frac{1}{p+q}\binom{p+q}{p}$. Therefore the answer is $\frac{1}{p+q}\binom{p+q}{p}$.


7. A1 (USA) ${ }^{\mathrm{IMO} 2}$ Let $a, b, c$ be positive real numbers with product 1. Prove that  $$ \left(a-1+\frac{1}{b}\right)\left(b-1+\frac{1}{c}\right)\left(c-1+\frac{1}{a}\right) \leq 1 . $$

Solution: 7. Elementary computation gives $\left(a-1+\frac{1}{b}\right)\left(b-1+\frac{1}{c}\right)=a b-a+\frac{a}{c}-b+$ $1-\frac{1}{c}+1-\frac{1}{b}+\frac{1}{b c}$. Using $a b=\frac{1}{c}$ and $\frac{1}{b c}=a$ we obtain  $$ \left(a-1+\frac{1}{b}\right)\left(b-1+\frac{1}{c}\right)=\frac{a}{c}-b-\frac{1}{b}+2 \leq \frac{a}{c} $$  since $b+\frac{1}{b} \geq 2$. Similarly we obtain  $$ \left(b-1+\frac{1}{c}\right)\left(c-1+\frac{1}{a}\right) \leq \frac{b}{a} \text { and }\left(c-1+\frac{1}{a}\right)\left(a-1+\frac{1}{b}\right) \leq \frac{c}{b} . $$  The desired inequality follows from the previous three inequalities. Equality holds if and only if $a=b=c=1$.


8. A2 (GBR) Let $a, b, c$ be positive integers satisfying the conditions $b>2 a$ and $c>2 b$. Show that there exists a real number $t$ with the property that all the three numbers $t a, t b, t c$ have their fractional parts lying in the interval (1/3,2/3].

Solution: 8. We note that $\{t a\}$ lies in $\left(\frac{1}{3}, \frac{2}{3}\right]$ if and only if there is an integer $k$ such that $k+\frac{1}{3}<t a \leq k+\frac{2}{3}$, i.e., if and only if $t \in I_{k}=\left(\frac{k+1 / 3}{a}, \frac{k+2 / 3}{a}\right]$ for some $k$. Similarly, $t$ should belong to the sets $J_{m}=\left(\frac{m+1 / 3}{b}, \frac{m+2 / 3}{b}\right]$ and $K_{n}=\left(\frac{n+1 / 3}{c}, \frac{n+2 / 3}{c}\right]$ for some $m, n$. We have to show that $I_{k} \cap J_{m} \cap K_{n}$ is nonempty for some integers $k, m, n$. The intervals $K_{n}$ are separated by a distance $\frac{2}{3 c}$, and since $\frac{2}{3 c}<\frac{1}{3 b}$, each of the intervals $J_{m}$ intersects at least one of the $K_{n}$ 's. Hence it is enough to prove that $J_{m} \subset I_{k}$ for some $k, m$. Let $u_{m}$ and $v_{m}$ be the left and right endpoints of $J_{m}$. Since $a v_{m}=a u_{m}+$ $\frac{a}{3 b}<a u_{m}+\frac{1}{6}$, it will suffice to show that there is an integer $m$ such that the fractional part of $a u_{m}$ lies in $\left[\frac{1}{3}, \frac{1}{2}\right]$. Let $a=d \alpha, b=d \beta, \operatorname{gcd}(\alpha, \beta)=1$. Setting $m=d \mu$ we obtain that $a u_{m}=a \frac{m+1 / 3}{b}=\frac{\alpha m}{d \beta}+\frac{\alpha}{3 \beta}=\frac{\alpha \mu}{\beta}+\frac{\alpha}{3 \beta}$. Since $\alpha \mu$ gives all possible residues modulo $\beta$, every term of the arithmetic progression $\frac{j}{\beta}+\frac{\alpha}{3 \beta}(j \in \mathbb{Z})$ has its fractional part equal to the fractional part of some $a u_{m}$. Now for $\beta \geq 6$ the progression step is $\frac{1}{\beta} \leq \frac{1}{6}$, so at least one of the $a u_{m}$ has its fractional part in $[1 / 3,1 / 2]$. If otherwise $\beta \leq 5$, the only irreducible fractions $\frac{\alpha}{\beta}$ that satisfy $2 \alpha<\beta$ are $\frac{1}{3}, \frac{1}{4}, \frac{1}{5}, \frac{2}{5}$; hence one can take $m$ to be $1,1,2,3$ respectively. This justifies our claim.


9. A3 (BLR) Find all pairs of functions $f: \mathbb{R} \rightarrow \mathbb{R}, g: \mathbb{R} \rightarrow \mathbb{R}$ such that  $$ f(x+g(y))=x f(y)-y f(x)+g(x) \quad \text { for all } x, y \in R $$

Solution: 9. Let us first solve the problem under the assumption that $g(\alpha)=0$ for some $\alpha$. Setting $y=\alpha$ in the given equation yields $g(x)=(\alpha+1) f(x)-x f(\alpha)$. Then the given equation becomes $f(x+g(y))=(\alpha+1-y) f(x)+(f(y)-f(\alpha)) x$, so setting $y=\alpha+1$ we get $f(x+n)=m x$, where $n=g(\alpha+1)$ and $m=f(\alpha+1)-f(\alpha)$. Hence $f$ is a linear function, and consequently $g$ is also linear. If we now substitute $f(x)=a x+b$ and $g(x)=c x+d$ in the given equation and compare the coefficients, we easily find that  $$ f(x)=\frac{c x-c^{2}}{1+c} \quad \text { and } \quad g(x)=c x-c^{2}, \quad c \in \mathbb{R} \backslash\{-1\} $$  Now we prove the existence of $\alpha$ such that $g(\alpha)=0$. If $f(0)=0$ then putting $y=0$ in the given equation we obtain $f(x+g(0))=g(x)$, so we can take $\alpha=-g(0)$. Now assume that $f(0)=b \neq 0$. By replacing $x$ by $g(x)$ in the given equation we obtain $f(g(x)+g(y))=g(x) f(y)-y f(g(x))+g(g(x))$ and, analogously, $f(g(x)+g(y))=g(y) f(x)-x f(g(y))+g(g(y))$. The given functional equation for $x=0$ gives $f(g(y))=a-b y$, where $a=g(0)$. In particular, $g$ is injective and $f$ is surjective, so there exists $c \in \mathbb{R}$ such that $f(c)=0$. Now the above two relations yield  $$ g(x) f(y)-a y+g(g(x))=g(y) f(x)-a x+g(g(y)) $$  Plugging $y=c$ in (1) we get $g(g(x))=g(c) f(x)-a x+g(g(c))+a c=$ $k f(x)-a x+d$. Now (1) becomes $g(x) f(y)+k f(x)=g(y) f(x)+k f(y)$. For $y=0$ we have $g(x) b+k f(x)=a f(x)+k b$, whence  $$ g(x)=\frac{a-k}{b} f(x)+k . $$  Note that $g(0)=a \neq k=g(c)$, since $g$ is injective. From the surjectivity of $f$ it follows that $g$ is surjective as well, so it takes the value 0 .


1. A1 (IND) Let $T$ denote the set of all ordered triples $(p, q, r)$ of nonnegative integers. Find all functions $f: T \rightarrow \mathbb{R}$ such that  $$ f(p, q, r)=\left\{\begin{array}{rrr} 0 & & \text { if } p q r=0 \\ 1+\frac{1}{6} & (f(p+1, q-1, r)+f(p-1, q+1, r) & \\ & +f(p-1, q, r+1)+f(p+1, q, r-1) & \\ & +f(p, q+1, r-1)+f(p, q-1, r+1)) & \\ & \text { otherwise. } \end{array}\right. $$

Solution: 1. First, let us show that such a function is at most unique. Suppose that $f_{1}$ and $f_{2}$ are two such functions, and consider $g=f_{1}-f_{2}$. Then $g$ is zero on the boundary and satisfies  $$ g(p, q, r)=\frac{1}{6}[g(p+1, q-1, r)+\cdots+g(p, q-1, r+1)] $$  i.e., $g(p, q, r)$ is equal to the average of the values of $g$ at six points $(p+$ $1, q-1, r), \ldots$ that lie in the plane $\pi$ given by $x+y+z=p+q+r$. Suppose that $(p, q, r)$ is the point at which $g$ attains its maximum in absolute value on $\pi \cap T$. The averaging property of $g$ implies that the values of $g$ at $(p+1, q-1, r)$ etc. are all equal to $g(p, q, r)$. Repeating this argument we obtain that $g$ is constant on the whole of $\pi \cap T$, and hence it equals 0 everywhere. Therefore $f_{1} \equiv f_{2}$. It remains to guess $f$. It is natural to try $\bar{f}(p, q, r)=p q r$ first: it satisfies $\bar{f}(p, q, r)=\frac{1}{6}[\bar{f}(p+1, q-1, r)+\cdots+\bar{f}(p, q-1, r+1)]+\frac{p+q+r}{3}$. Thus we simply take  $$ f(p, q, r)=\frac{3}{p+q+r} \bar{f}(p, q, r)=\frac{3 p q r}{p+q+r} $$  and directly check that it satisfies the required property. Hence this is the unique solution.


10. C4 (NZL) A set of three nonnegative integers $\{x, y, z\}$ with $x<y<z$ is called historic if $\{z-y, y-x\}=\{1776,2001\}$. Show that the set of all nonnegative integers can be written as the union of disjoint historic sets.

Solution: 10. For convenience let us write $a=1776, b=2001,0<a<b$. There are two types of historic sets:  $$ \text { (1) }\{x, x+a, x+a+b\} \quad \text { and } \quad \text { (2) }\{x, x+b, x+a+b\} \text {. } $$  We construct a sequence of historic sets $H_{1}, H_{2}, H_{3}, \ldots$ inductively as follows: (i) $H_{1}=\{0, a, a+b\}$, and (ii) Let $y_{n}$ be the least nonnegative integer not occurring in $U_{n}=H_{1} \cap$ $\cdots \cap H_{n}$. We take $H_{n+1}$ to be $\left\{y_{n}, y_{n}+a, y_{n}+a+b\right\}$ if $y_{n}+a \notin U_{n}$, and $\left\{y_{n}, y_{n}+b, y_{n}+a+b\right\}$ otherwise. It remains to show that this construction never fails. Suppose that it failed at the construction of $H_{n+1}$. The element $y_{n}+a+b$ is not contained in $U_{n}$, since by the construction the smallest elements of $H_{1}, \ldots, H_{n}$ are all less than $y_{n}$. Hence the reason for the failure must be the fact that both $y_{n}+a$ and $y_{n}+b$ are covered by $U_{n}$. Further, $y_{n}+b$ must have been the largest element of its set $H_{k}$, so the smallest element of $H_{k}$ equals $y_{n}-a$. But since $y_{n}$ is not covered, we conclude that $H_{k}$ is of type (2). This is a contradiction, because $y_{n}$ was free, so by the algorithm we had to choose for $H_{k}$ the set of type (1) (that is, $\left\{y_{n}-a, y_{n}, y_{n}+b\right\}$ ) first.


11. C5 (FIN) Find all finite sequences $\left(x_{0}, x_{1}, \ldots, x_{n}\right)$ such that for every $j, 0 \leq j \leq n, x_{j}$ equals the number of times $j$ appears in the sequence.

Solution: 11. Let $\left(x_{0}, x_{1}, \ldots, x_{n}\right)$ be any such sequence: its terms are clearly nonnegative integers. Also, $x_{0}=0$ yields a contradiction, so $x_{0}>0$. Let $m$ be the number of positive terms among $x_{1}, \ldots, x_{n}$. Since $x_{i}$ counts the terms equal to $i$, the sum $x_{1}+\cdots+x_{n}$ counts the total number of positive terms in the sequence, which is known to be $m+1$. Therefore among $x_{1}, \ldots, x_{n}$ exactly $m-1$ terms are equal to 1 , one is equal to 2 , and the others are 0 . Only $x_{0}$ can exceed 2 , and consequently at most one of $x_{3}, x_{4}, \ldots$ can be positive. It follows that $m \leq 3$. (i) $m=1$ : Then $x_{2}=2$ (since $x_{1}=2$ is impossible), so $x_{0}=2$. The resulting sequence is $(2,0,2,0)$. (ii) $m=2$ : Either $x_{1}=2$ or $x_{2}=2$. These cases yield $(1,2,1,0)$ and $(2,1,2,0,0)$ respectively. (iii) $m=3$ : This means that $x_{k}>0$ for some $k>2$. Hence $x_{0}=k$ and $x_{k}=1$. Further, $x_{1}=1$ is impossible, so $x_{1}=2$ and $x_{2}=1$; there are no more positive terms in the sequence. The resulting sequence is $(p, 2,1, \underbrace{0, \ldots, 0}_{p-3}, 1,0,0,0)$.


12. C6 (CAN) For a positive integer $n$ define a sequence of zeros and ones to be balanced if it contains $n$ zeros and $n$ ones. Two balanced sequences $a$ and $b$ are neighbors if you can move one of the $2 n$ symbols of $a$ to another position to form $b$. For instance, when $n=4$, the balanced sequences 01101001 and 00110101 are neighbors because the third (or fourth) zero in the first sequence can be moved to the first or second position to form the second sequence. Prove that there is a set $S$ of at most $\frac{1}{n+1}\binom{2 n}{n}$ balanced sequences such that every balanced sequence is equal to or is a neighbor of at least one sequence in $S$.

Solution: 12. For each balanced sequence $a=\left(a_{1}, a_{2}, \ldots, a_{2 n}\right)$ denote by $f(a)$ the sum of $j$ 's for which $a_{j}=1$ (for example, $f(100101)=1+4+6=11$ ). Partition the $\binom{2 n}{n}$ balanced sequences into $n+1$ classes according to the residue of $f$ modulo $n+1$. Now take $S$ to be a class of minimum size: obviously $|S| \leq \frac{1}{n+1}\binom{2 n}{n}$. We claim that every balanced sequence $a$ is either a member of $S$ or a neighbor of a member of $S$. We consider two cases. (i) Let $a_{1}$ be 1 . It is easy to see that moving this 1 just to the right of the $k$ th 0 , we obtain a neighboring balanced sequence $b$ with $f(b)=$ $f(a)+k$. Thus if $a \notin S$, taking a suitable $k \in\{1,2, \ldots, n\}$ we can achieve that $b \in S$. (ii) Let $a_{1}$ be 0 . Taking this 0 just to the right of the $k$ th 1 gives a neighbor $b$ with $f(b)=f(a)-k$, and the conclusion is similar to that of (i). This justifies our claim.


13. C7 (FRA) A pile of $n$ pebbles is placed in a vertical column. This configuration is modified according to the following rules. A pebble can be moved if it is at the top of a column that contains at least two more pebbles than the column immediately to its right. (If there are no pebbles to the right, think of this as a column with 0 pebbles.) At each stage, choose a pebble from among those that can be moved (if there are any) and place it at the top of the column to its right. If no pebbles can be moved, the configuration is called a final configuration. For each $n$, show that no matter what choices are made at each stage, the final configuration is unique. Describe that configuration in terms of $n$.

Solution: 13. At any moment, let $p_{i}$ be the number of pebbles in the $i$ th column, $i=$ $1,2, \ldots$ The final configuration has obvious properties $p_{1} \geq p_{2} \geq \cdots$ and $p_{i+1} \in\left\{p_{i}, p_{i}-1\right\}$. We claim that $p_{i+1}=p_{i}>0$ is possible for at most one $i$. Assume the opposite. Then the final configuration has the property that for some $r$ and $s>r$ we have $p_{r+1}=p_{r}, p_{s+1}=p_{s}>0$ and $p_{r+k}=$ $p_{r+1}-k+1$ for all $k=1, \ldots, s-r$. Consider the earliest configuration, say $C$, with this property. What was the last move before $C$ ? The only possibilities are moving a pebble either from the $r$ th or from the $s$ th column; however, in both cases the configuration preceding this last move had the same property, contradicting the assumption that $C$ is the earliest. Therefore the final configuration looks as follows: $p_{1}=a \in \mathbb{N}$, and for some $r, p_{i}$ equals $a-(i-1)$ if $i \leq r$, and $a-(i-2)$ otherwise. It is easy to determine $a, r$ : since $n=p_{1}+p_{2}+\cdots=\frac{(a+1)(a+2)}{2}-r$, we get $\frac{a(a+1)}{2} \leq n<\frac{(a+1)(a+2)}{2}$, from which we uniquely find $a$ and then $r$ as well.  The final configuration for $n=13$ : ![](https://cdn.mathpix.com/cropped/2024_11_18_8e985d6b9c83aa3e9d0eg-690.jpg?height=162&width=155&top_left_y=922&top_left_x=1027)


14. C8 (GER) ${ }^{\mathrm{IMO} 3}$ Twenty-one girls and twenty-one boys took part in a mathematical competition. It turned out that (i) each contestant solved at most six problems, and (ii) for each pair of a girl and a boy, there was at least one problem that was solved by both the girl and the boy. Show that there is a problem that was solved by at least three girls and at least three boys.

Solution: 14. We say that a problem is difficult for boys if at most two boys solved it, and difficult for girls if at most two girls solved it. Let us estimate the number of pairs boy-girl both of whom solved some problem difficult for boys. Consider any girl. By the condition (ii), among the six problems she solved, at least one was solved by at least 3 boys, and hence at most 5 were difficult for boys. Since each of these problems was solved by at most 2 boys and there are 21 girls, the considered number of pairs does not exceed $5 \cdot 2 \cdot 21=210$. Similarly, there are at most 210 pairs boy-girl both of whom solved some problem difficult for girls. On the other hand, there are $21^{2}>2 \cdot 210$ pairs boy-girl, and each of them solved one problem in common. Thus some problems were difficult neither for girls nor for boys, as claimed. Remark. The statement can be generalized: if $2(m-1)(n-1)+1$ boys and as many girls participated, and nobody solved more than $m$ problems, then some problem was solved by at least $n$ boys and $n$ girls.


15. G1 (UKR) Let $A_{1}$ be the center of the square inscribed in acute triangle $A B C$ with two vertices of the square on side $B C$. Thus one of the two remaining vertices of the square is on side $A B$ and the other is on $A C$. Points $B_{1}, C_{1}$ are defined in a similar way for inscribed squares with two vertices on sides $A C$ and $A B$, respectively. Prove that lines $A A_{1}, B B_{1}, C C_{1}$ are concurrent.

Solution: 15. Let $M N P Q$ be the square inscribed in $\triangle A B C$ with $M \in A B, N \in A C$, $P, Q \in B C$, and let $A A_{1}$ meet $M N, P Q$ at $K, X$ respectively. Put $M K=$ $P X=m, N K=Q X=n$, and $M N=d$. Then  $$ \frac{B X}{X C}=\frac{m}{n}=\frac{B X+m}{X C+n}=\frac{B P}{C Q}=\frac{d \cot \beta+d}{d \cot \gamma+d}=\frac{\cot \beta+1}{\cot \gamma+1} . $$  Similarly, if $B B_{1}$ and $C C_{1}$ meet $A C$ and $B C$ at $Y, Z$ respectively then $\frac{C Y}{Y A}=\frac{\cot \gamma+1}{\cot \alpha+1}$ and $\frac{A Z}{Z B}=\frac{\cot \alpha+1}{\cot \beta+1}$. Therefore $\frac{B X}{X C} \frac{C Y}{Y A} \frac{A Z}{Z B}=1$, so by Ceva's theorem, $A X, B Y, C Z$ have a common point.  Second solution. Let $A_{2}$ be the center of the square constructed over $B C$ outside $\triangle A B C$. Since this square and the inscribed square corresponding to the side $B C$ are homothetic, $A, A_{1}$, and $A_{2}$ are collinear. Points $B_{2}, C_{2}$ are analogously defined. Denote the angles $B A A_{2}, A_{2} A C, C B B_{2}$, $B_{2} B A, A C C_{2}, C_{2} C B$ by $\alpha_{1}, \alpha_{2}, \beta_{1}, \beta_{2}, \gamma_{1}, \gamma_{2}$. By the law of sines we have  $$ \frac{\sin \alpha_{1}}{\sin \alpha_{2}}=\frac{\sin \left(\beta+45^{\circ}\right)}{\sin \left(\gamma+45^{\circ}\right)}, \frac{\sin \beta_{1}}{\sin \beta_{2}}=\frac{\sin \left(\gamma+45^{\circ}\right)}{\sin \left(\alpha+45^{\circ}\right)}, \frac{\sin \gamma_{1}}{\sin \gamma_{2}}=\frac{\sin \left(\alpha+45^{\circ}\right)}{\sin \left(\beta+45^{\circ}\right)} $$  Since the product of these ratios is 1 , by the trigonometric Ceva's theorem $A A_{2}, B B_{2}, C C_{2}$ are concurrent.


16. G2 (KOR) ${ }^{\mathrm{IMO} 1}$ In acute triangle $A B C$ with circumcenter $O$ and altitude $A P, \measuredangle C \geq \measuredangle B+30^{\circ}$. Prove that $\measuredangle A+\measuredangle C O P<90^{\circ}$.

Solution: 16. Since $\angle O C P=90^{\circ}-\angle A$, we are led to showing that $\angle O C P>\angle C O P$, i.e., $O P>C P$. By the triangle inequality it suffices to prove $C P<\frac{1}{2} C O$. Let $C O=R$. The law of sines yields $C P=A C \cos \gamma=2 R \sin \beta \cos \gamma<$ $2 R \sin \beta \cos \left(\beta+30^{\circ}\right)$. Finally, we have  $$ 2 \sin \beta \cos \left(\beta+30^{\circ}\right)=\sin \left(2 \beta+30^{\circ}\right)-\sin 30^{\circ} \leq \frac{1}{2} $$  which completes the proof.


17. G3 (GBR) Let $A B C$ be a triangle with centroid $G$. Determine, with proof, the position of the point $P$ in the plane of $A B C$ such that  $$ A P \cdot A G+B P \cdot B G+C P \cdot C G $$  is a minimum, and express this minimum value in terms of the side lengths of $A B C$.

Solution: 17. Let us investigate a more general problem, in which $G$ is any point of the plane such that $A G, B G, C G$ are sides of a triangle. Let $F$ be the point in the plane such that $B C: C F: F B=A G: B G: C G$ and $F, A$ lie on different sides of $B C$. Then by Ptolemy's inequality, on $B P C F$ we have $A G \cdot A P+B G \cdot B P+C G \cdot C P=A G \cdot A P+\frac{A G}{B C}(C F$. $B P+B F \cdot C P) \geq A G \cdot A P+\frac{A G}{B C} B C \cdot P F$. Hence  $$ A G \cdot A P+B G \cdot B P+C G \cdot C P \geq A G \cdot A F $$  where equality holds if and only if $P$ lies on the segment $A F$ and on the circle $B C F$. Now we return to the case of $G$ the centroid of $\triangle A B C$. We claim that $F$ is then the point $\widehat{G}$ in which the line $A G$ meets again the circumcircle of $\triangle B G C$. Indeed, if $M$ is the midpoint of $A B$, by the law of sines we have $\frac{B C}{C \widehat{G}}=$ $\frac{\sin \angle B \widehat{G} C}{\sin \angle C B \widehat{G}}=\frac{\sin \angle B G M}{\sin \angle A G M}=\frac{A G}{B G}$, and similarly $\frac{B C}{B \widehat{G}}=\frac{A G}{C G}$. Thus (1) implies ![](https://cdn.mathpix.com/cropped/2024_11_18_8e985d6b9c83aa3e9d0eg-691.jpg?height=342&width=507&top_left_y=1514&top_left_x=831)  $$ A G \cdot A P+B G \cdot B P+C G \cdot C P \geq A G \cdot A \widehat{G} $$  It is easily seen from the above considerations that equality holds if and only if $P \equiv G$, and then the (minimum) value of $A G \cdot A P+B G \cdot B P+$ $C G \cdot C P$ equals  $$ A G^{2}+B G^{2}+C G^{2}=\frac{a^{2}+b^{2}+c^{2}}{3} $$  Second solution. Notice that $A G \cdot A P \geq \overrightarrow{A G} \cdot \overrightarrow{A P}=\overrightarrow{A G} \cdot(\overrightarrow{A G}+\overrightarrow{P G})$. Summing this inequality with analogous inequalities for $B G \cdot B P$ and $C G \cdot C P$ gives us $A G \cdot A P+B G \cdot B P+C G \cdot C P \geq A G^{2}+B G^{2}+C G^{2}+$ $(\overrightarrow{A G}+\overrightarrow{B G}+\overrightarrow{C G}) \cdot \overrightarrow{P G}=A G^{2}+B G^{2}+C G^{2}=\frac{a^{2}+b^{2}+c^{2}}{3}$. Equality holds if and only if $P \equiv Q$.


18. G4 (FRA) Let $M$ be a point in the interior of triangle $A B C$. Let $A^{\prime}$ lie on $B C$ with $M A^{\prime}$ perpendicular to $B C$. Define $B^{\prime}$ on $C A$ and $C^{\prime}$ on $A B$ similarly. Define  $$ p(M)=\frac{M A^{\prime} \cdot M B^{\prime} \cdot M C^{\prime}}{M A \cdot M B \cdot M C} $$  Determine, with proof, the location of $M$ such that $p(M)$ is maximal. Let $\mu(A B C)$ denote the maximum value. For which triangles $A B C$ is the value of $\mu(A B C)$ maximal?

Solution: 18. Let $\alpha_{1}, \beta_{1}, \gamma_{1}, \alpha_{2}, \beta_{2}, \gamma_{2}$ denote the angles $\angle M A B, \angle M B C, \angle M C A$, $\angle M A C, \angle M B A, \angle M C B$ respectively. Then $\frac{M B^{\prime} \cdot M C^{\prime}}{M A^{2}}=\sin \alpha_{1} \sin \alpha_{2}$, $\frac{M C^{\prime} \cdot M A^{\prime}}{M B^{2}}=\sin \beta_{1} \sin \beta_{2}, \frac{M A^{\prime} \cdot M B^{\prime}}{M C^{2}}=\sin \gamma_{1} \sin \gamma_{2}$; hence  $$ p(M)^{2}=\sin \alpha_{1} \sin \alpha_{2} \sin \beta_{1} \sin \beta_{2} \sin \gamma_{1} \sin \gamma_{2} $$  Since  $$ \sin \alpha_{1} \sin \alpha_{2}=\frac{1}{2}\left(\cos \left(\alpha_{1}-\alpha_{2}\right)-\cos \left(\alpha_{1}+\alpha_{2}\right) \leq \frac{1}{2}(1-\cos \alpha)=\sin ^{2} \frac{\alpha}{2}\right. $$  we conclude that  $$ p(M) \leq \sin \frac{\alpha}{2} \sin \frac{\beta}{2} \sin \frac{\gamma}{2} $$  Equality occurs when $\alpha_{1}=\alpha_{2}, \beta_{1}=\beta_{2}$, and $\gamma_{1}=\gamma_{2}$, that is, when $M$ is the incenter of $\triangle A B C$. It is well known that $\mu(A B C)=\sin \frac{\alpha}{2} \sin \frac{\beta}{2} \sin \frac{\gamma}{2}$ is maximal when $\triangle A B C$ is equilateral (it follows, for example, from Jensen's inequality applied to $\ln \sin x)$. Hence $\max \mu(A B C)=\frac{1}{8}$.


19. G5 (GRE) Let $A B C$ be an acute triangle. Let $D A C, E A B$, and $F B C$ be isosceles triangles exterior to $A B C$, with $D A=D C, E A=E B$, and $F B=F C$ such that  $$ \angle A D C=2 \angle B A C, \quad \angle B E A=2 \angle A B C, \quad \angle C F B=2 \angle A C B . $$  Let $D^{\prime}$ be the intersection of lines $D B$ and $E F$, let $E^{\prime}$ be the intersection of $E C$ and $D F$, and let $F^{\prime}$ be the intersection of $F A$ and $D E$. Find, with proof, the value of the sum  $$ \frac{D B}{D D^{\prime}}+\frac{E C}{E E^{\prime}}+\frac{F A}{F F^{\prime}} $$

Solution: 19. It is easy to see that the hexagon $A E B F C D$ is convex and $\angle A E B+$ $\angle B F C+\angle C D A=360^{\circ}$. Using this relation we obtain that the circles $\omega_{1}, \omega_{2}, \omega_{3}$ with centers at $D, E, F$ and radii $D A, E B, F C$ respectively all pass through a common point $O$. Indeed, if $\omega_{1} \cap \omega_{2}=\{O\}$, then $\angle A O B=180^{\circ}-\angle A E B / 2$ and $\angle B O C=180^{\circ}-\angle B F C / 2$; hence $\angle C O A=180^{\circ}-\angle C D A / 2$ as well, i.e., $O \in \omega_{3}$. The point $O$ is the re- ![](https://cdn.mathpix.com/cropped/2024_11_18_8e985d6b9c83aa3e9d0eg-692.jpg?height=491&width=419&top_left_y=1318&top_left_x=870) flection of $A$ with respect to $D E$. Similarly, it is also the reflection of $B$ with respect to $E F$, and that of $C$ with respect to $F D$. Hence  $$ \frac{D B}{D D^{\prime}}=1+\frac{D^{\prime} B}{D D^{\prime}}=1+\frac{S_{E B F}}{S_{E D F}}=1+\frac{S_{O E F}}{S_{D E F}} $$  Analogously $\frac{E C}{E E^{\prime}}=1+\frac{S_{O D F}}{S_{D E F}}$ and $\frac{F A}{F F^{\prime}}=1+\frac{S_{O D E}}{S_{D E F}}$. Adding these relations gives us  $$ \frac{D B}{D D^{\prime}}+\frac{E C}{E E^{\prime}}+\frac{F A}{F F^{\prime}}=3+\frac{S_{O E F}+S_{O D F}+S_{O D E}}{S_{D E F}}=4 . $$


2. A2 (POL) Let $a_{0}, a_{1}, a_{2}, \ldots$ be an arbitrary infinite sequence of positive numbers. Show that the inequality $1+a_{n}>a_{n-1} \sqrt[n]{2}$ holds for infinitely many positive integers $n$.

Solution: 2. It follows from Bernoulli's inequality that for each $n \in \mathbb{N},\left(1+\frac{1}{n}\right)^{n} \geq 2$, or $\sqrt[n]{2} \leq 1+\frac{1}{n}$. Consequently, it will be enough to show that $1+a_{n}>$ $\left(1+\frac{1}{n}\right) a_{n-1}$. Assume the opposite. Then there exists $N$ such that for each $n \geq N$,  $$ 1+a_{n} \leq\left(1+\frac{1}{n}\right) a_{n-1}, \quad \text { i.e., } \quad \frac{1}{n+1}+\frac{a_{n}}{n+1} \leq \frac{a_{n-1}}{n} $$  Summing for $n=N, \ldots, m$ yields $\frac{a_{m}}{m+1} \leq \frac{a_{N-1}}{N}-\left(\frac{1}{N+1}+\cdots+\frac{1}{m+1}\right)$. However, it is well known that the sum $\frac{1}{N+1}+\cdots+\frac{1}{m+1}$ can be arbitrarily large for $m$ large enough, so that $\frac{a_{m}^{N+1}}{m+1}$ is eventually negative. This contradiction yields the result. Second solution. Suppose that $1+a_{n} \leq \sqrt[n]{2} a_{n-1}$ for all $n \geq N$. Set $b_{n}=2^{-(1+1 / 2+\cdots+1 / n)}$ and multiply both sides of the above inequality to obtain $b_{n}+b_{n} a_{n} \leq b_{n-1} a_{n-1}$. Thus  $$ b_{N} a_{N}>b_{N} a_{N}-b_{n} a_{n} \geq b_{N}+b_{N+1}+\cdots+b_{n} $$  However, it can be shown that $\sum_{n>N} b_{N}$ diverges: in fact, since $1+\frac{1}{2}+$ $\cdots+\frac{1}{n}<1+\ln n$, we have $b_{n}>2^{-1-\ln n}=\frac{1}{2} n^{-\ln 2}>\frac{1}{2 n}$, and we already know that $\sum_{n>N} \frac{1}{2 n}$ diverges. Remark. As can be seen from both solutions, the value 2 in the problem can be increased to $e$.


20. G6 (IND) Let $A B C$ be a triangle and $P$ an exterior point in the plane of the triangle. Suppose $A P, B P, C P$ meet the sides $B C, C A, A B$ (or extensions thereof) in $D, E, F$, respectively. Suppose further that the areas of triangles $P B D, P C E, P A F$ are all equal. Prove that each of these areas is equal to the area of triangle $A B C$ itself.

Solution: 20. By Ceva's theorem, we can choose real numbers $x, y, z$ such that  $$ \frac{\overrightarrow{B D}}{\overrightarrow{D C}}=\frac{z}{y}, \frac{\overrightarrow{C E}}{\overrightarrow{E A}}=\frac{x}{z}, \text { and } \frac{\overrightarrow{A F}}{\overrightarrow{F B}}=\frac{y}{x} $$  The point $P$ lies outside the triangle $A B C$ if and only if $x, y, z$ are not all of the same sign. In what follows, $S_{X}$ will denote the signed area of a figure $X$. Let us assume that the area $S_{A B C}$ of $\triangle A B C$ is 1 . Since $S_{P B C}: S_{P C A}$ : $S_{P A B}=x: y: z$ and $S_{P B D}: S_{P D C}=z: y$, it follows that $S_{P B D}=\frac{z}{y+z} \frac{x}{x+y+z}$. Hence $S_{P B D}=\frac{1}{y(y+z)} \frac{x y z}{x+y+z}, S_{P C E}=\frac{1}{z(z+x)} \frac{x y z}{x+y+z}$, $S_{P A F}=\frac{1}{x(x+y)} \frac{x y z}{x+y+z}$. By the condition of the problem we have $\left|S_{P B D}\right|=$ $\left|S_{P C E}\right|=\left|S_{P A F}\right|$, or  $$ |x(x+y)|=|y(y+z)|=|z(z+x)| . $$  Obviously $x, y, z$ are nonzero, so that we can put w.l.o.g. $z=1$. At least two of the numbers $x(x+y), y(y+1), 1(1+x)$ are equal, so we can assume that $x(x+y)=y(y+1)$. We distinguish two cases: (i) $x(x+y)=y(y+1)=1+x$. Then $x=y^{2}+y-1$, from which we obtain $\left(y^{2}+y-1\right)\left(y^{2}+2 y-1\right)=y(y+1)$. Simplification gives $y^{4}+3 y^{3}-y^{2}-4 y+1=0$, or  $$ (y-1)\left(y^{3}+4 y^{2}+3 y-1\right)=0 $$  If $y=1$, then also $z=x=1$, so $P$ is the centroid of $\triangle A B C$, which is not an exterior point. Hence $y^{3}+4 y^{2}+3 y-1=0$. Now the signed area of each of the triangles $P B D, P C E, P A F$ equals  $$ \begin{aligned} S_{P A F} & =\frac{y z}{(x+y)(x+y+z)} \\ & =\frac{y}{\left(y^{2}+2 y-1\right)\left(y^{2}+2 y\right)}=\frac{1}{y^{3}+4 y^{2}+3 y-2}=-1 . \end{aligned} $$  It is easy to check that not both of $x, y$ are positive, implying that $P$ is indeed outside $\triangle A B C$. This is the desired result. (ii) $x(x+y)=y(y+1)=-1-x$. In this case we are led to  $$ f(y)=y^{4}+3 y^{3}+y^{2}-2 y+1=0 . $$  We claim that this equation has no real solutions. In fact, assume that $y_{0}$ is a real root of $f(y)$. We must have $y_{0}<0$, and hence $u=-y_{0}>0$ satisfies $3 u^{3}-u^{4}=(u+1)^{2}$. On the other hand,  $$ \begin{aligned} 3 u^{3}-u^{4} & =u^{3}(3-u)=4 u\left(\frac{u}{2}\right)\left(\frac{u}{2}\right)(3-u) \\ & \leq 4 u\left(\frac{u / 2+u / 2+3-u}{3}\right)^{3}=4 u \\ & \leq(u+1)^{2} \end{aligned} $$  where at least one of the inequalities is strict, a contradiction. Remark. The official solution was incomplete, missing the case (ii).


21. G7 (BUL) Let $O$ be an interior point of acute triangle $A B C$. Let $A_{1}$ lie on $B C$ with $O A_{1}$ perpendicular to $B C$. Define $B_{1}$ on $C A$ and $C_{1}$ on $A B$ similarly. Prove that $O$ is the circumcenter of $A B C$ if and only if the perimeter of $A_{1} B_{1} C_{1}$ is not less than any one of the perimeters of $A B_{1} C_{1}, B C_{1} A_{1}$, and $C A_{1} B_{1}$.

Solution: 21. We denote by $p(X Y Z)$ the perimeter of a triangle $X Y Z$.  If $O$ is the circumcenter of $\triangle A B C$, then $A_{1}, B_{1}, C_{1}$ are the midpoints of the corresponding sides of the triangle, and hence $p\left(A_{1} B_{1} C_{1}\right)=$ $p\left(A B_{1} C_{1}\right)=p\left(A_{1} B C_{1}\right)=p\left(A_{1} B_{1} C\right)$. Conversely, suppose that $p\left(A_{1} B_{1} C_{1}\right) \geq p\left(A B_{1} C_{1}\right), p\left(A_{1} B C_{1}\right), p\left(A_{1} B_{1} C\right)$. Let $\alpha_{1}, \alpha_{2}, \beta_{1}, \beta_{2}, \gamma_{1}, \gamma_{2}$ denote $\angle B_{1} A_{1} C, \angle C_{1} A_{1} B, \angle C_{1} B_{1} A, \angle A_{1} B_{1} C$, $\angle A_{1} C_{1} B, \angle B_{1} C_{1} A$. Suppose that $\gamma_{1}, \beta_{2} \geq \alpha$. If $A_{2}$ is the fourth vertex of the parallelogram $B_{1} A C_{1} A_{2}$, then these conditions imply that $A_{1}$ is in the interior or on the border of $\triangle B_{1} C_{1} A_{2}$, and therefore $p\left(A_{1} B_{1} C_{1}\right) \leq p\left(A_{2} B_{1} C_{1}\right)=$ $p\left(A B_{1} C_{1}\right)$. Moreover, if one of the inequalities $\gamma_{1} \geq \alpha, \beta_{2} \geq \alpha$ is strict, ![](https://cdn.mathpix.com/cropped/2024_11_18_8e985d6b9c83aa3e9d0eg-694.jpg?height=346&width=543&top_left_y=902&top_left_x=804) then $p\left(A_{1} B_{1} C_{1}\right)$ is strictly less than $p\left(A B_{1} C_{1}\right)$, contrary to the assumption. Hence  $$ \begin{aligned} & \beta_{2} \geq \alpha \Longrightarrow \gamma_{1} \leq \alpha \\ & \gamma_{2} \geq \beta \Longrightarrow \alpha_{1} \leq \beta \\ & \alpha_{2} \geq \gamma \Longrightarrow \beta_{1} \leq \gamma \end{aligned} $$  the last two inequalities being obtained analogously to the first one. Because of the symmetry, there is no loss of generality in assuming that $\gamma_{1} \leq \alpha$. Then since $\gamma_{1}+\alpha_{2}=180^{\circ}-\beta=\alpha+\gamma$, it follows that $\alpha_{2} \geq \gamma$. From (1) we deduce $\beta_{1} \leq \gamma$, which further implies $\gamma_{2} \geq \beta$. Similarly, this leads to $\alpha_{1} \leq \beta$ and $\beta_{2} \geq \alpha$. To sum up,  $$ \gamma_{1} \leq \alpha \leq \beta_{2}, \quad \alpha_{1} \leq \beta \leq \gamma_{2}, \quad \beta_{1} \leq \gamma \leq \alpha_{2} $$  Since $O A_{1} B C_{1}$ and $O B_{1} C A_{1}$ are cyclic, we have $\angle A_{1} O B=\gamma_{1}$ and $\angle A_{1} O C=\beta_{2}$. Hence $B O: C O=\cos \beta_{2}: \cos \gamma_{1}$, hence $B O \leq C O$. Analogously, $C O \leq A O$ and $A O \leq B O$. Therefore $A O=B O=C O$, i.e., $O$ is the circumcenter of $A B C$.


22. G8 (ISR) ${ }^{\mathrm{IMO}}$ Let $A B C$ be a triangle with $\measuredangle B A C=60^{\circ}$. Let $A P$ bisect $\angle B A C$ and let $B Q$ bisect $\angle A B C$, with $P$ on $B C$ and $Q$ on $A C$. If $A B+$ $B P=A Q+Q B$, what are the angles of the triangle?

Solution: 22. Let $S$ and $T$ respectively be the points on the extensions of $A B$ and $A Q$ over $B$ and $Q$ such that $B S=B P$ and $Q T=Q B$. It is given that $A S=$ $A B+B P=A Q+Q B=A T$. Since $\angle P A S=\angle P A T$, the triangles $A P S$ and $A P T$ are congruent, from which we deduce that $\angle A T P=\angle A S P=$ $\beta / 2=\angle Q B P$. Hence $\angle Q T P=\angle Q B P$. If $P$ does not lie on $B T$, then the last equality implies that $\triangle Q B P$ and $\triangle Q T P$ are congruent, so $P$ lies on the internal bisector of $\angle B Q T$. But $P$ also lies on the internal bisector of $\angle Q A B$; consequently, $P$ is an excenter of $\triangle Q A B$, thus lying on the internal bisector of $\angle Q B S$ as well. It follows that $\angle P B Q=\beta / 2=\angle P B S=180^{\circ}-\beta$, so $\beta=120^{\circ}$, which is impossible. Therefore $P \in B T$, which means that $T \equiv C$. Now from $Q C=Q B$ we conclude that $120^{\circ}-\beta=\gamma=\beta / 2$, i.e., $\beta=80^{\circ}$ and $\gamma=40^{\circ}$.


23. N1 (AUS) Prove that there is no positive integer $n$ such that for $k=$ $1,2, \ldots, 9$, the leftmost digit (in decimal notation) of $(n+k)$ ! equals $k$.

Solution: 23. For each positive integer $x$, define $\alpha(x)=x / 10^{r}$ if $r$ is the positive integer satisfying $10^{r} \leq x<10^{r+1}$. Observe that if $\alpha(x) \alpha(y)<10$ for some $x, y \in \mathbb{N}$, then $\alpha(x y)=\alpha(x) \alpha(y)$. If, as usual, $[t]$ means the integer part of $t$, then $[\alpha(x)]$ is actually the leftmost digit of $x$. Now suppose that $n$ is a positive integer such that $k \leq \alpha((n+k)!)<k+1$ for $k=1,2, \ldots, 9$. We have  $$ 1<\alpha(n+k)=\frac{\alpha((n+k)!)}{\alpha((n+k-1)!)}<\frac{k+1}{k-1} \leq 3 \quad \text { for } 2 \leq k \leq 9 $$  from which we obtain $\alpha(n+k+1)>\alpha(n+k)$ (the opposite can hold only if $\alpha(n+k) \geq 9)$. Therefore  $$ 1<\alpha(n+2)<\cdots<\alpha(n+9) \leq \frac{5}{4} . $$  On the other hand, this implies that $\alpha((n+4)!)=\alpha((n+1)!) \alpha(n+2) \alpha(n+$ 3) $\alpha(n+4)<(5 / 4)^{3} \alpha((n+1)$ ! $)<4$, contradicting the assumption that the leftmost digit of $(n+4)$ ! is 4 .


24. N2 (COL) Consider the system  $$ \begin{aligned} x+y & =z+u \\ 2 x y & =z u . \end{aligned} $$  Find the greatest value of the real constant $m$ such that $m \leq x / y$ for every positive integer solution $x, y, z, u$ of the system with $x \geq y$.

Solution: 24. We shall find the general solution to the system. Squaring both sides of the first equation and subtracting twice the second equation we obtain $(x-y)^{2}=z^{2}+u^{2}$. Thus $(z, u, x-y)$ is a Pythagorean triple. Then it is well known that there are positive integers $t, a, b$ such that $z=t\left(a^{2}-b^{2}\right)$, $u=2 t a b$ (or vice versa), and $x-y=t\left(a^{2}+b^{2}\right)$. Using that $x+y=z+u$ we come to the general solution:  $$ x=t\left(a^{2}+a b\right), \quad y=t\left(a b-b^{2}\right) ; \quad z=t\left(a^{2}-b^{2}\right), \quad u=2 t a b . $$  Putting $a / b=k$ we obtain  $$ \frac{x}{y}=\frac{k^{2}+k}{k-1}=3+(k-1)+\frac{2}{k-1} \geq 3+2 \sqrt{2} $$  with equality for $k-1=\sqrt{2}$. On the other hand, $k$ can be arbitrarily close to $1+\sqrt{2}$, and so $x / y$ can be arbitrarily close to $3+2 \sqrt{2}$. Hence $m=3+2 \sqrt{2}$. Remark. There are several other techniques for solving the given system. The exact lower bound of $m$ itself can be obtained as follows: by the $\operatorname{system}\left(\frac{x}{y}\right)^{2}-6 \frac{x}{y}+1=\left(\frac{z-u}{y}\right)^{2} \geq 0$, so $x / y \geq 3+2 \sqrt{2}$.


Solution: 25. Define $b_{n}=\left|a_{n+1}-a_{n}\right|$ for $n \geq 1$. From the equalities $a_{n+1}=b_{n-1}+b_{n-2}$, from $a_{n}=b_{n-2}+b_{n-3}$ we obtain $b_{n}=\left|b_{n-1}-b_{n-3}\right|$. From this relation we deduce that $b_{m} \leq \max \left(b_{n}, b_{n+1}, b_{n+2}\right)$ for all $m \geq n$, and consequently $b_{n}$ is bounded. Lemma. If $\max \left(b_{n}, b_{n+1}, b_{n+2}\right)=M \geq 2$, then $\max \left(b_{n+6}, b_{n+7}, b_{n+8}\right) \leq$ $M-1$. Proof. Assume the opposite. Suppose that $b_{j}=M, j \in\{n, n+1, n+2\}$, and let $b_{j+1}=x$ and $b_{j+2}=y$. Thus $b_{j+3}=M-y$. If $x, y, M-y$ are all less than $M$, then the contradiction is immediate. The remaining cases are these: (i) $x=M$. Then the sequence has the form $M, M, y, M-y, y, \ldots$, and since $\max (y, M-y, y)=M$, we must have $y=0$ or $y=M$. (ii) $y=M$. Then the sequence has the form $M, x, M, 0, x, M-x, \ldots$, and since $\max (0, x, M-x)=M$, we must have $x=0$ or $x=M$. (iii) $y=0$. Then the sequence is $M, x, 0, M, M-x, M-x, x, \ldots$, and since $\max (M-x, x, x)=M$, we have $x=0$ or $x=M$. In every case $M$ divides both $x$ and $y$. From the recurrence formula $M$ also divides $b_{i}$ for every $i<j$. However, $b_{2}=12^{12}-11^{11}$ and $b_{4}=11^{11}$ are relatively prime, a contradiction. From $\max \left(b_{1}, b_{2}, b_{3}\right) \leq 13^{13}$ and the lemma we deduce inductively that $b_{n} \leq 1$ for all $n \geq 6 \cdot 13^{13}-5$. Hence $a_{n}=b_{n-2}+b_{n-3}$ takes only the values $0,1,2$ for $n \geq 6 \cdot 13^{13}-2$. In particular, $a_{14^{14}}$ is 0,1 , or 2 . On the other hand, the sequence $a_{n}$ modulo 2 is as follows: $1,0,1,0,0,1,1 ; 1,0,1,0, \ldots$; and therefore it is periodic with period 7 . Finally, $14^{14} \equiv 0$ modulo 7 , from which we obtain $a_{14^{14}} \equiv a_{7} \equiv 1(\bmod 2)$. Therefore $a_{14^{14}}=1$.


26. N4 (VIE) Let $p \geq 5$ be a prime number. Prove that there exists an integer $a$ with $1 \leq a \leq p-2$ such that neither $a^{p-1}-1$ nor $(a+1)^{p-1}-1$ is divisible by $p^{2}$.

Solution: 26. Let $C$ be the set of those $a \in\{1,2, \ldots, p-1\}$ for which $a^{p-1} \equiv 1\left(\bmod p^{2}\right)$. At first, we observe that $a, p-a$ do not both belong to $C$, regardless of the value of $a$. Indeed, by the binomial formula,  $$ (p-a)^{p-1}-a^{p-1} \equiv-(p-1) p a^{p-2} \not \equiv 0 \quad\left(\bmod p^{2}\right) $$  As a consequence we deduce that $|C| \leq \frac{p-1}{2}$. Further, we observe that $p-k \in C \Leftrightarrow k \equiv k(p-k)^{p-1}\left(\bmod p^{2}\right)$, i.e.,  $$ p-k \in C \Leftrightarrow k \equiv k\left(k^{p-1}-(p-1) p k^{p-2}\right) \equiv k^{p}+p\left(\bmod p^{2}\right) $$  Now assume the contrary to the claim, that for every $a=1, \ldots, p-2$ one of $a, a+1$ is in $C$. In this case it is not possible that $a, a+1$ are both in $C$, for then $p-a, p-a-1 \notin C$. Thus, since $1 \in C$, we inductively obtain that $2,4, \ldots, p-1 \notin C$ and $1,3,5, \ldots, p-2 \in C$. In particular, $p-2, p-4 \in C$, which is by $(1)$ equivalent to $2 \equiv 2^{p}+p$ and $4 \equiv 4^{p}+p\left(\bmod p^{2}\right)$. However, squaring the former equality and subtracting the latter, we obtain $2^{p+1} p \equiv p\left(\bmod p^{2}\right)$, or $4 \equiv 1(\bmod p)$, which is a contradiction unless $p=3$. This finishes the proof.


27. N5 (BUL) ${ }^{\mathrm{IMO} 6}$ Let $a>b>c>d$ be positive integers and suppose  $$ a c+b d=(b+d+a-c)(b+d-a+c) . $$  Prove that $a b+c d$ is not prime.

Solution: 27. The given equality is equivalent to $a^{2}-a c+c^{2}=b^{2}+b d+d^{2}$. Hence $(a b+c d)(a d+b c)=a c\left(b^{2}+b d+d^{2}\right)+b d\left(a^{2}-a c+c^{2}\right)$, or equivalently,  $$ (a b+c d)(a d+b c)=(a c+b d)\left(a^{2}-a c+c^{2}\right) $$  Now suppose that $a b+c d$ is prime. It follows from $a>b>c>d$ that  $$ a b+c d>a c+b d>a d+b c $$  hence $a c+b d$ is relatively prime with $a b+c d$. But then (1) implies that $a c+b d$ divides $a d+b c$, which is impossible by (2). Remark. Alternatively, (1) could be obtained by applying the law of cosines and Ptolemy's theorem on a quadrilateral $X Y Z T$ with $X Y=a$, $Y Z=c, Z T=b, T X=d$ and $\angle Y=60^{\circ}, \angle T=120^{\circ}$.


28. N6 (RUS) Is it possible to find 100 positive integers not exceeding 25,000 such that all pairwise sums of them are different?

Solution: 28. Yes. The desired result is an immediate consequence of the following fact applied on $p=101$. Lemma. For any odd prime number $p$, there exist $p$ nonnegative integers less than $2 p^{2}$ with all pairwise sums mutually distinct. Proof. We claim that the numbers $a_{n}=2 n p+\left(n^{2}\right)$ have the desired property, where $(x)$ denotes the remainder of $x$ upon division by $p$. Suppose that $a_{k}+a_{l}=a_{m}+a_{n}$. By the construction of $a_{i}$, we have $2 p(k+l) \leq a_{k}+a_{l}<2 p(k+l+1)$. Hence we must have $k+l=m+n$, and therefore also $\left(k^{2}\right)+\left(l^{2}\right)=\left(m^{2}\right)+\left(n^{2}\right)$. Thus  $$ k+l \equiv m+n \quad \text { and } \quad k^{2}+l^{2} \equiv m^{2}+n^{2} \quad(\bmod p) . $$  But then it holds that $(k-l)^{2}=2\left(k^{2}+l^{2}\right)-(k+l)^{2} \equiv(m-n)^{2}(\bmod$ $p)$, so $k-l \equiv \pm(m-n)$, which leads to $(k, l)=(m, n)$. This proves the lemma.


Solution: 3. By the arithmetic-quadratic mean inequality, it suffices to prove that  $$ \frac{x_{1}^{2}}{\left(1+x_{1}^{2}\right)^{2}}+\frac{x_{2}^{2}}{\left(1+x_{1}^{2}+x_{2}^{2}\right)^{2}}+\cdots+\frac{x_{n}^{2}}{\left(1+x_{1}^{2}+\cdots+x_{n}^{2}\right)^{2}}<1 . $$  Observe that for $k \geq 2$ the following holds:  $$ \begin{aligned} \frac{x_{k}^{2}}{\left(1+x_{1}^{2}+\cdots+x_{k}^{2}\right)^{2}} & \leq \frac{x_{k}^{2}}{\left(1+\cdots+x_{k-1}^{2}\right)\left(1+\cdots+x_{k}^{2}\right)} \\ & =\frac{1}{1+x_{1}^{2}+\cdots+x_{k-1}^{2}}-\frac{1}{1+x_{1}^{2}+\cdots+x_{k}^{2}} \end{aligned} $$  For $k=1$ we have $\frac{x_{1}^{2}}{\left(1+x_{1}\right)^{2}} \leq 1-\frac{1}{1+x_{1}^{2}}$. Summing these inequalities, we obtain  $$ \frac{x_{1}^{2}}{\left(1+x_{1}^{2}\right)^{2}}+\cdots+\frac{x_{n}^{2}}{\left(1+x_{1}^{2}+\cdots+x_{n}^{2}\right)^{2}} \leq 1-\frac{1}{1+x_{1}^{2}+\cdots+x_{n}^{2}}<1 $$  Second solution. Let $a_{n}(k)=\sup \left(\frac{x_{1}}{k^{2}+x_{1}^{2}}+\cdots+\frac{x_{n}}{k^{2}+x_{1}^{2}+\cdots+x_{n}^{2}}\right)$ and $a_{n}=$ $a_{n}(1)$. We must show that $a_{n}<\sqrt{n}$. Replacing $x_{i}$ by $k x_{i}$ shows that $a_{n}(k)=a_{n} / k$. Hence  $$ a_{n}=\sup _{x_{1}}\left(\frac{x_{1}}{1+x_{1}^{2}}+\frac{a_{n-1}}{\sqrt{1+x_{1}^{2}}}\right)=\sup _{\theta}\left(\sin \theta \cos \theta+a_{n-1} \cos \theta\right), $$  where $\tan \theta=x_{1}$. The above supremum can be computed explicitly:  $$ a_{n}=\frac{1}{8 \sqrt{2}}\left(3 a_{n-1}+\sqrt{a_{n-1}^{2}+8}\right) \sqrt{4-a_{n-1}^{2}+a_{n-1} \sqrt{a_{n-1}^{2}+8}} . $$  However, the required inequality is weaker and can be proved more easily: if $a_{n-1}<\sqrt{n-1}$, then by (1) $a_{n}<\sin \theta+\sqrt{n-1} \cos \theta=\sqrt{n} \sin (\theta+\alpha) \leq$ $\sqrt{n}$, for $\alpha \in(0, \pi / 2)$ with $\tan \alpha=\sqrt{n}$.


4. A4 (LIT) Find all functions $f: \mathbb{R} \rightarrow \mathbb{R}$ satisfying  $$ f(x y)(f(x)-f(y))=(x-y) f(x) f(y) $$  for all $x, y$.

Solution: 4. Let $(*)$ denote the given functional equation. Substituting $y=1$ we get $f(x)^{2}=x f(x) f(1)$. If $f(1)=0$, then $f(x)=0$ for all $x$, which is the trivial solution. Suppose $f(1)=C \neq 0$. Let $G=\{y \in \mathbb{R} \mid f(y) \neq 0\}$. Then  $$ f(x)=\left\{\begin{array}{cl} C x & \text { if } x \in G \\ 0 & \text { otherwise } \end{array}\right. $$  We must determine the structure of $G$ so that the function defined by (1) satisfies (*). (1) Clearly $1 \in G$, because $f(1) \neq 0$. (2) If $x \in G, y \notin G$, then by $(*)$ it holds $f(x y) f(x)=0$, so $x y \notin G$. (3) If $x, y \in G$, then $x / y \in G$ (otherwise by $2^{\circ}, y(x / y)=x \notin G$ ). (4) If $x, y \in G$, then by $2^{\circ}$ we have $x^{-1} \in G$, so $x y=y / x^{-1} \in G$.  Hence $G$ is a set that contains 1 , does not contain 0 , and is closed under multiplication and division. Conversely, it is easy to verify that every such $G$ in (1) gives a function satisfying (*).


Solution: 5. Let $a_{1}, a_{2}, \ldots, a_{n}$ satisfy the conditions of the problem. Then $a_{k}>a_{k-1}$, and hence $a_{k} \geq 2$ for $k=1, \ldots, n$. The inequality $\left(a_{k+1}-1\right) a_{k-1} \geq$ $a_{k}^{2}\left(a_{k}-1\right)$ can be rewritten as  $$ \frac{a_{k-1}}{a_{k}}+\frac{a_{k}}{a_{k+1}-1} \leq \frac{a_{k-1}}{a_{k}-1} . $$  Summing these inequalities for $k=i+1, \ldots, n-1$ and using the obvious inequality $\frac{a_{n-1}}{a_{n}}<\frac{a_{n-1}}{a_{n}-1}$, we obtain $\frac{a_{i}}{a_{i+1}}+\cdots+\frac{a_{n-1}}{a_{n}}<\frac{a_{i}}{a_{i+1}-1}$. Therefore  $$ \frac{a_{i}}{a_{i+1}} \leq \frac{99}{100}-\frac{a_{0}}{a_{1}}-\cdots-\frac{a_{i-1}}{a_{i}}<\frac{a_{i}}{a_{i+1}-1} \quad \text { for } i=1,2, \ldots, n-1 $$  Consequently, given $a_{0}, a_{1}, \ldots, a_{i}$, there is at most one possibility for $a_{i+1}$. In our case, (1) yields $a_{1}=2, a_{2}=5, a_{3}=56, a_{4}=280^{2}=78400$. These values satisfy the conditions of the problem, so that this is a unique solution.


6. A6 (KOR) ${ }^{\mathrm{IMO} 2}$ Prove that for all positive real numbers $a, b, c$,  $$ \frac{a}{\sqrt{a^{2}+8 b c}}+\frac{a}{\sqrt{b^{2}+8 c a}}+\frac{c}{\sqrt{c^{2}+8 a b}} \geq 1 $$

Solution: 6. We shall determine a constant $k>0$ such that  $$ \frac{a}{\sqrt{a^{2}+8 b c}} \geq \frac{a^{k}}{a^{k}+b^{k}+c^{k}} \quad \text { for all } a, b, c>0 $$  This inequality is equivalent to $\left(a^{k}+b^{k}+c^{k}\right)^{2} \geq a^{2 k-2}\left(a^{2}+8 b c\right)$, which further reduces to  $$ \left(a^{k}+b^{k}+c^{k}\right)^{2}-a^{2 k} \geq 8 a^{2 k-2} b c $$  On the other hand, the AM-GM inequality yields  $$ \left(a^{k}+b^{k}+c^{k}\right)^{2}-a^{2 k}=\left(b^{k}+c^{k}\right)\left(2 a^{k}+b^{k}+c^{k}\right) \geq 8 a^{k / 2} b^{3 k / 4} c^{3 k / 4} $$  and therefore $k=4 / 3$ is a good choice. Now we have  $$ \begin{aligned} & \frac{a}{\sqrt{a^{2}+8 b c}}+\frac{b}{\sqrt{b^{2}+8 c a}}+\frac{c}{\sqrt{c^{2}+8 a b}} \\ & \geq \frac{a^{4 / 3}}{a^{4 / 3}+b^{4 / 3}+c^{4 / 3}}+\frac{b^{4 / 3}}{a^{4 / 3}+b^{4 / 3}+c^{4 / 3}}+\frac{c^{4 / 3}}{a^{4 / 3}+b^{4 / 3}+c^{4 / 3}}=1 \end{aligned} $$  Second solution. The numbers $x=\frac{a}{\sqrt{a^{2}+8 b c}}, y=\frac{b}{\sqrt{b^{2}+8 c a}}$ and $z=\frac{c}{\sqrt{c^{2}+8 a b}}$ satisfy  $$ f(x, y, z)=\left(\frac{1}{x^{2}}-1\right)\left(\frac{1}{y^{2}}-1\right)\left(\frac{1}{z^{2}}-1\right)=8^{3} . $$  Our task is to prove $x+y+z \geq 1$. Since $f$ is decreasing on each of the variables $x, y, z$, this is the same as proving that $x, y, z>0, x+y+z=1$ implies $f(x, y, z) \geq 8^{3}$. However, since $\frac{1}{x^{2}}-1=\frac{(x+y+z)^{2}-x^{2}}{x^{2}}=\frac{(2 x+y+z)(y+z)}{x^{2}}$, the inequality $f(x, y, z) \geq 8^{3}$ becomes  $$ \frac{(2 x+y+z)(x+2 y+z)(x+y+2 z)(y+z)(z+x)(x+y)}{x^{2} y^{2} z^{2}} \geq 8^{3} $$  which follows immediately by the AM-GM inequality. Third solution. We shall prove a more general fact: the inequality $\frac{a}{\sqrt{a^{2}+k b c}}+\frac{b}{\sqrt{b^{2}+k c a}}+\frac{c}{\sqrt{c^{2}+k a b}} \geq \frac{3}{\sqrt{1+k}}$ is true for all $a, b, c>0$ if and only if $k \geq 8$. Firstly suppose that $k \geq 8$. Setting $x=b c / a^{2}, y=c a / b^{2}, z=a b / c^{2}$, we reduce the desired inequality to  $$ F(x, y, z)=f(x)+f(y)+f(z) \geq \frac{3}{\sqrt{1+k}}, \quad \text { where } f(t)=\frac{1}{\sqrt{1+k t}} $$  for $x, y, z>0$ such that $x y z=1$. We shall prove (2) using the method of Lagrange multipliers. The boundary of the set $D=\left\{(x, y, z) \in \mathbb{R}_{+}^{3} \mid x y z=1\right\}$ consists of points $(x, y, z)$ with one of $x, y, z$ being 0 and another one being $+\infty$. If w.l.o.g. $x=0$, then $F(x, y, z) \geq f(x)=1 \geq 3 / \sqrt{1+k}$. Suppose now that $(x, y, z)$ is a point of local minimum of $F$ on $D$. There exists $\lambda \in \mathbb{R}$ such that $(x, y, z)$ is stationary point of the function $F(x, y, z)+\lambda x y z$. Then $(x, y, z, \lambda)$ is a solution to the system $f^{\prime}(x)+\lambda y z=$ $f^{\prime}(y)+\lambda x z=f^{\prime}(z)+\lambda x y=0, x y z=1$. Eliminating $\lambda$ gives us  $$ x f^{\prime}(x)=y f^{\prime}(y)=z f^{\prime}(z), \quad x y z=1 $$  The function $t f^{\prime}(t)=\frac{-k t}{2(1+k t)^{3 / 2}}$ decreases on the interval $(0,2 / k]$ and increases on $[2 / k,+\infty)$ because $\left(t f^{\prime}(t)\right)^{\prime}=\frac{k(k t-2)}{4(1+k t)^{5 / 2}}$. It follows that two of the numbers $x, y, z$ are equal. If $x=y=z$, then $(1,1,1)$ is the only solution to (3). Suppose that $x=y \neq z$. Since $\left(y f^{\prime}(y)\right)^{2}-\left(z f^{\prime}(z)\right)^{2}=$ $\frac{k^{2}(z-y)\left(k^{3} y^{2} z^{2}-3 k y z-y-z\right)}{4(1+k y)^{3}(1+k z)^{3}},(3)$ gives us $y^{2} z=1$ and $k^{3} y^{2} z^{2}-3 k y z-y-z=$ 0 . Eliminating $z$ we obtain an equation in $y, k^{3} / y^{2}-3 k / y-y-1 / y^{2}=0$, whose only real solution is $y=k-1$. Thus $\left(k-1, k-1,1 /(k-1)^{2}\right)$ and the cyclic permutations are the only solutions to (3) with $x, y, z$ being not all equal. Since $F\left(k-1, k-1,1 /(k-1)^{2}\right)=(k+1) / \sqrt{k^{2}-k+1}>$ $F(1,1,1)=1$, the inequality (2) follows. For $0<k<8$ we have that $\frac{a}{\sqrt{a^{2}+k b c}}+\frac{b}{\sqrt{b^{2}+k c a}}+\frac{c}{\sqrt{c^{2}+k a b}}>\frac{a}{\sqrt{a^{2}+8 b c}}+$ $\frac{b}{\sqrt{b^{2}+8 c a}}+\frac{c}{\sqrt{c^{2}+8 a b}} \geq 1$. If we fix $c$ and let $a, b$ tend to 0 , the first two summands will tend to 0 while the third will tend to 1 . Hence the inequality cannot be improved.


7. $\mathbf{C 1}$ (COL) Let $A=\left(a_{1}, a_{2}, \ldots, a_{2001}\right)$ be a sequence of positive integers. Let $m$ be the number of 3 -element subsequences $\left(a_{i}, a_{j}, a_{k}\right)$ with $1 \leq i<$ $j<k \leq 2001$ such that $a_{j}=a_{i}+1$ and $a_{k}=a_{j}+1$. Considering all such sequences $A$, find the greatest value of $m$.

Solution: 7. It is evident that arranging of $A$ in increasing order does not diminish $m$. Thus we can assume that $A$ is nondecreasing. Assume w.l.o.g. that $a_{1}=1$, and let $b_{i}$ be the number of elements of $A$ that are equal to $i$ $\left(1 \leq i \leq n=a_{2001}\right)$. Then we have $b_{1}+b_{2}+\cdots+b_{n}=2001$ and  $$ m=b_{1} b_{2} b_{3}+b_{2} b_{3} b_{4}+\cdots+b_{n-2} b_{n-1} b_{n} $$  Now if $b_{i}, b_{j}(i<j)$ are two largest $b$ 's, we deduce from (1) and the AMGM inequality that $m \leq b_{i} b_{j}\left(b_{1}+\cdots+b_{i-1}+b_{i+1}+\cdots+b_{j-1}+b_{j+1}+b_{n}\right) \leq$ $\left(\frac{2001}{3}\right)^{3}=667^{3} \quad\left(b_{1} b_{2} b_{3} \leq b_{1} b_{i} b_{j}\right.$, etc.). The value $667^{3}$ is attained for $b_{1}=b_{2}=b_{3}=667$ (i.e., $a_{1}=\cdots=a_{667}=1, a_{668}=\cdots=a_{1334}=2$, $a_{1335}=\cdots=a_{2001}=3$ ). Hence the maximum of $m$ is $667^{3}$.


8. C2 (CAN) ${ }^{\mathrm{IMO} 4}$ Let $n$ be an odd integer greater than 1 and let $c_{1}, c_{2}, \ldots$, $c_{n}$ be integers. For each permutation $a=\left(a_{1}, a_{2}, \ldots, a_{n}\right)$ of $\{1,2, \ldots, n\}$, define $S(a)=\sum_{i=1}^{n} c_{i} a_{i}$. Prove that there exist permutations $a \neq b$ of $\{1,2, \ldots, n\}$ such that $n$ ! is a divisor of $S(a)-S(b)$.

Solution: 8. Suppose to the contrary that all the $S(a)$ 's are different modulo $n$ !. Then the sum of $S(a)$ 's over all permutations $a$ satisfies $\sum_{a} S(a) \equiv 0+1+\cdots+$ $(n!-1)=\frac{(n!-1) n!}{2} \equiv \frac{n!}{2}(\bmod n!)$. On the other hand, the coefficient of $c_{i}$ in $\sum_{a} S(a)$ is equal to $(n-1)!(1+2+\cdots+n)=\frac{n+1}{2} n!$ for all $i$, from which we obtain  $$ \sum_{a} S(a) \equiv \frac{n+1}{2}\left(c_{1}+\cdots+c_{n}\right) n!\equiv 0(\bmod n!) $$  for odd $n$. This is a contradiction.


9. C3 (RUS) Define a $k$-clique to be a set of $k$ people such that every pair of them are acquainted with each other. At a certain party, every pair of 3 -cliques has at least one person in common, and there are no 5 -cliques. Prove that there are two or fewer people at the party whose departure leaves no 3-clique remaining.

Solution: 9. Consider one such party. The result is trivially true if there is only one 3 -clique, so suppose there exist at least two 3 -cliques $C_{1}$ and $C_{2}$. We distinguish two cases: (i) $C_{1}=\{a, b, c\}$ and $C_{2}=\{a, d, e\}$ for some distinct people $a, b, c, d, e$. If the departure of $a$ destroys all 3-cliques, then we are done. Otherwise, there is a third 3 -clique $C_{3}$, which has a person in common with each of $C_{1}, C_{2}$ and does not include $a$ : say, $C_{3}=\{b, d, f\}$ for some $f$. We thus obtain another 3 -clique $C_{4}=\{a, b, d\}$, which has two persons in common with $C_{3}$, and the case (ii) is applied. (ii) $C_{1}=\{a, b, c\}$ and $C_{2}=\{a, b, d\}$ for distinct people $a, b, c, d$. If the departure of $a, b$ leaves no 3-clique, then we are done. Otherwise, for some $e$ there is a clique $\{c, d, e\}$. We claim that then the departure of $c, d$ breaks all 3 -cliques. Suppose the opposite, that a 3 -clique $C$ remains. Since $C$ shares a person with each of the 3 -cliques $\{c, d, a\},\{c, d, b\},\{c, d, e\}$, it must be $C=\{a, b, e\}$. However, then $\{a, b, c, d, e\}$ is a 5 -clique, which is assumed to be impossible.


1. N1 (UZB) What is the smallest positive integer $t$ such that there exist integers $x_{1}, x_{2}, \ldots, x_{t}$ with  $$ x_{1}^{3}+x_{2}^{3}+\cdots+x_{t}^{3}=2002^{2002} ? $$

Solution: 1. Consider the given equation modulo 9 . Since each cube is congruent to either $-1,0$ or 1 , whereas $2002^{2002} \equiv 4^{2002}=4 \cdot 64^{667} \equiv 4(\bmod 9)$, we conclude that $t \geq 4$. On the other hand, $2002^{2002}=2002 \cdot\left(2002^{667}\right)^{3}=\left(10^{3}+10^{3}+1^{3}+\right.$ $\left.1^{3}\right)\left(2002^{667}\right)^{3}$ is a solution with $t=4$. Hence the answer is 4.


10. G4 (RUS) Circles $S_{1}$ and $S_{2}$ intersect at points $P$ and $Q$. Distinct points $A_{1}$ and $B_{1}$ (not at $P$ or $Q$ ) are selected on $S_{1}$. The lines $A_{1} P$ and $B_{1} P$ meet $S_{2}$ again at $A_{2}$ and $B_{2}$ respectively, and the lines $A_{1} B_{1}$ and $A_{2} B_{2}$ meet at $C$. Prove that as $A_{1}$ and $B_{1}$ vary, the circumcenters of triangles $A_{1} A_{2} C$ all lie on one fixed circle.

Solution: 10. Let $O$ be the circumcenter of $A_{1} A_{2} C$, and $O_{1}, O_{2}$ the centers of $S_{1}, S_{2}$ respectively. First, from $\angle A_{1} Q A_{2}=180^{\circ}-\angle P A_{1} Q-\angle Q A_{2} P=\frac{1}{2}\left(360^{\circ}-\angle P O_{1} Q-\right.$ $\left.\angle Q O_{2} P\right)=\angle O_{1} Q O_{2}$ we obtain $\angle A_{1} Q A_{2}=\angle B_{1} Q B_{2}=\angle O_{1} Q O_{2}$. Therefore $\angle A_{1} Q A_{2}=\angle B_{1} Q P+$ $\angle P Q B_{2}=\angle C A_{1} P+\angle C A_{2} P=$ $180^{\circ}-\angle A_{1} C A_{2}$, from which we conclude that $Q$ lies on the circumcircle of $\triangle A_{1} A_{2} C$. Hence $O A_{1}=$ $O Q$. However, we also have $O_{1} A_{2}=$ $O_{1} Q$. Consequently, $O, O_{1}$ both lie on the perpendicular bisector of $A_{1} Q$, so $O O_{1} \perp A_{1} Q$. Similarly, $O O_{2} \perp A_{2} Q$, leading to $\angle O_{2} O O_{1}=$ ![](https://cdn.mathpix.com/cropped/2024_11_18_8e985d6b9c83aa3e9d0eg-701.jpg?height=412&width=518&top_left_y=598&top_left_x=825) $180^{\circ}-\angle A_{1} Q A_{2}=180^{\circ}-\angle O_{1} Q O_{2}$. Hence, $O$ lies on the circle through $O_{1}, O_{2}, Q$, which is fixed.


11. G5 (AUS) For any set $S$ of five points in the plane, no three of which are collinear, let $M(S)$ and $m(S)$ denote the greatest and smallest areas, respectively, of triangles determined by three points from $S$. What is the minimum possible value of $M(S) / m(S)$ ?

Solution: 11. When $S$ is the set of vertices of a regular pentagon, then it is easily verified that $\frac{M(S)}{m(S)}=\frac{1+\sqrt{5}}{2}=\alpha$. We claim that this is the best possible. Let $A, B, C, D, E$ be five arbitrary points, and assume that $\triangle A B C$ has the area $M(S)$. We claim that some triangle has area less than or equal to $M(S) / \alpha$. Construct a larger triangle $A^{\prime} B^{\prime} C^{\prime}$ with $C \in A^{\prime} B^{\prime}\left\|A B, A \in B^{\prime} C^{\prime}\right\| B C$, $B \in C^{\prime} A^{\prime} \| C A$. The point $D$, as well as $E$, must lie on the same side of $B^{\prime} C^{\prime}$ as $B C$, for otherwise $\triangle D B C$ would have greater area than $\triangle A B C$. A similar result holds for the other edges, and therefore $D, E$ lie inside the triangle $A^{\prime} B^{\prime} C^{\prime}$ or on its boundary. Moreover, at least one of the triangles $A^{\prime} B C, A B^{\prime} C, A B C^{\prime}$, say $A B C^{\prime}$, contains neither $D$ nor $E$. Hence we can assume that $D, E$ are contained inside the quadrilateral $A^{\prime} B^{\prime} A B$. An affine linear transformation does not change the ratios between areas. Thus if we apply such an affine transformation mapping $A, B, C$ into the vertices $A B M C N$ of a regular pentagon, we won't change $M(S) / m(S)$. If now $D$ or $E$ lies inside $A B M C N$, then we are done. Suppose that both $D$ and $E$ are inside the triangles $C M A^{\prime}, C N B^{\prime}$. Then $C D, C E \leq C M$ (because $C M=C N=C A^{\prime}=C B^{\prime}$ ) and $\angle D C E$ is either less than or equal to $36^{\circ}$ or greater than or equal to $108^{\circ}$, from which we obtain that the area of $\triangle C D E$ cannot exceed the area of $\triangle C M N=M(S) / \alpha$. This completes the proof.


12. G6 (UKR) ${ }^{\mathrm{IMO} 6}$ Let $n \geq 3$ be a positive integer. Let $C_{1}, C_{2}, C_{3}, \ldots, C_{n}$ be unit circles in the plane, with centers $O_{1}, O_{2}, O_{3}, \ldots, O_{n}$ respectively. If no line meets more than two of the circles, prove that  $$ \sum_{1 \leq i<j \leq n} \frac{1}{O_{i} O_{j}} \leq \frac{(n-1) \pi}{4} $$

Solution: 12. Let $l(M N)$ denote the length of the shorter $\operatorname{arc} M N$ of a given circle.  Lemma. Let $P R, Q S$ be two chords of a circle $k$ of radius $r$ that meet each other at a point $X$, and let $\angle P X Q=\angle R X S=2 \alpha$. Then $l(P Q)+$ $l(R S)=4 \alpha r$. Proof. Let $O$ be the center of the circle. Then $l(P Q)+l(R S)=\angle P O Q$. $r+\angle R O S \cdot r=2(\angle Q S P+\angle R P S) r=2 \angle Q X P \cdot r=4 \alpha r$. Consider a circle $k$, sufficiently large, whose interior contains all the given circles. For any two circles $C_{i}, C_{j}$, let their exterior common tangents $P R, Q S(P, Q, R, S \in k)$ form an angle $2 \alpha$. Then $O_{i} O_{j}=\frac{2}{\sin \alpha}$, so $\alpha>$ $\sin \alpha=\frac{2}{O_{i} O_{j}}$. By the lemma we have $l(P Q)+l(R S)=4 \alpha r \geq \frac{8 r}{O_{i} O_{j}}$, and hence  $$ \frac{1}{O_{i} O_{j}} \leq \frac{l(P Q)+l(R S)}{8 r} $$  Now sum all these inequalities for $i<j$. The result will follow if we show that every point of the circle $k$ belongs to at most $n-1$ arcs such as $P Q, R S$. Indeed, that will imply that the sum of all the arcs is at most $2(n-1) \pi r$, hence from (1) we conclude that $\sum \frac{1}{O_{i} O_{j}} \leq \frac{(n-1) \pi}{4}$. Consider an arbitrary point $T$ of $k$. We prove by induction (the basis $n=1$ is trivial) that the number of pairs of circles that are simultaneously intercepted by a ray from $T$ is at most $n-1$. Let $T u$ be a ray touching $k$ at $T$. If we let this ray rotate around $T$, it will at some moment intercept a pair of circles for the first time, say $C_{1}, C_{2}$. At some further moment the interception with one of these circles, say $C_{1}$, is lost and never established again. Thus the pair $\left(C_{1}, C_{2}\right)$ is the only pair containing $C_{1}$ that is intercepted by some ray from $T$. On the other hand, by the inductive hypothesis the number of such pairs not containing $C_{1}$ does not exceed $n-2$, justifying our claim.


13. G7 (BUL) The incircle $\Omega$ of the acute-angled triangle $A B C$ is tangent to $B C$ at $K$. Let $A D$ be an altitude of triangle $A B C$ and let $M$ be the midpoint of $A D$. If $N$ is the other common point of $\Omega$ and $K M$, prove that $\Omega$ and the circumcircle of triangle $B C N$ are tangent at $N$.

Solution: 13. Let $k$ be the circle through $B, C$ that is tangent to the circle $\Omega$ at point $N^{\prime}$. We must prove that $K, M, N^{\prime}$ are collinear. Since the statement is trivial for $A B=A C$, we may assume that $A C>A B$. As usual, $R, r, \alpha, \beta, \gamma$ denote the circumradius and the inradius and the angles of $\triangle A B C$, respectively. We have $\tan \angle B K M=D M / D K$. Straightforward calculation gives $D M=\frac{1}{2} A D=R \sin \beta \sin \gamma$ and $D K=\frac{D C-D B}{2}-\frac{K C-K B}{2}=R \sin (\beta-$ $\gamma)-R(\sin \beta-\sin \gamma)=4 R \sin \frac{\beta-\gamma}{2} \sin \frac{\beta}{2} \sin \frac{\gamma}{2}$, so we obtain  $$ \tan \angle B K M=\frac{\sin \beta \sin \gamma}{4 \sin \frac{\beta-\gamma}{2} \sin \frac{\beta}{2} \sin \frac{\gamma}{2}}=\frac{\cos \frac{\beta}{2} \cos \frac{\gamma}{2}}{\sin \frac{\beta-\gamma}{2}} $$  To calculate the angle $B K N^{\prime}$, we apply the inversion $\psi$ with center at $K$ and power $B K \cdot C K$. For each object $X$, we denote by $\widehat{X}$ its image under $\psi$. The incircle $\Omega$ maps to a ![](https://cdn.mathpix.com/cropped/2024_11_18_8e985d6b9c83aa3e9d0eg-702.jpg?height=215&width=545&top_left_y=1844&top_left_x=807) line $\widehat{\Omega}$ parallel to $\widehat{B} \widehat{C}$, at distance $\frac{B K \cdot C K}{2 r}$ from $\widehat{B} \widehat{C}$. Thus the point $\widehat{N^{\prime}}$ is the projection of the midpoint $\widehat{U}$ of $\widehat{B} \widehat{C}$ onto $\widehat{\Omega}$. Hence  $$ \tan \angle B K N^{\prime}=\tan \angle \widehat{B} K \widehat{N^{\prime}}=\frac{\widehat{U} \widehat{N^{\prime}}}{\widehat{U} K}=\frac{B K \cdot C K}{r(C K-B K)} . $$  Again, one easily checks that $K B \cdot K C=b c \sin ^{2} \frac{\alpha}{2}$ and $r=4 R \sin \frac{\alpha}{2}$. $\sin \frac{\beta}{2} \cdot \sin \frac{\gamma}{2}$, which implies  $$ \begin{aligned} \tan \angle B K N^{\prime} & =\frac{b c \sin ^{2} \frac{\alpha}{2}}{r(b-c)} \\ & =\frac{4 R^{2} \sin \beta \sin \gamma \sin ^{2} \frac{\alpha}{2}}{4 R \sin \frac{\alpha}{2} \sin \frac{\beta}{2} \sin \frac{\gamma}{2} \cdot 2 R(\sin \beta-\sin \gamma)}=\frac{\cos \frac{\beta}{2} \cos \frac{\gamma}{2}}{\sin \frac{\beta-\gamma}{2}} . \end{aligned} $$  Hence $\angle B K M=\angle B K N^{\prime}$, which implies that $K, M, N^{\prime}$ are indeed collinear; thus $N^{\prime} \equiv N$.


14. G8 (ARM) Let $S_{1}$ and $S_{2}$ be circles meeting at the points $A$ and $B$. A line through $A$ meets $S_{1}$ at $C$ and $S_{2}$ at $D$. Points $M, N, K$ lie on the line segments $C D, B C, B D$ respectively, with $M N$ parallel to $B D$ and $M K$ parallel to $B C$. Let $E$ and $F$ be points on those $\operatorname{arcs} B C$ of $S_{1}$ and $B D$ of $S_{2}$ respectively that do not contain $A$. Given that $E N$ is perpendicular to $B C$ and $F K$ is perpendicular to $B D$, prove that $\measuredangle E M F=90^{\circ}$.

Solution: 14. Let $G$ be the other point of intersection of the line $F K$ with the arc $B A D$. Since $B N / N C=D K / K B$ and $\angle C E B=\angle B G D$ the triangles $C E B$ and $B G D$ are similar. Thus $B N / N E=D K / K G=F K / K B$. From $B N=M K$ and $B K=$ $M N$ it follows that $M N / N E=$ $F K / K M$. But we also have that $\angle M N E=90^{\circ}+\angle M N B=90^{\circ}+$ ![](https://cdn.mathpix.com/cropped/2024_11_18_8e985d6b9c83aa3e9d0eg-703.jpg?height=327&width=539&top_left_y=1011&top_left_x=817) $\angle M K B=\angle F K M$, and hence $\triangle M N E \sim \triangle F K M$. Now $\angle E M F=\angle N M K-\angle N M E-\angle K M F=\angle N M K-\angle N M E-$ $\angle N E M=\angle N M K-90^{\circ}+\angle B N M=90^{\circ}$ as claimed.