% © Evan Chen
% Downloaded from https://web.evanchen.cc/
\documentclass[11pt]{scrartcl}
\usepackage[sexy]{evan}
\ihead{\footnotesize\textbf{\thetitle}}
\ohead{\footnotesize\href{http://web.evanchen.cc}{\ttfamily web.evanchen.cc},
updated \today}
\title{EGMO 2021 Solution Notes}
\date{\today}
\begin{document}
\maketitle
\begin{abstract}
This is a compilation of solutions
for the 2021 EGMO.
The ideas of the solution are a mix of my own work,
the solutions provided by the competition organizers,
and solutions found by the community.
However, all the writing is maintained by me.
These notes will tend to be a bit more advanced and terse than the ``official''
solutions from the organizers.
In particular, if a theorem or technique is not known to beginners
but is still considered ``standard'', then I often prefer to
use this theory anyways, rather than try to work around or conceal it.
For example, in geometry problems I typically use directed angles
without further comment, rather than awkwardly work around configuration issues.
Similarly, sentences like ``let $\mathbb{R}$ denote the set of real numbers''
are typically omitted entirely.
Corrections and comments are welcome!
\end{abstract}
\tableofcontents
\newpage
\addtocounter{section}{-1}
\section{Problems}
\begin{enumerate}[\bfseries 1.]
\item %% Problem 1
The number $2021$ is fantabulous.
For any positive integer $m$,
if any element of the set $\{m, 2m+1, 3m\}$ is fantabulous,
then all the elements are fantabulous.
Does it follow that the number $2021^{2021}$ is fantabulous?
\item %% Problem 2
Find all functions $f \colon \QQ \to \QQ$
such that the equation
\[f(xf(x)+y) = f(y) + x^2\]
holds for all rational numbers $x$ and $y$.
\item %% Problem 3
Let $ABC$ be a triangle with an obtuse angle at $A$.
Let $E$ and $F$ be the intersections of the external bisector of angle $A$
with the altitudes of $ABC$ through $B$ and $C$ respectively.
Let $M$ and $N$ be the points on the segments $EC$ and $FB$ respectively
such that $\angle EMA = \angle BCA$ and $\angle ANF = \angle ABC$.
Prove that the points $E$, $F$, $N$, $M$ lie on a circle.
\item %% Problem 4
Let $ABC$ be a triangle with incenter $I$
and let $D$ be an arbitrary point on the side $BC$.
Let the line through $D$ perpendicular to $BI$ intersect $CI$ at $E$.
Let the line through $D$ perpendicular to $CI$ intersect $BI$ at $F$.
Prove that the reflection of $A$ across the line $EF$ lies on the line $BC$.
\item %% Problem 5
A plane has a special point $O$ called the origin.
Let $P$ be a set of $2021$ points in the plane such that
\begin{itemize}
\ii no three points in $P$ lie on a line and
\ii no two points in $P$ lie on a line through the origin.
\end{itemize}
A triangle with vertices in $P$ is \emph{fat}
if $O$ is strictly inside the triangle.
Find the maximum number of fat triangles.
\item %% Problem 6
Does there exist a nonnegative integer $a$ for which the equation
\[\left\lfloor\frac{m}{1}\right\rfloor
+ \left\lfloor\frac{m}{2}\right\rfloor
+ \left\lfloor\frac{m}{3}\right\rfloor
+ \dotsb + \left\lfloor\frac{m}{m}\right\rfloor = n^2 + a \]
has more than one million different solutions
$(m, n)$ where $m$ and $n$ are positive integers?
\end{enumerate}
\pagebreak
\section{Solutions to Day 1}
\subsection{EGMO 2021/1, proposed by Angelo Di Pasquale (AUS)}
\textsl{Available online at \url{https://aops.com/community/p21455194}.}
\begin{mdframed}[style=mdpurplebox,frametitle={Problem statement}]
The number $2021$ is fantabulous.
For any positive integer $m$,
if any element of the set $\{m, 2m+1, 3m\}$ is fantabulous,
then all the elements are fantabulous.
Does it follow that the number $2021^{2021}$ is fantabulous?
\end{mdframed}
Write $a \iff b$ to mean $a$ fantabulous iff $b$ fantabulous.
Notice that for any integer $n$, we have
\[ 2n \iff 4n+1 \iff 12n+3 \iff 6n+1 \iff 3n \iff n. \]
Together with the given $2n+1 \iff n$,
it follows that if any integer is fantabulous then all of them are.
\pagebreak
\subsection{EGMO 2021/2, proposed by Patrik Bak (SVK)}
\textsl{Available online at \url{https://aops.com/community/p21455202}.}
\begin{mdframed}[style=mdpurplebox,frametitle={Problem statement}]
Find all functions $f \colon \QQ \to \QQ$
such that the equation
\[f(xf(x)+y) = f(y) + x^2\]
holds for all rational numbers $x$ and $y$.
\end{mdframed}
The answers are $f(x) \equiv +x$
and $f(x) \equiv -x$ which work.
To show they are the only ones,
we follow an approach similar to \texttt{SnowPanda}.
\begin{claim*}
If $f(z) = 0$ then $z = 0$.
In other words, $f$ has at most one root, at $0$.
\end{claim*}
\begin{proof}
Take $P(z,0)$.
\end{proof}
\begin{claim*}
The function $f$ is linear.
\end{claim*}
\begin{proof}
Let $a,b \in \QQ$ be any two nonzero rational numbers, so $f(a), f(b) \neq 0$.
Choose nonzero integers $m$ and $n$ such that
\[ \frac nm = \frac{af(a)}{bf(b)}. \]
Then for any $y \in \QQ$ we have
\begin{align*}
f(y + maf(a)) &= f(y) + m \cdot a^2 \\
f(y + nbf(b)) &= f(y) + n \cdot b^2.
\end{align*}
The two left-hand sides were equal by construction, so we get
\[ \frac{af(a)}{bf(b)} = \frac nm = \frac{a^2}{b^2}. \]
Thus $f(a) / a = f(b) / b$, as needed.
\end{proof}
Once $f$ is linear we here quickly recover the solution set.
\pagebreak
\subsection{EGMO 2021/3, proposed by Anton Trygub (UKR)}
\textsl{Available online at \url{https://aops.com/community/p21455206}.}
\begin{mdframed}[style=mdpurplebox,frametitle={Problem statement}]
Let $ABC$ be a triangle with an obtuse angle at $A$.
Let $E$ and $F$ be the intersections of the external bisector of angle $A$
with the altitudes of $ABC$ through $B$ and $C$ respectively.
Let $M$ and $N$ be the points on the segments $EC$ and $FB$ respectively
such that $\angle EMA = \angle BCA$ and $\angle ANF = \angle ABC$.
Prove that the points $E$, $F$, $N$, $M$ lie on a circle.
\end{mdframed}
Call the altitudes $\ol{BZ}$ and $\ol{CY}$,
and $H$ the orthocenter.
Let $W$ be the midpoint of $\ol{BC}$.
Then according to
\textbf{\href{https://aops.com/community/c6h89098p519896}{IMO Shortlist 2005 G5}},
the line $AW$ is concurrent
with $(HYZ)$, $(HEF)$, $(HBC)$ at a point $Q$.
\begin{center}
\begin{asy}
import graph; size(9.98895cm);
pen ffxfqq = rgb(1.,0.49803,0.); pen yqqqqq = rgb(0.50196,0.,0.); pen zzttqq = rgb(0.6,0.2,0.); pen qqwuqq = rgb(0.,0.39215,0.);
pair H = (0.2,3.2), B = (-1.,0.2), C = (2.2,0.2), A = (0.2,1.), Y = (-0.55862,1.30344), Z = (1.21538,1.67692), F = (1.57146,1.14279), Q = (-0.68,2.76), M = (0.87710,0.51931);
draw(H--B--C--cycle, linewidth(0.6) + zzttqq);
draw(circle((0.34465,1.81068), 1.39682), linewidth(0.6) + ffxfqq);
draw(circle((0.2,2.1), 1.1), linewidth(0.6) + yqqqqq);
draw(circle((0.6,1.3), 1.94164), linewidth(0.6) + yqqqqq);
draw(H--B, linewidth(0.6) + zzttqq);
draw(B--C, linewidth(0.6) + zzttqq);
draw(C--H, linewidth(0.6) + zzttqq);
draw(B--Z, linewidth(0.6));
draw(C--Y, linewidth(0.6));
draw(B--F, linewidth(0.6) + blue);
draw(C--(-0.71824,0.90439), linewidth(0.6) + blue);
draw((0.6,0.2)--Q, linewidth(0.6) + green);
draw(circle((-1.,1.5), 1.3), linewidth(0.6) + qqwuqq);
draw((-0.71824,0.90439)--F, linewidth(0.6) + yqqqqq);
dot("$H$", H, dir((-5.899, 6.902)));
dot("$B$", B, dir((-8.675, -9.665)));
dot("$C$", C, dir((5.858, -4.103)));
dot("$A$", A, dir((1.801, 3.594)));
dot("$Y$", Y, dir((-13.028, -3.649)));
dot("$Z$", Z, dir((6.784, -1.212)));
dot("$E$", (-0.71824,0.90439), dir((-10.327, -2.673)));
dot("$F$", F, dir((7.966, -3.412)));
dot("$Q$", Q, dir((-8.162, 8.978)));
dot("$N$", (-0.15969,0.50808), dir((1.837, -9.672)));
dot("$W$", (0.6,0.2), dir((-1.409, -11.804)));
dot("$M$", M, dir((-1.312, -9.939)));
\end{asy}
\end{center}
Since $WA \cdot WQ = WB^2$,
it follows that $(AQB)$ is tangent to $\ol{BC}$,
ergo $N \in (AQB)$.
Then
\[ \dang QNF = \dang QNB = \dang QAB = \dang QAZ = \dang QHZ = \dang QHF \]
and hence $N$ lies on $(HQEF)$.
Similarly, so does $M$.
\pagebreak
\section{Solutions to Day 2}
\subsection{EGMO 2021/4, proposed by Sampson Wong (AUS)}
\textsl{Available online at \url{https://aops.com/community/p21455215}.}
\begin{mdframed}[style=mdpurplebox,frametitle={Problem statement}]
Let $ABC$ be a triangle with incenter $I$
and let $D$ be an arbitrary point on the side $BC$.
Let the line through $D$ perpendicular to $BI$ intersect $CI$ at $E$.
Let the line through $D$ perpendicular to $CI$ intersect $BI$ at $F$.
Prove that the reflection of $A$ across the line $EF$ lies on the line $BC$.
\end{mdframed}
We begin as follows:
\begin{claim*}
$AEIF$ is cyclic.
\end{claim*}
\begin{proof}
Let $X = \ol{CA} \cap \ol{DF}$.
Then
\begin{align*}
\dang FXA &= \dang DXC = \dang CDX = 90\dg - \half C
= \dang AIB = \dang FIA \\
\dang EXF &= \dang EXD = \dang XDE = \dang FDE = \dang EIF
\end{align*}
which implies $AFXI$ and $FXIE$ are cyclic, respectively.
\end{proof}
\begin{center}
\begin{asy}
pair A = dir(110);
pair B = dir(210);
pair C = dir(330);
pair D = 0.7*C+0.3*B;
pair I = incenter(A, B, C);
pair E = extension(C, I, D, foot(D, B, I));
pair F = extension(B, I, D, foot(D, C, I));
filldraw(A--B--C--cycle, opacity(0.1)+lightcyan, deepcyan);
draw(B--F, lightblue);
draw(C--I--A, lightblue);
filldraw(D--E--F--cycle, opacity(0.1)+lightred, red);
filldraw(circumcircle(A, E, F), opacity(0.1)+yellow, deepgreen+dashed);
pair Y = extension(D, E, A, B);
pair X = extension(D, F, A, C);
draw(D--Y, red);
dot("$A$", A, dir(A));
dot("$B$", B, dir(B));
dot("$C$", C, dir(C));
dot("$D$", D, dir(270));
dot("$I$", I, dir(250));
dot("$E$", E, dir(225));
dot("$F$", F, dir(F));
dot(Y);
dot("$X$", X, dir(X));
/* TSQ Source:
A = dir 110
B = dir 210
C = dir 330
D = 0.7*C+0.3*B R270
I = incenter A B C R250
E = extension C I D foot D B I R225
F = extension B I D foot D C I
A--B--C--cycle 0.1 lightcyan / deepcyan
B--F lightblue
C--I--A lightblue
D--E--F--cycle 0.1 lightred / red
circumcircle A E F 0.1 yellow / deepgreen dashed
Y .= extension D E A B
X = extension D F A C
D--Y red
*/
\end{asy}
\end{center}
Now, the dilation of the Simson line of $A$
to $\triangle IEF$ should be collinear,
but the reflections of $A$ about lines $BI$ and $CI$
lie on line $BC$ by definition.
This solves the problem.
\pagebreak
\subsection{EGMO 2021/5, proposed by Veronika Schreitter (AUT)}
\textsl{Available online at \url{https://aops.com/community/p21455223}.}
\begin{mdframed}[style=mdpurplebox,frametitle={Problem statement}]
A plane has a special point $O$ called the origin.
Let $P$ be a set of $2021$ points in the plane such that
\begin{itemize}
\ii no three points in $P$ lie on a line and
\ii no two points in $P$ lie on a line through the origin.
\end{itemize}
A triangle with vertices in $P$ is \emph{fat}
if $O$ is strictly inside the triangle.
Find the maximum number of fat triangles.
\end{mdframed}
For every pair of points $P$ and $Q$,
draw a directed arrow $P \to Q$ if $\angle POQ$ is labeled clockwise.
This gives a tournament on $2021$ vertices,
and a triangle is fat if its three edges form a directed cycle.
Consequently, by
\href{https://aops.com/community/c6h130647p740398}{\textbf{Canada 2006/4}},
there are at most $\frac16 n(n+1)(2n+1)$
fat triangles, where $n = 1010$.
Equality occurs if the set of points are the vertices of a regular
$2021$-gon containing $O$.
\pagebreak
\subsection{EGMO 2021/6, proposed by Veronika Schreitter (AUT)}
\textsl{Available online at \url{https://aops.com/community/p21455228}.}
\begin{mdframed}[style=mdpurplebox,frametitle={Problem statement}]
Does there exist a nonnegative integer $a$ for which the equation
\[\left\lfloor\frac{m}{1}\right\rfloor
+ \left\lfloor\frac{m}{2}\right\rfloor
+ \left\lfloor\frac{m}{3}\right\rfloor
+ \dotsb + \left\lfloor\frac{m}{m}\right\rfloor = n^2 + a \]
has more than one million different solutions
$(m, n)$ where $m$ and $n$ are positive integers?
\end{mdframed}
The answer is yes.
In fact, we prove the following general version:
\begin{claim*}
Consider any function $f \colon \NN \to \NN$
satisfying $f(m) = o(m^2)$.
Then for some $a$, the equation
\[ f(m) = n^2 + a \]
has at least 1000000 solutions $(m,n)$.
\end{claim*}
\begin{proof}
We consider triples $(m,n,a)$ satisfying the equation
with the additional property that
\[ n = \left\lfloor \sqrt{f(m)} \right\rfloor^2
\implies a = f(m) - n^2 \in [0, 2\sqrt{f(m)}]. \]
Now, let $M$ be large enough that
$\max_{m=1}^M f(m) < \frac{M^2}{2 \cdot 10^{12}}$.
Then there are $M$ triples,
but $a < \frac{M}{10^6}$ in each triple.
So some $a$ appears $10^6$ times.
\end{proof}
\pagebreak
\end{document}