# USA TSTST 2023 Solutions
United States of America - TST Selection Test Andrew Gu, Evan Chen, Gopal Goel
$65^{\text {th }}$ IMO 2024 United Kingdom and $13^{\text {th }}$ EGMO 2024 Georgia ## Contents 0 Problems ..... 2 1 Solutions to Day 1 ..... 4 1.1 TSTST 2023/1, proposed by Merlijn Staps ..... 4 1.2 TSTST 2023/2, proposed by Raymond Feng, Luke Robitaille ..... 9 1.3 TSTST 2023/3, proposed by Merlijn Staps ..... 13 2 Solutions to Day 2 ..... 16 2.1 TSTST 2023/4, proposed by Ankan Bhattacharya ..... 16 2.2 TSTST 2023/5, proposed by David Altizio ..... 17 2.3 TSTST 2023/6, proposed by Holden Mui ..... 20 3 Solutions to Day 3 ..... 24 3.1 TSTST 2023/7, proposed by Luke Robitaille ..... 24 3.2 TSTST 2023/8, proposed by Ankan Bhattacharya ..... 25 3.3 TSTST 2023/9, proposed by Holden Mui ..... 28 ## §0 Problems 1. Let $A B C$ be a triangle with centroid $G$. Points $R$ and $S$ are chosen on rays $G B$ and $G C$, respectively, such that $$ \angle A B S=\angle A C R=180^{\circ}-\angle B G C . $$ Prove that $\angle R A S+\angle B A C=\angle B G C$. 2. Let $n \geq m \geq 1$ be integers. Prove that $$ \sum_{k=m}^{n}\left(\frac{1}{k^{2}}+\frac{1}{k^{3}}\right) \geq m \cdot\left(\sum_{k=m}^{n} \frac{1}{k^{2}}\right)^{2} $$ 3. Find all positive integers $n$ for which it is possible to color some cells of an infinite grid of unit squares red, such that each rectangle consisting of exactly $n$ cells (and whose edges lie along the lines of the grid) contains an odd number of red cells. 4. Let $n \geq 3$ be an integer and let $K_{n}$ be the complete graph on $n$ vertices. Each edge of $K_{n}$ is colored either red, green, or blue. Let $A$ denote the number of triangles in $K_{n}$ with all edges of the same color, and let $B$ denote the number of triangles in $K_{n}$ with all edges of different colors. Prove that $$ B \leq 2 A+\frac{n(n-1)}{3} . $$ 5. Suppose $a, b$, and $c$ are three complex numbers with product 1 . Assume that none of $a, b$, and $c$ are real or have absolute value 1 . Define $$ p=(a+b+c)+\left(\frac{1}{a}+\frac{1}{b}+\frac{1}{c}\right) \quad \text { and } \quad q=\frac{a}{b}+\frac{b}{c}+\frac{c}{a} . $$ Given that both $p$ and $q$ are real numbers, find all possible values of the ordered pair $(p, q)$. 6. Let $A B C$ be a scalene triangle and let $P$ and $Q$ be two distinct points in its interior. Suppose that the angle bisectors of $\angle P A Q, \angle P B Q$, and $\angle P C Q$ are the altitudes of triangle $A B C$. Prove that the midpoint of $\overline{P Q}$ lies on the Euler line of $A B C$. 7. The Bank of Pittsburgh issues coins that have a heads side and a tails side. Vera has a row of 2023 such coins alternately tails-up and heads-up, with the leftmost coin tails-up. In a move, Vera may flip over one of the coins in the row, subject to the following rules: - On the first move, Vera may flip over any of the 2023 coins. - On all subsequent moves, Vera may only flip over a coin adjacent to the coin she flipped on the previous move. (We do not consider a coin to be adjacent to itself.) Determine the smallest possible number of moves Vera can make to reach a state in which every coin is heads-up. 8. Let $A B C$ be an equilateral triangle with side length 1. Points $A_{1}$ and $A_{2}$ are chosen on side $B C$, points $B_{1}$ and $B_{2}$ are chosen on side $C A$, and points $C_{1}$ and $C_{2}$ are chosen on side $A B$ such that $B A_{1}\frac{\left(\sum_{k=m}^{n} \frac{1}{k^{2}}\right)^{2}}{\frac{1}{m}} \end{aligned} $$ as desired. Remark (Bound on error). Let $A=\sum_{k=m}^{n} k^{-2}$ and $B=\sum_{k=m}^{n} k^{-3}$. The inequality above becomes tighter for large $m$ and $n \gg m$. If we use Lagrange's identity in place of Cauchy-Schwarz, we get $$ A+B-m A^{2}=m \cdot \sum_{m \leq aA+B $$ Remark (Construction commentary, from author). My motivation was to write an inequality where Titu could be applied creatively to yield a telescoping sum. This can be difficult because most of the time, such a reverse-engineered inequality will be so loose it's trivial anyways. My first attempt was the not-so-amazing inequality $$ \frac{n^{2}+3 n}{2}=\sum_{1}^{n} i+1=\sum_{1}^{n} \frac{\frac{1}{i}}{\frac{1}{i(i+1)}}>\left(\sum_{1}^{n} \frac{1}{\sqrt{i}}\right)^{2} $$ which is really not surprising given that $\sum \frac{1}{\sqrt{i}} \ll \frac{n}{\sqrt{2}}$. The key here is that we need "near-equality" as dictated by the Cauchy-Schwarz equality case, i.e. the square root of the numerators should be approximately proportional to the denominators. This motivates using $\frac{1}{i^{4}}$ as the numerator, which works like a charm. After working out the resulting statement, the LHS and RHS even share a sum, which adds to the simplicity of the problem. The final touch was to unrestrict the starting value of the sum, since this allows the strength of the estimate $\frac{1}{i^{2}} \approx \frac{1}{i(i+1)}$ to be fully exploited. 【 Second approach by inducting down, Luke Robitaille and Carl Schildkraut. Fix $n$; we'll induct downwards on $m$. For the base case of $n=m$ the result is easy, since the left side is $\frac{m+1}{m^{3}}$ and the right side is $\frac{m}{m^{4}}=\frac{1}{m^{3}}$. For the inductive step, suppose we have shown the result for $m+1$. Let $$ A=\sum_{k=m+1}^{n} \frac{1}{k^{2}} \quad \text { and } \quad B=\sum_{k=m+1}^{n} \frac{1}{k^{3}} $$ We know $A+B \geq(m+1) A^{2}$, and we want to show $$ \left(A+\frac{1}{m^{2}}\right)+\left(B+\frac{1}{m^{3}}\right) \geq m\left(A+\frac{1}{m^{2}}\right)^{2} $$ Indeed, $$ \begin{aligned} \left(A+\frac{1}{m^{2}}\right)+\left(B+\frac{1}{m^{3}}\right)-m\left(A+\frac{1}{m^{2}}\right)^{2} & =A+B+\frac{m+1}{m^{3}}-m A^{2}-\frac{2 A}{m}-\frac{1}{m^{3}} \\ & =\left(A+B-(m+1) A^{2}\right)+\left(A-\frac{1}{m}\right)^{2} \geq 0 \end{aligned} $$ and we are done. I Third approach by reducing $n \rightarrow \infty$, Michael Ren and Carl Schildkraut. First, we give: Claim (Reduction to $n \rightarrow \infty$ ) - If the problem is true when $n \rightarrow \infty$, it is true for all $n$. Proof. Let $A=\sum_{k=m}^{n} k^{-2}$ and $B=\sum_{k=m}^{n} k^{-3}$. Consider the region of the $x y$-plane defined by $y>m x^{2}-x$. We are interested in whether $(A, B)$ lies in this region. However, the region is bounded by a convex curve, and the sequence of points $(0,0)$, $\left(\frac{1}{m^{2}}, \frac{1}{m^{3}}\right),\left(\frac{1}{m^{2}}+\frac{1}{(m+1)^{2}}, \frac{1}{m^{3}}+\frac{1}{(m+1)^{3}}\right), \ldots$ has successively decreasing slopes between consecutive points. Thus it suffices to check that the inequality is true when $n \rightarrow \infty$. Set $n=\infty$ henceforth. Let $$ A=\sum_{k=m}^{\infty} \frac{1}{k^{2}} \text { and } B=\sum_{k=m}^{\infty} \frac{1}{k^{3}} $$ we want to show $B \geq m A^{2}-A$, which rearranges to $$ 1+4 m B \geq(2 m A-1)^{2} $$ Write $$ C=\sum_{k=m}^{\infty} \frac{1}{k^{2}(2 k-1)(2 k+1)} \text { and } D=\sum_{k=m}^{\infty} \frac{8 k^{2}-1}{k^{3}(2 k-1)^{2}(2 k+1)^{2}} $$ Then $$ \frac{2}{2 k-1}-\frac{2}{2 k+1}=\frac{1}{k^{2}}+\frac{1}{k^{2}(2 k-1)(2 k+1)} $$ and $$ \frac{2}{(2 k-1)^{2}}-\frac{2}{(2 k+1)^{2}}=\frac{1}{k^{3}}+\frac{8 k^{2}-1}{k^{3}(2 k-1)^{2}(2 k+1)^{2}}, $$ so that $$ A=\frac{2}{2 m-1}-C \text { and } B=\frac{2}{(2 m-1)^{2}}-D $$ Our inequality we wish to show becomes $$ \frac{2 m+1}{2 m-1} C \geq D+m C^{2} $$ We in fact show two claims: Claim - We have $$ \frac{2 m+1 / 2}{2 m-1} C \geq D $$ Proof. We compare termwise; we need $$ \frac{2 m+1 / 2}{2 m-1} \cdot \frac{1}{k^{2}(2 k-1)(2 k+1)} \geq \frac{8 k^{2}-1}{k^{3}(2 k-1)^{2}(2 k+1)^{2}} $$ for $k \geq m$. It suffices to show $$ \frac{2 k+1 / 2}{2 k-1} \cdot \frac{1}{k^{2}(2 k-1)(2 k+1)} \geq \frac{8 k^{2}-1}{k^{3}(2 k-1)^{2}(2 k+1)^{2}} $$ which is equivalent to $k(2 k+1 / 2)(2 k+1) \geq 8 k^{2}-1$. This holds for all $k \geq 1$. ## Claim - We have $$ \frac{1 / 2}{2 m-1} C \geq m C^{2} $$ Proof. We need $C \leq 1 /(2 m(2 m-1))$; indeed, $$ \frac{1}{2 m(2 m-1)}=\sum_{k=m}^{\infty}\left(\frac{1}{2 k(2 k-1)}-\frac{1}{2(k+1)(2 k+1)}\right)=\sum_{k=m}^{\infty} \frac{4 k+1}{2 k(2 k-1)(k+1)(2 k+1)} $$ comparing term-wise with the definition of $C$ and using the inequality $k(4 k+1) \geq 2(k+1)$ for $k \geq 1$ gives the desired result. Combining the two claims finishes the solution. 『 Fourth approach by bashing, Carl Schildkraut. With a bit more work, the third approach can be adapted to avoid the $n \rightarrow \infty$ reduction. Similarly to before, define $$ A=\sum_{k=m}^{n} \frac{1}{k^{2}} \text { and } B=\sum_{k=m}^{n} \frac{1}{k^{3}} $$ we want to show $1+4 m B \geq(2 m A-1)^{2}$. Writing $$ C=\sum_{k=m}^{n} \frac{1}{k^{2}(2 k-1)(2 k+1)} \text { and } D=\sum_{k=m}^{n} \frac{8 k^{2}-1}{k^{3}(2 k-1)^{2}(2 k+1)^{2}} $$ We compute $$ A=\frac{2}{2 m-1}-\frac{2}{2 n+1}-C \text { and } B=\frac{2}{(2 m-1)^{2}}-\frac{2}{(2 n+1)^{2}}-D . $$ Then, the inequality we wish to show reduces (as in the previous solution) to $$ \frac{2 m+1}{2 m-1} C+\frac{2(2 m+1)}{(2 m-1)(2 n+1)} \geq D+m C^{2}+\frac{2(2 m+1)}{(2 n+1)^{2}}+\frac{4 m}{2 n+1} C $$ We deal first with the terms not containing the variable $n$, i.e. we show that $$ \frac{2 m+1}{2 m-1} C \geq D+m C^{2} $$ For this part, the two claims from the previous solution go through exactly as written above, and we have $C \leq 1 /(2 m(2 m-1))$. We now need to show $$ \frac{2(2 m+1)}{(2 m-1)(2 n+1)} \geq \frac{2(2 m+1)}{(2 n+1)^{2}}+\frac{4 m}{2 n+1} C $$ (this is just the inequality between the remaining terms); our bound on $C$ reduces this to proving $$ \frac{4(2 m+1)(n-m+1)}{(2 m-1)(2 n+1)^{2}} \geq \frac{2}{(2 m-1)(2 n+1)} $$ Expanding and writing in terms of $n$, this is equivalent to $$ n \geq \frac{1+2(m-1)(2 m+1)}{4 m}=m-\frac{2 m+1}{4 m} $$ which holds for all $n \geq m$. ## §1.3 TSTST 2023/3, proposed by Merlijn Staps Available online at https://aops.com/community/p28015682. ## Problem statement Find all positive integers $n$ for which it is possible to color some cells of an infinite grid of unit squares red, such that each rectangle consisting of exactly $n$ cells (and whose edges lie along the lines of the grid) contains an odd number of red cells. We claim that this is possible for all positive integers $n$. Call a positive integer for which such a coloring is possible good. To show that all positive integers $n$ are good we prove the following: (i) If $n$ is good and $p$ is an odd prime, then $p n$ is good; (ii) For every $k \geq 0$, the number $n=2^{k}$ is good. Together, (i) and (ii) imply that all positive integers are good. 【 Proof of (i). We simply observe that if every rectangle consisting of $n$ cells contains an odd number of red cells, then so must every rectangle consisting of $p n$ cells. Indeed, because $p$ is prime, a rectangle consisting of $p n$ cells must have a dimension (length or width) divisible by $p$ and can thus be subdivided into $p$ rectangles consisting of $n$ cells. Thus every coloring that works for $n$ automatically also works for $p n$. 【 Proof of (ii). Observe that rectangles with $n=2^{k}$ cells have $k+1$ possible shapes: $2^{m} \times 2^{k-m}$ for $0 \leq m \leq k$. Claim - For each of these $k+1$ shapes, there exists a coloring with two properties: - Every rectangle with $n$ cells and shape $2^{m} \times 2^{k-m}$ contains an odd number of red cells. - Every rectangle with $n$ cells and a different shape contains an even number of red cells. Proof. This can be achieved as follows: assuming the cells are labeled with $(x, y) \in \mathbb{Z}^{2}$, color a cell red if $x \equiv 0\left(\bmod 2^{m}\right)$ and $y \equiv 0\left(\bmod 2^{k-m}\right)$. For example, a $4 \times 2$ rectangle gets the following coloring: ![](https://cdn.mathpix.com/cropped/2024_11_19_1cf0843c143ab4f13b3fg-13.jpg?height=395&width=401&top_left_y=2084&top_left_x=833) A $2^{m} \times 2^{k-m}$ rectangle contains every possible pair $\left(x \bmod 2^{m}, y \bmod 2^{k-m}\right)$ exactly once, so such a rectangle will contain one red cell (an odd number). On the other hand, consider a $2^{\ell} \times 2^{k-\ell}$ rectangle with $\ell>m$. The set of cells this covers is $(x, y)$ where $x$ covers a range of size $2^{\ell}$ and $y$ covers a range of size $2^{k-\ell}$. The number of red cells is the count of $x$ with $x \equiv 0 \bmod 2^{m}$ multiplied by the count of $y$ with $y \equiv 0 \bmod 2^{k-m}$. The former number is exactly $2^{\ell-k}$ because $2^{k}$ divides $2^{\ell}$ (while the latter is 0 or 1) so the number of red cells is even. The $\ell2 \\ 2\left(g(x)+g\left(x+p^{d}\right)+\cdots+g\left(x+(b-1) p^{d}\right)\right) & p=2\end{cases} \\ \equiv & 0 \quad(\bmod p) \end{aligned} $$ as desired. ## Corollary Let $g: \mathbb{Z} / a \mathbb{Z} \rightarrow \mathbb{Z} / p^{e} \mathbb{Z}$ be any function, and let $h=\Delta^{e p^{d}} g$. Then $$ h(x)+h\left(x+p^{d}\right)+\cdots+h\left(x+(b-1) p^{d}\right)=0 $$ for all $x$. Proof. Starting with the lemma, define $$ h_{1}(x)=\frac{h(x)+h\left(x+p^{d}\right)+\cdots+h\left(x+(b-1) p^{d}\right)}{p} . $$ Applying the lemma to $h_{1}$ shows the corollary for $e=2$, since $h_{1}(x)$ is divisible by $p$, hence the numerator is divisible by $p^{2}$. Continue in this manner to get the result for general $e>2$. This immediately settles this direction, since $f$ is in the image of $\Delta^{e p^{d}}$. Proof the equation implies essential Let $\mathcal{S}$ be the set of all functions satisfying 2 ; then it's easy to see that $\Delta$ is a function on $\mathcal{S}$. To show that all functions in $\mathcal{S}$ are essential, it's equivalent to show that $\Delta$ is a permutation on $\mathcal{S}$. We will show that $\Delta$ is injective on $\mathcal{S}$. Suppose otherwise, and consider two functions $f$, $g$ in $\mathcal{S}$ with $\Delta f=\Delta g$. Then, we obtain that $f$ and $g$ differ by a constant; say $g=f+\lambda$. However, then $$ \begin{aligned} & g(0)+g\left(p^{e}\right)+\cdots+g\left((b-1) p^{e}\right) \\ = & (f(0)+\lambda)+\left(f\left(p^{e}\right)+\lambda\right)+\cdots+\left(f\left((b-1) p^{e}\right)+\lambda\right) \\ = & b \lambda \end{aligned} $$ This should also be zero. Since $p \nmid b$, we obtain $\lambda=0$, as desired. Counting Finally, we can count the essential functions: all but the last $p^{d}$ entries can be chosen arbitrarily, and then each remaining entry has exactly one possible choice. This leads to a count of $$ \left(p^{e}\right)^{a-p^{d}}=p^{e\left(a-p^{\nu_{p}(a)}\right)}, $$ as promised. II Second solution by Daniel Zhu. There are two parts to the proof: solving the $e=1$ case, and using the $e=1$ result to solve the general problem by induction on $e$. These parts are independent of each other. The case $e=1 \quad$ Represent functions $f$ as elements $$ \alpha_{f}:=\sum_{k \in \mathbb{Z} / a \mathbb{Z}} f(-k) x^{k} \in \mathbb{F}_{p}[x] /\left(x^{a}-1\right) $$ Then, since $\alpha_{\Delta f}=(x-1) \alpha_{f}$, we wish to find the number of $\alpha \in \mathbb{F}_{p}[x] /\left(x^{a}-1\right)$ such that $(x-1)^{m} \alpha=\alpha$ for some $m$. Now, make the substitution $y=x-1$ and let $P(y)=(y+1)^{a}-1$; we want to find $\alpha \in \mathbb{F}_{p}[y] /(P(y))$ such that $y^{m} \alpha=\alpha$ for some $m$. If we write $P(y)=y^{d} Q(y)$ with $Q(0) \neq 0$, then by the Chinese Remainder Theorem we have the ring isomorphism $$ \mathbb{F}_{p}[y] /(P(y)) \cong \mathbb{F}_{p}[y] /\left(y^{d}\right) \times \mathbb{F}_{p}[y] /(Q(y)) $$ Note that $y$ is nilpotent in the first factor, while it is a unit in the second factor. So the $\alpha$ that work are exactly those that are zero in the first factor; thus there are $p^{a-d}$ such $\alpha$. We can calculate $d=p^{v_{p}(a)}$ (via, say, Lucas's Theorem), so we are done. The general problem The general idea is as follows: call a $f: \mathbb{Z} / a \mathbb{Z} \rightarrow \mathbb{Z} / p^{e} \mathbb{Z} e$-good if $\Delta^{m} f=f$ for some $m$. Our result above allows us to count the 1-good functions. Then, if $e \geq 1$, every $(e+1)$-good function, when reduced $\bmod p^{e}$, yields an $e$-good function, so we count $(e+1)$-good functions by counting how many reduce to any given $e$-good function. Formally, we use induction on $e$, with the $e=1$ case being treated above. Suppose now we have solved the problem for a given $e \geq 1$, and we now wish to solve it for $e+1$. For any function $g: \mathbb{Z} / a \mathbb{Z} \rightarrow \mathbb{Z} / p^{e+1} \mathbb{Z}$, let $\bar{g}: \mathbb{Z} / a \mathbb{Z} \rightarrow \mathbb{Z} / p^{e} \mathbb{Z}$ be its reduction $\bmod p^{e}$. For a given $e$-good $f$, let $n(f)$ be the number of $(e+1)$-good $g$ with $\bar{g}=f$. The following two claims now finish the problem: Claim - If $f$ is $e$-good, then $n(f)>0$. Proof. Suppose $m$ is such that $\Delta^{m} f=f$. Pick any $g$ with $\bar{g}=f$, and consider the sequence of functions $$ g, \Delta^{m} g, \Delta^{2 m} g, \ldots $$ Since there are finitely many functions $\mathbb{Z} / a \mathbb{Z} \rightarrow \mathbb{Z} / p^{e+1} \mathbb{Z}$, there must exist $a0$, then $n(f)$ is exactly the number of 1-good functions, i.e. $p^{a-p^{v_{p}(a)}}$. Proof. Let $g$ be any $(e+1)$-good function with $\bar{g}=f$. We claim that the $(e+1)$-good $g_{1}$ with $\bar{g}_{1}=f$ are exactly the functions of the form $g+p^{e} h$ for any 1-good $h$. Since these functions are clearly distinct, this characterization will prove the claim. To show that this condition is sufficient, note that $\overline{g+p^{e} h}=\bar{g}=f$. Moreover, if $\Delta^{m} g=g$ and $\Delta^{m^{\prime}} h=h$, then $$ \Delta^{m m^{\prime}}\left(g+p^{e} h\right)=\Delta^{m m^{\prime}} g+p^{e} \Delta^{m m^{\prime}} h=g+p^{e} h . $$ To show that this condition is necessary, let $g_{1}$ be any $(e+1)$-good function such that $\bar{g}_{1}=f$. Then $g_{1}-g$ is also $(e+1)$-good, since if $\Delta^{m} g=g, \Delta^{m^{\prime}} g_{1}=g_{1}$, we have $$ \Delta^{m m^{\prime}}\left(g_{1}-g\right)=\Delta^{m m^{\prime}} g_{1}-\Delta^{m m^{\prime}} g=g_{1}-g . $$ On the other hand, we also know that $g_{1}-g$ is divisible by $p^{e}$. This means that it must be $p^{e} h$ for some function $f: \mathbb{Z} / a \mathbb{Z} \rightarrow \mathbb{Z} / p \mathbb{Z}$, and it is not hard to show that $g_{1}-g$ being $(e+1)$-good means that $h$ is 1 -good.