exam: INMO

problem: Let $M$ be the midpoint of side $B C$ of a triangle $A B C$. Let the median $A M$ intersect the incircle of $A B C$ at $K$ and $L, K$ being nearer to $A$ than $L$. If $A K=K L=L M$, prove that the sides of triangle $A B C$ are in the ratio $5: 10: 13$ in some order.

solution:
Let $I$ be the incentre of triangle $A B C$ and $D$ be its projection on $B C$. Observe that $A B \neq A C$ as $A B=A C$ implies that $D=L=M$. So assume that $A C>A B$. Let $N$ be the projection of $I$ on $K L$. Then the perpendicular $I N$ from $I$ to $K L$ is a bisector of $K L$ and as $A K=L M$, it is a bisector of $A M$ also. Hence $A I=I M$.

![](https://cdn.mathpix.com/cropped/2024_06_05_824b5a9f4e15c30dc6bag-1.jpg?height=396&width=675&top_left_y=699&top_left_x=866)

Fig. 1 .

But $A I=\frac{r}{\sin (A / 2)}=r \operatorname{cosec}(A / 2)$ and

$$
\begin{aligned}
I M^{2} & =I D^{2}+D M^{2}=r^{2}+(B M-B D)^{2} \\
& =r^{2}+\left(\frac{a}{2}-(s-b)\right)^{2}
\end{aligned}
$$

Hence $r^{2} \operatorname{cosec}^{2}(A / 2)=r^{2}+\left((a / 2)-(s-b)^{2}\right)^{2}$ giving $r^{2} \cot ^{2}(A / 2)=((b-c) / 2)^{2}$. Since $b>c$, we obtain $r \cot (A / 2)=((b-c) / 2)$. So $s-a=((b-c) / 2)$. This gives $a=2 c$.

As $K N=N L$ and $A K=K L=L M$, we have $N L=A M / 6$. We also have $A N=N M$. Now

$$
\begin{aligned}
r^{2}=I L^{2}=I N^{2}+N L^{2} & =A I^{2}-A N^{2}+N L^{2} \\
& =A I^{2}-\frac{1}{4} m_{a}^{2}+\frac{1}{36} m_{a}^{2} \\
& =r^{2} \operatorname{cosec}^{2}(A / 2)-\frac{2}{9} m_{a}^{2}
\end{aligned}
$$

Hence $r^{2} \cot ^{2}(A / 2)=\frac{2}{9} m_{a}^{2}$. From the above, we get

$$
\left(\frac{b-c}{2}\right)^{2}=\frac{2}{9} \cdot \frac{1}{4}\left(2 b^{2}+2 c^{2}-a^{2}\right)
$$

Simplification gives $5 b^{2}+13 c^{2}-18 b c=0$. This can be written as $(b-c)(5 b-13 c)=0$. As $b \neq c$, we get $5 b-13 c=0$. To conclude, $a=2 c, 5 b=13 c$ yield

$$
\frac{a}{10}=\frac{b}{13}=\frac{c}{5}
$$

solution_match: ## Solution:


problem:
Let $\alpha$ and $\beta$ be positive integers such that

$$
\frac{43}{197}<\frac{\alpha}{\beta}<\frac{17}{77}
$$

Find the minimum possible value of $\beta$.

solution:
We have

$$
\frac{77}{17}<\frac{\beta}{\alpha}<\frac{197}{43}
$$

That is,

$$
4+\frac{9}{17}<\frac{\beta}{\alpha}<4+\frac{25}{43}
$$

Thus $4<\frac{\beta}{\alpha}<5$. Since $\alpha$ and $\beta$ are positive integers, we may write $\beta=4 \alpha+x$, where $0<x<\alpha$. Now we get

$$
4+\frac{9}{17}<4+\frac{x}{\alpha}<4+\frac{25}{43}
$$

So $\frac{9}{17}<\frac{x}{\alpha}<\frac{25}{43}$; that is, $\frac{43 x}{25}<\alpha<\frac{17 x}{9}$.

We find the smallest value of $x$ for which $\alpha$ becomes a well-defined integer. For $x=1,2,3$ the bounds of $\alpha$ are respectively $\left(1 \frac{18}{25}, 1 \frac{8}{9}\right),\left(3 \frac{11}{25}, 3 \frac{7}{9}\right),\left(5 \frac{4}{9}, 5 \frac{2}{3}\right)$. None of these pairs contain an integer between them.

For $x=4$, we have $\frac{43 x}{25}=6 \frac{12}{25}$ and $\frac{17 x}{9}=7 \frac{5}{9}$. Hence, in this case $\alpha=7$, and $\beta=4 \alpha+x=28+4=32$.

This is also the least possible value, because, if $x \geq 5$, then $\alpha>\frac{43 x}{25} \geq \frac{43}{5}>8$, and so $\beta>37$.

Hence the minimum possible value of $\beta$ is 32 .


problem:
Let $p, q, r$ be positive real numbers, not all equal, such that some two of the equations

$$
p x^{2}+2 q x+r=0, \quad q x^{2}+2 r x+p=0, \quad r x^{2}+2 p x+q=0
$$

have a common root, say $\alpha$. Prove that

(a) $\alpha$ is real and negative; and

(b) the third equation has non-real roots.

solution:
Consider the discriminants of the three equations

$$
\begin{array}{r}
p x^{2}+q r+r=0 \\
q x^{2}+r x+p=0 \\
r x^{2}+p x+q=0
\end{array}
$$

Let us denote them by $D_{1}, D_{2}, D_{3}$ respectively. Then we have

$$
D_{1}=4\left(q^{2}-r p\right), D_{2}=4\left(r^{2}-p q\right), D_{3}=4\left(p^{2}-q r\right)
$$

We observe that

$$
\begin{aligned}
D_{1}+D_{2}+D_{3} & =4\left(p^{2}+q^{2}+r^{2}-p q-q r-r p\right) \\
& =2\left\{(p-q)^{2}+(q-r)^{2}+(r-p)^{2}\right\}>0
\end{aligned}
$$

since $p, q, r$ are not all equal. Hence at least one of $D_{1}, D_{2}, D_{3}$ must be positive. We may assume $D_{1}>0$.

Suppose $D_{2}<0$ and $D_{3}<0$. In this case both the equations (2) and (3) have only non-real roots and equation (1) has only real roots. Hence the common root $\alpha$ must be between (2) and (3). But then $\bar{\alpha}$ is the other root of both (2) and (3). Hence it follows that (2) and (3) have same set of roots. This implies that

$$
\frac{q}{r}=\frac{r}{p}=\frac{p}{q}
$$

Thus $p=q=r$ contradicting the given condition. Hence both $D_{2}$ and $D_{3}$ cannot be negative. We may assume $D_{2} \geq 0$. Thus we have

$$
q^{2}-r p>0, r^{2}-p q \geq 0
$$

These two give

$$
q^{2} r^{2}>p^{2} q r
$$

since $p, q, r$ are all positive. Hence we obtain $q r>p^{2}$ or $D_{3}<0$. We conclude that the common root must be between equations (1) and (2).

Thus

$$
\begin{aligned}
& p \alpha^{2}+q \alpha+r=0 \\
& q \alpha^{2}+r \alpha+p=0
\end{aligned}
$$

Eliminating $\alpha^{2}$, we obtain

$$
2\left(q^{2}-p r\right) \alpha=p^{2}-q r
$$

Since $q^{2}-p r>0$ and $p^{2}-q r<0$, we conclude that $\alpha<0$.

The condition $p^{2}-q r<0$ implies that the equation (3) has only non-real roots.

Alternately one can argue as follows. Suppose $\alpha$ is a common root of two equations, say, (1) and (2). If $\alpha$ is non-real, then $\bar{\alpha}$ is also a root of both (1) and (2). Hence The coefficients of (1) and (2) are proportional. This forces $p=q=r$, a contradiction. Hence the common root between any two equations cannot be non-real. Looking at the coefficients, we conclude that the common root $\alpha$ must be negative. If (1) and (2) have common root $\alpha$, then $q^{2} \geq r p$ and $r^{2} \geq p q$. Here at least one inequality is strict for $q^{2}=p r$ and $r^{2}=p q$ forces $p=q=r$. Hence $q^{2} r^{2}>p^{2} q r$. This gives $p^{2}<q r$ and hence (3) has nonreal roots.


problem: All possible 6-digit numbers, in each of which the digits occur in non-increasing order (from left to right, e.g., 877550) are written as a sequence in increasing order. Find the 2005 -th number in this sequence.

solution:
Consider a 6-digit number whose digits from left to right are in non increasing order. If 1 is the first digit of such a number, then the subsequent digits cannot exceed 1. The set of all such numbers with initial digit equal to 1 is

$$
\{100000,110000,111000,111100,111110,1111111\} .
$$

There are elements in this set.

Let us consider 6-digit numbers with initial digit 2. Starting form 200000, we can go up to 222222 . We count these numbers as follows:

| 200000 | - | 211111 | $:$ | 6 |
| :--- | :--- | :--- | :--- | :--- |
| 220000 | - | 221111 | $:$ | 5 |
| 222000 | - | 222111 | $:$ | 4 |
| 222200 | - | 222211 | $:$ | 3 |
| 222220 | - | 222221 | $:$ | 2 |
| 222222 | - | 222222 | $:$ | 1 |

The number of such numbers is 21. Similarly we count numbers with initial digit 3 ; the sequence starts from 300000 and ends with 333333 . We have

| 300000 | -322222 | $:$ | 21 |  |
| :---: | :---: | :---: | :---: | :---: |
| 330000 | - | 332222 | $:$ | 15 |
| 333000 | - | 333222 | $:$ | 10 |
| 333300 | -333322 | $:$ | 6 |  |
| 333330 | - | 333332 | $:$ | 3 |
| 333333 | -333333 | $:$ | 1 |  |

We obtain the total number of numbers starting from 3 equal to 56. Similarly,

| 400000 | 433333 | 56 |
| :---: | :---: | :---: |
| 440000 | 443333 | 35 |
| 444000 | 444333 | 20 |
| 444400 | 444433 | 10 |
| 444440 | 444443 | 4 |
| 444444 | $-\quad 444444$ | 1 |
|  |  | 126 |
| 500000 | 544444 | 126 |
| 550000 | 554444 | 70 |
| 555000 | 555444 | 35 |
| 555500 | 555544 | 15 |
| 555550 | 555554 | 5 |
| 555555 | 555555 | 1 |
|  |  | 252 |
| 600000 | 655555 | 252 |
| 660000 | $-\quad 665555$ | 126 |
| 666000 | $-\quad 666555$ | 56 |
| 666600 | $-\quad 666655$ | 21 |
| 666660 | $-\quad 666665$ | 6 |
| 666666 | $-\quad 666666$ | 1 |
|  |  | $\overline{462}$ |
| 700000 | $-\quad 766666$ | 462 |
| 770000 | $-\quad 776666$ | 210 |
| 777000 | $-\quad 777666$ | 84 |
| 777700 | $-\quad 777766$ | 28 |
| 777770 | $-\quad 777776$ | 7 |
| 777777 | 777777 | 1 |
|  |  | 792 |

Thus the number of 6-digit numbers where digits are non-increasing starting from 100000 and ending with 777777 is

$$
792+462+252+126+56+21+6=1715
$$

Since $2005-1715=290$, we have to consider only 290 numbers in the sequence with initial digit 8 . We have

$$
\begin{aligned}
& 800000-855555 \quad: \quad 252 \\
& 860000-863333: 35 \\
& 864000-864110 \quad: \quad 3
\end{aligned}
$$

Thus the required number is $\underline{864110}$.

solution_match: ## Solution I:


solution:
II

It is known that the number of ways of choosing $r$ objects from $n$ different types of objects (with repetitions allowed) is $\binom{n+r-1}{r}$. In particular, if we want to write $r$-digit numbers using $n$ digits allowing for repetitions with the additional condition that the digits appear in non-increasing order, we see that this can be done in $\binom{n+r-1}{r}$ ways.

Now we group the given numbers into different classes and write the number of ways in which each class can be obtained. To keep track we also write the cumulative sums of the number of numbers so obtained. Observe that the numbers themselves are written in ascending order. So we exhaust numbers beginning with 1 , then beginning with 2 and so on.

| ㄱNumbers | Digits used other
 than the fixed part | $n$ | $r$ | $\overline{\binom{n+r-1}{r}}$ | Cumulative
 sum |
| :---: | :---: | :---: | :---: | :---: | :---: |
| beginning with 1 | 1,0 | 2 | 5 | $\binom{6}{5}=6$ | 6 |
| 2 | $2,1,0$ | 3 | 5 | $\binom{7}{5}=21$ | 27 |
| 3 | $3,2,1,0$ | 4 | 5 | $\binom{8}{5}=56$ | 83 |
| 4 | $4,3,2,1,0$ | 5 | 5 | $\binom{9}{5}=126$ | 209 |
| 5 | $5,4,3,2,1,0$ | 6 | 5 | $\binom{10}{5}=252$ | 461 |
| 6 | $6,5,4,3,2,1,0$ | 7 | 5 | $\binom{11}{5}=462$ | 923 |
| 7 | $7,6,5,4,3,2,1,0$ | 8 | 5 | $\binom{12}{5}=792$ | 1715 |
| from 800000 to 855555 | $5,4,3,2,1,0$ | 6 | 5 | $\binom{10}{5}=252$ | 1967 |
| from 860000 to 863333 | $3,2,1,0$ | 4 | 4 | $\binom{7}{4}=35$ | 2002 |

The next three 6-digit numbers are $864000,864100,864110$.

Hence the 2005 th number in the sequence is 864110 .


problem:
Let $x_{1}$ be a given positive integer. A sequence $\left\langle x_{n}\right\rangle_{n=1}^{\infty}=\left\langle x_{1}, x_{2}, x_{3}, \cdots\right\rangle$ of positive integers is such that $x_{n}$, for $n \geq 2$, is obtained from $x_{n-1}$ by adding some nonzero digit of $x_{n-1}$. Prove that

(a) the sequence has an even number;

(b) the sequence has infinitely many even numbers.

solution:
(a) Let us assume that there are no even numbers in the sequence. This means that $x_{n+1}$ is obtained from $x_{n}$, by adding a nonzero even digit of $x_{n}$ to $x_{n}$, for each $n \geq 1$.

Let $E$ be the left most even digit in $x_{1}$ which may be taken in the form

$$
x_{1}=O_{1} O_{2} \cdots O_{k} E D_{1} D_{2} \cdots D_{l}
$$

where $O_{1}, O_{2}, \ldots, O_{k}$ are odd digits $(k \geq 0) ; D_{1}, D_{2}, \ldots, D_{l-1}$ are even or odd; and $D_{l}$ odd, $l \geq 1$.

Since each time we are adding at least 2 to a term of the sequence to get the next term, at some stage, we will have a term of the form

$$
x_{r}=O_{1} O_{2} \cdots O_{k} E 999 \cdots 9 F
$$

where $F=3,5,7$ or 9 . Now we are forced to add $E$ to $x_{r}$ to get $x_{r+1}$, as it is the only even digit available. After at most four steps of addition, we see that some next term is of the form

$$
x_{s}=O_{1} O_{2} \cdots O_{k} G 000 \cdots M
$$

where $G$ replaces $E$ of $x_{r}, G=E+1, M=1,3,5$, or 7 . But $x_{s}$ has no nonzero even digit contradicting our assumption. Hence the sequence has some even number as its term.
(b) If there are only finitely many even terms and $x_{t}$ is the last term, then the sequence $\left\langle x_{n}\right\rangle_{n=t+1}^{\infty}=$ $\left\langle x_{t+1}, x_{t+2}, \ldots\right\rangle$ is obtained in a similar manner and hence must have an even term by (a), a contradiction. Thus $\left\langle x_{n}\right\rangle_{n=1}^{\infty}$, has infinitely many even terms.


problem:
Find all functions $f: \mathbf{R} \rightarrow \mathbf{R}$ such that

$$
f\left(x^{2}+y f(z)\right)=x f(x)+z f(y)
$$

for all $x, y, z$ in $\mathbf{R}$. (Here $\mathbf{R}$ denotes the set of all real numbers.)

solution:
Taking $x=y=0$ in (1), we get $z f(0)=f(0)$ for all $z \in \mathbf{R}$. Hence we obtain $f(0)=0$. Taking $y=0$ in (1), we get

$$
f\left(x^{2}\right)=x f(x)
$$

Similarly $x=0$ in (1) gives

$$
f(y f(z))=z f(y)
$$

Putting $y=1$ in (3), we get

$$
f(f(z))=z f(1) \quad \forall z \in \mathbf{R}
$$

Now using (2) and (4), we obtain

$$
f(x f(x))=f\left(f\left(x^{2}\right)\right)=x^{2} f(1)
$$

Put $y=z=x$ in (3) also given

$$
f(x f(x))=x f(x)
$$

Comparing (5) and (6), it follows that $x^{2} f(1)=x f(x)$. If $x \neq 0$, then $f(x)=c x$, for some constant c. Since $f(0)=0$, we have $f(x)=c x$ for $x=0$ as well. Substituting this in (1), we see that

$$
c\left(x^{2}+c y z\right)=c x^{2}+c y z
$$

or

$$
c^{2} y z=c y z \quad \forall y, z \in \mathbf{R}
$$

This implies that $c^{2}=c$. Hence $c=0$ or 1 . We obtain $f(x)=0$ for all $x$ or $f(x)=x$ for all $x$. It is easy to verify that these two are solutions of the given equation.

solution_match: Solution: