exam: USAJMO

problem: Prove that there exist infinitely many pairs of relatively prime positive integers $a, b>1$ for which $a+b$ divides $a^{b}+b^{a}$.

solution: One construction: let $d \equiv 1(\bmod 4), d>1$. Let $x=\frac{d^{d}+2^{d}}{d+2}$. Then set  $$ a=\frac{x+d}{2}, \quad b=\frac{x-d}{2} $$  To see this works, first check that $b$ is odd and $a$ is even. Let $d=a-b$ be odd. Then:  $$ \begin{aligned} a+b \mid a^{b}+b^{a} & \Longleftrightarrow(-b)^{b}+b^{a} \equiv 0 \quad(\bmod a+b) \\ & \Longleftrightarrow b^{a-b} \equiv 1 \quad(\bmod a+b) \\ & \Longleftrightarrow b^{d} \equiv 1 \quad(\bmod d+2 b) \\ & \Longleftrightarrow(-2)^{d} \equiv d^{d} \quad(\bmod d+2 b) \\ & \Longleftrightarrow d+2 b \mid d^{d}+2^{d} . \end{aligned} $$  So it would be enough that  $$ d+2 b=\frac{d^{d}+2^{d}}{d+2} \Longrightarrow b=\frac{1}{2}\left(\frac{d^{d}+2^{d}}{d+2}-d\right) $$  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.


problem: Show that the Diophantine equation  $$ \left(3 x^{3}+x y^{2}\right)\left(x^{2} y+3 y^{3}\right)=(x-y)^{7} $$  has infinitely many solutions in positive integers, and characterize all the solutions.

solution: Show that the Diophantine equation  $$ \left(3 x^{3}+x y^{2}\right)\left(x^{2} y+3 y^{3}\right)=(x-y)^{7} $$   Let $x=d a, y=d b$, where $\operatorname{gcd}(a, b)=1$ and $a>b$. The equation is equivalent to  $$ (a-b)^{7} \mid a b\left(a^{2}+3 b^{2}\right)\left(3 a^{2}+b^{2}\right) $$  with the ratio of the two becoming $d$. Claim - The equation ( $\star$ ) holds if and only if $a-b=1$.  - If $a$ and $b$ are both odd, then $a^{2}+3 b^{2} \equiv 4(\bmod 8)$. Similarly $3 a^{2}+b^{2} \equiv 4(\bmod 8)$. Hence $2^{4}$ exactly divides right-hand side, contradiction. - Now suppose $a-b$ is odd. We have $\operatorname{gcd}(a-b, a)=\operatorname{gcd}(a-b, b)=1$ by Euclid, but also  $$ \operatorname{gcd}\left(a-b, a^{2}+3 b^{2}\right)=\operatorname{gcd}\left(a-b, 4 b^{2}\right)=1 $$  and similarly $\operatorname{gcd}\left(a-b, 3 a^{2}+b^{2}\right)=1$. Thus $a-b$ is coprime to each of $a, b, a^{2}+3 b^{2}$, $3 a^{2}+b^{2}$ and this forces $a-b=1$.   Remark. One can give different cosmetic representations of the same solution set. For example, we could write $b=\frac{1}{2}(n-1)$ and $a=\frac{1}{2}(n+1)$ with $n>1$ any odd integer. Then $d=a b\left(a^{2}+3 b^{2}\right)\left(3 a^{2}+b^{2}\right)=\frac{(n-1)(n+1)\left(n^{2}+n+1\right)\left(n^{2}-n+1\right)}{4}=\frac{n^{6}-1}{4}$, and hence the solution is  $$ (x, y)=(d a, d b)=\left(\frac{(n+1)\left(n^{6}-1\right)}{8}, \frac{(n-1)\left(n^{6}-1\right)}{8}\right) $$  which is a little simpler to write. The smallest solutions are $(364,182),(11718,7812), \ldots$


problem: Let $A B C$ be an equilateral triangle and $P$ a point on its circumcircle. Set $D=$ $\overline{P A} \cap \overline{B C}, E=\overline{P B} \cap \overline{C A}, F=\overline{P C} \cap \overline{A B}$. Prove that the area of triangle $D E F$ is twice the area of triangle $A B C$.

solution: \ First solution (barycentric). We invoke barycentric coordinates on $A B C$. Let $P=(u: v: w)$, with $u v+v w+w u=0$ (circumcircle equation with $a=b=c$ ). Then $D=(0: v: w), E=(u: 0: w), F=(u: v: 0)$. Hence  $$ \begin{aligned} \frac{[D E F]}{[A B C]} & =\frac{1}{(u+v)(v+w)(w+u)} \operatorname{det}\left[\begin{array}{lll} 0 & v & w \\ u & 0 & w \\ u & v & 0 \end{array}\right] \\ & =\frac{2 u v w}{(u+v)(v+w)(w+u)} \\ & =\frac{2 u v w}{(u+v+w)(u v+v w+w u)-u v w} \\ & =\frac{2 u v w}{-u v w}=-2 \end{aligned} $$  as desired (areas signed).


solution: 『 Second solution ("nice" lengths). WLOG $A B P C$ is convex. Let $x=A B=B C=$ $C A$. By Ptolemy's theorem and strong Ptolemy,  $$ \begin{aligned} P A & =P B+P C \\ P A^{2} & =P B \cdot P C+A B \cdot A C=P B \cdot P C+x^{2} \\ \Longrightarrow x^{2} & +P B^{2}+P B \cdot P C+P C^{2} . \end{aligned} $$  Also, $P D \cdot P A=P B \cdot P C$ and similarly since $\overline{P A}$ bisects $\angle B P C$ (causing $\triangle B P D \sim$ $\triangle A P C)$.  Now $P$ is the Fermat point of $\triangle D E F$, since $\angle D P F=\angle F P E=\angle E P D=120^{\circ}$. Thus  $$ \begin{aligned} {[D E F] } & =\frac{\sqrt{3}}{4} \sum_{\mathrm{cyc}} P E \cdot P F \\ & =\frac{\sqrt{3}}{4} \sum_{\mathrm{cyc}}\left(\frac{P A \cdot P C}{P B}\right)\left(\frac{P A \cdot P B}{P C}\right) \\ & =\frac{\sqrt{3}}{4} \sum_{\mathrm{cyc}} P A^{2} \\ & =\frac{\sqrt{3}}{4}\left((P B+P C)^{2}+P B^{2}+P C^{2}\right) \\ & =\frac{\sqrt{3}}{4} \cdot 2 x^{2}=2[A B C] . \end{aligned} $$


problem: Are there any triples $(a, b, c)$ of positive integers such that $(a-2)(b-2)(c-2)+12$ is a prime number that properly divides the positive number $a^{2}+b^{2}+c^{2}+a b c-2017$ ?

solution: $  No such $(a, b, c)$. Assume not. Let $x=a-2, y=b-2, z=c-2$, hence $x, y, z \geq-1$.  $$ \begin{aligned} a^{2}+b^{2}+c^{2}+a b c-2017 & =(x+2)^{2}+(y+2)^{2}+(z+2)^{2} \\ & +(x+2)(y+2)(z+2)-2017 \\ & =(x+y+z+4)^{2}+(x y z+12)-45^{2} \end{aligned} $$  Thus the divisibility relation becomes  $$ p=x y z+12 \mid(x+y+z+4)^{2}-45^{2}>0 $$  so either  $$ \begin{aligned} & p=x y z+12 \mid x+y+z-41 \\ & p=x y z+12 \mid x+y+z+49 \end{aligned} $$  Assume $x \geq y \geq z$, hence $x \geq 14$ (since $x+y+z \geq 41$ ). We now eliminate several edge cases to get $x, y, z \neq-1$ and a little more:  Claim - We have $x \geq 17, y \geq 5, z \geq 1$, and $\operatorname{gcd}(x y z, 6)=1$.   - If $x>0$ and $y=z=-1$, then we want $p=x+12$ to divide either $x-43$ or $x+47$. We would have $0 \equiv x-43 \equiv-55(\bmod p)$ or $0 \equiv x+47 \equiv 35(\bmod p)$, but $p>11$ contradiction. - If $x, y>0$, and $z=-1$, then $p=12-x y>0$. However, this is clearly incompatible with $x \geq 14$.  Finally, obviously $x y z \neq 0$ (else $p=12$ ). So $p=x y z+12 \geq 14 \cdot 1^{2}+12=26$ or $p \geq 29$. Thus $\operatorname{gcd}(6, p)=1$ hence $\operatorname{gcd}(6, x y z)=1$.  We finally check that $y=1$ is impossible, which forces $y \geq 5$. If $y=1$ and hence $z=1$ then $p=x+12$ should divide either $x+51$ or $x-39$. These give $39 \equiv 0(\bmod p)$ or $25 \equiv 0(\bmod p)$, but we are supposed to have $p \geq 29$.  In that situation $x+y+z-41$ and $x+y+z+49$ are both even, so whichever one is divisible by $p$ is actually divisible by $2 p$. Now we deduce that:  $$ x+y+z+49 \geq 2 p=2 x y z+24 \Longrightarrow 25 \geq 2 x y z-x-y-z $$  But $x \geq 17$ and $y \geq 5$ thus  $$ \begin{aligned} 2 x y z-x-y-z & =z(2 x y-1)-x-y \\ & \geq 2 x y-1-x-y \\ & >(x-1)(y-1)>60 \end{aligned} $$  which is a contradiction. Having exhausted all the cases we conclude no solutions exist. Remark. The condition that $x+y+z-41>0$ (which comes from "properly divides") cannot be dropped. Examples of solutions in which $x+y+z-41=0$ include $(x, y, z)=(31,5,5)$ and $(x, y, z)=(29,11,1)$.


problem: Let $O$ and $H$ be the circumcenter and the orthocenter of an acute triangle $A B C$. Points $M$ and $D$ lie on side $B C$ such that $B M=C M$ and $\angle B A D=\angle C A D$. Ray $M O$ intersects the circumcircle of triangle $B H C$ in point $N$. Prove that $\angle A D O=\angle H A N$.

solution: Let $P$ and $Q$ be the arc midpoints of $\widehat{B C}$, so that $A D M Q$ is cyclic (as $\measuredangle Q A D=$ $\measuredangle Q M D=90^{\circ}$ ). Since it's known that $(B H C)$ and $(A B C)$ are reflections across line $B C$, it follows $N$ is the reflection of the arc midpoint $P$ across $M$.  Claim - Quadrilateral $A D N O$ is cyclic.  ![](https://cdn.mathpix.com/cropped/2024_11_19_ecd01a6fb7aaf697c013g-08.jpg?height=806&width=738&top_left_y=1156&top_left_x=659)  To finish, note that $\measuredangle H A N=\measuredangle O N A=\measuredangle O D A$. Remark. The orthocenter $H$ is superficial and can be deleted basically immediately. One can reverse-engineer the fact that $A D N O$ is cyclic from the truth of the problem statement.  Remark. One can also show $A D N O$ concyclic by just computing $\measuredangle D A O=\measuredangle P A O$ and $\measuredangle D N O=\measuredangle D P N=\measuredangle A P Q$ in terms of the angles of the triangle, or even more directly just because  $$ \measuredangle D N O=\measuredangle D N P=\measuredangle N P D=\measuredangle O P D=\measuredangle O N A=\measuredangle H A N $$


problem: 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.

solution: \ 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.   The two blue points can then be located in three possible ways: either 0,1 , or 2 of them lie on the 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).  Case 1 ![](https://cdn.mathpix.com/cropped/2024_11_19_ecd01a6fb7aaf697c013g-10.jpg?height=253&width=742&top_left_y=249&top_left_x=711)  Case 2 ![](https://cdn.mathpix.com/cropped/2024_11_19_ecd01a6fb7aaf697c013g-10.jpg?height=301&width=728&top_left_y=575&top_left_x=719)  Case $3 R_{i+1}{ }^{\prime}$ ![](https://cdn.mathpix.com/cropped/2024_11_19_ecd01a6fb7aaf697c013g-10.jpg?height=244&width=718&top_left_y=963&top_left_x=729)  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.


solution: 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. ![](https://cdn.mathpix.com/cropped/2024_11_19_ecd01a6fb7aaf697c013g-10.jpg?height=518&width=598&top_left_y=1985&top_left_x=729)  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.