Let $A B C$ be a triangle with circumcircle $\Omega$ and incentre $I$. Let the line passing through $I$ and perpendicular to $C I$ intersect the segment $B C$ and the $\operatorname{arc} B C$ (not containing $A$ ) of $\Omega$ at points $U$ and $V$, respectively. Let the line passing through $U$ and parallel to $A I$ intersect $A V$ at $X$, and let the line passing through $V$ and parallel to $A I$ intersect $A B$ at $Y$. Let $W$ and $Z$ be the midpoints of $A X$ and $B C$, respectively. Prove that if the points $I, X$, and $Y$ are collinear, then the points $I, W$, and $Z$ are also collinear.

Solution: We start with some general observations. Set $\alpha=\angle A / 2, \beta=\angle B / 2, \gamma=\angle C / 2$. Then obviously $\alpha+\beta+\gamma=90^{\circ}$. Since $\angle U I C=90^{\circ}$, we obtain $\angle I U C=\alpha+\beta$. Therefore $\angle B I V=\angle I U C-\angle I B C=\alpha=\angle B A I=\angle B Y V$, which implies that the points $B, Y, I$, and $V$ lie on a common circle (see Figure 1).  Assume now that the points $I, X$ and $Y$ are collinear. We prove that $\angle Y I A=90^{\circ}$. Let the line $X U$ intersect $A B$ at $N$. Since the lines $A I, U X$, and $V Y$ are parallel, we get  $$ \frac{N X}{A I}=\frac{Y N}{Y A}=\frac{V U}{V I}=\frac{X U}{A I} $$  implying $N X=X U$. Moreover, $\angle B I U=\alpha=\angle B N U$. This implies that the quadrilateral BUIN is cyclic, and since $B I$ is the angle bisector of $\angle U B N$, we infer that $N I=U I$. Thus in the isosceles triangle $N I U$, the point $X$ is the midpoint of the base $N U$. This gives $\angle I X N=90^{\circ}$, i.e., $\angle Y I A=90^{\circ}$. ![](https://cdn.mathpix.com/cropped/2024_11_18_62c85fb0b01b41aca29bg-65.jpg?height=880&width=966&top_left_y=1256&top_left_x=565)  Figure 1 Let $S$ be the midpoint of the segment $V C$. Let moreover $T$ be the intersection point of the lines $A X$ and $S I$, and set $x=\angle B A V=\angle B C V$. Since $\angle C I A=90^{\circ}+\beta$ and $S I=S C$, we obtain  $$ \angle T I A=180^{\circ}-\angle A I S=90^{\circ}-\beta-\angle C I S=90^{\circ}-\beta-\gamma-x=\alpha-x=\angle T A I, $$  which implies that $T I=T A$. Therefore, since $\angle X I A=90^{\circ}$, the point $T$ is the midpoint of $A X$, i.e., $T=W$.  To complete our solution, it remains to show that the intersection point of the lines $I S$ and $B C$ coincide with the midpoint of the segment $B C$. But since $S$ is the midpoint of the segment $V C$, it suffices to show that the lines $B V$ and $I S$ are parallel.  Since the quadrilateral $B Y I V$ is cyclic, $\angle V B I=\angle V Y I=\angle Y I A=90^{\circ}$. This implies that $B V$ is the external angle bisector of the angle $A B C$, which yields $\angle V A C=\angle V C A$. Therefore $2 \alpha-x=2 \gamma+x$, which gives $\alpha=\gamma+x$. Hence $\angle S C I=\alpha$, so $\angle V S I=2 \alpha$.  On the other hand, $\angle B V C=180^{\circ}-\angle B A C=180^{\circ}-2 \alpha$, which implies that the lines $B V$ and $I S$ are parallel. This completes the solution.


Solution: As in   $$ \angle B A V=\angle C A E $$  Proof. Let $\rho$ be the composition of the inversion with centre $A$ and radius $\sqrt{A B \cdot A C}$, and the symmetry with respect to $A I$. Clearly, $\rho$ interchanges $B$ and $C$.  Let $J$ be the excentre of the triangle $A B C$ opposite to $A$ (see Figure 2). Then we have $\angle J A C=\angle B A I$ and $\angle J C A=90^{\circ}+\gamma=\angle B I A$, so the triangles $A C J$ and $A I B$ are similar, and therefore $A B \cdot A C=A I \cdot A J$. This means that $\rho$ interchanges $I$ and $J$. Moreover, since $Y$ lies on $A B$ and $\angle A I Y=90^{\circ}$, the point $Y^{\prime}=\rho(Y)$ lies on $A C$, and $\angle J Y^{\prime} A=90^{\circ}$. Thus $\rho$ maps the circumcircle $\gamma$ of the triangle $B Y I$ to a circle $\gamma^{\prime}$ with diameter $J C$.  Finally, since $V$ lies on both $\Gamma$ and $\gamma$, the point $V^{\prime}=\rho(V)$ lies on the line $\rho(\Gamma)=A B$ as well as on $\gamma^{\prime}$, which in turn means that $V^{\prime}=E$. This implies the desired result. ![](https://cdn.mathpix.com/cropped/2024_11_18_62c85fb0b01b41aca29bg-66.jpg?height=709&width=572&top_left_y=1713&top_left_x=248)  Figure 2 ![](https://cdn.mathpix.com/cropped/2024_11_18_62c85fb0b01b41aca29bg-66.jpg?height=872&width=989&top_left_y=1549&top_left_x=822)  Figure 3  Now we turn to the solution of the problem. Assume that the incircle $\omega_{1}$ of the triangle $A B C$ is tangent to $B C$ at $D$, and let the excircle $\omega_{2}$ of the triangle $A B C$ opposite to the vertex $A$ touch the side $B C$ at $E$ (see Figure 3). The homothety with centre $A$ that takes $\omega_{2}$ to $\omega_{1}$ takes the point $E$ to some point $F$, and the tangent to $\omega_{1}$ at $F$ is parallel to $B C$. Therefore $D F$ is a diameter of $\omega_{1}$. Moreover, $Z$ is the midpoint of $D E$. This implies that the lines $I Z$ and $F E$ are parallel.  Let $K=Y I \cap A E$. Since $\angle Y I A=90^{\circ}$, the lemma yields that $I$ is the midpoint of $X K$. This implies that the segments $I W$ and $A K$ are parallel. Therefore, the points $W, I$ and $Z$ are collinear.  Comment 1. The properties $\angle Y I A=90^{\circ}$ and $V A=V C$ can be established in various ways. The main difficulty of the problem seems to find out how to use these properties in connection to the points $W$ and $Z$.  In Solution 2 this principal part is more or less covered by the lemma, for which we have presented a direct proof. On the other hand, this lemma appears to be a combination of two well-known facts; let us formulate them in terms of the lemma statement.  Let the line $I Y$ intersect $A C$ at $P$ (see Figure 4). The first fact states that the circumcircle $\omega$ of the triangle $V Y P$ is tangent to the segments $A B$ and $A C$, as well as to the circle $\Gamma$. The second fact states that for such a circle, the angles $B A V$ and $C A E$ are equal.  The awareness of this lemma may help a lot in solving this problem; so the Jury might also consider a variation of the proposed problem, for which the lemma does not seem to be useful; see Comment 3. ![](https://cdn.mathpix.com/cropped/2024_11_18_62c85fb0b01b41aca29bg-67.jpg?height=946&width=1689&top_left_y=1149&top_left_x=189)  Comment 2. The proposed problem stated the equivalence: the point $I$ lies on the line $X Y$ if and only if $I$ lies on the line $W Z$. Here we sketch the proof of the "if" part (see Figure 5). As in Solution 2 , let $B C$ touch the circles $\omega_{1}$ and $\omega_{2}$ at $D$ and $E$, respectively. Since $I Z \| A E$ and $W$ lies on $I Z$, the line $D X$ is also parallel to $A E$. Therefore, the triangles $X U P$ and $A I Q$ are similar. Moreover, the line $D X$ is symmetric to $A E$ with respect to $I$, so $I P=I Q$, where $P=U V \cap X D$ and $Q=U V \cap A E$. Thus we obtain  $$ \frac{U V}{V I}=\frac{U X}{I A}=\frac{U P}{I Q}=\frac{U P}{I P} $$  So the pairs $I U$ and $P V$ are harmonic conjugates, and since $\angle U D I=90^{\circ}$, we get $\angle V D B=\angle B D X=$ $\angle B E A$. Therefore the point $V^{\prime}$ symmetric to $V$ with respect to the perpendicular bisector of $B C$ lies on the line $A E$. So we obtain $\angle B A V=\angle C A E$.  The rest can be obtained by simply reversing the arguments in Solution 2 . The points $B, V, I$, and $Y$ are concyclic. The lemma implies that $\angle Y I A=90^{\circ}$. Moreover, the points $B, U, I$, and $N$, where $N=U X \cap A B$, lie on a common circle, so $I N=I U$. Since $I Y \perp U N$, the point $X^{\prime}=I Y \cap U N$ is the midpoint of $U N$. But in the trapezoid $A Y V I$, the line $X U$ is parallel to the sides $A I$ and $Y V$, so $N X=U X^{\prime}$. This yields $X=X^{\prime}$. The reasoning presented in Solution 1 can also be reversed, but it requires a lot of technicalities. Therefore the Problem Selection Committee proposes to consider only the "only if" part of the original proposal, which is still challenging enough.  Comment 3. The Jury might also consider the following variation of the proposed problem. Let $A B C$ be a triangle with circumcircle $\Omega$ and incentre I. Let the line through I perpendicular to CI intersect the segment $B C$ and the arc $B C$ (not containing $A$ ) of $\Omega$ at $U$ and $V$, respectively. Let the line through $U$ parallel to $A I$ intersect $A V$ at $X$. Prove that if the lines XI and AI are perpendicular, then the midpoint of the segment AC lies on the line XI (see Figure 6). ![](https://cdn.mathpix.com/cropped/2024_11_18_62c85fb0b01b41aca29bg-68.jpg?height=675&width=746&top_left_y=1273&top_left_x=184)  Figure 6 ![](https://cdn.mathpix.com/cropped/2024_11_18_62c85fb0b01b41aca29bg-68.jpg?height=1012&width=980&top_left_y=930&top_left_x=892)  Figure 7  Since the solution contains the arguments used above, we only sketch it. Let $N=X U \cap A B$ (see Figure 7). Then $\angle B N U=\angle B A I=\angle B I U$, so the points $B, U, I$, and $N$ lie on a common circle. Therefore $I U=I N$, and since $I X \perp N U$, it follows that $N X=X U$. Now set $Y=X I \cap A B$. The equality $N X=X U$ implies that  $$ \frac{V X}{V A}=\frac{X U}{A I}=\frac{N X}{A I}=\frac{Y X}{Y I} $$  and therefore $Y V \| A I$. Hence $\angle B Y V=\angle B A I=\angle B I V$, so the points $B, V, I, Y$ are concyclic. Next we have $I Y \perp Y V$, so $\angle I B V=90^{\circ}$. This implies that $B V$ is the external angle bisector of the angle $A B C$, which gives $\angle V A C=\angle V C A$. So in order to show that $M=X I \cap A C$ is the midpoint of $A C$, it suffices to prove that $\angle V M C=90^{\circ}$. But this follows immediately from the observation that the points $V, C, M$, and $I$ are concyclic, as $\angle M I V=\angle Y B V=180^{\circ}-\angle A C V$. The converse statement is also true, but its proof requires some technicalities as well.


Let $n \geqslant 2$ be an integer, and let $A_{n}$ be the set  $$ A_{n}=\left\{2^{n}-2^{k} \mid k \in \mathbb{Z}, 0 \leqslant k<n\right\} . $$  Determine the largest positive integer that cannot be written as the sum of one or more (not necessarily distinct) elements of $A_{n}$. (Serbia) Answer. $(n-2) 2^{n}+1$.

Solution: Part I. First we show that every integer greater than $(n-2) 2^{n}+1$ can be represented as such a sum. This is achieved by induction on $n$.  For $n=2$, the set $A_{n}$ consists of the two elements 2 and 3 . Every positive integer $m$ except for 1 can be represented as the sum of elements of $A_{n}$ in this case: as $m=2+2+\cdots+2$ if $m$ is even, and as $m=3+2+2+\cdots+2$ if $m$ is odd.  Now consider some $n>2$, and take an integer $m>(n-2) 2^{n}+1$. If $m$ is even, then consider  $$ \frac{m}{2} \geqslant \frac{(n-2) 2^{n}+2}{2}=(n-2) 2^{n-1}+1>(n-3) 2^{n-1}+1 $$  By the induction hypothesis, there is a representation of the form  $$ \frac{m}{2}=\left(2^{n-1}-2^{k_{1}}\right)+\left(2^{n-1}-2^{k_{2}}\right)+\cdots+\left(2^{n-1}-2^{k_{r}}\right) $$  for some $k_{i}$ with $0 \leqslant k_{i}<n-1$. It follows that  $$ m=\left(2^{n}-2^{k_{1}+1}\right)+\left(2^{n}-2^{k_{2}+1}\right)+\cdots+\left(2^{n}-2^{k_{r}+1}\right) $$  giving us the desired representation as a sum of elements of $A_{n}$. If $m$ is odd, we consider  $$ \frac{m-\left(2^{n}-1\right)}{2}>\frac{(n-2) 2^{n}+1-\left(2^{n}-1\right)}{2}=(n-3) 2^{n-1}+1 $$  By the induction hypothesis, there is a representation of the form  $$ \frac{m-\left(2^{n}-1\right)}{2}=\left(2^{n-1}-2^{k_{1}}\right)+\left(2^{n-1}-2^{k_{2}}\right)+\cdots+\left(2^{n-1}-2^{k_{r}}\right) $$  for some $k_{i}$ with $0 \leqslant k_{i}<n-1$. It follows that  $$ m=\left(2^{n}-2^{k_{1}+1}\right)+\left(2^{n}-2^{k_{2}+1}\right)+\cdots+\left(2^{n}-2^{k_{r}+1}\right)+\left(2^{n}-1\right) $$  giving us the desired representation of $m$ once again. Part II. It remains to show that there is no representation for $(n-2) 2^{n}+1$. Let $N$ be the smallest positive integer that satisfies $N \equiv 1\left(\bmod 2^{n}\right)$, and which can be represented as a sum of elements of $A_{n}$. Consider a representation of $N$, i.e.,  $$ N=\left(2^{n}-2^{k_{1}}\right)+\left(2^{n}-2^{k_{2}}\right)+\cdots+\left(2^{n}-2^{k_{r}}\right) $$  where $0 \leqslant k_{1}, k_{2}, \ldots, k_{r}<n$. Suppose first that two of the terms in the sum are the same, i.e., $k_{i}=k_{j}$ for some $i \neq j$. If $k_{i}=k_{j}=n-1$, then we can simply remove these two terms to get a representation for  $$ N-2\left(2^{n}-2^{n-1}\right)=N-2^{n} $$  as a sum of elements of $A_{n}$, which contradicts our choice of $N$. If $k_{i}=k_{j}=k<n-1$, replace the two terms by $2^{n}-2^{k+1}$, which is also an element of $A_{n}$, to get a representation for  $$ N-2\left(2^{n}-2^{k}\right)+2^{n}-2^{k+1}=N-2^{n} . $$  This is a contradiction once again. Therefore, all $k_{i}$ have to be distinct, which means that  $$ 2^{k_{1}}+2^{k_{2}}+\cdots+2^{k_{r}} \leqslant 2^{0}+2^{1}+2^{2}+\cdots+2^{n-1}=2^{n}-1 $$  On the other hand, taking (1) modulo $2^{n}$, we find  $$ 2^{k_{1}}+2^{k_{2}}+\cdots+2^{k_{r}} \equiv-N \equiv-1 \quad\left(\bmod 2^{n}\right) $$  Thus we must have $2^{k_{1}}+2^{k_{2}}+\cdots+2^{k_{r}}=2^{n}-1$, which is only possible if each element of $\{0,1, \ldots, n-1\}$ occurs as one of the $k_{i}$. This gives us  $$ N=n 2^{n}-\left(2^{0}+2^{1}+\cdots+2^{n-1}\right)=(n-1) 2^{n}+1 . $$  In particular, this means that $(n-2) 2^{n}+1$ cannot be represented as a sum of elements of $A_{n}$.


Solution: The fact that $m=(n-2) 2^{n}+1$ cannot be represented as a sum of elements of $A_{n}$ can also be shown in other ways. We prove the following statement by induction on $n$ : Claim. If $a, b$ are integers with $a \geqslant 0, b \geqslant 1$, and $a+b<n$, then $a 2^{n}+b$ cannot be written as a sum of elements of $A_{n}$. Proof. The claim is clearly true for $n=2$ (since $a=0, b=1$ is the only possibility). For $n>2$, assume that there exist integers $a, b$ with $a \geqslant 0, b \geqslant 1$ and $a+b<n$ as well as elements $m_{1}, m_{2}, \ldots, m_{r}$ of $A_{n}$ such that  $$ a 2^{n}+b=m_{1}+m_{2}+\cdots+m_{r} $$  We can suppose, without loss of generality, that $m_{1} \geqslant m_{2} \geqslant \cdots \geqslant m_{r}$. Let $\ell$ be the largest index for which $m_{\ell}=2^{n}-1\left(\ell=0\right.$ if $\left.m_{1} \neq 2^{n}-1\right)$. Clearly, $\ell$ and $b$ must have the same parity. Now  $$ (a-\ell) 2^{n}+(b+\ell)=m_{\ell+1}+m_{\ell+2}+\cdots+m_{r} $$  and thus  $$ (a-\ell) 2^{n-1}+\frac{b+\ell}{2}=\frac{m_{\ell+1}}{2}+\frac{m_{\ell+2}}{2}+\cdots+\frac{m_{r}}{2} . $$  Note that $m_{\ell+1} / 2, m_{\ell+2} / 2, \ldots, m_{r} / 2$ are elements of $A_{n-1}$. Moreover, $a-\ell$ and $(b+\ell) / 2$ are integers, and $(b+\ell) / 2 \geqslant 1$. If $a-\ell$ was negative, then we would have  $$ a 2^{n}+b \geqslant \ell\left(2^{n}-1\right) \geqslant(a+1)\left(2^{n}-1\right)=a 2^{n}+2^{n}-a-1, $$  thus $n \geqslant a+b+1 \geqslant 2^{n}$, which is impossible. So $a-\ell \geqslant 0$. By the induction hypothesis, we must have $a-\ell+\frac{b+\ell}{2} \geqslant n-1$, which gives us a contradiction, since  $$ a-\ell+\frac{b+\ell}{2} \leqslant a-\ell+b+\ell-1=a+b-1<n-1 . $$  Considering the special case $a=n-2, b=1$ now completes the proof.


Solution: Denote by $B_{n}$ the set of all positive integers that can be written as a sum of elements of $A_{n}$. In this solution, we explicitly describe all the numbers in $B_{n}$ by an argument similar to the first solution.  For a positive integer $n$, we denote by $\sigma_{2}(n)$ the sum of its digits in the binary representation. Notice that every positive integer $m$ has a unique representation of the form $m=s 2^{n}-t$ with some positive integer $s$ and $0 \leqslant t \leqslant 2^{n}-1$. Lemma. For any two integers $s \geqslant 1$ and $0 \leqslant t \leqslant 2^{n}-1$, the number $m=s 2^{n}-t$ belongs to $B_{n}$ if and only if $s \geqslant \sigma_{2}(t)$. Proof. For $t=0$, the statement of the Lemma is obvious, since $m=2 s \cdot\left(2^{n}-2^{n-1}\right)$. Now suppose that $t \geqslant 1$, and let  $$ t=2^{k_{1}}+\cdots+2^{k_{\sigma}} \quad\left(0 \leqslant k_{1}<\cdots<k_{\sigma} \leqslant n-1, \quad \sigma=\sigma_{2}(t)\right) $$  be its binary expansion. If $s \geqslant \sigma$, then $m \in B_{n}$ since  $$ m=(s-\sigma) 2^{n}+\left(\sigma 2^{n}-t\right)=2(s-\sigma) \cdot\left(2^{n}-2^{n-1}\right)+\sum_{i=1}^{\sigma}\left(2^{n}-2^{k_{i}}\right) $$  Assume now that there exist integers $s$ and $t$ with $1 \leqslant s<\sigma_{2}(t)$ and $0 \leqslant t \leqslant 2^{n}-1$ such that the number $m=s 2^{n}-t$ belongs to $B_{n}$. Among all such instances, choose the one for which $m$ is smallest, and let  $$ m=\sum_{i=1}^{d}\left(2^{n}-2^{\ell_{i}}\right) \quad\left(0 \leqslant \ell_{i} \leqslant n-1\right) $$  be the corresponding representation. If all the $\ell_{i}$ 's are distinct, then $\sum_{i=1}^{d} 2^{\ell_{i}} \leqslant \sum_{j=0}^{n-1} 2^{j}=2^{n}-1$, so one has $s=d$ and $t=\sum_{i=1}^{d} 2^{\ell_{i}}$, whence $s=d=\sigma_{2}(t)$; this is impossible. Therefore, two of the $\ell_{i}$ 's must be equal, say $\ell_{d-1}=\ell_{d}$. Then $m \geqslant 2\left(2^{n}-2^{\ell_{d}}\right) \geqslant 2^{n}$, so $s \geqslant 2$.  Now we claim that the number $m^{\prime}=m-2^{n}=(s-1) 2^{n}-t$ also belongs to $B_{n}$, which contradicts the minimality assumption. Indeed, one has  $$ \left(2^{n}-2^{\ell_{d-1}}\right)+\left(2^{n}-2^{\ell_{d}}\right)=2\left(2^{n}-2^{\ell_{d}}\right)=2^{n}+\left(2^{n}-2^{\ell_{d}+1}\right) $$  so  $$ m^{\prime}=\sum_{i=1}^{d-2}\left(2^{n}-2^{\ell_{i}}\right)+\left(2^{n}-2^{\ell_{d}+1}\right) $$  is the desired representation of $m^{\prime}$ (if $\ell_{d}=n-1$, then the last summand is simply omitted). This contradiction finishes the proof.  By our lemma, the largest number $M$ which does not belong to $B_{n}$ must have the form  $$ m_{t}=\left(\sigma_{2}(t)-1\right) 2^{n}-t $$  for some $t$ with $1 \leqslant t \leqslant 2^{n}-1$, so $M$ is just the largest of these numbers. For $t_{0}=2^{n}-1$ we have $m_{t_{0}}=(n-1) 2^{n}-\left(2^{n}-1\right)=(n-2) 2^{n}+1$; for every other value of $t$ one has $\sigma_{2}(t) \leqslant n-1$, thus $m_{t} \leqslant(\sigma(t)-1) 2^{n} \leqslant(n-2) 2^{n}<m_{t_{0}}$. This means that $M=m_{t_{0}}=(n-2) 2^{n}+1$.


Determine all pairs $(x, y)$ of positive integers such that  $$ \sqrt[3]{7 x^{2}-13 x y+7 y^{2}}=|x-y|+1 $$  Answer. Either $(x, y)=(1,1)$ or $\{x, y\}=\left\{m^{3}+m^{2}-2 m-1, m^{3}+2 m^{2}-m-1\right\}$ for some positive integer $m \geqslant 2$.

Solution: Let $(x, y)$ be any pair of positive integers solving (1). We shall prove that it appears in the list displayed above. The converse assertion that all these pairs do actually satisfy (1) either may be checked directly by means of a somewhat laborious calculation, or it can be seen by going in reverse order through the displayed equations that follow.  In case $x=y$ the given equation reduces to $x^{2 / 3}=1$, which is equivalent to $x=1$, whereby he have found the first solution.  To find the solutions with $x \neq y$ we may assume $x>y$ due to symmetry. Then the integer $n=x-y$ is positive and (1) may be rewritten as  $$ \sqrt[3]{7(y+n)^{2}-13(y+n) y+7 y^{2}}=n+1 $$  Raising this to the third power and simplifying the result one obtains  $$ y^{2}+y n=n^{3}-4 n^{2}+3 n+1 . $$  To complete the square on the left hand side, we multiply by 4 and add $n^{2}$, thus getting  $$ (2 y+n)^{2}=4 n^{3}-15 n^{2}+12 n+4=(n-2)^{2}(4 n+1) $$  This shows that the cases $n=1$ and $n=2$ are impossible, whence $n>2$, and $4 n+1$ is the square of the rational number $\frac{2 y+n}{n-2}$. Consequently, it has to be a perfect square, and, since it is odd as well, there has to exist some nonnegative integer $m$ such that $4 n+1=(2 m+1)^{2}$, i.e.  $$ n=m^{2}+m $$  Notice that $n>2$ entails $m \geqslant 2$. Substituting the value of $n$ just found into the previous displayed equation we arrive at  $$ \left(2 y+m^{2}+m\right)^{2}=\left(m^{2}+m-2\right)^{2}(2 m+1)^{2}=\left(2 m^{3}+3 m^{2}-3 m-2\right)^{2} . $$  Extracting square roots and taking $2 m^{3}+3 m^{2}-3 m-2=(m-1)\left(2 m^{2}+5 m+2\right)>0$ into account we derive $2 y+m^{2}+m=2 m^{3}+3 m^{2}-3 m-2$, which in turn yields  $$ y=m^{3}+m^{2}-2 m-1 $$  Notice that $m \geqslant 2$ implies that $y=\left(m^{3}-1\right)+(m-2) m$ is indeed positive, as it should be. In view of $x=y+n=y+m^{2}+m$ it also follows that  $$ x=m^{3}+2 m^{2}-m-1, $$  and that this integer is positive as well. Comment. Alternatively one could ask to find all pairs $(x, y)$ of - not necessarily positive - integers solving (1). The answer to that question is a bit nicer than the answer above: the set of solutions are now described by  $$ \{x, y\}=\left\{m^{3}+m^{2}-2 m-1, m^{3}+2 m^{2}-m-1\right\} $$  where $m$ varies through $\mathbb{Z}$. This may be shown using essentially the same arguments as above. We finally observe that the pair $(x, y)=(1,1)$, that appears to be sporadic above, corresponds to $m=-1$.


Find all triples $(p, x, y)$ consisting of a prime number $p$ and two positive integers $x$ and $y$ such that $x^{p-1}+y$ and $x+y^{p-1}$ are both powers of $p$. (Belgium) Answer. $(p, x, y) \in\{(3,2,5),(3,5,2)\} \cup\left\{\left(2, n, 2^{k}-n\right) \mid 0<n<2^{k}\right\}$.

Solution: For $p=2$, clearly all pairs of two positive integers $x$ and $y$ whose sum is a power of 2 satisfy the condition. Thus we assume in the following that $p>2$, and we let $a$ and $b$ be positive integers such that $x^{p-1}+y=p^{a}$ and $x+y^{p-1}=p^{b}$. Assume further, without loss of generality, that $x \leqslant y$, so that $p^{a}=x^{p-1}+y \leqslant x+y^{p-1}=p^{b}$, which means that $a \leqslant b$ (and thus $\left.p^{a} \mid p^{b}\right)$.  Now we have  $$ p^{b}=y^{p-1}+x=\left(p^{a}-x^{p-1}\right)^{p-1}+x . $$  We take this equation modulo $p^{a}$ and take into account that $p-1$ is even, which gives us  $$ 0 \equiv x^{(p-1)^{2}}+x \quad\left(\bmod p^{a}\right) $$  If $p \mid x$, then $p^{a} \mid x$, since $x^{(p-1)^{2}-1}+1$ is not divisible by $p$ in this case. However, this is impossible, since $x \leqslant x^{p-1}<p^{a}$. Thus we know that $p \nmid x$, which means that  $$ p^{a} \mid x^{(p-1)^{2}-1}+1=x^{p(p-2)}+1 $$  By Fermat's little theorem, $x^{(p-1)^{2}} \equiv 1(\bmod p)$, thus $p$ divides $x+1$. Let $p^{r}$ be the highest power of $p$ that divides $x+1$. By the binomial theorem, we have  $$ x^{p(p-2)}=\sum_{k=0}^{p(p-2)}\binom{p(p-2)}{k}(-1)^{p(p-2)-k}(x+1)^{k} . $$  Except for the terms corresponding to $k=0, k=1$ and $k=2$, all terms in the sum are clearly divisible by $p^{3 r}$ and thus by $p^{r+2}$. The remaining terms are  $$ -\frac{p(p-2)\left(p^{2}-2 p-1\right)}{2}(x+1)^{2} $$  which is divisible by $p^{2 r+1}$ and thus also by $p^{r+2}$,  $$ p(p-2)(x+1) $$  which is divisible by $p^{r+1}$, but not $p^{r+2}$ by our choice of $r$, and the final term -1 corresponding to $k=0$. It follows that the highest power of $p$ that divides $x^{p(p-2)}+1$ is $p^{r+1}$.  On the other hand, we already know that $p^{a}$ divides $x^{p(p-2)}+1$, which means that $a \leqslant r+1$. Moreover,  $$ p^{r} \leqslant x+1 \leqslant x^{p-1}+y=p^{a} . $$  Hence we either have $a=r$ or $a=r+1$. If $a=r$, then $x=y=1$ needs to hold in the inequality above, which is impossible for $p>2$. Thus $a=r+1$. Now since $p^{r} \leqslant x+1$, we get  $$ x=\frac{x^{2}+x}{x+1} \leqslant \frac{x^{p-1}+y}{x+1}=\frac{p^{a}}{x+1} \leqslant \frac{p^{a}}{p^{r}}=p, $$  so we must have $x=p-1$ for $p$ to divide $x+1$. It follows that $r=1$ and $a=2$. If $p \geqslant 5$, we obtain  $$ p^{a}=x^{p-1}+y>(p-1)^{4}=\left(p^{2}-2 p+1\right)^{2}>(3 p)^{2}>p^{2}=p^{a} $$  a contradiction. So the only case that remains is $p=3$, and indeed $x=2$ and $y=p^{a}-x^{p-1}=5$ satisfy the conditions.  Comment 1. In this solution, we are implicitly using a special case of the following lemma known as "lifting the exponent": Lemma. Let $n$ be a positive integer, let $p$ be an odd prime, and let $v_{p}(m)$ denote the exponent of the highest power of $p$ that divides $m$.  If $x$ and $y$ are integers not divisible by $p$ such that $p \mid x-y$, then we have  $$ v_{p}\left(x^{n}-y^{n}\right)=v_{p}(x-y)+v_{p}(n) $$  Likewise, if $x$ and $y$ are integers not divisible by $p$ such that $p \mid x+y$, then we have  $$ v_{p}\left(x^{n}+y^{n}\right)=v_{p}(x+y)+v_{p}(n) . $$  Comment 2. There exist various ways of solving the problem involving the "lifting the exponent" lemma. Let us sketch another one.  The cases $x=y$ and $p \mid x$ are ruled out easily, so we assume that $p>2, x<y$, and $p \nmid x$. In this case we also have $p^{a}<p^{b}$ and $p \mid x+1$.  Now one has  $$ y^{p}-x^{p} \equiv y\left(y^{p-1}+x\right)-x\left(x^{p-1}+y\right) \equiv 0 \quad\left(\bmod p^{a}\right), $$  so by the lemma mentioned above one has $p^{a-1} \mid y-x$ and hence $y=x+t p^{a-1}$ for some positive integer $t$. Thus one gets  $$ x\left(x^{p-2}+1\right)=x^{p-1}+x=\left(x^{p-1}+y\right)-(y-x)=p^{a-1}(p-t) . $$  The factors on the left-hand side are coprime. So if $p \mid x$, then $x^{p-2}+1 \mid p-t$, which is impossible since $x<x^{p-2}+1$. Therefore, $p \nmid x$, and thus $x \mid p-t$. Since $p \mid x+1$, the only remaining case is $x=p-1, t=1$, and $y=p^{a-1}+p-1$. Now the solution can be completed in the same way as before.


Solution: Again, we can focus on the case that $p>2$. If $p \mid x$, then also $p \mid y$. In this case, let $p^{k}$ and $p^{\ell}$ be the highest powers of $p$ that divide $x$ and $y$ respectively, and assume without loss of generality that $k \leqslant \ell$. Then $p^{k}$ divides $x+y^{p-1}$ while $p^{k+1}$ does not, but $p^{k}<x+y^{p-1}$, which yields a contradiction. So $x$ and $y$ are not divisible by $p$. Fermat's little theorem yields $0 \equiv x^{p-1}+y \equiv 1+y(\bmod p)$, so $y \equiv-1(\bmod p)$ and for the same reason $x \equiv-1(\bmod p)$.  In particular, $x, y \geqslant p-1$ and thus $x^{p-1}+y \geqslant 2(p-1)>p$, so $x^{p-1}+y$ and $y^{p-1}+x$ are both at least equal to $p^{2}$. Now we have  $$ x^{p-1} \equiv-y \quad\left(\bmod p^{2}\right) \quad \text { and } \quad y^{p-1} \equiv-x \quad\left(\bmod p^{2}\right) $$  These two congruences, together with the Euler-Fermat theorem, give us  $$ 1 \equiv x^{p(p-1)} \equiv(-y)^{p} \equiv-y^{p} \equiv x y \quad\left(\bmod p^{2}\right) $$  Since $x \equiv y \equiv-1(\bmod p), x-y$ is divisible by $p$, so $(x-y)^{2}$ is divisible by $p^{2}$. This means that  $$ (x+y)^{2}=(x-y)^{2}+4 x y \equiv 4 \quad\left(\bmod p^{2}\right) $$  so $p^{2}$ divides $(x+y-2)(x+y+2)$. We already know that $x+y \equiv-2(\bmod p)$, so $x+y-2 \equiv$ $-4 \not \equiv 0(\bmod p)$. This means that $p^{2}$ divides $x+y+2$.  Using the same notation as in the first solution, we subtract the two original equations to obtain  $$ p^{b}-p^{a}=y^{p-1}-x^{p-1}+x-y=(y-x)\left(y^{p-2}+y^{p-3} x+\cdots+x^{p-2}-1\right) $$  The second factor is symmetric in $x$ and $y$, so it can be written as a polynomial of the elementary symmetric polynomials $x+y$ and $x y$ with integer coefficients. In particular, its value modulo $p^{2}$ is characterised by the two congruences $x y \equiv 1\left(\bmod p^{2}\right)$ and $x+y \equiv-2\left(\bmod p^{2}\right)$. Since both congruences are satisfied when $x=y=-1$, we must have  $$ y^{p-2}+y^{p-3} x+\cdots+x^{p-2}-1 \equiv(-1)^{p-2}+(-1)^{p-3}(-1)+\cdots+(-1)^{p-2}-1 \quad\left(\bmod p^{2}\right), $$  which simplifies to $y^{p-2}+y^{p-3} x+\cdots+x^{p-2}-1 \equiv-p\left(\bmod p^{2}\right)$. Thus the second factor in (1) is divisible by $p$, but not $p^{2}$.  This means that $p^{a-1}$ has to divide the other factor $y-x$. It follows that  $$ 0 \equiv x^{p-1}+y \equiv x^{p-1}+x \equiv x(x+1)\left(x^{p-3}-x^{p-4}+\cdots+1\right) \quad\left(\bmod p^{a-1}\right) . $$  Since $x \equiv-1(\bmod p)$, the last factor is $x^{p-3}-x^{p-4}+\cdots+1 \equiv p-2(\bmod p)$ and in particular not divisible by $p$. We infer that $p^{a-1} \mid x+1$ and continue as in the first solution.  Comment. Instead of reasoning by means of elementary symmetric polynomials, it is possible to provide a more direct argument as well. For odd $r,(x+1)^{2}$ divides $\left(x^{r}+1\right)^{2}$, and since $p$ divides $x+1$, we deduce that $p^{2}$ divides $\left(x^{r}+1\right)^{2}$. Together with the fact that $x y \equiv 1\left(\bmod p^{2}\right)$, we obtain  $$ 0 \equiv y^{r}\left(x^{r}+1\right)^{2} \equiv x^{2 r} y^{r}+2 x^{r} y^{r}+y^{r} \equiv x^{r}+2+y^{r} \quad\left(\bmod p^{2}\right) . $$  We apply this congruence with $r=p-2-2 k$ (where $0 \leqslant k<(p-2) / 2$ ) to find that  $$ x^{k} y^{p-2-k}+x^{p-2-k} y^{k} \equiv(x y)^{k}\left(x^{p-2-2 k}+y^{p-2-2 k}\right) \equiv 1^{k} \cdot(-2) \equiv-2 \quad\left(\bmod p^{2}\right) . $$  Summing over all $k$ yields  $$ y^{p-2}+y^{p-3} x+\cdots+x^{p-2}-1 \equiv \frac{p-1}{2} \cdot(-2)-1 \equiv-p \quad\left(\bmod p^{2}\right) $$  once again.