Let $A B C$ be an acute triangle with $D, E, F$ the feet of the altitudes lying on $B C, C A, A B$ respectively. One of the intersection points of the line $E F$ and the circumcircle is $P$. The lines $B P$ and $D F$ meet at point $Q$. Prove that $A P=A Q$. (United Kingdom)

Solution: The line $E F$ intersects the circumcircle at two points. Depending on the choice of $P$, there are two different cases to consider.  Case 1: The point $P$ lies on the ray $E F$ (see Fig. 1). Let $\angle C A B=\alpha, \angle A B C=\beta$ and $\angle B C A=\gamma$. The quadrilaterals $B C E F$ and $C A F D$ are cyclic due to the right angles at $D, E$ and $F$. So,  $$ \begin{aligned} & \angle B D F=180^{\circ}-\angle F D C=\angle C A F=\alpha, \\ & \angle A F E=180^{\circ}-\angle E F B=\angle B C E=\gamma, \\ & \angle D F B=180^{\circ}-\angle A F D=\angle D C A=\gamma . \end{aligned} $$  Since $P$ lies on the arc $A B$ of the circumcircle, $\angle P B A<\angle B C A=\gamma$. Hence, we have  $$ \angle P B D+\angle B D F=\angle P B A+\angle A B D+\angle B D F<\gamma+\beta+\alpha=180^{\circ}, $$  and the point $Q$ must lie on the extensions of $B P$ and $D F$ beyond the points $P$ and $F$, respectively.  From the cyclic quadrilateral $A P B C$ we get  $$ \angle Q P A=180^{\circ}-\angle A P B=\angle B C A=\gamma=\angle D F B=\angle Q F A . $$  Hence, the quadrilateral $A Q P F$ is cyclic. Then $\angle A Q P=180^{\circ}-\angle P F A=\angle A F E=\gamma$. We obtained that $\angle A Q P=\angle Q P A=\gamma$, so the triangle $A Q P$ is isosceles, $A P=A Q$. ![](https://cdn.mathpix.com/cropped/2024_11_18_ba86565be3364967ae6fg-45.jpg?height=680&width=763&top_left_y=2007&top_left_x=361)  Fig. 1 ![](https://cdn.mathpix.com/cropped/2024_11_18_ba86565be3364967ae6fg-45.jpg?height=549&width=638&top_left_y=2127&top_left_x=1143)  Fig. 2  Case 2: The point $P$ lies on the ray $F E$ (see Fig. 2). In this case the point $Q$ lies inside the segment $F D$.  Similarly to the first case, we have  $$ \angle Q P A=\angle B C A=\gamma=\angle D F B=180^{\circ}-\angle A F Q $$  Hence, the quadrilateral $A F Q P$ is cyclic. Then $\angle A Q P=\angle A F P=\angle A F E=\gamma=\angle Q P A$. The triangle $A Q P$ is isosceles again, $\angle A Q P=\angle Q P A$ and thus $A P=A Q$. Comment. Using signed angles, the two possible configurations can be handled simultaneously, without investigating the possible locations of $P$ and $Q$.


Solution: For arbitrary points $X, Y$ on the circumcircle, denote by $\widehat{X Y}$ the central angle of the arc $X Y$.  Let $P$ and $P^{\prime}$ be the two points where the line $E F$ meets the circumcircle; let $P$ lie on the $\operatorname{arc} A B$ and let $P^{\prime}$ lie on the $\operatorname{arc} C A$. Let $B P$ and $B P^{\prime}$ meet the line $D F$ and $Q$ and $Q^{\prime}$, respectively (see Fig. 3). We will prove that $A P=A P^{\prime}=A Q=A Q^{\prime}$. ![](https://cdn.mathpix.com/cropped/2024_11_18_ba86565be3364967ae6fg-46.jpg?height=667&width=760&top_left_y=1197&top_left_x=628)  Fig. 3 Like in the first solution, we have $\angle A F E=\angle B F P=\angle D F B=\angle B C A=\gamma$ from the cyclic quadrilaterals $B C E F$ and $C A F D$.  By $\overparen{P B}+\overparen{P^{\prime} A}=2 \angle A F P^{\prime}=2 \gamma=2 \angle B C A=\overparen{A P}+\overparen{P B}$, we have  $$ \overline{A P}=\widetilde{P^{\prime} A}, \quad \angle P B A=\angle A B P^{\prime} \quad \text { and } \quad A P=A P^{\prime} $$  Due to $\overparen{A P}=\widehat{P^{\prime}} A$, the lines $B P$ and $B Q^{\prime}$ are symmetrical about line $A B$. Similarly, by $\angle B F P=\angle Q^{\prime} F B$, the lines $F P$ and $F Q^{\prime}$ are symmetrical about $A B$. It follows that also the points $P$ and $P^{\prime}$ are symmetrical to $Q^{\prime}$ and $Q$, respectively. Therefore,  $$ A P=A Q^{\prime} \quad \text { and } \quad A P^{\prime}=A Q $$  The relations (1) and (2) together prove $A P=A P^{\prime}=A Q=A Q^{\prime}$.


Point $P$ lies inside triangle $A B C$. Lines $A P, B P, C P$ meet the circumcircle of $A B C$ again at points $K, L, M$, respectively. The tangent to the circumcircle at $C$ meets line $A B$ at $S$. Prove that $S C=S P$ if and only if $M K=M L$.

Solution: We assume that $C A>C B$, so point $S$ lies on the ray $A B$. From the similar triangles $\triangle P K M \sim \triangle P C A$ and $\triangle P L M \sim \triangle P C B$ we get $\frac{P M}{K M}=\frac{P A}{C A}$ and $\frac{L M}{P M}=\frac{C B}{P B}$. Multiplying these two equalities, we get  $$ \frac{L M}{K M}=\frac{C B}{C A} \cdot \frac{P A}{P B} $$  Hence, the relation $M K=M L$ is equivalent to $\frac{C B}{C A}=\frac{P B}{P A}$. Denote by $E$ the foot of the bisector of angle $B$ in triangle $A B C$. Recall that the locus of points $X$ for which $\frac{X A}{X B}=\frac{C A}{C B}$ is the Apollonius circle $\Omega$ with the center $Q$ on the line $A B$, and this circle passes through $C$ and $E$. Hence, we have $M K=M L$ if and only if $P$ lies on $\Omega$, that is $Q P=Q C$. ![](https://cdn.mathpix.com/cropped/2024_11_18_ba86565be3364967ae6fg-47.jpg?height=692&width=1086&top_left_y=1387&top_left_x=522)  Fig. 1  Now we prove that $S=Q$, thus establishing the problem statement. We have $\angle C E S=$ $\angle C A E+\angle A C E=\angle B C S+\angle E C B=\angle E C S$, so $S C=S E$. Hence, the point $S$ lies on $A B$ as well as on the perpendicular bisector of $C E$ and therefore coincides with $Q$.


Solution: As in the previous solution, we assume that $S$ lies on the ray $A B$.  1. Let $P$ be an arbitrary point inside both the circumcircle $\omega$ of the triangle $A B C$ and the angle $A S C$, the points $K, L, M$ defined as in the problem. We claim that $S P=S C$ implies $M K=M L$.  Let $E$ and $F$ be the points of intersection of the line $S P$ with $\omega$, point $E$ lying on the segment $S P$ (see Fig. 2). ![](https://cdn.mathpix.com/cropped/2024_11_18_ba86565be3364967ae6fg-48.jpg?height=641&width=658&top_left_y=288&top_left_x=679)  Fig. 2  We have $S P^{2}=S C^{2}=S A \cdot S B$, so $\frac{S P}{S B}=\frac{S A}{S P}$, and hence $\triangle P S A \sim \triangle B S P$. Then $\angle B P S=\angle S A P$. Since $2 \angle B P S=\overparen{B E}+\overparen{L F}$ and $2 \angle S A P=\overparen{B E}+\overparen{E K}$ we have  $$ \overparen{L F}=\overparen{E K} $$  On the other hand, from $\angle S P C=\angle S C P$ we have $\widehat{E C}+\widehat{M F}=\widehat{E C}+\widehat{E M}$, or  $$ \widetilde{M F}=\overparen{E M} . $$  From (1) and (2) we get $\widehat{M F L}=\widehat{M F}+\widehat{F L}=\widehat{M E}+\widehat{E K}=\widehat{M E K}$ and hence $M K=M L$. The claim is proved. 2. We are left to prove the converse. So, assume that $M K=M L$, and introduce the points $E$ and $F$ as above. We have $S C^{2}=S E \cdot S F$; hence, there exists a point $P^{\prime}$ lying on the segment $E F$ such that $S P^{\prime}=S C$ (see Fig. 3). ![](https://cdn.mathpix.com/cropped/2024_11_18_ba86565be3364967ae6fg-48.jpg?height=743&width=1154&top_left_y=1933&top_left_x=431)  Fig. 3  Assume that $P \neq P^{\prime}$. Let the lines $A P^{\prime}, B P^{\prime}, C P^{\prime}$ meet $\omega$ again at points $K^{\prime}, L^{\prime}, M^{\prime}$ respectively. Now, if $P^{\prime}$ lies on the segment $P F$ then by the first part of the solution we have $\widehat{M^{\prime} F L^{\prime}}=\widehat{M^{\prime} E K^{\prime}}$. On the other hand, we have $\widehat{M F L}>\widehat{M^{\prime} F L^{\prime}}=\widehat{M^{\prime} E K^{\prime}}>\widehat{M E K}$, therefore $\widehat{M F L}>\widehat{M E K}$ which contradicts $M K=M L$.  Similarly, if point $P^{\prime}$ lies on the segment $E P$ then we get $\widehat{M F L}<\widehat{M E K}$ which is impossible. Therefore, the points $P$ and $P^{\prime}$ coincide and hence $S P=S P^{\prime}=S C$.


Solution: We present a different proof of the converse direction, that is, $M K=M L \Rightarrow$ $S P=S C$. As in the previous solutions we assume that $C A>C B$, and the line $S P$ meets $\omega$ at $E$ and $F$.  From $M L=M K$ we get $\widehat{M E K}=\widehat{M F L}$. Now we claim that $\widehat{M E}=\widehat{M F}$ and $\widehat{E K}=\widehat{F L}$. To the contrary, suppose first that $\widehat{M E}>\widehat{M F}$; then $\widehat{E K}=\widehat{M E K}-\widehat{M E}<\widehat{M F L}-\widehat{M F}=$ $\overparen{F L}$. Now, the inequality $\overparen{M E}>\overparen{M F}$ implies $2 \angle S C M=\overparen{E C}+\overparen{M E}>\overparen{E C}+\overparen{M F}=2 \angle S P C$ and hence $S P>S C$. On the other hand, the inequality $\overparen{E K}<\overparen{F L}$ implies $2 \angle S P K=$ $\overparen{E K}+\widetilde{A F}<\overparen{F L}+\widetilde{A F}=2 \angle A B L$, hence  $$ \angle S P A=180^{\circ}-\angle S P K>180^{\circ}-\angle A B L=\angle S B P . $$  ![](https://cdn.mathpix.com/cropped/2024_11_18_ba86565be3364967ae6fg-49.jpg?height=712&width=1098&top_left_y=1226&top_left_x=519)  Fig. 4 Consider the point $A^{\prime}$ on the ray $S A$ for which $\angle S P A^{\prime}=\angle S B P$; in our case, this point lies on the segment $S A$ (see Fig. 4). Then $\triangle S B P \sim \triangle S P A^{\prime}$ and $S P^{2}=S B \cdot S A^{\prime}<S B \cdot S A=S C^{2}$. Therefore, $S P<S C$ which contradicts $S P>S C$.  Similarly, one can prove that the inequality $\widehat{M E}<\widehat{M F}$ is also impossible. So, we get $\widehat{M E}=\widehat{M F}$ and therefore $2 \angle S C M=\widehat{E C}+\widehat{M E}=\widehat{E C}+\widehat{M F}=2 \angle S P C$, which implies $S C=S P$.


Let $A_{1} A_{2} \ldots A_{n}$ be a convex polygon. Point $P$ inside this polygon is chosen so that its projections $P_{1}, \ldots, P_{n}$ onto lines $A_{1} A_{2}, \ldots, A_{n} A_{1}$ respectively lie on the sides of the polygon. Prove that for arbitrary points $X_{1}, \ldots, X_{n}$ on sides $A_{1} A_{2}, \ldots, A_{n} A_{1}$ respectively,  $$ \max \left\{\frac{X_{1} X_{2}}{P_{1} P_{2}}, \ldots, \frac{X_{n} X_{1}}{P_{n} P_{1}}\right\} \geq 1 $$  (Armenia)

Solution: Denote $P_{n+1}=P_{1}, X_{n+1}=X_{1}, A_{n+1}=A_{1}$. Lemma. Let point $Q$ lies inside $A_{1} A_{2} \ldots A_{n}$. Then it is contained in at least one of the circumcircles of triangles $X_{1} A_{2} X_{2}, \ldots, X_{n} A_{1} X_{1}$. Proof. If $Q$ lies in one of the triangles $X_{1} A_{2} X_{2}, \ldots, X_{n} A_{1} X_{1}$, the claim is obvious. Otherwise $Q$ lies inside the polygon $X_{1} X_{2} \ldots X_{n}$ (see Fig. 1). Then we have  $$ \begin{aligned} & \left(\angle X_{1} A_{2} X_{2}+\angle X_{1} Q X_{2}\right)+\cdots+\left(\angle X_{n} A_{1} X_{1}+\angle X_{n} Q X_{1}\right) \\ & \quad=\left(\angle X_{1} A_{1} X_{2}+\cdots+\angle X_{n} A_{1} X_{1}\right)+\left(\angle X_{1} Q X_{2}+\cdots+\angle X_{n} Q X_{1}\right)=(n-2) \pi+2 \pi=n \pi \end{aligned} $$  hence there exists an index $i$ such that $\angle X_{i} A_{i+1} X_{i+1}+\angle X_{i} Q X_{i+1} \geq \frac{\pi n}{n}=\pi$. Since the quadrilateral $Q X_{i} A_{i+1} X_{i+1}$ is convex, this means exactly that $Q$ is contained the circumcircle of $\triangle X_{i} A_{i+1} X_{i+1}$, as desired.  Now we turn to the solution. Applying lemma, we get that $P$ lies inside the circumcircle of triangle $X_{i} A_{i+1} X_{i+1}$ for some $i$. Consider the circumcircles $\omega$ and $\Omega$ of triangles $P_{i} A_{i+1} P_{i+1}$ and $X_{i} A_{i+1} X_{i+1}$ respectively (see Fig. 2); let $r$ and $R$ be their radii. Then we get $2 r=A_{i+1} P \leq 2 R$ (since $P$ lies inside $\Omega$ ), hence  $$ P_{i} P_{i+1}=2 r \sin \angle P_{i} A_{i+1} P_{i+1} \leq 2 R \sin \angle X_{i} A_{i+1} X_{i+1}=X_{i} X_{i+1} $$  QED. ![](https://cdn.mathpix.com/cropped/2024_11_18_ba86565be3364967ae6fg-51.jpg?height=547&width=566&top_left_y=2011&top_left_x=508)  Fig. 1 ![](https://cdn.mathpix.com/cropped/2024_11_18_ba86565be3364967ae6fg-51.jpg?height=458&width=527&top_left_y=2098&top_left_x=1093)  Fig. 2


Solution: As in  We will prove a bit stronger inequality, namely  $$ \max \left\{\frac{X_{1} X_{2}}{P_{1} P_{2}} \cos \alpha_{1}, \ldots, \frac{X_{n} X_{1}}{P_{n} P_{1}} \cos \alpha_{n}\right\} \geq 1 $$  where $\alpha_{i}(1 \leq i \leq n)$ is the angle between lines $X_{i} X_{i+1}$ and $P_{i} P_{i+1}$. We denote $\beta_{i}=\angle A_{i} P_{i} P_{i-1}$ and $\gamma_{i}=\angle A_{i+1} P_{i} P_{i+1}$ for all $1 \leq i \leq n$.  Suppose that for some $1 \leq i \leq n$, point $X_{i}$ lies on the segment $A_{i} P_{i}$, while point $X_{i+1}$ lies on the segment $P_{i+1} A_{i+2}$. Then the projection of the segment $X_{i} X_{i+1}$ onto the line $P_{i} P_{i+1}$ contains segment $P_{i} P_{i+1}$, since $\gamma_{i}$ and $\beta_{i+1}$ are acute angles (see Fig. 3). Therefore, $X_{i} X_{i+1} \cos \alpha_{i} \geq$ $P_{i} P_{i+1}$, and in this case the statement is proved.  So, the only case left is when point $X_{i}$ lies on segment $P_{i} A_{i+1}$ for all $1 \leq i \leq n$ (the case when each $X_{i}$ lies on segment $A_{i} P_{i}$ is completely analogous).  Now, assume to the contrary that the inequality  $$ X_{i} X_{i+1} \cos \alpha_{i}<P_{i} P_{i+1} $$  holds for every $1 \leq i \leq n$. Let $Y_{i}$ and $Y_{i+1}^{\prime}$ be the projections of $X_{i}$ and $X_{i+1}$ onto $P_{i} P_{i+1}$. Then inequality (1) means exactly that $Y_{i} Y_{i+1}^{\prime}<P_{i} P_{i+1}$, or $P_{i} Y_{i}>P_{i+1} Y_{i+1}^{\prime}$ (again since $\gamma_{i}$ and $\beta_{i+1}$ are acute; see Fig. 4). Hence, we have  $$ X_{i} P_{i} \cos \gamma_{i}>X_{i+1} P_{i+1} \cos \beta_{i+1}, \quad 1 \leq i \leq n $$  Multiplying these inequalities, we get  $$ \cos \gamma_{1} \cos \gamma_{2} \cdots \cos \gamma_{n}>\cos \beta_{1} \cos \beta_{2} \cdots \cos \beta_{n} $$  On the other hand, the sines theorem applied to triangle $P P_{i} P_{i+1}$ provides  $$ \frac{P P_{i}}{P P_{i+1}}=\frac{\sin \left(\frac{\pi}{2}-\beta_{i+1}\right)}{\sin \left(\frac{\pi}{2}-\gamma_{i}\right)}=\frac{\cos \beta_{i+1}}{\cos \gamma_{i}} $$  Multiplying these equalities we get  $$ 1=\frac{\cos \beta_{2}}{\cos \gamma_{1}} \cdot \frac{\cos \beta_{3}}{\cos \gamma_{2}} \cdots \frac{\cos \beta_{1}}{\cos \gamma_{n}} $$  which contradicts (2). ![](https://cdn.mathpix.com/cropped/2024_11_18_ba86565be3364967ae6fg-52.jpg?height=817&width=1297&top_left_y=1873&top_left_x=351)  Fig. 3 Fig. 4


Let $I$ be the incenter of a triangle $A B C$ and $\Gamma$ be its circumcircle. Let the line $A I$ intersect $\Gamma$ at a point $D \neq A$. Let $F$ and $E$ be points on side $B C$ and $\operatorname{arc} B D C$ respectively such that $\angle B A F=\angle C A E<\frac{1}{2} \angle B A C$. Finally, let $G$ be the midpoint of the segment $I F$. Prove that the lines $D G$ and $E I$ intersect on $\Gamma$. (Hong Kong)

Solution: Let $X$ be the second point of intersection of line $E I$ with $\Gamma$, and $L$ be the foot of the bisector of angle $B A C$. Let $G^{\prime}$ and $T$ be the points of intersection of segment $D X$ with lines $I F$ and $A F$, respectively. We are to prove that $G=G^{\prime}$, or $I G^{\prime}=G^{\prime} F$. By the Menelaus theorem applied to triangle $A I F$ and line $D X$, it means that we need the relation  $$ 1=\frac{G^{\prime} F}{I G^{\prime}}=\frac{T F}{A T} \cdot \frac{A D}{I D}, \quad \text { or } \quad \frac{T F}{A T}=\frac{I D}{A D} $$  Let the line $A F$ intersect $\Gamma$ at point $K \neq A$ (see Fig. 1); since $\angle B A K=\angle C A E$ we have $\widehat{B K}=\widehat{C E}$, hence $K E \| B C$. Notice that $\angle I A T=\angle D A K=\angle E A D=\angle E X D=\angle I X T$, so the points $I, A, X, T$ are concyclic. Hence we have $\angle I T A=\angle I X A=\angle E X A=\angle E K A$, so $I T\|K E\| B C$. Therefore we obtain $\frac{T F}{A T}=\frac{I L}{A I}$.  Since $C I$ is the bisector of $\angle A C L$, we get $\frac{I L}{A I}=\frac{C L}{A C}$. Furthermore, $\angle D C L=\angle D C B=$ $\angle D A B=\angle C A D=\frac{1}{2} \angle B A C$, hence the triangles $D C L$ and $D A C$ are similar; therefore we get $\frac{C L}{A C}=\frac{D C}{A D}$. Finally, it is known that the midpoint $D$ of $\operatorname{arc} B C$ is equidistant from points $I$, $B, C$, hence $\frac{D C}{A D}=\frac{I D}{A D}$.  Summarizing all these equalities, we get  $$ \frac{T F}{A T}=\frac{I L}{A I}=\frac{C L}{A C}=\frac{D C}{A D}=\frac{I D}{A D} $$  as desired. ![](https://cdn.mathpix.com/cropped/2024_11_18_ba86565be3364967ae6fg-53.jpg?height=767&width=715&top_left_y=1838&top_left_x=336)  Fig. 1 ![](https://cdn.mathpix.com/cropped/2024_11_18_ba86565be3364967ae6fg-53.jpg?height=775&width=530&top_left_y=1828&top_left_x=1254)  Fig. 2  Comment. The equality $\frac{A I}{I L}=\frac{A D}{D I}$ is known and can be obtained in many different ways. For instance, one can consider the inversion with center $D$ and radius $D C=D I$. This inversion takes $\widehat{B A C}$ to the segment $B C$, so point $A$ goes to $L$. Hence $\frac{I L}{D I}=\frac{A I}{A D}$, which is the desired equality.


Solution: As in the previous solution, we introduce the points $X, T$ and $K$ and note that it suffice to prove the equality  $$ \frac{T F}{A T}=\frac{D I}{A D} \quad \Longleftrightarrow \quad \frac{T F+A T}{A T}=\frac{D I+A D}{A D} \quad \Longleftrightarrow \quad \frac{A T}{A D}=\frac{A F}{D I+A D} $$  Since $\angle F A D=\angle E A I$ and $\angle T D A=\angle X D A=\angle X E A=\angle I E A$, we get that the triangles $A T D$ and $A I E$ are similar, therefore $\frac{A T}{A D}=\frac{A I}{A E}$.  Next, we also use the relation $D B=D C=D I$. Let $J$ be the point on the extension of segment $A D$ over point $D$ such that $D J=D I=D C$ (see Fig. 2). Then $\angle D J C=$ $\angle J C D=\frac{1}{2}(\pi-\angle J D C)=\frac{1}{2} \angle A D C=\frac{1}{2} \angle A B C=\angle A B I$. Moreover, $\angle B A I=\angle J A C$, hence triangles $A B I$ and $A J C$ are similar, so $\frac{A B}{A J}=\frac{A I}{A C}$, or $A B \cdot A C=A J \cdot A I=(D I+A D) \cdot A I$.  On the other hand, we get $\angle A B F=\angle A B C=\angle A E C$ and $\angle B A F=\angle C A E$, so triangles $A B F$ and $A E C$ are also similar, which implies $\frac{A F}{A C}=\frac{A B}{A E}$, or $A B \cdot A C=A F \cdot A E$.  Summarizing we get  $$ (D I+A D) \cdot A I=A B \cdot A C=A F \cdot A E \quad \Rightarrow \quad \frac{A I}{A E}=\frac{A F}{A D+D I} \quad \Rightarrow \quad \frac{A T}{A D}=\frac{A F}{A D+D I} $$  as desired. Comment. In fact, point $J$ is an excenter of triangle $A B C$.


Let $A B C D E$ be a convex pentagon such that $B C \| A E, A B=B C+A E$, and $\angle A B C=$ $\angle C D E$. Let $M$ be the midpoint of $C E$, and let $O$ be the circumcenter of triangle $B C D$. Given that $\angle D M O=90^{\circ}$, prove that $2 \angle B D A=\angle C D E$. (Ukraine)

Solution: Choose point $T$ on ray $A E$ such that $A T=A B$; then from $A E \| B C$ we have $\angle C B T=\angle A T B=\angle A B T$, so $B T$ is the bisector of $\angle A B C$. On the other hand, we have $E T=A T-A E=A B-A E=B C$, hence quadrilateral $B C T E$ is a parallelogram, and the midpoint $M$ of its diagonal $C E$ is also the midpoint of the other diagonal $B T$.  Next, let point $K$ be symmetrical to $D$ with respect to $M$. Then $O M$ is the perpendicular bisector of segment $D K$, and hence $O D=O K$, which means that point $K$ lies on the circumcircle of triangle $B C D$. Hence we have $\angle B D C=\angle B K C$. On the other hand, the angles $B K C$ and $T D E$ are symmetrical with respect to $M$, so $\angle T D E=\angle B K C=\angle B D C$.  Therefore, $\angle B D T=\angle B D E+\angle E D T=\angle B D E+\angle B D C=\angle C D E=\angle A B C=180^{\circ}-$ $\angle B A T$. This means that the points $A, B, D, T$ are concyclic, and hence $\angle A D B=\angle A T B=$ $\frac{1}{2} \angle A B C=\frac{1}{2} \angle C D E$, as desired. ![](https://cdn.mathpix.com/cropped/2024_11_18_ba86565be3364967ae6fg-55.jpg?height=621&width=1276&top_left_y=1140&top_left_x=425)


Solution: Let $\angle C B D=\alpha, \angle B D C=\beta, \angle A D E=\gamma$, and $\angle A B C=\angle C D E=2 \varphi$. Then we have $\angle A D B=2 \varphi-\beta-\gamma, \angle B C D=180^{\circ}-\alpha-\beta, \angle A E D=360^{\circ}-\angle B C D-\angle C D E=$ $180^{\circ}-2 \varphi+\alpha+\beta$, and finally $\angle D A E=180^{\circ}-\angle A D E-\angle A E D=2 \varphi-\alpha-\beta-\gamma$. ![](https://cdn.mathpix.com/cropped/2024_11_18_ba86565be3364967ae6fg-55.jpg?height=530&width=1039&top_left_y=2008&top_left_x=546)  Let $N$ be the midpoint of $C D$; then $\angle D N O=90^{\circ}=\angle D M O$, hence points $M, N$ lie on the circle with diameter $O D$. Now, if points $O$ and $M$ lie on the same side of $C D$, we have $\angle D M N=\angle D O N=\frac{1}{2} \angle D O C=\alpha$; in the other case, we have $\angle D M N=180^{\circ}-\angle D O N=\alpha ;$ so, in both cases $\angle D M N=\alpha$ (see Figures). Next, since $M N$ is a midline in triangle $C D E$, we have $\angle M D E=\angle D M N=\alpha$ and $\angle N D M=2 \varphi-\alpha$.  Now we apply the sine rule to the triangles $A B D, A D E$ (twice), $B C D$ and $M N D$ obtaining  $$ \begin{gathered} \frac{A B}{A D}=\frac{\sin (2 \varphi-\beta-\gamma)}{\sin (2 \varphi-\alpha)}, \quad \frac{A E}{A D}=\frac{\sin \gamma}{\sin (2 \varphi-\alpha-\beta)}, \quad \frac{D E}{A D}=\frac{\sin (2 \varphi-\alpha-\beta-\gamma)}{\sin (2 \varphi-\alpha-\beta)} \\ \frac{B C}{C D}=\frac{\sin \beta}{\sin \alpha}, \quad \frac{C D}{D E}=\frac{C D / 2}{D E / 2}=\frac{N D}{N M}=\frac{\sin \alpha}{\sin (2 \varphi-\alpha)} \end{gathered} $$  which implies  $$ \frac{B C}{A D}=\frac{B C}{C D} \cdot \frac{C D}{D E} \cdot \frac{D E}{A D}=\frac{\sin \beta \cdot \sin (2 \varphi-\alpha-\beta-\gamma)}{\sin (2 \varphi-\alpha) \cdot \sin (2 \varphi-\alpha-\beta)} $$  Hence, the condition $A B=A E+B C$, or equivalently $\frac{A B}{A D}=\frac{A E+B C}{A D}$, after multiplying by the common denominator rewrites as  $$ \begin{gathered} \sin (2 \varphi-\alpha-\beta) \cdot \sin (2 \varphi-\beta-\gamma)=\sin \gamma \cdot \sin (2 \varphi-\alpha)+\sin \beta \cdot \sin (2 \varphi-\alpha-\beta-\gamma) \\ \Longleftrightarrow \cos (\gamma-\alpha)-\cos (4 \varphi-2 \beta-\alpha-\gamma)=\cos (2 \varphi-\alpha-2 \beta-\gamma)-\cos (2 \varphi+\gamma-\alpha) \\ \Longleftrightarrow \cos (\gamma-\alpha)+\cos (2 \varphi+\gamma-\alpha)=\cos (2 \varphi-\alpha-2 \beta-\gamma)+\cos (4 \varphi-2 \beta-\alpha-\gamma) \\ \Longleftrightarrow \cos \varphi \cdot \cos (\varphi+\gamma-\alpha)=\cos \varphi \cdot \cos (3 \varphi-2 \beta-\alpha-\gamma) \\ \Longleftrightarrow \cos \varphi \cdot(\cos (\varphi+\gamma-\alpha)-\cos (3 \varphi-2 \beta-\alpha-\gamma))=0 \\ \Longleftrightarrow \cos \varphi \cdot \sin (2 \varphi-\beta-\alpha) \cdot \sin (\varphi-\beta-\gamma)=0 \end{gathered} $$  Since $2 \varphi-\beta-\alpha=180^{\circ}-\angle A E D<180^{\circ}$ and $\varphi=\frac{1}{2} \angle A B C<90^{\circ}$, it follows that $\varphi=\beta+\gamma$, hence $\angle B D A=2 \varphi-\beta-\gamma=\varphi=\frac{1}{2} \angle C D E$, as desired.


The vertices $X, Y, Z$ of an equilateral triangle $X Y Z$ lie respectively on the sides $B C$, $C A, A B$ of an acute-angled triangle $A B C$. Prove that the incenter of triangle $A B C$ lies inside triangle $X Y Z$.


${ }^{\prime}$. The vertices $X, Y, Z$ of an equilateral triangle $X Y Z$ lie respectively on the sides $B C, C A, A B$ of a triangle $A B C$. Prove that if the incenter of triangle $A B C$ lies outside triangle $X Y Z$, then one of the angles of triangle $A B C$ is greater than $120^{\circ}$. (Bulgaria) Solution 1 for G6. We will prove a stronger fact; namely, we will show that the incenter $I$ of triangle $A B C$ lies inside the incircle of triangle $X Y Z$ (and hence surely inside triangle $X Y Z$ itself). We denote by $d(U, V W)$ the distance between point $U$ and line $V W$.  Denote by $O$ the incenter of $\triangle X Y Z$ and by $r, r^{\prime}$ and $R^{\prime}$ the inradii of triangles $A B C, X Y Z$ and the circumradius of $X Y Z$, respectively. Then we have $R^{\prime}=2 r^{\prime}$, and the desired inequality is $O I \leq r^{\prime}$. We assume that $O \neq I$; otherwise the claim is trivial.  Let the incircle of $\triangle A B C$ touch its sides $B C, A C, A B$ at points $A_{1}, B_{1}, C_{1}$ respectively. The lines $I A_{1}, I B_{1}, I C_{1}$ cut the plane into 6 acute angles, each one containing one of the points $A_{1}, B_{1}, C_{1}$ on its border. We may assume that $O$ lies in an angle defined by lines $I A_{1}$, $I C_{1}$ and containing point $C_{1}$ (see Fig. 1). Let $A^{\prime}$ and $C^{\prime}$ be the projections of $O$ onto lines $I A_{1}$ and $I C_{1}$, respectively.  Since $O X=R^{\prime}$, we have $d(O, B C) \leq R^{\prime}$. Since $O A^{\prime} \| B C$, it follows that $d\left(A^{\prime}, B C\right)=$ $A^{\prime} I+r \leq R^{\prime}$, or $A^{\prime} I \leq R^{\prime}-r$. On the other hand, the incircle of $\triangle X Y Z$ lies inside $\triangle A B C$, hence $d(O, A B) \geq r^{\prime}$, and analogously we get $d(O, A B)=C^{\prime} C_{1}=r-I C^{\prime} \geq r^{\prime}$, or $I C^{\prime} \leq r-r^{\prime}$. ![](https://cdn.mathpix.com/cropped/2024_11_18_ba86565be3364967ae6fg-57.jpg?height=475&width=815&top_left_y=1536&top_left_x=455)  Fig. 1 ![](https://cdn.mathpix.com/cropped/2024_11_18_ba86565be3364967ae6fg-57.jpg?height=346&width=389&top_left_y=1666&top_left_x=1282)  Fig. 2  Finally, the quadrilateral $I A^{\prime} O C^{\prime}$ is circumscribed due to the right angles at $A^{\prime}$ and $C^{\prime}$ (see Fig. 2). On its circumcircle, we have $\widehat{A^{\prime} O C^{\prime}}=2 \angle A^{\prime} I C^{\prime}<180^{\circ}=\widetilde{O C^{\prime} I}$, hence $180^{\circ} \geq$ $\widetilde{I C^{\prime}}>\widetilde{A^{\prime} O}$. This means that $I C^{\prime}>A^{\prime} O$. Finally, we have $O I \leq I A^{\prime}+A^{\prime} O<I A^{\prime}+I C^{\prime} \leq$ $\left(R^{\prime}-r\right)+\left(r-r^{\prime}\right)=R^{\prime}-r^{\prime}=r^{\prime}$, as desired.  Solution 2 for G6. Assume the contrary. Then the incenter $I$ should lie in one of triangles $A Y Z, B X Z, C X Y$ - assume that it lies in $\triangle A Y Z$. Let the incircle $\omega$ of $\triangle A B C$ touch sides $B C, A C$ at point $A_{1}, B_{1}$ respectively. Without loss of generality, assume that point $A_{1}$ lies on segment $C X$. In this case we will show that $\angle C>90^{\circ}$ thus leading to a contradiction.  Note that $\omega$ intersects each of the segments $X Y$ and $Y Z$ at two points; let $U, U^{\prime}$ and $V$, $V^{\prime}$ be the points of intersection of $\omega$ with $X Y$ and $Y Z$, respectively $\left(U Y>U^{\prime} Y, V Y>V^{\prime} Y\right.$; see Figs. 3 and 4). Note that $60^{\circ}=\angle X Y Z=\frac{1}{2}\left(\overparen{U V}-\widetilde{U^{\prime} V^{\prime}}\right) \leq \frac{1}{2} \overparen{U V}$, hence $\overparen{U V} \geq 120^{\circ}$.  On the other hand, since $I$ lies in $\triangle A Y Z$, we get $\sqrt{U V^{\prime}}<180^{\circ}$, hence $\sqrt{U A_{1} U^{\prime}} \leq \sqrt{U A_{1} V^{\prime}}<$ $180^{\circ}-\widehat{U V} \leq 60^{\circ}$.  Now, two cases are possible due to the order of points $Y, B_{1}$ on segment $A C$. ![](https://cdn.mathpix.com/cropped/2024_11_18_ba86565be3364967ae6fg-58.jpg?height=495&width=690&top_left_y=529&top_left_x=249)  Fig. 3 ![](https://cdn.mathpix.com/cropped/2024_11_18_ba86565be3364967ae6fg-58.jpg?height=415&width=801&top_left_y=609&top_left_x=953)  Fig. 4  Case 1. Let point $Y$ lie on the segment $A B_{1}$ (see Fig. 3). Then we have $\angle Y X C=$ $\frac{1}{2}\left(\widehat{A_{1} U^{\prime}}-\widehat{A_{1} U}\right) \leq \frac{1}{2} \widehat{U A_{1} U^{\prime}}<30^{\circ}$; analogously, we get $\angle X Y C \leq \frac{1}{2} \widehat{U A_{1} U^{\prime}}<30^{\circ}$. Therefore, $\angle Y C X=180^{\circ}-\angle Y X C-\angle X Y C>120^{\circ}$, as desired.  Case 2. Now let point $Y$ lie on the segment $C B_{1}$ (see Fig. 4). Analogously, we obtain $\angle Y X C<30^{\circ}$. Next, $\angle I Y X>\angle Z Y X=60^{\circ}$, but $\angle I Y X<\angle I Y B_{1}$, since $Y B_{1}$ is a tangent and $Y X$ is a secant line to circle $\omega$ from point $Y$. Hence, we get $120^{\circ}<\angle I Y B_{1}+\angle I Y X=$ $\angle B_{1} Y X=\angle Y X C+\angle Y C X<30^{\circ}+\angle Y C X$, hence $\angle Y C X>120^{\circ}-30^{\circ}=90^{\circ}$, as desired.  Comment. In the same way, one can prove a more general Claim. Let the vertices $X, Y, Z$ of a triangle $X Y Z$ lie respectively on the sides $B C, C A, A B$ of a triangle $A B C$. Suppose that the incenter of triangle $A B C$ lies outside triangle $X Y Z$, and $\alpha$ is the least angle of $\triangle X Y Z$. Then one of the angles of triangle $A B C$ is greater than $3 \alpha-90^{\circ}$.  Solution for G6'. Assume the contrary. As in Solution 2, we assume that the incenter $I$ of $\triangle A B C$ lies in $\triangle A Y Z$, and the tangency point $A_{1}$ of $\omega$ and $B C$ lies on segment $C X$. Surely, $\angle Y Z A \leq 180^{\circ}-\angle Y Z X=120^{\circ}$, hence points $I$ and $Y$ lie on one side of the perpendicular bisector to $X Y$; therefore $I X>I Y$. Moreover, $\omega$ intersects segment $X Y$ at two points, and therefore the projection $M$ of $I$ onto $X Y$ lies on the segment $X Y$. In this case, we will prove that $\angle C>120^{\circ}$.  Let $Y K, Y L$ be two tangents from point $Y$ to $\omega$ (points $K$ and $A_{1}$ lie on one side of $X Y$; if $Y$ lies on $\omega$, we say $K=L=Y$ ); one of the points $K$ and $L$ is in fact a tangency point $B_{1}$ of $\omega$ and $A C$. From symmetry, we have $\angle Y I K=\angle Y I L$. On the other hand, since $I X>I Y$, we get $X M<X Y$ which implies $\angle A_{1} X Y<\angle K Y X$.  Next, we have $\angle M I Y=90^{\circ}-\angle I Y X<90^{\circ}-\angle Z Y X=30^{\circ}$. Since $I A_{1} \perp A_{1} X, I M \perp X Y$, $I K \perp Y K$ we get $\angle M I A_{1}=\angle A_{1} X Y<\angle K Y X=\angle M I K$. Finally, we get  $$ \begin{aligned} \angle A_{1} I K<\angle A_{1} I L=( & \left.\angle A_{1} I M+\angle M I K\right)+(\angle K I Y+\angle Y I L) \\ & <2 \angle M I K+2 \angle K I Y=2 \angle M I Y<60^{\circ} . \end{aligned} $$  Hence, $\angle A_{1} I B_{1}<60^{\circ}$, and therefore $\angle A C B=180^{\circ}-\angle A_{1} I B_{1}>120^{\circ}$, as desired. ![](https://cdn.mathpix.com/cropped/2024_11_18_ba86565be3364967ae6fg-59.jpg?height=366&width=715&top_left_y=408&top_left_x=271)  Fig. 5 ![](https://cdn.mathpix.com/cropped/2024_11_18_ba86565be3364967ae6fg-59.jpg?height=515&width=869&top_left_y=276&top_left_x=982)  Fig. 6  Comment 1. The estimate claimed in $\mathrm{G}^{\prime}$ is sharp. Actually, if $\angle B A C>120^{\circ}$, one can consider an equilateral triangle $X Y Z$ with $Z=A, Y \in A C, X \in B C$ (such triangle exists since $\angle A C B<60^{\circ}$ ). It intersects with the angle bisector of $\angle B A C$ only at point $A$, hence it does not contain $I$.  Comment 2. As in the previous solution, there is a generalization for an arbitrary triangle $X Y Z$, but here we need some additional condition. The statement reads as follows. Claim. Let the vertices $X, Y, Z$ of a triangle $X Y Z$ lie respectively on the sides $B C, C A, A B$ of a triangle $A B C$. Suppose that the incenter of triangle $A B C$ lies outside triangle $X Y Z, \alpha$ is the least angle of $\triangle X Y Z$, and all sides of triangle $X Y Z$ are greater than $2 r \cot \alpha$, where $r$ is the inradius of $\triangle A B C$. Then one of the angles of triangle $A B C$ is greater than $2 \alpha$.  The additional condition is needed to verify that $X M>Y M$ since it cannot be shown in the original way. Actually, we have $\angle M Y I>\alpha, I M<r$, hence $Y M<r \cot \alpha$. Now, if we have $X Y=X M+Y M>2 r \cot \alpha$, then surely $X M>Y M$.  On the other hand, this additional condition follows easily from the conditions of the original problem. Actually, if $I \in \triangle A Y Z$, then the diameter of $\omega$ parallel to $Y Z$ is contained in $\triangle A Y Z$ and is thus shorter than $Y Z$. Hence $Y Z>2 r>2 r \cot 60^{\circ}$.


Three circular arcs $\gamma_{1}, \gamma_{2}$, and $\gamma_{3}$ connect the points $A$ and $C$. These arcs lie in the same half-plane defined by line $A C$ in such a way that arc $\gamma_{2}$ lies between the arcs $\gamma_{1}$ and $\gamma_{3}$. Point $B$ lies on the segment $A C$. Let $h_{1}, h_{2}$, and $h_{3}$ be three rays starting at $B$, lying in the same half-plane, $h_{2}$ being between $h_{1}$ and $h_{3}$. For $i, j=1,2,3$, denote by $V_{i j}$ the point of intersection of $h_{i}$ and $\gamma_{j}$ (see the Figure below).  Denote by $\widehat{V_{i j} V_{k j}} \widehat{V_{k \ell} V_{i \ell}}$ the curved quadrilateral, whose sides are the segments $V_{i j} V_{i \ell}, V_{k j} V_{k \ell}$ and $\operatorname{arcs} V_{i j} V_{k j}$ and $V_{i \ell} V_{k \ell}$. We say that this quadrilateral is circumscribed if there exists a circle touching these two segments and two arcs.  Prove that if the curved quadrilaterals $\sqrt{V_{11} V_{21}} \sqrt{22} V_{12}, \sqrt{V_{12} V_{22}} \sqrt{23} V_{13}, \sqrt{V_{21} V_{31}} \sqrt{V_{32} V_{22}}$ are circumscribed, then the curved quadrilateral $\sqrt{V_{22} V_{32}} \sqrt{33} V_{23}$ is circumscribed, too. ![](https://cdn.mathpix.com/cropped/2024_11_18_ba86565be3364967ae6fg-61.jpg?height=495&width=815&top_left_y=798&top_left_x=655)  Fig. 1 (Hungary)

Solution: Denote by $O_{i}$ and $R_{i}$ the center and the radius of $\gamma_{i}$, respectively. Denote also by $H$ the half-plane defined by $A C$ which contains the whole configuration. For every point $P$ in the half-plane $H$, denote by $d(P)$ the distance between $P$ and line $A C$. Furthermore, for any $r>0$, denote by $\Omega(P, r)$ the circle with center $P$ and radius $r$. Lemma 1. For every $1 \leq i<j \leq 3$, consider those circles $\Omega(P, r)$ in the half-plane $H$ which are tangent to $h_{i}$ and $h_{j}$. (a) The locus of the centers of these circles is the angle bisector $\beta_{i j}$ between $h_{i}$ and $h_{j}$. (b) There is a constant $u_{i j}$ such that $r=u_{i j} \cdot d(P)$ for all such circles.  Proof. Part (a) is obvious. To prove part (b), notice that the circles which are tangent to $h_{i}$ and $h_{j}$ are homothetic with the common homothety center $B$ (see Fig. 2). Then part (b) also becomes trivial. Lemma 2. For every $1 \leq i<j \leq 3$, consider those circles $\Omega(P, r)$ in the half-plane $H$ which are externally tangent to $\gamma_{i}$ and internally tangent to $\gamma_{j}$. (a) The locus of the centers of these circles is an ellipse $\operatorname{arc} \varepsilon_{i j}$ with end-points $A$ and $C$. (b) There is a constant $v_{i j}$ such that $r=v_{i j} \cdot d(P)$ for all such circles.  Proof. (a) Notice that the circle $\Omega(P, r)$ is externally tangent to $\gamma_{i}$ and internally tangent to $\gamma_{j}$ if and only if $O_{i} P=R_{i}+r$ and $O_{j}=R_{j}-r$. Therefore, for each such circle we have  $$ O_{i} P+O_{j} P=O_{i} A+O_{j} A=O_{i} C+O_{j} C=R_{i}+R_{j} $$  Such points lie on an ellipse with foci $O_{i}$ and $O_{j}$; the diameter of this ellipse is $R_{i}+R_{j}$, and it passes through the points $A$ and $C$. Let $\varepsilon_{i j}$ be that arc $A C$ of the ellipse which runs inside the half plane $H$ (see Fig. 3.)  This ellipse arc lies between the arcs $\gamma_{i}$ and $\gamma_{j}$. Therefore, if some point $P$ lies on $\varepsilon_{i j}$, then $O_{i} P>R_{i}$ and $O_{j} P<R_{j}$. Now, we choose $r=O_{i} P-R_{i}=R_{j}-O_{j} P>0$; then the ![](https://cdn.mathpix.com/cropped/2024_11_18_ba86565be3364967ae6fg-62.jpg?height=787&width=1338&top_left_y=269&top_left_x=336) circle $\Omega(P, r)$ touches $\gamma_{i}$ externally and touches $\gamma_{j}$ internally, so $P$ belongs to the locus under investigation. (b) Let $\vec{\rho}=\overrightarrow{A P}, \vec{\rho}_{i}=\overrightarrow{A O_{i}}$, and $\vec{\rho}_{j}=\overrightarrow{A O_{j}}$; let $d_{i j}=O_{i} O_{j}$, and let $\vec{v}$ be a unit vector orthogonal to $A C$ and directed toward $H$. Then we have $\left|\vec{\rho}_{i}\right|=R_{i},\left|\vec{\rho}_{j}\right|=R_{j},\left|\overrightarrow{O_{i} P}\right|=$ $\left|\vec{\rho}-\vec{\rho}_{i}\right|=R_{i}+r,\left|\overrightarrow{O_{j} P}\right|=\left|\vec{\rho}-\vec{\rho}_{j}\right|=R_{j}-r$, hence  $$ \begin{gathered} \left(\vec{\rho}-\vec{\rho}_{i}\right)^{2}-\left(\vec{\rho}-\vec{\rho}_{j}\right)^{2}=\left(R_{i}+r\right)^{2}-\left(R_{j}-r\right)^{2}, \\ \left(\vec{\rho}_{i}^{2}-\vec{\rho}_{j}^{2}\right)+2 \vec{\rho} \cdot\left(\vec{\rho}_{j}-\vec{\rho}_{i}\right)=\left(R_{i}^{2}-R_{j}^{2}\right)+2 r\left(R_{i}+R_{j}\right), \\ d_{i j} \cdot d(P)=d_{i j} \vec{v} \cdot \vec{\rho}=\left(\vec{\rho}_{j}-\vec{\rho}_{i}\right) \cdot \vec{\rho}=r\left(R_{i}+R_{j}\right) . \end{gathered} $$  Therefore,  $$ r=\frac{d_{i j}}{R_{i}+R_{j}} \cdot d(P) $$  and the value $v_{i j}=\frac{d_{i j}}{R_{i}+R_{j}}$ does not depend on $P$. Lemma 3. The curved quadrilateral $\mathcal{Q}_{i j}=\sqrt{i, j V_{i+1, j}} V_{i+1, j+1} V_{i, j+1}$ is circumscribed if and only if $u_{i, i+1}=v_{j, j+1}$. Proof. First suppose that the curved quadrilateral $\mathcal{Q}_{i j}$ is circumscribed and $\Omega(P, r)$ is its inscribed circle. By Lemma 1 and Lemma 2 we have $r=u_{i, i+1} \cdot d(P)$ and $r=v_{j, j+1} \cdot d(P)$ as well. Hence, $u_{i, i+1}=v_{j, j+1}$.  To prove the opposite direction, suppose $u_{i, i+1}=v_{j, j+1}$. Let $P$ be the intersection of the angle bisector $\beta_{i, i+1}$ and the ellipse arc $\varepsilon_{j, j+1}$. Choose $r=u_{i, i+1} \cdot d(P)=v_{j, j+1} \cdot d(P)$. Then the circle $\Omega(P, r)$ is tangent to the half lines $h_{i}$ and $h_{i+1}$ by Lemma 1 , and it is tangent to the $\operatorname{arcs} \gamma_{j}$ and $\gamma_{j+1}$ by Lemma 2. Hence, the curved quadrilateral $\mathcal{Q}_{i j}$ is circumscribed.  By Lemma 3, the statement of the problem can be reformulated to an obvious fact: If the equalities $u_{12}=v_{12}, u_{12}=v_{23}$, and $u_{23}=v_{12}$ hold, then $u_{23}=v_{23}$ holds as well.  Comment 1. Lemma 2(b) (together with the easy Lemma 1(b)) is the key tool in this solution. If one finds this fact, then the solution can be finished in many ways. That is, one can find a circle touching three of $h_{2}, h_{3}, \gamma_{2}$, and $\gamma_{3}$, and then prove that it is tangent to the fourth one in either synthetic or analytical way. Both approaches can be successful.  Here we present some discussion about this key Lemma.  1. In the solution above we chose an analytic proof for Lemma 2(b) because we expect that most students will use coordinates or vectors to examine the locus of the centers, and these approaches are less case-sensitive.  Here we outline a synthetic proof. We consider only the case when $P$ does not lie in the line $O_{i} O_{j}$. The other case can be obtained as a limit case, or computed in a direct way.  Let $S$ be the internal homothety center between the circles of $\gamma_{i}$ and $\gamma_{j}$, lying on $O_{i} O_{j}$; this point does not depend on $P$. Let $U$ and $V$ be the points of tangency of circle $\sigma=\Omega(P, r)$ with $\gamma_{i}$ and $\gamma_{j}$, respectively (then $r=P U=P V$ ); in other words, points $U$ and $V$ are the intersection points of rays $O_{i} P, O_{j} P$ with arcs $\gamma_{i}, \gamma_{j}$ respectively (see Fig. 4).  Due to the theorem on three homothety centers (or just to the Menelaus theorem applied to triangle $O_{i} O_{j} P$ ), the points $U, V$ and $S$ are collinear. Let $T$ be the intersection point of line $A C$ and the common tangent to $\sigma$ and $\gamma_{i}$ at $U$; then $T$ is the radical center of $\sigma, \gamma_{i}$ and $\gamma_{j}$, hence $T V$ is the common tangent to $\sigma$ and $\gamma_{j}$.  Let $Q$ be the projection of $P$ onto the line $A C$. By the right angles, the points $U, V$ and $Q$ lie on the circle with diameter $P T$. From this fact and the equality $P U=P V$ we get $\angle U Q P=\angle U V P=$ $\angle V U P=\angle S U O_{i}$. Since $O_{i} S \| P Q$, we have $\angle S O_{i} U=\angle Q P U$. Hence, the triangles $S O_{i} U$ and $U P Q$ are similar and thus $\frac{r}{d(P)}=\frac{P U}{P Q}=\frac{O_{i} S}{O_{i} U}=\frac{O_{i} S}{R_{i}}$; the last expression is constant since $S$ is a constant point. ![](https://cdn.mathpix.com/cropped/2024_11_18_ba86565be3364967ae6fg-63.jpg?height=595&width=797&top_left_y=1570&top_left_x=361)  Fig. 4 ![](https://cdn.mathpix.com/cropped/2024_11_18_ba86565be3364967ae6fg-63.jpg?height=647&width=546&top_left_y=1524&top_left_x=1212)  Fig. 5 2. Using some known facts about conics, the same statement can be proved in a very short way. Denote by $\ell$ the directrix of ellipse of $\varepsilon_{i j}$ related to the focus $O_{j}$; since $\varepsilon_{i j}$ is symmetrical about $O_{i} O_{j}$, we have $\ell \| A C$. Recall that for each point $P \in \varepsilon_{i j}$, we have $P O_{j}=\epsilon \cdot d_{\ell}(P)$, where $d_{\ell}(P)$ is the distance from $P$ to $\ell$, and $\epsilon$ is the eccentricity of $\varepsilon_{i j}$ (see Fig. 5).  Now we have  $$ r=R_{j}-\left(R_{j}-r\right)=A O_{j}-P O_{j}=\epsilon\left(d_{\ell}(A)-d_{\ell}(P)\right)=\epsilon(d(P)-d(A))=\epsilon \cdot d(P), $$  and $\epsilon$ does not depend on $P$.  Comment 2. One can find a spatial interpretations of the problem and the solution. For every point $(x, y)$ and radius $r>0$, represent the circle $\Omega((x, y), r)$ by the point $(x, y, r)$ in space. This point is the apex of the cone with base circle $\Omega((x, y), r)$ and height $r$. According to Lemma 1 , the circles which are tangent to $h_{i}$ and $h_{j}$ correspond to the points of a half line $\beta_{i j}^{\prime}$, starting at $B$.  Now we translate Lemma 2. Take some $1 \leq i<j \leq 3$, and consider those circles which are internally tangent to $\gamma_{j}$. It is easy to see that the locus of the points which represent these circles is a subset of a cone, containing $\gamma_{j}$. Similarly, the circles which are externally tangent to $\gamma_{i}$ correspond to the points on the extension of another cone, which has its apex on the opposite side of the base plane $\Pi$. (See Fig. 6; for this illustration, the $z$-coordinates were multiplied by 2.)  The two cones are symmetric to each other (they have the same aperture, and their axes are parallel). As is well-known, it follows that the common points of the two cones are co-planar. So the intersection of the two cones is a a conic section - which is an ellipse, according to Lemma 2(a). The points which represent the circles touching $\gamma_{i}$ and $\gamma_{j}$ is an ellipse arc $\varepsilon_{i j}^{\prime}$ with end-points $A$ and $C$. ![](https://cdn.mathpix.com/cropped/2024_11_18_ba86565be3364967ae6fg-64.jpg?height=532&width=811&top_left_y=968&top_left_x=177)  Fig. 6 ![](https://cdn.mathpix.com/cropped/2024_11_18_ba86565be3364967ae6fg-64.jpg?height=507&width=825&top_left_y=997&top_left_x=1004)  Fig. 7  Thus, the curved quadrilateral $\mathcal{Q}_{i j}$ is circumscribed if and only if $\beta_{i, i+1}^{\prime}$ and $\varepsilon_{j, j+1}^{\prime}$ intersect, i.e. if they are coplanar. If three of the four curved quadrilaterals are circumscribed, it means that $\varepsilon_{12}^{\prime}, \varepsilon_{23}^{\prime}$, $\beta_{12}^{\prime}$ and $\beta_{23}^{\prime}$ lie in the same plane $\Sigma$, and the fourth intersection comes to existence, too (see Fig. 7). ![](https://cdn.mathpix.com/cropped/2024_11_18_ba86565be3364967ae6fg-64.jpg?height=529&width=1303&top_left_y=1946&top_left_x=351)  A connection between mathematics and real life: the Palace of Creativity "Shabyt" ("Inspiration") in Astana


Find the least positive integer $n$ for which there exists a set $\left\{s_{1}, s_{2}, \ldots, s_{n}\right\}$ consisting of $n$ distinct positive integers such that  $$ \left(1-\frac{1}{s_{1}}\right)\left(1-\frac{1}{s_{2}}\right) \ldots\left(1-\frac{1}{s_{n}}\right)=\frac{51}{2010} $$  $\mathbf{N} 1^{\prime}$. Same as Problem N1, but the constant $\frac{51}{2010}$ is replaced by $\frac{42}{2010}$. (Canada) Answer for Problem N1. $n=39$. Solution for Problem N1. Suppose that for some $n$ there exist the desired numbers; we may assume that $s_{1}<s_{2}<\cdots<s_{n}$. Surely $s_{1}>1$ since otherwise $1-\frac{1}{s_{1}}=0$. So we have $2 \leq s_{1} \leq s_{2}-1 \leq \cdots \leq s_{n}-(n-1)$, hence $s_{i} \geq i+1$ for each $i=1, \ldots, n$. Therefore  $$ \begin{aligned} \frac{51}{2010} & =\left(1-\frac{1}{s_{1}}\right)\left(1-\frac{1}{s_{2}}\right) \ldots\left(1-\frac{1}{s_{n}}\right) \\ & \geq\left(1-\frac{1}{2}\right)\left(1-\frac{1}{3}\right) \ldots\left(1-\frac{1}{n+1}\right)=\frac{1}{2} \cdot \frac{2}{3} \cdots \frac{n}{n+1}=\frac{1}{n+1} \end{aligned} $$  which implies  $$ n+1 \geq \frac{2010}{51}=\frac{670}{17}>39 $$  so $n \geq 39$. Now we are left to show that $n=39$ fits. Consider the set $\{2,3, \ldots, 33,35,36, \ldots, 40,67\}$ which contains exactly 39 numbers. We have  $$ \frac{1}{2} \cdot \frac{2}{3} \cdots \frac{32}{33} \cdot \frac{34}{35} \cdots \frac{39}{40} \cdot \frac{66}{67}=\frac{1}{33} \cdot \frac{34}{40} \cdot \frac{66}{67}=\frac{17}{670}=\frac{51}{2010} $$  hence for $n=39$ there exists a desired example. Comment. One can show that the example (1) is unique. Answer for Problem N1' ${ }^{\prime} n=48$. Solution for Problem N1'. Suppose that for some $n$ there exist the desired numbers. In the same way we obtain that $s_{i} \geq i+1$. Moreover, since the denominator of the fraction $\frac{42}{2010}=\frac{7}{335}$ is divisible by 67 , some of $s_{i}$ 's should be divisible by 67 , so $s_{n} \geq s_{i} \geq 67$. This means that  $$ \frac{42}{2010} \geq \frac{1}{2} \cdot \frac{2}{3} \cdots \frac{n-1}{n} \cdot\left(1-\frac{1}{67}\right)=\frac{66}{67 n} $$  which implies  $$ n \geq \frac{2010 \cdot 66}{42 \cdot 67}=\frac{330}{7}>47 $$  so $n \geq 48$. Now we are left to show that $n=48$ fits. Consider the set $\{2,3, \ldots, 33,36,37, \ldots, 50,67\}$ which contains exactly 48 numbers. We have  $$ \frac{1}{2} \cdot \frac{2}{3} \cdots \frac{32}{33} \cdot \frac{35}{36} \cdots \frac{49}{50} \cdot \frac{66}{67}=\frac{1}{33} \cdot \frac{35}{50} \cdot \frac{66}{67}=\frac{7}{335}=\frac{42}{2010} $$  hence for $n=48$ there exists a desired example. Comment 1. In this version of the problem, the estimate needs one more step, hence it is a bit harder. On the other hand, the example in this version is not unique. Another example is  $$ \frac{1}{2} \cdot \frac{2}{3} \cdots \frac{46}{47} \cdot \frac{66}{67} \cdot \frac{329}{330}=\frac{1}{67} \cdot \frac{66}{330} \cdot \frac{329}{47}=\frac{7}{67 \cdot 5}=\frac{42}{2010} . $$  Comment 2. N1' was the Proposer's formulation of the problem. We propose N1 according to the number of current IMO.


Find all pairs $(m, n)$ of nonnegative integers for which  $$ m^{2}+2 \cdot 3^{n}=m\left(2^{n+1}-1\right) $$  (Australia) Answer. $(6,3),(9,3),(9,5),(54,5)$.

Solution: For fixed values of $n$, the equation (1) is a simple quadratic equation in $m$. For $n \leq 5$ the solutions are listed in the following table.  | case | equation | discriminant | integer roots | | :--- | :--- | :--- | :--- | | $n=0$ | $m^{2}-m+2=0$ | -7 | none | | $n=1$ | $m^{2}-3 m+6=0$ | -15 | none | | $n=2$ | $m^{2}-7 m+18=0$ | -23 | none | | $n=3$ | $m^{2}-15 m+54=0$ | 9 | $m=6$ and $m=9$ | | $n=4$ | $m^{2}-31 m+162=0$ | 313 | none | | $n=5$ | $m^{2}-63 m+486=0$ | $2025=45^{2}$ | $m=9$ and $m=54$ |  We prove that there is no solution for $n \geq 6$. Suppose that $(m, n)$ satisfies (1) and $n \geq 6$. Since $m \mid 2 \cdot 3^{n}=m\left(2^{n+1}-1\right)-m^{2}$, we have $m=3^{p}$ with some $0 \leq p \leq n$ or $m=2 \cdot 3^{q}$ with some $0 \leq q \leq n$.  In the first case, let $q=n-p$; then  $$ 2^{n+1}-1=m+\frac{2 \cdot 3^{n}}{m}=3^{p}+2 \cdot 3^{q} $$  In the second case let $p=n-q$. Then  $$ 2^{n+1}-1=m+\frac{2 \cdot 3^{n}}{m}=2 \cdot 3^{q}+3^{p} $$  Hence, in both cases we need to find the nonnegative integer solutions of  $$ 3^{p}+2 \cdot 3^{q}=2^{n+1}-1, \quad p+q=n $$  Next, we prove bounds for $p, q$. From (2) we get  $$ 3^{p}<2^{n+1}=8^{\frac{n+1}{3}}<9^{\frac{n+1}{3}}=3^{\frac{2(n+1)}{3}} $$  and  $$ 2 \cdot 3^{q}<2^{n+1}=2 \cdot 8^{\frac{n}{3}}<2 \cdot 9^{\frac{n}{3}}=2 \cdot 3^{\frac{2 n}{3}}<2 \cdot 3^{\frac{2(n+1)}{3}} $$  so $p, q<\frac{2(n+1)}{3}$. Combining these inequalities with $p+q=n$, we obtain  $$ \frac{n-2}{3}<p, q<\frac{2(n+1)}{3} $$  Now let $h=\min (p, q)$. By (3) we have $h>\frac{n-2}{3}$; in particular, we have $h>1$. On the left-hand side of (2), both terms are divisible by $3^{h}$, therefore $9\left|3^{h}\right| 2^{n+1}-1$. It is easy check that $\operatorname{ord}_{9}(2)=6$, so $9 \mid 2^{n+1}-1$ if and only if $6 \mid n+1$. Therefore, $n+1=6 r$ for some positive integer $r$, and we can write  $$ 2^{n+1}-1=4^{3 r}-1=\left(4^{2 r}+4^{r}+1\right)\left(2^{r}-1\right)\left(2^{r}+1\right) $$  Notice that the factor $4^{2 r}+4^{r}+1=\left(4^{r}-1\right)^{2}+3 \cdot 4^{r}$ is divisible by 3 , but it is never divisible by 9 . The other two factors in (4), $2^{r}-1$ and $2^{r}+1$ are coprime: both are odd and their difference is 2 . Since the whole product is divisible by $3^{h}$, we have either $3^{h-1} \mid 2^{r}-1$ or $3^{h-1} \mid 2^{r}+1$. In any case, we have $3^{h-1} \leq 2^{r}+1$. Then  $$ \begin{gathered} 3^{h-1} \leq 2^{r}+1 \leq 3^{r}=3^{\frac{n+1}{6}} \\ \frac{n-2}{3}-1<h-1 \leq \frac{n+1}{6} \\ n<11 \end{gathered} $$  But this is impossible since we assumed $n \geq 6$, and we proved $6 \mid n+1$.


Find the smallest number $n$ such that there exist polynomials $f_{1}, f_{2}, \ldots, f_{n}$ with rational coefficients satisfying  $$ x^{2}+7=f_{1}(x)^{2}+f_{2}(x)^{2}+\cdots+f_{n}(x)^{2} . $$  (Poland) Answer. The smallest $n$ is 5 .

Solution: The equality $x^{2}+7=x^{2}+2^{2}+1^{2}+1^{2}+1^{2}$ shows that $n \leq 5$. It remains to show that $x^{2}+7$ is not a sum of four (or less) squares of polynomials with rational coefficients.  Suppose by way of contradiction that $x^{2}+7=f_{1}(x)^{2}+f_{2}(x)^{2}+f_{3}(x)^{2}+f_{4}(x)^{2}$, where the coefficients of polynomials $f_{1}, f_{2}, f_{3}$ and $f_{4}$ are rational (some of these polynomials may be zero).  Clearly, the degrees of $f_{1}, f_{2}, f_{3}$ and $f_{4}$ are at most 1 . Thus $f_{i}(x)=a_{i} x+b_{i}$ for $i=1,2,3,4$ and some rationals $a_{1}, b_{1}, a_{2}, b_{2}, a_{3}, b_{3}, a_{4}, b_{4}$. It follows that $x^{2}+7=\sum_{i=1}^{4}\left(a_{i} x+b_{i}\right)^{2}$ and hence  $$ \sum_{i=1}^{4} a_{i}^{2}=1, \quad \sum_{i=1}^{4} a_{i} b_{i}=0, \quad \sum_{i=1}^{4} b_{i}^{2}=7 $$  Let $p_{i}=a_{i}+b_{i}$ and $q_{i}=a_{i}-b_{i}$ for $i=1,2,3,4$. Then  $$ \begin{aligned} \sum_{i=1}^{4} p_{i}^{2} & =\sum_{i=1}^{4} a_{i}^{2}+2 \sum_{i=1}^{4} a_{i} b_{i}+\sum_{i=1}^{4} b_{i}^{2}=8 \\ \sum_{i=1}^{4} q_{i}^{2} & =\sum_{i=1}^{4} a_{i}^{2}-2 \sum_{i=1}^{4} a_{i} b_{i}+\sum_{i=1}^{4} b_{i}^{2}=8 \\ \text { and } \quad \sum_{i=1}^{4} p_{i} q_{i} & =\sum_{i=1}^{4} a_{i}^{2}-\sum_{i=1}^{4} b_{i}^{2}=-6 \end{aligned} $$  which means that there exist a solution in integers $x_{1}, y_{1}, x_{2}, y_{2}, x_{3}, y_{3}, x_{4}, y_{4}$ and $m>0$ of the system of equations (i) $\sum_{i=1}^{4} x_{i}^{2}=8 m^{2}$, (ii) $\sum_{i=1}^{4} y_{i}^{2}=8 m^{2}$, (iii) $\sum_{i=1}^{4} x_{i} y_{i}=-6 m^{2}$.  We will show that such a solution does not exist. Assume the contrary and consider a solution with minimal $m$. Note that if an integer $x$ is odd then $x^{2} \equiv 1(\bmod 8)$. Otherwise (i.e., if $x$ is even) we have $x^{2} \equiv 0(\bmod 8)$ or $x^{2} \equiv 4$ $(\bmod 8)$. Hence, by (i), we get that $x_{1}, x_{2}, x_{3}$ and $x_{4}$ are even. Similarly, by (ii), we get that $y_{1}, y_{2}, y_{3}$ and $y_{4}$ are even. Thus the LHS of (iii) is divisible by 4 and $m$ is also even. It follows that $\left(\frac{x_{1}}{2}, \frac{y_{1}}{2}, \frac{x_{2}}{2}, \frac{y_{2}}{2}, \frac{x_{3}}{2}, \frac{y_{3}}{2}, \frac{x_{4}}{2}, \frac{y_{4}}{2}, \frac{m}{2}\right)$ is a solution of the system of equations (i), (ii) and (iii), which contradicts the minimality of $m$.


Solution: We prove that $n \leq 4$ is impossible. Define the numbers $a_{i}, b_{i}$ for $i=1,2,3,4$ as in the previous solution.  By Euler's identity we have  $$ \begin{aligned} \left(a_{1}^{2}+a_{2}^{2}+a_{3}^{2}+a_{4}^{2}\right)\left(b_{1}^{2}+b_{2}^{2}+b_{3}^{2}+b_{4}^{2}\right) & =\left(a_{1} b_{1}+a_{2} b_{2}+a_{3} b_{3}+a_{4} b_{4}\right)^{2}+\left(a_{1} b_{2}-a_{2} b_{1}+a_{3} b_{4}-a_{4} b_{3}\right)^{2} \\ & +\left(a_{1} b_{3}-a_{3} b_{1}+a_{4} b_{2}-a_{2} b_{4}\right)^{2}+\left(a_{1} b_{4}-a_{4} b_{1}+a_{2} b_{3}-a_{3} b_{2}\right)^{2} . \end{aligned} $$  So, using the relations (1) from the Solution 1 we get that  $$ 7=\left(\frac{m_{1}}{m}\right)^{2}+\left(\frac{m_{2}}{m}\right)^{2}+\left(\frac{m_{3}}{m}\right)^{2} $$  where  $$ \begin{aligned} & \frac{m_{1}}{m}=a_{1} b_{2}-a_{2} b_{1}+a_{3} b_{4}-a_{4} b_{3} \\ & \frac{m_{2}}{m}=a_{1} b_{3}-a_{3} b_{1}+a_{4} b_{2}-a_{2} b_{4} \\ & \frac{m_{3}}{m}=a_{1} b_{4}-a_{4} b_{1}+a_{2} b_{3}-a_{3} b_{2} \end{aligned} $$  and $m_{1}, m_{2}, m_{3} \in \mathbb{Z}, m \in \mathbb{N}$. Let $m$ be a minimum positive integer number for which (2) holds. Then  $$ 8 m^{2}=m_{1}^{2}+m_{2}^{2}+m_{3}^{2}+m^{2} $$  As in the previous solution, we get that $m_{1}, m_{2}, m_{3}, m$ are all even numbers. Then $\left(\frac{m_{1}}{2}, \frac{m_{2}}{2}, \frac{m_{3}}{2}, \frac{m}{2}\right)$ is also a solution of ( 2 ) which contradicts the minimality of $m$. So, we have $n \geq 5$. The example with $n=5$ is already shown in Solution 1 .


Let $a, b$ be integers, and let $P(x)=a x^{3}+b x$. For any positive integer $n$ we say that the pair $(a, b)$ is $n$-good if $n \mid P(m)-P(k)$ implies $n \mid m-k$ for all integers $m, k$. We say that $(a, b)$ is very good if $(a, b)$ is $n$-good for infinitely many positive integers $n$. (a) Find a pair $(a, b)$ which is 51 -good, but not very good. (b) Show that all 2010-good pairs are very good. (Turkey)

Solution: (a) We show that the pair $\left(1,-51^{2}\right)$ is good but not very good. Let $P(x)=x^{3}-51^{2} x$. Since $P(51)=P(0)$, the pair $\left(1,-51^{2}\right)$ is not $n$-good for any positive integer that does not divide 51 . Therefore, $\left(1,-51^{2}\right)$ is not very good.  On the other hand, if $P(m) \equiv P(k)(\bmod 51)$, then $m^{3} \equiv k^{3}(\bmod 51)$. By Fermat's theorem, from this we obtain  $$ m \equiv m^{3} \equiv k^{3} \equiv k \quad(\bmod 3) \quad \text { and } \quad m \equiv m^{33} \equiv k^{33} \equiv k \quad(\bmod 17) . $$  Hence we have $m \equiv k(\bmod 51)$. Therefore $\left(1,-51^{2}\right)$ is 51 -good. (b) We will show that if a pair $(a, b)$ is 2010-good then $(a, b)$ is $67^{i}$-good for all positive integer $i$. Claim 1. If $(a, b)$ is 2010 -good then $(a, b)$ is 67 -good. Proof. Assume that $P(m)=P(k)(\bmod 67)$. Since 67 and 30 are coprime, there exist integers $m^{\prime}$ and $k^{\prime}$ such that $k^{\prime} \equiv k(\bmod 67), k^{\prime} \equiv 0(\bmod 30)$, and $m^{\prime} \equiv m(\bmod 67), m^{\prime} \equiv 0$ $(\bmod 30)$. Then we have $P\left(m^{\prime}\right) \equiv P(0) \equiv P\left(k^{\prime}\right)(\bmod 30)$ and $P\left(m^{\prime}\right) \equiv P(m) \equiv P(k) \equiv P\left(k^{\prime}\right)$ $(\bmod 67)$, hence $P\left(m^{\prime}\right) \equiv P\left(k^{\prime}\right)(\bmod 2010)$. This implies $m^{\prime} \equiv k^{\prime}(\bmod 2010)$ as $(a, b)$ is 2010 -good. It follows that $m \equiv m^{\prime} \equiv k^{\prime} \equiv k(\bmod 67)$. Therefore, $(a, b)$ is 67 -good. Claim 2. If $(a, b)$ is 67 -good then $67 \mid a$. Proof. Suppose that $67 \nmid a$. Consider the sets $\left\{a t^{2}(\bmod 67): 0 \leq t \leq 33\right\}$ and $\left\{-3 a s^{2}-b\right.$ $\bmod 67: 0 \leq s \leq 33\}$. Since $a \not \equiv 0(\bmod 67)$, each of these sets has 34 elements. Hence they have at least one element in common. If $a t^{2} \equiv-3 a s^{2}-b(\bmod 67)$ then for $m=t \pm s, k=\mp 2 s$ we have  $$ \begin{aligned} P(m)-P(k)=a\left(m^{3}-k^{3}\right)+b(m-k) & =(m-k)\left(a\left(m^{2}+m k+k^{2}\right)+b\right) \\ & =(t \pm 3 s)\left(a t^{2}+3 a s^{2}+b\right) \equiv 0 \quad(\bmod 67) \end{aligned} $$  Since $(a, b)$ is 67 -good, we must have $m \equiv k(\bmod 67)$ in both cases, that is, $t \equiv 3 s(\bmod 67)$ and $t \equiv-3 s(\bmod 67)$. This means $t \equiv s \equiv 0(\bmod 67)$ and $b \equiv-3 a s^{2}-a t^{2} \equiv 0(\bmod 67)$. But then $67 \mid P(7)-P(2)=67 \cdot 5 a+5 b$ and $67 \not 7-2$, contradicting that $(a, b)$ is 67 -good. Claim 3. If $(a, b)$ is 2010 -good then $(a, b)$ is $67^{i}$-good all $i \geq 1$. Proof. By Claim 2, we have $67 \mid a$. If $67 \mid b$, then $P(x) \equiv P(0)(\bmod 67)$ for all $x$, contradicting that $(a, b)$ is 67 -good. Hence, $67 \nmid b$.  Suppose that $67^{i} \mid P(m)-P(k)=(m-k)\left(a\left(m^{2}+m k+k^{2}\right)+b\right)$. Since $67 \mid a$ and $67 \nmid b$, the second factor $a\left(m^{2}+m k+k^{2}\right)+b$ is coprime to 67 and hence $67^{i} \mid m-k$. Therefore, $(a, b)$ is $67^{i}$-good. Comment 1. In the proof of Claim 2, the following reasoning can also be used. Since 3 is not a quadratic residue modulo 67 , either $a u^{2} \equiv-b(\bmod 67)$ or $3 a v^{2} \equiv-b(\bmod 67)$ has a solution. The settings $(m, k)=(u, 0)$ in the first case and $(m, k)=(v,-2 v)$ in the second case lead to $b \equiv 0$ $(\bmod 67)$. Comment 2. The pair $(67,30)$ is $n$-good if and only if $n=d \cdot 67^{i}$, where $d \mid 30$ and $i \geq 0$. It shows that in part (b), one should deal with the large powers of 67 to reach the solution. The key property of number 67 is that it has the form $3 k+1$, so there exists a nontrivial cubic root of unity modulo 67 .


Let $\mathbb{N}$ be the set of all positive integers. Find all functions $f: \mathbb{N} \rightarrow \mathbb{N}$ such that the number $(f(m)+n)(m+f(n))$ is a square for all $m, n \in \mathbb{N}$.  Answer. All functions of the form $f(n)=n+c$, where $c \in \mathbb{N} \cup\{0\}$.

Solution: First, it is clear that all functions of the form $f(n)=n+c$ with a constant nonnegative integer $c$ satisfy the problem conditions since $(f(m)+n)(f(n)+m)=(n+m+c)^{2}$ is a square.  We are left to prove that there are no other functions. We start with the following Lemma. Suppose that $p \mid f(k)-f(\ell)$ for some prime $p$ and positive integers $k, \ell$. Then $p \mid k-\ell$. Proof. Suppose first that $p^{2} \mid f(k)-f(\ell)$, so $f(\ell)=f(k)+p^{2} a$ for some integer $a$. Take some positive integer $D>\max \{f(k), f(\ell)\}$ which is not divisible by $p$ and set $n=p D-f(k)$. Then the positive numbers $n+f(k)=p D$ and $n+f(\ell)=p D+(f(\ell)-f(k))=p(D+p a)$ are both divisible by $p$ but not by $p^{2}$. Now, applying the problem conditions, we get that both the numbers $(f(k)+n)(f(n)+k)$ and $(f(\ell)+n)(f(n)+\ell)$ are squares divisible by $p$ (and thus by $p^{2}$ ); this means that the multipliers $f(n)+k$ and $f(n)+\ell$ are also divisible by $p$, therefore $p \mid(f(n)+k)-(f(n)+\ell)=k-\ell$ as well.  On the other hand, if $f(k)-f(\ell)$ is divisible by $p$ but not by $p^{2}$, then choose the same number $D$ and set $n=p^{3} D-f(k)$. Then the positive numbers $f(k)+n=p^{3} D$ and $f(\ell)+n=$ $p^{3} D+(f(\ell)-f(k))$ are respectively divisible by $p^{3}$ (but not by $p^{4}$ ) and by $p$ (but not by $p^{2}$ ). Hence in analogous way we obtain that the numbers $f(n)+k$ and $f(n)+\ell$ are divisible by $p$, therefore $p \mid(f(n)+k)-(f(n)+\ell)=k-\ell$.  We turn to the problem. First, suppose that $f(k)=f(\ell)$ for some $k, \ell \in \mathbb{N}$. Then by Lemma we have that $k-\ell$ is divisible by every prime number, so $k-\ell=0$, or $k=\ell$. Therefore, the function $f$ is injective.  Next, consider the numbers $f(k)$ and $f(k+1)$. Since the number $(k+1)-k=1$ has no prime divisors, by Lemma the same holds for $f(k+1)-f(k)$; thus $|f(k+1)-f(k)|=1$.  Now, let $f(2)-f(1)=q,|q|=1$. Then we prove by induction that $f(n)=f(1)+q(n-1)$. The base for $n=1,2$ holds by the definition of $q$. For the step, if $n>1$ we have $f(n+1)=$ $f(n) \pm q=f(1)+q(n-1) \pm q$. Since $f(n) \neq f(n-2)=f(1)+q(n-2)$, we get $f(n)=f(1)+q n$, as desired.  Finally, we have $f(n)=f(1)+q(n-1)$. Then $q$ cannot be -1 since otherwise for $n \geq f(1)+1$ we have $f(n) \leq 0$ which is impossible. Hence $q=1$ and $f(n)=(f(1)-1)+n$ for each $n \in \mathbb{N}$, and $f(1)-1 \geq 0$, as desired.


The rows and columns of a $2^{n} \times 2^{n}$ table are numbered from 0 to $2^{n}-1$. The cells of the table have been colored with the following property being satisfied: for each $0 \leq i, j \leq 2^{n}-1$, the $j$ th cell in the $i$ th row and the $  Prove that the maximal possible number of colors is $2^{n}$.

Solution: Throughout the solution we denote the cells of the table by coordinate pairs; $(i, j)$ refers to the $j$ th cell in the $i$ th row.  Consider the directed graph, whose vertices are the cells of the board, and the edges are the arrows $(i, j) \rightarrow(j, i+j)$ for all $0 \leq i, j \leq 2^{n}-1$. From each vertex $(i, j)$, exactly one edge passes $\left(\right.$ to $\left(j, i+j \bmod 2^{n}\right)$ ); conversely, to each cell $(j, k)$ exactly one edge is directed (from the cell $\left.\left(k-j \bmod 2^{n}, j\right)\right)$. Hence, the graph splits into cycles.  Now, in any coloring considered, the vertices of each cycle should have the same color by the problem condition. On the other hand, if each cycle has its own color, the obtained coloring obviously satisfies the problem conditions. Thus, the maximal possible number of colors is the same as the number of cycles, and we have to prove that this number is $2^{n}$.  Next, consider any cycle $\left(i_{1}, j_{1}\right),\left(i_{2}, j_{2}\right), \ldots$; we will describe it in other terms. Define a sequence $\left(a_{0}, a_{1}, \ldots\right)$ by the relations $a_{0}=i_{1}, a_{1}=j_{1}, a_{n+1}=a_{n}+a_{n-1}$ for all $n \geq 1$ (we say that such a sequence is a Fibonacci-type sequence). Then an obvious induction shows that $i_{k} \equiv a_{k-1}\left(\bmod 2^{n}\right), j_{k} \equiv a_{k}\left(\bmod 2^{n}\right)$. Hence we need to investigate the behavior of Fibonacci-type sequences modulo $2^{n}$.  Denote by $F_{0}, F_{1}, \ldots$ the Fibonacci numbers defined by $F_{0}=0, F_{1}=1$, and $F_{n+2}=$ $F_{n+1}+F_{n}$ for $n \geq 0$. We also set $F_{-1}=1$ according to the recurrence relation.  For every positive integer $m$, denote by $\nu(m)$ the exponent of 2 in the prime factorization of $m$, i.e. for which $2^{\nu(m)} \mid m$ but $2^{\nu(m)+1} \backslash m$. Lemma 1. For every Fibonacci-type sequence $a_{0}, a_{1}, a_{2}, \ldots$, and every $k \geq 0$, we have $a_{k}=$ $F_{k-1} a_{0}+F_{k} a_{1}$. Proof. Apply induction on $k$. The base cases $k=0,1$ are trivial. For the step, from the induction hypothesis we get  $$ a_{k+1}=a_{k}+a_{k-1}=\left(F_{k-1} a_{0}+F_{k} a_{1}\right)+\left(F_{k-2} a_{0}+F_{k-1} a_{1}\right)=F_{k} a_{0}+F_{k+1} a_{1} $$  Lemma 2. For every $m \geq 3$, (a) we have $\nu\left(F_{3 \cdot 2^{m-2}}\right)=m$; (b) $d=3 \cdot 2^{m-2}$ is the least positive index for which $2^{m} \mid F_{d}$; (c) $F_{3 \cdot 2^{m-2}+1} \equiv 1+2^{m-1}\left(\bmod 2^{m}\right)$.  Proof. Apply induction on $m$. In the base case $m=3$ we have $\nu\left(F_{3 \cdot 2^{m-2}}\right)=F_{6}=8$, so $\nu\left(F_{3 \cdot 2^{m-2}}\right)=\nu(8)=3$, the preceding Fibonacci-numbers are not divisible by 8 , and indeed $F_{3 \cdot 2^{m-2}+1}=F_{7}=13 \equiv 1+4(\bmod 8)$.  Now suppose that $m>3$ and let $k=3 \cdot 2^{m-3}$. By applying Lemma 1 to the Fibonacci-type sequence $F_{k}, F_{k+1}, \ldots$ we get  $$ \begin{gathered} F_{2 k}=F_{k-1} F_{k}+F_{k} F_{k+1}=\left(F_{k+1}-F_{k}\right) F_{k}+F_{k+1} F_{k}=2 F_{k+1} F_{k}-F_{k}^{2} \\ F_{2 k+1}=F_{k} \cdot F_{k}+F_{k+1} \cdot F_{k+1}=F_{k}^{2}+F_{k+1}^{2} \end{gathered} $$  By the induction hypothesis, $\nu\left(F_{k}\right)=m-1$, and $F_{k+1}$ is odd. Therefore we get $\nu\left(F_{k}^{2}\right)=$ $2(m-1)>(m-1)+1=\nu\left(2 F_{k} F_{k+1}\right)$, which implies $\nu\left(F_{2 k}\right)=m$, establishing statement (a).  Moreover, since $F_{k+1}=1+2^{m-2}+a 2^{m-1}$ for some integer $a$, we get  $$ F_{2 k+1}=F_{k}^{2}+F_{k+1}^{2} \equiv 0+\left(1+2^{m-2}+a 2^{m-1}\right)^{2} \equiv 1+2^{m-1} \quad\left(\bmod 2^{m}\right) $$  as desired in statement (c). We are left to prove that $2^{m} \backslash F_{\ell}$ for $\ell<2 k$. Assume the contrary. Since $2^{m-1} \mid F_{\ell}$, from the induction hypothesis it follows that $\ell>k$. But then we have $F_{\ell}=F_{k-1} F_{\ell-k}+F_{k} F_{\ell-k+1}$, where the second summand is divisible by $2^{m-1}$ but the first one is not (since $F_{k-1}$ is odd and $\ell-k<k)$. Hence the sum is not divisible even by $2^{m-1}$. A contradiction.  Now, for every pair of integers $(a, b) \neq(0,0)$, let $\mu(a, b)=\min \{\nu(a), \nu(b)\}$. By an obvious induction, for every Fibonacci-type sequence $A=\left(a_{0}, a_{1}, \ldots\right)$ we have $\mu\left(a_{0}, a_{1}\right)=\mu\left(a_{1}, a_{2}\right)=\ldots$; denote this common value by $\mu(A)$. Also denote by $p_{n}(A)$ the period of this sequence modulo $2^{n}$, that is, the least $p>0$ such that $a_{k+p} \equiv a_{k}\left(\bmod 2^{n}\right)$ for all $k \geq 0$. Lemma 3. Let $A=\left(a_{0}, a_{1}, \ldots\right)$ be a Fibonacci-type sequence such that $\mu(A)=k<n$. Then $p_{n}(A)=3 \cdot 2^{n-1-k}$. Proof. First, we note that the sequence $\left(a_{0}, a_{1}, \ldots\right)$ has period $p$ modulo $2^{n}$ if and only if the sequence $\left(a_{0} / 2^{k}, a_{1} / 2^{k}, \ldots\right)$ has period $p$ modulo $2^{n-k}$. Hence, passing to this sequence we can assume that $k=0$.  We prove the statement by induction on $n$. It is easy to see that for $n=1,2$ the claim is true; actually, each Fibonacci-type sequence $A$ with $\mu(A)=0$ behaves as $0,1,1,0,1,1, \ldots$ modulo 2 , and as $0,1,1,2,3,1,0,1,1,2,3,1, \ldots$ modulo 4 (all pairs of residues from which at least one is odd appear as a pair of consecutive terms in this sequence).  Now suppose that $n \geq 3$ and consider an arbitrary Fibonacci-type sequence $A=\left(a_{0}, a_{1}, \ldots\right)$ with $\mu(A)=0$. Obviously we should have $p_{n-1}(A) \mid p_{n}(A)$, or, using the induction hypothesis, $s=3 \cdot 2^{n-2} \mid p_{n}(A)$. Next, we may suppose that $a_{0}$ is even; hence $a_{1}$ is odd, and $a_{0}=2 b_{0}$, $a_{1}=2 b_{1}+1$ for some integers $b_{0}, b_{1}$.  Consider the Fibonacci-type sequence $B=\left(b_{0}, b_{1}, \ldots\right)$ starting with $\left(b_{0}, b_{1}\right)$. Since $a_{0}=$ $2 b_{0}+F_{0}, a_{1}=2 b_{1}+F_{1}$, by an easy induction we get $a_{k}=2 b_{k}+F_{k}$ for all $k \geq 0$. By the induction hypothesis, we have $p_{n-1}(B) \mid s$, hence the sequence $\left(2 b_{0}, 2 b_{1}, \ldots\right)$ is $s$-periodic modulo $2^{n}$. On the other hand, by Lemma 2 we have $F_{s+1} \equiv 1+2^{n-1}\left(\bmod 2^{n}\right), F_{2 s} \equiv 0$ $\left(\bmod 2^{n}\right), F_{2 s+1} \equiv 1\left(\bmod 2^{n}\right)$, hence  $$ \begin{gathered} a_{s+1}=2 b_{s+1}+F_{s+1} \equiv 2 b_{1}+1+2^{n-1} \not \equiv 2 b_{1}+1=a_{1} \quad\left(\bmod 2^{n}\right) \\ a_{2 s}=2 b_{2 s}+F_{2 s} \equiv 2 b_{0}+0=a_{0} \quad\left(\bmod 2^{n}\right) \\ a_{2 s+1}=2 b_{2 s+1}+F_{2 s+1} \equiv 2 b_{1}+1=a_{1} \quad\left(\bmod 2^{n}\right) \end{gathered} $$  The first line means that $A$ is not $s$-periodic, while the other two provide that $a_{2 s} \equiv a_{0}$, $a_{2 s+1} \equiv a_{1}$ and hence $a_{2 s+t} \equiv a_{t}$ for all $t \geq 0$. Hence $s\left|p_{n}(A)\right| 2 s$ and $p_{n}(A) \neq s$, which means that $p_{n}(A)=2 s$, as desired.  Finally, Lemma 3 provides a straightforward method of counting the number of cycles. Actually, take any number $0 \leq k \leq n-1$ and consider all the cells $(i, j)$ with $\mu(i, j)=k$. The total number of such cells is $2^{2(n-k)}-2^{2(n-k-1)}=3 \cdot 2^{2 n-2 k-2}$. On the other hand, they are split into cycles, and by Lemma 3 the length of each cycle is $3 \cdot 2^{n-1-k}$. Hence the number of cycles consisting of these cells is exactly $\frac{3 \cdot 2^{2 n-2 k-2}}{3 \cdot 2^{n-1-k}}=2^{n-k-1}$. Finally, there is only one cell $(0,0)$ which is not mentioned in the previous computation, and it forms a separate cycle. So the total number of cycles is  $$ 1+\sum_{k=0}^{n-1} 2^{n-1-k}=1+\left(1+2+4+\cdots+2^{n-1}\right)=2^{n} $$  Comment. We outline a different proof for the essential part of Lemma 3. That is, we assume that $k=0$ and show that in this case the period of $\left(a_{i}\right)$ modulo $2^{n}$ coincides with the period of the Fibonacci numbers modulo $2^{n}$; then the proof can be finished by the arguments from Lemma $2 .$.  Note that $p$ is a (not necessarily minimal) period of the sequence $\left(a_{i}\right)$ modulo $2^{n}$ if and only if we have $a_{0} \equiv a_{p}\left(\bmod 2^{n}\right), a_{1} \equiv a_{p+1}\left(\bmod 2^{n}\right)$, that is,  $$ \begin{aligned} a_{0} & \equiv a_{p} \equiv F_{p-1} a_{0}+F_{p} a_{1}=F_{p}\left(a_{1}-a_{0}\right)+F_{p+1} a_{0} \quad\left(\bmod 2^{n}\right), \\ a_{1} & \equiv a_{p+1}=F_{p} a_{0}+F_{p+1} a_{1} \quad\left(\bmod 2^{n}\right) . \end{aligned} $$  Now, If $p$ is a period of $\left(F_{i}\right)$ then we have $F_{p} \equiv F_{0}=0\left(\bmod 2^{n}\right)$ and $F_{p+1} \equiv F_{1}=1\left(\bmod 2^{n}\right)$, which by (1) implies that $p$ is a period of $\left(a_{i}\right)$ as well.  Conversely, suppose that $p$ is a period of $\left(a_{i}\right)$. Combining the relations of (1) we get  $$ \begin{aligned} 0=a_{1} \cdot a_{0}-a_{0} \cdot a_{1} & \equiv a_{1}\left(F_{p}\left(a_{1}-a_{0}\right)+F_{p+1} a_{0}\right)-a_{0}\left(F_{p} a_{0}+F_{p+1} a_{1}\right) \\ & =F_{p}\left(a_{1}^{2}-a_{1} a_{0}-a_{0}^{2}\right) \quad\left(\bmod 2^{n}\right), \\ a_{1}^{2}-a_{1} a_{0}-a_{0}^{2}=\left(a_{1}-a_{0}\right) a_{1}-a_{0} \cdot a_{0} & \equiv\left(a_{1}-a_{0}\right)\left(F_{p} a_{0}+F_{p+1} a_{1}\right)-a_{0}\left(F_{p}\left(a_{1}-a_{0}\right)+F_{p+1} a_{0}\right) \\ & =F_{p+1}\left(a_{1}^{2}-a_{1} a_{0}-a_{0}^{2}\right) \quad\left(\bmod 2^{n}\right) . \end{aligned} $$  Since at least one of the numbers $a_{0}, a_{1}$ is odd, the number $a_{1}^{2}-a_{1} a_{0}-a_{0}^{2}$ is odd as well. Therefore the previous relations are equivalent with $F_{p} \equiv 0\left(\bmod 2^{n}\right)$ and $F_{p+1} \equiv 1\left(\bmod 2^{n}\right)$, which means exactly that $p$ is a period of $\left(F_{0}, F_{1}, \ldots\right)$ modulo $2^{n}$.  So, the sets of periods of $\left(a_{i}\right)$ and $\left(F_{i}\right)$ coincide, and hence the minimal periods coincide as well.