problem:
Find all functions $f: \mathbb{R} \rightarrow \mathbb{R}$ such that

$$
(x-y)(f(x)+f(y)) \leqslant f\left(x^{2}-y^{2}\right) \quad \text { for all } x, y \in \mathbb{R}
$$

#

solution:
Clearly, $f(x)=c x$ is a solution for each $c \in \mathbb{R}$ since $(x-y)(c x+c y)=c\left(x^{2}-y^{2}\right)$. To show that there are no other solutions, we observe that
(1) $x=y: \quad 0 \leqslant f(0)$;
$x=1, y=0: \quad f(0)+f(1) \leqslant f(1) \Rightarrow f(0) \leqslant 0$, whence $f(0)=0 ;$
(2) $y=-x: \quad 2 x(f(x)+f(-x)) \leqslant f(0)=0$;
$x \rightarrow-x: \quad-2 x(f(-x)+f(x)) \leqslant 0 \Rightarrow 2 x(f(x)+f(-x)) \geqslant 0 ;$
thus $2 x(f(x)+f(-x))=0$ for all $x$, so $f(-x)=-f(x)$ for all $x \neq 0$, and hence for all $x$, since $f(0)=0$;
(3) $x \leftrightarrow y: \quad(y-x)(f(y)+f(x)) \leqslant f\left(y^{2}-x^{2}\right)=-f\left(x^{2}-y^{2}\right) \Rightarrow(x-y)(f(x)+f(y)) \geqslant f\left(x^{2}-y^{2}\right)$;
which is the given inequality with the inequality sign reversed, so $(x-y)(f(x)+f(y))=f\left(x^{2}-y^{2}\right)$ must hold for all $x, y \in \mathbb{R}$;
(4) $y \leftrightarrow-y: \quad(x-y)(f(x)+f(y))=f\left(x^{2}-y^{2}\right)=f\left(x^{2}-(-y)^{2}\right)=(x+y)(f(x)+f(-y))=(x+y)(f(x)-f(y))$; expanding yields $f(x) y=f(y) x$ for all $x, y \in \mathbb{R}$.
Taking $y=1$ in the last result, $f(x)=f(1) x$, i.e. $f(x)=c x$, where $c=f(1)$, for all $x \in \mathbb{R}$. Since we have shown above that, conversely, all such functions are solutions, this completes the proof.

Alternative solution. A slight variation of this argument proves that $(x-y)(f(x)+f(y))=f\left(x^{2}-y^{2}\right)$ must hold for all $x, y \in \mathbb{R}$ as above, and then reaches $f(x)=c x$ as follows:
(4) $y= \pm 1: \quad(x \mp 1)(f(x) \pm f(1))=f\left(x^{2}-1\right)$ using $f(-1)=-f(1)$ from (2);
hence $(x-1)(f(x)+f(1))=(x+1)(f(x)-f(1)) \Rightarrow f(x)=f(1) x=c x$, where $c=f(1)$, on expanding.

# BxMO 2023: Problems and Solutions

#

problem_match: # Problem 1

solution_match: # Solution


problem:
Determine all integers $k \geqslant 1$ with the following property: given $k$ different colours, if each integer is coloured in one of these $k$ colours, then there must exist integers $a_{1}<a_{2}<\cdots<a_{2023}$ of the same colour such that the differences $a_{2}-a_{1}, a_{3}-a_{2}, \ldots, a_{2023}-a_{2022}$ are all powers of 2 .

#

solution:
We claim that only $k=1$ and $k=2$ satisfy the required property. First, if $k \geqslant 3$, we colour each integer with its residue class modulo 3, so that, whenever two integers have the same colour, their difference is divisible by 3 , so is not a power of 2 . This shows that no $k \geqslant 3$ has the required property.

In the case $k=1$, the sequence defined by $a_{n}=2 n$ for $n=1,2, \ldots, 2023$ clearly has the required property. In the case $k=2$, we call the colours "red" and "blue", and construct, for each $n \geqslant 1$ and by induction, integers $a_{1}<a_{2}<\cdots<a_{n}$ of the same colour such that $a_{m+1}-a_{m}$ is a power of 2 for $m=1,2, \ldots, n-1$. The statement is trivial for $n=1$. For $n>1$, let $a_{1}<a_{2}<\cdots<a_{n}$ be red integers (without loss of generality) having the desired property. Consider the $n+1$ integers $b_{i}=a_{n}+2^{i}$, for $i=1,2, \ldots, n+1$. If one of these, say $b_{j}$, is red, then, as $b_{j}-a_{n}=2^{j}$, the $n+1$ red integers $a_{1}<a_{2}<\cdots<a_{n}<b_{j}$ have the desired property. Otherwise, $b_{1}, b_{2}, \ldots, b_{n+1}$ are all blue, and $b_{i+1}-b_{i}=\left(a_{n}+2^{i+1}\right)-\left(a_{n}+2^{i}\right)=2^{i}$ for $i=1,2, \ldots, n$, so the $n+1$ blue integers $b_{1}<b_{2}<\cdots<b_{n+1}$ have the desired property. This completes the inductive step and hence the proof.

## BxMO 2023: Problems and Solutions

#

problem_match: # Problem 2


problem:
Let $A B C$ be a triangle with incentre $I$ and circumcircle $\omega$. Let $N$ denote the second point of intersection of line $A I$ and $\omega$. The line through $I$ perpendicular to $A I$ intersects line $B C$, segment $[A B]$, and segment $[A C]$ at the points $D, E$, and $F$, respectively. The circumcircle of triangle $A E F$ meets $\omega$ again at $P$, and lines $P N$ and $B C$ intersect at $Q$. Prove that lines $I Q$ and $D N$ intersect on $\omega$.

#

solution:
By construction, $A P E F$ and $A P B C$ are cyclic, and so

$$
\begin{aligned}
\angle B D E & =\angle C D F=\angle A F D-\angle F C D=\angle A F E-\angle A C B=\left(180^{\circ}-\angle E P A\right)-\left(180^{\circ}-\angle B P A\right) \\
& =\angle B P A-\angle E P A=\angle B P E .
\end{aligned}
$$

Hence $D B E P$ is cyclic, too. It follows that $\angle I D P=\angle E D P=\angle E B P=\angle A B P=\angle A N P=\angle I N P$ since $A P B N$ is cyclic, and so $P D N I$ is also cyclic. In particular, $\angle D P N=\angle D I N=90^{\circ}$. Let $R$ denote the second intersection of $D P$ and $\omega$, so $N Q \perp D R$. Then $\angle N P R=90^{\circ}$, so $R N$ is a diameter of $\omega$. It is well-known that $N$ is the midpoint of the arc $\widehat{B C}$ not containing $A$, whence $R N \perp B C$. Thus $D Q$ and $N Q$ are altitudes of triangle $R D N$, and so $Q$ is its orthocentre. This implies that $R Q \perp D N$, whence, since $R N$ is a diameter of $\omega$, the intersection $X$ of $R Q$ and $D N$ lies on $\omega$.
![](https://cdn.mathpix.com/cropped/2024_12_15_bda133660d2e7e251cddg-4.jpg?height=1040&width=1294&top_left_y=1450&top_left_x=381)

It is also well-known that $N$ is the centre of the circumcircle $\Omega$ of triangle $B C I$. Since $D I \perp I N$ by construction, $D I$ is tangent to $\Omega$ at $I$. As $D$ lies on the radical axis $B C$ of $\omega$ and $\Omega$, it follows that $|D I|^{2}=|D B||D C|=|D X||D N|$. Hence triangles $D N I$ and $D I X$ are similar; in particular, $\angle D X I=\angle D I N=90^{\circ}$. All of this shows that $R, I, Q, X$ lie on a line perpendicular to $D N$ that intersects $D N$ at $X \in \omega$. This completes the proof.

## BxMO 2023: Problems and Solutions

#

problem_match: # Problem 3

solution_match: # Solution 1


solution:
Let $K$ be the midpoint of segment [BC]. It is well-known that $N$ is the midpoint of the small arc $\widehat{B C}$ of $\omega$, so $B C \perp K N$. In particular, $\angle D K N=90^{\circ}$. But $\angle D I N=90^{\circ}$ by construction, so $D I K N$ is cyclic, with circumcircle $\Gamma$. Moreover, $\angle P E F=180^{\circ}-\angle P A F=180^{\circ}-\angle P A B=\angle P B C$ and $\angle P F E=\angle P A E=\angle P A B=\angle P C B$ since $A F E P$ and $A C B P$ are cyclic, so triangles $P E F$ and $P B C$ are similar. Now, by construction, $I$ is the midpoint of segment $[E F]$, so, $K$ being the midpoint of $[B C]$, triangles $P I F$ and $P K C$ are similar, too. It follows that $\angle P I D=180^{\circ}-\angle P I F=180^{\circ}-\angle P K C=\angle P K D$, whence $P$ lies on $\Gamma$.
![](https://cdn.mathpix.com/cropped/2024_12_15_bda133660d2e7e251cddg-5.jpg?height=958&width=1280&top_left_y=800&top_left_x=388)

Let $\Omega$ be the circumcircle of triangle $B C I$. By construction, $Q$ lies on the radical axes $P N$ of $\omega, \Gamma$ and $B C$ of $\omega, \Omega$, so is the radical centre of $\omega, \Gamma, \Omega$. In particular, $I Q$ is the radical axis of $\Gamma, \Omega$, so is perpendicular to the line joining the centres of $\Gamma, \Omega$. Now it is well-known that $N$ is the centre of $\Omega$, and, since $\angle D I N=90^{\circ}$, the centre of $\Gamma$ is the midpoint of segment $[D N]$. This shows that $I Q \perp D N$.

Finally, let $D N$ meet $\omega$ again at $X$. Since $D I \perp I N$ by construction and $N$ is the centre of $\Omega, D I$ is tangent to $\Omega$ at $I$. As $D$ lies on the radical axis $B C$ of $\omega, \Omega$, it follows that $|D I|^{2}=|D B||D C|=|D X||D N|$. Hence triangles $D N I$ and $D I X$ are similar; in particular, $\angle D X I=\angle D I N=90^{\circ}$, i.e. $I X \perp D N$. Since $I Q \perp D N$, it follows that $X$ is the intersection of $I Q$ and $D N$. Since $X$ lies on $\omega$ by construction, this completes the proof.

#

solution_match: # Solution 2


solution:
Since $A P E F$ and $A P B C$ are cyclic,

$$
\begin{aligned}
\angle C P F & =\angle B P A-\angle B P C-\angle F P A=\left(180^{\circ}-\angle B C A\right)-\angle B A C-\angle F E A \\
& =\left(180^{\circ}-\angle B C A-\angle B A C\right)-\angle B E D=\angle C B A-\angle B E D=\angle C B E-\angle B E D=\angle B D E=\angle C D F,
\end{aligned}
$$

so $D P F C$ is cyclic, too. Thence $\angle C P D=\angle C F D=180^{\circ}-\angle I F A=90^{\circ}+\angle I A F=90^{\circ}+\angle C A N=90^{\circ}+\angle C P N$. Hence $\angle D P N=\angle C P D-\angle C P N=90^{\circ}$. Since $\angle D I N=90^{\circ}$ by construction, it follows that DPIN is cyclic, with

## BxMO 2023: Problems and Solutions

circumcircle $\Gamma$. Let $J$ be the second intersection of line $I Q$ and $\Gamma$. Moreover, it is well-known that $N$ is the centre of the circumcircle $\Omega$ of BIC. In particular, $|N I|=|N B|$, and so, since $N I P J$ and $N B P C$ are cyclic,

$$
\frac{|J Q|}{|J P|}=\frac{|N Q|}{|N I|}=\frac{|N Q|}{|N B|}=\frac{|C Q|}{|C P|}
$$

Let $S$ now be the point of intersection of $P N$ and $\Omega$ such that $P, N, S$ lie on line $P N$ in this order. By construction, $\angle Q P C=\angle N P C=\angle N A C=\angle B A N=\angle B C N=\angle Q C N$, so triangles $C Q N$ and $P C N$ are similar, whence

$$
\frac{|C Q|}{|C P|}=\frac{|N C|}{|N P|}=\frac{|N Q|}{|N C|}=\frac{|N C|+|N Q|}{|N C|+|N P|}=\frac{|N S|+|N Q|}{|N S|+|N P|}=\frac{|S Q|}{|S P|}
$$

Combining (1) and (2) shows that $C, J, S$ lie on a circle of Apollonius, the centre of which lies on the line through $P, Q, N, S$, so, since $|N C|=|N S|$ by construction, is $N$. In other words, $J$ lies on $\Omega$.
![](https://cdn.mathpix.com/cropped/2024_12_15_bda133660d2e7e251cddg-6.jpg?height=1357&width=1317&top_left_y=938&top_left_x=375)

In particular, $|N I|=|N J|$. Now, by construction, $\angle D I N=\angle D J N=90^{\circ}$, so the right-angled triangles $D I N$ and $D J N$ are congruent, whence $D I N J$ is a kite. In particular, $I J \perp D N$. Since $Q$ lies on $I J$ by definition, this shows that $I Q \perp D N$. We can now conclude as in Solution 2.

#

solution_match: # Solution 3


solution:
By construction, $P$ is the Miquel point of quadrilateral $B C F E$ (and the resulting complete quadrilateral with points $A$ and $D$ added) because it is the intersection of $\omega$ and the circumcircle of triangle $A E F$. In particular, $D B E P$ is

## BxMO 2023: Problems and Solutions

cyclic. It follows that $\angle I D P=\angle E D P=\angle E B P=\angle A B P=\angle A N P=\angle I N P$ since $A P B N$ is cyclic, and so $P D N I$ is also cyclic.
![](https://cdn.mathpix.com/cropped/2024_12_15_bda133660d2e7e251cddg-7.jpg?height=963&width=1292&top_left_y=472&top_left_x=382)

Next, let $X$ be the intersection of $D N$ and $\omega$ and let $A N$ meet $B C$ at $Y$. Then $\angle N A C=\angle A / 2=\angle N C B$, so $\angle B Y A=\angle C+\angle N A C=\angle C+\angle N C B=\angle N C A$ and hence

$$
\begin{aligned}
\angle D Q P & =\angle N Q Y=\angle Q Y A-\angle Q N Y=\angle B Y A-\angle P N A \\
& =\angle N C A-\angle P C A=\angle P C N=180^{\circ}-\angle N X P=\angle D X P
\end{aligned}
$$

This implies that $D X Q P$ is cyclic. In particular, $Q X \perp D N$. It now suffices to show that $I X \perp D N$, which we do in the same way as in Solution 2.

# BxMO 2023: Problems and Solutions

#

solution_match: # Solution 4


problem:
A positive integer $n$ is friendly if every pair of neighbouring digits of $n$, written in base 10, differs by exactly 1. For example, 6787 is friendly, but 211 and 901 are not.

Find all odd natural numbers $m$ for which there exists a friendly integer divisible by $64 m$.

#

solution:
Any friendly number divisible by 64 is divisible by 4 , and hence the number formed by its last two digits is a multiple of 4 , so ends in $00,04,08, \ldots$, or 96 . A friendly number divisible by 4 must therefore end in $12,32,56$, or 76 , so cannot be divisible by 5 . In particular, if $5 \mid \mathrm{m}$, then there is no friendly integer divisible by 64 m .

We claim that conversely, if $m$ is odd and $5 \nmid m$, then there exists a friendly integer divisible by $64 m$. First, we notice that $343232=64 \cdot 5363$ is a friendly number divisible by 64 , and hence so is

$$
N_{k}=343232343232 \cdots 343232=343232 \cdot\left(1+10^{6}+\cdots+10^{6 k}\right) \quad \text { for } k=0,1,2, \ldots
$$

Now the sequence $N_{0}, N_{1}, N_{2}, \ldots$ eventually repeats modulo $m$, i.e. there exist positive integers $k<\ell$ such that $N_{\ell} \equiv N_{k}(\bmod m)$. Hence $m \mid N_{\ell}-N_{k}=10^{6(k+1)} N_{\ell-k-1}$. Since $m$ is odd and $5 \nmid m,(10, m)=1$, so $m \mid N_{\ell-k-1}$. By construction, $64 \mid N_{\ell-k-1}$. Thus, as $m$ is odd and hence $(64, m)=1$, we conclude that $64 m \mid N_{\ell-k-1}$. This completes the proof.

The solution divides into two parts: (1) showing that, if $5 \mid m$, then there is no friendly integer divisible by $64 m$; (2) showing that, if $5 \nmid m$, then there is a friendly integer divisible by $64 m$.

Alternative solution for part (1). If $5 \mid m$, then $20 \mid 64 m$. The last two digits of a multiple of 20 are $00,20,40,60$, or 80 , so this number is not friendly. Thus, if $m$ is odd and $5 \mid m$, then there is no friendly integer divisible by $64 m$.

Alternative solution for part (2). Notice that $N_{k}=343232 \cdot\left(10^{6(k+1)}-1\right) /\left(10^{6}-1\right)$. Let $M=m\left(10^{6}-1\right)$. Since $5 \nmid m$ and $m$ is odd, $(10, M)=1$, so, taking $k=\varphi(M)-1$, we get $10^{6(k+1)}=10^{6 \varphi(M)} \equiv 1(\bmod M)$ by the Euler-Fermat theorem, i.e. $m \mid\left(10^{6(k+1)}-1\right) /\left(10^{6}-1\right)$, and hence $m \mid N_{k}$.

Alternative constructions of the integers $\boldsymbol{N}_{\boldsymbol{k}}$ for part (2). Direct calculation shows that friendly integers divisible by 64 end in $343232,543232,123456$, or 323456 , so the numbers $N_{k}$ defined in the solution of part (2) above may be replaced by, for instance,

$$
34543232 \cdot\left(1+10^{8}+\cdots+10^{8 k}\right), 5432123456 \cdot\left(1+10^{10}+\cdots+10^{10 k}\right), 54323456 \cdot\left(1+10^{8}+\cdots+10^{8 k}\right)
$$

Remark. Interestingly, friendly numbers cannot be divisible by arbitrarily high powers of 2. Direct calculation shows that the 60-digit friendly integer 101232121234323456543434343210121212323434343234565656543232 is divisible by $2^{60}$, but that there is no friendly integer divisible by $2^{61}$. The problem selection committee is not aware of a proof of this fact that eschews direct calculation.

problem_match: # Problem 4