# APMO 2004 - Problems and Solutions ## Problem 1 Determine all finite nonempty sets $S$ of positive integers satisfying $$ \frac{i+j}{(i, j)} \text { is an element of } S \text { for all } i, j \text { in } S \text {, } $$ where $(i, j)$ is the greatest common divisor of $i$ and $j$. Answer: $S=\{2\}$. ## Solution Let $k \in S$. Then $\frac{k+k}{(k, k)}=2$ is in $S$ as well. Suppose for the sake of contradiction that there is an odd number in $S$, and let $k$ be the largest such odd number. Since $(k, 2)=1, \frac{k+2}{(k, 2)}=k+2>k$ is in $S$ as well, a contradiction. Hence $S$ has no odd numbers. Now suppose that $\ell>2$ is the second smallest number in $S$. Then $\ell$ is even and $\frac{\ell+2}{(\ell, 2)}=\frac{\ell}{2}+1$ is in $S$. Since $\ell>2 \Longrightarrow \frac{\ell}{2}+1>2, \frac{\ell}{2}+1 \geq \ell \Longleftrightarrow \ell \leq 2$, a contradiction again. Therefore $S$ can only contain 2 , and $S=\{2\}$ is the only solution. ## Problem 2 Let $O$ be the circumcentre and $H$ the orthocentre of an acute triangle $A B C$. Prove that the area of one of the triangles $\mathrm{AOH}, \mathrm{BOH}$ and COH is equal to the sum of the areas of the other two. ## Solution 1 Suppose, without loss of generality, that $B$ and $C$ lies in the same side of line $O H$. Such line is the Euler line of $A B C$, so the centroid $G$ lies in this line. ![](https://cdn.mathpix.com/cropped/2024_11_22_7992a4504bd2a9e623e4g-2.jpg?height=444&width=618&top_left_y=523&top_left_x=685) Let $M$ be the midpoint of $B C$. Then the distance between $M$ and the line $O H$ is the average of the distances from $B$ and C to OH , and the sum of the areas of triangles BOH and COH is $$ [B O H]+[C O H]=\frac{O H \cdot d(B, O H)}{2}+\frac{O H \cdot d(C, O H)}{2}=\frac{O H \cdot 2 d(M, O H)}{2} . $$ Since $A G=2 G M, d(A, O H)=2 d(M, O H)$. Hence $$ [B O H]+[C O H]=\frac{O H \cdot d(A, O H)}{2}=[A O H] $$ and the result follows. ## Solution 2 One can use barycentric coordinates: it is well known that $$ \begin{gathered} A=(1: 0: 0), \quad B=(0: 1: 0), \quad C=(0: 0: 1), \\ O=(\sin 2 A: \sin 2 B: \sin 2 C) \quad \text { and } \quad H=(\tan A: \tan B: \tan C) . \end{gathered} $$ Then the (signed) area of $A O H$ is proportional to $$ \left|\begin{array}{ccc} 1 & 0 & 0 \\ \sin 2 A & \sin 2 B & \sin 2 C \\ \tan A & \tan B & \tan C \end{array}\right| $$ Adding all three expressions we find that the sum of the signed sums of the areas is a constant times $$ \left|\begin{array}{ccc} 1 & 0 & 0 \\ \sin 2 A & \sin 2 B & \sin 2 C \\ \tan A & \tan B & \tan C \end{array}\right|+\left|\begin{array}{ccc} 0 & 1 & 0 \\ \sin 2 A & \sin 2 B & \sin 2 C \\ \tan A & \tan B & \tan C \end{array}\right|+\left|\begin{array}{ccc} 0 & 0 & 1 \\ \sin 2 A & \sin 2 B & \sin 2 C \\ \tan A & \tan B & \tan C \end{array}\right| $$ By multilinearity of the determinant, this sum equals $$ \left|\begin{array}{ccc} 1 & 1 & 1 \\ \sin 2 A & \sin 2 B & \sin 2 C \\ \tan A & \tan B & \tan C \end{array}\right| $$ which contains, in its rows, the coordinates of the centroid, the circumcenter, and the orthocenter. Since these three points lie in the Euler line of $A B C$, the signed sum of the areas is 0 , which means that one of the areas of $A O H, B O H, C O H$ is the sum of the other two areas. Comment: Both solutions can be adapted to prove a stronger result: if the centroid $G$ of triangle $A B C$ belongs to line $X Y$ then one of the areas of triangles $A X Y, B X Y$, and $C X Y$ is equal to the sum of the other two. ## Problem 3 Let a set $S$ of 2004 points in the plane be given, no three of which are collinear. Let $\mathcal{L}$ denote the set of all lines (extended indefinitely in both directions) determined by pairs of points from the set. Show that it is possible to colour the points of $S$ with at most two colours, such that for any points $p, q$ of $S$, the number of lines in $\mathcal{L}$ which separate $p$ from $q$ is odd if and only if $p$ and $q$ have the same colour. Note: A line $\ell$ separates two points $p$ and $q$ if $p$ and $q$ lie on opposite sides of $\ell$ with neither point on $\ell$. ## Solution Choose any point $p$ from $S$ and color it, say, blue. Let $n(q, r)$ be the number of lines from $\mathcal{L}$ that separates $q$ and $r$. Then color any other point $q$ blue if $n(p, q)$ is odd and red if $n(p, q)$ is even. Now it remains to show that $q$ and $r$ have the same color if and only if $n(q, r)$ is odd for all $q \neq p$ and $r \neq p$, which is equivalent to proving that $n(p, q)+n(p, r)+n(q, r)$ is always odd. For this purpose, consider the seven numbered regions defined by lines $p q$, $p r$, and $q r$ : ![](https://cdn.mathpix.com/cropped/2024_11_22_7992a4504bd2a9e623e4g-3.jpg?height=515&width=809&top_left_y=950&top_left_x=586) Any line that do not pass through any of points $p, q, r$ meets the sides $p q, q r, p r$ of triangle $p q r$ in an even number of points (two sides or no sides), so these lines do not affect the parity of $n(p, q)+n(p, r)+n(q, r)$. Hence the only lines that need to be considered are the ones that pass through one of vertices $p, q, r$ and cuts the opposite side in the triangle $p q r$. Let $n_{i}$ be the number of points in region $i, p, q$, and $r$ excluded, as depicted in the diagram. Then the lines through $p$ that separate $q$ and $r$ are the lines passing through $p$ and points from regions 1,4 , and 7 . The same applies for $p, q$ and regions 2,5 , and 7 ; and $p, r$ and regions 3,6 , and 7. Therefore $$ \begin{aligned} n(p, q)+n(q, r)+n(p, r) & \equiv\left(n_{2}+n_{5}+n_{7}\right)+\left(n_{1}+n_{4}+n_{7}\right)+\left(n_{3}+n_{6}+n_{7}\right) \\ & \equiv n_{1}+n_{2}+n_{3}+n_{4}+n_{5}+n_{6}+n_{7}=2004-3 \equiv 1 \quad(\bmod 2) \end{aligned} $$ and the result follows. Comment: The problem statement is also true if 2004 is replaced by any even number and is not true if 2004 is replaced by any odd number greater than 1. ## Problem 4 For a real number $x$, let $\lfloor x\rfloor$ stand for the largest integer that is less than or equal to $x$. Prove that $$ \left\lfloor\frac{(n-1)!}{n(n+1)}\right\rfloor $$ is even for every positive integer $n$. ## Solution Consider four cases: - $n \leq 5$. Then $\left\lfloor\frac{(n-1)!}{n(n+1)}\right\rfloor=0$ is an even number. - $n$ and $n+1$ are both composite (in particular, $n \geq 8$ ). Then $n=a b$ and $n+1=c d$ for $a, b, c, d \geq 2$. Moreover, since $n$ and $n+1$ are coprime, $a, b, c, d$ are all distinct and smaller than $n$, and one can choose $a, b, c, d$ such that exactly one of these four numbers is even. Hence $\frac{(n-1)!}{n(n+1)}$ is an integer. As $n \geq 8>6,(n-1)!$ has at least three even factors, so $\frac{(n-1)!}{n(n+1)}$ is an even integer. - $n \geq 7$ is an odd prime. By Wilson's theorem, $(n-1)!\equiv-1(\bmod n)$, that is, $\frac{(n-1)!+1}{n}$ is an integer, as $\frac{(n-1)!+n+1}{n}=\frac{(n-1)!+1}{n}+1$ is. As before, $\frac{(n-1)!}{n+1}$ is an even integer; therefore $\frac{(n-1)!+n+1}{n+1}=\frac{(n-1)!}{n+1}+1$ is an odd integer. Also, $n$ and $n+1$ are coprime and $n$ divides the odd integer $\frac{(n-1)!+n+1}{n+1}$, so $\frac{(n-1)!+n+1}{n(n+1)}$ is also an odd integer. Then $$ \left\lfloor\frac{(n-1)!}{n(n+1)}\right\rfloor=\frac{(n-1)!+n+1}{n(n+1)}-1 $$ is even. - $n+1 \geq 7$ is an odd prime. Again, since $n$ is composite, $\frac{(n-1)!}{n}$ is an even integer, and $\frac{(n-1)!+n}{n}$ is an odd integer. By Wilson's theorem, $n!\equiv-1(\bmod n+1) \Longleftrightarrow(n-1)!\equiv 1$ $(\bmod n+1)$. This means that $n+1$ divides $(n-1)!+n$, and since $n$ and $n+1$ are coprime, $n+1$ also divides $\frac{(n-1)!+n}{n}$. Then $\frac{(n-1)!+n}{n(n+1)}$ is also an odd integer and $$ \left\lfloor\frac{(n-1)!}{n(n+1)}\right\rfloor=\frac{(n-1)!+n}{n(n+1)}-1 $$ is even. ## Problem 5 Prove that $$ \left(a^{2}+2\right)\left(b^{2}+2\right)\left(c^{2}+2\right) \geq 9(a b+b c+c a) $$ for all real numbers $a, b, c>0$. ## Solution 1 Let $p=a+b+c, q=a b+b c+c a$, and $r=a b c$. The inequality simplifies to $$ a^{2} b^{2} c^{2}+2\left(a^{2} b^{2}+b^{2} c^{2}+c^{2} a^{2}\right)+4\left(a^{2}+b^{2}+c^{2}\right)+8-9(a b+b c+c a) \geq 0 $$ Since $a^{2} b^{2}+b^{2} c^{2}+c^{2} a^{2}=q^{2}-2 p r$ and $a^{2}+b^{2}+c^{2}=p^{2}-2 q$, $$ r^{2}+2 q^{2}-4 p r+4 p^{2}-8 q+8-9 q \geq 0 $$ which simplifies to $$ r^{2}+2 q^{2}+4 p^{2}-17 q-4 p r+8 \geq 0 $$ Bearing in mind that equality occurs for $a=b=c=1$, which means that, for instance, $p=3 r$, one can rewrite $(I)$ as $$ \left(r-\frac{p}{3}\right)^{2}-\frac{10}{3} p r+\frac{35}{9} p^{2}+2 q^{2}-17 q+8 \geq 0 $$ Since $(a b-b c)^{2}+(b c-c a)^{2}+(c a-a b)^{2} \geq 0$ is equivalent to $q^{2} \geq 3 p r$, rewrite $(I I)$ as $$ \left(r-\frac{p}{3}\right)^{2}+\frac{10}{9}\left(q^{2}-3 p r\right)+\frac{35}{9} p^{2}+\frac{8}{9} q^{2}-17 q+8 \geq 0 $$ Finally, $a=b=c=1$ implies $q=3$; then rewrite (III) as $$ \left(r-\frac{p}{3}\right)^{2}+\frac{10}{9}\left(q^{2}-3 p r\right)+\frac{35}{9}\left(p^{2}-3 q\right)+\frac{8}{9}(q-3)^{2} \geq 0 $$ This final inequality is true because $q^{2} \geq 3 p r$ and $p^{2}-3 q=\frac{1}{2}\left[(a-b)^{2}+(b-c)^{2}+(c-a)^{2}\right] \geq 0$. ## Solution 2 We prove the stronger inequality $$ \left(a^{2}+2\right)\left(b^{2}+2\right)\left(c^{2}+2\right) \geq 3(a+b+c)^{2} $$ which implies the proposed inequality because $(a+b+c)^{2} \geq 3(a b+b c+c a)$ is equivalent to $(a-b)^{2}+(b-c)^{2}+(c-a)^{2} \geq 0$, which is immediate. The inequality $(*)$ is equivalent to $$ \left(\left(b^{2}+2\right)\left(c^{2}+2\right)-3\right) a^{2}-6(b+c) a+2\left(b^{2}+2\right)\left(c^{2}+2\right)-3(b+c)^{2} \geq 0 $$ Seeing this inequality as a quadratic inequality in $a$ with positive leading coefficient $\left(b^{2}+2\right)\left(c^{2}+\right.$ 2) $-3=b^{2} c^{2}+2 b^{2}+2 c^{2}+1$, it suffices to prove that its discriminant is non-positive, which is equivalent to $$ (3(b+c))^{2}-\left(\left(b^{2}+2\right)\left(c^{2}+2\right)-3\right)\left(2\left(b^{2}+2\right)\left(c^{2}+2\right)-3(b+c)^{2}\right) \leq 0 $$ This simplifies to $$ -2\left(b^{2}+2\right)\left(c^{2}+2\right)+3(b+c)^{2}+6 \leq 0 $$ Now we look $(* *)$ as a quadratic inequality in $b$ with negative leading coefficient $-2 c^{2}-1$ : $$ \left(-2 c^{2}-1\right) b^{2}+6 c b-c^{2}-2 \leq 0 $$ If suffices to show that the discriminant of $(* *)$ is non-positive, which is equivalent to $$ 9 c^{2}-\left(2 c^{2}+1\right)\left(c^{2}+2\right) \leq 0 $$ It simplifies to $-2\left(c^{2}-1\right)^{2} \leq 0$, which is true. The equality occurs for $c^{2}=1$, that is, $c=1$, for which $b=\frac{6 c}{2\left(2 c^{2}+1\right)}=1$, and $a=\frac{6(b+c)}{2\left(\left(b^{2}+2\right)\left(c^{2}+2\right)-3\right)}=1$. ## Solution 3 Let $A, B, C$ angles in $(0, \pi / 2)$ such that $a=\sqrt{2} \tan A, b=\sqrt{2} \tan B$, and $c=\sqrt{2} \tan C$. Then the inequality is equivalent to $$ 4 \sec ^{2} A \sec ^{2} B \sec ^{2} C \geq 9(\tan A \tan B+\tan B \tan C+\tan C \tan A) $$ Substituting $\sec x=\frac{1}{\cos x}$ for $x \in\{A, B, C\}$ and clearing denominators, the inequality is equivalent to $$ \cos A \cos B \cos C(\sin A \sin B \cos C+\cos A \sin B \sin C+\sin A \cos B \sin C) \leq \frac{4}{9} $$ Since $$ \begin{aligned} & \cos (A+B+C)=\cos A \cos (B+C)-\sin A \sin (B+C) \\ = & \cos A \cos B \cos C-\cos A \sin B \sin C-\sin A \cos B \sin C-\sin A \sin B \cos C, \end{aligned} $$ we rewrite our inequality as $$ \cos A \cos B \cos C(\cos A \cos B \cos C-\cos (A+B+C)) \leq \frac{4}{9} $$ The cosine function is concave down on $(0, \pi / 2)$. Therefore, if $\theta=\frac{A+B+C}{3}$, by the AM-GM inequality and Jensen's inequality, $$ \cos A \cos B \cos C \leq\left(\frac{\cos A+\cos B+\cos C}{3}\right)^{3} \leq \cos ^{3} \frac{A+B+C}{3}=\cos ^{3} \theta $$ Therefore, since $\cos A \cos B \cos C-\cos (A+B+C)=\sin A \sin B \cos C+\cos A \sin B \sin C+$ $\sin A \cos B \sin C>0$, and recalling that $\cos 3 \theta=4 \cos ^{3} \theta-3 \cos \theta$, $\cos A \cos B \cos C(\cos A \cos B \cos C-\cos (A+B+C)) \leq \cos ^{3} \theta\left(\cos ^{3} \theta-\cos 3 \theta\right)=3 \cos ^{4} \theta\left(1-\cos ^{2} \theta\right)$. Finally, by AM-GM (notice that $1-\cos ^{2} \theta=\sin ^{2} \theta>0$ ), $3 \cos ^{4} \theta\left(1-\cos ^{2} \theta\right)=\frac{3}{2} \cos ^{2} \theta \cdot \cos ^{2} \theta\left(2-2 \cos ^{2} \theta\right) \leq \frac{3}{2}\left(\frac{\cos ^{2} \theta+\cos ^{2} \theta+\left(2-2 \cos ^{2} \theta\right)}{3}\right)^{3}=\frac{4}{9}$, and the result follows.