exam: INMO

problem: In triangle $A B C$ with $C A=C B$, point $E$ lies on the circumcircle of $A B C$ such that $\angle E C B=90^{\circ}$. The line through $E$ parallel to $C B$ intersects $C A$ in $F$ and $A B$ in $G$. Prove that the centre of the circumcircle of triangle $E G B$ lies on the circumcircle of triangle $E C F$.

solution:
![](https://cdn.mathpix.com/cropped/2024_06_05_f7139847dc7ac8d9c391g-1.jpg?height=731&width=1554&top_left_y=834&top_left_x=271)

We have $F G=F A$ since $F G$ is parallel to $B C$. But also $\triangle G A E$ is a right angle triangle. Thus, if $F^{\prime}$ is the midpoint of $G E$, then $\angle G A F=\angle F G A=\angle F^{\prime} G A=\angle G A F^{\prime}$ which implies $F \equiv F^{\prime}$. Thus, $F$ is the midpoint of $G E$.

If $O$ is the circumcenter of $\triangle E B G$, then

$$
\angle F O E=\angle G B E=\angle A B E=\angle A C E=\angle F C E
$$

Thus, we get $\angle F O E=\angle F C E$ as desired.

problem_match: Problem 1.

solution_match: ## Solution 1.


solution:
( $\angle B C A$ acute case) Let $O_{1}$ be the circumcenter of $\triangle A B C, O$ be the circumcenter of $\triangle E B G$ and $\omega$ be the circumcircle of $\triangle E C F$.

First, show that $F$ is the midpoint of $E G$ as in Solution 1. Next, we show that $O_{1}$ lies on $\omega$. This follows from

$$
\angle E O_{1} C=2 \angle E B C=2 \angle O_{1} B C=2 \angle B C O_{1}=\angle B C A=\angle E F C
$$

Now, $O_{1}$ is the midpoint of $E B$ and $F$ is the midpoint of $E G$, therefore the homothety at $E$ with ratio $1 / 2$ takes $\triangle E G B$ to $\triangle E F O_{1}$. Thus, it takes $O$, the circumcenter of $\triangle E G B$, to the circumcenter of $\triangle E F O_{1}$, thus proving that the midpoint of $E O$ is the center of $\omega$. This immediately implies that $O$ lies on $\omega$.

## Remark.

- There are two configurations possible in the above problem, one for $C$ acute and one for obtuse. One may replace all the angles in the above solutions by directed angles to obtain a solution which remains invariant in all configurations.
- There is a direct solution by first proving that $O$ is on $B C$ by calculating $\angle E B O$ and then proving that $\angle O C F=\angle O E F$. However, this needs more care for handling both configurations.

solution_match: Solution 2.


problem: All the squares of a $2024 \times 2024$ board are coloured white. In one move, Mohit can select one row or column whose every square is white, choose exactly 1000 squares in this row or column, and colour all of them red. Find the maximum number of squares that Mohit can colour red in a finite number of moves.

solution:
Let $n=2024$ and $k=1000$. We claim that the maximum number of squares that can be coloured in this way is $k(2 n-k)$, which evaluates to 3048000 .

Indeed, call a row/column bad if it has at least one red square. After the first move, there are exactly $k+1$ bad rows and columns: if a row was picked, then that row and the $k$ columns corresponding to the chosen squares are all bad. Any subsequent move increases the number of bad rows/columns by at least 1 . Since there are only $2 n$ rows and columns, we can make at most $2 n-(k+1)$ moves after the first one, and so at most $2 n-k$ moves can be made in total. Thus we can have at most $k(2 n-k)$ red squares.

To prove this is achievable, let's choose each of the $n$ columns in the first $n$ moves, and colour the top $k$ cells in these columns. Then, the bottom $n-k$ rows are still uncoloured, so we can make $n-k$ more moves, colouring $k(n+n-k)$ cells in total.

problem_match: Problem 2.

solution_match: Solution.


problem:
Let $p$ be an odd prime number and $a, b, c$ be integers so that the integers

$$
a^{2023}+b^{2023}, \quad b^{2024}+c^{2024}, \quad c^{2025}+a^{2025}
$$

are all divisible by $p$. Prove that $p$ divides each of $a, b$, and $c$.

solution:
Set $k=2023$. If one of $a, b, c$ is divisible by $p$, then all of them are. Indeed, for example, if $p \mid a$, then $p \mid a^{k}+b^{k}$ implies $p \mid b$, and then $p \mid b^{k+1}+c^{k+1}$ implies $p \mid c$. The other cases follow similarly.

So for the sake of contradiction assume none of $a, b, c$ is divisible by $p$. Then

$$
a^{k(k+2)} \equiv\left(a^{k}\right)^{k+2} \equiv\left(-b^{k}\right)^{k+2} \equiv-b^{k(k+2)} \quad(\bmod p)
$$

and

$$
a^{k(k+2)} \equiv\left(a^{k+2}\right)^{k}=\left(-c^{k+2}\right)^{k} \equiv-c^{k(k+2)} \quad(\bmod p)
$$

So $b^{k(k+2)} \equiv c^{k(k+2)}(\bmod p)$. But then

$$
c^{k(k+2)} \cdot c \equiv c^{(k+1)^{2}} \equiv\left(-b^{k+1}\right)^{k+1} \equiv b^{(k+1)^{2}} \equiv b^{k(k+2)} \cdot b \equiv c^{k(k+2)} \cdot b \quad(\bmod p)
$$

which forces $b \equiv c(\bmod p)$. Thus

$$
0 \equiv b^{k+1}+c^{k+1}=2 b^{k+1} \quad(\bmod p)
$$

implying $p \mid b$, a contradiction. Thus the proof is complete.

problem_match: Problem 3.

solution_match: Solution 1.


solution:
As before, we may assume $p$ divides none of $a, b$, and $c$ and set $k=2023$. Then

$$
\begin{aligned}
a^{k} & \equiv-b^{k} \quad(\bmod p) \\
b^{k+1} & \equiv-c^{k+1} \quad(\bmod p) \\
c^{k+2} & \equiv-a^{k+2} \quad(\bmod p)
\end{aligned}
$$

and multiplying these three equations yields $a^{k} b^{k+1} c^{k+2} \equiv-b^{k} c^{k+1} a^{k+2}(\bmod p)$. By cancelling the factor $a^{k} b^{k} c^{k+1}$, we get $a^{2} \equiv-b c(\bmod p)$. Now

$$
p \mid a^{k}+b^{k} \Longrightarrow a^{4 k} \equiv b^{4 k} \quad(\bmod p) \Longrightarrow c^{2 k} \equiv b^{2 k} \quad(\bmod p)
$$

so

$$
p \mid b^{k+1}+c^{k+1} \Longrightarrow b^{2(k+1)} \equiv c^{2(k+1)} \quad(\bmod p) \Longrightarrow b^{2} \equiv c^{2} \quad(\bmod p)
$$

so either $b \equiv c(\bmod p)$ or $b \equiv-c(\bmod p)$. In the latter case, $a^{2} \equiv c^{2}(\bmod p)$ so $a \equiv c$ $(\bmod p)$ or $a \equiv-c(\bmod p)$. In any case, two out of $\{a, b, c\}$ are the same $\bmod p$, so one of the equations gives $p \mid 2 x^{y}$ where $x \in\{a, b, c\}$ and $y \in\{k, k+1, k+2\}$, hence $p$ odd implies $p \mid x$ so $p \mid a b c$, the desired contradiction.


solution:
We have

$$
\begin{aligned}
a^{2023} & \equiv-b^{2023} \quad(\bmod p) \\
b^{2024} & \equiv-c^{2024} \quad(\bmod p) \\
c^{2025} & \equiv-a^{2025} \quad(\bmod p)
\end{aligned}
$$

Thus,

$$
\begin{aligned}
a^{2023 \cdot 2024 \cdot 2025} & \equiv b^{2023 \cdot 2024 \cdot 2025} \quad(\bmod p) \quad \text { by }(1) \\
& \equiv-c^{2023 \cdot 2024 \cdot 2025} \quad(\bmod p) \quad \text { by }(2) \\
& \equiv-a^{2023 \cdot 2024 \cdot 2025} \quad(\bmod p) \quad \text { by }(3)
\end{aligned}
$$

Thus, $p \mid 2 \cdot a^{2023 \cdot 2024 \cdot 2025}$ and hence $p \mid a$ since $p$ is odd. Now, finish as before.

## Remark.

- Solution 3 is the shortest, and seems to crucially relies on 2024 being even but it can be modified to always work. In particular, instead of raising to power $k(k+1)(k+2)$, we raise it to $\operatorname{lcm}(k, k+1, k+2)$. This method even works if we have a longer chain of equations and more variables i.e. $p \mid a_{i}^{k+i}+a_{i+1}^{k+i}$ for all $i$ in $0, \cdots, n-1$ and $a_{n}=a_{0}$.
- There are other possible approaches: one using primitive roots and another using orders. These proceed by considering the highest power of 2 dividing the exponents of the primitive root or order of $a b^{-1} \bmod p$ respectively.

solution_match: Solution 3.


problem:
A finite set $S$ of positive integers is called cardinal if $S$ contains the integer $|S|$, where $|S|$ denotes the number of distinct elements in $S$. Let $f$ be a function from the set of positive integers to itself, such that for any cardinal set $S$, the set $f(S)$ is also cardinal. Here $f(S)$ denotes the set of all integers that can be expressed as $f(a)$ for some $a$ in $S$. Find all possible values of $f(2024)$.

Note: As an example, $\{1,3,5\}$ is a cardinal set because it has exactly 3 distinct elements, and the set contains 3 .

solution:
The possible values are 1, 2, and 2024 .

Construction. The function $f(x)=1$ for all $x \in \mathbb{N}$ works. Also, $f(x)=1$ for all $x \neq 2024$ and $f(2024)=2$, works. Finally, $f(x)=x$ for all $x \in \mathbb{N}$ works as well.

It remains to show these are the only possible values for $f(2024)$.

Proof. Denote $\operatorname{Im}(f)=\{f(x) \mid x \in \mathbb{N}\}$. The cardinal set $\{1\}$ gives $f(1)=1$. Consider the following two cases:

- $\operatorname{Im}(f)$ is unbounded. Fix any $n \in \mathbb{N}$, with $n>1$. Pick $n-1$ distinct integers $k_{1}, \ldots, k_{n-1}$ such that $f\left(k_{i}\right) \notin\{n, f(n)\}$ and $f\left(k_{i}\right)$ are all pairwise distinct, for $1 \leq i<n$. Then $\left\{n, k_{1}, \ldots, k_{n-1}\right\}$ is a cardinal set. Then $\left\{f(n), f\left(k_{1}\right), \ldots, f\left(k_{n-1}\right)\right\}$ is a cardinal set with $n$ distinct elements, so $n$ lies in this set, hence $f(n)=n$. This gives the identity function.
- $\operatorname{Im}(f)$ is bounded. Suppose $f(x) \leq M$ for all $x \in \mathbb{N}$ and some integer $M>0$.

Claim. For any integer $a$ satisfying $1 \leq a \leq M$, if there are infinitely many integers $n \in \mathbb{N}$ such that $f(n)=a$, then $a=1$.

Proof. Let $b>1$ be one of the integers with $f(b)=a$. Consider $b-1$ other integers $c_{1}, \ldots, c_{b-1}$, such that $f\left(c_{i}\right)=a$ for $1 \leq i<b$, and $c_{i}$ are all pairwise distinct. Then $\left\{b, c_{1}, \ldots, c_{b-1}\right\}$ is a cardinal set, so the image set, which consists of the singleton $\{a\}$ is cardinal, hence $a=1$.

So for every $2 \leq m \leq M$, there are only finitely many integers $x$ such that $f(x)=m$. Thus, there exists an integer $N>1$ such that for all $n \geq N, f(n)=1$. Now for every $1<l<N$, consider the cardinal set $\{l, N+1, N+2, \ldots, N+l-1\}$. Then the image set consists of $\{1, f(l)\}$, which can be cardinal only when $f(l)=1$ or $f(l)=2$.

By the above reasoning, $f(2024)$ can only be 1,2 , or 2024 , each of which occurs as an example.

problem_match: Problem 4.


solution:
We present a second proof of the fact that the proposed values are the only possibilities. Considering the singleton cardinal set $\{1\}$, we see that $f(1)=1$. The cardinal set $\{1,2\}$ gets mapped to $\{1, f(2)\}$, so $f(2)$ must be 2 or 1 .

Case 1. Suppose $f(2)=1$. Now $\{2,2024\}$ is a cardinal set, and therefore so is $\{1, f(2024)\}$. This means $f(2024)$ is 1 or 2 .

Case 2. Suppose $f(2)=2$. The cardinal set $f(\{1,2,3\})=\{1,2, f(3)\}$ shows that $f(3) \in$ $\{1,2,3\}$, but the cardinal set $f(\{2,3\})=\{2, f(3)\}$ proves $f(3)$ cannot be 2 . Thus there are two sub-cases:


problem:
Let points $A_{1}, A_{2}$, and $A_{3}$ lie on the circle $\Gamma$ in counter-clockwise order, and let $P$ be a point in the same plane. For $i \in\{1,2,3\}$, let $\tau_{i}$ denote the counter-clockwise rotation of the plane centred at $A_{i}$, where the angle of the rotation is equal to the angle at vertex $A_{i}$ in $\triangle A_{1} A_{2} A_{3}$. Further, define $P_{i}$ to be the point $\tau_{i+2}\left(\tau_{i}\left(\tau_{i+1}(P)\right)\right)$, where indices are taken modulo 3 (i.e., $\tau_{4}=\tau_{1}$ and $\tau_{5}=\tau_{2}$ ).

Prove that the radius of the circumcircle of $\triangle P_{1} P_{2} P_{3}$ is at most the radius of $\Gamma$.

solution:
Fix an index $i \in\{1,2,3\}$. Let $D_{1}, D_{2}, D_{3}$ be the points of tangency of the incircle of triangle $\triangle A_{1} A_{2} A_{3}$ with its sides $A_{2} A_{3}, A_{3} A_{1}, A_{1} A_{2}$ respectively.

The key observation is that given a line $\ell$ in the plane, the image of $\ell$ under the mapping $\tau_{i+2}\left(\tau_{i}\left(\tau_{i+1}(\ell)\right)\right)$ is a line parallel to $\ell$. Indeed, $\ell$ is rotated thrice by angles equal to the angles of $\triangle A_{1} A_{2} A_{3}$, and the composition of these rotations induces a half-turn and translation on $\ell$ as the angles of $\triangle A_{1} A_{2} A_{3}$ add to $180^{\circ}$. Since $D_{i}$ is a fixed point of this transformation (by the chain of maps $D_{i} \xrightarrow{\tau_{i+1}} D_{i+2} \xrightarrow{\tau_{i}} D_{i+1} \xrightarrow{\tau_{i+2}} D_{i}$ ), we conclude that the line $\overline{P D_{i}}$ maps to the line $\overline{P_{i} D_{i}}$. But the two lines are parallel and both of them pass through $D_{i}$ hence they must coincide, so $D_{i}$ lies on $\overline{P P_{i}}$. Further, each rotation preserves distances, hence $P_{i}$ is the reflection of $P$ in $D_{i}$.

In other words, the triangle $P_{1} P_{2} P_{3}$ is obtained by applying a homothety with ratio 2 and center $P$ to the triangle $D_{1} D_{2} D_{3}$. Thus, the radius of the circumcircle of $\triangle P_{1} P_{2} P_{3}$ is twice the radius of the circumcircle of $\triangle D_{1} D_{2} D_{3}$, i.e., twice the radius of the incircle of $\triangle A_{1} A_{2} A_{3}$, which is known to be at most the radius of the circumcircle $\Gamma$.

problem_match: Problem 5.


solution:
Toss the figure on the complex plane, and let $A_{1}=a, A_{2}=b, A_{3}=c$ without loss of generality. Let the angles of the triangle at $A_{1}, A_{2}, A_{3}$ be denoted by $A, B, C$.

Now, for any complex number $z$, the rotation at $z_{0}$ with angle $\theta$ counterclockwise sends $z$ to $\left(z-z_{0}\right) e^{i \theta}+z_{0}$.

Therefore, one computes that

$$
\begin{aligned}
\tau_{321}(z)=\tau_{3}\left(\tau_{1}\left(\tau_{2}(z)\right)\right) & =\tau_{3}\left(\tau_{1}\left((z-b) e^{i B}+b\right)\right) \\
& =\tau_{3}\left(z e^{i(A+B)}+b e^{i A}\left(1-e^{i B}\right)+a\left(1-e^{i A}\right)\right) \\
& =-z+b+c+b e^{i(A+C)}+a e^{i C}-a e^{i(A+C)}-c e^{i C}
\end{aligned}
$$

Thus, $\tau_{312}(z)+z$ is independent of $z$. Similarly $\tau_{123}(z)+z$ and $\tau_{231}(z)+z$ are also independent of $z$. Note that adding $z$ is the same as translation by $z$, hence we have shown that the circumradius of $\triangle P_{1} P_{2} P_{3}$ is independent of $P$.

Thus, it suffices to prove the result for $z=z_{0}=a+b+c$. Let $U=-\tau_{312}\left(z_{0}\right), V=$ $-\tau_{123}\left(z_{0}\right), W=-\tau_{231}\left(z_{0}\right)$. So, it is enough to prove that the circumradius of $\triangle U V W$ at most the radius of $\Gamma$.

![](https://cdn.mathpix.com/cropped/2024_06_05_f7139847dc7ac8d9c391g-5.jpg?height=691&width=702&top_left_y=780&top_left_x=677)

Name the vertices $A_{1}, A_{2}, A_{3}$ as $A, B, C$ for convenience. Let the parallel line to $B C$ passing through $A$ intersect $\Gamma$ again at $K$. Similarly, define $L$ as the second intersection of the line through $B$ parallel to $C A$ and finally $M$ for $C$ parallel to $A B$.

We claim that $U$ lies on the line segment $\overline{A K}$ : We have $U=a-(b-a) e^{i(A+C)}+(c-a) e^{i C}$, hence $\overrightarrow{A U}$ is parallel to $\overrightarrow{A K}$ hence $U$ lies on the line $A K$. If $A B=A C$ then $U=A$, and the claim is proven. Else suppose that $A B<A C$. Then $\overrightarrow{A U}$ points towards $K$ and $|A U|=A C-A B$, so it suffices to show that $A K>A C-A B$. But this is clear because $K C B A$ is an isosceles trapezium, so $A B=K C$, and then triangle inequality on $\triangle K A C$ to get $K A+K C>A C$.

Thus, $U \in \overline{A K}$, and similarly $V \in \overline{B L}, W \in \overline{C M}$. We claim that for any $U, V, W$ on the segments $A K, B L, C M$ respectively, the circumradius of $\triangle U V W$ is less than or equal to the radius of $\Gamma$.

Now let $X, Y$ be two fixed points on the same side of a line $\ell$. Fix a side of $\overleftarrow{X Y}$, and let $Z$ be a variable point on $\ell$ which always remains on this fixed side of $\overleftarrow{X Y}$. Then the circumradius of $\triangle X Y Z$ is minimized at the unique point $Z_{0}$ (on this fixed side of $\overleftrightarrow{X Y}$ ) for which the circumcircle of $\triangle X Y Z_{0}$ is tangent to $\ell$ and it is a increasing function as one goes further away from this unique point $Z_{0}$. Thus, the maximum circumradius of $\triangle U V W$ is achieved only if $U \in\{A, K\}, V \in\{B, L\}, W \in\{C, M\}$. For each of these, the circumradius is the radius of $\Gamma$, hence we are done.

## Remark.

- The conclusion of Solution 1 used the fact that in a triangle $A B C$ with incentre $I$ and inradius $r$, and circumcentre $O$ and circumradius $R$, we have the inequality $R \geq 2 r$. This is called Euler's Inequality. The standard proof is that $0 \leq O I^{2}=$ $R^{2}-\operatorname{Pow}(I,(O, R))=R^{2}-2 R r$. The last equality holds as $\operatorname{Pow}(I,(O, R))=I A \cdot I M$ where $M$ is the midpoint of minor arc $\widehat{B C}$ in the circumcircle of $A B C$, and because $I A=\frac{r}{\sin \frac{A}{2}}$ and $I M=M B=\frac{a}{2 \cos \frac{A}{2}}=\frac{2 R \sin A}{2 \cos \frac{A}{2}}=2 R \sin \frac{A}{2}$ by using "the trident lemma" and the double-angle sine formulas.
- After proving that the circumradius is independent of $P$, one can take $P=I$, for which $P_{1}$ is easily seen to be the point such that $D_{1}$ is the midpoint of $I P_{1}$. Now we again finish by Euler's Inequality.


problem:
For each positive integer $n \geq 3$, define $A_{n}$ and $B_{n}$ as

$$
\begin{gathered}
A_{n}=\sqrt{n^{2}+1}+\sqrt{n^{2}+3}+\cdots+\sqrt{n^{2}+2 n-1} \\
B_{n}=\sqrt{n^{2}+2}+\sqrt{n^{2}+4}+\cdots+\sqrt{n^{2}+2 n}
\end{gathered}
$$

Determine all positive integers $n \geq 3$ for which $\left\lfloor A_{n}\right\rfloor=\left\lfloor B_{n}\right\rfloor$.

Note. For any real number $x,\lfloor x\rfloor$ denotes the largest integer $N$ such that $N \leq x$.

solution:
Let $M=n^{2}+\frac{1}{2} n$.

Lemma 1. $B_{n}-A_{n}<\frac{1}{2}$.

Indeed,

$$
\begin{array}{r}
\left(B_{n}-A_{n}\right)=\sum_{k=1}^{n}\left(\sqrt{n^{2}+2 k}-\sqrt{n^{2}+2 k-1}\right)=\sum_{k=1}^{n} \frac{1}{\sqrt{n^{2}+2 k}+\sqrt{n^{2}+2 k-1}}<\sum_{k=1}^{n} \frac{1}{2 n} \\
=\frac{n}{2 n}=\frac{1}{2}
\end{array}
$$

proving the lemma.

Lemma 2. $A_{n}<M<B_{n}$.

Proof. Observe that

$$
\begin{aligned}
& \left(A_{n}-n^{2}\right)=\sum_{k=1}^{n}\left(\sqrt{n^{2}+2 k-1}-n\right)=\sum_{k=1}^{n} \frac{2 k-1}{\sqrt{n^{2}+2 k-1}+n}<\sum_{k=1}^{n} \frac{2 k-1}{n+n}=\frac{n^{2}}{2 n} \\
& =\frac{n}{2}
\end{aligned}
$$

as $\sum_{k=1}^{n}(2 k-1)=n^{2}$, proving $A_{n}-n^{2}<\frac{n}{2}$ or $A_{n}<M$. Similarly,

$$
\begin{array}{r}
\left(B_{n}-n^{2}\right)=\sum_{k=1}^{n}\left(\sqrt{n^{2}+2 k}-n\right)=\sum_{k=1}^{n} \frac{2 k}{\sqrt{n^{2}+2 k}+n}>\sum_{k=1}^{n} \frac{2 k}{(n+1)+n} \\
=\frac{n(n+1)}{2 n+1}>\frac{n}{2}
\end{array}
$$

as $\sum_{k=1}^{n}(2 k)=n(n+1)$, so $B_{n}-n^{2}>\frac{n}{2}$ hence $B_{n}>M$, as desired.

By Lemma 2, we see that $A_{n}$ and $B_{n}$ are positive real numbers containing $M$ between them. When $n$ is even, $M$ is an integer. This implies $\left\lfloor A_{n}\right\rfloor<M$, but $\left\lfloor B_{n}\right\rfloor \geq M$, which means we cannot have $\left\lfloor A_{n}\right\rfloor=\left\lfloor B_{n}\right\rfloor$.

When $n$ is odd, $M$ is a half-integer, and thus $M-\frac{1}{2}$ and $M+\frac{1}{2}$ are consecutive integers. So the above two lemmas imply

$$
M-\frac{1}{2}<B_{n}-\left(B_{n}-A_{n}\right)=A_{n}<B_{n}=A_{n}+\left(B_{n}-A_{n}\right)<M+\frac{1}{2}
$$

This shows $\left\lfloor A_{n}\right\rfloor=\left\lfloor B_{n}\right\rfloor=M-\frac{1}{2}$.

Thus, the only integers $n \geq 3$ that satisfy the conditions are the odd numbers and all of them work.

problem_match: Problem 6.