Solutions of APMO 2015
Problem 1. Let $A B C$ be a triangle, and let $D$ be a point on side $B C$. A line through $D$ intersects side $A B$ at $X$ and ray $A C$ at $Y$. The circumcircle of triangle $B X D$ intersects the circumcircle $\omega$ of triangle $A B C$ again at point $Z \neq B$. The lines $Z D$ and $Z Y$ intersect $\omega$ again at $V$ and $W$, respectively. Prove that $A B=V W$.
Solution. Suppose $X Y$ intersects $\omega$ at points $P$ and $Q$, where $Q$ lies between $X$ and $Y$. We will show that $V$ and $W$ are the reflections of $A$ and $B$ with respect to the perpendicular bisector of $P Q$. From this, it follows that $A V W B$ is an isosceles trapezoid and hence $A B=V W$.
First, note that
so $\angle A P Q=\angle P Z V=\angle P Q V$, and hence $V$ is the reflection of $A$ with respect to the perpendicular bisector of $P Q$.
Now, suppose $W^{\prime}$ is the reflection of $B$ with respect to the perpendicular bisector of $P Q$, and let $Z^{\prime}$ be the intersection of $Y W^{\prime}$ and $\omega$. It suffices to show that $B, X, D, Z^{\prime}$ are concyclic. Note that
So $D, C, Y, Z^{\prime}$ are concyclic. Next, $\angle B Z^{\prime} D=\angle C Z^{\prime} B-\angle C Z^{\prime} D=180^{\circ}-\angle B X D$ and due to the previous concyclicity we are done.
Alternative solution 1. Using cyclic quadrilaterals $B X D Z$ and $A B Z V$ in turn, we have $\angle Z D Y=\angle Z B A=\angle Z C Y$. So $Z D C Y$ is cyclic.
Using cyclic quadrilaterals $A B Z C$ and $Z D C Y$ in turn, we have $\angle A Z B=\angle A C B=\angle W Z V$ (or $180^{\circ}-\angle W Z V$ if $Z$ lies between $W$ and $C$ ).
So $A B=V W$ because they subtend equal (or supplementary) angles in $\omega$. Alternative solution 2. Using cyclic quadrilaterals $B X D Z$ and $A B Z V$ in turn, we have $\angle Z D Y=\angle Z B A=\angle Z C Y$. So $Z D C Y$ is cyclic.
Using cyclic quadrilaterals $B X D Z$ and $A B Z V$ in turn, we have $\angle D X A=\angle V Z B=$ $180^{\circ}-B A V$. So $X D | A V$.
Using cyclic quadrilaterals $Z D C Y$ and $B C W Z$ in turn, we have $\angle Y D C=\angle Y Z C=$ $\angle W B C$. So $X D | B W$.
Hence $B W | A V$ which implies that $A V W B$ is an isosceles trapezium with $A B=V W$. Problem 2. Let $S={2,3,4, \ldots}$ denote the set of integers that are greater than or equal to 2 . Does there exist a function $f: S \rightarrow S$ such that
Solution. We prove that there is no such function. For arbitrary elements $a$ and $b$ of $S$, choose an integer $c$ that is greater than both of them. Since $b c>a$ and $c>b$, we have
Furthermore, since $a c>b$ and $c>a$, we have
Comparing these two equations, we find that for all elements $a$ and $b$ of $S$,
It follows that there exists a positive rational number $k$ such that
Substituting this into the functional equation yields
Now combine the functional equation with equations (1) and (2) to obtain
It follows that $f(a)=k$ for all $a \in S$. Substituting $a=2$ and $b=3$ into the functional equation yields $k=1$, however $1 \notin S$ and hence we have no solutions.
Problem 3. A sequence of real numbers $a_{0}, a_{1}, \ldots$ is said to be good if the following three conditions hold. (i) The value of $a_{0}$ is a positive integer. (ii) For each non-negative integer $i$ we have $a_{i+1}=2 a_{i}+1$ or $a_{i+1}=\frac{a_{i}}{a_{i}+2}$. (iii) There exists a positive integer $k$ such that $a_{k}=2014$.
Find the smallest positive integer $n$ such that there exists a good sequence $a_{0}, a_{1}, \ldots$ of real numbers with the property that $a_{n}=2014$.
Answer: 60. Solution. Note that
Hence
Therefore,
where $\varepsilon_{i}=0$ or 1 . Multiplying both sides by $2^{k}\left(a_{k}+1\right)$ and putting $a_{k}=2014$, we get
where $\varepsilon_{i}=0$ or 1 . Since $\operatorname{gcd}(2,2015)=1$, we have $a_{0}+1=2015$ and $a_{0}=2014$. Therefore,
where $\varepsilon_{i}=0$ or 1 . We now need to find the smallest $k$ such that $2015 \mid 2^{k}-1$. Since $2015=$ $5 \cdot 13 \cdot 31$, from the Fermat little theorem we obtain $5\left|2^{4}-1,13\right| 2^{12}-1$ and $31 \mid 2^{30}-1$. We also have $\operatorname{lcm}[4,12,30]=60$, hence $5\left|2^{60}-1,13\right| 2^{60}-1$ and $31 \mid 2^{60}-1$, which gives $2015 \mid 2^{60}-1$.
But $5 \nmid 2^{30}-1$ and so $k=60$ is the smallest positive integer such that $2015 \mid 2^{k}-1$. To conclude, the smallest positive integer $k$ such that $a_{k}=2014$ is when $k=60$.
Alternative solution 1. Clearly all members of the sequence are positive rational numbers. For each positive integer $i$, we have $a_{i}=\frac{a_{i+1}-1}{2}$ or $a_{i}=\frac{2 a_{i+1}}{1-a_{i+1}}$. Since $a_{i}>0$ we deduce that
Thus $a_{i}$ is uniquely determined from $a_{i+1}$. Hence starting from $a_{k}=2014$, we simply run the sequence backwards until we reach a positive integer. We compute as follows.
There are 61 terms in the above list. Thus $k=60$. Alternative solution 1 is quite computationally intensive. Calculating the first few terms indicates some patterns that are easy to prove. This is shown in the next solution.
Alternative solution 2. Start with $a_{k}=\frac{m_{0}}{n_{0}}$ where $m_{0}=2014$ and $n_{0}=1$ as in alternative solution 1. By inverting the sequence as in alternative solution 1, we have $a_{k-i}=\frac{m_{i}}{n_{i}}$ for $i \geq 0$ where
Easy inductions show that $m_{i}+n_{i}=2015,1 \leq m_{i}, n_{i} \leq 2014$ and $\operatorname{gcd}\left(m_{i}, n_{i}\right)=1$ for $i \geq 0$. Since $a_{0} \in \mathbb{N}^{+}$and $\operatorname{gcd}\left(m_{k}, n_{k}\right)=1$, we require $n_{k}=1$. An easy induction shows that $\left(m_{i}, n_{i}\right) \equiv\left(-2^{i}, 2^{i}\right)(\bmod 2015)$ for $i=0,1, \ldots, k$.
Thus $2^{k} \equiv 1(\bmod 2015)$. As in the official solution, the smallest such $k$ is $k=60$. This yields $n_{k} \equiv 1(\bmod 2015)$. But since $1 \leq n_{k}, m_{k} \leq 2014$, it follows that $a_{0}$ is an integer.
Problem 4. Let $n$ be a positive integer. Consider $2 n$ distinct lines on the plane, no two of which are parallel. Of the $2 n$ lines, $n$ are colored blue, the other $n$ are colored red. Let $\mathcal{B}$ be the set of all points on the plane that lie on at least one blue line, and $\mathcal{R}$ the set of all points on the plane that lie on at least one red line. Prove that there exists a circle that intersects $\mathcal{B}$ in exactly $2 n-1$ points, and also intersects $\mathcal{R}$ in exactly $2 n-1$ points.
Solution. Consider a line $\ell$ on the plane and a point $P$ on it such that $\ell$ is not parallel to any of the $2 n$ lines. Rotate $\ell$ about $P$ counterclockwise until it is parallel to one of the $2 n$ lines. Take note of that line and keep rotating until all the $2 n$ lines are met. The $2 n$ lines are now ordered according to which line is met before or after. Say the lines are in order $\ell_{1}, \ldots, \ell_{2 n}$. Clearly there must be $k \in{1, \ldots, 2 n-1}$ such that $\ell_{k}$ and $\ell_{k+1}$ are of different colors.
Now we set up a system of $X-$ and $Y$ - axes on the plane. Consider the two angular bisectors of $\ell_{k}$ and $\ell_{k+1}$. If we rotate $\ell_{k+1}$ counterclockwise, the line will be parallel to one of the bisectors before the other. Let the bisector that is parallel to the rotation of $\ell_{k+1}$ first be the $X$-axis, and the other the $Y$-axis. From now on, we will be using the directed angle notation: for lines $s$ and $s^{\prime}$, we define $\angle\left(s, s^{\prime}\right)$ to be a real number in $[0, \pi)$ denoting the angle in radians such that when $s$ is rotated counterclockwise by $\angle\left(s, s^{\prime}\right)$ radian, it becomes parallel to $s^{\prime}$. Using this notation, we notice that there is no $i=1, \ldots, 2 n$ such that $\angle\left(X, l_{i}\right)$ is between $\angle\left(X, \ell_{k}\right)$ and $\angle\left(X, \ell_{k+1}\right)$.
Because the $2 n$ lines are distinct, the set $S$ of all the intersections between $\ell_{i}$ and $\ell_{j}(i \neq j)$ is a finite set of points. Consider a rectangle with two opposite vertices lying on $\ell_{k}$ and the other two lying on $\ell_{k+1}$. With respect to the origin (the intersection of $\ell_{k}$ and $\ell_{k+1}$ ), we can enlarge the rectangle as much as we want, while all the vertices remain on the lines. Thus, there is one of these rectangles $R$ which contains all the points in $S$ in its interior. Since each side of $R$ is parallel to either $X$ - or $Y$ - axis, $R$ is a part of the four lines $x= \pm a, y= \pm b$. where $a, b>0$.

Consider the circle $\mathcal{C}$ tangent to the right of the $x=a$ side of the rectangle, and to both $\ell_{k}$ and $\ell_{k+1}$. We claim that this circle intersects $\mathcal{B}$ in exactly $2 n-1$ points, and also intersects $\mathcal{R}$ in exactly $2 n-1$ points. Since $\mathcal{C}$ is tangent to both $\ell_{k}$ and $\ell_{k+1}$ and the two lines have different colors, it is enough to show that $\mathcal{C}$ intersects with each of the other $2 n-2$ lines in exactly 2 points. Note that no two lines intersect on the circle because all the intersections between lines are in $S$ which is in the interior of $R$.
Consider any line $L$ among these $2 n-2$ lines. Let $L$ intersect with $\ell_{k}$ and $\ell_{k+1}$ at the points $M$ and $N$, respectively ( $M$ and $N$ are not necessarily distinct). Notice that both $M$ and $N$ must be inside $R$. There are two cases: (i) $L$ intersects $R$ on the $x=-a$ side once and another time on $x=a$ side; (ii) $L$ intersects $y=-b$ and $y=b$ sides.
However, if (ii) happens, $\angle\left(\ell_{k}, L\right)$ and $\angle\left(L, \ell_{k+1}\right)$ would be both positive, and then $\angle(X, L)$ would be between $\angle\left(X, \ell_{k}\right)$ and $\angle\left(X, \ell_{k+1}\right)$, a contradiction. Thus, only (i) can happen. Then $L$ intersects $\mathcal{C}$ in exactly two points, and we are done.
Alternative solution. By rotating the diagram we can ensure that no line is vertical. Let $\ell_{1}, \ell_{2}, \ldots, \ell_{2 n}$ be the lines listed in order of increasing gradient. Then there is a $k$ such that lines $\ell_{k}$ and $\ell_{k+1}$ are oppositely coloured. By rotating our coordinate system and cyclicly relabelling our lines we can ensure that $\ell_{1}, \ell_{2}, \ldots, \ell_{2 n}$ are listed in order of increasing gradient, $\ell_{1}$ and $\ell_{2 n}$ are oppositely coloured, and no line is vertical.
Let $\mathcal{D}$ be a circle centred at the origin and of sufficiently large radius so that
- All intersection points of all pairs of lines lie strictly inside $\mathcal{D}$; and
- Each line $\ell_{i}$ intersects $\mathcal{D}$ in two points $A_{i}$ and $B_{i}$ say, such that $A_{i}$ is on the right semicircle (the part of the circle in the positive $x$ half plane) and $B_{i}$ is on the left semicircle.
Note that the anticlockwise order of the points $A_{i}, B_{i}$ around $\mathcal{D}$ is $A_{1}, A_{2}, \ldots, A_{n}, B_{1}, B_{2}, \ldots, B_{n}$.
(If $A_{i+1}$ occurred before $A_{i}$ then rays $r_{i}$ and $r_{i+1}$ (as defined below) would intersect outside $\mathcal{D}$.)

For each $i$, let $r_{i}$ be the ray that is the part of the line $\ell_{i}$ starting from point $A_{i}$ and that extends to the right. Let $\mathcal{C}$ be any circle tangent to $r_{1}$ and $r_{2 n}$, that lies entirely to the right of $\mathcal{D}$. Then $\mathcal{C}$ intersects each of $r_{2}, r_{3}, \ldots, r_{2 n-1}$ twice and is tangent to $r_{1}$ and $r_{2 n}$. Thus $\mathcal{C}$ has the required properties.
Problem 5. Determine all sequences $a_{0}, a_{1}, a_{2}, \ldots$ of positive integers with $a_{0} \geq 2015$ such that for all integers $n \geq 1$ : (i) $a_{n+2}$ is divisible by $a_{n}$; (ii) $\left|s_{n+1}-(n+1) a_{n}\right|=1$, where $s_{n+1}=a_{n+1}-a_{n}+a_{n-1}-\cdots+(-1)^{n+1} a_{0}$.
Answer: There are two families of answers: (a) $a_{n}=c(n+2) n$ ! for all $n \geq 1$ and $a_{0}=c+1$ for some integer $c \geq 2014$, and (b) $a_{n}=c(n+2) n$ ! for all $n \geq 1$ and $a_{0}=c-1$ for some integer $c \geq 2016$.
Solution. Let $\left{a_{n}\right}{n=0}^{\infty}$ be a sequence of positive integers satisfying the given conditions. We can rewrite (ii) as $s{n+1}=(n+1) a_{n}+h_{n}$, where $h_{n} \in{-1,1}$. Substituting $n$ with $n-1$ yields $s_{n}=n a_{n-1}+h_{n-1}$, where $h_{n-1} \in{-1,1}$. Note that $a_{n+1}=s_{n+1}+s_{n}$, therefore there exists $\delta_{n} \in{-2,0,2}$ such that
We also have $\left|s_{2}-2 a_{1}\right|=1$, which yields $a_{0}=3 a_{1}-a_{2} \pm 1 \leq 3 a_{1}$, and therefore $a_{1} \geq \frac{a_{0}}{3} \geq 671$. Substituting $n=2$ in (1), we find that $a_{3}=3 a_{2}+2 a_{1}+\delta_{2}$. Since $a_{1} \mid a_{3}$, we have $a_{1} \mid 3 a_{2}+\delta_{2}$, and therefore $a_{2} \geq 223$. Using (1), we obtain that $a_{n} \geq 223$ for all $n \geq 0$.
Lemma 1: For $n \geq 4$, we have $a_{n+2}=(n+1)(n+4) a_{n}$. Proof. For $n \geq 3$ we have
By applying (2) with $n$ substituted by $n-1$ we have for $n \geq 4$,
Using (1) to write $a_{n+2}$ in terms of $a_{n}$ and $a_{n-1}$ along with (2), we obtain that for $n \geq 3$,
Also for $n \geq 4$,
Since $a_{n} \mid a_{n+2}$, we obtain that $a_{n+2}=\left(n^{2}+5 n+4\right) a_{n}=(n+1)(n+4) a_{n}$, as desired. Lemma 2: For $n \geq 4$, we have $a_{n+1}=\frac{(n+1)(n+3)}{n+2} a_{n}$. Proof. Using the recurrence $a_{n+3}=(n+3) a_{n+2}+(n+2) a_{n+1}+\delta_{n+2}$ and writing $a_{n+3}$, $a_{n+2}$ in terms of $a_{n+1}, a_{n}$ according to Lemma 1 we obtain
Hence $n+4 \mid \delta_{n+2}$, which yields $\delta_{n+2}=0$ and $a_{n+1}=\frac{(n+1)(n+3)}{n+2} a_{n}$, as desired. Suppose there exists $n \geq 1$ such that $a_{n+1} \neq \frac{(n+1)(n+3)}{n+2} a_{n}$. By Lemma 2, there exist a greatest integer $1 \leq m \leq 3$ with this property. Then $a_{m+2}=\frac{(m+2)(m+4)}{m+3} a_{m+1}$. If $\delta_{m+1}=0$, we have $a_{m+1}=\frac{(m+1)(m+3)}{m+2} a_{m}$, which contradicts our choice of $m$. Thus $\delta_{m+1} \neq 0$.
Clearly $m+3 \mid a_{m+1}$. Write $a_{m+1}=(m+3) k$ and $a_{m+2}=(m+2)(m+4) k$. Then $(m+$ 1) $a_{m}+\delta_{m+1}=a_{m+2}-(m+2) a_{m+1}=(m+2) k$. So, $a_{m} \mid(m+2) k-\delta_{m+1}$. But $a_{m}$ also divides $a_{m+2}=(m+2)(m+4) k$. Combining the two divisibility conditions, we obtain $a_{m} \mid(m+4) \delta_{m+1}$. Since $\delta_{m+1} \neq 0$, we have $a_{m} \mid 2 m+8 \leq 14$, which contradicts the previous result that $a_{n} \geq 223$ for all nonnegative integers $n$.
So, $a_{n+1}=\frac{(n+1)(n+3)}{n+2} a_{n}$ for $n \geq 1$. Substituting $n=1$ yields $3 \mid a_{1}$. Letting $a_{1}=3 c$, we have by induction that $a_{n}=n!(n+2) c$ for $n \geq 1$. Since $\left|s_{2}-2 a_{1}\right|=1$, we then get $a_{0}=c \pm 1$, yielding the two families of solutions. By noting that $(n+2) n!=n!+(n+1)!$, we have $s_{n+1}=c(n+2)!+(-1)^{n}\left(c-a_{0}\right)$. Hence both families of solutions satisfy the given conditions.