exam: APMO

problem:
A triangle with sides $a, b$, and $c$ is given. Denote by $s$ the semiperimeter, that is $s=(a+b+c) / 2$. Construct a triangle with sides $s-a, s-b$, and $s-c$. This process is repeated until a triangle can no longer be constructed with the sidelengths given.
For which original triangles can this process be repeated indefinitely?
Answer: Only equilateral triangles.

solution:
The perimeter of each new triangle constructed by the process is $(s-a)+(s-b)+(s-c)=$ $3 s-(a+b+c)=3 s-2 s=s$, that is, it is halved. Consider a new equivalent process in which a similar triangle with sidelengths $2(s-a), 2(s-b), 2(s-c)$ is constructed, so the perimeter is kept invariant.
Suppose without loss of generality that $a \leq b \leq c$. Then $2(s-c) \leq 2(s-b) \leq 2(s-a)$, and the difference between the largest side and the smallest side changes from $c-a$ to $2(s-a)-2(s-c)=$ $2(c-a)$, that is, it doubles. Therefore, if $c-a>0$ then eventually this difference becomes larger than $a+b+c$, and it's immediate that a triangle cannot be constructed with the sidelengths. Hence the only possibility is $c-a=0 \Longrightarrow a=b=c$, and it is clear that equilateral triangles can yield an infinite process, because all generated triangles are equilateral.

problem_match: # Problem 1

solution_match: # Solution


problem:
In a circle $C$ with centre $O$ and radius $r$, let $C_{1}, C_{2}$ be two circles with centres $O_{1}, O_{2}$ and radii $r_{1}, r_{2}$ respectively, so that each circle $C_{i}$ is internally tangent to $C$ at $A_{i}$ and so that $C_{1}, C_{2}$ are externally tangent to each other at $A$.
Prove that the three lines $O A, O_{1} A_{2}$, and $O_{2} A_{1}$ are concurrent.

solution:
Because of the tangencies, the following triples of points (two centers and a tangency point) are collinear:

$$
O_{1} ; O_{2} ; A, \quad O ; O_{1} ; A_{1}, \quad O ; O_{2} ; A_{2}
$$

Because of that we can ignore the circles and only draw their centers and tangency points.
![](https://cdn.mathpix.com/cropped/2024_11_22_c7e8c80a7518426c71e5g-2.jpg?height=1018&width=1095&top_left_y=713&top_left_x=432)

Now the problem is immediate from Ceva's theorem in triangle $O O_{1} O_{2}$, because

$$
\frac{O A_{1}}{A_{1} O_{1}} \cdot \frac{O_{1} A}{A O_{2}} \cdot \frac{O_{2} A_{2}}{A_{2} O}=\frac{r}{r_{1}} \cdot \frac{r_{1}}{r_{2}} \cdot \frac{r_{2}}{r}=1
$$

problem_match: # Problem 2


problem:
Let $n$ be an integer such that $n>3$. Suppose that we choose three numbers from the set $\{1,2, \ldots, n\}$. Using each of these three numbers only once and using addition, multiplication, and parenthesis, let us form all possible combinations.
(a) Show that if we choose all three numbers greater than $n / 2$, then the values of these combinations are all distinct.
(b) Let $p$ be a prime number such that $p \leq \sqrt{n}$. Show that the number of ways of choosing three numbers so that the smallest one is $p$ and the values of the combinations are not all distinct is precisely the number of positive divisors of $p-1$.

solution:
In both items, the smallest chosen number is at least 2: in part (a), $n / 2>1$ and in part (b), $p$ is a prime. So let $1<x<y<z$ be the chosen numbers. Then all possible combinations are

$$
x+y+z, \quad x+y z, \quad x y+z, \quad y+z x, \quad(x+y) z, \quad(z+x) y, \quad(x+y) z, \quad x y z
$$

Since, for $1<m<n$ and $t>1,(m-1)(n-1) \geq 1 \cdot 2 \Longrightarrow m n>m+n, t n+m-(t m+n)=$ $(t-1)(n-m)>0 \Longrightarrow t n+m>t m+n$, and $(t+m) n-(t+n) m=t(n-m)>0$,

$$
x+y+z<z+x y<y+z x<x+y z
$$

and

$$
(y+z) x<(x+z) y<(x+y) z<x y z .
$$

Also, $(y+z) x-(y+z x)=(x-1) y>0 \Longrightarrow(y+z) x>y+z x$ and $(x+z) y-(x+y z)=$ $(y-1) x>0 \Longrightarrow(x+z) y>x+y z$. Therefore the only numbers that can be equal are $x+y z$ and $(y+z) x$. In this case,

$$
x+y z=(y+z) x \Longleftrightarrow(y-x)(z-x)=x(x-1)
$$

Now we can solve the items.
(a) if $n / 2<x<y<z$ then $z-x<n / 2$, and since $y-x<z-x, y-x<n / 2-1$; then

$$
(y-x)(z-x)<\frac{n}{2}\left(\frac{n}{2}-1\right)<x(x-1)
$$

and therefore $x+y z<(y+z) x$.
(b) if $x=p$, then $(y-p)(z-p)=p(p-1)$. Since $y-p<z-p,(y-p)^{2}<(y-p)(z-p)=$ $p(p-1) \Longrightarrow y-p<p$, that is, $p$ does not divide $y-p$. Then $y-p$ is a divisor $d$ of $p-1$ and $z-p=\frac{p(p-1)}{d}$. Therefore,

$$
x=p, \quad, y=p+d, \quad z=p+\frac{p(p-1)}{d}
$$

which is a solution for every divisor $d$ of $p-1$ because

$$
x=p<y=p+d<2 p \leq p+p \cdot \frac{p-1}{d}=z .
$$

Comment: If $x=1$ was allowed, then any choice $1, y, z$ would have repeated numbers in the combination, as $1 \cdot y+z=y+1 \cdot z$.

problem_match: # Problem 3


problem:
Determine all pairs $(h, s)$ of positive integers with the following property: If one draws $h$ horizontal lines and another $s$ lines which satisfy
(i) they are not horizontal,
(ii) no two of them are parallel,
(iii) no three of the $h+s$ lines are concurrent,
then the number of regions formed by these $h+s$ lines is 1992 .
Answer: $(995,1),(176,10)$, and $(80,21)$.

solution:
Let $a_{h, s}$ the number of regions formed by $h$ horizontal lines and $s$ another lines as described in the problem. Let $\mathcal{F}_{h, s}$ be the union of the $h+s$ lines and pick any line $\ell$. If it intersects the other lines in $n$ (distinct!) points then $\ell$ is partitioned into $n-1$ line segments and 2 rays, which delimit regions. Therefore if we remove $\ell$ the number of regions decreases by exactly $n-1+2=n+1$.
Then $a_{0,0}=1$ (no lines means there is only one region), and since every one of $s$ lines intersects the other $s-1$ lines, $a_{0, s}=a_{0, s-1}+s$ for $s \geq 0$. Summing yields

$$
a_{0, s}=s+(s-1)+\cdots+1+a_{0,0}=\frac{s^{2}+s+2}{2} .
$$

Each horizontal line only intersects the $s$ non-horizontal lines, so $a_{h, s}=a_{h-1, s}+s+1$, which implies

$$
a_{h, s}=a_{0, s}+h(s+1)=\frac{s^{2}+s+2}{2}+h(s+1) .
$$

Our final task is solving

$$
a_{h, s}=1992 \Longleftrightarrow \frac{s^{2}+s+2}{2}+h(s+1)=1992 \Longleftrightarrow(s+1)(s+2 h)=2 \cdot 1991=2 \cdot 11 \cdot 181
$$

The divisors of $2 \cdot 1991$ are $1,2,11,22,181,362,1991,3982$. Since $s, h>0,2 \leq s+1<s+2 h$, so the possibilities for $s+1$ can only be 2,11 and 22 , yielding the following possibilities for $(h, s)$ :

$$
(995,1), \quad(176,10), \quad \text { and }(80,21) .
$$

problem_match: # Problem 4


problem:
Find a sequence of maximal length consisting of non-zero integers in which the sum of any seven consecutive terms is positive and that of any eleven consecutive terms is negative.

Answer: The maximum length is 16 . There are several possible sequences with this length; one such sequence is $(-7,-7,18,-7,-7,-7,18,-7,-7,18,-7,-7,-7,18,-7,-7)$.

solution:
Suppose it is possible to have more than 16 terms in the sequence. Let $a_{1}, a_{2}, \ldots, a_{17}$ be the first 17 terms of the sequence. Consider the following array of terms in the sequence:

| $a_{1}$ | $a_{2}$ | $a_{3}$ | $a_{4}$ | $a_{5}$ | $a_{6}$ | $a_{7}$ | $a_{8}$ | $a_{9}$ | $a_{10}$ | $a_{11}$ |
| :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| $a_{2}$ | $a_{3}$ | $a_{4}$ | $a_{5}$ | $a_{6}$ | $a_{7}$ | $a_{8}$ | $a_{9}$ | $a_{10}$ | $a_{11}$ | $a_{12}$ |
| $a_{3}$ | $a_{4}$ | $a_{5}$ | $a_{6}$ | $a_{7}$ | $a_{8}$ | $a_{9}$ | $a_{10}$ | $a_{11}$ | $a_{12}$ | $a_{13}$ |
| $a_{4}$ | $a_{5}$ | $a_{6}$ | $a_{7}$ | $a_{8}$ | $a_{9}$ | $a_{10}$ | $a_{11}$ | $a_{12}$ | $a_{13}$ | $a_{14}$ |
| $a_{5}$ | $a_{6}$ | $a_{7}$ | $a_{8}$ | $a_{9}$ | $a_{10}$ | $a_{11}$ | $a_{12}$ | $a_{13}$ | $a_{14}$ | $a_{15}$ |
| $a_{6}$ | $a_{7}$ | $a_{8}$ | $a_{9}$ | $a_{10}$ | $a_{11}$ | $a_{12}$ | $a_{13}$ | $a_{14}$ | $a_{15}$ | $a_{16}$ |
| $a_{7}$ | $a_{8}$ | $a_{9}$ | $a_{10}$ | $a_{11}$ | $a_{12}$ | $a_{13}$ | $a_{14}$ | $a_{15}$ | $a_{16}$ | $a_{17}$ |

Let $S$ the sum of the numbers in the array. If we sum by rows we obtain negative sums in each row, so $S<0$; however, it we sum by columns we obtain positive sums in each column, so $S>0$, a contradiction. This implies that the sequence cannot have more than 16 terms. One idea to find a suitable sequence with 16 terms is considering cycles of 7 numbers. For instance, one can try

$$
-a,-a, b,-a,-a,-a, b,-a,-a, b,-a,-a,-a, b,-a,-a .
$$

The sum of every seven consecutive numbers is $-5 a+2 b$ and the sum of every eleven consecutive numbers is $-8 a+3 b$, so $-5 a+2 b>0$ and $-8 a+3 b<0$, that is,

$$
\frac{5 a}{2}<b<\frac{8 a}{3} \Longleftrightarrow 15 a<6 b<16 a
$$

Then we can choose, say, $a=7$ and $105<6 b<112 \Longleftrightarrow b=18$. A valid sequence is then

$$
-7,-7,18,-7,-7,-7,18,-7,-7,18,-7,-7,-7,18,-7,-7
$$

problem_match: # Problem 5