# APMO 1994 - Problems and Solutions ## Problem 1 Let $f: \mathbb{R} \rightarrow \mathbb{R}$ be a function such that (i) For all $x, y \in \mathbb{R}$, $$ f(x)+f(y)+1 \geq f(x+y) \geq f(x)+f(y) $$ (ii) For all $x \in[0,1), f(0) \geq f(x)$, (iii) $-f(-1)=f(1)=1$. Find all such functions $f$. Answer: $f(x)=\lfloor x\rfloor$, the largest integer that does not exceed $x$, is the only function. ## Solution Plug $y \rightarrow 1$ in (i): $$ f(x)+f(1)+1 \geq f(x+1) \geq f(x)+f(1) \Longleftrightarrow f(x)+1 \leq f(x+1) \leq f(x)+2 $$ Now plug $y \rightarrow-1$ and $x \rightarrow x+1$ in (i): $$ f(x+1)+f(-1)+1 \geq f(x) \geq f(x+1)+f(-1) \Longleftrightarrow f(x) \leq f(x+1) \leq f(x)+1 $$ Hence $f(x+1)=f(x)+1$ and we only need to define $f(x)$ on $[0,1)$. Note that $f(1)=$ $f(0)+1 \Longrightarrow f(0)=0$. Condition (ii) states that $f(x) \leq 0$ in $[0,1)$. Now plug $y \rightarrow 1-x$ in (i): $$ f(x)+f(1-x)+1 \leq f(x+(1-x)) \leq f(x)+f(1-x) \Longrightarrow f(x)+f(1-x) \geq 0 $$ If $x \in(0,1)$ then $1-x \in(0,1)$ as well, so $f(x) \leq 0$ and $f(1-x) \leq 0$, which implies $f(x)+f(1-x) \leq 0$. Thus, $f(x)=f(1-x)=0$ for $x \in(0,1)$. This combined with $f(0)=0$ and $f(x+1)=f(x)+1$ proves that $f(x)=\lfloor x\rfloor$, which satisfies the problem conditions, as since $x+y=\lfloor x\rfloor+\lfloor y\rfloor+\{x\}+\{y\}$ and $0 \leq\{x\}+\{y\}<2 \Longrightarrow\lfloor x\rfloor+\lfloor y\rfloor \leq x+y<\lfloor x\rfloor+\lfloor y\rfloor+2$ implies $$ \lfloor x\rfloor+\lfloor y\rfloor+1 \geq\lfloor x+y\rfloor \geq\lfloor x\rfloor+\lfloor y\rfloor . $$ ## Problem 2 Given a nondegenerate triangle $A B C$, with circumcentre $O$, orthocentre $H$, and circumradius $R$, prove that $|O H|<3 R$. ## Solution 1 Embed $A B C$ in the complex plane, with $A, B$ and $C$ in the circle $|z|=R$, so $O$ is the origin. Represent each point by its lowercase letter. It is well known that $h=a+b+c$, so $$ O H=|a+b+c| \leq|a|+|b|+|c|=3 R . $$ The equality cannot occur because $a, b$, and $c$ are not collinear, so $O H<3 R$. ## Solution 2 Suppose with loss of generality that $\angle A<90^{\circ}$. Let $B D$ be an altitude. Then $$ A H=\frac{A D}{\cos \left(90^{\circ}-C\right)}=\frac{A B \cos A}{\sin C}=2 R \cos A $$ By the triangle inequality, $$ O H2$. Consider, for instance, the prime factors of $b-1 \leq \sqrt{2 b^{2}+2 b+1}$, which is coprime with $b$. Any prime must then divide $a=b+1$. Then it divides $(b+1)-(b-1)=2$, that is, $b-1$ can only have 2 as a prime factor, that is, $b-1$ is a power of 2 , and since $b-1 \geq 2$, $b$ is odd. Since $2 b^{2}+2 b+1-(b+2)^{2}=b^{2}-2 b-3=(b-3)(b+1) \geq 0$, we can also consider any prime divisor of $b+2$. Since $b$ is odd, $b$ and $b+2$ are also coprime, so any prime divisor of $b+2$ must divide $a=b+1$. But $b+1$ and $b+2$ are also coprime, so there can be no such primes. This is a contradiction, and $b \geq 3$ does not yield any solutions. - If $a-b>1$, consider a prime divisor $p$ of $a-b=\sqrt{a^{2}-2 a b+b^{2}}<\sqrt{a^{2}+b^{2}}$. Since $p$ divides one of $a$ and $b, p$ divides both numbers (just add or subtract $a-b$ accordingly.) This is a contradiction. Hence the only solutions are $n=2,5,13$. ## Problem 4 Is there an infinite set of points in the plane such that no three points are collinear, and the distance between any two points is rational? Answer: Yes. ## Solution 1 The answer is yes and we present the following construction: the idea is considering points in the unit circle of the form $P_{n}=(\cos (2 n \theta), \sin (2 n \theta))$ for an appropriate $\theta$. Then the distance $P_{m} P_{n}$ is the length of the chord with central angle $(2 m-2 n) \theta \bmod \pi$, that is, $2|\sin ((m-n) \theta)|$. Our task is then finding $\theta$ such that (i) $\sin (k \theta)$ is rational for all $k \in \mathbb{Z}$; (ii) points $P_{n}$ are all distinct. We claim that $\theta \in(0, \pi / 2)$ such that $\cos \theta=\frac{3}{5}$ and therefore $\sin \theta=\frac{4}{5}$ does the job. Proof of (i): We know that $\sin ((n+1) \theta)+\sin ((n-1) \theta)=2 \sin (n \theta) \cos \theta$, so if $\sin ((n-1) \theta$ and $\sin (n \theta)$ are both rational then $\sin ((n+1) \theta)$ also is. Since $\sin (0 \theta)=0$ and $\sin \theta$ are rational, an induction shows that $\sin (n \theta)$ is rational for $n \in \mathbb{Z}_{>0}$; the result is also true if $n$ is negative because $\sin$ is an odd function. Proof of (ii): $P_{m}=P_{n} \Longleftrightarrow 2 n \theta=2 m \theta+2 k \pi$ for some $k \in \mathbb{Z}$, which implies $\sin ((n-m) \theta)=$ $\sin (k \pi)=0$. We show that $\sin (k \theta) \neq 0$ for all $k \neq 0$. We prove a stronger result: let $\sin (k \theta)=\frac{a_{k}}{5^{k}}$. Then $$ \begin{aligned} \sin ((k+1) \theta)+\sin ((k-1) \theta)=2 \sin (k \theta) \cos \theta & \Longleftrightarrow \frac{a_{k+1}}{5^{k+1}}+\frac{a_{k-1}}{5^{k-1}}=2 \cdot \frac{a_{k}}{5^{k}} \cdot \frac{3}{5} \\ & \Longleftrightarrow a_{k+1}=6 a_{k}-25 a_{k-1} \end{aligned} $$ Since $a_{0}=0$ and $a_{1}=4, a_{k}$ is an integer for $k \geq 0$, and $a_{k+1} \equiv a_{k}(\bmod 5)$ for $k \geq 1$ (note that $a_{-1}=-\frac{4}{25}$ is not an integer!). Thus $a_{k} \equiv 4(\bmod 5)$ for all $k \geq 1$, and $\sin (k \theta)=\frac{a_{k}}{5^{k}}$ is an irreducible fraction with $5^{k}$ as denominator and $a_{k} \equiv 4(\bmod 5)$. This proves (ii) and we are done. ## Solution 2 We present a different construction. Consider the (collinear) points $$ P_{k}=\left(1, \frac{x_{k}}{y_{k}}\right), $$ such that the distance $O P_{k}$ from the origin $O$, $$ O P_{k}=\frac{\sqrt{x_{k}^{2}+y_{k}^{2}}}{y_{k}} $$ is rational, and $x_{k}$ and $y_{k}$ are integers. Clearly, $P_{i} P_{j}=\left|\frac{x_{i}}{y_{i}}-\frac{x_{j}}{y_{j}}\right|$ is rational. Perform an inversion with center $O$ and unit radius. It maps the line $x=1$, which contains all points $P_{k}$, to a circle (minus the origin). Let $Q_{k}$ be the image of $P_{k}$ under this inversion. Then $$ Q_{i} Q_{j}=\frac{1^{2} P_{i} P_{j}}{O P_{i} \cdot O P_{j}} $$ is rational and we are done if we choose $x_{k}$ and $y_{k}$ accordingly. But this is not hard, as we can choose the legs of a Pythagorean triple, say $$ x_{k}=k^{2}-1, \quad y_{k}=2 k $$ This implies $O P_{k}=\frac{k^{2}+1}{2 k}$, and then $$ Q_{i} Q_{j}=\frac{\left|\frac{i^{2}-1}{i}-\frac{j^{2}-1}{j}\right|}{\frac{i^{2}+1}{2 i} \cdot \frac{j^{2}+1}{2 j}}=\frac{|4(i-j)(i j+1)|}{\left(i^{2}+1\right)\left(j^{2}+1\right)} $$ ## Problem 5 You are given three lists $A, B$, and $C$. List $A$ contains the numbers of the form $10^{k}$ in base 10, with $k$ any integer greater than or equal to 1 . Lists $B$ and $C$ contain the same numbers translated into base 2 and 5 respectively: | $A$ | $B$ | $C$ | | :--- | :--- | :--- | | 10 | 1010 | 20 | | 100 | 1100100 | 400 | | 1000 | 1111101000 | 13000 | | $\vdots$ | $\vdots$ | $\vdots$ | Prove that for every integer $n>1$, there is exactly one number in exactly one of the lists $B$ or $C$ that has exactly $n$ digits. ## Solution Let $b_{k}$ and $c_{k}$ be the number of digits in the $k$ th term in lists $B$ and $C$, respectively. Then $$ 2^{b_{k}-1} \leq 10^{k}<2^{b_{k}} \Longleftrightarrow \log _{2} 10^{k}