exam: USAJMO

problem: Let $A B C D$ be a cyclic quadrilateral with $A B=7$ and $C D=8$. Points $P$ and $Q$ are selected on line segment $A B$ so that $A P=B Q=3$. Points $R$ and $S$ are selected on line segment $C D$ so that $C R=D S=2$. Prove that $P Q R S$ is a cyclic quadrilateral.

solution: \l The one-liner. The four points $P, Q, R, S$ have equal power -12 with respect to $(A B C D)$. So in fact they're on a circle concentric with $(A B C D)$.


solution: \ The external power solution. We distinguish between two cases.  Case where $A B$ and $C D$ are not parallel. We let lines $A B$ and $C D$ meet at $T$. Without loss of generality, $A$ lies between $B$ and $T$ and $D$ lies between $C$ and $T$. Let $x=T A$ and $y=T D$, as shown below. ![](https://cdn.mathpix.com/cropped/2024_11_19_805564b9ec1a761a333dg-03.jpg?height=541&width=812&top_left_y=1346&top_left_x=633)  By power of a point,  $$ \begin{aligned} A B C D \text { cyclic } \Longleftrightarrow x(x+7) & =y(y+8) \\ P Q R S \text { cyclic } \Longleftrightarrow(x+3)(x+4) & =(y+2)(y+6) . \end{aligned} $$  However, the latter equation is just the former with 12 added to both sides. (That is, $(x+3)(x+4)=x(x+7)+12$ while $(y+2)(y+6)=y(y+8)+12$.$) So the conclusion is$ immediate.  Case where $A B$ and $C D$ are parallel. In that case $A B C D$ is an isosceles trapezoid. Then the entire picture is symmetric around the common perpendicular bisector of the lines $A B$ and $C D$. Now $P Q R S$ is also an isosceles trapezoid, so it's cyclic too. ![](https://cdn.mathpix.com/cropped/2024_11_19_805564b9ec1a761a333dg-04.jpg?height=420&width=420&top_left_y=244&top_left_x=818)


problem: Let $m$ and $n$ be positive integers. Let $S$ be the set of lattice points $(x, y)$ with $1 \leq x \leq 2 m$ and $1 \leq y \leq 2 n$. A configuration of $m n$ rectangles is called happy if each point of $S$ is the vertex of exactly one rectangle. Prove that the number of happy configurations is odd.

solution: I Original proposer's solution. To this end, let's denote by $f(2 m, 2 n)$ the number of happy configurations for a $2 m \times 2 n$ grid of lattice points (not necessarily equally spaced - this doesn't change the count). We already have the following easy case.  Claim - We have $f(2,2 n)=(2 n-1)!!=(2 n-1) \cdot(2 n-3) \cdots \cdots 3 \cdot 1$.  We will prove that: Claim - Assume $m, n \geq 1$. When $f(2 m, 2 n) \equiv f(2 m-2,2 n)(\bmod 2)$.  Now configurations fixed by $\tau$ can be described readily: this occurs if and only if the last two columns are self-contained, meaning every rectangle with a vertex in these columns is completely contained in these two columns. ![](https://cdn.mathpix.com/cropped/2024_11_19_805564b9ec1a761a333dg-06.jpg?height=809&width=847&top_left_y=241&top_left_x=596)  Hence it follows that  $$ f(2 m, 2 n)=2(\text { number of pairs })+f(2 m-2,2 n) \cdot f(2,2 n) $$  Taking modulo 2 gives the result. By the same token $f(2 m, 2 n) \equiv f(2 m, 2 n-2)(\bmod 2)$. So all $f$-values have the same parity, and from $f(2,2)=1$ we're done.


solution: \l Evan's permutation-based solution. Retain the notation $f(2 m, 2 n)$ from before. Given a happy configuration, consider all the rectangles whose left edge is in the first column. Highlight every column containing the right edge of such a rectangle. For example, in the figure below, there are two highlighted columns. (The rectangles are drawn crooked so one can tell them apart.) ![](https://cdn.mathpix.com/cropped/2024_11_19_805564b9ec1a761a333dg-06.jpg?height=515&width=832&top_left_y=1861&top_left_x=612)  We organize happy configurations based on the set of highlighted columns. Specifically, define the relation $\sim$ on configurations by saying that $\mathcal{C} \sim \mathcal{C}^{\prime}$ if they differ by any permutation of the highlighted columns. This is an equivalence relation. And in general, if there are $k$ highlighted columns, its equivalence class under $\sim$ has $k$ ! elements.  Then  Claim - $f(2 m, 2 n)$ has the same parity as the number of happy configurations with exactly one highlighted column.  There are $2 m-1$ ways to pick a single highlighted column, and then $f(2,2 n)=(2 n-1)!!$ ways to use the left column and highlighted column. So the count in the claim is exactly given by  $$ (2 m-1) \cdot(2 n-1)!!f(2 m-2,2 n) $$  This implies $f(2 m, 2 n) \equiv f(2 m-2,2 n)(\bmod 2)$ and proceeding by induction as before solves the problem.


problem: A sequence $a_{1}, a_{2}, \ldots$ of positive integers is defined recursively by $a_{1}=2$ and  $$ a_{n+1}=a_{n}^{n+1}-1 \quad \text { for } n \geq 1 $$  Prove that for every odd prime $p$ and integer $k$, some term of the sequence is divisible by $p^{k}$.

solution: We start with the following. Claim - Assume $n$ is a positive integer divisible by $p-1$. Then either $a_{n-1} \equiv 0$ $(\bmod p)$ or $a_{n} \equiv 0(\bmod p)$.   $$ a_{n}=a_{n-1}^{n}-1 \equiv x^{p-1}-1 \equiv 0 \quad(\bmod p) $$  where $x:=a_{n-1}^{\frac{n}{p-1}}$ is an integer not divisible by $p$. Claim - If $n \geq 2$ is even, then  $$ a_{n}^{n+1} \mid a_{n+2} $$   By considering multiples $n$ of $p-1$ which are larger than $k$, we see that if $a_{n} \equiv 0$ $(\bmod p)$ ever happens, we are done by combining the two previous claims. So the difficult case of the problem is the bad situation where $a_{n-1} \equiv 0(\bmod p)$ occurs for almost all $n \equiv 0(\bmod p-1)$.  To resolve the difficult case and finish the problem, we zoom in on specific $n$ that will let us use lifting the exponent on $a_{n-1}$.  Claim - Suppose $n$ is an (even) integer satisfying  $$ \begin{aligned} & n \equiv 0 \quad(\bmod p-1) \\ & n \equiv 1 \quad\left(\bmod p^{k-1}\right) \end{aligned} $$  If $a_{n-1} \equiv 0(\bmod p)$, then in fact $p^{k} \mid a_{n-1}$.  $$ 0 \equiv \frac{1}{a_{n-2}}-1 \quad(\bmod p) \Longrightarrow a_{n-2} \equiv 1 \quad(\bmod p) $$  Hence lifting the exponent applies and we get  $$ \nu_{p}\left(a_{n-1}\right) \equiv \nu_{p}\left(a_{n-2}^{n-1}-1\right)=\nu_{p}\left(a_{n-2}-1\right)+\nu_{p}(n-1) \geq 1+(k-1)=k $$  as desired.  Remark. The first few terms are $a_{1}=2, a_{2}=3, a_{3}=26, a_{4}=456975$, and $a_{5}=$ 19927930852449199486318359374, ... No element of the sequence is divisible by 4: the residues modulo 4 alternate between 2 and 3 .  Remark. The second claim is important for the solution to work once $k \geq 2$. One could imagine a variation of the first claim that states if $n$ is divisible by $\varphi\left(p^{k}\right)=p^{k-1}(p-1)$, then either $a_{n-1} \equiv 0(\bmod p)$ or $a_{n} \equiv 0\left(\bmod p^{k}\right)$. However this gives an obstruction (for $k \geq 2)$ where we are guaranteed to have $n-1 \not \equiv 0(\bmod p)$ now, so lifting the exponent will never give additional factors of $p$ we want.


problem: Let $n \geq 3$ be an integer. Rowan and Colin play a game on an $n \times n$ grid of squares, where each square is colored either red or blue. Rowan is allowed to permute the rows of the grid and Colin is allowed to permute the columns. A grid coloring is orderly if:  - no matter how Rowan permutes the rows of the coloring, Colin can then permute the columns to restore the original grid coloring; and - no matter how Colin permutes the columns of the coloring, Rowan can then permute the rows to restore the original grid coloring. In terms of $n$, how many orderly colorings are there?

solution: The answer is $2 n!+2$. In fact, we can describe all the orderly colorings as follows:  - The all-blue coloring. - The all-red coloring. - Each of the $n$ ! colorings where every row/column has exactly one red cell. - Each of the $n$ ! colorings where every row/column has exactly one blue cell.  These obviously work; we turn our attention to proving these are the only ones. For the other direction, fix a orderly coloring $\mathcal{A}$. Consider any particular column $C$ in $\mathcal{A}$ and let $m$ denote the number of red cells that $C$ has. Any row permutation (say $\sigma$ ) that Rowan chooses will transform $C$ into some column $\sigma(C)$, and our assumption requires $\sigma(C)$ has to appear somewhere in the original assignment $\mathcal{A}$. An example for $n=7, m=2$, and a random $\sigma$ is shown below. ![](https://cdn.mathpix.com/cropped/2024_11_19_805564b9ec1a761a333dg-10.jpg?height=692&width=815&top_left_y=1910&top_left_x=618)  On the other hand, the number of possible patterns of $\sigma(C)$ is easily seen to be exactly ( $\binom{n}{m}$ - and they must all appear. In particular, if $m \notin\{0,1, n-1, n\}$, then we immediately get a contradiction because $\mathcal{A}$ would need too many columns (there are only $n$ columns in $\mathcal{A}$, which is fewer than $\binom{n}{m}$ ). Moreover, if either $m=1$ or $m=n-1$, these columns are all the columns of $\mathcal{A}$; these lead to the $2 n$ ! main cases we found before.  The only remaining case is when $m \in\{0, n\}$ for every column, i.e. every column is monochromatic. It's easy to see in that case the columns must all be the same color.


problem: Solve over $\mathbb{R}$ the functional equation $f\left(x^{2}-y\right)+2 y f(x)=f(f(x))+f(y)$.

solution: The answer is $f(x) \equiv x^{2}, f(x) \equiv 0, f(x) \equiv-x^{2}$, which obviously work. Let $P(x, y)$ be the usual assertion. Claim - We have $f(0)=0$ and $f$ even.   Claim $-f(x) \in\left\{-x^{2}, 0, x^{2}\right\}$ for every $x \in \mathbb{R}$.  $$ x^{2} f(x)=f\left(x^{2}\right)=f(f(x)) $$  Repeating this key identity several times gives  $$ \begin{aligned} f(f(f(x))) & =f\left(f\left(x^{2}\right)\right)=f\left(x^{4}\right)=x^{4} f\left(x^{2}\right) \\ & =f(x)^{2} \cdot f(f(x))=f(x)^{2} f\left(x^{2}\right)=f(x)^{3} x^{2} \end{aligned} $$  Suppose $t \neq 0$ is such that $f\left(t^{2}\right) \neq 0$. Then the above equalities imply  $$ t^{4} f\left(t^{2}\right)=f(t)^{2} f\left(t^{2}\right) \Longrightarrow f(t)= \pm t^{2} $$  and then  $$ f(t)^{2} f\left(t^{2}\right)=f(t)^{3} t^{2} \Longrightarrow f\left(t^{2}\right)= \pm t^{2} $$  Together with $f$ even, we get the desired result.   Now, note that $P(1, y)$ gives  $$ f(1-y)+2 y \cdot f(1)=f(1)+f(y) $$  We consider cases on $f(1)$ and show that $f$ matches the desired form.  - If $f(1)=1$, then $f(1-y)+(2 y-1)=f(y)$. Consider the nine possibilities that arise:  $$ \begin{array}{lll} (1-y)^{2}+(2 y-1)=y^{2} & 0+(2 y-1)=y^{2} & -(1-y)^{2}+(2 y-1)=y^{2} \\ (1-y)^{2}+(2 y-1)=0 & 0+(2 y-1)=0 & -(1-y)^{2}+(2 y-1)=0 \\ (1-y)^{2}+(2 y-1)=-y^{2} & 0+(2 y-1)=-y^{2} & -(1-y)^{2}+(2 y-1)=-y^{2} \end{array} $$  Each of the last eight equations is a nontrivial polynomial equation. Hence, there is some constant $C>100$ such that the latter eight equations are all false for any real number $y>C$. Consequently, $f(y)=y^{2}$ for $y>C$. Finally, for any real number $z>0$, take $x, y>C$ such that $x^{2}-y=z$; then $P(x, y)$ proves $f(z)=z^{2}$ too.  - Note that (as $f$ is even), $f$ works iff $-f$ works, so the case $f(1)=-1$ is analogous. - If $f(1)=0$, then $f(1-y)=f(y)$. Hence for any $y$ such that $|1-y| \neq|y|$, we conclude $f(y)=0$. Then take $P(2,7 / 2) \Longrightarrow f(1 / 2)=0$.   $$ P\left(x, y^{2}\right) \Longrightarrow f\left(x^{2}-y^{2}\right)+2 y^{2} f(x)=f(f(x))+f(f(y)) $$  Since $f$ is even gives $f\left(x^{2}-y^{2}\right)=f\left(y^{2}-x^{2}\right)$, one can swap the roles of $x$ and $y$ to get $2 y^{2} f(x)=2 x^{2} f(y)$. Set $y=1$ to finish.


problem: Point $D$ is selected inside acute triangle $A B C$ so that $\angle D A C=\angle A C B$ and $\angle B D C=90^{\circ}+\angle B A C$. Point $E$ is chosen on ray $B D$ so that $A E=E C$. Let $M$ be the midpoint of $B C$. Show that line $A B$ is tangent to the circumcircle of triangle $B E M$.

solution: ब The author's original solution. Complete isosceles trapezoid $A B Q C$ (so $D \in \overline{A Q}$ ). Reflect $B$ across $E$ to point $F$. ![](https://cdn.mathpix.com/cropped/2024_11_19_805564b9ec1a761a333dg-14.jpg?height=663&width=718&top_left_y=959&top_left_x=675)  Claim - We have $D Q C F$ is cyclic.  $$ \begin{aligned} \measuredangle F D C & =-\measuredangle C D B=180^{\circ}-\left(90^{\circ}+\measuredangle C A B\right)=90^{\circ}-\measuredangle C A B \\ & =90^{\circ}-\measuredangle Q C A=\measuredangle F Q C . \end{aligned} $$  To conclude, note that  $$ \measuredangle B E M=\measuredangle B F C=\measuredangle D F C=\measuredangle D Q C=\measuredangle A Q C=\measuredangle A B C=\measuredangle A B M $$  Remark (Motivation). Here is one possible way to come up with the construction of point $F$ (at least this is what led Evan to find it). If one directs all the angles in the obvious way, there are really two points $D$ and $D^{\prime}$ that are possible, although one is outside the triangle; they give corresponding points $E$ and $E^{\prime}$. The circles $B E M$ and $B E^{\prime} M$ must then actually coincide since they are both alleged to be tangent to line $A B$. See the figure below. ![](https://cdn.mathpix.com/cropped/2024_11_19_805564b9ec1a761a333dg-15.jpg?height=1112&width=1047&top_left_y=238&top_left_x=513)  One can already prove using angle chasing that $\overline{A B}$ is tangent to $\left(B E E^{\prime}\right)$. So the point of the problem is to show that $M$ lies on this circle too. However, from looking at the diagram, one may realize that in fact it seems  $$ \triangle M E E^{\prime} \stackrel{ }{\sim} \triangle C D D^{\prime} $$  is going to be true from just those marked in the figure (and this would certainly imply the desired concyclic conclusion). Since $M$ is a midpoint, it makes sense to dilate $\triangle E M E^{\prime}$ from $B$ by a factor of 2 to get $\triangle F C F^{\prime}$ so that the desired similarity is actually a spiral similarity at $C$. Then the spiral similarity lemma says that the desired similarity is equivalent to requiring $\overline{D D^{\prime}} \cap \overline{F F^{\prime}}=Q$ to lie on both $(C D F)$ and $\left(C D^{\prime} F^{\prime}\right)$. Hence the key construction and claim from the solution are both discovered naturally, and we find the solution above. (The points $D^{\prime}, E^{\prime}, F^{\prime}$ can then be deleted to hide the motivation.)


solution: Another short solution. Let $Z$ be on line $B D E$ such that $\angle B A Z=90^{\circ}$. This lets us interpret the angle condition as follows:  $$ \text { Claim - Points } A, D, Z, C \text { are cyclic. } $$  ![](https://cdn.mathpix.com/cropped/2024_11_19_805564b9ec1a761a333dg-16.jpg?height=804&width=701&top_left_y=249&top_left_x=683)  Define $W$ as the midpoint of $\overline{B Z}$, so $\overline{M W} \| \overline{C Z}$. And let $O$ denote the center of $(A B C)$.  Claim - Points $M, E, O, W$ are cyclic.   $$ \begin{aligned} \measuredangle M O E & =\measuredangle(\overline{O M}, \overline{B C})+\measuredangle(\overline{B C}, \overline{A C})+\measuredangle(\overline{A C}, \overline{O E}) \\ & =90^{\circ}+\measuredangle B C A+90^{\circ} \\ & =\measuredangle B C A=\measuredangle C A D=\measuredangle C Z D=\measuredangle M W D=\measuredangle M W E . \end{aligned} $$  To finish, note  $$ \begin{aligned} \measuredangle M E B & =\measuredangle M E W=\measuredangle M O W \\ & =\measuredangle(\overline{M O}, \overline{B C})+\measuredangle(\overline{B C}, \overline{A B})+\measuredangle(\overline{A B}, \overline{O W}) \\ & =90^{\circ}+\measuredangle C B A+90^{\circ}=\measuredangle C B A=\measuredangle M B A . \end{aligned} $$  This implies the desired tangency.


solution: I A Menelaus-based approach (Kevin Ren). Let $P$ be on $\overline{B C}$ with $A P=P C$. Let $Y$ be the point on line $A B$ such that $\angle A C Y=90^{\circ}$; as $\angle A Y C=90^{\circ}-A$ it follows $B D Y C$ is cyclic. Let $K=\overline{A P} \cap \overline{C Y}$, so $\triangle A C K$ is a right triangle with $P$ the midpoint of its hypotenuse. ![](https://cdn.mathpix.com/cropped/2024_11_19_805564b9ec1a761a333dg-17.jpg?height=1192&width=1075&top_left_y=249&top_left_x=496)  Claim - Triangles BPE and DYK are similar.  Claim - Triangles $B E M$ and $Y D C$ are similar.   $$ \frac{B P}{B C} \frac{Y C}{Y K} \frac{A K}{A P}=1 $$  Since $A K / A P=2$ (note that $P$ is the midpoint of the hypotenuse of right triangle $A C K)$ and $B C=2 B M$, this simplifies to  $$ \frac{B P}{B M}=\frac{Y K}{Y C} $$  To finish, note that  $$ \measuredangle D B A=\measuredangle D B Y=\measuredangle D C Y=\measuredangle B M E $$  implying the desired tangency.


solution: 『 A spiral similarity approach (Hans $\mathbf{Y u}$ ). As in the previous solution, let $Y$ be the point on line $A B$ such that $\angle A C Y=90^{\circ}$; so $B D Y C$ is cyclic. Let $\Gamma$ be the circle through $B$ and $M$ tangent to $\overline{A B}$, and let $\Omega:=(B C Y D)$. We need to show $E \in \Gamma$. ![](https://cdn.mathpix.com/cropped/2024_11_19_805564b9ec1a761a333dg-18.jpg?height=1101&width=1029&top_left_y=429&top_left_x=519)  Denote by $S$ the second intersection of $\Gamma$ and $\Omega$. The main idea behind is to consider the spiral similarity  $$ \Psi: \Omega \rightarrow \Gamma \quad C \mapsto M \text { and } Y \mapsto B $$  centered at $S$ (due to the spiral similarity lemma), and show that $\Psi(D)=E$. The spiral similarity lemma already promises $\Psi(D)$ lies on line $B D$.  Claim - We have $\Psi(A)=O$, the circumcenter of $A B C$.   Claim - $\Psi$ maps line $A D$ to line $O P$.   $$ \measuredangle(\overline{A D}, \overline{O P})=\measuredangle A P O=\measuredangle O P C=\measuredangle Y C P=\measuredangle(\overline{Y C}, \overline{B M}) $$  As $\Psi$ maps line $Y C$ to line $B M$ and $\Psi(A)=O$, we're done. Hence $\Psi(D)$ should not only lie on $B D$ but also line $O P$. This proves $\Psi(D)=E$, so $E \in \Gamma$ as needed.