10. (GDR 1) Let $N=\{1,2, \ldots, n\}, n \geq 2$. A collection $F=\left\{A_{1}, \ldots, A_{t}\right\}$ of subsets $A_{i} \subseteq N, i=1, \ldots, t$, is said to be separating if for every pair $\{x, y\} \subseteq N$, there is a set $A_{i} \in F$ such that $A_{i} \cap\{x, y\}$ contains just one element. A collection $F$ is said to be covering if every element of $N$ is contained in at least one set $A_{i} \in F$. What is the smallest value $f(n)$ of $t$ such that there is a set $F=\left\{A_{1}, \ldots, A_{t}\right\}$ that is simultaneously separating and covering?

Solution: 10. We claim that if the family $\left\{A_{1}, \ldots, A_{t}\right\}$ separates the $n$-set $N$, then $2^{t} \geq n$. The proof goes by induction. The case $t=1$ is clear, so suppose that the claim holds for $t-1$. Since $A_{t}$ does not separate elements of its own or its complement, it follows that $\left\{A_{1}, \ldots, A_{t-1}\right\}$ is separating for both $A_{t}$ and $N \backslash A_{t}$, so that $\left|A_{t}\right|,\left|N \backslash A_{t}\right| \leq 2^{t-1}$. Then $|N| \leq 2 \cdot 2^{t-1}=2^{t}$, as claimed. Also, if the set $N$ with $N=2^{t}$ is separated by $\left\{A_{1}, \ldots, A_{t}\right\}$, then (precisely) one element of $N$ is not covered. To show this, we again use induction. This is trivial for $t=1$, so let $t \geq 1$. Since $A_{1}, \ldots, A_{t-1}$ separate both $A_{t}$ and $N \backslash A_{t}, N \backslash A_{t}$ must have exactly $2^{t-1}$ elements, and thus one of its elements is not covered by $A_{1}, \ldots, A_{t-1}$, and neither is covered by $A_{t}$. We conclude that a separating and covering family of $t$ subsets can exist only if $n \leq 2^{t}-1$. We now construct such subsets for the set $N$ if $2^{t-1} \leq n \leq 2^{t}-1, t \geq 1$. For $t=1$, put $A_{1}=\{1\}$. In the step from $t$ to $t+1$, let $N=N^{\prime} \cup N^{\prime \prime} \cup\{y\}$, where $\left|N^{\prime}\right|,\left|N^{\prime \prime}\right| \leq 2^{t-1}$; let $A_{1}^{\prime}, \ldots, A_{t}^{\prime}$ be subsets covering and separating $N^{\prime}$ and $A_{1}^{\prime \prime}, \ldots, A_{t}^{\prime \prime}$ such subsets for $N^{\prime \prime}$. Then the subsets $A_{i}=A_{i}^{\prime} \cup A_{i}^{\prime \prime}$ $(i=1, \ldots, t)$ and $A_{t+1}=N^{\prime \prime} \cup\{y\}$ obviously separate and cover $N$. The answer: $t=\left[\log _{2} n\right]+1$. Second solution. Suppose that the sets $A_{1}, \ldots, A_{t}$ cover and separate $N$. Label each element $x \in N$ with a string of $\left(x_{1} x_{2} \ldots x_{t}\right)$ of 0 's and 1's, where $x_{i}$ is 1 when $x \in A_{i}, 0$ otherwise. Since the $A_{i}$ 's separate, these strings are distinct; since they cover, the string ( $00 \ldots 0$ ) does not occur.  Hence $n \leq 2^{t}-1$. Conversely, for $2^{t-1} \leq n<2^{t}$, represent the elements of $N$ in base 2 as strings of 0's and 1's of length $t$. For $1 \leq i \leq t$, take $A_{i}$ to be the set of numbers in $N$ whose binary string has a 1 in the $i$ th place. These sets clearly cover and separate.


11. (GDR 3) The lock on a safe consists of three wheels, each of which may be set in eight different positions. Due to a defect in the safe mechanism the door will open if any two of the three wheels are in the correct position. What is the smallest number of combinations that must be tried if one is to guarantee being able to open the safe (assuming that the "right combination" is not known)?

Solution: 11. The answer is 32 . Write the combinations as triples $k=(x, y, z), 0 \leq$ $x, y, z \leq 7$. Define the sets $K_{1}=\{(1,0,0),(0,1,0),(0,0,1),(1,1,1)\}$, $K_{2}=\{(2,0,0),(0,2,0),(0,0,2),(2,2,2)\}, K_{3}=\{(0,0,0),(4,4,4)\}$, and $K=\left\{k=k_{1}+k_{2}+k_{3} \mid k_{i} \in K_{i}, i=1,2,3\right\}$. There are 32 combinations in $K$. We shall prove that these combinations will open the safe in every case. Let $t=(a, b, c)$ be the right combination. Set $k_{3}=(0,0,0)$ if at least two of $a, b, c$ are less than 4 , and $k_{3}=(4,4,4)$ otherwise. In either case, the difference $t-k_{3}$ contains two nonnegative elements not greater than 3 . Choosing a suitable $k_{2}$ we can achieve that $t-k_{3}-k_{2}$ contains two elements that are 0,1 . So, there exists $k_{1}$ such that $t-k_{3}-k_{2}-k_{1}=t-k$ contains two zeros, for $k \in K$. This proves that 32 is sufficient. Suppose that $K$ is a set of at most 31 combinations. We say that $k \in K$ covers the combination $k_{1}$ if $k$ and $k_{1}$ differ in at most one position. One of the eight sets $M_{i}=\{(i, y, z) \mid 0 \leq y, z \leq 7\}, i=0,1, \ldots, 7$, contains at most three elements of $K$. Suppose w.l.o.g. that this is $M_{0}$. Further, among the eight sets $N_{j}=\{(0, j, z) \mid 0 \leq z \leq 7\}, j=0, \ldots, 7$, there are at least five, say w.l.o.g. $N_{0}, \ldots, N_{4}$, not containing any of the combinations from $K$. Of the 40 elements of the set $N=\{(0, y, z) \mid 0 \leq y \leq 4,0 \leq z \leq 7\}$, at most $5 \cdot 3=15$ are covered by $K \cap M_{0}$, and at least 25 aren't. Consequently, the intersection of $K$ with $L=\{(x, y, z) \mid 1 \leq x \leq 7,0 \leq y \leq 4,0 \leq z \leq 7\}$ contains at least 25 elements. So $K$ has at most $31-25=6$ elements in the set $P=\{(x, y, z) \mid 0 \leq x \leq 7,5 \leq y \leq 7,0 \leq z \leq 7\}$. This implies that for some $j \in\{5,6,7\}$, say w.l.o.g. $j=7, K$ contains at most two elements in $Q_{j}=\{(x, y, z) \mid 0 \leq x, z \leq 7, y=j\}$; denote them by $l_{1}, l_{2}$. Of the 64 elements of $Q_{7}$, at most 30 are covered by $l_{1}$ and $l_{2}$. But then there remain 34 uncovered elements, which must be covered by different elements of $K \backslash Q_{7}$, having itself less at most 29 elements. Contradiction.


12. (GRE 2) In a triangle $A B C$, choose any points $K \in B C, L \in A C$, $M \in A B, N \in L M, R \in M K$, and $F \in K L$. If $E_{1}, E_{2}, E_{3}, E_{4}, E_{5}$, $E_{6}$, and $E$ denote the areas of the triangles $A M R, C K R, B K F, A L F$, $B N M, C L N$, and $A B C$ respectively, show that  $$ E \geq 8 \sqrt[6]{E_{1} E_{2} E_{3} E_{4} E_{5} E_{6}} $$  Remark. Points $K, L, M, N, R, F$ lie on segments $B C, A C, A B, L M$, $M K, K L$ respectively.

Solution: 12. Let $E(X Y Z)$ stand for the area of a triangle $X Y Z$. We have  $$ \begin{gathered} \frac{E_{1}}{E}=\frac{E(A M R)}{E(A M K)} \cdot \frac{E(A M K)}{E(A B K)} \cdot \frac{E(A B K)}{E(A B C)}=\frac{M R}{M K} \cdot \frac{A M}{A B} \cdot \frac{B K}{B C} \Rightarrow \\ \left(\frac{E_{1}}{E}\right)^{1 / 3} \leq \frac{1}{3}\left(\frac{M R}{M K}+\frac{A M}{A B}+\frac{B K}{B C}\right) \end{gathered} $$  We similarly obtain  $$ \left(\frac{E_{2}}{E}\right)^{1 / 3} \leq \frac{1}{3}\left(\frac{K R}{M K}+\frac{B M}{A B}+\frac{C K}{B C}\right) $$  Therefore $\left(E_{1} / E\right)^{1 / 3}+\left(E_{2} / E\right)^{1 / 3} \leq 1$, i.e., $\sqrt[3]{E_{1}}+\sqrt[3]{E_{2}} \leq \sqrt[3]{E}$. Analogously, $\sqrt[3]{E_{3}}+\sqrt[3]{E_{4}} \leq \sqrt[3]{E}$ and $\sqrt[3]{E_{5}}+\sqrt[3]{E_{6}} \leq \sqrt[3]{E}$; hence  $$ \begin{aligned} & 8 \sqrt[6]{E_{1} E_{2} E_{3} E_{4} E_{5} E_{6}} \\ & \quad=2\left(\sqrt[3]{E_{1}} \sqrt[3]{E_{2}}\right)^{1 / 2} \cdot 2\left(\sqrt[3]{E_{3}} \sqrt[3]{E_{4}}\right)^{1 / 2} \cdot 2\left(\sqrt[3]{E_{5}} \sqrt[3]{E_{6}}\right)^{1 / 2} \\ & \quad \leq\left(\sqrt[3]{E_{1}}+\sqrt[3]{E_{2}}\right) \cdot\left(\sqrt[3]{E_{3}}+\sqrt[3]{E_{4}}\right) \cdot\left(\sqrt[3]{E_{5}}+\sqrt[3]{E_{6}}\right) \leq E \end{aligned} $$


13. (GRE 3) ${ }^{\mathrm{IMO5}}$ In a right-angled triangle $A B C$, let $A D$ be the altitude drawn to the hypotenuse and let the straight line joining the incenters of the triangles $A B D, A C D$ intersect the sides $A B, A C$ at the points $K, L$ respectively. If $E$ and $E_{1}$ denote the areas of the triangles $A B C$ and $A K L$ respectively, show that $\frac{E}{E_{1}} \geq 2$.

Solution: 13. Let $A B=c, A C=b, \angle C B A=\beta, B C=a$, and $A D=h$.  Let $r_{1}$ and $r_{2}$ be the inradii of $A B D$ and $A D C$ respectively and $O_{1}$ and $O_{2}$ the centers of the respective incircles. We obviously have $r_{1} / r_{2}=$ $c / b$. We also have $D O_{1}=\sqrt{2} r_{1}$, $D O_{2}=\sqrt{2} r_{2}$, and $\angle O_{1} D A=$ $\angle O_{2} D A=45^{\circ}$. Hence $\angle O_{1} D O_{2}=$ $90^{\circ}$ and $D O_{1} / D O_{2}=c / b$ from which it follows that $\triangle O_{1} D O_{2} \sim$ $\triangle B A C$. ![](https://cdn.mathpix.com/cropped/2024_11_18_8e985d6b9c83aa3e9d0eg-516.jpg?height=308&width=520&top_left_y=648&top_left_x=831)  We now define $P$ as the intersection of the circumcircle of $\triangle O_{1} D O_{2}$ with $D A$. From the above similarity we have $\angle D P O_{2}=\angle D O_{1} O_{2}=\beta=$ $\angle D A C$. It follows that $P O_{2} \| A C$ and from $\angle O_{1} P O_{2}=90^{\circ}$ it also follows that $P O_{1} \| A B$. We also have $\angle P O_{1} O_{2}=\angle P O_{2} O_{1}=45^{\circ}$; hence $\angle L K A=\angle K L A=45^{\circ}$, and thus $A K=A L$. From $\angle O_{1} K A=\angle O_{1} D A=$ $45^{\circ}, O_{1} A=O_{1} A$, and $\angle O_{1} K A=\angle O_{1} D A$ we have $\triangle O_{1} K A \cong \triangle O_{1} D A$ and hence $A L=A K=A D=h$. Thus  $$ \frac{E}{E_{1}}=\frac{a h / 2}{h^{2} / 2}=\frac{a}{h}=\frac{a^{2}}{a h}=\frac{b^{2}+c^{2}}{b c} \geq 2 . $$  Remark. It holds that for an arbitrary triangle $A B C, A K=A L$ if and only if $A B=A C$ or $\measuredangle B A C=90^{\circ}$.


14. (HUN 1) For what values of $n$ does there exist an $n \times n$ array of entries $-1,0$, or 1 such that the $2 n$ sums obtained by summing the elements of the rows and the columns are all different?

Solution: 14. Consider an array $\left[a_{i j}\right]$ of the given property and denote the sums of the rows and the columns by $r_{i}$ and $c_{j}$ respectively. Among the $r_{i}$ 's and $c_{j}$ 's, one element of $[-n, n]$ is missing, so that there are at least $n$ nonnegative and $n$ nonpositive sums. By permuting rows and columns we can obtain an array in which $r_{1}, \ldots, r_{k}$ and $c_{1}, \ldots, c_{n-k}$ are nonnegative. Clearly  $$ \sum_{i=1}^{n}\left|r_{i}\right|+\sum_{j=1}^{n}\left|c_{j}\right| \geq \sum_{r=-n}^{n}|r|-n=n^{2} $$  But on the other hand,  $$ \begin{aligned} \sum_{i=1}^{n}\left|r_{i}\right|+\sum_{j=1}^{n}\left|c_{j}\right| & =\sum_{i=1}^{k} r_{i}-\sum_{i=k+1}^{n} r_{i}+\sum_{j=1}^{n-k} c_{j}-\sum_{j=n-k+1}^{n} c_{j}= \\ & =\sum_{i \leq k} a_{i j}-\sum_{i>k} a_{i j}+\sum_{j \leq n-k} a_{i j}-\sum_{j>n-k} a_{i j}= \\ & =2 \sum_{i=1}^{k} \sum_{j=1}^{n-k} a_{i j}-2 \sum_{i=k+1}^{n} \sum_{j=n-k+1}^{n} a_{i j} \leq 4 k(n-k) . \end{aligned} $$  This yields $n^{2} \leq 4 k(n-k)$, i.e., $(n-2 k)^{2} \leq 0$, and thus $n$ must be even. We proceed to show by induction that for all even $n$ an array of the given type exists. For $n=2$ the array in Fig. 1 is good. Let such an $n \times n$ array be given for some even $n \geq 2$, with $c_{1}=n, c_{2}=-n+1, c_{3}=$ $n-2, \ldots, c_{n-1}=2, c_{n}=-1$ and $r_{1}=n-1, r_{2}=-n+2, \ldots, r_{n-1}=1$, $r_{n}=0$. Upon enlarging this array as indicated in Fig. 2, the positive sums are increased by 2 , the nonpositive sums are decreased by 2 , and the missing sums $-1,0,1,2$ occur in the new rows and columns, so that the obtained array $(n+2) \times(n+2)$ is of the same type. ![](https://cdn.mathpix.com/cropped/2024_11_18_8e985d6b9c83aa3e9d0eg-517.jpg?height=89&width=87&top_left_y=1080&top_left_x=487)  Fig. 1  | $n \times n$ |  |  | 1 | 1 | | :---: | :---: | :---: | :---: | :---: | |  |  |  |  |  | |  |  |  | 1 | 1 | |  |  |  | - |  | -1 | | 1)-1 | 1 | - | 1 | 0 | | 1)-1 |  | 1. | 1 | -1 |  Fig. 2


15. (ICE 1) Let $A B C$ be an acute-angled triangle. Three lines $L_{A}, L_{B}$, and $L_{C}$ are constructed through the vertices $A, B$, and $C$ respectively according to the following prescription: Let $H$ be the foot of the altitude drawn from the vertex $A$ to the side $B C$; let $S_{A}$ be the circle with diameter $A H$; let $S_{A}$ meet the sides $A B$ and $A C$ at $M$ and $N$ respectively, where $M$ and $N$ are distinct from $A$; then $L_{A}$ is the line through $A$ perpendicular to $M N$. The lines $L_{B}$ and $L_{C}$ are constructed similarly. Prove that $L_{A}$, $L_{B}$, and $L_{C}$ are concurrent.

Solution: 15. Referring to the description of $L_{A}$, we have $\angle A M N=\angle A H N=90^{\circ}-$ $\angle H A C=\angle C$, and similarly $\angle A N M=\angle B$. Since the triangle $A B C$ is acute-angled, the line $L_{A}$ lies inside the angle $A$. Hence if $P=L_{A} \cap B C$ and $Q=L_{B} \cap A C$, we get $\angle B A P=90^{\circ}-\angle C$; hence $A P$ passes through the circumcenter $O$ of $\triangle A B C$. Similarly we prove that $L_{B}$ and $L_{C}$ contains the circumcenter $O$ also. It follows that $L_{A}, L_{B}$ and $L_{C}$ intersect at the point $O$. Remark. Without identifying the point of intersection, one can prove the concurrence of the three lines using Ceva's theorem, in usual or trigonometric form.


16. (IRE 1) $)^{\mathrm{IMO} 4}$ Show that the solution set of the inequality  $$ \sum_{k=1}^{70} \frac{k}{x-k} \geq \frac{5}{4} $$  is a union of disjoint intervals the sum of whose lengths is 1988.

Solution: 16. Let $f(x)=\sum_{k=1}^{70} \frac{k}{x-k}$. For all integers $i=1, \ldots, 70$ we have that $f(x)$ tends to plus infinity as $x$ tends downward to $i$, and $f(x)$ tends to minus infinity as $x$ tends upward to $i$. As $x$ tends to infinity, $f(x)$ tends to 0 . Hence it follows that there exist $x_{1}, x_{2}, \ldots, x_{70}$ such that $1<x_{1}<2<$ $x_{2}<3<\cdots<x_{69}<70<x_{70}$ and $f\left(x_{i}\right)=\frac{5}{4}$ for all $i=1, \ldots, 70$. Then the solution to the inequality is given by $S=\bigcup_{i=1}^{70}\left(i, x_{i}\right]$. For numbers $x$ for which $f(x)$ is well-defined, the equality $f(x)=\frac{5}{4}$ is equivalent to  $$ p(x)=\prod_{j=1}^{70}(x-j)-\frac{4}{5} \sum_{k=1}^{70} k \prod_{\substack{j=1 \\ j \neq k}}^{70}(x-j)=0 $$  The numbers $x_{1}, x_{2}, \ldots, x_{70}$ are then the zeros of this polynomial. The sum $\sum_{i=1}^{70} x_{i}$ is then equal to minus the coefficient of $x^{69}$ in $p$, which equals $\sum_{i=1}^{70}\left(i+\frac{4}{5} i\right)$. Finally,  $$ |S|=\sum_{i=1}^{70}\left(x_{i}-i\right)=\frac{4}{5} \cdot \sum_{i=1}^{70} i=\frac{4}{5} \cdot \frac{70 \cdot 71}{2}=1988 $$


17. (ISR 2) In the convex pentagon $A B C D E$, the sides $B C, C D, D E$ have the same length. Moreover, each diagonal of the pentagon is parallel to a side ( $A C$ is parallel to $D E, B D$ is parallel to $A E$, etc.). Prove that $A B C D E$ is a regular pentagon.

Solution: 17. Let $A C$ and $A D$ meet $B E$ in $R, S$, respectively. Then by the conditions of the problem,  $$ \begin{aligned} & \angle A E B=\angle E B D=\angle B D C=\angle D B C=\angle A D B=\angle E A D=\alpha, \\ & \angle A B E=\angle B E C=\angle E C D=\angle C E D=\angle A C E=\angle B A C=\beta \\ & \angle B C A=\angle C A D=\angle A D E=\gamma \end{aligned} $$  Since $\angle S A E=\angle S E A$, it follows that $A S=S E$, and analogously $B R=$ $R A$. But $B S D C$ and $R E D C$ are parallelograms; hence $B S=C D=R E$, giving us $B R=S E$ and $A R=A S$. Then also $A C=A D$, because $R S \|$ $C D$. We deduce that $2 \beta=\angle A C D=\angle A D C=2 \alpha$, i.e., $\alpha=\beta$. It will be sufficient to show that $\alpha=\gamma$, since that will imply $\alpha=\beta=\gamma=$ $36^{\circ}$. We have that the sum of the interior angles of $A C D$ is $4 \alpha+\gamma=180^{\circ}$. We have  $$ \frac{\sin \gamma}{\sin \alpha}=\frac{A E}{D E}=\frac{A E}{C D}=\frac{A E}{R E}=\frac{\sin (2 \alpha+\gamma)}{\sin (\alpha+\gamma)} $$  i.e., $\cos \alpha-\cos (\alpha+2 \gamma)=2 \sin \gamma \sin (\alpha+\gamma)=2 \sin \alpha \sin (2 \alpha+\gamma)=\cos (\alpha+$ $\gamma)-\cos (3 \alpha+\gamma)$. From $4 \alpha+\gamma=180^{\circ}$ we obtain $-\cos (3 \alpha+\gamma)=\cos \alpha$. Hence  $$ \cos (\alpha+\gamma)+\cos (\alpha+2 \gamma)=2 \cos \frac{\gamma}{2} \cos \frac{2 \alpha+3 \gamma}{2}=0 $$  so that $2 \alpha+3 \gamma=180^{\circ}$. It follows that $\alpha=\gamma$. Second solution. We have $\angle B E C=\angle E C D=\angle D E C=\angle E C A=$ $\angle C A B$, and hence the trapezoid $B A E C$ is cyclic; consequently, $A E=$ $B C$. Similarly $A B=E D$, and $A B C D$ is cyclic as well. Thus $A B C D E$ is cyclic and has all sides equal; i.e., it is regular.


18. (LUX 1) ${ }^{\mathrm{IMO}}$ Consider two concentric circles of radii $R$ and $r(R>r)$ with center $O$. Fix $P$ on the small circle and consider the variable chord $P A$ of the small circle. Points $B$ and $C$ lie on the large circle; $B, P, C$ are collinear and $B C$ is perpendicular to $A P$. (a) For what value(s) of $\angle O P A$ is the sum $B C^{2}+C A^{2}+A B^{2}$ extremal? (b) What are the possible positions of the midpoints $U$ of $B A$ and $V$ of $A C$ as $\angle O P A$ varies?

Solution: 18. (i) Define $\angle A P O=\phi$ and $S=A B^{2}+A C^{2}+B C^{2}$. We calculate $P A=$ $2 r \cos \phi$ and $P B, P C=\sqrt{R^{2}-r^{2} \cos ^{2} \phi} \pm r \sin \phi$. We also have $A B^{2}=$ $P A^{2}+P B^{2}, A C^{2}=P A^{2}+P C^{2}$ and $B C=B P+P C$. Combining all these we obtain  $$ \begin{aligned} S & =A B^{2}+A C^{2}+B C^{2}=2\left(P A^{2}+P B^{2}+P C^{2}+P B \cdot P C\right) \\ & =2\left(4 r^{2} \cos ^{2} \phi+2\left(R^{2}-r^{2} \cos ^{2} \phi+r^{2} \sin ^{2} \phi\right)+R^{2}-r^{2}\right) \\ & =6 R^{2}+2 r^{2} . \end{aligned} $$  Hence it follows that $S$ is constant; i.e., it does not depend on $\phi$. (ii) Let $B_{1}$ and $C_{1}$ respectively be points such that $A P B B_{1}$ and $A P C C_{1}$ are rectangles. It is evident that $B_{1}$ and $C_{1}$ lie on the larger circle and that $\overrightarrow{P U}=\frac{1}{2} \overrightarrow{P B_{1}}$ and $\overrightarrow{P V}=\frac{1}{2} \overrightarrow{P C_{1}}$. It is evident that we can arrange for an arbitrary point on the larger circle to be $B_{1}$ or $C_{1}$. Hence, the locus of $U$ and $V$ is equal to the circle obtained when the larger circle is shrunk by a factor of $1 / 2$ with respect to point $P$.


19. (MEX 1) Let $f(n)$ be a function defined on the set of all positive integers and having its values in the same set. Suppose that $f(f(m)+f(n))=m+n$ for all positive integers $n, m$. Find all possible values for $f(1988)$.

Solution: 19. We will show that $f(n)=n$ for every $n$ (thus also $f(1988)=1988$ ).  Let $f(1)=r$ and $f(2)=s$. We obtain respectively the following equalities: $f(2 r)=f(r+r)=2 ; f(2 s)=f(s+s)=4 ; f(4)=f(2+2)=4 r ; f(8)=$ $f(4+4)=4 s ; f(5 r)=f(4 r+r)=5 ; f(r+s)=3 ; f(8)=f(5+3)=6 r+s$. Then $4 s=6 r+s$, which means that $s=2 r$. Now we prove by induction that $f(n r)=n$ and $f(n)=n r$ for every $n \geq 4$. First we have that $f(5)=f(2+3)=3 r+s=5 r$, so that the statement is true for $n=4$ and $n=5$. Suppose that it holds for $n-1$ and $n$. Then $f(n+1)=f(n-1+2)=(n-1) r+2 r=(n+1) r$, and $f((n+1) r)=f((n-1) r+2 r)=(n-1)+2=n+1$. This completes the induction. Since $4 r \geq 4$, we have that $f(4 r)=4 r^{2}$, and also $f(4 r)=4$. Then $r=1$, and consequently $f(n)=n$ for every natural number $n$. Second solution. $f(f(1)+n+m)=f(f(1)+f(f(n)+f(m)))=1+f(n)+$ $f(m)$, so $f(n)+f(m)$ is a function of $n+m$. Hence $f(n+1)+f(1)=$ $f(n)+f(2)$ and $f(n+1)-f(n)=f(2)-f(1)$, implying that $f(n)=A n+B$ for some constants $A, B$. It is easy to check that $A=1, B=0$ is the only possibility.


2. (BUL 3) Let $n$ be a positive integer. Find the number of odd coefficients of the polynomial  $$ u_{n}(x)=\left(x^{2}+x+1\right)^{n} $$

Solution: 2. For polynomials $f(x), g(x)$ with integer coefficients, we use the notation $f(x) \sim g(x)$ if all the coefficients of $f-g$ are even. Let $n=2^{s}$. It is immediately shown by induction that $\left(x^{2}+x+1\right)^{2^{s}} \sim x^{2^{s+1}}+x^{2^{s}}+1$, and the required number for $n=2^{s}$ is 3 .  Let $n=2^{s}-1$. If $s$ is odd, then $n \equiv 1(\bmod 3)$, while for $s$ even, $n \equiv 0$ $(\bmod 3)$. Consider the polynomial  $$ R_{s}(x)= \begin{cases}(x+1)\left(x^{2 n-1}+x^{2 n-4}+\cdots+x^{n+3}\right)+x^{n+1} & \\ +x^{n}+x^{n-1}+(x+1)\left(x^{n-4}+x^{n-7}+\cdots+1\right), & 2 \nmid s \\ (x+1)\left(x^{2 n-1}+x^{2 n-4}+\cdots+x^{n+2}\right)+x^{n} & \\ +(x+1)\left(x^{n-3}+x^{n-6}+\cdots+1\right), & 2 \mid s\end{cases} $$  It is easily checked that $\left(x^{2}+x+1\right) R_{s}(x) \sim x^{2^{s+1}}+x^{2^{s}}+1 \sim\left(x^{2}+x+1\right)^{2^{s}}$, so that $R_{s}(x) \sim\left(x^{2}+x+1\right)^{2^{s}-1}$. In this case, the number of odd coefficients is $\left(2^{s+2}-(-1)^{s}\right) / 3$. Now we pass to the general case. Let the number $n$ be represented in the binary system as  $$ n=\underbrace{11 \ldots 1}_{a_{k}} \underbrace{00 \ldots 0}_{b_{k}} \underbrace{11 \ldots 1}_{a_{k-1}} \underbrace{00 \ldots 0}_{b_{k-1}} \cdots \underbrace{11 \ldots 1}_{a_{1}} \underbrace{00 \ldots 0}_{b_{1}} $$  $b_{i}>0(i>1), b_{1} \geq 0$, and $a_{i}>0$. Then $n=\sum_{i=1}^{k} 2^{s_{i}}\left(2^{a_{i}}-1\right)$, where $s_{i}=b_{1}+a_{1}+b_{2}+a_{2}+\cdots+b_{i}$, and hence  $$ u_{n}(x)=\left(x^{2}+x+1\right)^{n}=\prod_{i=1}^{k}\left(x^{2}+x+1\right)^{2^{s_{i}}\left(2^{a_{i}}-1\right)} \sim \prod_{i=1}^{k} R_{a_{i}}\left(x^{2^{s_{i}}}\right) $$  Let $R_{a_{i}}\left(x^{2^{s_{i}}}\right) \sim x^{r_{i, 1}}+\cdots+x^{r_{i, d_{i}}}$; clearly $r_{i, j}$ is divisible by $2^{s_{i}}$ and $r_{i, j} \leq 2^{s_{i}+1}\left(2^{a_{i}}-1\right)<2^{s_{i+1}}$, so that for any $j, r_{i, j}$ can have nonzero binary digits only in some position $t, s_{i} \leq t \leq s_{i+1}-1$. Therefore, in  $$ \prod_{i=1}^{k} R_{a_{i}}\left(x^{2^{s_{i}}}\right) \sim \prod_{i=1}^{k}\left(x^{r_{i, 1}}+\cdots+x^{r_{i, d_{i}}}\right)=\sum_{i=1}^{k} \sum_{p_{i}=1}^{d_{i}} x^{r_{1, p_{1}}+r_{2, p_{2}}+\cdots+r_{k, p_{k}}} $$  all the exponents $r_{1, p_{1}}+r_{2, p_{2}}+\cdots+r_{k, p_{k}}$ are different, so that the number of odd coefficients in $u_{n}(x)$ is  $$ \prod_{i=1}^{k} d_{i}=\prod_{i=1}^{k} \frac{2^{a_{i}+2}-(-1)^{a_{i}}}{3} $$


20. (MON 4) Find the least natural number $n$ such that if the set $\{1,2, \ldots, n\}$ is arbitrarily divided into two nonintersecting subsets, then one of the subsets contains three distinct numbers such that the product of two of them equals the third.

Solution: 20. Suppose that $A_{n}=\{1,2, \ldots, n\}$ is partitioned into $B_{n}$ and $C_{n}$, and that neither $B_{n}$ nor $C_{n}$ contains 3 distinct numbers one of which is equal to the product of the other two. If $n \geq 96$, then the divisors of 96 must be split up. Let w.l.o.g. $2 \in B_{n}$. There are four cases. (i) $3 \in B_{n}, 4 \in B_{n}$. Then $6,8,12 \in C_{n} \Rightarrow 48,96 \in B_{n}$. A contradiction for $96=2 \cdot 48$. (ii) $3 \in B_{n}, 4 \in C_{n}$. Then $6 \in C_{n}, 24 \in B_{n}, 8,12,48 \in C_{n}$. A contradiction for $48=6 \cdot 8$. (iii) $3 \in C_{n}, 4 \in B_{n}$. Then $8 \in C_{n}, 24 \in B_{n}, 6,48 \in C_{n}$. A contradiction for $48=6 \cdot 8$. (iv) $3 \in C_{n}, 4 \in C_{n}$. Then $12 \in B_{n}, 6,24 \in C_{n}$. A contradiction for $24=4 \cdot 6$. If $n=95$, there is a very large number of ways of partitioning $A_{n}$. For example, $B_{n}=\left\{1, p, p^{2}, p^{3} q^{2}, p^{4} q, p^{2} q r \mid p, q, r=\operatorname{distinct}\right.$ primes $\}$, $C_{n}=\left\{p^{3}, p^{4}, p^{5}, p^{6}, p q, p^{2} q, p^{3} q, p^{2} q^{2}, p q r \mid p, q, r=\right.$ distinct primes $\}$. Then $B_{95}=\{1,2,3,4,5,7,9,11,13,17,19,23,25,29,31,37,41$, $43,47,48,49,53,59,60,61,67,71,72,73,79,80,83,84,89,90\}$.


21. (POL 4) Forty-nine students solve a set of three problems. The score for each problem is a whole number of points from 0 to 7 . Prove that there exist two students $A$ and $B$ such that for each problem, $A$ will score at least as many points as $B$.

Solution: 21. Let $X$ be the set of all ordered triples $a=\left(a_{1}, a_{2}, a_{3}\right)$ for $a_{i} \in\{0,1, \ldots, 7\}$. Write $a \prec b$ if $a_{i} \leq b_{i}$ for $i=1,2,3$ and $a \neq b$. Call a subset $Y \subset X$ independent if there are no $a, b \in Y$ with $a \prec b$. We shall prove that an independent set contains at most 48 elements. For $j=0,1, \ldots, 21$ let $X_{j}=\left\{\left(a_{1}, a_{2}, a_{3}\right) \in X \mid a_{1}+a_{2}+a_{3}=j\right\}$. If $x \prec y$ and $x \in X_{j}, y \in X_{j+1}$ for some $j$, then we say that $y$ is a successor of $x$, and $x$ a predecessor of $y$. Lemma. If $A$ is an $m$-element subset of $X_{j}$ and $j \leq 10$, then there are at least $m$ distinct successors of the elements of $A$. Proof. For $k=0,1,2,3$ let $X_{j, k}=\left\{\left(a_{1}, a_{2}, a_{3}\right) \in X_{j} \mid \min \left(a_{1}, a_{2}, a_{3}, 7-\right.\right.$ $\left.\left.a_{1}, 7-a_{2}, 7-a_{3}\right)=k\right\}$. It is easy to verify that every element of $X_{j, k}$ has at least two successors in $X_{j+1, k}$ and every element of $X_{j+1, k}$ has at most two predecessors in $X_{j, k}$. Therefore the number of elements of $A \cap X_{j, k}$ is not greater than the number of their successors. Since $X_{j}$ is a disjoint union of $X_{j, k}, k=0,1,2,3$, the lemma follows. Similarly, elements of an $m$-element subset of $X_{j}, j \geq 11$, have at least $m$ predecessors. Let $Y$ be an independent set, and let $p, q$ be integers such that $p<10<q$. We can transform $Y$ by replacing all the elements of $Y \cap X_{p}$ with their successors, and all the elements of $Y \cap X_{q}$ with their predecessors. After this transformation $Y$ will still be independent, and by the lemma its size will not be reduced. Every independent set can be eventually transformed in this way into a subset of $X_{10}$, and $X_{10}$ has exactly 48 elements.


22. (KOR 2) Let $p$ be the product of two consecutive integers greater than 2. Show that there are no integers $x_{1}, x_{2}, \ldots, x_{p}$ satisfying the equation  $$ \sum_{i=1}^{p} x_{i}^{2}-\frac{4}{4 p+1}\left(\sum_{i=1}^{p} x_{i}\right)^{2}=1 $$  Alternative formulation. Show that there are only two values of $p$ for which there are integers $x_{1}, x_{2}, \ldots, x_{p}$ satisfying the above inequality.

Solution: 22. Set $X=\sum_{i=1}^{p} x_{i}$ and w.l.o.g. assume that $X \geq 0$ (if $\left(x_{1}, \ldots, x_{p}\right)$ is a solution, then $\left(-x_{1}, \ldots,-x_{p}\right)$ is a solution too). Since $x^{2} \geq x$ for all integers $x$, it follows that $\sum_{i=1}^{p} x_{i}^{2} \geq X$. If the last inequality is an equality, then all $x_{i}$ 's are 0 or 1 ; then, taking that there are $a 1$ 's, the equation becomes $4 p+1=4(a+1)+\frac{4}{a-1}$, which forces $p=6$ and $a=5$. Otherwise, we have $X+1 \leq \sum_{i=1}^{p} x_{i}^{2}=\frac{4}{4 p+1} X^{2}+1$, so $X \geq p+1$. Also, by the Cauchy-Schwarz inequality, $X^{2} \leq p \sum_{i=1}^{p} x_{i}^{2}=\frac{4 p}{4 p+1} X^{2}+p$, so $X^{2} \leq 4 p^{2}+p$ and $X \leq 2 p$. Thus $1 \leq X / p \leq 2$. However,  $$ \begin{aligned} \sum_{i=1}^{p}\left(x_{i}-\frac{X}{p}\right)^{2} & =\sum x_{i}^{2}-\frac{2 X}{p} \sum x_{i}+\frac{X^{2}}{p} \\ & =\sum x_{i}^{2}-p \frac{X^{2}}{p^{2}}=1-\frac{X^{2}}{p(4 p+1)}<1 \end{aligned} $$  and we deduce that $-1<x_{i}-X / p<1$ for all $i$. This finally gives $x_{i} \in\{1,2\}$. Suppose there are $b 2$ 's. Then $3 b+p=4(b+p)^{2} /(4 p+1)+1$, so $p=b+1 /(4 b-3)$, which leads to $p=2, b=1$. Thus there are no solutions for any $p \notin\{2,6\}$. Remark. The condition $p=n(n+1), n \geq 3$, was unnecessary in the official solution, too (its only role was to simplify showing that $X \neq p-1$ ).


23. (SIN 2) Let $Q$ be the center of the inscribed circle of a triangle $A B C$. Prove that for any point $P$, $a(P A)^{2}+b(P B)^{2}+c(P C)^{2}=a(Q A)^{2}+b(Q B)^{2}+c(Q C)^{2}+(a+b+c)(Q P)^{2}$, where $a=B C, b=C A$, and $c=A B$.

Solution: 23. Denote by $R$ the intersection point of lines $A Q$ and $B C$. We know that $B R: R C=c: b$ and $A Q: Q R=(b+c): a$. By applying Stewart's theorem to $\triangle P B C$ and $\triangle P A R$ we obtain  $$ \begin{aligned} a \cdot A P^{2} & +b \cdot B P^{2}+c \cdot C P^{2}=a P A^{2}+(b+c) P R^{2}+(b+c) R B \cdot R C \\ & =(a+b+c) Q P^{2}+(b+c) R B \cdot R C+(a+b+c) Q A \cdot Q R \end{aligned} $$  On the other hand, putting $P=Q$ into (1), we get that  $$ a \cdot A Q^{2}+b \cdot B Q^{2}+c \cdot C Q^{2}=(b+c) R B \cdot R C+(a+b+c) Q A \cdot Q R, $$  and the required statement follows. Second solution. At vertices $A, B, C$ place weights equal to $a, b, c$ in some units respectively, so that $Q$ is the center of gravity of the system. The left side of the equality to be proved is in fact the moment of inertia of the system about the axis through $P$ and perpendicular to the plane $A B C$. On the other side, the right side expresses the same, due to the parallel axes theorem. Alternative approach. Analytical geometry. The fact that all the variable segments appear squared usually implies that this is a good approach. Assign coordinates $A\left(x_{a}, y_{a}\right), B\left(x_{b}, y_{b}\right), C\left(x_{c}, y_{c}\right)$, and $P(x, y)$, use that $(a+b+c) \mathbf{Q}=a \mathbf{A}+b \mathbf{B}+c \mathbf{C}$, and calculate. Alternatively, differentiate $f(x, y)=a \cdot A P^{2}+b \cdot B P^{2}+c \cdot C P^{2}-(a+b+c) Q P^{2}$ and show that it is constant.


24. (SWE 2) Let $\left\{a_{k}\right\}_{1}^{\infty}$ be a sequence of nonnegative real numbers such that $a_{k}-2 a_{k+1}+a_{k+2} \geq 0$ and $\sum_{j=1}^{k} a_{j} \leq 1$ for all $k=1,2, \ldots$. Prove that $0 \leq\left(a_{k}-a_{k+1}\right)<\frac{2}{k^{2}}$ for all $k=1,2, \ldots$.

Solution: 24. The first condition means in fact that $a_{k}-a_{k+1}$ is decreasing. In particular, if $a_{k}-a_{k+1}=-\delta<0$, then $a_{k}-a_{k+m}=\left(a_{k}-a_{k+1}\right)+\cdots+\left(a_{k+m-1}-\right.$ $\left.a_{k+m}\right)<-m \delta$, which implies that $a_{k+m}>a_{k}+m \delta$, and consequently $a_{k+m}>1$ for large enough $m$, a contradiction. Thus $a_{k}-a_{k+1} \geq 0$ for all $k$. Suppose that $a_{k}-a_{k+1}>2 / k^{2}$. Then for all $i<k, a_{i}-a_{i+1}>2 / k^{2}$, so that $a_{i}-a_{k+1}>2(k+1-i) / k^{2}$, i.e., $a_{i}>2(k+1-i) / k^{2}, i=1,2, \ldots, k$. But this implies $a_{1}+a_{2}+\cdots+a_{k}>2 / k^{2}+4 / k^{2}+\cdots+2 k / k^{2}=k(k+1) / k^{2}$, which is impossible. Therefore $a_{k}-a_{k+1} \leq 2 / k^{2}$ for all $k$.


25. (GBR 1) A positive integer is called a double number if its decimal representation consists of a block of digits, not commencing with 0 , followed immediately by an identical block. For instance, 360360 is a double number, but 36036 is not. Show that there are infinitely many double numbers that are perfect squares.

Solution: 25. Observe that $1001=7 \cdot 143$, i.e., $10^{3}=-1+7 a, a=143$. Then by the binomial theorem, $10^{21}=(-1+7 a)^{7}=-1+7^{2} b$ for some integer $b$, so that we also have $10^{21 n} \equiv-1(\bmod 49)$ for any odd integer $n>0$. Hence $N=\frac{9}{49}\left(10^{21 n}+1\right)$ is an integer of $21 n$ digits, and $N\left(10^{21 n}+1\right)=$ $\left(\frac{3}{7}\left(10^{21 n}+1\right)\right)^{2}$ is a double number that is a perfect square.


26. (GBR 2) ${ }^{\mathrm{IMO} 3} \mathrm{~A}$ function $f$ defined on the positive integers (and taking positive integer values) is given by  $$ \begin{aligned} f(1) & =1, \quad f(3)=3 \\ f(2 n) & =f(n) \\ f(4 n+1) & =2 f(2 n+1)-f(n) \\ f(4 n+3) & =3 f(2 n+1)-2 f(n) \end{aligned} $$  for all positive integers $n$. Determine with proof the number of positive integers less than or equal to 1988 for which $f(n)=n$.

Solution: 26. The overline in this problem will exclusively denote binary representation. We will show by induction that if $n=\overline{c_{k} c_{k-1} \ldots c_{0}}=\sum_{i=0}^{k} c_{i} 2^{i}$ is the binary representation of $n\left(c_{i} \in\{0,1\}\right)$, then $f(n)=\overline{c_{0} c_{1} \ldots c_{k}}=$ $\sum_{i=0}^{k} c_{i} 2^{k-i}$ is the number whose binary representation is the palindrome of the binary representation of $n$. This evidently holds for $n \in\{1,2,3\}$.  Let us assume that the claim holds for all numbers up to $n-1$ and show it holds for $n=\overline{c_{k} c_{k-1} \ldots c_{0}}$. We observe three cases: (i) $c_{0}=0 \Rightarrow n=2 m \Rightarrow f(n)=f(m)=\overline{0 c_{1} \ldots c_{k}}=\overline{c_{0} c_{1} \ldots c_{k}}$. (ii) $c_{0}=1, c_{1}=0 \Rightarrow n=4 m+1 \Rightarrow f(n)=2 f(2 m+1)-f(m)=$ $2 \cdot \overline{1 c_{2} \ldots c_{k}}-\overline{c_{2} \ldots c_{k}}=2^{k}+2 \cdot \overline{c_{2} \ldots c_{k}}-\overline{c_{2} \ldots c_{k}}=\overline{10 c_{2} \ldots c_{k}}=$ $\overline{c_{0} c_{1} \ldots c_{k}}$. (iii) $c_{0}=1, c_{1}=1 \Rightarrow n=4 m+3 \Rightarrow f(n)=3 f(2 m+1)-2 f(m)=$ $3 \cdot \overline{1 c_{2} \ldots c_{k}}-2 \cdot \overline{c_{2} \ldots c_{k}}=2^{k}+2^{k-1}+3 \cdot \overline{c_{2} \ldots c_{k}}-2 \cdot \overline{c_{2} \ldots c_{k}}=$ $\overline{11 c_{2} \ldots c_{k}}=\overline{c_{0} c_{1} \ldots c_{k}}$. We thus have to find the number of palindromes in binary representation smaller than $1998=\overline{11111000100}$. We note that for all $m \in \mathbb{N}$ the numbers of $2 m$ - and $(2 m-1)$-digit binary palindromes are both equal to $2^{m-1}$. We also note that $\overline{11111011111}$ and $\overline{11111111111}$ are the only 11-digit palindromes larger than 1998. Hence we count all palindromes of up to 11 digits and exclude the largest two. The number of $n \leq 1998$ such that $f(n)=n$ is thus equal to $1+1+2+2+4+4+8+8+16+16+32-2=92$.


27. (GBR 4) The triangle $A B C$ is acute-angled. Let $L$ be any line in the plane of the triangle and let $u, v, w$ be the lengths of the perpendiculars from $A, B, C$ respectively to $L$. Prove that  $$ u^{2} \tan A+v^{2} \tan B+w^{2} \tan C \geq 2 \Delta $$  where $\Delta$ is the area of the triangle, and determine the lines $L$ for which equality holds.

Solution: 27. Consider a Cartesian system with the $x$-axis on the line $B C$ and origin at the foot of the perpendicular from $A$ to $B C$, so that $A$ lies on the $y$-axis. Let $A$ be $(0, \alpha), B(-\beta, 0), C(\gamma, 0)$, where $\alpha, \beta, \gamma>0$ (because $A B C$ is acute-angled). Then $\tan B=\frac{\alpha}{\beta}, \quad \tan C=\frac{\alpha}{\gamma} \quad$ and $\quad \tan A=-\tan (B+C)=\frac{\alpha(\beta+\gamma)}{\alpha^{2}-\beta \gamma} ;$ here $\tan A>0$, so $\alpha^{2}>\beta \gamma$. Let $L$ have equation $x \cos \theta+y \sin \theta+p=0$. Then  $$ \begin{aligned} & u^{2} \tan A+v^{2} \tan B+w^{2} \tan C \\ & =\frac{\alpha(\beta+\gamma)}{\alpha^{2}-\beta \gamma}(\alpha \sin \theta+p)^{2}+\frac{\alpha}{\beta}(-\beta \cos \theta+p)^{2}+\frac{\alpha}{\gamma}(\gamma \cos \theta+p)^{2} \\ & =\left(\alpha^{2} \sin ^{2} \theta+2 \alpha p \sin \theta+p^{2}\right) \frac{\alpha(\beta+\gamma)}{\alpha^{2}-\beta \gamma}+\alpha(\beta+\gamma) \cos ^{2} \theta+\frac{\alpha(\beta+\gamma)}{\beta \gamma} p^{2} \\ & =\frac{\alpha(\beta+\gamma)}{\beta \gamma\left(\alpha^{2}-\beta \gamma\right)}\left(\alpha^{2} p^{2}+2 \alpha p \beta \gamma \sin \theta+\alpha^{2} \beta \gamma \sin ^{2} \theta+\beta \gamma\left(\alpha^{2}-\beta \gamma\right) \cos ^{2} \theta\right) \\ & =\frac{\alpha(\beta+\gamma)}{\beta \gamma\left(\alpha^{2}-\beta \gamma\right)}\left[(\alpha p+\beta \gamma \sin \theta)^{2}+\beta \gamma\left(\alpha^{2}-\beta \gamma\right)\right] \geq \alpha(\beta+\gamma)=2 \Delta \end{aligned} $$  with equality when $\alpha p+\beta \gamma \sin \theta=0$, i.e., if and only if $L$ passes through $(0, \beta \gamma / \alpha)$, which is the orthocenter of the triangle.


28. (GBR 5) The sequence $\left\{a_{n}\right\}$ of integers is defined by $a_{1}=2, a_{2}=7$, and  $$ -\frac{1}{2}<a_{n+1}-\frac{a_{n}^{2}}{a_{n-1}} \leq \frac{1}{2}, \quad \text { for } n \geq 2 $$  Prove that $a_{n}$ is odd for all $n>1$.

Solution: 28. The sequence is uniquely determined by the conditions, and $a_{1}=2, a_{2}=$ $7, a_{3}=25, a_{4}=89, a_{5}=317, \ldots$; it satisfies $a_{n}=3 a_{n-1}+2 a_{n-2}$ for $n=3,4,5$. We show that the sequence $b_{n}$ given by $b_{1}=2, b_{2}=7$, $b_{n}=3 b_{n-1}+2 b_{n-2}$ has the same inequality property, i.e., that $b_{n}=a_{n}$ : $b_{n+1} b_{n-1}-b_{n}^{2}=\left(3 b_{n}+2 b_{n-1}\right) b_{n-1}-b_{n}\left(3 b_{n-1}+2 b_{n-2}\right)=-2\left(b_{n} b_{n-2}-b_{n-1}^{2}\right)$ for $n>2$ gives that $b_{n+1} b_{n-1}-b_{n}^{2}=(-2)^{n-2}$ for all $n \geq 2$. But then  $$ \left|b_{n+1}-\frac{b_{n}^{2}}{b_{n-1}}\right|=\frac{2^{n-2}}{b_{n-1}}<\frac{1}{2}, $$  since it is easily shown that $b_{n-1}>2^{n-1}$ for all $n$. It is obvious that $a_{n}=b_{n}$ are odd for $n>1$.


29. (USA 3) A number of signal lights are equally spaced along a one-way railroad track, labeled in order $1,2, \ldots, N(N \geq 2)$. As a safety rule, a train is not allowed to pass a signal if any other train is in motion on the length of track between it and the following signal. However, there is no limit to the number of trains that can be parked motionless at a signal, one behind the other. (Assume that the trains have zero length.) A series of $K$ freight trains must be driven from Signal 1 to Signal $N$. Each train travels at a distinct but constant speed (i.e., the speed is fixed and different from that of each of the other trains) at all times when it is not blocked by the safety rule. Show that regardless of the order in which the trains are arranged, the same time will elapse between the first train's departure from Signal 1 and the last train's arrival at Signal $N$.

Solution: 29. Let the first train start from Signal 1 at time 0, and let $t_{j}$ be the time it takes for the $j$ th train in the series to travel from one signal to the next. By induction on $k$, we show that Train $k$ arrives at signal $n$ at time $s_{k}+(n-2) m_{k}$, where $s_{k}=t_{1}+\cdots+t_{k}$ and $m_{k}=\max _{j=1, \ldots, k} t_{j}$. For $k=1$ the statement is clear. We now suppose that it is true for $k$ trains and for every $n$, and add a $(k+1)$ th train behind the others at Signal 1. There are two cases to consider: (i) $t_{k+1} \geq m_{k}$, i.e., $m_{k+1}=t_{k+1}$. Then Train $k+1$ leaves Signal 1 when all the others reach Signal 2, which by the induction happens at time $s_{k}$. Since by the induction hypothesis Train $k$ arrives at Signal $i+1$ at time $s_{k}+(i-1) m_{k} \leq s_{k}+(i-1) t_{k+1}$, Train $k+1$ is never forced to stop. The journey finishes at time $s_{k}+(n-1) t_{k+1}=s_{k+1}+(n-2) m_{k+1}$. (ii) $t_{k+1}<m_{k}$, i.e., $m_{k+1}=m_{k}$. Train $k+1$ leaves Signal 1 at time $s_{k}$, and reaches Signal 2 at time $s_{k}+t_{k+1}$, but must wait there until all the other trains get to Signal 3, i.e., until time $s_{k}+m_{k}$ (by the induction hypothesis). So it reaches Signal 3 only at time $s_{k}+m_{k}+$ $t_{k+1}$. Similarly, it gets to Signal 4 at time $s_{k}+2 m_{k}+t_{k+1}$, etc. Thus the entire schedule finishes at time $s_{k}+(n-2) m_{k}+t_{k+1}=s_{k+1}+$ $(n-2) m_{k+1}$.


3. (CAN 1) The triangle $A B C$ is inscribed in a circle. The interior bisectors of the angles $A, B$, and $C$ meet the circle again at $A^{\prime}, B^{\prime}$, and $C^{\prime}$ respectively. Prove that the area of triangle $A^{\prime} B^{\prime} C^{\prime}$ is greater than or equal to the area of triangle $A B C$.

Solution: 3. Let $R$ be the circumradius, $r$ the inradius, $s$ the semiperimeter, $\Delta$ the area of $A B C$ and $\Delta^{\prime}$ the area of $A^{\prime} B^{\prime} C^{\prime}$. The angles of triangle $A^{\prime} B^{\prime} C^{\prime}$ are $A^{\prime}=90^{\circ}-A / 2, B^{\prime}=90^{\circ}-B / 2$, and $C^{\prime}=90^{\circ}-C / 2$, and hence  $$ \Delta=2 R^{2} \sin A \sin B \sin C $$  and $\Delta^{\prime}=2 R^{2} \sin A^{\prime} \sin B^{\prime} \sin C^{\prime}=2 R^{2} \cos \frac{A}{2} \cos \frac{B}{2} \cos \frac{C}{2}$. Hence,  $$ \frac{\Delta}{\Delta^{\prime}}=\frac{\sin A \sin B \sin C}{\cos \frac{A}{2} \cos \frac{B}{2} \cos \frac{C}{2}}=8 \sin \frac{A}{2} \sin \frac{B}{2} \sin \frac{C}{2}=\frac{2 r}{R} $$  where we have used that $r=A I \sin (A / 2)=\cdots=4 R \sin (A / 2) \cdot \sin (B / 2)$. $\sin (C / 2)$. Euler's inequality $2 r \leq R$ shows that $\Delta \leq \Delta^{\prime}$. Second solution. Let $H$ be orthocenter of triangle $A B C$, and $H_{a}, H_{b}, H_{c}$ points symmetric to $H$ with respect to $B C, C A, A B$, respectively. Since $\angle B H_{a} C=\angle B H C=180^{\circ}-\angle A$, points $H_{a}, H_{b}, H_{c}$ lie on the circumcircle of $A B C$, and the area of the hexagon $A H_{c} B H_{a} C H_{b}$ is double the area of $A B C$. (1) Let us apply the analogous result for the triangle $A^{\prime} B^{\prime} C^{\prime}$. Since its orthocenter is the incenter $I$ of $A B C$, and the point symmetric to $I$ with respect to $B^{\prime} C^{\prime}$ is the point $A$, we find by (1) that the area of the hexagon $A C^{\prime} B A^{\prime} C B^{\prime}$ is double the area of $A^{\prime} B^{\prime} C^{\prime}$. But it is clear that the area of $\Delta C H_{a} B$ is less than or equal to the area of $\Delta C A^{\prime} B$ etc.; hence, the area of $A H_{c} B H_{a} C H_{b}$ does not exceed the area of $A C^{\prime} B A^{\prime} C B^{\prime}$. The statement follows immediately.


30. (USS 1) A point $M$ is chosen on the side $A C$ of the triangle $A B C$ in such a way that the radii of the circles inscribed in the triangles $A B M$ and $B M C$ are equal. Prove that  $$ B M^{2}=\Delta \cot \frac{B}{2} $$  where $\Delta$ is the area of the triangle $A B C$.

Solution: 30. Let $\Delta_{1}, s_{1}, r^{\prime}$ denote the area, semiperimeter, and inradius of triangle $A B M, \Delta_{2}, s_{2}, r^{\prime}$ the same quantities for triangle $M B C$, and $\Delta, s, r$ those for $\triangle A B C$. Also, let $P^{\prime}$ and $Q^{\prime}$ be the points of tangency of the incircle of $\triangle A B M$ with the side $A B$ and of the incircle of $\triangle M B C$ with the side $B C$, respectively, and let $P, Q$ be the points of tangency of the incircle of $\triangle A B C$ with the sides $A B, B C$. We have $\Delta_{1}=s_{1} r^{\prime}, \Delta_{2}=s_{2} r^{\prime}, \Delta=s r$, so that $s r=\left(s_{1}+s_{2}\right) r^{\prime}$. Then  $$ s_{1}+s_{2}=s+B M \quad \Rightarrow \quad \frac{r^{\prime}}{r}=\frac{s}{s+B M} $$  On the other hand, from similarity of triangles it follows that $A P^{\prime} / A P=$ $C Q^{\prime} / C Q=r^{\prime} / r$. By a well-known formula we find that $A P=s-B C$, $C Q=s-A B, A P^{\prime}=s_{1}-B M, C Q^{\prime}=s_{2}-B M$, and therefore deduce that  $$ \frac{r^{\prime}}{r}=\frac{s_{1}-B M}{s-B C}=\frac{s_{2}-B M}{s-A B} \Rightarrow \frac{r^{\prime}}{r}=\frac{s_{1}+s_{2}-2 B M}{2 s-A B-B C}=\frac{s-B M}{A C} . $$  It follows from (1) and (2) that $(s-B M) / A C=s /(s+B M)$, giving us $s^{2}-B M^{2}=s \cdot A C$. Finally,  $$ B M^{2}=s(s-A C)=s \cdot B P=s \cdot r \cot \frac{B}{2}=\Delta \cot \frac{B}{2} $$


31. (USS 2) Around a circular table an even number of persons have a discussion. After a break they sit again around the circular table in a different order. Prove that there are at least two people such that the number of participants sitting between them before and after the break is the same.

Solution: 31. Denote the number of participants by $2 n$, and assign to each seat one of the numbers $1,2, \ldots, 2 n$. Let the participant who was sitting at the seat $k$ before the break move to seat $\pi(k)$. It suffices to prove that for every permutation $\pi$ of the set $\{1,2, \ldots, 2 n\}$, there exist distinct $i, j$ such that $\pi(i)-\pi(j)= \pm(i-j)$, the differences being calculated modulo $2 n$. If there are distinct $i$ and $j$ such that $\pi(i)-i=\pi(j)-j$ modulo $2 n$, then we are done. Suppose that all the differences $\pi(i)-i$ are distinct modulo $2 n$. Then they take values $0,1, \ldots, 2 n-1$ in some order, and consequently  $$ \sum_{i=1}^{2 n}(\pi(i)-i)=0+1+\cdots+(2 n-1) \equiv n(2 n-1)(\bmod 2 n) $$  On the other hand, $\sum_{i=1}^{2 n}(\pi(i)-i)=\sum \pi(i)-\sum i=0$, which is a contradiction because $n(2 n-1)$ is not divisible by $2 n$. Remark. For an odd number of participants, the statement is false. For example, the permutation $(a, 2 a, \ldots,(2 n+1) a)$ of $(1,2, \ldots, 2 n+1)$ modulo $2 n+1$ does not satisfy the statement when $\operatorname{gcd}\left(a^{2}-1,2 n+1\right)=1$. Check that such an $a$ always exists.


4. (CZS 1) An $n \times n$ chessboard $(n \geq 2)$ is numbered by the numbers $1,2, \ldots, n^{2}$ (every number occurs once). Prove that there exist two neighboring (which share a common edge) squares such that their numbers differ by at least $n$.

Solution: 4. Suppose that the numbers of any two neighboring squares differ by at most $n-1$. For $k=1,2, \ldots, n^{2}-n$, let $A_{k}, B_{k}$, and $C_{k}$ denote, respectively, the sets of squares numbered by $1,2, \ldots, k$; of squares numbered by $k+$ $n, k+n+1, \ldots, n^{2}$; and of squares numbered by $k+1, \ldots, k+n-1$. By the assumption, the squares from $A_{k}$ and $B_{k}$ have no edge in common; $C_{k}$ has $n-1$ elements only. Consequently, for each $k$ there exists a row and a column all belonging either to $A_{k}$, or to $B_{k}$. For $k=1$, it must belong to $B_{k}$, while for $k=n^{2}-n$ it belongs to $A_{k}$. Let $k$ be the smallest index such that $A_{k}$ contains a whole row and a whole column. Since $B_{k-1}$ has that property too, it must have at least two squares in common with $A_{k}$, which is impossible.


5. (CZS 2) ${ }^{\mathrm{IMO} 2}$ Let $n$ be an even positive integer. Let $A_{1}, A_{2}, \ldots, A_{n+1}$ be sets having $n$ elements each such that any two of them have exactly one element in common while every element of their union belongs to at least two of the given sets. For which $n$ can one assign to every element of the union one of the numbers 0 and 1 in such a manner that each of the sets has exactly $n / 2$ zeros?

Solution: 5. Let $n=2 k$ and let $A=\left\{A_{1}, \ldots, A_{2 k+1}\right\}$ denote the family of sets with the desired properties. Since every element of their union $B$ belongs to at least two sets of $A$, it follows that $A_{j}=\bigcup_{i \neq j} A_{i} \cap A_{j}$ holds for every $1 \leq j \leq 2 k+1$. Since each intersection in the sum has at most one element and $A_{j}$ has $2 k$ elements, it follows that every element of $A_{j}$, i.e., in general of $B$, is a member of exactly two sets. We now prove that $k$ is even, assuming that the marking described in the problem exists. We have already shown that for every two indices $1 \leq j \leq 2 k+1$ and $i \neq j$ there exists a unique element contained in both $A_{i}$ and $A_{j}$. On a $2 k \times 2 k$ matrix let us mark in the $i$ th column and $j$ th row for $i \neq j$ the number that was joined to the element of $B$ in $A_{i} \cap A_{j}$. In the $i$ th row and column let us mark the number of the element of $B$ in $A_{i} \cap A_{2 k+1}$. In each row from the conditions of the marking there must be an even number of zeros. Hence, the total number of zeros in the matrix is even. The matrix is symmetric with respect to its main diagonal; hence it has an even number of zeros outside its main diagonal. Hence, the number of zeros on the main diagonal must also be even and this number equals the number of elements in $A_{2 k+1}$ that are marked with 0 , which is $k$. Hence $k$ must be even.  For even $k$ we note that the dimensions of a $2 k \times 2 k$ matrix are divisible by 4 . Tiling the entire matrix with the $4 \times 4$ submatrix  $$ Q=\left[\begin{array}{llll} 0 & 1 & 0 & 1 \\ 1 & 0 & 1 & 0 \\ 0 & 1 & 1 & 0 \\ 1 & 0 & 0 & 1 \end{array}\right] $$  we obtain a marking that indeed satisfies all the conditions of the problem; hence we have shown that the marking is possible if and only if $k$ is even.


6. (CZS 3) In a given tetrahedron $A B C D$ let $K$ and $L$ be the centers of edges $A B$ and $C D$ respectively. Prove that every plane that contains the line $K L$ divides the tetrahedron into two parts of equal volume.

Solution: 6. Let $\omega$ be the plane through $A B$, parallel to $C D$. Define the point transformation $f: X \mapsto X^{\prime}$ in space as follows. If $X \in K L$, then $X^{\prime}=X$; otherwise, let $\omega_{X}$ be the plane through $X$ parallel to $\omega$ : then $X^{\prime}$ is the point symmetric to $X$ with respect to the intersection point of $K L$ with $\omega_{X}$. Clearly, $f(A)=B, f(B)=A, f(C)=D, f(D)=C$; hence $f$ maps the tetrahedron onto itself. We shall show that $f$ preserves volumes. Let $s: X \mapsto X^{\prime \prime}$ denote the symmetry with respect to $K L$, and $g$ the transformation mapping $X^{\prime \prime}$ into $X^{\prime}$; then $f=g \circ s$. If points $X_{1}^{\prime \prime}=s\left(X_{1}\right)$ and $X_{2}^{\prime \prime}=s\left(X_{2}\right)$ have the property that $X_{1}^{\prime \prime} X_{2}^{\prime \prime}$ is parallel to $K L$, then the segments $X_{1}^{\prime \prime} X_{2}^{\prime \prime}$ and $X_{1}^{\prime} X_{2}^{\prime}$ have the same length and lie on the same line. Then by Cavalieri's principle $g$ preserves volume, and so does $f$. Now, if $\alpha$ is any plane containing the line $K L$, the two parts of the tetrahedron on which it is partitioned by $\alpha$ are transformed into each other by $f$, and therefore have the same volumes. Second solution. Suppose w.l.o.g. that the plane $\alpha$ through $K L$ meets the interiors of edges $A C$ and $B D$ at $X$ and $Y$. Let $\overrightarrow{A X}=\lambda \overrightarrow{A C}$ and $\overrightarrow{B Y}=\mu \overrightarrow{B D}$, for $0 \leq \lambda, \mu \leq 1$. Then the vectors $\overrightarrow{K X}=\lambda \overrightarrow{A C}-\overrightarrow{A B} / 2$, $\overrightarrow{K Y}=\mu \overrightarrow{B D}+\overrightarrow{A B} / 2, \overrightarrow{K L}=\overrightarrow{A C} / 2+$ $\overrightarrow{B D} / 2$ are coplanar; i.e., there exist real numbers $a, b, c$, not all zero, such that ![](https://cdn.mathpix.com/cropped/2024_11_18_8e985d6b9c83aa3e9d0eg-512.jpg?height=426&width=529&top_left_y=1294&top_left_x=829)  $$ \overrightarrow{0}=a \overrightarrow{K X}+b \overrightarrow{K Y}+c \overrightarrow{K L}=(\lambda a+c / 2) \overrightarrow{A C}+(\mu b+c / 2) \overrightarrow{B D}+\frac{b-a}{2} \overrightarrow{A B} $$  Since $\overrightarrow{A C}, \overrightarrow{B D}, \overrightarrow{A B}$ are linearly independent, we must have $a=b$ and $\lambda=\mu$. We need to prove that the volume of the polyhedron $K X L Y B C$, which is one of the parts of the tetrahedron $A B C D$ partitioned by $\alpha$, equals half of the volume $V$ of $A B C D$. Indeed, we obtain  $$ V_{K X L Y B C}=V_{K X L C}+V_{K B Y L C}=\frac{1}{4}(1-\lambda) V+\frac{1}{4}(1+\mu) V=\frac{1}{2} V . $$


7. (FRA 2) Let $a$ be the greatest positive root of the equation $x^{3}-3 x^{2}+1=$ 0 . Show that $\left[a^{1788}\right]$ and $\left[a^{1988}\right]$ are both divisible by 17 . ( $[x]$ denotes the integer part of $x$.)

Solution: 7. The algebraic equation $x^{3}-3 x^{2}+1=0$ admits three real roots $\beta, \gamma, a$, with  $$ -0.6<\beta<-0.5, \quad 0.6<\gamma<0.7, \quad \sqrt{8}<a<3 . $$  Define, for all integers $n$,  $$ u_{n}=\beta^{n}+\gamma^{n}+a^{n} . $$  It holds that $u_{n+3}=3 u_{n+2}-u_{n}$. Obviously, $0<\beta^{n}+\gamma^{n}<1$ for all $n \geq 2$, and we see that $u_{n}-1=\left[a^{n}\right]$ for $n \geq 2$. It is now a question whether $u_{1788}-1$ and $u_{1988}-1$ are divisible by 17 . Working modulo 17 , we get $u_{0} \equiv 3, u_{1} \equiv 3, u_{2} \equiv 9, u_{3} \equiv 7, u_{4} \equiv$ $1, \ldots, u_{16}=3, u_{17}=3, u_{18}=9$. Thus, $u_{n}$ is periodic modulo 17 , with period 16. Since $1788=16 \cdot 111+12,1988=16 \cdot 124+4$, it follows that $u_{1788} \equiv u_{12} \equiv 1$ and $u_{1988} \equiv u_{4}=1$. So, $\left[a^{1788}\right]$ and $\left[a^{1988}\right]$ are divisible by 17 . Second solution. The polynomial $x^{3}-3 x^{2}+1$ allows the factorization modulo 17 as $(x-4)(x-5)(x+6)$. Hence it is easily seen that $u_{n} \equiv$ $4^{n}+5^{n}+(-6)^{n}$. Fermat's theorem gives us $4^{n} \equiv 5^{n} \equiv(-6)^{n} \equiv 1$ for $16 \mid n$, and the rest follows easily. Remark. In fact, the roots of $x^{3}-3 x^{2}+1=0$ are $\frac{1}{2 \sin 10^{\circ}}, \frac{1}{2 \sin 50^{\circ}}$, and $-\frac{1}{2 \sin 70^{\circ}}$.


8. (FRA 3) Let $u_{1}, u_{2}, \ldots, u_{m}$ be $m$ vectors in the plane, each of length less than or equal to 1 , which add up to zero. Show that one can rearrange $u_{1}, u_{2}, \ldots, u_{m}$ as a sequence $v_{1}, v_{2}, \ldots, v_{m}$ such that each partial sum $v_{1}, v_{1}+v_{2}, v_{1}+v_{2}+v_{3}, \ldots, v_{1}+v_{2}+\cdots+v_{m}$ has length less than or equal to $\sqrt{5}$.

Solution: 8. Consider first the case that the vectors are on the same line. Then if $e$ is a unit vector, we can write $u_{1}=x_{1} e, \ldots, u_{n}=x_{n} e$ for scalars $x_{i},\left|x_{i}\right| \leq 1$, with zero sum. It is now easy to permute $x_{1}, x_{2}, \ldots, x_{n}$ into $z_{1}, z_{2}, \ldots z_{n}$ so that $\left|z_{1}\right| \leq 1,\left|z_{1}+z_{2}\right| \leq 1, \ldots,\left|z_{1}+z_{2}+\cdots+z_{n-1}\right| \leq 1$. Indeed, suppose w.l.o.g. that $z_{1}=x_{1} \geq 0$; then we choose $z_{2}, \ldots, z_{r}$ from the $x_{i}$ 's to be negative, until we get to the first $r$ with $x_{1}+x_{2}+\cdots+x_{r} \leq 0$; we continue successively choosing positive $z_{j}$ 's from the remaining $x_{i}$ 's until we get the first partial sum that is positive, and so on. It is easy to verify that $\left|z_{1}+z_{2}+\cdots+z_{j}\right| \leq 1$ for all $j=1,2, \ldots, n$. Now we pass to the general case. Let $s$ be the longest vector that can be obtained by summing a subset of $u_{1}, \ldots, u_{m}$, and assume w.l.o.g. that $s=u_{1}+\cdots+u_{p}$. Further, let $\delta$ and $\delta^{\prime}$ respectively be the lines through the origin $O$ in the direction of $s$ and perpendicular to $s$, and $e, e^{\prime}$ respectively the unit vectors on $\delta$ and $\delta^{\prime}$. Put $u_{i}=x_{i} e+y_{i} e^{\prime}$, $i=1,2, \ldots, m$. By the definition of $\delta$ and $\delta^{\prime}$, we have $\left|x_{i}\right|,\left|y_{i}\right| \leq 1$; $x_{1}+\cdots+x_{m}=y_{1}+\cdots+y_{m}=0 ; y_{1}+\cdots+y_{p}=y_{p+1}+\cdots+y_{m}=0$; we also have $x_{p+1}, \ldots, x_{m} \leq 0$ (otherwise, if $x_{i}>0$ for some $i$, then $\left|s+v_{i}\right|>|s|$ ), and similarly $x_{1}, \ldots, x_{p} \geq 0$. Finally, suppose by the one-dimensional case that $y_{1}, \ldots, y_{p}$ and $y_{p+1}, \ldots, y_{m}$ are permuted in such a way that all the sums $y_{1}+\cdots+y_{i}$ and $y_{p+1}+\cdots+y_{p+i}$ are $\leq 1$ in absolute value. We apply the construction of the one-dimensional case to $x_{1}, \ldots, x_{m}$ taking, as described above, positive $z_{i}$ 's from $x_{1}, x_{2}, \ldots, x_{p}$ and negative ones from $x_{p+1}, \ldots, x_{m}$, but so that the order is preserved; this way we get a permutation $x_{\sigma_{1}}, x_{\sigma_{2}}, \ldots, x_{\sigma_{m}}$. It is then clear that each sum $y_{\sigma_{1}}+y_{\sigma_{2}}+$ $\cdots+y_{\sigma_{k}}$ decomposes into the sum $\left(y_{1}+y_{2}+\cdots+y_{l}\right)+\left(y_{p+1}+\cdots+y_{p+n}\right)$ (because of the preservation of order), and that each of these sums is less than or equal to 1 in absolute value. Thus each sum $u_{\sigma_{1}}+\cdots+u_{\sigma_{k}}$ is composed of a vector of length at most 2 and an orthogonal vector of length at most 1 , and so is itself of length at most $\sqrt{5}$.


9. (FRG 1) ${ }^{\text {IMO6 }}$ Let $a$ and $b$ be two positive integers such that $a b+1$ divides $a^{2}+b^{2}$. Show that $\frac{a^{2}+b^{2}}{a b+1}$ is a perfect square.

Solution: 9. Let us assume $\frac{a^{2}+b^{2}}{a b+1}=k \in \mathbb{N}$. We then have $a^{2}-k a b+b^{2}=k$. Let us assume that $k$ is not an integer square, which implies $k \geq 2$. Now we observe the minimal pair $(a, b)$ such that $a^{2}-k a b+b^{2}=k$ holds. We may assume w.l.o.g. that $a \geq b$. For $a=b$ we get $k=(2-k) a^{2} \leq 0$; hence we must have $a>b$. Let us observe the quadratic equation $x^{2}-k b x+b^{2}-k=0$, which has solutions $a$ and $a_{1}$. Since $a+a_{1}=k b$, it follows that $a_{1} \in \mathbb{Z}$. Since $a>k b$ implies $k>a+b^{2}>k b$ and $a=k b$ implies $k=b^{2}$, it follows that $a<k b$ and thus $b^{2}>k$. Since $a a_{1}=b^{2}-k>0$ and $a>0$, it follows that $a_{1} \in \mathbb{N}$ and $a_{1}=\frac{b^{2}-k}{a}<\frac{a^{2}-1}{a}<a$. We have thus found an integer pair $\left(a_{1}, b\right)$ with $0<a_{1}<a$ that satisfies the original equation. This is a contradiction of the initial assumption that $(a, b)$ is minimal. Hence $k$ must be an integer square.


1. (AUS 2) ${ }^{\mathrm{IMO} 2}$ Let $A B C$ be a triangle. The bisector of angle $A$ meets the circumcircle of triangle $A B C$ in $A_{1}$. Points $B_{1}$ and $C_{1}$ are defined similarly. Let $A A_{1}$ meet the lines that bisect the two external angles at $B$ and $C$ in point $A^{0}$. Define $B^{0}$ and $C^{0}$ similarly. If $S_{X_{1} X_{2} \ldots X_{n}}$ denotes the area of the polygon $X_{1} X_{2} \ldots X_{n}$, prove that  $$ S_{A^{0} B^{0} C^{0}}=2 S_{A C_{1} B A_{1} C B_{1}} \geq 4 S_{A B C} . $$

Solution: 1. Let $I$ denote the intersection of the three internal bisectors. Then $I A_{1}=A_{1} A^{0}$. One way proving this is to realize that the circumcircle of $A B C$ is the nine-point circle of $A^{0} B^{0} C^{0}$, hence it bisects $I A^{0}$, since $I$ is the orthocenter of $A^{0} B^{0} C^{0}$. Another way is through noting that $I A_{1}=A_{1} B$, which follows from $\angle A_{1} I B=\angle I B A_{1}=(\angle A+\angle B) / 2$, and $A_{1} B=A_{1} A^{0}$ which follows from $\angle A_{1} A^{0} B=\angle A_{1} B A^{0}=90^{\circ}-$ ![](https://cdn.mathpix.com/cropped/2024_11_18_8e985d6b9c83aa3e9d0eg-525.jpg?height=443&width=566&top_left_y=350&top_left_x=792) $\angle I B A_{1}$. Hence, we obtain $S_{I A_{1} B}=S_{A^{0} A_{1} B}$. Repeating this argument for the six triangles that have a vertex at $I$ and adding them up gives us $S_{A^{0} B^{0} C^{0}}=2 S_{A C_{1} B A_{1} C B_{1}}$. To prove $S_{A C_{1} B A_{1} C B_{1}} \geq 2 S_{A B C}$, draw the three altitudes in triangle $A B C$ intersecting in $H$. Let $X, Y$, and $Z$ be the symmetric points of $H$ with respect the sides $B C, C A$, and $A B$, respectively. Then $X, Y, Z$ are points on the circumcircle of $\triangle A B C$ (because $\left.\angle B X C=\angle B H C=180^{\circ}-\angle A\right)$. Since $A_{1}$ is the midpoint of the arc $B C$, we have $S_{B A_{1} C} \geq S_{B X C}$. Hence  $$ S_{A C_{1} B A_{1} C B_{1}} \geq S_{A Z B X C Y}=2\left(S_{B H C}+S_{C H A}+S_{A H B}\right)=2 S_{A B C} $$


10. (GRE 3) Let $g: \mathbb{C} \rightarrow \mathbb{C}, w \in \mathbb{C}, a \in \mathbb{C}, w^{3}=1(w \neq 1)$. Show that there is one and only one function $f: \mathbb{C} \rightarrow \mathbb{C}$ such that  $$ f(z)+f(w z+a)=g(z), \quad z \in \mathbb{C} $$  Find the function $f$.

Solution: 10. Plugging in $w z+a$ instead of $z$ into the functional equation, we obtain  $$ f(w z+a)+f\left(w^{2} z+w a+a\right)=g(w z+a) . $$  By repeating this process, this time in (1), we get  $$ f\left(w^{2} z+w a+a\right)+f(z)=g\left(w^{2} z+w a+a\right) $$  Solving the system of linear equations (1), (2) and the original functional equation, we easily get  $$ f(z)=\frac{g(z)+g\left(w^{2} z+w a+a\right)-g(w z+a)}{2} . $$  This function thus uniquely satisfies the original functional equation.


11. (HUN 1) Define sequence $a_{n}$ by $\sum_{d \mid n} a_{d}=2^{n}$. Show that $n \mid a_{n}$.

Solution: 11. Call a binary sequence $S$ of length $n$ repeating if for some $d \mid n, d>1, S$ can be split into $d$ identical blocks. Let $x_{n}$ be the number of nonrepeating binary sequences of length $n$. The total number of binary sequences of length $n$ is obviously $2^{n}$. Any sequence of length $n$ can be produced by repeating its unique longest nonrepeating initial block according to need. Hence, we obtain the recursion relation $\sum_{d \mid n} x_{d}=2^{n}$. This, along with $x_{1}=2$, gives us $a_{n}=x_{n}$ for all $n$. We now have that the sequences counted by $x_{n}$ can be grouped into groups of $n$, the sequences in the same group being cyclic shifts of each other. Hence, $n \mid x_{n}=a_{n}$.


12. (HUN 3) At $n$ distinct points of a circular race course there are $n$ cars ready to start. Each car moves at a constant speed and covers the circle in an hour. On hearing the initial signal, each of them selects a direction and starts moving immediately. If two cars meet, both of them change directions and go on without loss of speed. Show that at a certain moment each car will be at its starting point.

Solution: 12. Assume that each car starts with a unique ranking number. Suppose that while turning back at a meeting point two cars always exchanged their ranking numbers. We can observe that ranking numbers move at a constant speed and direction. One hour later, after several exchanges, each starting point will be occupied by a car of the same ranking number and proceeding in the same direction as the one that started from there one hour ago. We now give the cars back their original ranking numbers. Since the sequence of the cars along the track cannot be changed, the only possibility is that the original situation has been rotated, maybe onto itself. Hence for some $d \mid n$, after $d$ hours each car will be at its starting position and orientation.


13. (ICE 3) ${ }^{\mathrm{IMO}}$ The quadrilateral $A B C D$ has the following properties: (i) $A B=A D+B C$; (ii) there is a point $P$ inside it at a distance $x$ from the side $C D$ such that $A P=x+A D$ and $B P=x+B C$. Show that  $$ \frac{1}{\sqrt{x}} \geq \frac{1}{\sqrt{A D}}+\frac{1}{\sqrt{B C}} $$

Solution: 13. Let us construct the circles $\sigma_{1}$ with center $A$ and radius $R_{1}=A D, \sigma_{2}$ with center $B$ and radius $R_{2}=B C$, and $\sigma_{3}$ with center $P$ and radius $x$. The points $C$ and $D$ lie on $\sigma_{2}$ and $\sigma_{1}$ respectively, and $C D$ is tangent to $\sigma_{3}$. From this it is plain that the greatest value of $x$ occurs when $C D$ is also tangent to $\sigma_{1}$ and $\sigma_{2}$. We shall show that in this case the required inequality is really an equality, i.e., that $\frac{1}{\sqrt{x}}=\frac{1}{\sqrt{A D}}+\frac{1}{\sqrt{B C}}$. Then the inequality will immediately follow. Denote the point of tangency of $C D$ with $\sigma_{3}$ by $M$. By the Pythagorean theorem we have $C D=\sqrt{\left(R_{1}+R_{2}\right)^{2}-\left(R_{1}-R_{2}\right)^{2}}=2 \sqrt{R_{1} R_{2}}$. On the other hand, $C D=C M+M D=2 \sqrt{R_{2} x}+2 \sqrt{R_{1} x}$. Hence, we obtain $\frac{1}{\sqrt{x}}=\frac{1}{\sqrt{R_{1}}}+\frac{1}{\sqrt{R_{2}}}$.


14. (IND 2) A bicentric quadrilateral is one that is both inscribable in and circumscribable about a circle. Show that for such a quadrilateral, the centers of the two associated circles are collinear with the point of intersection of the diagonals.

Solution: 14. Lemma 1. In a quadrilateral $A B C D$ circumscribed about a circle, with points of tangency $P, Q, R, S$ on $D A, A B, B C, C D$ respectively, the lines $A C, B D, P R, Q S$ concur. Proof. Follows immediately, for example, from Brianchon's theorem. Lemma 2. Let a variable chord $X Y$ of a circle $C(I, r)$ subtend a right angle at a fixed point $Z$ within the circle. Then the locus of the midpoint $P$ of $X Y$ is a circle whose center is at the midpoint $M$ of $I Z$ and whose radius is $\sqrt{r^{2} / 2-I Z^{2} / 4}$. Proof. From $\angle X Z Y=90^{\circ}$ follows $\overrightarrow{Z X} \cdot \overrightarrow{Z Y}=(\overrightarrow{I X}-\overrightarrow{I Z}) \cdot(\overrightarrow{I Y}-\overrightarrow{I Z})=0$. Therefore,  $$ \begin{aligned} \overrightarrow{M P}^{2} & =(\overrightarrow{M I}+\overrightarrow{I P})^{2}=\frac{1}{4}(-\overrightarrow{I Z}+\overrightarrow{I X}+\overrightarrow{I Y})^{2} \\ & =\frac{1}{4}\left(I X^{2}+I Y^{2}-I Z^{2}+2(\overrightarrow{I X}-\overrightarrow{I Z}) \cdot(\overrightarrow{I Y}-\overrightarrow{I Z})\right) \\ & =\frac{1}{2} r^{2}-\frac{1}{4} I Z^{2} \end{aligned} $$  Lemma 3. Using notation as in Lemma 1, if $A B C D$ is cyclic, $P R$ is perpendicular to $Q S$. Proof. Consider the inversion in $C(I, r)$, mapping $A$ to $A^{\prime}$ etc. $(P, Q, R, S$ are fixed). As is easily seen, $A^{\prime}, B^{\prime}, C^{\prime}, D^{\prime}$ will lie at the midpoints of $P Q, Q R, R S, S P$, respectively. $A^{\prime} B^{\prime} C^{\prime} D^{\prime}$ is a parallelogram, but also cyclic, since inversion preserves circles; thus it must be a rectangle, and so $P R \perp Q S$. Now we return to the main result. Let $I$ and $O$ be the incenter and circumcenter, $Z$ the intersection of the diagonals, and $P, Q, R, S, A^{\prime}, B^{\prime}, C^{\prime}, D^{\prime}$ points as defined in Lemmas 1 and 3. From Lemma 3, the chords $P Q, Q R, R S, S P$ subtend $90^{\circ}$ at $Z$. Therefore by Lemma 2 the points $A^{\prime}, B^{\prime}, C^{\prime}, D^{\prime}$ lie on a circle whose center is the midpoint $Y$ of $I Z$. Since this circle is the image of the circle $A B C D$ under the considered inversion (centered at $I$ ), it follows that $I, O, Y$ are collinear, and hence so are $I, O, Z$. Remark. This is the famous Newton's theorem for bicentric quadrilaterals.


15. (IRE 1) Let $a, b, c, d, m, n$ be positive integers such that $a^{2}+b^{2}+c^{2}+d^{2}=$ 1989, $a+b+c+d=m^{2}$, and the largest of $a, b, c, d$ is $n^{2}$. Determine, with proof, the values of $m$ and $n$.

Solution: 15. By Cauchy's inequality, $44<\sqrt{1989}<a+b+c+d \leq \sqrt{2 \cdot 1989}<90$. Since $m^{2}=a+b+c+d$ is of the same parity as $a^{2}+b^{2}+c^{2}+d^{2}=1989$, $m^{2}$ is either 49 or 81 . Let $d=\max \{a, b, c, d\}$. Suppose that $m^{2}=49$. Then $(49-d)^{2}=(a+b+c)^{2}>a^{2}+b^{2}+c^{2}=$ $1989-d^{2}$, and so $d^{2}-49 d+206>0$. This inequality does not hold for $5 \leq d \leq 44$. Since $d \geq \sqrt{1989 / 4}>22$, $d$ must be at least 45 , which is impossible because $45^{2}>1989$. Thus we must have $m^{2}=81$ and $m=9$. Now, $4 d>81$ implies $d \geq 21$. On the other hand, $d<\sqrt{1989}$, and hence $d=25$ or $d=36$. Suppose that $d=25$ and put $a=25-p, b=25-q$, $c=25-r$ with $p, q, r \geq 0$. From $a+b+c=56$ it follows that $p+q+r=19$, which, together with $(25-p)^{2}+(25-q)^{2}+(25-r)^{2}=1364$, gives us $p^{2}+q^{2}+r^{2}=439>361=(p+q+r)^{2}$, a contradiction. Therefore $d=36$ and $n=6$. Remark. A little more calculation yields the unique solution $a=12$, $b=15, c=18, d=36$.


16. (ISR 1) The set $\left\{a_{0}, a_{1}, \ldots, a_{n}\right\}$ of real numbers satisfies the following conditions: (i) $a_{0}=a_{n}=0$; (ii) for $1 \leq k \leq n-1$,  $$ a_{k}=c+\sum_{i=k}^{n-1} a_{i-k}\left(a_{i}+a_{i+1}\right) . $$  Prove that $c \leq \frac{1}{4 n}$.

Solution: 16. Define $S_{k}=\sum_{i=0}^{k} a_{i}(k=0,1, \ldots, n)$ and $S_{-1}=0$. We note that $S_{n-1}=$ $S_{n}$. Hence  $$ \begin{aligned} S_{n} & =\sum_{k=0}^{n-1} a_{k}=n c+\sum_{k=0}^{n-1} \sum_{i=k}^{n-1} a_{i-k}\left(a_{i}+a_{i+1}\right) \\ & =n c+\sum_{i=0}^{n-1} \sum_{k=0}^{i} a_{i-k}\left(a_{i}+a_{i+1}\right)=n c+\sum_{i=0}^{n-1}\left(a_{i}+a_{i+1}\right) \sum_{k=0}^{i} a_{i-k} \\ & =n c+\sum_{i=0}^{n-1}\left(S_{i+1}-S_{i-1}\right) S_{i}=n c+S_{n}^{2} \end{aligned} $$  i.e., $S_{n}^{2}-S_{n}+n c=0$. Since $S_{n}$ is real, the discriminant of the quadratic equation must be positive, and hence $c \leq \frac{1}{4 n}$.


17. (MON 1) Given seven points in the plane, some of them are connected by segments so that: (i) among any three of the given points, two are connected by a segment; (i) the number of segments is minimal.  How many segments does a figure satisfying (i) and (ii) contain? Give an example of such a figure.

Solution: 17. A figure consisting of 9 lines is shown below. ![](https://cdn.mathpix.com/cropped/2024_11_18_8e985d6b9c83aa3e9d0eg-531.jpg?height=237&width=318&top_left_y=1210&top_left_x=627)  Now we show that 8 lines are not sufficient. Assume the opposite. By the pigeonhole principle, there is a vertex, say $A$, that is joined to at most 2 other vertices. Let $B, C, D, E$ denote the vertices to which $A$ is not joined, and $F, G$ the other two vertices. Then any two vertices of $B, C, D, E$ must be mutually joined for an edge to exist within the triangle these two points form with A. This accounts for 6 segments. Since only two segments remain, among $A, F$, and $G$ at least two are not joined. Taking these two and one of $B, C, D, E$ that is not joined to any of them (it obviously exists), we get a triple of points, no two of which are joined; a contradiction.  Second solution. Since (a) is equivalent to the fact that no three points make a "blank triangle," by Turan's theorem the number of "blank edges" cannot exceed $\left[7^{2} / 4\right]=12$, leaving at least $7 \cdot 6 / 2-12=9$ segments. For general $n$, the answer is $[(n-1) / 2]^{2}$.


18. (MON 4) Given a convex polygon $A_{1} A_{2} \ldots A_{n}$ with area $S$, and a point $M$ in the same plane, determine the area of polygon $M_{1} M_{2} \ldots M_{n}$, where $M_{i}$ is the image of $M$ under rotation $\mathcal{R}_{A_{i}}^{\alpha}$ around $A_{i}$ by $\alpha, i=1,2, \ldots, n$.

Solution: 18. Consider the triangle $M A_{i} M_{i}$. Obviously, the point $M_{i}$ is the image of $A_{i}$ under the composition $C$ of rotation $R_{M}^{\alpha / 2-90^{\circ}}$ and homothety $H_{M}^{2 \sin (\alpha / 2)}$. Therefore, the polygon $M_{1} M_{2} \ldots M_{n}$ is obtained as the image of $A_{1} A_{2} \ldots A_{n}$ under the rotational homothety $C$ with coefficient $2 \sin (\alpha / 2)$. Therefore $S_{M_{1} M_{2} \ldots M_{n}}=4 \sin ^{2}(\alpha / 2) \cdot S$.


19. (MON 6) A positive integer is written in each square of an $m \times n$ board. The allowed move is to add an integer $k$ to each of two adjacent numbers in such a way that no negative numbers are obtained. (Two squares are adjacent if they have a common side.) Find a necessary and sufficient condition for it to be possible for all the numbers to be zero by a finite sequence of moves.

Solution: 19. Let us color the board in a chessboard fashion. Denote by $S_{b}$ and $S_{w}$ respectively the sum of numbers in the black and in the white squares. It is clear that every allowed move leaves the difference $S_{b}-S_{w}$ unchanged. Therefore a necessary condition for annulling all the numbers is $S_{b}=S_{w}$. We now show it is sufficient. Assuming $S_{b}=S_{w}$ let us observe a triple of (different) cells $a, b, c$ with respective values $x_{a}, x_{b}, x_{c}$ where $a$ and $c$ are both adjacent to $b$. We first prove that we can reduce $x_{a}$ to be 0 if $x_{a}>0$. If $x_{a} \leq x_{b}$, we subtract $x_{a}$ from both $a$ and $b$. If $x_{a}>x_{b}$, we add $x_{a}-x_{b}$ to $b$ and $c$ and proceed as in the previous case. Applying the reduction in sequence, along the entire board, we reduce all cells except two neighboring cells to be 0 . Since $S_{b}=S_{w}$ is invariant, the two cells must have equal values and we can thus reduce them both to 0 .


2. (AUS 3) Ali Barber, the carpet merchant, has a rectangular piece of carpet whose dimensions are unknown. Unfortunately, his tape measure is broken and he has no other measuring instruments. However, he finds that if he lays it flat on the floor of either of his storerooms, then each corner of the carpet touches a different wall of that room. If the two rooms have dimensions of 38 feet by 55 feet and 50 feet by 55 feet, what are the carpet dimensions?

Solution: 2. Let the carpet have width $x$, length $y$. Suppose that the carpet $E F G H$ lies in a room $A B C D, E$ being on $A B, F$ on $B C, G$ on $C D$, and $H$ on $D A$. Then $\triangle A E H \equiv \triangle C G F \sim \triangle B F E \equiv \triangle D H G$. Let $\frac{y}{x}=k, A E=a$ and $A H=b$. In that case $B E=k b$ and $D H=k a$. Thus $a+k b=50, k a+b=55$, whence $a=\frac{55 k-50}{k^{2}-1}$ and $b=\frac{50 k-55}{k^{2}-1}$. Hence $x^{2}=a^{2}+b^{2}=\frac{5525 k^{2}-11000 k+5525}{\left(k^{2}-1\right)^{2}}$, i.e.,  $$ x^{2}\left(k^{2}-1\right)^{2}=5525 k^{2}-11000 k+5525 $$  Similarly, from the equations for the second storeroom, we get  $$ x^{2}\left(k^{2}-1\right)^{2}=4469 k^{2}-8360 k+4469 . $$  Combining the two equations, we get $5525 k^{2}-11000 k+5525=4469 k^{2}-$ $8360 k+4469$, which implies $k=2$ or $1 / 2$. Without loss of generality we have $y=2 x$ and $a+2 b=50,2 a+b=55$; hence $a=20, b=15$, $x=\sqrt{15^{2}+20^{2}}=25$, and $y=50$. We have thus shown that the carpet is 25 feet by 50 feet.


20. (NET 1) ${ }^{\text {IMO3 }}$ Given a set $S$ in the plane containing $n$ points and satisfying the conditions: (i) no three points of $S$ are collinear, (ii) for every point $P$ of $S$ there exist at least $k$ points in $S$ that have the same distance to $P$, prove that the following inequality holds:  $$ k<\frac{1}{2}+\sqrt{2 n} $$

Solution: 20. Suppose $k \geq 1 / 2+\sqrt{2 n}$. Consider a point $P$ in $S$. There are at least $k$ points in $S$ having all the same distance to $P$, so there are at least $\binom{k}{2}$ pairs of points $A, B$ with $A P=B P$. Since this is true for every point $P \in S$, there are at least $n\binom{k}{2}$ triples of points $(A, B, P)$ for which $A P=B P$ holds. However,  $$ \begin{aligned} n\binom{k}{2} & =n \frac{k(k-1)}{2} \geq \frac{n}{2}\left(\sqrt{2 n}+\frac{1}{2}\right)\left(\sqrt{2 n}-\frac{1}{2}\right) \\ & =\frac{n}{2}\left(2 n-\frac{1}{4}\right)>n(n-1)=2\binom{n}{2} \end{aligned} $$  Since $\binom{n}{2}$ is the number of all possible pairs $(A, B)$ with $A, B \in S$, there must exist a pair of points $A, B$ with more than two points $P_{i}$ such that $A P_{i}=B P_{i}$. These points $P_{i}$ are collinear (they lie on the perpendicular bisector of $A B$ ), contradicting condition (1).


21. (NET 2) Prove that the intersection of a plane and a regular tetrahedron can be an obtuse-angled triangle and that the obtuse angle in any such triangle is always smaller than $120^{\circ}$.

Solution: 21. In order to obtain a triangle as the intersection we must have three points $P, Q, R$ on three sides of the tetrahedron passing through one vertex, say $T$. It is clear that we may suppose w.l.o.g. that $P$ is a vertex, and $Q$ and $R$ lie on the edges $T P_{1}$ and $T P_{2}\left(P_{1}, P_{2}\right.$ are vertices) or on their extensions respectively. Suppose that $\overrightarrow{T Q}=\lambda \overrightarrow{T P_{1}}$ and $\overrightarrow{T R}=\mu \overrightarrow{T P_{2}}$, where $\lambda, \mu>0$. Then  $$ \cos \angle Q P R=\frac{\overrightarrow{P Q} \cdot \overrightarrow{P R}}{\overline{P Q} \cdot \overline{P R}}=\frac{(\lambda-1)(\mu-1)+1}{2 \sqrt{\lambda^{2}-\lambda+1} \sqrt{\mu^{2}-\mu+1}} $$  In order to obtain an obtuse angle (with $\cos <0$ ) we must choose $\mu<1$ and $\lambda>\frac{2-\mu}{1-\mu}>1$. Since $\sqrt{\lambda^{2}-\lambda+1}>\lambda-1$ and $\sqrt{\mu^{2}-\mu+1}>1-\mu$, we get that for $(\lambda-1)(\mu-1)+1<0$,  $$ \cos \angle Q P R>\frac{1-(1-\mu)(\lambda-1)}{2(1-\mu)(\lambda-1)}>-\frac{1}{2} ; \quad \text { hence } \angle Q P R<120^{\circ} $$  Remark. After obtaining the formula for $\cos \angle Q P R$, the official solution was as follows: For fixed $\mu_{0}<1$ and $\lambda>1, \cos \angle Q P R$ is a decreasing function of $\lambda$ : indeed,  $$ \frac{\partial \cos \angle Q P R}{\partial \lambda}=\frac{\mu-(3-\mu) \lambda}{4\left(\lambda^{2}-\lambda+1\right)^{3 / 2}\left(\mu^{2}-\mu+1\right)^{1 / 2}}<0 $$  Similarly, for a fixed, sufficiently large $\lambda_{0}, \cos \angle Q P R$ is decreasing for $\mu$ decreasing to 0 . Since $\lim _{\lambda \rightarrow 0, \mu \rightarrow 0+} \cos \angle Q P R=-1 / 2$, we conclude that $\angle Q P R<120^{\circ}$.


22. (PHI 1) ${ }^{\text {IMO1 }}$ Prove that the set $\{1,2, \ldots, 1989\}$ can be expressed as the disjoint union of 17 subsets $A_{1}, A_{2}, \ldots, A_{17}$ such that: (i) each $A_{i}$ contains the same number of elements; (ii) the sum of all elements of each $A_{i}$ is the same for $i=1,2, \ldots, 17$.

Solution: 22. The statement remains valid if 17 is replaced by any divisor $k$ of $1989=3^{2}$. $13 \cdot 17,1<k<1989$, so let $k$ be one such divisor. The set $\{1,2, \ldots, 1989\}$ can be partitioned as $\{1,2, \ldots, 3 k\} \cup \bigcup_{j=1}^{L}\{(2 j+1) k+1,(2 j+1) k+$ $2, \ldots,(2 j+1) k+2 k\}=X \cup Y_{1} \cup \cdots \cup Y_{L}$, where $L=(1989-3 k) / 2 k$. The required statement will be an obvious consequence of the following two claims. Claim 1. The set $X=\{1,2, \ldots, 3 k\}$ can be partitioned into $k$ disjoint subsets, each having 3 elements and the same sum. Proof. Since $k$ is odd, let $t=k-1 / 2$ and $X=\{1,2, \ldots, 6 t+3\}$. For $l=1,2, \ldots, t$, define  $$ \begin{aligned} X_{2 l-1} & =\{l, 3 t+1+l, 6 t+5-2 l\} \\ X_{2 l} & =\{t+1+l, 2 t+1+l, 6 t+4-2 l\} \\ X_{2 t+1} & =X_{k}=\{t+1,4 t+2,4 t+3\} \end{aligned} $$  It is easily seen that these three subsets are disjoint and that the sum of elements in each set is $9 t+6$. Claim 2. Each $Y_{j}=\{(2 j+1) k+1, \ldots,(2 j+1) k+2 k\}$ can be partitioned into $k$ disjoint subsets, each having 2 elements and the same sum. Proof. The obvious partitioning works:  $$ Y_{j}=\{(2 j+1) k+1,(2 j+1) k+2 k\} \cup \cdots \cup\{(2 j+1) k+k,(2 j+1) k+(k+1)\} . $$


23. (POL 2) ${ }^{\mathrm{IMO} 6} \mathrm{We}$ consider permutations $\left(x_{1}, \ldots, x_{2 n}\right)$ of the set $\{1, \ldots$, $2 n\}$ such that $\left|x_{i}-x_{i+1}\right|=n$ for at least one $i \in\{1, \ldots, 2 n-1\}$. For every natural number $n$, find out whether permutations with this property are more or less numerous than the remaining permutations of $\{1, \ldots, 2 n\}$.

Solution: 23. Two numbers $x, y \in\{1, \ldots, 2 n\}$ will be called twins if $|x-y|=n$. Then the set $\{1, \ldots, 2 n\}$ splits into $n$ pairs of twins. A permutation $\left(x_{1}, \ldots, x_{2 n}\right)$ of this set is said to be of type $T_{k}$ if $\left|x_{i}-x_{i+1}\right|=n$ holds for exactly $k$ indices $i$ (thus a permutation of type $T_{0}$ contains no pairs of neighboring twins). Denote by $F_{k}(n)$ the number of $T_{k}$-type permutations of $\{1, \ldots, 2 n\}$. Let $\left(x_{1}, \ldots, x_{2 n}\right)$ be a permutation of type $T_{0}$. Removing $x_{2 n}$ and its twin, we obtain a permutation of $2 n-2$ elements consisting of $n-1$ pairs of twins. This new permutation is of one of the following types: (i) type $T_{0}: x_{2 n}$ can take $2 n$ values, and its twin can take any of $2 n-2$ positions; (ii) type $T_{1}: x_{2 n}$ can take any one of $2 n$ values, but its twin must be placed to separate the unique pair of neighboring twins in the new permutation. The recurrence formula follows:  $$ F_{0}(n)=2 n\left[(2 n-2) F_{0}(n-1)+F_{1}(n-1)\right] $$  Now let $\left(x_{1}, \ldots, x_{2 n}\right)$ be a permutation of type $T_{1}$, and let $\left(x_{j}, x_{j+1}\right)$ be the unique neighboring twin pair. Similarly, on removing this pair we get a permutation of $2 n-2$ elements, either of type $T_{0}$ or of type $T_{1}$. The pair $\left(x_{j}, x_{j+1}\right)$ is chosen out of $n$ twin pairs and can be arranged in two ways. Also, in the first case it can be placed anywhere ( $2 n-1$ possible positions), but in the second case it must be placed to separate the unique pair of neighboring twins. Hence,  $$ F_{1}(n)=2 n\left[(2 n-1) F_{0}(n-1)+F_{1}(n-1)\right]=F_{0}(n)+2 n F_{0}(n-1) $$  This implies that $F_{0}(n)<F_{1}(n)$. Therefore the permutations with at least one neighboring twin pair are more numerous than those with no such pairs. Remark 1. As in the official solution, formulas (1) and (2) together give for $F_{0}$ the recurrence  $$ F_{0}(n)=2 n\left[(2 n-1) F_{0}(n-1)+(2 n-2) F_{0}(n-2)\right] $$  For the ratio $p_{n}=F_{0}(n) /(2 n)$ !, simple algebraic manipulation yields $p_{n}=$ $p_{n-1}+\frac{p_{n-2}}{(2 n-3)(2 n-1)}$. Since $p_{1}=0$, we get $p_{n}<p_{n-1}+\frac{1}{(2 n-3)(2 n-1)}=p_{n-1}+\frac{1}{2(2 n-3)}-\frac{1}{2(2 n-1)}<\cdots<\frac{1}{2}$. Remark 2. Using the inclusion-exclusion principle, the following formula can be obtained:  $$ \begin{aligned} F_{0}(n)= & 2^{0}\binom{n}{0}(2 n)!-2^{1}\binom{n}{1}(2 n-1)!+2^{2}\binom{n}{2}(2 n-2)!-\cdots \\ & \cdots+(-1)^{n-1} 2^{n}\binom{n}{n} n! \end{aligned} $$  One consequence is that in fact, $\lim _{n \rightarrow \infty} p_{n}=1 / e$. Second solution. Let $f: T_{0} \rightarrow T_{1}$ be the mapping defined as follows: if $\left(x_{1}, x_{2}, \ldots, x_{2 n}\right) \in T_{0}$ and $x_{k}, k>2$, is the twin of $x_{1}$, then  $$ f\left(x_{1}, x_{2}, \ldots, x_{2 n}\right)=\left(x_{2}, \ldots, x_{k-1}, x_{1}, x_{k}, \ldots, x_{2 n}\right) $$  The mapping $f$ is injective, but not surjective. Thus $F_{0}(n)<F_{1}(n)$.


24. (POL 5) For points $A_{1}, \ldots, A_{5}$ on the sphere of radius 1 , what is the maximum value that $\min _{1 \leq i, j \leq 5} A_{i} A_{j}$ can take? Determine all configurations for which this maximum is attained. (Or: determine the diameter of any set $\left\{A_{1}, \ldots, A_{5}\right\}$ for which this maximum is attained.)

Solution: 24. Instead of Euclidean distance, we will use the angles $\angle A_{i} O A_{j}, O$ denoting the center of the sphere. Let $\left\{A_{1}, \ldots, A_{5}\right\}$ be any set for which $\min _{i \neq j} \angle A_{i} O A_{j} \geq \pi / 2$ (such a set exists: take for example five vertices of an octagon). We claim that two of the $A_{i}$ 's must be antipodes, thus implying that $\min _{i \neq j} \angle A_{i} O A_{j}$ is exactly equal to $\pi / 2$, and consequently that $\min _{i \neq j} A_{i} A_{j}=\sqrt{2}$. Suppose no two of the five points are antipodes. Visualize $A_{5}$ as the south pole. Then $A_{1}, \ldots, A_{4}$ lie in the northern hemisphere, including the equator (but excluding the north pole). No two of $A_{1}, \ldots, A_{4}$ can lie in the interior of a quarter of this hemisphere, which means that any two of them differ in longitude by at least $\pi / 2$. Hence, they are situated on four meridians that partition the sphere into quarters. Finally, if one of them does not lie on the equator, its two neighbors must. Hence, in any case there will exist an antipodal pair, giving us a contradiction.


25. (KOR 3) Let $a, b$ be integers that are not perfect squares. Prove that if  $$ x^{2}-a y^{2}-b z^{2}+a b w^{2}=0 $$  has a nontrivial solution in integers, then so does  $$ x^{2}-a y^{2}-b z^{2}=0 $$

Solution: 25. We may assume w.l.o.g. that $a>0$ (because $a, b<0$ is impossible, and $a, b \neq 0$ from the condition of the problem). Let $\left(x_{0}, y_{0}, z_{0}, w_{0}\right) \neq$ $(0,0,0,0)$ be a solution of $x^{2}-a y^{2}-b z^{2}+a b w^{2}$. Then  $$ x_{0}^{2}-a y_{0}^{2}=b\left(z_{0}^{2}-a w_{0}^{2}\right) $$  Multiplying both sides by $\left(z_{0}^{2}-a w_{0}^{2}\right)$, we get  $$ \begin{gathered} \left(x_{0}^{2}-a y_{0}^{2}\right)\left(z_{0}^{2}-a w_{0}^{2}\right)-b\left(z_{0}^{2}-a w_{0}^{2}\right)^{2}=0 \\ \Leftrightarrow\left(x_{0} z_{0}-a y_{0} w_{0}\right)^{2}-a\left(y_{0} z_{0}-x_{0} w_{0}\right)^{2}-b\left(z_{0}^{2}-a w_{0}^{2}\right)^{2}=0 . \end{gathered} $$  Hence, for $x_{1}=x_{0} z_{0}-a y_{0} w_{0}, \quad y_{1}=y_{0} z_{0}-x_{0} w_{0}, \quad z_{1}=z_{0}^{2}-a w_{0}^{2}$, we have  $$ x_{1}^{2}-a y_{1}^{2}-b z_{1}^{2}=0 . $$  If $\left(x_{1}, y_{1}, z_{1}\right)$ is the trivial solution, then $z_{1}=0$ implies $z_{0}=w_{0}=0$ and similarly $x_{0}=y_{0}=0$ because $a$ is not a perfect square. This contradicts the initial assumption.


26. (KOR 4) Let $n$ be a positive integer and let $a, b$ be given real numbers. Determine the range of $x_{0}$ for which  $$ \sum_{i=0}^{n} x_{i}=a \quad \text { and } \quad \sum_{i=0}^{n} x_{i}^{2}=b $$  where $x_{0}, x_{1}, \ldots, x_{n}$ are real variables.

Solution: 26. By the Cauchy-Schwarz inequality,  $$ \left(\sum_{i=1}^{n} x_{i}\right)^{2} \leq n \sum_{i=1}^{n} x_{i}^{2} $$  Since $\sum_{i=1}^{n} x_{i}=a-x_{0}$ and $\sum_{i=1}^{n} x_{i}^{2}=b-x_{0}^{2}$, we have $\left(a-x_{0}\right)^{2} \leq$ $n\left(b-x_{0}^{2}\right)$, i.e.,  $$ (n+1) x_{0}^{2}-2 a x_{0}+\left(a^{2}-n b\right) \leq 0 . $$  The discriminant of this quadratic is $D=4 n(n+1)\left[b-a^{2} /(n+1)\right]$, so we conclude that (i) if $a^{2}>(n+1) b$, then such an $x_{0}$ does not exist; (ii) if $a^{2}=(n+1) b$, then $x_{0}=a / n+1 ; \quad$ and (iii) if $a^{2}<(n+1) b$, then $\frac{a-\sqrt{D} / 2}{n+1} \leq x_{0} \leq \frac{a+\sqrt{D} / 2}{n+1}$.  It is easy to see that these conditions for $x_{0}$ are also sufficient.


27. (ROM 1) Let $m$ be a positive odd integer, $m \geq 2$. Find the smallest positive integer $n$ such that $2^{1989}$ divides $m^{n}-1$.

Solution: 27. Let $n$ be the required exponent, and suppose $n=2^{k} q$, where $q$ is an odd integer. Then we have  $$ m^{n}-1=\left(m^{2^{k}}-1\right)\left[\left(m^{2^{k}(q-1)}+\cdots+m^{2^{k}}+1\right]=\left(m^{2^{k}}-1\right) A\right. $$  where $A$ is odd. Therefore $m^{n}-1$ and $m^{2^{k}}-1$ are divisible by the same power of 2 , and so $n=2^{k}$. Next, we observe that  $$ \begin{aligned} m^{2^{k}}-1 & =\left(m^{2^{k-1}}-1\right)\left(m^{2^{k-1}}+1\right)=\ldots \\ & =\left(m^{2}-1\right)\left(m^{2}+1\right)\left(m^{4}+1\right) \cdots\left(m^{2^{k-1}}+1\right) \end{aligned} $$  Let $s$ be the maximal positive integer for which $m \equiv \pm 1\left(\bmod 2^{s}\right)$. Then $m^{2}-1$ is divisible by $2^{s+1}$ and not divisible by $2^{s+2}$. All the numbers $m^{2}+1, m^{4}+1, \ldots, m^{2^{k-1}}+1$ are divisible by 2 and not by 4 . Hence $m^{2^{k}}-1$ is divisible by $2^{s+k}$ and not by $2^{s+k+1}$. It follows from the above consideration that the smallest exponent $n$ equals $2^{1989-s}$ if $s \leq 1989$, and $n=1$ if $s>1989$.


28. (ROM 2) Consider in a plane $\Pi$ the points $O, A_{1}, A_{2}, A_{3}, A_{4}$ such that $\sigma\left(O A_{i} A_{j}\right) \geq 1$ for all $i, j=1,2,3,4, i \neq j$. Prove that there is at least one pair $i_{0}, j_{0} \in\{1,2,3,4\}$ such that $\sigma\left(O A_{i_{0}} A_{j_{0}}\right) \geq \sqrt{2}$. (We have denoted by $\sigma\left(O A_{i} A_{j}\right)$ the area of triangle $O A_{i} A_{j}$.)

Solution: 28. Assume w.l.o.g. that the rays $O A_{1}, O A_{2}, O A_{3}, O A_{4}$ are arranged clockwise. Setting $O A_{1}=a, O A_{2}=b, O A_{3}=c, O A_{4}=d$, and $\angle A_{1} O A_{2}=x$, $\angle A_{2} O A_{3}=y, \angle A_{3} O A_{4}=z$, we have  $$ \begin{aligned} & S_{1}=\sigma\left(O A_{1} A_{2}\right)=\frac{1}{2} a b|\sin x|, S_{2}=\sigma\left(O A_{1} A_{3}\right)=\frac{1}{2} a c|\sin (x+y)|, \\ & S_{3}=\sigma\left(O A_{1} A_{4}\right)=\frac{1}{2} a d|\sin (x+y+z)|, S_{4}=\sigma\left(O A_{2} A_{3}\right)=\frac{1}{2} b c|\sin y|, \\ & S_{5}=\sigma\left(O A_{2} A_{4}\right)=\frac{1}{2} b d|\sin (y+z)|, S_{6}=\sigma\left(O A_{3} A_{4}\right)=\frac{1}{2} c d|\sin z| . \end{aligned} $$  Since $\sin (x+y+z) \sin y+\sin x \sin z=\sin (x+y) \sin (y+z)$, it follows that there exists a choice of $k, l \in\{0,1\}$ such that  $$ S_{1} S_{6}+(-1)^{k} S_{2} S_{5}+(-1)^{l} S_{3} S_{4}=0 $$  For example (w.l.o.g.), if $S_{3} S_{4}=S_{1} S_{6}+S_{2} S_{5}$, we have  $$ \left(\max _{1 \leq i \leq 6} S_{i}\right)^{2} \geq S_{3} S_{4}=S_{1} S_{6}+S_{2} S_{5} \geq 1+1=2 $$  i.e., $\max _{1 \leq i \leq 6} S_{i} \geq \sqrt{2}$ as claimed.


29. (ROM 4) A flock of 155 birds sit down on a circle $C$. Two birds $P_{i}, P_{j}$ are mutually visible if $m\left(P_{i} P_{j}\right) \leq 10^{\circ}$. Find the smallest number of mutually visible pairs of birds. (One assumes that a position (point) on $C$ can be occupied simultaneously by several birds.)

Solution: 29. Let $P_{i}$, sitting at the place $A$, and $P_{j}$ sitting at $B$, be two birds that can see each other. Let $k$ and $l$ respectively be the number of birds visible from $B$ but not from $A$, and the number of those visible from $A$ but not from $B$. Assume that $k \geq l$. Then if all birds from $B$ fly to $A$, each of them will see $l$ new birds, but won't see $k$ birds anymore. Hence the total number of mutually visible pairs does not increase, while the number of distinct positions occupied by at least one bird decreases by one. Repeating this operation as many times as possible one can arrive at a situation in which two birds see each other if and only if they are in the same position. The number of such distinct positions is at most 35 , while the total number of mutually visible pairs is not greater than at the beginning. Thus the problem is equivalent to the following one: (1) If $x_{i} \geq 0$ are integers with $\sum_{j=1}^{35} x_{j}=155$, find the least possible value of $\sum_{j=1}^{35}\left(x_{j}^{2}-x_{j}\right) / 2$. If $x_{j} \geq x_{i}+2$ for some $i, j$, then the sum of $\left(x_{j}^{2}-x_{j}\right) / 2$ decreases (for $x_{j}-x_{i}-2$ ) if $x_{i}, x_{j}$ are replaced with $x_{i}+1, x_{j}-1$. Consequently, our sum attains its minimum when the $x_{i}$ 's differ from each other by at most 1 . In this case, all the $x_{i}$ 's are equal to either $[155 / 35]=4$ or $[155 / 35]+1=5$, where $155=20 \cdot 4+15 \cdot 5$. It follows that the (minimum possible) number of mutually visible pairs is $20 \cdot \frac{4 \cdot 3}{2}+15 \cdot \frac{5 \cdot 4}{2}=270$. Second solution for (1). Considering the graph consisting of birds as vertices and pairs of mutually nonvisible birds as edges, we see that there is no complete 36 -subgraph. Turan's theorem gives the answer immediately. (See problem (SL89-17).)


3. (AUS 4) Ali Barber, the carpet merchant, has a rectangular piece of carpet whose dimensions are unknown. Unfortunately, his tape measure is broken and he has no other measuring instruments. However, he finds that if he lays it flat on the floor of either of his storerooms, then each corner of the carpet touches a different wall of that room. He knows that the sides of the carpet are integral numbers of feet and that his two storerooms have the same (unknown) length, but widths of 38 feet and 50 feet respectively. What are the carpet dimensions?

Solution: 3. Let the carpet have width $x$, length $y$. Let the length of the storerooms be $q$. Let $y / x=k$. Then, as in the previous problem, $(k q-50)^{2}+(50 k-q)^{2}=$ $(k q-38)^{2}+(38 k-q)^{2}$, i.e.,  $$ k q=22\left(k^{2}+1\right) $$  Also, as before, $x^{2}=\left(\frac{k q-50}{k^{2}-1}\right)^{2}+\left(\frac{50 k-q}{k^{2}-1}\right)^{2}$, i.e.,  $$ x^{2}\left(q^{2}-1\right)^{2}=\left(k^{2}+1\right)\left(q^{2}-1900\right) $$  which, together with (1), yields  $$ x^{2} k^{2}\left(k^{2}-1\right)^{2}=\left(k^{2}+1\right)\left(484 k^{4}-932 k^{2}+484\right) $$  Since $k$ is rational, let $k=c / d$, where $c$ and $d$ are integers with $\operatorname{gcd}(c, d)=$ 1. Then we obtain  $$ x^{2} c^{2}\left(c^{2}-d^{2}\right)^{2}=c^{2}\left(484 c^{4}-448 c^{2} d^{2}-448 d^{4}\right)+484 d^{6} $$  We thus have $c^{2} \mid 484 d^{6}$, but since $(c, d)=1$, we have $c^{2}|484 \Rightarrow c| 22$. Analogously, $d \mid 22$; thus $k=1,2,11,22, \frac{1}{2}, \frac{1}{11}, \frac{1}{22}, \frac{2}{11}, \frac{11}{2}$. Since reciprocals lead to the same solution, we need only consider $k \in\left\{1,2,11,22, \frac{11}{2}\right\}$, yielding $q=44,55,244,485,125$, respectively. We can test these values by substituting them into (2). Only $k=2$ gives us an integer solution, namely $x=25, y=50$.


30. (SWE 2) ${ }^{\mathrm{IMO} 5}$ For which positive integers $n$ does there exist a positive integer $N$ such that none of the integers $1+N, 2+N, \ldots, n+N$ is the power of a prime number?

Solution: 30. For all $n$ such $N$ exists. For a given $n$ choose $N=(n+1)!^{2}+1$. Then $1+j$ is a proper factor of $N+j$ for $1 \leq j \leq n$. So if $N+j=p^{m}$ is a power of a prime $p$, then $1+j=p^{r}$ for some integer $r, 1 \leq r<m$. But then $p^{r+1}$ divides both $(n+1)!^{2}=N-1$ and $p^{m}=N+j$, implying that $p^{r+1} \mid 1+j$, which is impossible. Thus none of $N+1, N+2, \ldots, N+n$ is a power of a prime. Second solution. Let $p_{1}, p_{2}, \ldots, p_{2 n}$ be distinct primes. By the Chinese remainder theorem, there exists a natural number $N$ such that $p_{1} p_{2}$ $N+1, p_{3} p_{4}\left|N+2, \ldots, p_{2 n-1} p_{2 n}\right| N+n$, and then obviously none of the numbers $N+1, \ldots, N+n$ can be a power of a prime.


31. (SWE 3) Let $a_{1} \geq a_{2} \geq a_{3}$ be given positive integers and let $N\left(a_{1}, a_{2}, a_{3}\right)$ be the number of solutions $\left(x_{1}, x_{2}, x_{3}\right)$ of the equation  $$ \frac{a_{1}}{x_{1}}+\frac{a_{2}}{x_{2}}+\frac{a_{3}}{x_{3}}=1 $$  where $x_{1}, x_{2}$, and $x_{3}$ are positive integers. Show that  $$ N\left(a_{1}, a_{2}, a_{3}\right) \leq 6 a_{1} a_{2}\left(3+\ln \left(2 a_{1}\right)\right) $$

Solution: 31. Let us denote by $N_{p q r}$ the number of solutions for which $a_{p} / x_{p} \geq a_{q} / x_{q} \geq$ $a_{r} / x_{r}$, where $(p, q, r)$ is one of six permutations of $(1,2,3)$. It is clearly enough to prove that $N_{p q r}+N_{q p r} \leq 2 a_{1} a_{2}\left(3+\ln \left(2 a_{1}\right)\right)$. First, from  $$ \frac{3 a_{p}}{x_{p}} \geq \frac{a_{p}}{x_{p}}+\frac{a_{q}}{x_{q}}+\frac{a_{r}}{x_{r}}=1 \quad \text { and } \quad \frac{a_{p}}{x_{p}}<1 $$  we get $a_{p}+1 \leq x_{p} \leq 3 a_{p}$. Similarly, for fixed $x_{p}$ we have  $$ \frac{2 a_{q}}{x_{q}} \geq \frac{a_{q}}{x_{q}}+\frac{a_{r}}{x_{r}}=1-\frac{a_{p}}{x_{p}} \quad \text { and } \quad \frac{a_{q}}{x_{q}} \leq \min \left(\frac{a_{p}}{x_{p}}, 1-\frac{a_{p}}{x_{p}}\right), $$  which gives $\max \left\{a_{q} \cdot x_{p} / a_{p}, a_{q} \cdot x_{p} /\left(x_{p}-a_{p}\right)\right\} \leq x_{q} \leq 2 a_{q} \cdot x_{p} /\left(x_{p}-a_{p}\right)$, i.e., if $a_{p}+1 \leq x_{p} \leq 2 a_{p}$ there are at most $a_{q} \cdot x_{p} /\left(x_{p}-a_{p}\right)+1 / 2$ possible values for $x_{q}$ (because there are $[2 x]-[x]=[x+1 / 2]$ integers between $x$ and $2 x)$, and if $2 a_{p}+1 \leq x_{p} \leq 3 a_{p}$, at most $2 a_{q} \cdot x_{p} /\left(x_{p}-a_{p}\right)-a_{q} \cdot x_{p} / a_{p}+$ 1 possible values. Given $x_{p}$ and $x_{q}, x_{r}$ is uniquely determined. Hence  $$ \begin{aligned} N_{p q r} & \leq \sum_{x_{p}=a_{p}+1}^{2 a_{p}}\left(\frac{a_{q} \cdot x_{p}}{x_{p}-a_{p}}+\frac{1}{2}\right)+\sum_{x_{p}=2 a_{p}+1}^{3 a_{p}}\left(\frac{2 a_{q} \cdot x_{p}}{x_{p}-a_{p}}-\frac{a_{q} \cdot x_{p}}{a_{p}}+1\right) \\ & =\frac{3 a_{p}}{2}+a_{q} \sum_{k=1}^{a_{p}}\left[\frac{k+a_{p}}{k}+\left(\frac{2\left(k+2 a_{p}\right)}{k+a_{p}}-\frac{k+2 a_{p}}{a_{p}}\right)\right] \\ & =\frac{3 a_{p}}{2}+a_{q} \sum_{k=1}^{a_{p}}\left[1-\frac{k}{a_{p}}+a_{p}\left(\frac{1}{k}+\frac{2}{k+a_{p}}\right)\right] \\ & =\frac{3 a_{p}}{2}-\frac{a_{q}}{2}+a_{p} a_{q}\left(\frac{1}{2}+\sum_{k=1}^{a_{p}}\left(\frac{1}{k}+\frac{2}{k+a_{p}}\right)\right) \\ & \leq a_{p} a_{q}\left(\frac{3}{2 a_{q}}-\frac{1}{2 a_{p}}+\ln \left(2 a_{p}\right)+\frac{5}{2}-\ln 2\right), \end{aligned} $$  where we have used $\sum_{k=1}^{n}(1 / k+2 /(k+n)) \leq \ln (2 n)+2-\ln 2$ (this can be proved by induction). Hence, $N_{p q r}+N_{q p r} \leq 2 a_{p} a_{q}\left(1+0.5+\ln \left(2 a_{p}\right)+2-\ln 2\right)<2 a_{1} a_{2}\left(2.81+\ln \left(2 a_{1}\right)\right)$. Remark. The official solution was somewhat simpler, but used that the interval $(x, 2 x]$, for real $x$, cannot contain more than $x$ integers, which is false in general. Thus it could give only a weaker estimate $N \leq 6 a_{1} a_{2}\left(9 / 2-\ln 2+\ln \left(2 a_{1}\right)\right)$.


32. (USA 3) The vertex $A$ of the acute triangle $A B C$ is equidistant from the circumcenter $O$ and the orthocenter $H$. Determine all possible values for the measure of angle $A$.

Solution: 32. Let $C C^{\prime}$ be an altitude, and $R$ the circumradius. Then, since $A H=R$, we have $A C^{\prime}=|R \sin B|$ and hence (1) $C C^{\prime}=|R \sin B \tan A|$. On the other hand, $C C^{\prime}=|B C \sin B|=2|R \sin A \sin B|$, which together with (1) yields $2|\sin A|=|\tan A| \Rightarrow|\cos A|=1 / 2$. Hence, $\angle A$ is $60^{\circ}$. (Without the condition that the triangle is acute, $\angle A$ could also be $120^{\circ}$.) Second Solution. For a point $X$, let $\bar{X}$ denote the vector $O X$. Then $|\bar{A}|=|\bar{B}|=|\bar{C}|=R$ and $\bar{H}=\bar{A}+\bar{B}+\bar{C}$, and moreover,  $$ R^{2}=(\bar{H}-\bar{A})^{2}=(\bar{B}+\bar{C})^{2}=2 \bar{B}^{2}+2 \bar{C}^{2}-(\bar{B}-\bar{C})^{2}=4 R^{2}-B C^{2} $$  It follows that $\sin A=\frac{B C}{2 R}=\sqrt{3} / 2$, i.e., that $\angle A=60^{\circ}$. Third Solution. Let $A_{1}$ be the midpoint of $B C$. It is well known that $A H=2 O A_{1}$, and since $A H=A O=B O$, it means that in the rightangled triangle $B O A_{1}$ the relation $B O=2 O A_{1}$ holds. Thus $\angle B O A_{1}=$ $\angle A=60^{\circ}$.


4. (BUL 3) Prove that for every integer $n>1$ the equation  $$ \frac{x^{n}}{n!}+\frac{x^{n-1}}{(n-1)!}+\cdots+\frac{x^{2}}{2!}+\frac{x}{1!}+1=0 $$  has no rational roots.

Solution: 4. First we note that for every integer $k>0$ and prime number $p, p^{k}$ doesn't divide $k!$. This follows from the fact that the highest exponent $r$ of $p$ for which $p^{r} \mid k$ ! is  $$ r=\left[\frac{k}{p}\right]+\left[\frac{k}{p^{2}}\right]+\cdots<\frac{k}{p}+\frac{k}{p^{2}}+\cdots=\frac{k}{p-1}<k . $$  Now suppose that $\alpha$ is a rational root of the given equation. Then  $$ \alpha^{n}+\frac{n!}{(n-1)!} \alpha^{n-1}+\cdots+\frac{n!}{2!} \alpha^{2}+\frac{n!}{1!} \alpha+n!=0 $$  from which we can conclude that $\alpha$ must be an integer, not equal to $\pm 1$. Let $p$ be a prime divisor of $n$ and let $r$ be the highest exponent of $p$ for which $p^{r} \mid n$ !. Then $p \mid \alpha$. Since $p^{k} \mid \alpha^{k}$ and $p^{k} \nmid k$ !, we obtain that $p^{r+1} \mid n!\alpha^{k} / k$ ! for $k=1,2, \ldots, n$. But then it follows from (1) that $p^{r+1} \mid n$ !, a contradiction.


5. (COL 1) Consider the polynomial $p(x)=x^{n}+n x^{n-1}+a_{2} x^{n-2}+\cdots+a_{n}$ having all real roots. If $r_{1}^{16}+r_{2}^{16}+\cdots+r_{n}^{16}=n$, where the $r_{j}$ are the roots of $p(x)$, find all such roots.

Solution: 5. According to the Cauchy-Schwarz inequality,  $$ \left(\sum_{i=1}^{n} a_{i}\right)^{2} \leq\left(\sum_{i=1}^{n} a_{i}^{2}\right)\left(\sum_{i=1}^{n} 1^{2}\right)=n\left(\sum_{i=1}^{n} a_{i}^{2}\right) $$  Since $r_{1}+\cdots+r_{n}=-n$, applying this inequality we obtain $r_{1}^{2}+\ldots+r_{n}^{2} \geq n$, and applying it three more times, we obtain  $$ r_{1}^{16}+\cdots+r_{n}^{16} \geq n $$  with equality if and only if $r_{1}=r_{2}=\ldots=r_{n}=-1$ and $p(x)=(x+1)^{n}$.


6. (CZS 1) For a triangle $A B C$, let $k$ be its circumcircle with radius $r$. The bisectors of the inner angles $A, B$, and $C$ of the triangle intersect respectively the circle $k$ again at points $A^{\prime}, B^{\prime}$, and $C^{\prime}$. Prove the inequality  $$ 16 Q^{3} \geq 27 r^{4} P $$  where $Q$ and $P$ are the areas of the triangles $A^{\prime} B^{\prime} C^{\prime}$ and $A B C$ respectively.

Solution: 6. Let us denote the measures of the inner angles of the triangle $A B C$ by $\alpha, \beta, \gamma$. Then $P=r^{2}(\sin 2 \alpha+\sin 2 \beta+\sin 2 \gamma) / 2$. Since the inner angles of the triangle $A^{\prime} B^{\prime} C^{\prime}$ are $(\beta+\gamma) / 2,(\gamma+\alpha) / 2,(\alpha+\beta) / 2$, we also have $Q=r^{2}[\sin (\beta+\gamma)+\sin (\gamma+\alpha)+\sin (\alpha+\beta)] / 2$. Applying the AM-GM mean inequality, we now obtain  $$ \begin{aligned} 16 Q^{3} & =\frac{16}{8} r^{6}(\sin (\beta+\gamma)+\sin (\gamma+\alpha)+\sin (\alpha+\beta))^{3} \\ & \geq 54 r^{6} \sin (\beta+\gamma) \sin (\gamma+\alpha) \sin (\alpha+\beta) \\ & =27 r^{6}[\cos (\alpha-\beta)-\cos (\alpha+\beta+2 \gamma)] \sin (\alpha+\beta) \\ & =27 r^{6}[\cos (\alpha-\beta)+\cos \gamma] \sin (\alpha+\beta) \\ & =\frac{27}{2} r^{6}[\sin (\alpha+\beta+\gamma)+\sin (\alpha+\beta-\gamma)+\sin 2 \alpha+\sin 2 \beta] \\ & =\frac{27}{2} r^{6}[\sin (2 \gamma)+\sin 2 \alpha+\sin 2 \beta]=27 r^{4} P . \end{aligned} $$  This completes the proof.