15. G3 (RUS) A circle $\omega$ is tangent to two parallel lines $l_{1}$ and $l_{2}$. A second circle $\omega_{1}$ is tangent to $l_{1}$ at $A$ and to $\omega$ externally at $C$. A third circle $\omega_{2}$ is tangent to $l_{2}$ at $B$, to $\omega$ externally at $D$, and to $\omega_{1}$ externally at $E$. $A D$ intersects $B C$ at $Q$. Prove that $Q$ is the circumcenter of triangle $C D E$.

Solution: 15. We shall prove that $A D$ is a common tangent of $\omega$ and $\omega_{2}$. Denote by $K, L$ the points of tangency of $\omega$ with $l_{1}$ and $l_{2}$ respectively. Let $r, r_{1}, r_{2}$ be the radii of $\omega, \omega_{1}, \omega_{2}$ respectively, and set $K A=x, L B=y$. It will be enough if we show that $x y=2 r^{2}$, since this will imply that $\triangle K L B$ and $\triangle A K O$ are similar, where $O$ is the center of $\omega$, and consequently that $O A \perp K D$ (because $D \in K B$ ). Now if $O_{1}$ is the center of $\omega_{1}$, we have $x^{2}=$ $K A^{2}=O O_{1}^{2}-\left(K O-A O_{1}\right)^{2}=\left(r+r_{1}\right)^{2}-\left(r-r_{1}\right)^{2}=4 r r_{1}$ and analogously $y^{2}=4 r r_{2}$. But we also have $\left(r_{1}+r_{2}\right)^{2}=O_{1} O_{2}^{2}=(x-y)^{2}+\left(2 r-r_{1}-r_{2}\right)^{2}$, so $x^{2}-2 x y+y^{2}=4 r\left(r_{1}+r_{2}-r\right)$, from which we obtain $x y=2 r^{2}$ as claimed. Hence $A D$ is tangent to both $\omega, \omega_{2}$, and similarly $B C$ is tangent to $\omega, \omega_{1}$. It follows that $Q$ lies on the radical axes of pairs of circles $\left(\omega, \omega_{1}\right)$ and $\left(\omega, \omega_{2}\right)$. Therefore $Q$ also lies on the radical axis of $\left(\omega_{1}, \omega_{2}\right)$, i.e., on the common tangent at $E$ of $\omega_{1}$ and $\omega_{2}$. Hence $Q C=Q D=Q E$. Second solution. An inversion with center at $D$ maps $\omega$ and $\omega_{2}$ to parallel lines, $\omega_{1}$ and $l_{2}$ to disjoint equal circles touching $\omega, \omega_{2}$, and $l_{1}$ to a circle externally tangent to $\omega_{1}, l_{2}$, and to $\omega$. It is easy to see that the obtained picture is symmetric (with respect to a diameter of $l_{1}$ ), and that line $A D$ is parallel to the lines $\omega$ and $\omega_{2}$. Going back to the initial picture, this means that $A D$ is a common tangent of $\omega$ and $\omega_{2}$. The end is like that in the first solution.


[^6]16. G4 (AUS-ARM) ${ }^{\mathrm{IMO} 2} N$ is an arbitrary point on the bisector of $\angle B A C$. $P$ and $O$ are points on the lines $A B$ and $A N$, respectively, such that $\measuredangle A N P=90^{\circ}=\measuredangle A P O . Q$ is an arbitrary point on $N P$, and an arbitrary line through $Q$ meets the lines $A B$ and $A C$ at $E$ and $F$ respectively. Prove that $\measuredangle O Q E=90^{\circ}$ if and only if $Q E=Q F$.

Solution: 16. First, assume that $\angle O Q E=90^{\circ}$. Extend $P N$ to meet $A C$ at $R$. Then $O E P Q$ and $O R F Q$ are cyclic quadrilaterals; hence we have $\angle O E Q=$ $\angle O P Q=\angle O R Q=\angle O F Q$. It follows that $\triangle O E Q \cong \triangle O F Q$ and $Q E=Q F$. Now suppose $Q E=Q F$. Let $S$ be the point symmetric to $A$ with respect to $Q$, so that the quadrilateral $A E S F$ is a parallelogram. Draw the line $E^{\prime} F^{\prime}$ through $Q$ so that $\angle O Q E^{\prime}=90^{\circ}$ and $E^{\prime} \in A B$, $F^{\prime} \in A C$. By the first part $Q E^{\prime}=$ ![](https://cdn.mathpix.com/cropped/2024_11_18_8e985d6b9c83aa3e9d0eg-595.jpg?height=344&width=448&top_left_y=379&top_left_x=851) $Q F^{\prime}$; hence $A E^{\prime} S F^{\prime}$ is also a parallelogram. It follows that $E \equiv E^{\prime}, F \equiv F^{\prime}$, and $\angle O Q E=90^{\circ}$.


17. G5 (CYP) A line $l$ does not meet a circle $\omega$ with center $O . E$ is the point on $l$ such that $O E$ is perpendicular to $l . M$ is any point on $l$ other than $E$. The tangents from $M$ to $\omega$ touch it at $A$ and $B . C$ is the point on $M A$ such that $E C$ is perpendicular to $M A . D$ is the point on $M B$ such that $E D$ is perpendicular to $M B$. The line $C D$ cuts $O E$ at $F$. Prove that the location of $F$ is independent of that of $M$.

Solution: 17. We first prove that $A B$ cuts $O E$ in a fixed point $H$. Note that $\angle O A H=$ $\angle O M A=\angle O E A$ (because $O, A, E, M$ lie on a circle); hence $\triangle O A H \sim$ $\triangle O E A$. This implies $O H \cdot O E=O A^{2}$, i.e., $H$ is fixed. Let the lines $A B$ and $C D$ meet at $K$. Since $E A O B M$ and $E C D M$ are cyclic, we have $\angle E A K=$ $\angle E M B=\angle E C K$, so $E C A K$ is cyclic. Therefore $\angle E K A=90^{\circ}$, hence $E K B D$ is also cyclic and $E K \| O M$. Then $\angle E K F=$ $\angle E B D=\angle E O M=\angle O E K$, from which we deduce that $K F=F E$. However, since $\angle E K H=90^{\circ}$, the ![](https://cdn.mathpix.com/cropped/2024_11_18_8e985d6b9c83aa3e9d0eg-595.jpg?height=410&width=451&top_left_y=947&top_left_x=854) point $F$ is the midpoint of $E H$; hence it is fixed.


18. N1 (BUL) $M$ is a subset of $\{1,2,3, \ldots, 15\}$ such that the product of any three distinct elements of $M$ is not a square. Determine the maximum number of elements in $M$.

Solution: 18. Since for each of the subsets $\{1,4,9\},\{2,6,12\},\{3,5,15\}$ and $\{7,8,14\}$ the product of its elements is a square and these subsets are disjoint, we have $|M| \leq 11$. Suppose that $|M|=11$. Then $10 \in M$ and none of the disjoint subsets $\{1,4,9\},\{2,5\},\{6,15\},\{7,8,14\}$ is a subset of $M$. Consequently $\{3,12\} \subset M$, so none of $\{1\},\{4\},\{9\},\{2,6\},\{5,15\}$, and $\{7,8,14\}$ is a subset of $M$ : thus $|M| \leq 9$, a contradiction. It follows that $|M| \leq 10$, and this number is attained in the case $M=\{1,4,5,6,7,10,11,12,13,14\}$.


19. N2 (AUS) ${ }^{\mathrm{IMO} 4}$ Determine all pairs $(m, n)$ of positive integers such that $\frac{n^{3}+1}{m n-1}$ is an integer.

Solution: 19. Since $m n-1$ and $m^{3}$ are relatively prime, $m n-1$ divides $n^{3}+1$ if and only if it divides $m^{3}\left(n^{3}+1\right)=\left(m^{3} n^{3}-1\right)+m^{3}+1$. Thus  $$ \frac{n^{3}+1}{m n-1} \in \mathbb{Z} \Leftrightarrow \frac{m^{3}+1}{m n-1} \in \mathbb{Z} $$  hence we may assume that $m \geq n$. If $m=n$, then $\frac{n^{3}+1}{n^{2}-1}=n+\frac{1}{n-1}$ is an integer, so $m=n=2$. If $n=1$, then $\frac{2}{m-1} \in \mathbb{Z}$, which happens only when $m=2$ or $m=3$. Now suppose $m>n \geq 2$. Since $m^{3}+1 \equiv 1$ and $m n-1 \equiv-1(\bmod n)$, we deduce $\frac{n^{3}+1}{m n-1}=k n-1$ for some integer $k>0$. On the other hand, $k n-1<\frac{n^{3}+1}{n^{2}-1}=n+\frac{1}{n-1} \leq 2 n-1$ gives that $k=1$, and therefore $n^{3}+1=(m n-1)(n-1)$. This yields $m=\frac{n^{2}+1}{n-1}=n+1+\frac{2}{n-1} \in \mathbb{N}$, so $n \in\{2,3\}$ and $m=5$. The solutions with $m<n$ are obtained by symmetry. There are 9 solutions in total: $(1,2),(1,3),(2,1),(3,1),(2,2),(2,5),(3,5)$, $(5,2),(5,3)$.


2. A2 (FRA) ${ }^{\mathrm{IMO} 1}$ Let $m$ and $n$ be positive integers. The set $A=\left\{a_{1}, a_{2}, \ldots\right.$, $\left.a_{m}\right\}$ is a subset of $\{1,2, \ldots, n\}$. Whenever $a_{i}+a_{j} \leq n, 1 \leq i \leq j \leq m$, $a_{i}+a_{j}$ also belongs to $A$. Prove that  $$ \frac{a_{1}+a_{2}+\cdots+a_{m}}{m} \geq \frac{n+1}{2} . $$

Solution: 2. We may assume that $a_{1}>a_{2}>\cdots>a_{m}$. We claim that for $i=1, \ldots, m$, $a_{i}+a_{m+1-i} \geq n+1$. Indeed, otherwise $a_{i}+a_{m+1-i}, \ldots, a_{i}+a_{m-1}, a_{i}+a_{m}$ are $i$ different elements of $A$ greater than $a_{i}$, which is impossible. Now by adding for $i=1, \ldots, m$ we obtain $2\left(a_{1}+\cdots+a_{m}\right) \geq m(n+1)$, and the result follows.


20. N3 (FIN) ${ }^{\text {IMO6 }}$ Find a set $A$ of positive integers such that for any infinite set $P$ of prime numbers, there exist positive integers $m \in A$ and $n \notin A$, both the product of the same number of distinct elements of $P$.

Solution: 20. Let $A$ be the set of all numbers of the form $p_{1} p_{2} \ldots p_{p_{1}}$, where $p_{1}<p_{2}<$ $\cdots<p_{p_{1}}$ are primes. In other words, $A=\{2 \cdot 3,2 \cdot 5, \ldots\} \cup\{3 \cdot 5 \cdot 7,3 \cdot 5 \cdot$ $11, \ldots\} \cup\{5 \cdot 7 \cdot 11 \cdot 13 \cdot 17, \ldots\} \cup \cdots$. This set satisfies the requirements of the problem. Indeed, for any infinite set of primes $P=\left\{q_{1}, q_{2}, \ldots\right\}$ (where $q_{1}<q_{2}<\cdots$ ) we have  $$ m=q_{1} q_{2} \cdots q_{q_{1}} \in A \quad \text { and } \quad n=q_{2} q_{3} \cdots q_{q_{1}+1} \notin A $$


21. N4 (FRA) For any positive integer $x_{0}$, three sequences $\left\{x_{n}\right\},\left\{y_{n}\right\}$, and $\left\{z_{n}\right\}$ are defined as follows: (i) $y_{0}=4$ and $z_{0}=1$; (ii) if $x_{n}$ is even for $n \geq 0, x_{n+1}=\frac{x_{n}}{2}, y_{n+1}=2 y_{n}$, and $z_{n+1}=z_{n}$; (iii) if $x_{n}$ is odd for $n \geq 0, x_{n+1}=x_{n}-\frac{y_{n}}{2}-z_{n}, y_{n+1}=y_{n}$, and $z_{n+1}=$ $y_{n}+z_{n}$. The integer $x_{0}$ is said to be good if $x_{n}=0$ for some $n \geq 1$. Find the number of good integers less than or equal to 1994.

Solution: 21. Note first that $y_{n}=2^{k}(k \geq 2)$ and $z_{k} \equiv 1(\bmod 4)$ for all $n$, so if $x_{n}$ is odd, $x_{n+1}$ will be even. Further, it is shown by induction on $n$ that $y_{n}>z_{n}$ when $x_{n-1}$ is even and $2 y_{n}>z_{n}>y_{n}$ when $x_{n-1}$ is odd. In fact, $n=1$ is the trivial case, while if it holds for $n \geq 1$, then $y_{n+1}=2 y_{n}>z_{n}=z_{n+1}$ if $x_{n}$ is even, and $2 y_{n+1}=2 y_{n}>y_{n}+z_{n}=z_{n+1}$ if $x_{n}$ is odd (since then $x_{n-1}$ is even). If $x_{1}=0$, then $x_{0}=3$ is good. Suppose $x_{n}=0$ for some $n \geq 2$. Then $x_{n-1}$ is odd and $x_{n-2}$ is even, so that $y_{n-1}>z_{n-1}$. We claim that a pair $\left(y_{n-1}, z_{n-1}\right)$, where $2^{k}=y_{n-1}>z_{n-1}>0$ and $z_{n-1} \equiv 1$ $(\bmod 4)$, uniquely determines $x_{0}=f\left(y_{n-1}, z_{n-1}\right)$. We see that $x_{n-1}=$ $\frac{1}{2} y_{n-1}+z_{n-1}$, and define $\left(x_{k}, y_{k}, z_{k}\right)$ backwards as follows, until we get $\left(y_{k}, z_{k}\right)=(4,1)$. If $y_{k}>z_{k}$, then $x_{k-1}$ must have been even, so we define $\left(x_{k-1}, y_{k-1}, z_{k-1}\right)=\left(2 x_{k}, y_{k} / 2, z_{k}\right)$; otherwise $x_{k-1}$ must have been odd, so we put $\left(x_{k-1}, y_{k-1}, z_{k-1}\right)=\left(x_{k}-y_{k} / 2+z_{k}, y_{k}, z_{k}-y_{k}\right)$. We eventually arrive at $\left(y_{0}, z_{0}\right)=(4,1)$ and a good integer $x_{0}=f\left(y_{n-1}, z_{n-1}\right)$, as claimed. Thus for example $\left(y_{n-1}, z_{n-1}\right)=(64,61)$ implies $x_{n-1}=93$, $\left(x_{n-2}, y_{n-2}, z_{n-2}\right)=(186,32,61)$ etc., and $x_{0}=1953$, while in the case of $\left(y_{n-1}, z_{n-1}\right)=(128,1)$ we get $x_{0}=2080$. Note that $y^{\prime}>y \Rightarrow f\left(y^{\prime}, z^{\prime}\right)>f(y, z)$ and $z^{\prime}>z \Rightarrow f\left(y, z^{\prime}\right)>f(y, z)$. Therefore there are no $y, z$ for which $1953<f(y, z)<2080$. Hence all good integers less than or equal to 1994 are given as $f(y, z), y=2^{k} \leq 64$ and $0<z \equiv 1(\bmod 4)$, and the number of $\operatorname{such}(y, z)$ equals $1+2+4+8+16=$ 31. So the answer is 31 .


22. N5 (ROM) ${ }^{\mathrm{IMO} 3}$ For any positive integer $k, A_{k}$ is the subset of $\{k+1, k+$ $2, \ldots, 2 k\}$ consisting of all elements whose digits in base 2 contain exactly three 1's. Let $f(k)$ denote the number of elements in $A_{k}$. (a) Prove that for any positive integer $m, f(k)=m$ has at least one solution. (b) Determine all positive integers $m$ for which $f(k)=m$ has a unique solution.

Solution: 22. (a) Denote by $b(n)$ the number of 1's in the binary representation of $n$. Since $b(2 k+2)=b(k+1)$ and $b(2 k+1)=b(k)+1$, we deduce that  $$ f(k+1)= \begin{cases}f(k)+1, & \text { if } b(k)=2 \\ f(k), & \text { otherwise }\end{cases} $$  The set of $k$ 's with $b(k)=2$ is infinite, so it follows that $f(k)$ is unbounded. Hence $f$ takes all natural values. (b) Since $f$ is increasing, $k$ is a unique solution of $f(k)=m$ if and only if $f(k-1)<f(k)<f(k+1)$. By (1), this inequality is equivalent to $b(k-1)=b(k)=2$. It is easy to see that then $k-1$ must be of the form $2^{t}+1$ for some $t$. In this case, $\{k+1, \ldots, 2 k\}$ contains the number $2^{t+1}+3=10 \ldots 011_{2}$ and $\frac{t(t-1)}{2}$ binary $(t+1)$-digit numbers with three 1 's, so $m=f(k)=\frac{t(t-1)}{2}+1$.


23. N6 (LAT) Let $x_{1}$ and $x_{2}$ be relatively prime positive integers. For $n \geq 2$, define $x_{n+1}=x_{n} x_{n-1}+1$. (a) Prove that for every $i>1$, there exists $j>i$ such that $x_{i}^{i}$ divides $x_{j}^{j}$. (b) Is it true that $x_{1}$ must divide $x_{j}^{j}$ for some $j>1$ ?

Solution: 23. (a) Let $p$ be a prime divisor of $x_{i}, i>1$, and let $x_{j} \equiv u_{j}(\bmod p)$ where $0 \leq u_{j} \leq p-1$ (particularly $u_{i} \equiv 0$ ). Then $u_{j+1} \equiv u_{j} u_{j-1}+$ $1(\bmod p)$. The number of possible pairs $\left(u_{j}, u_{j+1}\right)$ is finite, so $u_{j}$ is eventually periodic. We claim that for some $d_{p}>0, u_{i+d_{p}}=0$. Indeed, suppose the contrary and let $\left(u_{m}, u_{m+1}, \ldots, u_{m+d-1}\right)$ be the first period for $m \geq i$. Then $m \neq i$. By the assumption $u_{m-1} \not \equiv$ $u_{m+d-1}$, but $u_{m-1} u_{m} \equiv u_{m+1}-1 \equiv u_{m+d+1}-1 \equiv u_{m+d-1} u_{m+d} \equiv$ $u_{m+d-1} u_{m}(\bmod p)$, which is impossible if $p \nmid u_{m}$. Hence there is a $d_{p}$ with $u_{i}=u_{i+d_{p}}=0$ and moreover $u_{i+1}=u_{i+d_{p}+1}=1$, so the sequence $u_{j}$ is periodic with period $d_{p}$ starting from $u_{i}$. Let $m$ be the least common multiple of all $d_{p}$ 's, where $p$ goes through all prime divisors of $x_{i}$. Then the same primes divide every $x_{i+k m}, k=1,2, \ldots$, so for large enough $k$ and $j=i+k m, x_{i}^{i} \mid x_{j}^{j}$. (b) If $i=1$, we cannot deduce that $x_{i+1} \equiv 1(\bmod p)$. The following example shows that the statement from (a) need not be true in this case. Take $x_{1}=22$ and $x_{2}=9$. Then $x_{n}$ is even if and only if $n \equiv 1(\bmod$ 3 ), but modulo 11 the sequence $\left\{x_{n}\right\}$ is $0,9,1,10,0,1,1,2,3,7,0, \ldots$, so $11 \mid x_{n}(n>1)$ if and only if $n \equiv 5(\bmod 6)$. Thus for no $n>1$ can we have $22 \mid x_{n}$.


24. N7 (GBR) A wobbly number is a positive integer whose digits in base 10 are alternately nonzero and zero, the units digit being nonzero. Determine all positive integers that do not divide any wobbly number.

Solution: 24. A multiple of 10 does not divide any wobbly number. Also, if $25 \mid n$, then every multiple of $n$ ends with $25,50,75$, or 00 ; hence it is not wobbly. We now show that every other number $n$ divides some wobbly number. (i) Let $n$ be odd and not divisible by 5 . For any $k \geq 1$ there exists $l$ such that $\left(10^{k}-1\right) n$ divides $10^{l}-1$, and thus also divides $10^{k l}-1$. Consequently, $v_{k}=\frac{10^{k l}-1}{10^{k}-1}$ is divisible by $n$, and it is wobbly when $k=2$ (indeed, $v_{2}=101 \ldots 01$ ). If $n$ is divisible by 5 , one can simply take $5 v_{2}$ instead. (ii) Let $n$ be a power of 2 . We prove by induction on $m$ that $2^{2 m+1}$ has a wobbly multiple $w_{m}$ with exactly $m$ nonzero digits. For $m=1$, take $w_{1}=8$. Suppose that for some $m \geq 1$ there is a wobbly $w_{m}=$ $2^{2 m+1} d_{m}$. Then the numbers $a \cdot 10^{2 m}+w_{m}$ are wobbly and divisible by $2^{2 m+1}$ when $a \in\{2,4,6,8\}$. Moreover, one of these numbers is divisible by $2^{2 m+3}$. Indeed, it suffices to choose $a$ such that $\frac{a}{2}+d_{m}$ is divisible by 4 . This proves the induction step. (iii) Let $n=2^{m} r$, where $m \geq 1$ and $r$ is odd, $5 \nmid r$. Then $v_{2 m} w_{m}$ is wobbly and divisible by both $2^{m}$ and $r$ (using notation from (i), $r \mid v_{2 m}$ ).


3. A3 (GBR) ${ }^{\mathrm{IMO} 5}$ Let $S$ be the set of real numbers greater than -1 . Find all functions $f: S \rightarrow S$ such that  $$ f(x+f(y)+x f(y))=y+f(x)+y f(x) \quad \text { for all } x \text { and } y \text { in } S, $$  and $f(x) / x$ is strictly increasing for $-1<x<0$ and for $0<x$.

Solution: 3. The last condition implies that $f(x)=x$ has at most one solution in $(-1,0)$ and at most one solution in $(0, \infty)$. Suppose that for $u \in(-1,0)$, $f(u)=u$. Then putting $x=y=u$ in the given functional equation yields $f\left(u^{2}+2 u\right)=u^{2}+2 u$. Since $u \in(-1,0) \Rightarrow u^{2}+2 u \in(-1,0)$, we deduce that $u^{2}+2 u=u$, i.e., $u=-1$ or $u=0$, which is impossible. Similarly, if $f(v)=v$ for $v \in(0, \infty)$, we are led to the same contradiction. However, for all $x \in S, f(x+(1+x) f(x))=x+(1+x) f(x)$, so we must have $x+(1+x) f(x)=0$. Therefore $f(x)=-\frac{x}{1+x}$ for all $x \in S$. It is directly verified that this function satisfies all the conditions.


4. A4 (MON) Let $\mathbb{R}$ denote the set of all real numbers and $\mathbb{R}^{+}$the subset of all positive ones. Let $\alpha$ and $\beta$ be given elements in $\mathbb{R}$, not necessarily distinct. Find all functions $f: \mathbb{R}^{+} \rightarrow \mathbb{R}$ such that  $$ f(x) f(y)=y^{\alpha} f\left(\frac{x}{2}\right)+x^{\beta} f\left(\frac{y}{2}\right) \quad \text { for all } x \text { and } y \text { in } \mathbb{R}^{+} . $$

Solution: 4. Suppose that $\alpha=\beta$. The given functional equation for $x=y$ yields $f(x / 2)=x^{-\alpha} f(x)^{2} / 2$; hence the functional equation can be written as  $$ f(x) f(y)=\frac{1}{2} x^{\alpha} y^{-\alpha} f(y)^{2}+\frac{1}{2} y^{\alpha} x^{-\alpha} f(x)^{2} $$  i.e.,  $$ \left((x / y)^{\alpha / 2} f(y)-(y / x)^{\alpha / 2} f(x)\right)^{2}=0 $$  Hence $f(x) / x^{\alpha}=f(y) / y^{\alpha}$ for all $x, y \in \mathbb{R}^{+}$, so $f(x)=\lambda x^{\alpha}$ for some $\lambda$. Substituting into the functional equation we obtain that $\lambda=2^{1-\alpha}$ or $\lambda=0$. Thus either $f(x) \equiv 2^{1-\alpha} x^{\alpha}$ or $f(x) \equiv 0$. Now let $\alpha \neq \beta$. Interchanging $x$ with $y$ in the given equation and subtracting these equalities from each other, we get $\left(x^{\alpha}-x^{\beta}\right) f(y / 2)=\left(y^{\alpha}-\right.$ $\left.y^{\beta}\right) f(x / 2)$, so for some constant $\lambda \geq 0$ and all $x \neq 1, f(x / 2)=\lambda\left(x^{\alpha}-x^{\beta}\right)$. Substituting this into the given equation, we obtain that only $\lambda=0$ is possible, i.e., $f(x) \equiv 0$.


5. A5 (POL) Let $f(x)=\frac{x^{2}+1}{2 x}$ for $x \neq 0$. Define $f^{(0)}(x)=x$ and $f^{(n)}(x)=$ $f\left(f^{(n-1)}(x)\right)$ for all positive integers $n$ and $x \neq 0$. Prove that for all nonnegative integers $n$ and $x \neq-1,0$, or 1 ,  $$ \frac{f^{(n)}(x)}{f^{(n+1)}(x)}=1+\frac{1}{f\left(\left(\frac{x+1}{x-1}\right)^{2^{n}}\right)} $$

Solution: 5. If $f^{(n)}(x)=\frac{p_{n}(x)}{q_{n}(x)}$ for some positive integer $n$ and polynomials $p_{n}, q_{n}$, then  $$ f^{(n+1)}(x)=f\left(\frac{p_{n}(x)}{q_{n}(x)}\right)=\frac{p_{n}(x)^{2}+q_{n}(x)^{2}}{2 p_{n}(x) q_{n}(x)} $$  Note that $f^{(0)}(x)=x / 1$. Thus $f^{(n)}(x)=\frac{p_{n}(x)}{q_{n}(x)}$, where the sequence of polynomials $p_{n}, q_{n}$ is defined recursively by  $$ \begin{gathered} p_{0}(x)=x, \quad q_{0}(x)=1, \text { and } \\ p_{n+1}(x)=p_{n}(x)^{2}+q_{n}(x)^{2}, q_{n+1}(x)=2 p_{n}(x) q_{n}(x) . \end{gathered} $$  Furthermore, $p_{0}(x) \pm q_{0}(x)=x \pm 1$ and $p_{n+1}(x) \pm q_{n+1}(x)=p_{n}(x)^{2}+$ $q_{n}(x)^{2} \pm 2 p_{n}(x) q_{n}(x)=\left(p_{n}(x) \pm q_{n}(x)\right)^{2}$, so $p_{n}(x) \pm q_{n}(x)=(x \pm 1)^{2^{n}}$ for all $n$. Hence  $$ p_{n}(x)=\frac{(x+1)^{2^{n}}+(x-1)^{2^{n}}}{2} \quad \text { and } \quad q_{n}(x)=\frac{(x+1)^{2^{n}}-(x-1)^{2^{n}}}{2} . $$  Finally,  $$ \begin{aligned} \frac{f^{(n)}(x)}{f^{(n+1)}(x)} & =\frac{p_{n}(x) q_{n+1}(x)}{q_{n}(x) p_{n+1}(x)}=\frac{2 p_{n}(x)^{2}}{p_{n+1}(x)}=\frac{\left((x+1)^{2^{n}}+(x-1)^{2^{n}}\right)^{2}}{(x+1)^{2^{n+1}}+(x-1)^{2^{n+1}}} \\ & =1+\frac{2\left(\frac{x+1}{x-1}\right)^{2^{n}}}{1+\left(\frac{x+1}{x-1}\right)^{2^{n+1}}}=1+\frac{1}{f\left(\left(\frac{x+1}{x-1}\right)^{2^{n}}\right)} \end{aligned} $$


6. C1 (UKR) On a $5 \times 5$ board, two players alternately mark numbers on empty cells. The first player always marks 1's, the second 0's. One number is marked per turn, until the board is filled. For each of the nine $3 \times 3$ squares the sum of the nine numbers on its cells is computed. Denote by $A$ the maximum of these sums. How large can the first player make $A$, regardless of the responses of the second player?

Solution: 6. Call the first and second player $M$ and $N$ respectively. $N$ can keep $A \leq 6$. Indeed, let 10 dominoes be placed as shown in the picture, and whenever $M$ marks a 1 in a cell of some domino, let $N$ mark 0 in the other cell of that domino if it is still empty. Since any $3 \times 3$ square contains at least three complete domi- ![](https://cdn.mathpix.com/cropped/2024_11_18_8e985d6b9c83aa3e9d0eg-591.jpg?height=252&width=249&top_left_y=1193&top_left_x=937) noes, there are at least three 0 's inside. Hence $A \leq 6$. We now show that $M$ can make $A=6$. Let him start by marking 1 in $c 3$. By symmetry, we may assume that $N$ 's response is made in row 4 or 5 . Then $M$ marks 1 in $c 2$. If $N$ puts 0 in $c 1$, then $M$ can always mark two 1's in $b \times\{1,2,3\}$ as well as three 1's in $\{a, d\} \times\{1,2,3\}$. Thus either $\{a, b, c\} \times\{1,2,3\}$ or $\{b, c, d\} \times\{1,2,3\}$ will contain six 1's. However, if $N$ does not play his second move in $c 1$, then $M$ plays there, and thus he can easily achieve to have six 1's either in $\{a, b, c\} \times\{1,2,3\}$ or $\{c, d, e\} \times\{1,2,3\}$.


7. C2 (COL) In a certain city, age is reckoned in terms of real numbers rather than integers. Every two citizens $x$ and $x^{\prime}$ either know each other or do not know each other. Moreover, if they do not, then there exists a chain of citizens $x=x_{0}, x_{1}, \ldots, x_{n}=x^{\prime}$ for some integer $n \geq 2$ such that $x_{i-1}$ and $x_{i}$ know each other. In a census, all male citizens declare their ages, and there is at least one male citizen. Each female citizen provides only the information that her age is the average of the ages of all the citizens she knows. Prove that this is enough to determine uniquely the ages of all the female citizens.

Solution: 7. Let $a_{1}, a_{2}, \ldots, a_{m}$ be the ages of the male citizens $(m \geq 1)$. We claim that the age of each female citizen can be expressed in the form $c_{1} a_{1}+\cdots+c_{m} a_{m}$ for some constants $c_{i} \geq 0$, and we will prove this by induction on the number $n$ of female citizens. The claim is clear if $n=1$. Suppose it holds for $n$ and consider the case of $n+1$ female citizens. Choose any of them, say $A$ of age $x$ who knows $k$ citizens (at least one male). By the induction hypothesis, the age of each of the other $n$ females is expressible as $c_{1} a_{1}+\cdots+c_{m} a_{m}+c_{0} x$, where $c_{i} \geq 0$ and $c_{0}+c_{1}+\cdots+c_{m}=1$. Consequently, the sum of ages of the $k$ citizens who know $A$ is $k x=b_{1} a_{1}+\cdots+b_{m} a_{m}+b_{0} x$ for some constants $b_{i} \geq 0$ with sum $k$. But $A$ knows at least one male citizen (who does not contribute to the coefficient of $x)$, so $b_{0} \leq k-1$. Hence $x=\frac{b_{1} a_{1}+\cdots+b_{m} a_{m}}{k-b_{0}}$, and the claim follows.


8. C3 (MCD) Peter has three accounts in a bank, each with an integral number of dollars. He is only allowed to transfer money from one account to another so that the amount of money in the latter is doubled. (a) Prove that Peter can always transfer all his money into two accounts. (b) Can Peter always transfer all his money into one account?

Solution: 8. (a) Let $a, b, c, a \leq b \leq c$ be the amounts of money in dollars in Peter's first, second, and third account, respectively. If $a=0$, then we are done, so suppose that $a>0$. Let Peter make transfers of money into the first account as follows. Write $b=a q+r$ with $0 \leq r<a$ and let $q=m_{0}+2 m_{1}+\cdots+2^{k} m_{k}$ be the binary representation of $q$ $\left(m_{i} \in\{0,1\}, m_{k}=1\right)$. In the $i$ th transfer, $i=1,2, \ldots, k+1$, if $m_{i}=1$ he transfers money from the second account, while if $m_{i}=0$ he does so from the third. In this way he has transferred exactly $\left(m_{0}+2 m_{1}+\cdots+2^{k} m_{k}\right) a$ dollars from the second account, thus leaving $r$ dollars in it, $r<a$. Repeating this procedure, Peter can diminish the amount of money in the smallest account to zero, as required. (b) If Peter has an odd number of dollars, he clearly cannot transfer his money into one account.


9. C4 (EST) There are $n+1$ fixed positions in a row, labeled 0 to $n$ in increasing order from right to left. Cards numbered 0 to $n$ are shuffled and dealt, one in each position. The object of the game is to have card $i$ in the $i$ th position for $0 \leq i \leq n$. If this has not been achieved, the following move is executed. Determine the smallest $k$ such that the $k$ th position is occupied by a card $l>k$. Remove this card, slide all cards from the $(k+1)$ st to the $l$ th position one place to the right, and replace the card $l$ in the $l$ th position. (a) Prove that the game lasts at most $2^{n}-1$ moves. (b) Prove that there exists a unique initial configuration for which the game lasts exactly $2^{n}-1$ moves.

Solution: 9. (a) For $i=1, \ldots, n$, let $d_{i}$ be 0 if the card $i$ is in the $i$ th position, and 1 otherwise. Define $b=d_{1}+2 d_{2}+2^{2} d_{3}+\cdots+2^{n-1} d_{n}$, so that $0 \leq b \leq$ $2^{n}-1$, and $b=0$ if and only if the game is over. After each move some digit $d_{l}$ changes from 1 to 0 while $d_{l+1}, d_{l+2}, \ldots$ remain unchanged. Hence $b$ decreases after each move, and consequently the game ends after at most $2^{n}-1$ moves. (b) Suppose the game lasts exactly $2^{n}-1$ moves. Then each move decreases $b$ for exactly one, so playing the game in reverse (starting from the final configuration), every move is uniquely determined. It follows that if the configuration that allows a game lasting $2^{n}-1$ moves exists, it must be unique. Consider the initial configuration $0, n, n-1, \ldots, 2,1$. We prove by induction that the game will last exactly $2^{n}-1$ moves, and that the card 0 will get to the 0 th position only in the last move. This is trivial for $n=1$, so suppose that the claim is true for some $n=m-1 \geq 1$ and consider the case $n=m$. Obviously the card 0 does not move until the card $m$ gets to the 0 -th position. But if we ignore the card 0 and consider the card $m$ to be the card 0 , the induction hypothesis gives that the card $m$ will move to the 0 th position only after $2^{m-1}-1$ moves. After these $2^{m-1}-1$ moves, we come to the configuration $0, m-1, \ldots, 2,1, m$. The next move yields $m, 0, m-1, \ldots, 2,1$, so by the induction hypothesis again we need $2^{m-1}-1$ moves more to finish the game.


1. A1 (RUS) ${ }^{\mathrm{IMO} 2}$ Let $a, b$, and $c$ be positive real numbers such that $a b c=1$. Prove that  $$ \frac{1}{a^{3}(b+c)}+\frac{1}{b^{3}(a+c)}+\frac{1}{c^{3}(a+b)} \geq \frac{3}{2} $$

Solution: 1. Let $x=\frac{1}{a}, y=\frac{1}{b}, z=\frac{1}{c}$. Then $x y z=1$ and  $$ S=\frac{1}{a^{3}(b+c)}+\frac{1}{b^{3}(c+a)}+\frac{1}{c^{3}(a+b)}=\frac{x^{2}}{y+z}+\frac{y^{2}}{z+x}+\frac{z^{2}}{x+y} $$  We must prove that $S \geq \frac{3}{2}$. From the Cauchy-Schwarz inequality,  $$ [(y+z)+(z+x)+(x+y)] \cdot S \geq(x+y+z)^{2} \Rightarrow S \geq \frac{x+y+z}{2} $$  It follows from the A-G mean inequality that $\frac{x+y+z}{2} \geq \frac{3}{2} \sqrt[3]{x y z}=\frac{3}{2}$; hence the proof is complete. Equality holds if and only if $x=y=z=1$, i.e., $a=b=c=1$. Remark. After reducing the problem to $\frac{x^{2}}{y+z}+\frac{y^{2}}{z+x}+\frac{z^{2}}{x+y} \geq \frac{3}{2}$, we can solve the problem using Jensen's inequality applied to the function $g(u, v)=$ $u^{2} / v$. The problem can also be solved using Muirhead's inequality.


10. G4 (UKR) An acute triangle $A B C$ is given. Points $A_{1}$ and $A_{2}$ are taken on the side $B C$ (with $A_{2}$ between $A_{1}$ and $C$ ), $B_{1}$ and $B_{2}$ on the side $A C$ (with $B_{2}$ between $B_{1}$ and $A$ ), and $C_{1}$ and $C_{2}$ on the side $A B$ (with $C_{2}$ between $C_{1}$ and $B$ ) such that  $$ \angle A A_{1} A_{2}=\angle A A_{2} A_{1}=\angle B B_{1} B_{2}=\angle B B_{2} B_{1}=\angle C C_{1} C_{2}=\angle C C_{2} C_{1} . $$  The lines $A A_{1}, B B_{1}$, and $C C_{1}$ form a triangle, and the lines $A A_{2}, B B_{2}$, and $C C_{2}$ form a second triangle. Prove that all six vertices of these two triangles lie on a single circle.

Solution: 10. Let the two triangles be $X_{1} Y_{1} Z_{1}, X_{2} Y_{2} Z_{2}$, with $X_{1}=B B_{1} \cap C C_{1}, Y_{1}=$ $C C_{1} \cap A A_{1}, Z_{1}=A A_{1} \cap B B_{1}$, $X_{2}=B B_{2} \cap C C_{2}, Y_{2}=C C_{2} \cap$ $A A_{2}, Z_{2}=A A_{2} \cap B B_{2}$. First, we observe that $\angle A B B_{2}=\angle A C C_{1}$ and $\angle A B B_{1}=\angle A C C_{2}$. Consequently $\angle B Z_{1} A_{1}=\angle B A A_{1}+$ $\angle A B B_{1}=\angle B C C_{2}+\angle C_{2} C A=$ $\angle C$ and similarly $\angle A Z_{2} B_{2}=\angle C$, $\angle A Y_{1} C_{1}=\angle C Y_{2} A_{2}=\angle B$. Also, $\triangle A B B_{2} \sim \triangle A C C_{1}$; hence ![](https://cdn.mathpix.com/cropped/2024_11_18_8e985d6b9c83aa3e9d0eg-601.jpg?height=399&width=475&top_left_y=1280&top_left_x=849) $A C_{1} / A C=A B_{2} / A B$. From the sine formula, we obtain  $$ \begin{aligned} \frac{A Z_{1}}{\sin \angle A B Z_{1}} & =\frac{A B}{\sin \angle A Z_{1} B}=\frac{A B}{\sin \angle C}=\frac{A C}{\sin \angle B}=\frac{A C}{\sin \angle A Y_{2} C} \\ & =\frac{A Y_{2}}{\sin \angle A C Y_{2}} \Longrightarrow A Z_{1}=A Y_{2} . \end{aligned} $$  Analogously, $B X_{1}=B Z_{2}$ and $C Y_{1}=C X_{2}$. Furthermore, again from the sine formula,  $$ \begin{aligned} \frac{A Y_{1}}{\sin \angle A C_{1} Y_{1}} & =\frac{A C_{1}}{\sin \angle A Y_{1} C_{1}}=\frac{A C_{1}}{A C} \frac{A C}{\sin \angle B} \\ & =\frac{A B_{2}}{A B} \frac{A B}{\sin \angle C}=\frac{A B_{2}}{\sin \angle A Z_{2} B_{2}}=\frac{A Z_{2}}{\sin \angle A B_{2} Z_{2}} . \end{aligned} $$  Hence, $A Y_{1}=A Z_{2}$ and, analogously, $B Z_{1}=B X_{2}$ and $C X_{1}=C Y_{2}$. We deduce that $Y_{1} Z_{2} \| B C$ and $Z_{2} X_{1} \| A C$, which gives us $\angle Y_{1} Z_{2} X_{1}=$ $180^{\circ}-\angle C=180^{\circ}-\angle Y_{1} Z_{1} X_{1}$. It follows that $Z_{2}$ lies on the circle circumscribed about $\triangle X_{1} Y_{1} Z_{1}$. Similarly, so do $X_{2}$ and $Y_{2}$. Second solution. Let $H$ be the orthocenter of $\triangle A B C$. Triangles $A H B$, $B H C, C H A, A B C$ have the same circumradius $R$. Additionally,  $$ \angle H A A_{i}=\angle H B B_{i}=\angle H C C_{i}=\theta(i=1,2) . $$  Since $\angle H B X_{1}=\angle H C X_{1}=\theta, B C X_{1} H$ is concyclic and therefore $H X_{1}=$ $2 R \sin \theta$. The same holds for $H Y_{1}, H Z_{1}, H X_{2}, H Y_{2}, H Z_{2}$. Hence $X_{i}, Y_{i}, Z_{i}$ $(i=1,2)$ lie on a circle centered at $H$.


11. G5 (NZL) ${ }^{\mathrm{IMO} 5}$ Let $A B C D E F$ be a convex hexagon with $A B=B C=$ $C D, D E=E F=F A$, and $\measuredangle B C D=\measuredangle E F A=\pi / 3$ (that is, $60^{\circ}$ ). Let $G$ and $H$ be two points interior to the hexagon such that angles $A G B$ and $D H E$ are both $2 \pi / 3$ (that is, $120^{\circ}$ ). Prove that $A G+G B+G H+D H+$ $H E \geq C F$.

Solution: 11. Triangles $B C D$ and $E F A$ are equilateral, and hence $B E$ is an axis of symmetry of $A B D E$. Let $C^{\prime}, F^{\prime}$ respectively be the points symmetric to $C, F$ with respect to $B E$. The points $G$ and $H$ lie on the circumcircles of $A B C^{\prime}$ and $D E F^{\prime}$ respectively (because, for instance, $\angle A G B=120^{\circ}=$ $\left.180^{\circ}-\angle A C^{\prime} B\right)$; hence from Ptolemy's theorem we have $A G+G B=C^{\prime} G$ and $D H+H E=H F^{\prime}$. Therefore  $$ A G+G B+G H+D H+H E=C^{\prime} G+G H+H F^{\prime} \geq C^{\prime} F^{\prime}=C F $$  with equality if and only if $G$ and $H$ both lie on $C^{\prime} F^{\prime}$. Remark. Since by Ptolemy's inequality $A G+G B \geq C^{\prime} G$ and $D H+H E \geq$ $H F^{\prime}$, the result holds without the condition $\angle A G B=\angle D H E=120^{\circ}$.


12. G6 (USA) Let $A_{1} A_{2} A_{3} A_{4}$ be a tetrahedron, $G$ its centroid, and $A_{1}^{\prime}, A_{2}^{\prime}, A_{3}^{\prime}$, and $A_{4}^{\prime}$ the points where the circumsphere of $A_{1} A_{2} A_{3} A_{4}$ intersects $G A_{1}, G A_{2}, G A_{3}$, and $G A_{4}$, respectively. Prove that  $$ G A_{1} \cdot G A_{2} \cdot G A_{3} \cdot G A_{4} \leq G A_{1}^{\prime} \cdot G A_{2}^{\prime} \cdot G A_{3}^{\prime} \cdot G A_{4}^{\prime} $$  and  $$ \frac{1}{G A_{1}^{\prime}}+\frac{1}{G A_{2}^{\prime}}+\frac{1}{G A_{3}^{\prime}}+\frac{1}{G A_{4}^{\prime}} \leq \frac{1}{G A_{1}}+\frac{1}{G A_{2}}+\frac{1}{G A_{3}}+\frac{1}{G A_{4}} $$

Solution: 12. Let $O$ be the circumcenter and $R$ the circumradius of $\underset{\longrightarrow}{A_{1} A_{2} A_{3} A_{4}}$. We have $O A_{i}^{2}=\left(\overrightarrow{O G}+\left(\overrightarrow{O A_{i}}-\overrightarrow{O G}\right)\right)^{2}=O G^{2}+G A_{i}^{2}+2 \overrightarrow{O G} \cdot \overrightarrow{G A_{i}}$. Summing up these equalities for $i=1,2,3,4$ and using that $\sum_{i=1}^{4} \overrightarrow{G A_{i}}=\overrightarrow{0}$, we obtain  $$ \sum_{i=1}^{4} O A_{i}^{2}=4 O G^{2}+\sum_{i=1}^{4} G A_{i}^{2} \Longleftrightarrow \sum_{i=1}^{4} G A_{i}^{2}=4\left(R^{2}-O G^{2}\right) $$  Now we have that the potential of $G$ with respect to the sphere equals $G A_{i} \cdot G A_{i}^{\prime}=R^{2}-O G^{2}$. Plugging in these expressions for $G A_{i}^{\prime}$, we reduce the inequalities we must prove to  $$ \begin{aligned} G A_{1} \cdot G A_{2} \cdot G A_{3} \cdot G A_{4} & \leq\left(R^{2}-O G^{2}\right)^{2} \\ \text { and } \quad\left(R^{2}-O G^{2}\right) \sum_{i=1}^{4} \frac{1}{G A_{i}} & \geq \sum_{i=1}^{4} G A_{i} \end{aligned} $$  Inequality (2) immediately follows from (1) and the quadratic-geometric mean inequality for $G A_{i}$. Since from the Cauchy-Schwarz inequality we have $\sum_{i=1}^{4} G A_{i}^{4} \geq \frac{1}{4}\left(\sum_{i=1}^{4} G A_{i}\right)^{2}$ and $\left(\sum_{i=1}^{4} G A_{i}\right)\left(\sum_{i=1}^{4} \frac{1}{G A_{i}}\right) \geq 16$, inequality (3) follows from (1) and from  $$ \left(\sum_{i=1}^{4} G A_{i}^{2}\right)\left(\sum_{i=1}^{4} \frac{1}{G A_{i}}\right) \geq \frac{1}{4}\left(\sum_{i=1}^{4} G A_{i}\right)^{2}\left(\sum_{i=1}^{4} \frac{1}{G A_{i}}\right) \geq 4 \sum_{i=1}^{4} G A_{i} $$


13. G7 (LAT) $O$ is a point inside a convex quadrilateral $A B C D$ of area $S . K, L, M$, and $N$ are interior points of the sides $A B, B C, C D$, and $D A$ respectively. If $O K B L$ and $O M D N$ are parallelograms, prove that $\sqrt{S} \geq \sqrt{S_{1}}+\sqrt{S_{2}}$, where $S_{1}$ and $S_{2}$ are the areas of $O N A K$ and $O L C M$ respectively.

Solution: 13. If $O$ lies on $A C$, then $A B C D, A K O N$, and $O L C M$ are similar; hence $A C=A O+O C$ implies $\sqrt{S}=\sqrt{S_{1}}+\sqrt{S_{2}}$. Assume that $O$ does not lie on $A C$ and that w.l.o.g. it lies inside triangle $A D C$. Let us denote by $T_{1}, T_{2}$ the areas of parallelograms $K B L O, N O M D$ respectively. Consider a line through $O$ that intersects $A D, D C, C B, B A$ respectively at $X, Y, Z, W$ so that $O W / O X=O Z / O Y$ (such a line exists by a continuity argument: the left side is smaller when $W=X=A$, but greater when $Y=Z=C$ ). The desired inequality is equivalent to $T_{1}+T_{2} \geq 2 \sqrt{S_{1} S_{2}}$. Since triangles $W K O, O L Z, W B Z$ are similar and $W O+O Z=W Z$, we have $\sqrt{S_{W K O}}+\sqrt{S_{O L Z}}=\sqrt{S_{W B Z}}=$ $\sqrt{S_{W K O}+S_{O L Z}+T_{1}}$, which implies $T_{1}=2 \sqrt{S_{W K O} S_{O L Z}}$. Similarly, $T_{2}=2 \sqrt{S_{X N O} S_{O M Y}}$. Since $O W / O Z=O X / O Y$, we have $S_{W K O} / S_{X N O}=S_{O L Z} / S_{O M Y}$. ![](https://cdn.mathpix.com/cropped/2024_11_18_8e985d6b9c83aa3e9d0eg-603.jpg?height=394&width=489&top_left_y=903&top_left_x=835)  Therefore we obtain  $$ \begin{aligned} T_{1}+T_{2} & =2 \sqrt{S_{W K O} S_{O L Z}}+2 \sqrt{S_{X N O} S_{O M Y}} \\ & =2 \sqrt{\left(S_{W K O}+S_{X N O}\right)\left(S_{O L Z}+S_{O M Y}\right)} \geq 2 \sqrt{S_{1} S_{2}} \end{aligned} $$  Second solution. By an affine transformation of the plane one can transform any nondegenerate quadrilateral into a cyclic one, thereby preserving parallelness and ratios of areas. Thus we may assume w.l.o.g. that $A B C D$ is cyclic. By a well-known formula, the area of a cyclic quadrilateral with sides $a, b, c, d$ and semiperimeter $p$ is given by  $$ S=\sqrt{(p-a)(p-b)(p-c)(p-d)} $$  Let us set $A K=a_{1}, K B=b_{1}, B L=a_{2}, L C=b_{2}, C M=a_{3}, M D=b_{3}$, $D N=a_{4}, N A=b_{4}$. Then the sides of quadrilateral $A K O N$ are $a_{i}$, the sides of $C L O M$ are $b_{i}$, and the sides of $A B C D$ are $a_{i}+b_{i}(i=1,2,3,4)$. If $p$ and $q$ are the semiperimeters of $A K O N$ and $C L O M$, and $x_{i}=p-a_{i}$, $y_{i}=q-b_{i}$, then we have $S_{1}=\sqrt{x_{1} x_{2} x_{3} x_{4}}, S_{2}=\sqrt{y_{1} y_{2} y_{3} y_{4}}$, and $S=$ $\sqrt{\left(x_{1}+y_{1}\right)\left(x_{2}+y_{2}\right)\left(x_{3}+y_{3}\right)\left(x_{4}+y_{4}\right)}$. Thus we need to show that  $$ \sqrt[4]{x_{1} x_{2} x_{3} x_{4}}+\sqrt[4]{y_{1} y_{2} y_{3} y_{4}} \leq \sqrt[4]{\left(x_{1}+y_{1}\right)\left(x_{2}+y_{2}\right)\left(x_{3}+y_{3}\right)\left(x_{4}+y_{4}\right)} $$  By setting $y_{i}=t_{i} x_{i}$ we reduce this inequality to $1+\sqrt[4]{t_{1} t_{2} t_{3} t_{4}} \leq$ $\sqrt[4]{\left(1+t_{1}\right)\left(1+t_{2}\right)\left(1+t_{3}\right)\left(1+t_{4}\right)}$. One way to prove the last inequality is to apply the simple inequality  $$ 1+\sqrt{u v} \leq \sqrt{(1+u)(1+v)} $$  to $\sqrt{t_{1} t_{2}}, \sqrt{t_{3} t_{4}}$ and then to $t_{1}, t_{2}$ and $t_{3}, t_{4}$.


14. G8 (COL) Let $A B C$ be a triangle. A circle passing through $B$ and $C$ intersects the sides $A B$ and $A C$ again at $C^{\prime}$ and $B^{\prime}$, respectively. Prove that $B B^{\prime}, C C^{\prime}$, and $H H^{\prime}$ are concurrent, where $H$ and $H^{\prime}$ are the orthocenters of triangles $A B C$ and $A B^{\prime} C^{\prime}$ respectively.

Solution: 14. Let $B B^{\prime}$ cut $C C^{\prime}$ at $P$. Since $\angle B^{\prime} B C^{\prime}=\angle B^{\prime} C C^{\prime}$, it follows that $\angle P B H=\angle P C H$. Let $D$ and $E$ be points such that $B P C D$ and $H P C E$ are parallelograms (consequently, so is $B H E D$ ). Triangles $B A C$ and $C^{\prime} A B^{\prime}$ are similar, from which we deduce that $\triangle B^{\prime} H^{\prime} C^{\prime}$ and $\triangle B H C$ are similar, as well as $\triangle B^{\prime} P C^{\prime}$ and $\triangle B D C$. Hence $B^{\prime} P C^{\prime} H^{\prime}$ and $B D C H$ are similar, from which we obtain $\angle H^{\prime} P B^{\prime}=\angle H D B$. Now $\angle C D E=\angle P B H=\angle P C H=$ $\angle C H E$ implies that $H C E D$ is a cyclic quadrilateral. Therefore $\angle B P H=\angle D C E=\angle D H E=$ $\angle H D B=\angle H^{\prime} P B^{\prime}$; hence $H H^{\prime}$ also passes through $P$. ![](https://cdn.mathpix.com/cropped/2024_11_18_8e985d6b9c83aa3e9d0eg-604.jpg?height=415&width=356&top_left_y=775&top_left_x=906)  Second solution. Observe that $\triangle H B C \sim \triangle H^{\prime} B^{\prime} C^{\prime}, \angle P B H=\angle P C H$ and $\angle P B^{\prime} H^{\prime}=\angle P C^{\prime} H^{\prime}$. By Ceva's theorem in trigonometric form applied to $\triangle B P C$ and the point $H$, we have $\frac{\sin \angle B P H}{\sin \angle H P C}=\frac{\sin \angle H B P}{\sin \angle H B C} \cdot \frac{\sin \angle H C B}{\sin \angle H C P}=\frac{\sin \angle H C B}{\sin \angle H B C}$. Similarly, Ceva's theorem for $\triangle B^{\prime} P C^{\prime}$ and point $H^{\prime}$ yields $\frac{\sin \angle B^{\prime} P H^{\prime}}{\sin \angle H^{\prime} P C^{\prime}}=\frac{\sin \angle H^{\prime} C^{\prime} B^{\prime}}{\sin \angle H^{\prime} B^{\prime} C^{\prime}}$. Thus it follows that  $$ \frac{\sin \angle B^{\prime} P H^{\prime}}{\sin \angle H^{\prime} P C^{\prime}}=\frac{\sin \angle B P H}{\sin \angle H P C} $$  which finally implies that $\angle B P H=\angle B^{\prime} P H^{\prime}$.


15. N1 (ROM) Let $k$ be a positive integer. Prove that there are infinitely many perfect squares of the form $n 2^{k}-7$, where $n$ is a positive integer.

Solution: 15. We show by induction on $k$ that there exists a positive integer $a_{k}$ for which $a_{k}^{2} \equiv-7\left(\bmod 2^{k}\right)$. The statement of the problem follows, since every $a_{k}+r 2^{k}(r=0,1, \ldots)$ also satisfies this condition. Note that for $k=1,2,3$ one can take $a_{k}=1$. Now suppose that $a_{k}^{2} \equiv-7$ $\left(\bmod 2^{k}\right)$ for some $k>3$. Then either $a_{k}^{2} \equiv-7\left(\bmod 2^{k+1}\right)$ or $a_{k}^{2} \equiv 2^{k}-7$ $\left(\bmod 2^{k+1}\right)$. In the former case, take $a_{k+1}=a_{k}$. In the latter case, set $a_{k+1}=a_{k}+2^{k-1}$. Then $a_{k+1}^{2}=a_{k}^{2}+2^{k} a_{k}+2^{2 k-2} \equiv a_{k}^{2}+2^{k} \equiv-7(\bmod$ $2^{k+1}$ ) because $a_{k}$ is odd.


16. N2 (RUS) Let $\mathbb{Z}$ denote the set of all integers. Prove that for any integers $A$ and $B$, one can find an integer $C$ for which $M_{1}=\left\{x^{2}+A x+B: x \in \mathbb{Z}\right\}$ and $M_{2}=\left\{2 x^{2}+2 x+C: x \in \mathbb{Z}\right\}$ do not intersect.

Solution: 16. If $A$ is odd, then every number in $M_{1}$ is of the form $x(x+A)+B \equiv B$ $(\bmod 2)$, while numbers in $M_{2}$ are congruent to $C$ modulo 2 . Thus it is enough to take $C \equiv B+1(\bmod 2)$.  If $A$ is even, then all numbers in $M_{1}$ have the form $\left(X+\frac{A}{2}\right)^{2}+B-\frac{A^{2}}{4}$ and are congruent to $B-\frac{A^{2}}{4}$ or $B-\frac{A^{2}}{4}+1$ modulo 4 , while numbers in $M_{2}$ are congruent to $C$ modulo 4 . So one can choose any $C \equiv B-\frac{A^{2}}{4}+2$ $(\bmod 4)$.


17. N3 $(\mathbf{C Z E})^{\mathrm{IMO} 3}$ Determine all integers $n>3$ such that there are $n$ points $A_{1}, A_{2}, \ldots, A_{n}$ in the plane that satisfy the following two conditions simultaneously: (a) No three lie on the same line. (b) There exist real numbers $p_{1}, p_{2}, \ldots, p_{n}$ such that the area of $\triangle A_{i} A_{j} A_{k}$ is equal to $p_{i}+p_{j}+p_{k}$, for $1 \leq i<j<k \leq n$.

Solution: 17. For $n=4$, the vertices of a unit square $A_{1} A_{2} A_{3} A_{4}$ and $p_{1}=p_{2}=p_{3}=$ $p_{4}=\frac{1}{6}$ satisfy the conditions. We claim that there are no solutions for $n=5$ (and thus for any $n \geq 5$ ). Suppose to the contrary that points $A_{i}$ and $p_{i}, i=1, \ldots, 5$, satisfy the conditions. Denote the area of $\triangle A_{i} A_{j} A_{k}$ by $S_{i j k}=p_{i}+p_{j}+p_{k}, 1 \leq i<$ $j<k \leq 5$. Observe that all the $p_{i}$ 's must be distinct. Indeed, if $p_{4}=p_{5}$, then $S_{124}=S_{125}$ and $S_{234}=S_{235}$, which implies that $A_{4} A_{5}$ is parallel to $A_{1} A_{2}$ and $A_{2} A_{3}$, so $A_{1}, A_{2}, A_{3}$ are collinear, which is impossible. Also note that if $A_{i} A_{j} A_{k} A_{l}$ is convex, then $S_{i j k}+S_{i k l}=S_{i j l}+S_{j k l}$ gives $p_{i}+p_{k}=p_{j}+p_{l}$. Now consider the convex hull of $A_{1}, A_{2}, A_{3}, A_{4}, A_{5}$. There are three cases. (i) The convex hull is the pentagon $A_{1} A_{2} A_{3} A_{4} A_{5}$. Then $A_{1} A_{2} A_{3} A_{4}$ and $A_{1} A_{2} A_{3} A_{5}$ are convex, so we have $p_{1}+p_{3}=p_{2}+p_{4}$ and $p_{1}+p_{3}=$ $p_{2}+p_{5}$. Hence $p_{4}=p_{5}$, a contradiction. (ii) The convex hull is w.l.o.g. the quadrilateral $A_{1} A_{2} A_{3} A_{4}$. Assume that $A_{5}$ lies within $A_{1} A_{3} A_{4}$. Then $A_{1} A_{2} A_{3} A_{5}$ is also convex, so as in (1) we get $p_{4}=p_{5}$. (iii) The convex hull is w.l.o.g. the triangle $A_{1} A_{2} A_{3}$. Since $S_{124}+S_{134}+$ $S_{234}=S_{125}+S_{135}+S_{235}$, we conclude that again $p_{4}=p_{5}$.


18. N4 (BUL) Find all positive integers $x$ and $y$ such that $x+y^{2}+z^{3}=x y z$, where $z$ is the greatest common divisor of $x$ and $y$.

Solution: 18. Let $x=z a$ and $y=z b$, where $a$ and $b$ are relatively prime. The given Diophantine equation becomes $a+z b^{2}+z^{2}=z^{2} a b$, so $a=z c$ for some $c \in \mathbb{Z}$. We obtain $c+b^{2}+z=z^{2} c b$, or $c=\frac{b^{2}+z}{z^{2} b-1}$. (i) If $z=1$, then $c=\frac{b^{2}+1}{b-1}=b+1+\frac{2}{b-1}$, so $b=2$ or $b=3$. These values yield two solutions: $(x, y)=(5,2)$ and $(x, y)=(5,3)$. (ii) If $z=2$, then $16 c=\frac{16 b^{2}+32}{4 b-1}=4 b+1+\frac{33}{4 b-1}$, so $b=1$ or $b=3$. In this case $(x, y)=(4,2)$ or $(x, y)=(4,6)$. (iii) Let $z \geq 3$. First, we see that $z^{2} c=\frac{z^{2} b^{2}+z^{3}}{z^{2} b-1}=b+\frac{b+z^{3}}{z^{2} b-1}$. Thus $\frac{b+z^{3}}{z^{2} b-1}$ must be a positive integer, so $b+z^{3} \geq z^{2} b-1$, which implies $b \leq$ $\frac{z^{2}-z+1}{z-1}$. It follows that $b \leq z$. But then $b^{2}+z \leq z^{2}+b<z^{2} b-1$, with the last inequality because $\left(z^{2}-1\right)(b-1)>2$. Therefore $c=\frac{b^{2}+z}{z^{2} b-1}<1$, a contradiction. The only solutions for $(x, y)$ are $(4,2),(4,6),(5,2),(5,3)$.


19. N5 (IRE) At a meeting of $12 k$ people, each person exchanges greetings with exactly $3 k+6$ others. For any two people, the number who exchange greetings with both is the same. How many people are at the meeting?

Solution: 19. For each two people let $n$ be the number of people exchanging greetings with both of them. To determine $n$ in terms of $k$, we shall count in two ways the number of triples $(A, B, C)$ of people such that $A$ exchanged greetings with both $B$ and $C$, but $B$ and $C$ mutually did not. There are $12 k$ possibilities for $A$, and for each $A$ there are $(3 k+6)$ possibilities for $B$. Since there are $n$ people who exchanged greetings with both $A$ and $B$, there are $3 k+5-n$ who did so with $A$ but not with $B$. Thus the number of triples $(A, B, C)$ is $12 k(3 k+6)(3 k+5-n)$. On the other hand, there are $12 k$ possible choices of $B$, and $12 k-1-(3 k+6)=9 k-7$ possible choices of $C$; for every $B, C, A$ can be chosen in $n$ ways, so the number of considered triples equals $12 k n(9 k-7)$. Hence $(3 k+6)(3 k+5-n)=n(9 k-7)$, i.e., $n=\frac{3(k+2)(3 k+5)}{12 k-1}$. This gives us that $\frac{4 n}{3}=\frac{12 k^{2}+44 k+40}{12 k-1}=k+4-\frac{3 k-44}{12 k-1}$ is an integer too. It is directly verified that only $k=3$ gives an integer value for $n$, namely $n=6$. Remark. The solution is complete under the assumption that such a $k$ exists. We give an example of such a party with 36 persons, $k=3$. Let the people sit in a $6 \times 6$ array $\left[P_{i j}\right]_{i, j=1}^{6}$, and suppose that two persons $P_{i j}, P_{k l}$ exchanged greetings if and only if $i=k$ or $j=l$ or $i-j \equiv k-l$ (mod 6). Thus each person exchanged greetings with exactly 15 others, and it is easily verified that this party satisfies the conditions.


2. A2 (SWE) Let $a$ and $b$ be nonnegative integers such that $a b \geq c^{2}$, where $c$ is an integer. Prove that there is a number $n$ and integers $x_{1}, x_{2}, \ldots, x_{n}, y_{1}, y_{2}, \ldots, y_{n}$ such that  $$ \sum_{i=1}^{n} x_{i}^{2}=a, \quad \sum_{i=1}^{n} y_{i}^{2}=b, \quad \text { and } \quad \sum_{i=1}^{n} x_{i} y_{i}=c $$

Solution: 2. We may assume $c \geq 0$ (otherwise, we may simply put $-y_{i}$ in the place of $\left.y_{i}\right)$. Also, we may assume $a \geq b$. If $b \geq c$, it is enough to take $n=a+b-c$, $x_{1}=\cdots=x_{a}=1, y_{1}=\cdots=y_{c}=y_{a+1}=\cdots=y_{a+b-c}=1$, and the other $x_{i}$ 's and $y_{i}$ 's equal to 0 , so we need only consider the case $a>c>b$. We proceed to prove the statement of the problem by induction on $a+b$. The case $a+b=1$ is trivial. Assume that the statement is true when $a+b \leq$ $N$, and let $a+b=N+1$. The triple $(a+b-2 c, b, c-b)$ satisfies the condition (since $(a+b-2 c) b-(c-b)^{2}=a b-c^{2}$ ), so by the induction hypothesis there are $n$-tuples $\left(x_{i}\right)_{i=1}^{n}$ and $\left(y_{i}\right)_{i=1}^{n}$ with the wanted property. It is easy to verify that $\left(x_{i}+y_{i}\right)_{i=1}^{n}$ and $\left(y_{i}\right)_{i=1}^{n}$ give a solution for $(a, b, c)$.


20. N6 (POL) ${ }^{\mathrm{IMO} 06}$ Let $p$ be an odd prime. Find the number of $p$-element subsets $A$ of $\{1,2, \ldots, 2 p\}$ such that the sum of all elements of $A$ is divisible by $p$.

Solution: 20. We shall consider the set $M=\{0,1, \ldots, 2 p-1\}$ instead. Let $M_{1}=$ $\{0,1, \ldots, p-1\}$ and $M_{2}=\{p, p+1, \ldots, 2 p-1\}$. We shall denote by $|A|$ and $\sigma(A)$ the number of elements and the sum of elements of the set $A$; also, let $C_{p}$ be the family of all $p$-element subsets of $M$. Define the mapping $T: C_{p} \rightarrow C_{p}$ as $T(A)=\left\{x+1 \mid x \in A \cap M_{1}\right\} \cup\left\{A \cap M_{2}\right\}$, the addition being modulo $p$. There are exactly two fixed points of $T$ : these are $M_{1}$ and $M_{2}$. Now if $A$ is any subset from $C_{p}$ distinct from $M_{1}, M_{2}$, and $k=\left|A \cap M_{1}\right|$ with $1 \leq k \leq p-1$, then for $i=0,1, \ldots, p-1$, $\sigma\left(T^{i}(A)\right)=\sigma(A)+i k(\bmod p)$. Hence subsets $A, T(A), \ldots, T^{p-1}(A)$ are distinct, and exactly one of them has sum of elements divisible by $p$. Since $\sigma\left(M_{1}\right), \sigma\left(M_{2}\right)$ are divisible by $p$ and $C_{p} \backslash\left\{M_{1}, M_{2}\right\}$ decomposes into families of the form $\left\{A, T(A), \ldots, T^{p-1}(A)\right\}$, we conclude that the required number is $\frac{1}{p}\left(\left|C_{p}\right|-2\right)+2=\frac{1}{p}\left(\binom{2 p}{p}-2\right)+2$. Second solution. Let $C_{k}$ be the family of all $k$-element subsets of $\{1,2, \ldots, 2 p\}$. Denote by $M_{k}(k=1,2, \ldots, p)$ the family of $p$-element multisets with $k$ distinct elements from $\{1,2, \ldots, 2 p\}$, exactly one of which appears more than once, that have sum of elements divisible by $p$. It is clear that every subset from $C_{k}, k<p$, can be complemented to a multiset from $M_{k} \cup M_{k+1}$ in exactly two ways, since the equation $(p-k) a \equiv 0(\bmod p)$ has exactly two solutions in $\{1,2, \ldots, 2 p\}$. On the other hand, every multiset from $M_{k}$ can be obtained by completing exactly one subset from $C_{k}$. Additionally, a multiset from $M_{k}$ can be obtained from exactly one subset from $C_{k-1}$ if $k<p$, and from exactly $p$ subsets from $C_{k-1}$ if $k=p$. Therefore $\left|M_{k}\right|+\left|M_{k+1}\right|=2\left|C_{k}\right|=2\binom{2 p}{k}$ for $k=1,2, \ldots, p-2$, and $\left|M_{p-1}\right|+p\left|M_{p}\right|=2\left|C_{p-1}\right|=2\binom{2 p}{p-1}$. Since $M_{1}=2 p$, it is not difficult to show using recursion that $\left|M_{p}\right|=\frac{1}{p}\left(\binom{2 p}{p}-2\right)+2$.  Third solution. Let $\omega=\cos \frac{2 \pi}{p}+i \sin \frac{2 \pi}{p}$. We have $\prod_{i=1}^{2 p}\left(x-\omega^{i}\right)=$ $\left(x^{p}-1\right)^{2}=x^{2 p}-2 x^{p}+1$; hence comparing the coefficients at $x^{p}$, we obtain $\sum \omega^{i_{1}+\cdots+i_{p}}=\sum_{i=0}^{p-1} a_{i} \omega^{i}=2$, where the first sum runs over all $p$-subsets $\left\{i_{1}, \ldots, i_{p}\right\}$ of $\{1, \ldots, 2 p\}$, and $a_{i}$ is the number of such subsets for which $i_{1}+\cdots+i_{p} \equiv i(\bmod p)$. Setting $q(x)=-2+\sum_{i=0}^{p-1} a_{i} x^{i}$, we obtain $q\left(\omega^{j}\right)=0$ for $j=1,2, \ldots, p-1$. Hence $1+x+\cdots+x^{p-1} \mid q(x)$, and since deg $q=p-1$, we have $q(x)=-2+\sum_{i=0}^{p-1} a_{i} x^{i}=c\left(1+x+\cdots+x^{p-1}\right)$ for some constant $c$. Thus $a_{0}-2=a_{1}=\cdots=a_{p-1}$, which together with $a_{0}+\cdots+a_{p-1}=\binom{2 p}{p}$ yields $a_{0}=\frac{1}{p}\left(\binom{2 p}{p}-2\right)+2$.


21. N7 (BLR) Does there exist an integer $n>1$ that satisfies the following condition? The set of positive integers can be partitioned into $n$ nonempty subsets such that an arbitrary sum of $n-1$ integers, one taken from each of any $n-1$ of the subsets, lies in the remaining subset.

Solution: 21. We shall show that there is no such $n$. Certainly, $n=2$ does not work, so suppose $n \geq 3$. Let $a, b$ be distinct elements of $A_{1}$, and $c$ any integer greater than $-a$ and $-b$. We claim that $a+c, b+c$ belong to the same subsets. Suppose to the contrary that $a+c \in A_{1}$ and $b+c \in A_{2}$, and take arbitrary elements $x_{i} \in A_{i}, i=3, \ldots, n$. The number $b+x_{3}+\cdots+x_{n}$ is in $A_{2}$, so that $s=(a+c)+\left(b+x_{3}+\cdots+x_{n}\right)+x_{4}+\cdots+x_{n}$ must be in $A_{3}$. On the other hand, $a+x_{3}+\cdots+x_{n} \in A_{2}$, so $s=\left(a+x_{3}+\cdots+x_{n}\right)+$ $(b+c)+x_{4}+\cdots+x_{n}$ is in $A_{1}$, a contradiction. Similarly, if $a+c \in A_{2}$ and $b+c \in A_{3}$, then $s=a+(b+c)+x_{4}+\cdots+x_{n}$ belongs to $A_{2}$, but also $s=b+(a+c)+x_{4}+\cdots+x_{n} \in A_{3}$, which is impossible. For $i=1, \ldots, n$ choose $x_{i} \in A_{i}$; set $s=x_{1}+\cdots+x_{n}$ and $y_{i}=s-x_{i}$. Then $y_{i} \in A_{i}$. By what has been proved above, $2 x_{i}=x_{i}+x_{i}$ belongs to the same subset as $x_{i}+y_{i}=s$ does. It follows that all numbers $2 x_{i}, i=1, \ldots, n$, are in the same subset. Since we can arbitrarily take $x_{i}$ from each set $A_{i}$, it follows that all even numbers belong to the same set, say $A_{1}$. Similarly, $2 x_{i}+1=\left(x_{i}+1\right)+x_{i}$ is in the subset to which $\left(x_{i}+1\right)+y_{i}=s+1$ belongs for all $i=1, \ldots, n$; hence all odd numbers greater than 1 are in the same subset, say $A_{2}$. By the above considerations, $3-2=1 \in A_{2}$ also. But then nothing remains in $A_{3}, \ldots, A_{n}$, a contradiction.


22. N8 (GER) Let $p$ be an odd prime. Determine positive integers $x$ and $y$ for which $x \leq y$ and $\sqrt{2 p}-\sqrt{x}-\sqrt{y}$ is nonnegative and as small as possible.

Solution: 22. Let $u=\sqrt{2 p}-\sqrt{x}-\sqrt{y}$ and $v=u(2 \sqrt{2 p}-u)=2 p-(\sqrt{2 p}-u)^{2}=$ $2 p-x-y-\sqrt{4 x y}$ for $x, y \in \mathbb{N}, x \leq y$. Obviously $u \geq 0$ if and only if $v \geq 0$, and $u, v$ attain minimum positive values simultaneously. Note that $v \neq 0$. Otherwise $u=0$ too, so $y=(\sqrt{2 p}-\sqrt{x})^{2}=2 p-x-2 \sqrt{2 p x}$, which implies that $2 p x$ is a square, and consequently $x$ is divisible by $2 p$, which is impossible. Now let $z$ be the smallest integer greater than $\sqrt{4 x y}$. We have $z^{2}-1 \geq 4 x y$, $z \leq 2 p-x-y$, and $z \leq p$ because $\sqrt{4 x y} \leq(\sqrt{x}+\sqrt{y})^{2}<2 p$. It follows that  $$ v=2 p-x-y-\sqrt{4 x y} \geq z-\sqrt{z^{2}-1}=\frac{1}{z+\sqrt{z^{2}-1}} \geq \frac{1}{p+\sqrt{p^{2}-1}} $$  Equality holds if and only if $z=x+y=p$ and $4 x y=p^{2}-1$, which is satisfied only when $x=\frac{p-1}{2}$ and $y=\frac{p+1}{2}$. Hence for these values of $x, y$, both $u$ and $v$ attain positive minima.


23. S1 (UKR) Does there exist a sequence $F(1), F(2), F(3), \ldots$ of nonnegative integers that simultaneously satisfies the following three conditions? (a) Each of the integers $0,1,2, \ldots$ occurs in the sequence. (b) Each positive integer occurs in the sequence infinitely often. (c) For any $n \geq 2$,  $$ F\left(F\left(n^{163}\right)\right)=F(F(n))+F(F(361)) . $$

Solution: 23. By putting $F(1)=0$ and $F(361)=1$, condition (c) becomes $F\left(F\left(n^{163}\right)\right)=$ $F(F(n))$ for $n \geq 2$. For $n=2,3, \ldots, 360$ let $F(n)=n$, and inductively define $F(n)$ for $n \geq 362$ as follows:  $$ F(n)= \begin{cases}F(m), & \text { if } n=m^{163}, m \in \mathbb{N} ; \\ \text { the least number not in }\{F(k) \mid k<n\}, & \text { otherwise }\end{cases} $$  Obviously, (a) each nonnegative integer appears in the sequence because there are infinitely many numbers not of the form $m^{163}$, and (b) each positive integer appears infinitely often because $F\left(m^{163}\right)=F(m)$. Since $F\left(n^{163}\right)=F(n),(c)$ also holds. Second solution. Another example of such a sequence is as follows: If $n=$ $p_{1}^{\alpha_{1}} p_{2}^{\alpha_{2}} \cdots p_{k}^{\alpha_{k}}$, is the factorization of $n$ into primes, we put $F(n)=\alpha_{1}+$ $\alpha_{2}+\cdots+\alpha_{k}$ and $F(1)=0$. Conditions (a) and (b) are evidently satisfied for this $F$, while (c) follows from $F\left(F\left(n^{163}\right)\right)=F(163 F(n))=F(F(n))+1$ (because 163 is a prime) and $F(F(361))=F\left(F\left(19^{2}\right)\right)=F(2)=1$.


Solution: 24. The given condition is equivalent to $\left(2 x_{i}-x_{i-1}\right)\left(x_{i} x_{i-1}-1\right)=0$, so either $x_{i}=\frac{1}{2} x_{i-1}$ or $x_{i}=\frac{1}{x_{i-1}}$. We shall show by induction on $n$ that for any $n \geq 0, x_{n}=2^{k_{n}} x_{0}^{e_{n}}$ for some integer $k_{n}$, where $\left|k_{n}\right| \leq n$ and $e_{n}=(-1)^{n-k_{n}}$. Indeed, this is true for $n=0$. If it holds for some $n$, then $x_{n+1}=\frac{1}{2} x_{n}=2^{k_{n}-1} x_{0}^{e_{n}}$ (hence $k_{n+1}=k_{n}-1$ and $e_{n+1}=e_{n}$ ) or $x_{n+1}=\frac{1}{x_{n}}=2^{-k_{n}} x_{0}^{-e_{n}}$ (hence $k_{n+1}=-k_{n}$ and $e_{n+1}=-e_{n}$ ). Thus $x_{0}=x_{1995}=2^{k_{1995}} x_{0}^{e_{1995}}$. Note that $e_{1995}=1$ is impossible, since in that case $k_{1995}$ would be odd, although it should equal 0 . Therefore $e^{1995}=-1$, which gives $x_{0}^{2}=2^{k_{1995}} \leq 2^{1994}$, so the maximal value that $x_{0}$ can have is $2^{997}$. This value is attained in the case $x_{i}=2^{997-i}$ for $i=0, \ldots, 997$ and $x_{i}=2^{i-998}$ for $i=998, \ldots, 1995$. Second solution. First we show that there is an $n, 0 \leq n \leq 1995$, such that $x_{n}=1$. Suppose the contrary. Then each of $x_{n}$ belongs to one of the intervals $I_{-i-1}=\left[2^{-i-1}, 2^{-i}\right)$ or $I_{i}=\left(2^{i}, 2^{i+1}\right]$, where $i=0,1,2, \ldots$ Let $x_{n} \in I_{i_{n}}$. Note that by the formula for $x_{n}, i_{n}$ and $i_{n-1}$ are of different parity. Hence $i_{0}$ and $i_{1995}$ are also of different parity, contradicting $x_{0}=$ $x_{1995}$. It follows that for some $n, x_{n}=1$. Now if $n \leq 997$, then $x_{0} \leq 2^{997}$, while if $n \geq 998$, we also have $x_{0}=x_{1995} \leq 2^{997}$.


25. S3 (POL) For an integer $x \geq 1$, let $p(x)$ be the least prime that does not divide $x$, and define $q(x)$ to be the product of all primes less than $p(x)$. In particular, $p(1)=2$. For $x$ such that $p(x)=2$, define $q(x)=1$. Consider the sequence $x_{0}, x_{1}, x_{2}, \ldots$ defined by $x_{0}=1$ and  $$ x_{n+1}=\frac{x_{n} p\left(x_{n}\right)}{q\left(x_{n}\right)} $$  for $n \geq 0$. Find all $n$ such that $x_{n}=1995$.

Solution: 25. By the definition of $q(x)$, it divides $x$ for all integers $x>0$, so $f(x)=$ $x p(x) / q(x)$ is a positive integer too. Let $\left\{p_{0}, p_{1}, p_{2}, \ldots\right\}$ be all prime numbers in increasing order. Since it easily follows by induction that all $x_{n}$ 's are square-free, we can assign to each of them a unique code according to which primes divide it: if $p_{m}$ is the largest prime dividing $x_{n}$, the code corresponding to $x_{n}$ will be $\ldots 0 s_{m} s_{m-1} \ldots s_{0}$, with $s_{i}=1$ if $p_{i} \mid x_{n}$ and $s_{i}=0$ otherwise. Let us investigate how $f$ acts on these codes. If the code of $x_{n}$ ends with 0 , then $x_{n}$ is odd, so the code of $f\left(x_{n}\right)=x_{n+1}$ is obtained from that of $x_{n}$ by replacing $s_{0}=0$ by $s_{0}=1$. Furthermore, if the code of $x_{n}$ ends with $011 \ldots 1$, then the code of $x_{n+1}$ ends with $100 \ldots 0$ instead. Thus if we consider the codes as binary numbers, $f$ acts on them as an addition of 1 . Hence the code of $x_{n}$ is the binary representation of $n$ and thus $x_{n}$ uniquely determines $n$. Specifically, if $x_{n}=1995=3 \cdot 5 \cdot 7 \cdot 19$, then its code is 10001110 and corresponds to $n=142$.


26. S4 (NZL) Suppose that $x_{1}, x_{2}, x_{3}, \ldots$ are positive real numbers for which  $$ x_{n}^{n}=\sum_{j=0}^{n-1} x_{n}^{j} $$  for $n=1,2,3, \ldots$ Prove that for all $n$,  $$ 2-\frac{1}{2^{n-1}} \leq x_{n}<2-\frac{1}{2^{n}} $$

Solution: 26. For $n=1$ the result is trivial, since $x_{1}=1$. Suppose now that $n \geq 2$ and let $f_{n}(x)=x^{n}-\sum_{i=0}^{n-1} x^{i}$. Note that $x_{n}$ is the unique positive real root of $f_{n}$, because $\frac{f_{n}(x)}{x^{n-1}}=x-1-\frac{1}{x}-\cdots-\frac{1}{x^{n-1}}$ is strictly increasing on $\mathbb{R}^{+}$. Consider $g_{n}(x)=(x-1) f_{n}(x)=(x-2) x^{n}+1$. Obviously $g_{n}(x)$ has no positive roots other than 1 and $x_{n}>1$. Observe that $\left(1-\frac{1}{2^{n}}\right)^{n}>$ $1-\frac{n}{2^{n}} \geq \frac{1}{2}$ for $n \geq 2$ (by Bernoulli's inequality). Since then  $$ g_{n}\left(2-\frac{1}{2^{n}}\right)=-\frac{1}{2^{n}}\left(2-\frac{1}{2^{n}}\right)^{n}+1=1-\left(1-\frac{1}{2^{n+1}}\right)^{n}>0 $$  and  $$ g_{n}\left(2-\frac{1}{2^{n-1}}\right)=-\frac{1}{2^{n-1}}\left(2-\frac{1}{2^{n-1}}\right)^{n}+1=1-2\left(1-\frac{1}{2^{n}}\right)^{n}<0 $$  we conclude that $x_{n}$ is between $2-\frac{1}{2^{n-1}}$ and $2-\frac{1}{2^{n}}$, as required. Remark. Moreover, $\lim _{n \rightarrow \infty} 2^{n}\left(2-x_{n}\right)=1$.


27. S5 (FIN) For positive integers $n$, the numbers $f(n)$ are defined inductively as follows: $f(1)=1$, and for every positive integer $n, f(n+1)$ is the greatest integer $m$ such that there is an arithmetic progression of positive integers $a_{1}<a_{2}<\cdots<a_{m}=n$ for which  $$ f\left(a_{1}\right)=f\left(a_{2}\right)=\cdots=f\left(a_{m}\right) $$  Prove that there are positive integers $a$ and $b$ such that $f(a n+b)=n+2$ for every positive integer $n$.

Solution: 27. Computing the first few values of $f(n)$, we observe the following pattern:  $$ \begin{aligned} f(4 k) & =k, k \geq 3, & f(8) & =3 ; \\ f(4 k+1) & =1, k \geq 4, & f(5) & =f(13)=2 ; \\ f(4 k+2) & =k-3, k \geq 7, & f(2) & =1, f(6)=f(10)=2, \\ & & f(14) & =f(18)=3, f(26)=4 ; \\ f(4 k+3) & =2 . & & \end{aligned} $$  We shall prove these statements simultaneously by induction on $n$, having verified them for $k \leq 7$. (i) Let $n=4 k$. Since $f(3)=f(7)=\cdots=f(4 k-1)=2$, we have $f(4 k) \geq k$. But $f(n) \leq \max _{m<n} f(m)+1 \leq(k-1)+1$, so $f(4 k)=k$. (ii) Let $n=4 k+1, k \geq 7$. Since $f(4 k)=k$ and $f(m)<k$ for $m<4 k$, we deduce that $f(4 k+1)=1$. (iii) Let $n=4 k+2, k \geq 7$. Since $f(17)=f(21)=\cdots=f(4 k+1)=1$, we obtain $f(4 k+2) \geq k-3$. On the other hand, if $f(4 k+1)=f(4 k+1-$ $d)=1$, then $d \geq 8$, and $4 k+1-8(k-3)<0$. So $f(4 k+2)=k-3$. (iv) Let $n=4 k+3, k \geq 7$. We have $f(4 k+2)=k-3$ and $f(m)=k-3$ for exactly one $m<4 k+2$ (namely for $m=4 k-12)$; hence $f(4 k+3)=2$. Therefore, for example, $f(4 n+8)=n+2$ for all $n$; hence we can take $a=4$ and $b=8$.


28. S6 (IND) Let $\mathbb{N}$ denote the set of all positive integers. Prove that there exists a unique function $f: \mathbb{N} \rightarrow \mathbb{N}$ satisfying  $$ f(m+f(n))=n+f(m+95) $$  for all $m$ and $n$ in $\mathbb{N}$. What is the value of $\sum_{k=1}^{19} f(k)$ ?

Solution: 28. Let $F(x)=f(x)-95$ for $x \geq 1$. Writing $k$ for $m+95$, the given condition becomes  $$ F(k+F(n))=F(k)+n, \quad k \geq 96, n \geq 1 $$  Thus for $x, z \geq 96$ and an arbitrary $y$ we have $F(x+y)+z=F(x+$ $y+F(z))=F(x+F(F(y)+z))=F(x)+F(y)+z$, and consequently $F(x+y)=F(x)+F(y)$ whenever $x \geq 96$. Moreover, since then $F(x+$ $y)+F(96)=F(x+y+96)=F(x)+F(y+96)=F(x)+F(y)+F(96)$ for any $x, y$, we obtain  $$ F(x+y)=F(x)+F(y), \quad x, y \in \mathbb{N} . $$  It follows by induction that $F(n)=n c$ for all $n$, where $F(1)=c$. Equation (1) becomes $c k+c^{2} n=c k+n$, and yields $c=1$. Hence $F(n)=n$ and $f(n)=n+95$ for all $n$. Finally, $\sum_{k=1}^{19} f(k)=96+97+\cdots+114=1995$. Second solution. First we show that $f(n)>95$ for all $n$. If to the contrary $f(n) \leq 95$, we have $f(m)=n+f(m+95-f(n))$, so by induction $f(m)=k n+f(m+k(95-f(n))) \geq k n$ for all $k$, which is impossible. Now for $m>95$ we have $f(m+f(n)-95)=n+f(m)$, and again by induction $f(m+k(f(n)-95))=k n+f(m)$ for all $m, n, k$. It follows that with $n$ fixed,  $$ (\forall m) \lim _{k \rightarrow \infty} \frac{f(m+k(f(n)-95))}{m+k(f(n)-95)}=\frac{n}{f(n)-95} $$  hence  $$ \lim _{s \rightarrow \infty} \frac{f(s)}{s}=\frac{n}{f(n)-95} $$  Hence $\frac{n}{f(n)-95}$ does not depend on $n$, i.e., $f(n) \equiv c n+95$ for some constant $c$. It is easily checked that only $c=1$ is possible.


Solution: 3. Write $A_{i}=\frac{a_{i}^{2}+a_{i+1}^{2}-a_{i+2}^{2}}{a_{i}+a_{i+1}-a_{i+2}}=a_{i}+a_{i+1}+a_{i+2}-\frac{2 a_{i} a_{i+1}}{a_{i}+a_{i+1}-a_{i+2}}$. Since $2 a_{i} a_{i+1} \geq$ $4\left(a_{i}+a_{i+1}-2\right)$ (which is equivalent to $\left.\left(a_{i}-2\right)\left(a_{i+1}-2\right) \geq 0\right)$, it follows that $A_{i} \leq a_{i}+a_{i+1}+a_{i+2}-4\left(1+\frac{a_{i+2}-2}{a_{i}+a_{i+1}-a_{i+2}}\right) \leq a_{i}+a_{i+1}+a_{i+2}-$ $4\left(1+\frac{a_{i+2}-2}{4}\right)$, because $1 \leq a_{i}+a_{i+1}-a_{i+2} \leq 4$. Therefore $A_{i} \leq a_{i}+$ $a_{i+1}-2$, so $\sum_{i=1}^{n} A_{i} \leq 2 s-2 n$ as required.


4. A4 (USA) Let $a, b$, and $c$ be given positive real numbers. Determine all positive real numbers $x, y$, and $z$ such that  $$ x+y+z=a+b+c $$  and  $$ 4 x y z-\left(a^{2} x+b^{2} y+c^{2} z\right)=a b c $$

Solution: 4. The second equation is equivalent to $\frac{a^{2}}{y z}+\frac{b^{2}}{z x}+\frac{c^{2}}{x y}+\frac{a b c}{x y z}=4$. Let $x_{1}=$ $\frac{a}{\sqrt{y z}}, y_{1}=\frac{b}{\sqrt{z x}}, z_{1}=\frac{c}{\sqrt{x y}}$. Then $x_{1}^{2}+y_{1}^{2}+z_{1}^{2}+x_{1} y_{1} z_{1}=4$, where $0<x_{1}, y_{1}, z_{1}<2$. Regarding this as a quadratic equation in $z_{1}$, the discriminant $\left(4-x_{1}^{2}\right)\left(4-y_{1}^{2}\right)$ suggests that we let $x_{1}=2 \sin u, y_{1}=2 \sin v$, $0<u, v<\pi / 2$. Then it is directly shown that $z_{1}$ will be exactly $2 \cos (u+v)$ as the only positive solution of the quadratic equation. Thus $a=2 \sqrt{y z} \sin u, b=2 \sqrt{x z} \sin v, c=2 \sqrt{x y}(\cos u \cos v-\sin u \sin v)$, so from $x+y+z-a-b-c=0$ we obtain  $$ (\sqrt{x} \cos v-\sqrt{y} \cos u)^{2}+(\sqrt{x} \sin v+\sqrt{y} \sin u-\sqrt{z})^{2}=0 $$  which implies $\sqrt{z}=\sqrt{x} \sin v+\sqrt{y} \sin u=\frac{1}{2}\left(y_{1} \sqrt{x}+x_{1} \sqrt{y}\right)=\frac{1}{2}\left(\frac{b}{\sqrt{z x}} \sqrt{x}+\frac{a}{\sqrt{y z}} \sqrt{y}\right)$. Therefore $z=\frac{a+b}{2}$. Similarly, $x=\frac{b+c}{2}$ and $y=\frac{c+a}{2}$. It is clear that the triple $(x, y, z)=\left(\frac{b+c}{2}, \frac{c+a}{2}, \frac{a+b}{2}\right)$ is indeed a (unique) solution of the given system of equations. Second solution. Put $x=\frac{b+c}{2}-u, y=\frac{c+a}{2}-v, z=\frac{a+b}{2}-w$, where $u \leq \frac{b+c}{2}, v \leq \frac{c+a}{2}, w \leq \frac{a+b}{2}$ and $u+v+w=0$. The equality $a b c+$ $a^{2} x+b^{2} y+c^{2} z=4 x y z$ becomes $2\left(a u^{2}+b v^{2}+c w^{2}+2 u v w\right)=0$. Now $u v w>0$ is clearly impossible. On the other hand, if $u v w \leq 0$, then two of $u, v, w$ are nonnegative, say $u, v \geq 0$. Taking into account $w=-u-v$, the above equality reduces to $2\left[(a+c-2 v) u^{2}+(b+c-2 u) v^{2}+2 c u v\right]=0$, so $u=v=0$.  Third solution. The fact that we are given two equations and three variables suggests that this is essentially a problem on inequalities. Setting $f(x, y, z)=4 x y z-a^{2} x-b^{2} y-c^{2} z$, we should show that $\max f(x, y, z)=$ $a b c$, for $0<x, y, z, x+y+z=a+b+c$, and find when this value is attained. Thus we apply Lagrange multipliers to $F(x, y, z)=f(x, y, z)-$ $\lambda(x+y+z-a-b-c)$, and obtain that $f$ takes a maximum at $(x, y, z)$ such that $4 y z-a^{2}=4 z x-b^{2}=4 x y-c^{2}=\lambda$ and $x+y+z=a+b+c$. The only solution of this system is $(x, y, z)=\left(\frac{b+c}{2}, \frac{c+a}{2}, \frac{a+b}{2}\right)$.


5. A5 (UKR) Let $\mathbb{R}$ be the set of real numbers. Does there exist a function $f: \mathbb{R} \rightarrow \mathbb{R}$ that simultaneously satisfies the following three conditions? (a) There is a positive number $M$ such that $-M \leq f(x) \leq M$ for all $x$. (b) $f(1)=1$. (c) If $x \neq 0$, then  $$ f\left(x+\frac{1}{x^{2}}\right)=f(x)+\left[f\left(\frac{1}{x}\right)\right]^{2} $$

Solution: 5. Suppose that a function $f$ satisfies the condition, and let $c$ be the least upper bound of $\{f(x) \mid x \in \mathbb{R}\}$. We have $c \geq 2$, since $f(2)=f(1+$ $\left.1 / 1^{2}\right)=f(1)+f(1)^{2}=2$. Also, since $c$ is the least upper bound, for each $k=1,2, \ldots$ there is an $x_{k} \in \mathbb{R}$ such that $f\left(x_{k}\right) \geq c-1 / k$. Then  $$ c \geq f\left(x_{k}+\frac{1}{x_{k}^{2}}\right) \geq c-\frac{1}{k}+f\left(\frac{1}{x_{k}}\right)^{2} \Longrightarrow f\left(\frac{1}{x_{k}}\right) \geq-\frac{1}{\sqrt{k}} . $$  On the other hand,  $$ c \geq f\left(\frac{1}{x_{k}}+x_{k}^{2}\right)=f\left(\frac{1}{x_{k}}\right)+f\left(x_{k}\right)^{2} \geq-\frac{1}{\sqrt{k}}+\left(c-\frac{1}{k}\right)^{2} . $$  It follows that  $$ \frac{1}{\sqrt{k}}-\frac{1}{k^{2}} \geq c\left(c-1-\frac{2}{k}\right) $$  which cannot hold for $k$ sufficiently large. Second solution. Assume that $f$ exists and let $n$ be the least integer such that $f(x) \leq \frac{n}{4}$ for all $x$. Since $f(2)=2$, we have $n \geq 8$. Let $f(x)>\frac{n-1}{4}$. Then $f(1 / x)=f\left(x+1 / x^{2}\right)-f(x)<1 / 4$, so $f(1 / x)>-1 / 2$. On the other hand, this implies $\left(\frac{n-1}{4}\right)^{2}<f(x)^{2}=f\left(1 / x+x^{2}\right)-f(1 / x)<\frac{n}{4}+\frac{1}{2}$, which is impossible when $n \geq 8$.


6. A6 (JAP) Let $n$ be an integer, $n \geq 3$. Let $x_{1}, x_{2}, \ldots, x_{n}$ be real numbers such that $x_{i}<x_{i+1}$ for $1 \leq i \leq n-1$. Prove that  $$ \frac{n(n-1)}{2} \sum_{i<j} x_{i} x_{j}>\left(\sum_{i=1}^{n-1}(n-i) x_{i}\right)\left(\sum_{j=2}^{n}(j-1) x_{j}\right) . $$

Solution: 6. Let $y_{i}=x_{i+1}+\cdots+x_{n}, Y=\sum_{j=2}^{n}(j-1) x_{j}$, and $z_{i}=\frac{n(n-1)}{2} y_{i}-(n-$ $i) Y$. Then $\frac{n(n-1)}{2} \sum_{i<j} x_{i} x_{j}-\left(\sum_{i=1}^{n-1}(n-i) x_{i}\right) Y=\frac{n(n-1)}{2} \sum_{i=1}^{n-1} x_{i} y_{i}-$ $\sum_{i=1}^{n-1}(n-i) x_{i} Y=\sum_{i=1}^{n-1} x_{i} z_{i}$, so it remains to show that $\sum_{i=1}^{n-1} x_{i} z_{i}>0$. Since $\sum_{i=1}^{n-1} y_{i}=Y$ and $\sum_{i=1}^{n-1}(n-i)=\frac{n(n-1)}{2}$, we have $\sum z_{i}=0$. Note that $Y<\sum_{j=2}^{n}(j-1) x_{n}=\frac{n(n-1)}{2} x_{n}$, and consequently $z_{n-1}=$ $\frac{n(n-1)}{2} x_{n}-Y>0$. Furthermore, we have  $$ \frac{z_{i+1}}{n-i-1}-\frac{z_{i}}{n-i}=\frac{n(n-1)}{2}\left(\frac{y_{i+1}}{n-i-1}-\frac{y_{i}}{n-i}\right)>0 $$  which means that $\frac{z_{1}}{n-1}<\frac{z_{2}}{n-2}<\cdots<\frac{z_{n-1}}{1}$. Therefore there is a $k$ for which $z_{1}, \ldots, z_{k} \leq 0$ and $z_{k+1}, \ldots, z_{n-1}>0$. But then $z_{i}\left(x_{i}-x_{k}\right) \geq 0$, i.e., $x_{i} z_{i} \geq x_{k} z_{i}$ for all $i$, so $\sum_{i=1}^{n-1} x_{i} z_{i}>\sum_{i=1}^{n-1} x_{k} z_{i}=0$ as required.  Second solution. Set $X=\sum_{j=1}^{n-1}(n-j) x_{j}$ and $Y=\sum_{j=2}^{n}(j-1) x_{j}$. Since $4 X Y=(X+Y)^{2}-(X-Y)^{2}$, the RHS of the inequality becomes  $$ X Y=\frac{1}{4}\left[(n-1)^{2}\left(\sum_{i=1}^{n} x_{i}\right)^{2}-\left(\sum_{i=1}^{n}(2 i-1-n) x_{i}\right)^{2}\right] $$  The LHS equals $\frac{1}{4}\left((n-1)^{2}\left(\sum_{i=1}^{n} x_{i}\right)^{2}-(n-1) \sum_{i<j}\left(x_{j}-x_{i}\right)^{2}\right)$. Since $\sum_{i=1}^{n}(2 i-1-n) x_{i}=\sum_{i<j}\left(x_{j}-x_{i}\right)$ also holds, we must prove that  $$ \left(\sum_{i<j}\left(x_{j}-x_{i}\right)\right)^{2}>(n-1) \sum_{i<j}\left(x_{j}-x_{i}\right)^{2} $$  Putting $x_{i+1}-x_{i}=d_{i}>0$ (so, $x_{j}-x_{i}=d_{i}+d_{i+1}+\cdots+d_{j-1}$ ) and expanding the obtained expressions, we reduce this inequality to $\sum_{k} k^{2}(n-k)^{2} d_{k}^{2}+2 \sum_{k<l} k l(n-k)(n-l) d_{k} d_{l}>\sum_{k}(n-1) k(n-k) d_{k}^{2}+$ $2 \sum_{k<l}(n-1) k(n-l) d_{k} d_{l}$, which is verified immediately by comparing coefficients. Remark. An inequality significantly stronger than (1) in the second solution has appeared later, as IMO 03-5.


7. G1 (BUL) ${ }^{\mathrm{IMO} 1}$ Let $A, B, C$, and $D$ be distinct points on a line, in that order. The circles with diameters $A C$ and $B D$ intersect at $X$ and $Y . O$ is an arbitrary point on the line $X Y$ but not on $A D$. $C O$ intersects the circle with diameter $A C$ again at $M$, and $B O$ intersects the other circle again at $N$. Prove that the lines $A M, D N$, and $X Y$ are concurrent.

Solution: 7. The result is trivial if $O$ coincides with $X$ or $Y$, so let us assume it does not. From $O B \cdot O N=O C \cdot O M=O X \cdot O Y$ we deduce that $B C M N$ is a cyclic quadrilateral. Further, if $O$ lies between $X$ and $Y$, then $\angle M A D+$ $\angle M N D=\angle M A D+\angle M N B+\angle B N D=\angle M A D+\angle M C A+\angle A M C=$ $180^{\circ}$. Similarly, we also have $\angle M A D+\angle M N D=180^{\circ}$ if $O$ is not on the segment $X Y$. Therefore $A D N M$ is cyclic. Now let $A M$ and $D N$ intersect at $Z$ and let the line $Z X$ intersect the two circles at $Y_{1}$ and $Y_{2}$. Then $Z X \cdot Z Y_{1}=Z M \cdot Z A=Z N \cdot Z D=Z X \cdot Z Y_{2}$. Hence $Y_{1}=Y_{2}=Y$, implying that $Z$ lies on $X Y$.  Second solution. Let $Z_{1}, Z_{2}$ be the points in which $A M, D N$ respectively meet $X Y$, and $P=B C \cap X Y$. Then, from $\triangle O P C \sim \triangle A P Z_{1}$, we have $P Z_{1}=\frac{P A \cdot P C}{P O}=\frac{P X^{2}}{P O}$ and analogously $P Z_{2}=\frac{P X^{2}}{P O}$. Hence, we conclude that $Z_{1} \equiv Z_{2}$.


8. G2 (GER) Let $A, B$, and $C$ be noncollinear points. Prove that there is a unique point $X$ in the plane of $A B C$ such that $X A^{2}+X B^{2}+A B^{2}=$ $X B^{2}+X C^{2}+B C^{2}=X C^{2}+X A^{2}+C A^{2}$.

Solution: 8. Let $A^{\prime}, B^{\prime}, C^{\prime}$ be the points symmetric to $A, B, C$ with respect to the midpoints of $B C, C A, A B$ respectively. From the condition on $X$ we have $X B^{2}-X C^{2}=A C^{2}-A B^{2}=A^{\prime} B^{2}-A^{\prime} C^{2}$, and hence $X$ must lie on the line through $A^{\prime}$ perpendicular to $B C$. Similarly, $X$ lies on the line through $B^{\prime}$ perpendicular to $C A$. It follows that there is a unique position for $X$, namely the orthocenter of $\triangle A^{\prime} B^{\prime} C^{\prime}$. It easily follows that this point $X$ satisfies the original equations.


9. G3 (TUR) The incircle of $A B C$ touches $B C, C A$, and $A B$ at $D, E$, and $F$ respectively. $X$ is a point inside $A B C$ such that the incircle of $X B C$ touches $B C$ at $D$ also, and touches $C X$ and $X B$ at $Y$ and $Z$, respectively. Prove that $E F Z Y$ is a cyclic quadrilateral.

Solution: 9. If $E F$ is parallel to $B C, \triangle A B C$ must be isosceles and $E, Y$ are symmetric to $F, Z$ with respect to $A D$, so the result follows. Now suppose that $E F$ meets $B C$ at $P$. By Menelaus's theorem, $\frac{B P}{C P}=\frac{B F}{F A} \cdot \frac{A E}{E C}=\frac{B D}{D C}$ (since $B D=B F, C D=C E, A E=A F)$. It follows that the point $P$ depends only on $D$ and not on $A$. In particular, the same point is obtained as the intersection of $Z Y$ with $B C$. Therefore $P E \cdot P F=P D^{2}=P Y \cdot P Z$, from which it follows that $E F Z Y$ is a cyclic quadrilateral. Second solution. Since $C D=C Y=C E$ and $B D=B Z=B F$, all angles of $E F Z Y$ can be calculated in terms of angles of $A B C$ and $Y Z B C$. In fact, $\angle F E Y=\frac{1}{2}(\angle A+\angle C+\angle B C Y)$ and $\angle F Z Y=\frac{1}{2}\left(180^{\circ}+\angle B+\angle B C Y\right)$, which gives us $\angle F E Y+\angle F Z Y=180^{\circ}$.


1. A1 (SLO) Let $a, b$, and $c$ be positive real numbers such that $a b c=1$. Prove that  $$ \frac{a b}{a^{5}+b^{5}+a b}+\frac{b c}{b^{5}+c^{5}+b c}+\frac{c a}{c^{5}+a^{5}+c a} \leq 1 $$  When does equality hold?

Solution: 1. We have $a^{5}+b^{5}-a^{2} b^{2}(a+b)=\left(a^{3}-b^{3}\right)\left(a^{2}-b^{2}\right) \geq 0$, i.e. $a^{5}+b^{5} \geq$ $a^{2} b^{2}(a+b)$. Hence  $$ \frac{a b}{a^{5}+b^{5}+a b} \leq \frac{a b}{a^{2} b^{2}(a+b)+a b}=\frac{a b c^{2}}{a^{2} b^{2} c^{2}(a+b)+a b c^{2}}=\frac{c}{a+b+c} . $$  Now, the left side of the inequality to be proved does not exceed $\frac{c}{a+b+c}+$ $\frac{a}{a+b+c}+\frac{b}{a+b+c}=1$. Equality holds if and only if $a=b=c$.


10. G1 (GBR) Let triangle $A B C$ have orthocenter $H$, and let $P$ be a point on its circumcircle, distinct from $A, B, C$. Let $E$ be the foot of the altitude $B H$, let $P A Q B$ and $P A R C$ be parallelograms, and let $A Q$ meet $H R$ in $X$. Prove that $E X$ is parallel to $A P$.

Solution: 10. We first show that $H$ is the common orthocenter of the triangles $A B C$ and $A Q R$.  Let $G, G^{\prime}, H^{\prime}$ be respectively the centroid of $\triangle A B C$, the centroid of $\triangle P B C$, and the orthocenter of $\triangle P B C$. Since the triangles $A B C$ and $P B C$ have a common circumcenter, from the properties of the Euler line we get $\overrightarrow{H H^{\prime}}=3 \overrightarrow{G G^{\prime}}=$ $\overrightarrow{A P}$. But $\triangle A Q R$ is exactly the image of $\triangle P B C$ under translation by $\overrightarrow{A P}$; hence the orthocenter of $A Q R$ ![](https://cdn.mathpix.com/cropped/2024_11_18_8e985d6b9c83aa3e9d0eg-615.jpg?height=432&width=414&top_left_y=254&top_left_x=882) coincides with H. (Remark: This can be shown by noting that $A H B Q$ is cyclic.) Now we have that $R H \perp A Q$; hence $\angle A X H=90^{\circ}=\angle A E H$. It follows that $A X E H$ is cyclic; hence  $$ \angle E X Q=180^{\circ}-\angle A H E=180^{\circ}-\angle B C A=180^{\circ}-\angle B P A=\angle P A Q $$  (as oriented angles). Hence $E X \| A P$.


11. G2 (CAN) ${ }^{\mathrm{IMO} 2}$ Let $P$ be a point inside $\triangle A B C$ such that  $$ \angle A P B-\angle C=\angle A P C-\angle B . $$  Let $D, E$ be the incenters of $\triangle A P B, \triangle A P C$ respectively. Show that $A P, B D$ and $C E$ meet in a point.

Solution: 11. Let $X, Y, Z$ respectively be the feet of the perpendiculars from $P$ to $B C$, $C A, A B$. Examining the cyclic quadrilaterals $A Z P Y, B X P Z, C Y P X$, one can easily see that $\angle X Z Y=\angle A P B-\angle C$ and $X Y=P C \sin \angle C$. The first relation gives that $X Y Z$ is isosceles with $X Y=X Z$, so from the second relation $P B \sin \angle B=P C \sin \angle C$. Hence $A B / P B=A C / P C$. This implies that the bisectors $B D$ and $C D$ of $\angle A B P$ and $\angle A C P$ divide the segment $A P$ in equal ratios; i.e., they concur with $A P$. Second solution. Take that $X, Y, Z$ are the points of intersection of $A P, B P, C P$ with the circumscribed circle of $A B C$ instead. We similarly obtain $X Y=X Z$. If we write $A P \cdot P X=B P \cdot P Y=C P \cdot P Z=k$, from the similarity of $\triangle A P C$ and $\triangle Z P X$ we get  $$ \frac{A C}{X Z}=\frac{A P}{P Z}=\frac{A P \cdot C P}{k} $$  i.e., $X Z=\frac{k \cdot A C \cdot B P}{A P \cdot B P \cdot C P}$. It follows again that $A C / A B=P C / P B$.  Third solution. Apply an inversion with center at $A$ and radius $r$, and denote by $\bar{Q}$ the image of any point $Q$. Then the given condition becomes $\angle \overline{B C P}=\angle \overline{C B P}$, i.e., $\overline{B P}=\overline{P C}$. But  $$ \overline{P B}=\frac{r^{2}}{A P \cdot A B} P B $$  so $A C / A B=P C / P B$. Remark. Moreover, it follows that the locus of $P$ is an arc of the circle of Apollonius through $C$.


12. G3 (GBR) Let $A B C$ be an acute-angled triangle with $B C>C A$. Let $O$ be the circumcenter, $H$ its orthocenter, and $F$ the foot of its altitude $C H$. Let the perpendicular to $O F$ at $F$ meet the side $C A$ at $P$. Prove that $\angle F H P=\angle B A C$. Possible second part: What happens if $|B C| \leq|C A|$ (the triangle still being acute-angled)?

Solution: 12. It is easy to see that $P$ lies on the segment $A C$. Let $E$ be the foot of the altitude $B H$ and $Y, Z$ the midpoints of $A C, A B$ respectively. Draw the perpendicular $H R$ to $F P(R \in F P)$. Since $Y$ is the circumcenter of $\triangle F C A$, we have $\angle F Y A=180^{\circ}-2 \angle A$. Also, $O F P Y$ is cyclic; hence $\angle O P F=\angle O Y F=2 \angle A-90^{\circ}$. Next, $\triangle O Z F$ and $\triangle H R F$ are similar, so $O Z / O F=H R / H F$. This leads to $H R \cdot O F=H F \cdot O Z=\frac{1}{2} H F$. $H C=\frac{1}{2} H E \cdot H B=H E \cdot O Y \Longrightarrow$ $H R / H E=O Y / O F$. Moreover, $\angle E H R=\angle F O Y$; hence the triangles $E H R$ and $F O Y$ are similar. Consequently $\angle H P C=\angle H R E=$ $\angle O Y F=2 \angle A-90^{\circ}$, and finally, $\angle F H P=\angle H P C+\angle H C P=\angle A$. ![](https://cdn.mathpix.com/cropped/2024_11_18_8e985d6b9c83aa3e9d0eg-616.jpg?height=331&width=387&top_left_y=501&top_left_x=895)  Second solution. As before, $\angle H F Y=90^{\circ}-\angle A$, so it suffices to show that $H P \perp F Y$. The points $O, F, P, Y$ lie on a circle, say $\Omega_{1}$ with center at the midpoint $Q$ of $O P$. Furthermore, the points $F, Y$ lie on the nine-point circle $\Omega$ of $\triangle A B C$ with center at the midpoint $N$ of $O H$. The segment $F Y$ is the common chord of $\Omega_{1}$ and $\Omega$, from which we deduce that $N Q \perp F Y$. However, $N Q \| H P$, and the result follows. Third solution. Let $H^{\prime}$ be the point symmetric to $H$ with respect to $A B$. Then $H^{\prime}$ lies on the circumcircle of $A B C$. Let the line $F P$ meet the circumcircle at $U, V$ and meet $H^{\prime} B$ at $P^{\prime}$. Since $O F \perp U V, F$ is the midpoint of $U V$. By the butterfly theorem, $F$ is also the midpoint of $P P^{\prime}$. Therefore $\triangle H^{\prime} F P^{\prime} \cong F H P$; hence $\angle F H P=\angle F H^{\prime} B=\angle A$. Remark. It is possible to solve the problem using trigonometry. For example, $\frac{F Z}{Z O}=\frac{F K}{K P}=\frac{\sin (A-B)}{\cos C}$, where $K$ is on $C F$ with $P K \perp C F$. Then $\frac{C F}{K P}=\frac{\sin (A-B)}{\cos C}+\tan A$, from which one obtains formulas for $K P$ and $K H$. Finally, we can calculate $\tan \angle F H P=\frac{K P}{K H}=\cdots=\tan A$. Second remark. Here is what happens when $B C \leq C A$. If $\angle A>45^{\circ}$, then $\angle F H P=\angle A$. If $\angle A=45^{\circ}$, the point $P$ escapes to infinity. If $\angle A<45^{\circ}$, the point $P$ appears on the extension of $A C$ over $C$, and $\angle F H P=180^{\circ}-\angle A$.


13. G4 (USA) Let $\triangle A B C$ be an equilateral triangle and let $P$ be a point in its interior. Let the lines $A P, B P, C P$ meet the sides $B C, C A, A B$ in the points $A_{1}, B_{1}, C_{1}$ respectively. Prove that  $$ A_{1} B_{1} \cdot B_{1} C_{1} \cdot C_{1} A_{1} \geq A_{1} B \cdot B_{1} C \cdot C_{1} A $$

Solution: 13. By the law of cosines applied to $\triangle C A_{1} B_{1}$, we obtain  $$ A_{1} B_{1}^{2}=A_{1} C^{2}+B_{1} C^{2}-A_{1} C \cdot B_{1} C \geq A_{1} C \cdot B_{1} C $$  Analogously, $B_{1} C_{1}^{2} \geq B_{1} A \cdot C_{1} A$ and $C_{1} A_{1}^{2} \geq C_{1} B \cdot A_{1} B$, so that multiplying these inequalities yields  $$ A_{1} B_{1}^{2} \cdot B_{1} C_{1}^{2} \cdot C_{1} A_{1}^{2} \geq A_{1} B \cdot A_{1} C \cdot B_{1} A \cdot B_{1} C \cdot C_{1} A \cdot C_{1} B $$  Now, the lines $A A_{1}, B B_{1}, C C_{1}$ concur, so by Ceva's theorem, $A_{1} B \cdot B_{1} C$. $C_{1} A=A B_{1} \cdot B C_{1} \cdot C A_{1}$, which together with (1) gives the desired inequality. Equality holds if and only if $C A_{1}=C B_{1}$, etc.


14. G5 (ARM) ${ }^{\mathrm{IMO5}}$ Let $A B C D E F$ be a convex hexagon such that $A B$ is parallel to $D E, B C$ is parallel to $E F$, and $C D$ is parallel to $A F$. Let $R_{A}, R_{C}, R_{E}$ be the circumradii of triangles $F A B, B C D, D E F$ respectively, and let $P$ denote the perimeter of the hexagon. Prove that  $$ R_{A}+R_{C}+R_{E} \geq \frac{P}{2} $$

Solution: 14. Let $a, b, c, d, e$, and $f$ denote the lengths of the sides $A B, B C, C D, D E$, $E F$, and $F A$ respectively. Note that $\angle A=\angle D, \angle B=\angle E$, and $\angle C=\angle F$. Draw the lines $P Q$ and $R S$ through $A$ and $D$ perpendicular to $B C$ and $E F$ respectively $(P, R \in B C, Q, S \in E F)$. Then $B F \geq P Q=R S$. Therefore $2 B F \geq$ $P Q+R S$, or ![](https://cdn.mathpix.com/cropped/2024_11_18_8e985d6b9c83aa3e9d0eg-617.jpg?height=322&width=389&top_left_y=327&top_left_x=885)  $$ \begin{array}{ll}  & 2 B F \geq(a \sin B+f \sin C)+(c \sin C+d \sin B), \\ \text { and similarly, } & 2 B D \geq(c \sin A+b \sin B)+(e \sin B+f \sin A), \\ & 2 D F \geq(e \sin C+d \sin A)+(a \sin A+b \sin C) \end{array} $$  Next, we have the following formulas for the considered circumradii:  $$ R_{A}=\frac{B F}{2 \sin A}, \quad R_{C}=\frac{B D}{2 \sin C}, \quad R_{E}=\frac{D F}{2 \sin E} $$  It follows from (1) that  $$ \begin{aligned} R_{A}+R_{C}+R_{E} & \geq \frac{1}{4} a\left(\frac{\sin B}{\sin A}+\frac{\sin A}{\sin B}\right)+\frac{1}{4} b\left(\frac{\sin C}{\sin B}+\frac{\sin B}{\sin C}\right)+\cdots \\ & \geq \frac{1}{2}(a+b+\cdots)=\frac{P}{2} \end{aligned} $$  with equality if and only if $\angle A=\angle B=\angle C=120^{\circ}$ and $F B \perp B C$ etc., i.e., if and only if the hexagon is regular.  Second solution. Let us construct points $A^{\prime \prime}, C^{\prime \prime}, E^{\prime \prime}$ such that $A B A^{\prime \prime} F$, $C D C^{\prime \prime} B$, and $E F E^{\prime \prime} D$ are parallelograms. It follows that $A^{\prime \prime}, C^{\prime \prime}, B$ are collinear and also $C^{\prime \prime}, E^{\prime \prime}, B$ and $E^{\prime \prime}, A^{\prime \prime}, F$. Furthermore, let $A^{\prime}$ be the intersection of the perpendiculars through $F$ and $B$ to $F A^{\prime \prime}$ and $B A^{\prime \prime}$, respectively, and let $C^{\prime}$ and $E^{\prime}$ be analogously defined. Since $A^{\prime} F A^{\prime \prime} B$ is cyclic with the diameter being $A^{\prime} A^{\prime \prime}$ and since $\triangle F A^{\prime \prime} B \cong$ $\triangle B A F$, it follows that $2 R_{A}=$ ![](https://cdn.mathpix.com/cropped/2024_11_18_8e985d6b9c83aa3e9d0eg-617.jpg?height=372&width=504&top_left_y=1470&top_left_x=830) $A^{\prime} A^{\prime \prime}=x$. Similarly, $2 R_{C}=C^{\prime} C^{\prime \prime}=y$ and $2 R_{E}=E^{\prime} E^{\prime \prime}=z$. We also have $A B=$ $F A^{\prime \prime}=y_{a}, A F=A^{\prime \prime} B=z_{a}, C D=C^{\prime \prime} B=z_{c}, C B=C^{\prime \prime} D=x_{c}$, $E F=E^{\prime \prime} D=x_{e}$, and $E D=E^{\prime \prime} F=y_{e}$. The original inequality we must prove now becomes  $$ x+y+z \geq y_{a}+z_{a}+z_{c}+x_{c}+x_{e}+y_{e} . $$  We now follow and generalize the standard proof of the Erdős-Mordell inequality (for the triangle $A^{\prime} C^{\prime} E^{\prime}$ ), which is what (1) is equivalent to when $A^{\prime \prime}=C^{\prime \prime}=E^{\prime \prime}$. We set $C^{\prime} E^{\prime}=a, A^{\prime} E^{\prime}=c$ and $A^{\prime} C^{\prime}=e$. Let $A_{1}$ be the point symmetric to $A^{\prime \prime}$ with respect to the bisector of $\angle E^{\prime} A^{\prime} C^{\prime}$. Let $F_{1}$ and $B_{1}$ be the feet of the perpendiculars from $A_{1}$ to $A^{\prime} C^{\prime}$ and $A^{\prime} E^{\prime}$, respectively. In that case, $A_{1} F_{1}=A^{\prime \prime} F=y_{a}$ and $A_{1} B_{1}=A^{\prime \prime} B=z_{a}$. We have  $$ \begin{aligned} a x=A^{\prime} A_{1} \cdot E^{\prime} C^{\prime} \geq 2 S_{A^{\prime} E^{\prime} A_{1} C^{\prime}} & =2 S_{A^{\prime} E^{\prime} A_{1}}+2 S_{A^{\prime} C^{\prime} A_{1}} \\ & =c z_{a}+e y_{a} . \end{aligned} $$  Similarly, $c y \geq e x_{c}+a z_{c}$ and $e z \geq a y_{e}+c x_{e}$. Thus  $$ \begin{aligned} x+y+z & \geq \frac{c}{a} z_{a}+\frac{a}{c} z_{c}+\frac{e}{c} x_{c}+\frac{c}{e} x_{e}+\frac{a}{e} y_{e}+\frac{e}{a} y_{a} \\ & =\left(\frac{c}{a}+\frac{a}{c}\right)\left(\frac{z_{a}+z_{c}}{2}\right)+\left(\frac{c}{a}-\frac{a}{c}\right)\left(\frac{z_{a}-z_{c}}{2}\right)+\cdots . \end{aligned} $$  Let us set $a_{1}=\frac{x_{c}-x_{e}}{2}, c_{1}=\frac{y_{e}-y_{a}}{2}, e_{1}=\frac{z_{a}-z_{c}}{2}$. We note that $\triangle A^{\prime \prime} C^{\prime \prime} E^{\prime \prime} \sim$ $\triangle A^{\prime} C^{\prime} E^{\prime}$ and hence $a_{1} / a=c_{1} / c=e_{1} / e=k$. Thus $\left(\frac{c}{a}-\frac{a}{c}\right) e_{1}+$ $\left(\frac{e}{c}-\frac{c}{e}\right) a_{1}+\left(\frac{a}{e}-\frac{e}{a}\right) c_{1}=k\left(\frac{c e}{a}-\frac{a e}{c}+\frac{e a}{c}-\frac{c a}{e}+\frac{a c}{e}-\frac{e c}{a}\right)=0$. Equation (2) reduces to  $$ \begin{aligned} x+y+z \geq & \left(\frac{c}{a}+\frac{a}{c}\right)\left(\frac{z_{a}+z_{c}}{2}\right)+\left(\frac{e}{c}+\frac{c}{e}\right)\left(\frac{x_{e}+x_{c}}{2}\right) \\ & +\left(\frac{a}{e}+\frac{e}{a}\right)\left(\frac{y_{a}+y_{e}}{2}\right) . \end{aligned} $$  Using $c / a+a / c, e / c+c / e, a / e+e / a \geq 2$ we finally get $x+y+z \geq$ $y_{a}+z_{a}+z_{c}+x_{c}+x_{e}+y_{e}$. Equality holds if and only if $a=c=e$ and $A^{\prime \prime}=C^{\prime \prime}=E^{\prime \prime}=$ center of $\triangle A^{\prime} C^{\prime} E^{\prime}$, i.e., if and only if $A B C D E F$ is regular. Remark. From the second proof it is evident that the Erdős-Mordell inequality is a special case of the problem. if $P_{a}, P_{b}, P_{c}$ are the feet of the perpendiculars from a point $P$ inside $\triangle A B C$ to the sides $B C, C A, A B$, and $P_{a} P P_{b} P_{c}^{\prime}, P_{b} P P_{c} P_{a}^{\prime}, P_{c} P P_{a} P_{b}^{\prime}$ parallelograms, we can apply the problem to the hexagon $P_{a} P_{c}^{\prime} P_{b} P_{a}^{\prime} P_{c} P_{b}^{\prime}$ to prove the Erdős-Mordell inequality for $\triangle A B C$ and point $P$.


15. G6 (ARM) Let the sides of two rectangles be $\{a, b\}$ and $\{c, d\}$ with $a<c \leq d<b$ and $a b<c d$. Prove that the first rectangle can be placed within the second one if and only if  $$ \left(b^{2}-a^{2}\right)^{2} \leq(b d-a c)^{2}+(b c-a d)^{2} $$

Solution: 15. Denote by $A B C D$ and $E F G H$ the two rectangles, where $A B=a, B C=$ $b, E F=c$, and $F G=d$. Obviously, the first rectangle can be placed within the second one with the angle $\alpha$ between $A B$ and $E F$ if and only if  $$ a \cos \alpha+b \sin \alpha \leq c, \quad a \sin \alpha+b \cos \alpha \leq d $$  Hence $A B C D$ can be placed within $E F G H$ if and only if there is an $\alpha \in[0, \pi / 2]$ for which (1) holds.  The lines $l_{1}(a x+b y=c)$ and $l_{2}(b x+a y=d)$ and the axes $x$ and $y$ bound a region $\mathcal{R}$. By (1), the desired placement of the rectangles is possible if and only if $\mathcal{R}$ contains some point $(\cos \alpha, \sin \alpha)$ of the unit circle centered at the origin $(0,0)$. This in turn holds if and only if the intersection point $L$ of $l_{1}$ and $l_{2}$ lies outside the unit circle. It is easily computed that $L$ has coordinates $\left(\frac{b d-a c}{b^{2}-a^{2}}, \frac{b c-a d}{b^{2}-a^{2}}\right)$. Now $L$ being outside the unit circle is exactly equivalent to the inequality we want to prove. Remark. If equality holds, there is exactly one way of placing. This happens, for example, when $(a, b)=(5,20)$ and $(c, d)=(16,19)$. Second remark. This problem is essentially very similar to (SL89-2).


16. G7 (GBR) Let $A B C$ be an acute-angled triangle with circumcenter $O$ and circumradius $R$. Let $A O$ meet the circle $B O C$ again in $A^{\prime}$, let $B O$ meet the circle $C O A$ again in $B^{\prime}$, and let $C O$ meet the circle $A O B$ again in $C^{\prime}$. Prove that  $$ O A^{\prime} \cdot O B^{\prime} \cdot O C^{\prime} \geq 8 R^{3} $$  When does equality hold?

Solution: 16. Let $A_{1}$ be the point of intersection of $O A^{\prime}$ and $B C$; similarly define $B_{1}$ and $C_{1}$. From the similarity of triangles $O B A_{1}$ and $O A^{\prime} B$ we obtain $O A_{1}$. $O A^{\prime}=R^{2}$. Now it is enough to show that $8 O A_{1} \cdot O B^{\prime} \cdot O C^{\prime} \leq R^{3}$. Thus we must prove that  $$ \lambda \mu \nu \leq \frac{1}{8}, \quad \text { where } \quad \frac{O A_{1}}{O A}=\lambda, \quad \frac{O B_{1}}{O B}=\mu, \quad \frac{O C_{1}}{O C}=\nu $$  On the other hand, we have  $$ \frac{\lambda}{1+\lambda}+\frac{\mu}{1+\mu}+\frac{\nu}{1+\nu}=\frac{S_{O B C}}{S_{A B C}}+\frac{S_{A O C}}{S_{A B C}}+\frac{S_{A B O}}{S_{A B C}}=1 . $$  Simplifying this relation, we get  $$ 1=\lambda \mu+\mu \nu+\nu \lambda+2 \lambda \mu \nu \geq 3(\lambda \mu \nu)^{2 / 3}+2 \lambda \mu \nu $$  which cannot hold if $\lambda \mu \nu>\frac{1}{8}$. Hence $\lambda \mu \nu \leq \frac{1}{8}$, with equality if and only if $\lambda=\mu=\nu=\frac{1}{2}$. This implies that $O$ is the centroid of $A B C$, and consequently, that the triangle is equilateral.  Second solution. In the official solution, the inequality to be proved is transformed into  $$ \cos (A-B) \cos (B-C) \cos (C-A) \geq 8 \cos A \cos B \cos C $$  Since $\frac{\cos (B-C)}{\cos A}=-\frac{\cos (B-C)}{\cos (B+C)}=\frac{\tan B \tan C+1}{\tan B \tan C-1}$, the last inequality becomes $(x y+1)(y z+1)(z x+1) \geq 8(x y-1)(y z-1)(z x-1)$, where we write $x, y, z$ for $\tan A, \tan B, \tan C$. Using the relation $x+y+z=x y z$, we can reduce this inequality to  $$ (2 x+y+z)(x+2 y+z)(x+y+2 z) \geq 8(x+y)(y+z)(z+x) $$  This follows from the AM-GM inequality: $2 x+y+z=(x+y)+(x+z) \geq$ $2 \sqrt{(x+y)(x+z)}$, etc.


17. G8 (RUS) Let $A B C D$ be a convex quadrilateral, and let $R_{A}, R_{B}, R_{C}$, and $R_{D}$ denote the circumradii of the triangles $D A B, A B C, B C D$, and $C D A$ respectively. Prove that $R_{A}+R_{C}>R_{B}+R_{D}$ if and only if  $$ \angle A+\angle C>\angle B+\angle D . $$

Solution: 17. Let the diagonals $A C$ and $B D$ meet in $X$. Either $\angle A X B$ or $\angle A X D$ is geater than or equal to $90^{\circ}$, so we assume w.l.o.g. that $\angle A X B \geq 90^{\circ}$. Let $\alpha, \beta, \alpha^{\prime}, \beta^{\prime}$ denote $\angle C A B, \angle A B D, \angle B D C, \angle D C A$. These angles are all acute and satisfy $\alpha+\beta=\alpha^{\prime}+\beta^{\prime}$. Furthermore,  $$ R_{A}=\frac{A D}{2 \sin \beta}, \quad R_{B}=\frac{B C}{2 \sin \alpha}, \quad R_{C}=\frac{B C}{2 \sin \alpha^{\prime}}, \quad R_{D}=\frac{A D}{2 \sin \beta^{\prime}} $$  Let $\angle B+\angle D=180^{\circ}$. Then $A, B, C, D$ are concyclic and trivially $R_{A}+$ $R_{C}=R_{B}+R_{D}$. Let $\angle B+\angle D>180^{\circ}$. Then $D$ lies within the circumcircle of $A B C$, which implies that $\beta>\beta^{\prime}$. Similarly $\alpha<\alpha^{\prime}$, so we obtain $R_{A}<R_{D}$ and $R_{C}<R_{B}$. Thus $R_{A}+R_{C}<R_{B}+R_{D}$. Let $\angle B+\angle D<180^{\circ}$. As in the previous case, we deduce that $R_{A}>R_{D}$ and $R_{C}>R_{B}$, so $R_{A}+R_{C}>R_{B}+R_{D}$.


18. G9 (UKR) In the plane are given a point $O$ and a polygon $\mathcal{F}$ (not necessarily convex). Let $P$ denote the perimeter of $\mathcal{F}, D$ the sum of the distances from $O$ to the vertices of $\mathcal{F}$, and $H$ the sum of the distances from $O$ to the lines containing the sides of $\mathcal{F}$. Prove that  $$ D^{2}-H^{2} \geq \frac{P^{2}}{4} $$

Solution: 18. We first prove the result in the simplest case. Given a 2 -gon $A B A$ and a point $O$, let $a, b, c, h$ denote $O A, O B, A B$, and the distance of $O$ from $A B$. Then $D=a+b, P=2 c$, and $H=2 h$, so we should show that  $$ (a+b)^{2} \geq 4 h^{2}+c^{2} $$  Indeed, let $l$ be the line through $O$ parallel to $A B$, and $D$ the point symmetric to $B$ with respect to $l$. Then $(a+b)^{2}=(O A+O B)^{2}=(O A+$ $O D)^{2} \geq A D^{2}=c^{2}+4 h^{2}$. Now we pass to the general case. Let $A_{1} A_{2} \ldots A_{n}$ be the polygon $\mathcal{F}$ and denote by $d_{i}, p_{i}$, and $h_{i}$ respectively $O A_{i}, A_{i} A_{i+1}$, and the distance of $O$ from $A_{i} A_{i+1}$ (where $A_{n+1}=A_{1}$ ). By the case proved above, we have for each $i, d_{i}+d_{i+1} \geq \sqrt{4 h_{i}^{2}+p_{i}^{2}}$. Summing these inequalities for $i=1, \ldots, n$ and squaring, we obtain  $$ 4 D^{2} \geq\left(\sum_{i=1}^{n} \sqrt{4 h_{i}^{2}+p_{i}^{2}}\right)^{2} $$  It remains only to prove that $\sum_{i=1}^{n} \sqrt{4 h_{i}^{2}+p_{i}^{2}} \geq \sqrt{\sum_{i=1}^{n}\left(4 h_{i}^{2}+p_{i}^{2}\right)}=$ $\sqrt{4 H^{2}+D^{2}}$. But this follows immediately from the Minkowski inequality. Equality holds if and only if it holds in (1) and in the Minkowski inequality, i.e., if and only if $d_{1}=\cdots=d_{n}$ and $h_{1} / p_{1}=\cdots=h_{n} / p_{n}$. This means that $\mathcal{F}$ is inscribed in a circle with center at $O$ and $p_{1}=\cdots=p_{n}$, so $\mathcal{F}$ is a regular polygon and $O$ its center.


19. N1 (UKR) Four integers are marked on a circle. At each step we simultaneously replace each number by the difference between this number and the next number on the circle, in a given direction (that is, the numbers $a, b, c, d$ are replaced by $a-b, b-c, c-d, d-a)$. Is it possible after 1996 such steps to have numbers $a, b, c, d$ such that the numbers $|b c-a d|,|a c-b d|,|a b-c d|$ are primes?

Solution: 19. It is easy to check that after 4 steps we will have all $a, b, c, d$ even. Thus $|a b-c d|,|a c-b d|,|a d-b c|$ remain divisible by 4 , and clearly are not prime. The answer is no. Second solution. After one step we have $a+b+c+d=0$. Then $a c-b d=$ $a c+b(a+b+c)=(a+b)(b+c)$ etc., so  $$ |a b-c d| \cdot|a c-b d| \cdot|a d-b c|=(a+b)^{2}(a+c)^{2}(b+c)^{2} $$  However, the product of three primes cannot be a square, hence the answer is $n o$.


2. A2 (IRE) Let $a_{1} \geq a_{2} \geq \cdots \geq a_{n}$ be real numbers such that  $$ a_{1}^{k}+a_{2}^{k}+\cdots+a_{n}^{k} \geq 0 $$  for all integers $k>0$. Let $p=\max \left\{\left|a_{1}\right|, \ldots,\left|a_{n}\right|\right\}$. Prove that $p=a_{1}$ and that  $$ \left(x-a_{1}\right)\left(x-a_{2}\right) \cdots\left(x-a_{n}\right) \leq x^{n}-a_{1}^{n} $$  for all $x>a_{1}$.

Solution: 2. Clearly $a_{1}>0$, and if $p \neq a_{1}$, we must have $a_{n}<0,\left|a_{n}\right|>\left|a_{1}\right|$, and $p=-a_{n}$. But then for sufficiently large odd $k,-a_{n}^{k}=\left|a_{n}\right|^{k}>(n-1)\left|a_{1}\right|^{k}$, so that $a_{1}^{k}+\cdots+a_{n}^{k} \leq(n-1)\left|a_{1}\right|^{k}-\left|a_{n}\right|^{k}<0$, a contradiction. Hence $p=a_{1}$. Now let $x>a_{1}$. From $a_{1}+\cdots+a_{n} \geq 0$ we deduce $\sum_{j=2}^{n}\left(x-a_{j}\right) \leq$ $(n-1)\left(x+\frac{a_{1}}{n-1}\right)$, so by the AM-GM inequality,  $$ \left(x-a_{2}\right) \cdots\left(x-a_{n}\right) \leq\left(x+\frac{a_{1}}{n-1}\right)^{n-1} \leq x^{n-1}+x^{n-2} a_{1}+\cdots+a_{1}^{n-1} $$  The last inequality holds because $\binom{n-1}{r} \leq(n-1)^{r}$ for all $r \geq 0$. Multiplying (1) by $\left(x-a_{1}\right)$ yields the desired inequality.


20. N2 (RUS) ${ }^{\mathrm{IMO} 4}$ The positive integers $a$ and $b$ are such that the numbers $15 a+16 b$ and $16 a-15 b$ are both squares of positive integers. What is the least possible value that can be taken on by the smaller of these two squares?

Solution: 20. Let $15 a+16 b=x^{2}$ and $16 a-15 b=y^{2}$, where $x, y \in \mathbb{N}$. Then we obtain $x^{4}+y^{4}=(15 a+16 b)^{2}+(16 a-15 b)^{2}=\left(15^{2}+16^{2}\right)\left(a^{2}+b^{2}\right)=481\left(a^{2}+b^{2}\right)$. In particular, $481=13 \cdot 37 \mid x^{4}+y^{4}$. We have the following lemma. Lemma. Suppose that $p \mid x^{4}+y^{4}$, where $x, y \in \mathbb{Z}$ and $p$ is an odd prime, where $p \not \equiv 1(\bmod 8)$. Then $p \mid x$ and $p \mid y$. Proof. Since $p \mid x^{8}-y^{8}$ and by Fermat's theorem $p \mid x^{p-1}-y^{p-1}$, we deduce that $p \mid x^{d}-y^{d}$, where $d=(p-1,8)$. But $d \neq 8$, so $d \mid 4$. Thus $p \mid x^{4}-y^{4}$, which implies that $p \mid 2 y^{4}$, i.e., $p \mid y$ and $p \mid x$. In particular, we can conclude that $13 \mid x, y$ and $37 \mid x, y$. Hence $x$ and $y$ are divisible by 481 . Thus each of them is at least 481. On the other hand, $x=y=481$ is possible. It is sufficient to take $a=$ $31 \cdot 481$ and $b=481$.  Second solution. Note that $15 x^{2}+16 y^{2}=481 a^{2}$. It can be directly verified that the divisibility of $15 x^{2}+16 y^{2}$ by 13 and by 37 implies that both $x$ and $y$ are divisible by both primes. Thus $481 \mid x, y$.