# JMO 2017 Solution Notes Evan Chen《陳誼廷》 15 April 2024 #### Abstract This is a compilation of solutions for the 2017 JMO. 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 1 Solutions to Day 1 1.1 JMO 2017/1, proposed by Gregory Galperin ..... 3 1.2 JMO 2017/2, proposed by Titu Andreescu ..... 4 1.3 JMO 2017/3, proposed by Titu Andreescu, Luis Gonzalez, Cosmin Pohoata 2 Solutions to Day 2 ..... 6 2.1 JMO 2017/4, proposed by Titu Andreescu 2.2 JMO 2017/5, proposed by Ivan Borsenco 2.3 JMO 2017/6, proposed by Maria Monks ## §0 Problems 1. Prove that there exist infinitely many pairs of relatively prime positive integers $a, b>1$ for which $a+b$ divides $a^{b}+b^{a}$. 2. 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. 3. 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$. 4. 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$ ? 5. 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$. 6. 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. ## §1 Solutions to Day 1 ## §1.1 JMO 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 $$ 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. ## §1.2 JMO 2017/2, proposed by Titu Andreescu Available online at https://aops.com/community/p8108503. ## Problem statement 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. 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$. Proof. Obviously if $a-b=1$ then $(\star)$ is true. Conversely, suppose $(\star)$ holds. - 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$. This therefore describes all solutions: namely, for any $b \geq 1$, if we set $a=b+1$ and $d=a b\left(a^{2}+3 b^{2}\right)\left(3 a^{2}+b\right)$ then $(x, y)=(d a, d b)$ works and any solution is of this form. 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$ ## §1.3 JMO 2017/3, proposed by Titu Andreescu, Luis Gonzalez, Cosmin Pohoata Available online at https://aops.com/community/p8108450. ## Problem statement 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$. \ 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). 『 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} $$ ## §2 Solutions to Day 2 ## §2.1 JMO 2017/4, proposed by Titu Andreescu Available online at https://aops.com/community/p8117256. ## Problem statement 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 ?$ 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$. Proof. First, we check that neither $y$ nor $z$ is negative. - 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)$. ## §2.2 JMO 2017/5, proposed by Ivan Borsenco Available online at https://aops.com/community/p8117237. ## Problem statement 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$. 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. Proof. Since $P N \cdot P O=\frac{1}{2} P N \cdot 2 P O=P M \cdot P Q=P D \cdot P A$. ![](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 $$ ## §2.3 JMO 2017/6, 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