# USAMO 2024 Solution Notes Evan ChEn《陳誼廷》 25 April 2024 This is a compilation of solutions for the 2024 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 2024/1, proposed by Luke Robitaille ..... 3 1.2 USAMO 2024/2, proposed by Rishabh Das ..... 4 1.3 USAMO 2024/3, proposed by Krit Boonsiriseth ..... 7 2 Solutions to Day 2 ..... 9 2.1 USAMO 2024/4, proposed by Rishabh Das ..... 9 2.2 USAMO 2024/5, proposed by Anton Trygub ..... 11 2.3 USAMO 2024/6, proposed by Titu Andreescu and Gabriel Dospinescu ..... 16 ## §0 Problems 1. Find all integers $n \geq 3$ such that the following property holds: if we list the divisors of $n$ ! in increasing order as $1=d_{1}2$ be an integer and let $\ell \in\{1,2, \ldots, n\}$. A collection $A_{1}, \ldots, A_{k}$ of (not necessarily distinct) subsets of $\{1,2, \ldots, n\}$ is called $\ell$-large if $\left|A_{i}\right| \geq \ell$ for all $1 \leq i \leq k$. Find, in terms of $n$ and $\ell$, the largest real number $c$ such that the inequality $$ \sum_{i=1}^{k} \sum_{j=1}^{k} x_{i} x_{j} \frac{\left|A_{i} \cap A_{j}\right|^{2}}{\left|A_{i}\right| \cdot\left|A_{j}\right|} \geq c\left(\sum_{i=1}^{k} x_{i}\right)^{2} $$ holds for all positive integer $k$, all nonnegative real numbers $x_{1}, x_{2}, \ldots, x_{k}$, and all $\ell$-large collections $A_{1}, A_{2}, \ldots, A_{k}$ of subsets of $\{1,2, \ldots, n\}$. ## §1 Solutions to Day 1 ## §1.1 USAMO 2024/1, proposed by Luke Robitaille Available online at https://aops.com/community/p30216459. ## Problem statement Find all integers $n \geq 3$ such that the following property holds: if we list the divisors of $n$ ! in increasing order as $1=d_{1}24-20$. - For $n=6$ we have $18-15>20-18$. - For $7 \leq n \leq 12$ we have because $14-12>15-14$ (and $13 \nmid n!$ ). Now assume $n \geq 13$. In that case, we have $$ \left\lfloor\frac{n}{2}\right\rfloor^{2}-1 \geq 2 n $$ So by Bertrand postulate, we can find a prime $p$ such that $$ n0$. And the objective function is to minimize the quantity $$ A:=\sum_{|v| \geq 50} f(v) . $$ So the problem is transformed into an system of equations over $\mathbb{Z}_{\geq 0}$ (it's clear any assignment of values of $f(v)$ can be translated to a sequence ( $S_{1}, \ldots, S_{100}$ ) in the original notation). Note already that: Claim - It suffices to assign $f(v)$ for $|v| \geq 50$. Proof. If we have found a valid assignment of values to $f(v)$ for $|v| \geq 50$, then we can always arbitrarily assign values of $f(v)$ for $|v|<50$ by downwards induction on $|v|$ to satisfy the divisibility condition (without changing $M$ ). Thus, for the rest of the solution, we altogether ignore $f(v)$ for $|v|<50$ and only consider $P(u)$ for $|u| \geq 50$. I Construction. Consider the construction $$ f_{0}(v)=2|v|-100 $$ This construction is valid since if $|u|=100-k$ for $k \leq 50$ then $$ \begin{aligned} \sum_{v \supseteq u} f_{0}(v) & =\binom{k}{0} \cdot 100+\binom{k}{1} \cdot 98+\binom{k}{2} \cdot 96+\cdots+\binom{k}{k} \cdot(100-2 k) \\ & =(100-k) \cdot 2^{k}=|u| \cdot 2^{k} \end{aligned} $$ is indeed a multiple of $|u|$, hence $P(u)$ is true. In that case, the objective function is $$ A=\sum_{i=50}^{100}\binom{100}{i}(2 i-100)=50\binom{100}{50} $$ as needed. Remark. This construction is the "easy" half of the problem because it coincides with what you get from a greedy algorithm by downwards induction on $|u|$ (equivalently, induction on $k=100-|u| \geq 0)$. To spell out the first three steps, - We know $f(1 \ldots 1)$ is a nonzero multiple of 100 , so it makes sense to guess $f(1 \ldots 1)=$ 100. - Then we have $f(1 \ldots 10)+100 \equiv 0(\bmod 99)$, and the smallest multiple of 99 which is at least 100 is 198 . So it makes sense to guess $f(1 \ldots 10)=98$, and similarly guess $f(v)=98$ whenever $|v|=99$. - Now when we consider, say $v=1 \ldots 100$ with $|v|=98$, we get $$ f(1 \ldots 100)+\underbrace{f(1 \ldots 101)}_{=98}+\underbrace{f(1 \ldots 110)}_{=98}+\underbrace{f(1 \ldots 111)}_{=100} \equiv 0 \quad(\bmod 98) $$ we obtain $f(1 \ldots 100) \equiv 96(\bmod 98)$. That makes $f(1 \ldots 100)=96$ a reasonable guess. Continuing in this way gives the construction above. I Proof of bound. We are going to use a smoothing argument: if we have a general working assignment $f$, we will mold it into $f_{0}$. We define a push-down on $v$ as the following operation: - Pick any $v$ such that $|v| \geq 50$ and $f(v) \geq|v|$. - Decrease $f(v)$ by $|v|$. - For every $w$ such that $w \subseteq v$ and $|w|=|v|-1$, increase $f(w)$ by 1 . Claim - Apply a push-down preserves the main divisibility condition. Moreover, it doesn't change $A$ unless $|v|=50$, where it decreases $A$ by 50 instead. Proof. The statement $P(u)$ is only affected when $u \subseteq v$ : to be precise, one term on the right-hand side of $P(u)$ increases by $|v|$, while $|v|-|u|$ terms decrease by 1 , for a net change of $+|u|$. So $P(u)$ still holds. To see $A$ doesn't change for $|v|>50$, note $|v|$ terms increase by 1 while one term decreases by $-|v|$. When $|v|=50$, only $f(v)$ decreases by 50 . Now, given a valid assignment, we can modify it as follows: - First apply pushdowns on $1 \ldots 1$ until $f(1 \ldots 1)=100$; - Then we may apply pushdowns on each $v$ with $|v|=99$ until $f(v)<99$; - Then we may apply pushdowns on each $v$ with $|v|=98$ until $f(v)<98$; - . . .and so on, until we have $f(v)<50$ for $|v|=50$. Hence we get $f(1 \ldots 1)=100$ and $0 \leq f(v)<|v|$ for all $50 \leq|v| \leq 100$. However, by downwards induction on $|v|=99,98, \ldots, 50$, we also have $$ f(v) \equiv f_{0}(v) \quad(\bmod |v|) \Longrightarrow f(v)=f_{0}(v) $$ since $f_{0}(v)$ and $f(v)$ are both strictly less than $|v|$. So in fact $f=f_{0}$, and we're done. Remark. The fact that push-downs actually don't change $A$ shows that the equality case we described is far from unique: in fact, we could have made nearly arbitrary sub-optimal decisions during the greedy algorithm and still ended up with an equality case. For a concrete example, the construction $$ f(v)= \begin{cases}500 & |v|=100 \\ 94 & |v|=99 \\ 100-2|v| & 50 \leq|v| \leq 98\end{cases} $$ works fine as well (where we arbitrarily chose 500 at the start, then used the greedy algorithm thereafter). ## §1.3 USAMO 2024/3, proposed by Krit Boonsiriseth Available online at https://aops.com/community/p30216513. ## Problem statement Let $(m, n)$ be positive integers with $n \geq 3$ and draw a regular $n$-gon. We wish to triangulate this $n$-gon into $n-2$ triangles, each colored one of $m$ colors, so that each color has an equal sum of areas. For which $(m, n)$ is such a triangulation and coloring possible? The answer is if and only if $m$ is a proper divisor of $n$. Throughout this solution, we let $\omega=\exp (2 \pi i / n)$ and let the regular $n$-gon have vertices $1, \omega, \ldots, \omega^{n-1}$. We cache the following frequent calculation: ## Lemma The triangle with vertices $\omega^{k}, \omega^{k+a}, \omega^{k+b}$ has signed area $$ T(a, b):=\frac{\left(\omega^{a}-1\right)\left(\omega^{b}-1\right)\left(\omega^{-a}-\omega^{-b}\right)}{2 i} . $$ Proof. Rotate by $\omega^{-k}$ to assume WLOG that $k=0$. Apply complex shoelace to the triangles with vertices $1, \omega^{a}, \omega^{b}$ to get $$ \frac{1}{2 i} \operatorname{det}\left[\begin{array}{ccc} 1 & 1 & 1 \\ \omega^{a} & \omega^{-a} & 1 \\ \omega^{b} & \omega^{-b} & 1 \end{array}\right]=\frac{1}{2 i} \operatorname{det}\left[\begin{array}{ccc} 0 & 0 & 1 \\ \omega^{a}-1 & \omega^{-a}-1 & 1 \\ \omega^{b}-1 & \omega^{-b}-1 & 1 \end{array}\right] $$ which equals the above. 【 Construction. It suffices to actually just take all the diagonals from the vertex 1 , and then color the triangles with the $m$ colors in cyclic order. For example, when $n=9$ and $m=3$, a coloring with red, green, blue would be: ![](https://cdn.mathpix.com/cropped/2024_11_19_bff0e8c9a0bc19d4709dg-07.jpg?height=617&width=615&top_left_y=1873&top_left_x=726) To see this works one can just do the shoelace calculation: for a given residue $r \bmod m$, we get an area $$ \begin{aligned} \sum_{j \equiv r \bmod m} \operatorname{Area}\left(\omega^{j}, \omega^{0}, \omega^{j+1}\right) & =\sum_{j \equiv r \bmod m} T(-j, 1) \\ & =\sum_{j \equiv r \bmod m} \frac{\left(\omega^{-j}-1\right)\left(\omega^{1}-1\right)\left(\omega^{j}-\omega^{-1}\right)}{2 i} \\ & =\frac{\omega-1}{2 i} \sum_{j \equiv r \bmod m}\left(\omega^{-j}-1\right)\left(\omega^{j}-\omega^{-1}\right) \\ & =\frac{\omega-1}{2 i}\left(\frac{n}{m}\left(1+\omega^{-1}\right)+\sum_{j \equiv r \bmod m}\left(\omega^{-j}-\omega^{j}\right)\right) . \end{aligned} $$ (We allow degenerate triangles where $j \in\{-1,0\}$ with area zero.) However, if $m$ is a proper divisor of $m$, then $\sum_{j \equiv r \bmod m} \omega^{j}=\omega^{r}\left(1+\omega^{m}+\omega^{2 m}+\cdots+\omega^{n-m}\right)=0$. Similarly, $\sum_{j \equiv r \bmod m} \omega^{-j}=0$. So the inner sum vanishes, and the total area of the $m$ th color equals $$ \frac{n}{m} \frac{(\omega-1)\left(\omega^{-1}+1\right)}{2 i} $$ which does not depend on the residue $r$, proving the coloring works. 【 Proof of necessity. It's obvious that $mi \\ k-1 & i \geq k>0 \\ i & k=0\end{cases} $$ And one can see for each $i$, the counts are all distinct (they are ( $i, 0,1, \ldots, k-1, k+1, \ldots, k)$ from bottom to top). This completes the construction. Construction when $m2$ be an integer and let $\ell \in\{1,2, \ldots, n\}$. A collection $A_{1}, \ldots, A_{k}$ of (not necessarily distinct) subsets of $\{1,2, \ldots, n\}$ is called $\ell$-large if $\left|A_{i}\right| \geq \ell$ for all $1 \leq i \leq k$. Find, in terms of $n$ and $\ell$, the largest real number $c$ such that the inequality $$ \sum_{i=1}^{k} \sum_{j=1}^{k} x_{i} x_{j} \frac{\left|A_{i} \cap A_{j}\right|^{2}}{\left|A_{i}\right| \cdot\left|A_{j}\right|} \geq c\left(\sum_{i=1}^{k} x_{i}\right)^{2} $$ holds for all positive integer $k$, all nonnegative real numbers $x_{1}, x_{2}, \ldots, x_{k}$, and all $\ell$-large collections $A_{1}, A_{2}, \ldots, A_{k}$ of subsets of $\{1,2, \ldots, n\}$. The answer turns out to be $$ c=\frac{n+\ell^{2}-2 \ell}{n(n-1)} $$ Throughout this solution, we work with vectors in $\mathbb{R}^{n^{2}}$. The entries will be indexed by ordered pairs $(p, q) \in\{1, \ldots, n\}^{2}$; the notation $\langle\bullet, \bullet\rangle$ denotes dot product, and $\|\bullet\|$ the vector norm. 【 Rewriting as a dot product. For $i=1, \ldots, n$ define $\mathbf{v}_{i}$ by $$ \mathbf{v}_{i}[p, q]:=\left\{\begin{array}{ll} \frac{1}{\left|A_{i}\right|} & p \in A_{i} \text { and } q \in A_{i} \\ 0 & \text { otherwise; } \end{array} \quad \mathbf{v}:=\sum_{i} x_{i} \mathbf{v}_{i}\right. $$ Then $$ \begin{aligned} \sum_{i} \sum_{j} x_{i} x_{j} \frac{\left|A_{i} \cap A_{j}\right|^{2}}{\left|A_{i}\right|\left|A_{j}\right|} & =\sum_{i} \sum_{j} x_{i} x_{j}\left\langle\mathbf{v}_{i}, \mathbf{v}_{j}\right\rangle \\ & =\left\langle\sum_{i} x_{i} \mathbf{v}_{i}, \sum_{j} x_{i} \mathbf{v}_{i}\right\rangle=\left\|\sum_{i} x_{i} \mathbf{v}_{i}\right\|^{2}=\|\mathbf{v}\|^{2} . \end{aligned} $$ 【 Proof of the inequality for the claimed value of $c$. We define two more vectors $\mathbf{e}$ and $\mathbf{1}$; the vector $\mathbf{e}$ has 1 in the $(p, q)^{\text {th }}$ component if $p=q$, and 0 otherwise, while $\mathbf{1}$ has all-ones. In that case, note that $$ \begin{aligned} & \langle\mathbf{e}, \mathbf{v}\rangle=\sum_{i} x_{i}\left\langle\mathbf{e}, \mathbf{v}_{i}\right\rangle=\sum_{i} x_{i} \\ & \langle\mathbf{1}, \mathbf{v}\rangle=\sum_{i} x_{i}\left\langle\mathbf{1}, \mathbf{v}_{i}\right\rangle=\sum_{i} x_{i}\left|A_{i}\right| . \end{aligned} $$ That means for any positive real constants $\alpha$ and $\beta$, by Cauchy-Schwarz for vectors, we should have $$ \begin{aligned} \|\alpha \mathbf{e}+\beta \mathbf{1}\|\|\mathbf{v}\| & \geq\langle\alpha \mathbf{e}+\beta \mathbf{1}, \mathbf{v}\rangle=\alpha\langle\mathbf{e}, \mathbf{v}\rangle+\beta\langle\mathbf{1}, \mathbf{v}\rangle \\ & =\alpha \cdot \sum x_{i}+\beta \cdot \sum x_{i}\left|A_{i}\right| \\ & \geq(\alpha+\ell \beta) \sum x_{i} . \end{aligned} $$ Set $\mathbf{w}:=\alpha \mathbf{e}+\beta \mathbf{1}$ for brevity. Then $$ \mathbf{w}[p, q]= \begin{cases}\alpha+\beta & \text { if } p=q \\ \beta & \text { if } p \neq q\end{cases} $$ SO $$ \|\mathbf{w}\|=\sqrt{n \cdot(\alpha+\beta)^{2}+\left(n^{2}-n\right) \cdot \beta^{2}} $$ Therefore, we get an lower bound $$ \frac{\|\mathbf{v}\|}{\sum x_{i}} \geq \frac{\alpha+\ell \beta}{\sqrt{n \cdot(\alpha+\beta)^{2}+\left(n^{2}-n\right) \cdot \beta^{2}}} $$ Letting $\alpha=n-\ell$ and $\beta=\ell-1$ gives a proof that the constant $$ c=\frac{((n-\ell)+\ell(\ell-1))^{2}}{n \cdot(n-1)^{2}+\left(n^{2}-n\right) \cdot(\ell-1)^{2}}=\frac{\left(n+\ell^{2}-2 \ell\right)^{2}}{n(n-1)\left(n+\ell^{2}-2 \ell\right)}=\frac{n+\ell^{2}-2 \ell}{n(n-1)} $$ makes the original inequality always true. (The choice of $\alpha: \beta$ is suggested by the example below.) 【 Example showing this $c$ is best possible. Let $k=\binom{n}{\ell}$, let $A_{i}$ run over all $\binom{n}{\ell}$ subsets of $\{1, \ldots, n\}$ of size $\ell$, and let $x_{i}=1$ for all $i$. We claim this construction works. To verify this, it would be sufficient to show that $\mathbf{w}$ and $\mathbf{v}$ are scalar multiples, so that the above Cauchy-Schwarz is equality. However, we can compute $$ \mathbf{w}[p, q]=\left\{\begin{array}{ll} n-1 & \text { if } p=q \\ \ell-1 & \text { if } p \neq q \end{array}, \quad \mathbf{v}[p, q]= \begin{cases}\binom{n-1}{\ell-1} \cdot \frac{1}{\ell} & \text { if } p=q \\ \binom{n-2}{\ell-2} \cdot \frac{1}{\ell} & \text { if } p \neq q\end{cases}\right. $$ which are indeed scalar multiples, finishing the proof.