problem:
(a) Prove that for all $a, b, c, d \in \mathbb{R}$ with $a+b+c+d=0$,

$$
\max (a, b)+\max (a, c)+\max (a, d)+\max (b, c)+\max (b, d)+\max (c, d) \geqslant 0
$$

(b) Find the largest non-negative integer $k$ such that it is possible to replace $k$ of the six maxima in this inequality by minima in such a way that the inequality still holds for all $a, b, c, d \in \mathbb{R}$ with $a+b+c+d=0$.

#

solution:
The left-hand-side of the inequality is invariant under permutations of $a, b, c, d$. We may therefore suppose that $a \geqslant b \geqslant c \geqslant d$, so that the inequality reduces to

$$
0 \leqslant 3 a+2 b+c=a+(a+b)+(a+b+c)
$$

We claim that each of the terms on the right-hand side is non-negative; this will prove the inequality. Indeed, if $a<0$, then $a, b, c, d<0$, and so $a+b+c+d<0$, a contradiction. Also, if $a+b<0$, then, as $b \leqslant a$, $0>b \geqslant c, d$ so $(a+b)+c+d<0$, another contradiction. Finally, if $a+b+c<0$, then, as above, $0>c \geqslant d$, so $(a+b+c)+d<0$, a final contradiction.

Next, we claim that it is impossible to replace $k \geqslant 3$ maxima by minima in the inequality. Indeed, if $k \geqslant 3$, one number, say $d$, appears in two of the terms changed to minima. Take $a=b=c=1, d=-3$, so that $a+b+c+d=0$. Then the sum is at most $4 \cdot 1+2 \cdot(-3)<0$. Hence $k<3$.

Finally, we prove that the required inequality holds if $k=2$ and the terms involving the complementary sets $\{a, b\},\{c, d\}$ are changed to minima. We will assume again that $a \geqslant b \geqslant c \geqslant d$, and prove that the inequality holds for any change of the terms involving permutations of these sets to minima (rather than proving that it holds for all orderings of $a, b, c, d$ for this one change). There are three cases:
(1) change terms $\{a, b\},\{c, d\}$, so the inequality becomes $2 a+3 b+d \geqslant 0 \Longleftrightarrow a+b+(b-c) \geqslant 0$;
(2) change terms $\{a, c\},\{b, d\}$, so the inequality becomes $2 a+b+2 c+d \geqslant 0 \Longleftrightarrow a+c \geqslant 0$;
(3) change terms $\{a, d\},\{b, c\}$, so the inequality becomes $2 a+b+2 c+d \geqslant 0 \Longleftrightarrow a+c \geqslant 0$,
where we have used $a+b+c+d=0$. In the first case, inequality holds since $a+b \geqslant 0$ as proved earlier and $b \geqslant c$. In the other cases, suppose that $a+c<0$. Then $c<-a$ and hence $d<-a$ as $d \leqslant c$. Hence $c+d<-2 a \leqslant-a-b$ as $a \geqslant b$, so $a+b+c+d<0$, a final contradiction, completing the proof.

#

problem_match: # Problem 1

solution_match: # Solution 1


solution:
Using the inequality $\max (x, y) \geqslant \frac{1}{2}(x+y)$, we find that

$$
\max (a, b)+\max (a, c)+\max (a, d)+\max (b, c)+\max (b, d)+\max (c, d) \geqslant \frac{3}{2}(a+b+c+d)=0
$$

For $k=3$, we take the same counterexample as in Solution 1. Now it remains to prove the inequality where $\max (a, b)$ and $\max (c, d)$ are replaced by $\min (a, b)$ and $\min (c, d)$. We can assume without loss of generality that $\min (a, b)=a$ and $\min (c, d)=c$. Now we find

$$
\begin{aligned}
& \min (a, b)+\max (a, c)+\max (a, d)+\max (b, c)+\max (b, d)+\min (c, d) \geqslant \\
& a+\frac{1}{2}(a+c)+d+b+\frac{1}{2}(b+d)+c=\frac{3}{2}(a+b+c+d)=0
\end{aligned}
$$

## BxMO 2021: Problems and Solutions

#

solution_match: # Solution 2


solution:
We present another proof for the inequality where $\max (a, b)$ and $\max (c, d)$ are replaced by $\min (a, b)$ and $\min (c, d)$. By substituting $\max (x, y)=\frac{1}{2}(x+y+|x-y|)$ and $\min (x, y)=\frac{1}{2}(x+y-|x-y|)$ everywhere and using $a+b+c+d=0$, the inequality may be rewritten as:

$$
|a-c|+|a-d|+|b-c|+|b-d| \stackrel{?}{\geqslant}|a-b|+|c-d| .
$$

By the triangle inequality, we have

$$
|a-c|+|a-d|+|b-c|+|b-d| \geqslant|(a-c)-(b-c)|+|(a-d)-(b-d)|=2|a-b|,
$$

and similarly, $|a-c|+|a-d|+|b-c|+|b-d| \geqslant 2|c-d|$. Adding these and dividing by 2 yields the desired inequality.

# BxMO 2021: Problems and Solutions

#

solution_match: # Solution 3


problem:
Pebbles are placed on a $2021 \times 2021$ board in such a way that each square contains at most one pebble. The pebble set of a square of the board is the collection of all pebbles which are in the same row or column as this square. Determine the least number of pebbles that can be placed on the board in such a way that no two squares have the same pebble set.

#

solution:
Let $N \geqslant 1$ be a positive integer. We claim that the least number of pebbles that can be placed on a $(2 N+1) \times(2 N+1)$ chessboard in such a way that no two squares of the board have the same pebble set is $3 N+1$. The problem has $N=1010$, so at least 3031 pebbles are needed.

We begin by placing $(2 N+1)+N=3 N+1$ pebbles on the board as shown. The construction extends to all values of $N$, and one checks that no two squares on the board have the same pebble set.
![](https://cdn.mathpix.com/cropped/2024_12_15_7ed0b6fed5333a54e9a5g-4.jpg?height=366&width=960&top_left_y=1165&top_left_x=551)

We are left to show that the number of pebbles, $P$, that must be placed on the board is at least $3 N+1$. Suppose that there exists an empty row. Any other row must then contain at least two pebbles. Indeed, if another row is empty, Figure [1], or contains exactly one pebble, Figure [2], then there are two squares (shaded in the figures below) with the same pebble set. So in this case there are at least $P \geqslant 2(2 N+1-1)=4 N \geqslant 3 N+1$ pebbles on the board. The same argument applies, mutatis mutandis, to the columns of the board.
![](https://cdn.mathpix.com/cropped/2024_12_15_7ed0b6fed5333a54e9a5g-4.jpg?height=292&width=1543&top_left_y=1864&top_left_x=268)

On the other hand, suppose that each each row and each column contains at least one pebble. Let $k$ the number of rows containing precisely one pebble. Counting the number of pebbles per row shows that $P \geqslant k+2(2 N+1-k)$. To count the number of pebbles per column, note that the $k$ pebbles that are the only ones in their row must be in $k$ distinct columns, Figure [3]. Furthermore, at most one of these $k$ columns only has one pebble in it, Figure [4]. So these $k$ columns contain a total of at least $2 k-1$ pebbles, while the remaining columns contain at least one each. Hence $P \geqslant(2 k-1)+(2 N+1-k)$. Adding these two inequalities we get $2 P \geqslant 6 N+2$.

Remark. For a $2 N \times 2 N$ board, at least $3 N$ pebbles are needed. The proof is similar: if there is an empty line, then $P \geqslant 2(2 N-1) \geqslant 3 N$ for $N \geqslant 2$. If there is no empty line, then $2 P \geqslant 6 N-1$. A construction similar to that of the odd boards works. While the construction is unique in the odd case, up to permutation of rows and columns, that is not true for even boards.

## BxMO 2021: Problems and Solutions

#

problem_match: # Problem 2

solution_match: # Solution


problem:
A cyclic quadrilateral $A B X C$ has circumcentre $O$. Let $D$ be a point on line $B X$ such that $|A D|=|B D|$. Let $E$ be a point on line $C X$ such that $|A E|=|C E|$. Prove that the circumcentre of triangle $\triangle D E X$ lies on the perpendicular bisector of $O A$.

#

solution:
First, note that $\angle A O X=2 \angle A B X=2\left(180^{\circ}-\angle A C X\right)=2 \angle A C E$ as $A B X C$ is cyclic. Secondly, both $\triangle D A B$ and $\triangle E A C$ are isosceles, which implies that $\angle A E X=\angle A E C=180^{\circ}-2 \angle A C E=180^{\circ}-\angle A O X$ and $\angle A D X=$ $\angle A D B=180^{\circ}-2 \angle A B D=180^{\circ}-2 \angle A B X=180^{\circ}-\angle A O X$. From this, see that respectively $A E X O$ and $A D X O$ are cyclic, i.e. $A E D X O$ is cyclic.

Hence, the circumcentre of $\triangle D E X$ is also the circumcentre of $A E D X O$. However, as in a circle any perpendicular bisector of a chord goes through the centre of the circle, we find that the circumcentre of $\triangle D E X$ lies on the perpendicular bisector of $O A$.
![](https://cdn.mathpix.com/cropped/2024_12_15_7ed0b6fed5333a54e9a5g-5.jpg?height=1086&width=891&top_left_y=1222&top_left_x=611)

#

problem_match: # Problem 3


solution:
In this solution, we use directed angles $\measuredangle$. We have $\measuredangle A B D=\measuredangle A B X=\measuredangle A C X=\measuredangle A C E$ and since $\triangle A B D$ and $\triangle A C E$ are both isosceles, we see that $\triangle A B D \sim \triangle A C E$ with equal orientation. This means that there exists a spiral symmetry $T$ with centre $A$ such that $T(B)=D$ and $T(C)=E$. Now let $O^{\prime}$ be the centre of $\odot D E X$. Then we find $\measuredangle D O^{\prime} E=2 \measuredangle D X E=2 \measuredangle B X C=\measuredangle B O C$. Moreover, $\triangle D O^{\prime} E$ and $\triangle B O C$ are isosceles, so we have $\triangle D O^{\prime} E \sim \triangle B O C$ with equal orientation. This means that $T$ must send $O$ to $O^{\prime}$, so in particular, $\triangle A O O^{\prime}$ is similar to $\triangle A B D$ and $\triangle A C E$. We conclude that $\left|A O^{\prime}\right|=\left|O O^{\prime}\right|$, from which the result follows.

# BxMO 2021: Problems and Solutions

#


problem:
A sequence $a_{1}, a_{2}, a_{3}, \ldots$ of positive integers satisfies $a_{1}>5$ and $a_{n+1}=5+6+\cdots+a_{n}$ for all positive integers $n$. Determine all prime numbers $p$ such that, regardless of the value of $a_{1}$, this sequence must contain a multiple of $p$.

#

solution:
We claim that the only prime number of which the sequence must contain a multiple is $p=2$. To prove this, we begin by noting that

$$
a_{n+1}=\frac{a_{n}\left(a_{n}+1\right)}{2}-10=\frac{\left(a_{n}-4\right)\left(a_{n}+5\right)}{2}
$$

Let $p>2$ be an odd prime, and choose $a_{1} \equiv-4(\bmod p)$, so $2 a_{2} \equiv(-4-4)(-4+5) \equiv-8(\bmod p)$, whence $a_{2} \equiv-4(\bmod p)$, since $p$ is odd. By induction, $a_{n} \equiv-4(\bmod p) \not \equiv 0(\bmod p)$ for all $n$, and so the sequence need not contain a multiple of $p$.

We are left to show that the sequence must contain an even number. Suppose to the contrary that $a_{n}$ is odd for $n=1,2, \ldots$ We observe that

$$
a_{n+1}-a_{n}=\frac{a_{n}\left(a_{n}+1\right)}{2}-\frac{a_{n-1}\left(a_{n-1}+1\right)}{2}=\frac{a_{n}-a_{n-1}}{2}\left(a_{n}+a_{n-1}+1\right)
$$

By assumption, $a_{n}+a_{n-1}+1$ is odd for $n=1,2, \ldots$, so this shows that $v_{2}\left(a_{n+1}-a_{n}\right)=v_{2}\left(a_{n}-a_{n-1}\right)-1$, and so there exists $N$ such that $v_{2}\left(a_{N+1}-a_{N}\right)=0$. This is a contradiction, because $a_{n+1}-a_{n}$ is even for $n=1,2, \ldots$ by assumption, and thus completes the proof.

#

problem_match: # Problem 4


solution:
For odd $p$, proceed as in solution 1 . Now let $p=2$, and suppose that every term of the sequence is odd. We claim that it follows that $a_{n} \equiv 5\left(\bmod 2^{k}\right)$ for every integer $n \geq 1$ and every integer $k \geq 1$. We proceed per induction on $k$. For $k=1$ this simply states that $a_{n}$ is odd for all integers $n \geq 1$, as assumed. Now suppose it is true for $k=r$. Let $k=r+1$. Take any integer $n \geq 1$. Note that, by the induction hypothesis, $a_{n} \equiv 5\left(\bmod 2^{r}\right)$. Therefore there exists an integer $s$ such that $a_{n}=2^{r} s+5$. Now note that

$$
a_{n+1}=\frac{\left(a_{n}-4\right)\left(a_{n}+5\right)}{2}=\frac{\left(2^{r} s+1\right)\left(2^{r} s+10\right)}{2}=\left(2^{r} s+1\right)\left(2^{r-1} s+5\right) \equiv 2^{r-1} s+5 \quad\left(\bmod 2^{r}\right)
$$

By the induction hypothesis, $a_{n+1} \equiv 5\left(\bmod 2^{r}\right)$. Therefore $s$ is even, such that $a_{n}$ is of the form $2^{r+1} s+5$ for any integer $n \geq 1$, which concludes the induction. From this property, it follows that $a_{1}-5$ is divisible by $2^{k}$ for every integer $k \geq 1$, which is only possible if $a_{1}=5$. But $a_{1}>5$, so this is a contradiction.