USAMO 2017 Solution Notes
Evan Chen《陳誼廷》
15 April 2024
This is a compilation of solutions for the 2017 USAMO. 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!
Contents
0 Problems ..... 2 1 Solutions to Day 1 ..... 3 1.1 USAMO 2017/1, proposed by Gregory Galperin ..... 3 1.2 USAMO 2017/2, proposed by Maria Monks ..... 4 1.3 USAMO 2017/3, proposed by Evan Chen 2 Solutions to Day 2 ..... 9 2.1 USAMO 2017/4, proposed by Maria Monks ..... 9 2.2 USAMO 2017/5, proposed by Ricky Liu ..... 12 2.3 USAMO 2017/6, proposed by Titu Andreescu ..... 14
§0 Problems
- Prove that there exist infinitely many pairs of relatively prime positive integers $a, b>1$ for which $a+b$ divides $a^{b}+b^{a}$.
- Let $m_{1}, m_{2}, \ldots, m_{n}$ be a collection of $n$ positive integers, not necessarily distinct. For any sequence of integers $A=\left(a_{1}, \ldots, a_{n}\right)$ and any permutation $w=w_{1}, \ldots, w_{n}$ of $m_{1}, \ldots, m_{n}$, define an $A$-inversion of $w$ to be a pair of entries $w_{i}, w_{j}$ with $i<j$ for which one of the following conditions holds:
- $a_{i} \geq w_{i}>w_{j}$,
- $w_{j}>a_{i} \geq w_{i}$, or
- $w_{i}>w_{j}>a_{i}$.
Show that, for any two sequences of integers $A=\left(a_{1}, \ldots, a_{n}\right)$ and $B=\left(b_{1}, \ldots, b_{n}\right)$, and for any positive integer $k$, the number of permutations of $m_{1}, \ldots, m_{n}$ having exactly $k A$-inversions is equal to the number of permutations of $m_{1}, \ldots, m_{n}$ having exactly $k B$-inversions. 3. Let $A B C$ be a scalene triangle with circumcircle $\Omega$ and incenter $I$. Ray $A I$ meets $\overline{B C}$ at $D$ and $\Omega$ again at $M$; the circle with diameter $\overline{D M}$ cuts $\Omega$ again at $K$. Lines $M K$ and $B C$ meet at $S$, and $N$ is the midpoint of $\overline{I S}$. The circumcircles of $\triangle K I D$ and $\triangle M A N$ intersect at points $L_{1}$ and $L_{2}$. Prove that $\Omega$ passes through the midpoint of either $\overline{I L_{1}}$ or $\overline{I L_{2}}$. 4. Let $P_{1}, P_{2}, \ldots, P_{2 n}$ be $2 n$ distinct points on the unit circle $x^{2}+y^{2}=1$, other than $(1,0)$. Each point is colored either red or blue, with exactly $n$ red points and $n$ blue points. Let $R_{1}, R_{2}, \ldots, R_{n}$ be any ordering of the red points. Let $B_{1}$ be the nearest blue point to $R_{1}$ traveling counterclockwise around the circle starting from $R_{1}$. Then let $B_{2}$ be the nearest of the remaining blue points to $R_{2}$ travelling counterclockwise around the circle from $R_{2}$, and so on, until we have labeled all of the blue points $B_{1}, \ldots, B_{n}$. Show that the number of counterclockwise arcs of the form $R_{i} \rightarrow B_{i}$ that contain the point $(1,0)$ is independent of the way we chose the ordering $R_{1}, \ldots, R_{n}$ of the red points. 5. Find all real numbers $c>0$ such that there exists a labeling of the lattice points in $\mathbb{Z}^{2}$ with positive integers for which:
- only finitely many distinct labels occur, and
- for each label $i$, the distance between any two points labeled $i$ is at least $c^{i}$.
- Find the minimum possible value of
given that $a, b, c, d$ are nonnegative real numbers such that $a+b+c+d=4$.
§1 Solutions to Day 1
§1.1 USAMO 2017/1, proposed by Gregory Galperin
Available online at https://aops.com/community/p8108366.
Problem statement
Prove that there exist infinitely many pairs of relatively prime positive integers $a, b>1$ for which $a+b$ divides $a^{b}+b^{a}$.
One construction: let $d \equiv 1(\bmod 4), d>1$. Let $x=\frac{d^{d}+2^{d}}{d+2}$. Then set
To see this works, first check that $b$ is odd and $a$ is even. Let $d=a-b$ be odd. Then:
So it would be enough that
which is what we constructed. Also, since $\operatorname{gcd}(x, d)=1$ it follows $\operatorname{gcd}(a, b)=\operatorname{gcd}(d, b)=$ 1.
Remark. Ryan Kim points out that in fact, $(a, b)=(2 n-1,2 n+1)$ is always a solution.
§1.2 USAMO 2017/2, proposed by Maria Monks
Available online at https://aops.com/community/p8108658.
Problem statement
Let $m_{1}, m_{2}, \ldots, m_{n}$ be a collection of $n$ positive integers, not necessarily distinct. For any sequence of integers $A=\left(a_{1}, \ldots, a_{n}\right)$ and any permutation $w=w_{1}, \ldots, w_{n}$ of $m_{1}, \ldots, m_{n}$, define an $A$-inversion of $w$ to be a pair of entries $w_{i}, w_{j}$ with $i<j$ for which one of the following conditions holds:
- $a_{i} \geq w_{i}>w_{j}$,
- $w_{j}>a_{i} \geq w_{i}$, or
- $w_{i}>w_{j}>a_{i}$.
Show that, for any two sequences of integers $A=\left(a_{1}, \ldots, a_{n}\right)$ and $B=\left(b_{1}, \ldots, b_{n}\right)$, and for any positive integer $k$, the number of permutations of $m_{1}, \ldots, m_{n}$ having exactly $k A$-inversions is equal to the number of permutations of $m_{1}, \ldots, m_{n}$ having exactly $k B$-inversions.
The following solution was posted by Michael Ren, and I think it is the most natural one (since it captures all the combinatorial ideas using a $q$-generating function that is easier to think about, and thus makes the problem essentially a long computation).
Denote by $M$ our multiset of $n$ positive integers. Define an inversion of a permutation to be pair $i<j$ with $w_{i}<w_{j}$ (which is a $(0, \ldots, 0)$-inversion in the problem statement); this is the usual definition (see https://en.wikipedia.org/wiki/Inversion(discrete mathematics)). So we want to show the number of $A$-inversions is equal to the number of usual inversions. In what follows we count permutations on $M$ with multiplicity: so $M={1,1,2}$ still has $3!=6$ permutations.
We are going to do what is essentially recursion, but using generating functions in a variable $q$ to do our book-keeping. (Motivation: there's no good closed form for the number of inversions, but there's a great generating function known - which is even better for us, since we're only trying to show two numbers are equal!) First, we prove two claims.
Claim - For any positive integer $n$, the generating function for the number of permutations of $(1,2, \ldots, n)$ with exactly $k$ inversions is
Here we mean that the coefficient of $q^{S}$ above gives the number of permutations with exactly $s$ inversions.
Proof. This is an induction on $n$, with $n=1$ being trivial. Suppose we choose the first element to be $i$, with $1 \leq i \leq n$. Then there will always be exactly $i-1$ inversions using the first element, so this contributes $q^{i} \cdot(n-1)!q$. Summing $1 \leq i \leq n$ gives the result.
Unfortunately, the main difficulty of the problem is that there are repeated elements, which makes our notation much more horrific.
Let us define the following. We take our given multiset $M$ of $n$ positive integers, we suppose the distinct numbers are $\theta_{1}<\theta_{2}<\cdots<\theta_{m}$. We let $e_{i}$ be the number of times $\theta_{i}$ appears. Therefore the multiplicities $e_{i}$ should have sums
and $m$ denotes the number of distinct elements. Finally, we let
be the associated generating function for the number of inversions. For example, the first claim we proved says that $F(1, \ldots, 1)=n!{ }_{q}$.
Claim - We have the explicit formula
Proof. First suppose we perturb all the elements slightly, so that they are no longer equal. Then the generating function would just be $n!{ }_{q}$.
Then, we undo the perturbations for each group, one at a time, and claim that we get the above $e_{i}!{q}$ factor each time. Indeed, put the permutations into classes of $e{1}$ ! each where permutations in the same classes differ only in the order of the perturbed $\theta_{1}$ 's (with the other $n-e_{1}$ elements being fixed). Then there is a factor of $e_{1}!{q}$ from each class, owing to the slightly perturbed inversions we added within each class. So we remove that factor and add $e{1}!\cdot q^{0}$ instead. This accounts for the first term of the product.
Repeating this now with each term of the product implies the claim. Thus we have the formula for the number of inversions in general. We wish to show this also equals the generating function the number of $A$-inversions, for any fixed choice of $A$. This will be an induction by $n$, with the base case being immediate.
For the inductive step, fix $A$, and assume the first element satisfies $\theta_{k} \leq a_{1}<\theta_{k+1}$ (so $0 \leq k \leq m$; we for convenience set $\theta_{0}=-\infty$ and $\left.\theta_{m}=+\infty\right)$. We count the permutations based on what the first element $\theta_{i}$ of the permutation is. Then:
- Consider permutations starting with $\theta_{i} \in\left{\theta_{1}, \ldots, \theta_{k}\right}$. Then the number of inversions which will use this first term is $\left(e_{1}+\cdots+e_{i-1}\right)+\left(e_{k+1}+\cdots+e_{m}\right)$. Also, there are $e_{i}$ ways to pick which $\theta_{i}$ gets used as the first term. So we get a contribution of
in this case (with inductive hypothesis to get the last $F$-term).
- Now suppose $\theta_{i} \in\left{\theta_{k+1}, \ldots, \theta_{m}\right}$. Then the number of inversions which will use this first term is $e_{k+1}+\cdots+e_{i-1}$. Thus by a similar argument the contribution is
Therefore, to complete the problem it suffices to prove
Now, we see that
so it's equivalent to show
which is clear, since the left summand telescopes to $q^{e_{k+1}+\cdots+e_{m}}-q^{n}$ and the right summand telescopes to $1-q^{e_{k+1}+\cdots+e_{m}}$.
Remark. Technically, we could have skipped straight to the induction, without proving the first two claims. However I think the solution reads more naturally this way.
§1.3 USAMO 2017/3, proposed by Evan Chen
Available online at https://aops.com/community/p8108375.
Problem statement
Let $A B C$ be a scalene triangle with circumcircle $\Omega$ and incenter $I$. Ray $A I$ meets $\overline{B C}$ at $D$ and $\Omega$ again at $M$; the circle with diameter $\overline{D M}$ cuts $\Omega$ again at $K$. Lines $M K$ and $B C$ meet at $S$, and $N$ is the midpoint of $\overline{I S}$. The circumcircles of $\triangle K I D$ and $\triangle M A N$ intersect at points $L_{1}$ and $L_{2}$. Prove that $\Omega$ passes through the midpoint of either $\overline{I L_{1}}$ or $\overline{I L_{2}}$.
Let $W$ be the midpoint of $\overline{B C}$, let $X$ be the point on $\Omega$ opposite $M$. Observe that $\overline{K D}$ passes through $X$, and thus lines $B C, M K, X A$ concur at the orthocenter of $\triangle D M X$, which we call $S$. Denote by $I_{A}$ the $A$-excenter of $A B C$.
Next, let $E$ be the foot of the altitude from $I$ to $\overline{X I_{A}}$; observe that $E$ lies on the circle centered at $M$ through $I, B, C, I_{A}$. Then, $S$ is the radical center of $\Omega$ and the circles with diameter $\overline{I X}$ and $\overline{I I_{A}}$; hence line $S I$ passes through $E$; accordingly $I$ is the orthocenter of $\triangle X S I_{A}$; denote by $L$ the foot from $X$ to $\overline{S I_{A}}$.

We claim that this $L$ lies on both the circumcircle of $\triangle K I D$ and $\triangle M A N$. It lies on the circumcircle of $\triangle M A N$ since this circle is the nine-point circle of $\triangle X S I_{A}$. Also, $X D \cdot X K=X W \cdot X M=X A \cdot X S=X I \cdot X L$, so $K D I L$ are concyclic. All that remains to show is that the midpoint $T$ of $\overline{I L}$ lies on $\Omega$. But this follows from the fact that $\overline{T M} | \overline{L I_{A}} \Longrightarrow \angle M T X=90^{\circ}$, thus the problem is solved.
Remark. Some additional facts about this picture: the point $T$ is the contact point of the $A$-mixtilinear incircle (since it is collinear with $X$ and $I$ ), while the point $K$ is such that $\overline{A K}$ is an $A$-symmedian (since $\overline{K D}$ and $\overline{A D}$ bisect $\angle A$ and $\angle K$, say).

Remark. In fact, the point $L$ is the Miquel point of cyclic quadrilateral $I_{B} I_{C} B C$ (inscribed in the circle with diameter $\overline{I_{B} I_{C}}$ ). This implies many of the properties that $L$ has above. For example, it directly implies that $L$ lies on the circumcircles of triangles $I_{A} I_{B} I_{C}$ and $B C I_{A}$, and that the point $L$ lies on $\overline{S I_{A}}$ (since $S=\overline{B C} \cap \overline{I_{B} I_{C}}$ ). For this reason, many students found it easier to think about the problem in terms of $\triangle I_{A} I_{B} I_{C}$ rather than $\triangle A B C$.
§2 Solutions to Day 2
§2.1 USAMO 2017/4, proposed by Maria Monks
Available online at https://aops.com/community/p8117190.
Problem statement
Let $P_{1}, P_{2}, \ldots, P_{2 n}$ be $2 n$ distinct points on the unit circle $x^{2}+y^{2}=1$, other than $(1,0)$. Each point is colored either red or blue, with exactly $n$ red points and $n$ blue points. Let $R_{1}, R_{2}, \ldots, R_{n}$ be any ordering of the red points. Let $B_{1}$ be the nearest blue point to $R_{1}$ traveling counterclockwise around the circle starting from $R_{1}$. Then let $B_{2}$ be the nearest of the remaining blue points to $R_{2}$ travelling counterclockwise around the circle from $R_{2}$, and so on, until we have labeled all of the blue points $B_{1}$, $\ldots, B_{n}$. Show that the number of counterclockwise arcs of the form $R_{i} \rightarrow B_{i}$ that contain the point $(1,0)$ is independent of the way we chose the ordering $R_{1}, \ldots, R_{n}$ of the red points.
We present two solutions, one based on swapping and one based on an invariant. \ First "local" solution by swapping two points. Let $1 \leq i<n$ be any index and consider the two red points $R_{i}$ and $R_{i+1}$. There are two blue points $B_{i}$ and $B_{i+1}$ associated with them.
Claim - If we swap the locations of points $R_{i}$ and $R_{i+1}$ then the new $\operatorname{arcs} R_{i} \rightarrow B_{i}$ and $R_{i+1} \rightarrow B_{i+1}$ will cover the same points.
Proof. Delete all the points $R_{1}, \ldots, R_{i-1}$ and $B_{1}, \ldots, B_{i-1}$; instead focus on the positions of $R_{i}$ and $R_{i+1}$.
The two blue points can then be located in three possible ways: either 0,1 , or 2 of them lie on the $\operatorname{arc} R_{i} \rightarrow R_{i+1}$. For each of the cases below, we illustrate on the left the locations of $B_{i}$ and $B_{i+1}$ and the corresponding arcs in green; then on the right we show the modified picture where $R_{i}$ and $R_{i+1}$ have swapped. (Note that by hypothesis there are no other blue points in the green arcs).

Observe that in all cases, the number of arcs covering any given point on the circumference is not changed. Consequently, this proves the claim.
Finally, it is enough to recall that any permutation of the red points can be achieved by swapping consecutive points (put another way: $(i i+1)$ generates the permutation group $S_{n}$ ). This solves the problem.
Remark. This proof does not work if one tries to swap $R_{i}$ and $R_{j}$ if $|i-j| \neq 1$. For example if we swapped $R_{i}$ and $R_{i+2}$ then there are some issues caused by the possible presence of the blue point $B_{i+1}$ in the green $\operatorname{arc} R_{i+2} \rightarrow B_{i+2}$.
II Second longer solution using an invariant. Visually, if we draw all the segments $R_{i} \rightarrow B_{i}$ then we obtain a set of $n$ chords. Say a chord is inverted if satisfies the problem condition, and stable otherwise. The problem contends that the number of stable/inverted chords depends only on the layout of the points and not on the choice of chords.

In fact we'll describe the number of inverted chords explicitly. Starting from $(1,0)$ we keep a running tally of $R-B$; in other words we start the counter at 0 and decrement by 1 at each blue point and increment by 1 at each red point. Let $x \leq 0$ be the lowest number ever recorded. Then:
Claim - The number of inverted chords is $-x$ (and hence independent of the choice of chords).
This is by induction on $n$. I think the easiest thing is to delete chord $R_{1} B_{1}$; note that the arc cut out by this chord contains no blue points. So if the chord was stable certainly no change to $x$. On the other hand, if the chord is inverted, then in particular the last point before $(1,0)$ was red, and so $x<0$. In this situation one sees that deleting the chord changes $x$ to $x+1$, as desired.
§2.2 USAMO 2017/5, proposed by Ricky Liu
Available online at https://aops.com/community/p8117096.
Problem statement
Find all real numbers $c>0$ such that there exists a labeling of the lattice points in $\mathbb{Z}^{2}$ with positive integers for which:
- only finitely many distinct labels occur, and
- for each label $i$, the distance between any two points labeled $i$ is at least $c^{i}$.
The answer is $c<\sqrt{2}$. Here is a solution with Calvin Deng. The construction for any $c<\sqrt{2}$ can be done as follows. Checkerboard color the lattice points and label the black ones with 1 . The white points then form a copy of $\mathbb{Z}^{2}$ again scaled up by $\sqrt{2}$ so we can repeat the procedure with 2 on half the resulting points. Continue this dyadic construction until a large $N$ for which $c^{N}<2^{\frac{1}{2}(N-1)}$, at which point we can just label all the points with $N$.
I'll now prove that $c=\sqrt{2}$ (and hence $c \geq \sqrt{2}$ ) can't be done.
Claim - It is impossible to fill a $2^{n} \times 2^{n}$ square with labels not exceeding $2 n$.
The case $n=1$ is clear. So now assume it's true up to $n-1$; and assume for contradiction a $2^{n} \times 2^{n}$ square $S$ only contains labels up to $2 n$. (Of course every $2^{n-1} \times 2^{n-1}$ square contains an instance of a label at least $2 n-1$.)

Now, we contend there are fewer than four copies of $2 n$ :
Lemma
In a unit square, among any four points, two of these points have distance $\leq 1$ apart.
Proof. Look at the four rays emanating from the origin and note that two of them have included angle $\leq 90^{\circ}$.
So WLOG the northwest quadrant has no $2 n$ 's. Take a $2 n-1$ in the northwest and draw a square of size $2^{n-1} \times 2^{n-1}$ directly right of it (with its top edge coinciding with the top of $S$ ). Then $A$ can't contain $2 n-1$, so it must contain a $2 n$ label; that $2 n$ label must be in the northeast quadrant.
Then we define a square $B$ of size $2^{n-1} \times 2^{n-1}$ as follows. If $2 n-1$ is at least as high $2 n$, let $B$ be a $2^{n-1} \times 2^{n-1}$ square which touches $2 n-1$ north and is bounded east by $2 n$. Otherwise let $B$ be the square that touches $2 n-1$ west and is bounded north by $2 n$. We then observe $B$ can neither have $2 n-1$ nor $2 n$ in it, contradiction.
Remark. To my knowledge, essentially all density arguments fail because of hexagonal lattice packing.
§2.3 USAMO 2017/6, proposed by Titu Andreescu
Available online at https://aops.com/community/p8117097.
Problem statement
Find the minimum possible value of
given that $a, b, c, d$ are nonnegative real numbers such that $a+b+c+d=4$.
The minimum $\frac{2}{3}$ is achieved at $(a, b, c, d)=(2,2,0,0)$ and cyclic permutations. The problem is an application of the tangent line trick: we observe the miraculous identity
since $12-(3-b)\left(b^{3}+4\right)=b(b+1)(b-2)^{2} \geq 0$. Moreover,
Thus
Remark. The main interesting bit is the equality at $(a, b, c, d)=(2,2,0,0)$. This is the main motivation for trying tangent line trick, since a lower bound of the form $\sum a(1-\lambda b)$ preserves the unusual equality case above. Thus one takes the tangent at $b=2$ which miraculously passes through the point $(0,1 / 4)$ as well.
