exam: BalticWay

problem:
Let $\mathbb{Z}^{+}$be the set of all positive integers. Find all functions $f: \mathbb{Z}^{+} \rightarrow \mathbb{Z}^{+}$ satisfying the following conditions for all $x, y \in \mathbb{Z}^{+}$:

$$
\begin{aligned}
f(x, x) & =x, \\
f(x, y) & =f(y, x), \\
(x+y) f(x, y) & =y f(x, x+y) .
\end{aligned}
$$

solution:
Answer: $f(x, y)=\operatorname{lcm}(x, y)$ is the only such function.

We first show that there is at most one such function $f$. Let $z \geqslant 2$ be an integer. Knowing the values $f(x, y)$ for all $x, y$ with $0<x, y<z$, we compute $f(x, z)$ for $0<x<z$ using the third equation (with $y=z-x$ ); then from the first two equations we get the values $f(z, y)$ for $0<y \leqslant z$. Hence, if $f$ exists then it is unique.

Experimenting a little, we can guess that $f(x, y)$ is the least common multiple of $x$ and $y$. It remains to verify that the least-common-multiple function satisfies the given equations. The first two are clear, and for the third one:

$$
\begin{aligned}
(x+y) \cdot \operatorname{lcm}(x, y) & =(x+y) \cdot \frac{x y}{\operatorname{gcd}(x, y)}=y \cdot \frac{x(x+y)}{\operatorname{gcd}(x, x+y)}= \\
& =y \cdot \operatorname{lcm}(x, x+y) .
\end{aligned}
$$


problem: A triple of positive integers $(a, b, c)$ is called quasi-Pythagorean if there exists a triangle with lengths of the sides $a, b, c$ and the angle opposite to the side $c$ equal to $120^{\circ}$. Prove that if $(a, b, c)$ is a quasi-Pythagorean triple then $c$ has a prime divisor greater than 5 .

solution:
By the cosine law, a triple of positive integers $(a, b, c)$ is quasi-Pythagorean if and only if

$$
c^{2}=a^{2}+a b+b^{2}
$$

If a triple $(a, b, c)$ with a common divisor $d>1$ satisfies (1), then so does the reduced triple $\left(\frac{a}{d}, \frac{b}{d}, \frac{c}{d}\right)$. Hence it suffices to prove that in every irreducible quasi-Pythagorean triple the greatest term $c$ has a prime divisor greater than 5. Actually, we will show that in that case every prime divisor of $c$ is greater than 5 .

Let $(a, b, c)$ be an irreducible triple satisfying (1). Note that then $a, b$ and $c$ are pairwise coprime. We have to show that $c$ is not divisible by 2,3 or 5 .

If $c$ were even, then $a$ and $b$ (coprime to $c$ ) should be odd, and (1) would not hold.

Suppose now that $c$ is divisible by 3 , and rewrite (1) as

$$
4 c^{2}=(a+2 b)^{2}+3 a^{2}
$$

Then $a+2 b$ must be divisible by 3 . Since $a$ is coprime to $c$, the number $3 a^{2}$ is not divisible by 9 . This yields a contradiction since the remaining terms in (2) are divisible by 9 .

Finally, suppose $c$ is divisible by 5 (and hence $a$ is not). Again we get a contradiction with (2) since the square of every integer is congruent to 0 ,

1 or -1 modulo 5 ; so $4 c^{2}-3 a^{2} \equiv \pm 2(\bmod 5)$ and it cannot be equal to $(a+2 b)^{2}$. This completes the proof.

Remark. A yet stronger claim is true: If $a$ and $b$ are coprime, then every prime divisor $p>3$ of $a^{2}+a b+b^{2}$ is of the form $p=6 k+1$. (Hence every prime divisor of $c$ in an irreducible quasi-Pythagorean triple $(a, b, c)$ has such a form.)

This stronger claim can be proved by observing that $p$ does not divide $a$ and the number $g=(a+2 b) a^{(p-3) / 2}$ is an integer whose square satisfies

$$
\begin{aligned}
g^{2} & =(a+2 b)^{2} a^{p-3}=\left(4\left(a^{2}+a b+b^{2}\right)-3 a^{2}\right) a^{p-3} \equiv-3 a^{p-1} \equiv \\
& \equiv-3(\bmod p)
\end{aligned}
$$

Hence -3 is a quadratic residue modulo $p$. This is known to be true only for primes of the form $6 k+1$; proofs can be found in many books on number theory, e.g. [1].

Reference. [1] K. Ireland, M. Rosen, A Classical Introduction to Modern Number Theory, Second Edition, Springer-Verlag, New York 1990.


problem:
Find all pairs of positive integers $x, y$ which satisfy the equation

$$
2 x^{2}+5 y^{2}=11(x y-11) \text {. }
$$

solution:
Answer: $x=14, y=27$.

Rewriting the equation as $2 x^{2}-x y+5 y^{2}-10 x y=-121$ and factoring we get:

$$
(2 x-y) \cdot(5 y-x)=121 .
$$

Both factors must be of the same sign. If they were both negative, we would have $2 x<y<\frac{x}{5}$, a contradiction. Hence the last equation represents the number 121 as the product of two positive integers: $a=2 x-y$ and $b=5 y-x$, and $(a, b)$ must be one of the pairs $(1,121),(11,11)$ or $(121,1)$. Examining these three possibilities we find that only the first one yields integer values of $x$ and $y$, namely, $(x, y)=(14,27)$. Hence this pair is the unique solution of the original equation.


problem: Let $P$ be a polynomial with integer coefficients. Suppose that for $n=1,2,3, \ldots, 1998$ the number $P(n)$ is a three-digit positive integer. Prove that the polynomial $P$ has no integer roots.

solution: Let $m$ be an arbitrary integer and define $n \in\{1,2, \ldots, 1998\}$ to be such that $m \equiv n(\bmod 1998)$. Then $P(m) \equiv P(n)(\bmod 1998)$. Since $P(n)$ as a three-digit number cannot be divisible by 1998 , then $P(m)$ cannot be equal to 0 . Hence $P$ has no integer roots.


problem: Let $a$ be an odd digit and $b$ an even digit. Prove that for every positive integer $n$ there exists a positive integer, divisible by $2^{n}$, whose decimal representation contains no digits other than $a$ and $b$.

solution:
If $b=0$, then $N=10^{n} a$ meets the demands. For the sequel, suppose $b \neq 0$.

Let $n$ be fixed. We prove that if $1 \leqslant k \leqslant n$, then we can find a positive integer $m_{k}<5^{k}$ such that the last $k$ digits of $m_{k} 2^{n}$ are all $a$ or $b$. Clearly, for $k=1$ we can find $m_{1}$ with $1 \leqslant m_{1} \leqslant 4$ such that $m_{1} 2^{n}$ ends with the digit $b$. (This corresponds to solving the congruence $m_{1} 2^{n-1} \equiv \frac{b}{2}$ modulo 5.) If $n=1$, we are done. Hence let $n \geqslant 2$.

Assume that for a certain $k$ with $1 \leqslant k<n$ we have found the integer $m_{k}$. Let $c$ be the $(k+1)$-st digit from the right of $m_{k} 2^{n}$ (i.e., the coefficient of $10^{k}$ in its decimal representation). Consider the number $5^{k} 2^{n}$ : it ends with precisely $k$ zeros, and the last non-zero digit is even; call it $d$. For any $r$, the corresponding digit of the number $m_{k} 2^{n}+r 5^{k} 2^{n}$ will be $c+r d$ modulo 10. By a suitable choice of $r \leqslant 4$ we can make this digit be either $a$ or $b$, according to whether $c$ is odd or even. (As before, this corresponds to solving one of the congruences $r \cdot \frac{d}{2} \equiv \frac{a-c}{2}$ or $r \cdot \frac{d}{2} \equiv \frac{b-c}{2}$ modulo 5.) Now, let $m_{k+1}=m_{k}+r 5^{k}$. The last $k+1$ digits of $m_{k+1} 2^{n}$ are all $a$ or $b$. As $m_{k+1}<5^{k}+4 \cdot 5^{k}=5^{k+1}$, we see that $m_{k+1}$ has the required properties. This process can be continued until we obtain a number $m_{n}$ such that the last $n$ digits of $N=m_{n} 2^{n}$ are $a$ or $b$. Since $m_{n}<5^{n}$, the number $N$ has at most $n$ digits, all of which are $a$ or $b$.

Alternative solution. The case $b=0$ is handled as in the first solution. Assume that $b \neq 0$. We prove the statement by induction on $n$, postulating, in addition, that $N$ (the integer we are looking for) must be an $n$-digit number.

For $n=1$ we take the one-digit number $b$. Assume the claim is true for a certain $n \geqslant 1$, with $N \equiv 0\left(\bmod 2^{n}\right)$ having exactly $n$ digits, all $a$ or $b$; thus $N<10^{n}$. Define

$$
N^{*}= \begin{cases}10^{n} b+N & \text { if } N \equiv 0\left(\bmod 2^{n+1}\right) \\ 10^{n} a+N & \text { if } N \equiv 2^{n}\left(\bmod 2^{n+1}\right) .\end{cases}
$$

Clearly, $N^{*}$ is an $(n+1)$-digit number, satisfying

$$
N^{*} \equiv \begin{cases}0+0\left(\bmod 2^{n+1}\right) & \text { in the first case } \\ 2^{n}+2^{n}\left(\bmod 2^{n+1}\right) & \text { in the second case. }\end{cases}
$$

In both cases $N^{*}$ is divisible by $2^{n+1}$, and we have the induction claim. The result follows.


problem: Let $P$ be a polynomial of degree 6 and let $a, b$ be real numbers such that $0<a<b$. Suppose that $P(a)=P(-a), P(b)=P(-b)$ and $P^{\prime}(0)=0$. Prove that $P(x)=P(-x)$ for all real $x$.

solution: The polynomial $Q(x)=P(x)-P(-x)$, of degree at most 5 , has roots at $-b,-a, 0, a$ and $b$; these are five distinct numbers. Moreover, $Q^{\prime}(0)=0$, showing that $Q$ has a multiple root at 0 . Thus $Q$ must be the constant 0 , i.e. $P(x)=P(-x)$ for all $x$.


problem:
Let $\mathbb{R}$ be the set of all real numbers. Find all functions $f: \mathbb{R} \rightarrow \mathbb{R}$ satisfying for all $x, y \in \mathbb{R}$ the equation

$$
f(x)+f(y)=f(f(x) f(y)) .
$$

solution:
Answer: $f(x) \equiv 0$ is the only such function.

Choose an arbitrary real number $x_{0}$ and denote $f\left(x_{0}\right)=c$. Setting $x=y=x_{0}$ in the equation we obtain $f\left(c^{2}\right)=2 c$. For $x=y=c^{2}$ the equation now gives $f\left(4 c^{2}\right)=4 c$. On the other hand, substituting $x=x_{0}$ and $y=4 c^{2}$ we obtain $f\left(4 c^{2}\right)=5 c$. Hence $4 c=5 c$, implying $c=0$. As $x_{0}$ was chosen arbitrarily, we have $f(x)=0$ for all real numbers $x$.

Obviously, the function $f(x) \equiv 0$ satisfies the equation. So it is the only solution.


problem:
Let $P_{k}(x)=1+x+x^{2}+\cdots+x^{k-1}$. Show that

$$
\sum_{k=1}^{n}\left(\begin{array}{l}
n \\
k
\end{array}\right) P_{k}(x)=2^{n-1} P_{n}\left(\frac{1+x}{2}\right)
$$

for every real number $x$ and every positive integer $n$.

solution:
Let $A$ and $B$ be the left- and right-hand side of the claimed formula, respectively. Since

$$
(1-x) P_{k}(x)=1-x^{k},
$$

we get

$$
(1-x) \cdot A=\sum_{k=1}^{n}\left(\begin{array}{l}
n \\
k
\end{array}\right)\left(1-x^{k}\right)=\sum_{k=0}^{n}\left(\begin{array}{l}
n \\
k
\end{array}\right)\left(1-x^{k}\right)=2^{n}-(1+x)^{n}
$$

and

$$
\begin{aligned}
(1-x) \cdot B & =2\left(1-\frac{1+x}{2}\right) \cdot 2^{n-1} P_{n}\left(\frac{1+x}{2}\right)= \\
& =2^{n}\left(1-\left(\frac{1+x}{2}\right)^{n}\right)=2^{n}-(1+x)^{n} .
\end{aligned}
$$

Thus $A=B$ for all real numbers $x \neq 1$. Since both $A$ and $B$ are polynomials, they coincide also for $x=1$.

Remark. The desired equality can be also proved without multiplication by $(1-x)$, just via regrouping the terms of the expanded $P_{k}$ 's and some more manipulation; this approach is more cumbersome.


problem:
Let the numbers $\alpha, \beta$ satisfy $0<\alpha<\beta<\pi / 2$ and let $\gamma$ and $\delta$ be the numbers defined by the conditions:

(i) $0<\gamma<\pi / 2$, and $\tan \gamma$ is the arithmetic mean of $\tan \alpha$ and $\tan \beta$;

(ii) $0<\delta<\pi / 2$, and $\frac{1}{\cos \delta}$ is the arithmetic mean of $\frac{1}{\cos \alpha}$ and $\frac{1}{\cos \beta}$.

Prove that $\gamma<\delta$.

solution:
Let $f(t)=\sqrt{1+t^{2}}$. Since $f^{\prime \prime}(t)=\left(1+t^{2}\right)^{-3 / 2}>0$, the function $f(t)$ is
strictly convex on $(0, \infty)$. Consequently,

$$
\begin{aligned}
\frac{1}{\cos \gamma} & =\sqrt{1+\tan ^{2} \gamma}=f(\tan \gamma)=f\left(\frac{\tan \alpha+\tan \beta}{2}\right)< \\
& <\frac{f(\tan \alpha)+f(\tan \beta)}{2}=\frac{1}{2}\left(\frac{1}{\cos \alpha}+\frac{1}{\cos \beta}\right)=\frac{1}{\cos \delta},
\end{aligned}
$$

and hence $\gamma<\delta$.

Remark. The use of calculus can be avoided. We only need the midpointconvexity of $f$, i.e., the inequality

$$
\sqrt{1+\frac{1}{4}(u+v)^{2}}<\frac{1}{2} \sqrt{1+u^{2}}+\frac{1}{2} \sqrt{1+v^{2}}
$$

for $u, v>0$ and $u \neq v$, which is equivalent (via squaring) to

$$
1+u v<\sqrt{\left(1+u^{2}\right)\left(1+v^{2}\right)} .
$$

The latter inequality reduces (again by squaring) to $2 u v<u^{2}+v^{2}$, holding trivially.

Alternative solution. Draw a unit segment $O P$ in the plane and take points $A$ and $B$ on the same side of line $O P$ so that $\angle P O A=\angle P O B=90^{\circ}$, $\angle O P A=\alpha$ and $\angle O P B=\beta$ (see Figure 1). Then we have $|O A|=\tan \alpha$, $|O B|=\tan \beta,|P A|=\frac{1}{\cos \alpha}$ and $|P B|=\frac{1}{\cos \beta}$.

![](https://cdn.mathpix.com/cropped/2024_04_17_265f402a46c0191f8856g-08.jpg?height=462&width=741&top_left_y=1321&top_left_x=243)

Figure 1

Let $C$ be the midpoint of the segment $A B$. By hypothesis, we have $|O C|=\frac{\tan \alpha+\tan \beta}{2}=\tan \gamma$, hence $\angle O P C=\gamma$ and $|P C|=\frac{1}{\cos \gamma}$. Let $Q$ be the point symmetric to $P$ with respect to $C$. The quadrilateral $P A Q B$ is a parallelogram, and therefore $|A Q|=|P B|=\frac{1}{\cos \beta}$. Eventually,

$$
\frac{2}{\cos \delta}=\frac{1}{\cos \alpha}+\frac{1}{\cos \beta}=|P A|+|A Q|>|P Q|=2 \cdot|P C|=\frac{2}{\cos \gamma},
$$

and hence $\delta>\gamma$.

Another solution. Set $x=\frac{\alpha+\beta}{2}$ and $y=\frac{\alpha-\beta}{2}$, then $\alpha=x+y, \beta=x-y$ and

$$
\begin{aligned}
\cos \alpha \cos \beta & =\frac{1}{2}(\cos 2 x+\cos 2 y)= \\
& =\frac{1}{2}\left(1-2 \sin ^{2} x\right)+\frac{1}{2}\left(2 \cos ^{2} y-1\right)=\cos ^{2} y-\sin ^{2} x .
\end{aligned}
$$

By the conditions of the problem,

$$
\tan \gamma=\frac{1}{2}\left(\frac{\sin \alpha}{\cos \alpha}+\frac{\sin \beta}{\cos \beta}\right)=\frac{1}{2} \cdot \frac{\sin (\alpha+\beta)}{\cos \alpha \cos \beta}=\frac{\sin x \cos x}{\cos \alpha \cos \beta}
$$

and

$$
\frac{1}{\cos \delta}=\frac{1}{2}\left(\frac{1}{\cos \alpha}+\frac{1}{\cos \beta}\right)=\frac{1}{2} \cdot \frac{\cos \alpha+\cos \beta}{\cos \alpha \cos \beta}=\frac{\cos x \cos y}{\cos \alpha \cos \beta} .
$$

Using (3) we hence obtain

$$
\begin{aligned}
\tan ^{2} \delta-\tan ^{2} \gamma & =\frac{1}{\cos ^{2} \delta}-1-\tan ^{2} \gamma=\frac{\cos ^{2} x \cos ^{2} y-\sin ^{2} x \cos ^{2} x}{\cos ^{2} \alpha \cos ^{2} \beta}-1= \\
& =\frac{\cos ^{2} x\left(\cos ^{2} y-\sin ^{2} x\right)}{\left(\cos ^{2} y-\sin ^{2} x\right)^{2}}-1=\frac{\cos ^{2} x}{\cos ^{2} y-\sin ^{2} x}-1= \\
& =\frac{\cos ^{2} x-\cos ^{2} y+\sin ^{2} x}{\cos ^{2} y-\sin ^{2} x}=\frac{\sin ^{2} y}{\cos \alpha \cos \beta}>0,
\end{aligned}
$$

showing that $\delta>\gamma$.


problem: Let $n \geqslant 4$ be an even integer. A regular $n$-gon and a regular $(n-1)$-gon are inscribed into the unit circle. For each vertex of the $n$-gon consider the distance from this vertex to the nearest vertex of the $(n-1)$-gon, measured along the circumference. Let $S$ be the sum of these $n$ distances. Prove that $S$ depends only on $n$, and not on the relative position of the two polygons.

solution:
For simplicity, take the length of the circle to be $2 n(n-1)$ rather than $2 \pi$. The vertices of the $(n-1)$-gon $A_{0} A_{1} \ldots A_{n-2}$ divide it into $n-1$ arcs of length $2 n$. By the pigeonhole principle, some two of the vertices of the $n$-gon $B_{0} B_{1} \ldots B_{n-1}$ lie in the same arc. Assume w.l.o.g. that $B_{0}$ and $B_{1}$ lie in the arc $A_{0} A_{1}$, with $B_{0}$ closer to $A_{0}$ and $B_{1}$ closer to $A_{1}$, and that $\left|A_{0} B_{0}\right| \leqslant\left|B_{1} A_{1}\right|$.

Consider the circle as the segment $[0,2 n(n-1)]$ of the real line, with both of its endpoints identified with the vertex $A_{0}$ and the numbers $2 n, 4 n, 6 n, \ldots$ identified accordingly with the vertices $A_{1}, A_{2}, A_{3}, \ldots$

For $k=0,1, \ldots, n-1$, let $x_{k}$ be the "coordinate" of the vertex $B_{k}$ of the $n$-gon. Each arc $B_{k} B_{k+1}$ has length $2(n-1)$. By the choice of labelling, we have

$$
0 \leqslant x_{0}<x_{1}=x_{0}+2(n-1) \leqslant 2 n
$$

and, moreover, $x_{0}-0 \leqslant 2 n-x_{1}$. Hence $0 \leqslant x_{0} \leqslant 1$.

Clearly, $x_{k}=x_{0}+2 k(n-1)$ for $k=0,1, \ldots, n-1$. It is not hard to see that $(2 k-1) n \leqslant x_{k} \leqslant 2 k n$ if $1 \leqslant k \leqslant \frac{n}{2}$, and $(2 k-2) n \leqslant x_{k} \leqslant(2 k-1) n$ if $\frac{n}{2}<k \leqslant n-1$. These inequalities are verified immediately by inserting $x_{k}=x_{0}+2 k(n-1)$ and taking into account that $0 \leqslant x_{0} \leqslant 1$.

Summing up, we have:

1) if $1 \leqslant k \leqslant \frac{n}{2}$, then $B_{k}$ lies between $A_{k-1}$ and $A_{k}$, closer to $A_{k}$; recalling that $A_{k}$ has "coordinate" $2 k n$, we see that the distance in question is equal to $2 k n-x_{k}=2 k-x_{0}$;
2) if $\frac{n}{2}<k \leqslant n-1$, then $B_{k}$ lies between $A_{k-1}$ and $A_{k}$, closer to $A_{k-1}$; the distance in question is equal to $x_{k}-(2 k-2) n=x_{0}-2 k+2 n$;
3) for $B_{0}$, the distance in question is $x_{0}$.

The sum of these distances evaluates to

$$
x_{0}+\sum_{k=1}^{n / 2}\left(2 k-x_{0}\right)+\sum_{k=n / 2+1}^{n-1}\left(x_{0}-2 k+2 n\right)
$$

Note that here $x_{0}$ appears half of the times with a plus sign and half of the times with a minus sign. Thus, eventually, all terms $x_{0}$ cancel out, and the value of $S$ does not depend on anything but $n$.


problem:
Let $a, b$ and $c$ be the lengths of the sides of a triangle with circumradius $R$. Prove that

$$
R \geqslant \frac{a^{2}+b^{2}}{2 \sqrt{2 a^{2}+2 b^{2}-c^{2}}} .
$$

When does equality hold?

solution:
Answer: equality holds if $a=b$ or the angle opposite to $c$ is equal to $90^{\circ}$. Denote the angles opposite to the sides $a, b, c$ by $A, B, C$, respectively. By the law of sines we have $a=2 R \sin A, b=2 R \sin B, c=2 R \sin C$. Hence, the given inequality is equivalent to each of the following:

$$
\begin{aligned}
& R \geqslant \frac{4 R^{2}\left(\sin ^{2} A+\sin ^{2} B\right)}{2 \sqrt{8 R^{2}\left(\sin ^{2} A+\sin ^{2} B\right)-4 R^{2} \sin ^{2} C}}, \\
& 2\left(\sin ^{2} A+\sin ^{2} B\right)-\sin ^{2} C \geqslant\left(\sin ^{2} A+\sin ^{2} B\right)^{2} \\
& \left(\sin ^{2} A+\sin ^{2} B\right)\left(2-\sin ^{2} A-\sin ^{2} B\right) \geqslant \sin ^{2} C \\
& \left(\sin ^{2} A+\sin ^{2} B\right)\left(\cos ^{2} A+\cos ^{2} B\right) \geqslant \sin ^{2} C
\end{aligned}
$$

The last inequality follows from the Cauchy-Schwarz inequality:

$$
\begin{aligned}
& \left(\sin ^{2} A+\sin ^{2} B\right)\left(\cos ^{2} B+\cos ^{2} A\right) \geqslant \\
& \quad \geqslant(\sin A \cdot \cos B+\sin B \cdot \cos A)^{2}=\sin ^{2} C .
\end{aligned}
$$

Equality requires that $\sin A=\lambda \cos B$ and $\sin B=\lambda \cos A$ for a certain real number $\lambda$, implying that $\lambda$ is positive and $A, B$ are acute angles. From these two equations we conclude that $\sin 2 A=\sin 2 B$. This means that either $2 A=2 B$ or $2 A+2 B=\pi$; in other words, $a=b$ or $C=90^{\circ}$. In each of these two cases the inequality indeed turns into equality.

![](https://cdn.mathpix.com/cropped/2024_04_17_265f402a46c0191f8856g-11.jpg?height=434&width=426&top_left_y=1171&top_left_x=318)

Figure 2

Alternative solution. Let $A, B, C$ be the respective vertices of the triangle, $O$ be its circumcentre and $M$ be the midpoint of $A B$ (see Figure 2). The length $m_{c}=|C M|$ of the median drawn from $C$ is expressed by the well-
known formula

$$
4 m_{c}^{2}=2 a^{2}+2 b^{2}-c^{2} .
$$

Hence the inequality of the problem can be rewritten as $4 R m_{c} \geqslant a^{2}+b^{2}$, or $8 R m_{c} \geqslant 4 m_{c}^{2}+c^{2}$. The last inequality is equivalent to

$$
\left|m_{c}-R\right| \leqslant \sqrt{R^{2}-(c / 2)^{2}},
$$

or ||$M C|-| O C|| \leqslant|O M|$, which is the triangle inequality for triangle COM .

Equality holds if and only if the points $C, O, M$ are collinear. This happens if and only if $a=b$ or $\angle C=90^{\circ}$.

Remark. Yet another solution can be obtained by setting $R=\frac{a b c}{4 S}$ (where $S$ denotes the area of the triangle) and expressing $S$ by Heron's formula. After squaring both sides, cross-multiplying and cancelling a lot, the inequality reduces to $\left(a^{2}-b^{2}\right)^{2}\left(a^{2}+b^{2}-c^{2}\right)^{2} \geqslant 0$, with equality if $a=b$ or $a^{2}+b^{2}=c^{2}$.

![](https://cdn.mathpix.com/cropped/2024_04_17_265f402a46c0191f8856g-12.jpg?height=423&width=423&top_left_y=985&top_left_x=319)

Figure 3


problem:
In a triangle $A B C, \angle B A C=90^{\circ}$. Point $D$ lies on the side $B C$ and satisfies $\angle B D A=2 \angle B A D$. Prove that

$$
\frac{1}{|A D|}=\frac{1}{2}\left(\frac{1}{|B D|}+\frac{1}{|C D|}\right)
$$

solution:
Let $O$ be the circumcentre of triangle $A B C$ (i.e., the midpoint of $B C$ ) and let $A D$ meet the circumcircle again at $E$ (see Figure 3). Then $\angle B O E=2 \angle B A E=\angle C D E$, showing that $|D E|=|O E|$. Triangles $A D C$ and $B D E$ are similar; hence $\frac{|A D|}{|B D|}=\frac{|C D|}{|D E|}, \frac{|A D|}{|C D|}=\frac{|B D|}{|D E|}$ and finally

$$
\frac{|A D|}{|B D|}+\frac{|A D|}{|C D|}=\frac{|C D|}{|D E|}+\frac{|B D|}{|D E|}=\frac{|B C|}{|D E|}=\frac{|B C|}{|O E|}=2
$$

which is equivalent to the equality we have to prove.

Alternative solution. Let $\angle B A D=\alpha$ and $\angle C A D=\beta$. By the conditions of the problem, $\alpha+\beta=90^{\circ}$ (hence $\sin \beta=\cos \alpha$ ), $\angle B D A=2 \alpha$ and $\angle C D A=2 \beta$. By the law of sines,

$$
\frac{|A D|}{|B D|}=\frac{\sin 3 \alpha}{\sin \alpha}=3-4 \sin ^{2} \alpha
$$

and

$$
\frac{|A D|}{|C D|}=\frac{\sin 3 \beta}{\sin \beta}=3-4 \sin ^{2} \beta=3-4 \cos ^{2} \alpha .
$$

Adding these two equalities we get the claimed one.

![](https://cdn.mathpix.com/cropped/2024_04_17_265f402a46c0191f8856g-13.jpg?height=448&width=682&top_left_y=793&top_left_x=254)

Figure 4


problem: In a convex pentagon $A B C D E$, the sides $A E$ and $B C$ are parallel and $\angle A D E=\angle B D C$. The diagonals $A C$ and $B E$ intersect at $P$. Prove that $\angle E A D=\angle B D P$ and $\angle C B D=\angle A D P$.

solution: Let $\mathcal{C}_{1}$ and $\mathcal{C}_{2}$ be the circumcircles of triangles $A E D$ and $B C D$, respectively. Let $D P$ meet $\mathcal{C}_{2}$ for the second time at $F$ (see Figure 4). Since $\angle A D E=\angle B D C$, the ratio of the lengths of the segments $E A$ and $B C$ is equal to the ratio of the radii of $\mathcal{C}_{1}$ and $\mathcal{C}_{2}$. Thus the homothety with centre $P$ that takes $A E$ to $C B$, also transforms $\mathcal{C}_{1}$ onto $\mathcal{C}_{2}$. The same homothety transforms the arc $D E$ of $\mathcal{C}_{1}$ onto the $\operatorname{arc} F B$ of $\mathcal{C}_{2}$. Therefore $\angle E A D=\angle B D F=\angle B D P$. The second equality is proved similarly.


problem: Given a triangle $A B C$ with $|A B|<|A C|$. The line passing through $B$ and parallel to $A C$ meets the external bisector of angle $B A C$ at $D$. The line passing through $C$ and parallel to $A B$ meets this bisector at $E$. Point $F$ lies on the side $A C$ and satisfies the equality $|F C|=|A B|$. Prove that $|D F|=|F E|$.

solution:
Since the lines $B D$ and $A C$ are parallel and since $A D$ is the external bisector of $\angle B A C$, we have $\angle B A D=\angle B D A$; denote their common size by $\alpha$ (see Figure 5). Also $\angle C A E=\angle C E A=\alpha$, implying $|A B|=|B D|$ and $|A C|=|C E|$. Let $B^{\prime}, C^{\prime}, F^{\prime}$ be the feet of the perpendiculars from

![](https://cdn.mathpix.com/cropped/2024_04_17_265f402a46c0191f8856g-14.jpg?height=406&width=1117&top_left_y=257&top_left_x=174)

Figure 5

the points $B, C, F$ to line $D E$. From $|F C|=|A B|$ we obtain

$$
\left|B^{\prime} F^{\prime}\right|=(|A B|+|A F|) \cos \alpha=|A C| \cos \alpha=\left|A C^{\prime}\right|=\left|C^{\prime} E\right|
$$

and

$$
\left|D B^{\prime}\right|=|B D| \cos \alpha=|F C| \cos \alpha=\left|F^{\prime} C^{\prime}\right|,
$$

Thus $\left|D F^{\prime}\right|=\left|F^{\prime} E\right|$, whence $|D F|=|F E|$.

![](https://cdn.mathpix.com/cropped/2024_04_17_265f402a46c0191f8856g-14.jpg?height=440&width=545&top_left_y=1144&top_left_x=282)

Figure 6


problem:
Given an acute triangle $A B C$. Point $D$ is the foot of the perpendicular from $A$ to $B C$. Point $E$ lies on the segment $A D$ and satisfies the equation

$$
\frac{|A E|}{|E D|}=\frac{|C D|}{|D B|}
$$

Point $F$ is the foot of the perpendicular from $D$ to $B E$. Prove that $\angle A F C=90^{\circ}$.

solution:
Complete the rectangle $A D C P$ (see Figure 6). In view of

$$
\frac{|A E|}{|E D|}=\frac{|C D|}{|D B|}=\frac{|A P|}{|D B|}
$$

the points $B, E, P$ are collinear. Therefore $\angle D F P=90^{\circ}$, and so $F$ lies on the circumcircle of the rectangle $A D C P$ with diameter $A C$; hence $\angle A F C=90^{\circ}$.


problem: Is it possible to cover a $13 \times 13$ chessboard with forty-two tiles of size $4 \times 1$ so that only the central square of the chessboard remains uncovered? (It is assumed that each tile covers exactly four squares of the chessboard, and the tiles do not overlap.)

solution:
Answer: no.

Label the horizontal rows by integers from 1 to 13. Assume that the tiling is possible, and let $a_{i}$ be the number of vertical tiles with their outer squares in rows $i$ and $i+3$. Then $b_{i}=a_{i}+a_{i-1}+a_{i-2}+a_{i-3}$ is the number of vertical tiles intersecting row $i$ (here we assume $a_{j}=0$ if $j \leqslant 0$ ). Since there are 13 squares in each row, and each horizontal tile covers four (i.e. an even number) of these, then $b_{i}$ must be odd for all $1 \leqslant i \leqslant 13$ except for $b_{7}$, which must be even.

We now get that $a_{1}=b_{1}$ is odd, $a_{2}$ is even (since $b_{2}=a_{2}+a_{1}$ is odd), and similarly $a_{3}$ and $a_{4}$ are even. Since $b_{5}=a_{5}+a_{4}+a_{3}+a_{2}$ is odd, then $a_{5}$ must be odd. Continuing this way we find that $a_{6}$ is even, $a_{7}$ is odd (since $b_{7}$ is even), $a_{8}$ is odd, $a_{9}$ is odd and $a_{10}$ is even. Obviously $a_{i}=0$ for $i>10$, as no tile is allowed to extend beyond the edge of the board. But then $b_{13}=a_{10}$ must be both even and odd, a contradiction.

Alternative solution. Colour the squares of the board black and white in the following pattern. In the first (top) row, let the two leftmost squares be black, the next two be white, the next two black, the next two white, and so on (at the right end there remains a single black square). In the second row, let the colouring be reciprocal to that of the first row (two white squares, two black squares, and so on). If the rows are labelled by 1 through 13 , let all the odd-indexed rows be coloured as the first row, and all the even-indexed ones as the second row (see Figure 7).

Note that there are more black squares than white squares in the board. Each $4 \times 1$ tile, no matter how placed, covers two black squares and two white squares. Thus if a tiling leaves a single square uncovered, this square must be black. But the central square of the board is white. Hence such a tiling is impossible.

Another solution. Colour the squares in four colours as follows: colour all squares in the 1-st column green, all squares in the 2-nd column black, all squares in the 3 -rd column white, all squares in the 4 -th column red, all squares in the 5 -th column green, all squares in the 6 -th column black etc., leaving only the central square uncoloured (see Figure 8). Altogether we have $3 \cdot 13=39$ black squares and $3 \cdot 13-1=38$ white squares. Since
each $4 \times 1$ tile covers either one square of each colour or all four squares of the same colour, then the difference of the numbers of black and white squares must be divisible by 4 . Since $39-38=1$ is not divisible by 4 , the required tiling does not exist.

![](https://cdn.mathpix.com/cropped/2024_04_17_265f402a46c0191f8856g-16.jpg?height=510&width=520&top_left_y=423&top_left_x=174)

Figure 7
G BWR G B WR G BWR G

![](https://cdn.mathpix.com/cropped/2024_04_17_265f402a46c0191f8856g-16.jpg?height=500&width=504&top_left_y=432&top_left_x=785)

Figure 8


problem: Let $n$ and $k$ be positive integers. There are $n k$ objects (of the same size) and $k$ boxes, each of which can hold $n$ objects. Each object is coloured in one of $k$ different colours. Show that the objects can be packed in the boxes so that each box holds objects of at most two colours.

solution: If $k=1$, it is obvious how to do the packing. Now assume $k>1$. There are not more than $n$ objects of a certain colour - say, pink - and also not fewer than $n$ objects of some other colour - say, grey. Pack all pink objects into one box; if there is space left, fill the box up with grey objects. Then remove that box together with its contents; the problem gets reduced to an analogous one with $k-1$ boxes and $k-1$ colours. Assuming inductively that the task can be done in that case, we see that it can also be done for $k$ boxes and colours. The general result follows by induction.


problem:
Determine all positive integers $n$ for which there exists a set $S$ with the following properties:

(i) $S$ consists of $n$ positive integers, all smaller than $2^{n-1}$;

(ii) for any two distinct subsets $A$ and $B$ of $S$, the sum of the elements of $A$ is different from the sum of the elements of $B$.

solution:
Answer: all integers $n \geqslant 4$.

Direct search shows that there is no such set $S$ for $n=1,2,3$. For $n=4$ we can take $S=\{3,5,6,7\}$. If, for a certain $n \geqslant 4$ we have a set $S=\left\{a_{1}, a_{2}, \ldots, a_{n}\right\}$ as needed, then the set $S^{*}=\left\{1,2 a_{1}, 2 a_{2}, \ldots, 2 a_{n}\right\}$ satisfies the requirements for $n+1$. Hence a set with the required properties exists if and only if $n \geqslant 4$.


problem: Consider a ping-pong match between two teams, each consisting of 1000 players. Each player played against each player of the other team exactly once (there are no draws in ping-pong). Prove that there exist ten players, all from the same team, such that every member of the other team has lost his game against at least one of those ten players.

solution:
We start with the following observation: In a match between two teams (not necessarily of equal sizes), there exists in one of the teams a player who won his games with at least half of the members of the other team.

Indeed: suppose there is no such player. If the teams consist of $m$ and $n$ members then the players of the first team jointly won less than $m \cdot \frac{n}{2}$ games, and the players of the second team jointly won less than $m \cdot \frac{n}{2}$ games - this is a contradiction since the total number of games played is $m n$, and in each game there must have been a winner.

Returning to the original problem (with two equal teams of size 1000), choose a player who won his games with at least half of the members of the other team - such a player exists, according to the observation above, and we shall call his team "first" and the other team "second" in the sequel. Mark this player with a white hat and remove from further consideration all those players of the second team who lost their games to him. Applying the same observation to the first team (complete) and the second team truncated as explained above, we again find a player (in the first or in the second team) who won with at least half of the other team members. Mark him with a white hat, too, and remove the players who lost to him from further consideration.

We repeat this procedure until there are no players left in one of the teams; say, in team $Y$. This means that the white-hatted players of team $X$ constitute a group with the required property (every member of team $Y$ has lost his game to at least one player from that group). Each time when a player of team $X$ was receiving a white hat, the size of team $Y$ was reduced at least by half; and since initially the size was a number less than $2^{10}$, this could not happen more than ten times.

Hence the white-hatted group from team $X$ consists of not more than ten players. If there are fewer than ten, round the group up to ten with any players.


problem:
We say that an integer $m$ covers the number 1998 if $1,9,9,8$ appear in this order as digits of $m$. (For instance, 1998 is covered by 215993698 but not by 213326798 .) Let $k(n)$ be the number of positive integers that cover 1998 and have exactly $n$ digits $(n \geqslant 5)$, all different from 0 . What is the remainder of $k(n)$ in division by 8 ?

## Solutions

solution:
Answer: 1.

Let $1 \leqslant g<h<i<j \leqslant n$ be fixed integers. Consider all $n$-digit numbers $a=\overline{a_{1} a_{2} \ldots a_{n}}$ with all digits non-zero, such that $a_{g}=1, a_{h}=9, a_{i}=9$, $a_{j}=8$ and this quadruple 1998 is the leftmost one in $a$; that is,

$$
\begin{cases}a_{l} \neq 1 & \text { if } l<g ; \\ a_{l} \neq 9 & \text { if } g<l<h ; \\ a_{l} \neq 9 & \text { if } h<l<i \\ a_{l} \neq 8 & \text { if } i<l<j\end{cases}
$$

There are $k_{g h i j}(n)=8^{g-1} \cdot 8^{h-g-1} \cdot 8^{i-h-1} \cdot 8^{j-i-1} \cdot 9^{n-j}$ such numbers $a$. Obviously, $k_{g h i j}(n) \equiv 1(\bmod 8)$ for $g=1, h=2, i=3, j=4$, and $k_{g h i j}(n) \equiv 0(\bmod 8)$ in all other cases. Since $k(n)$ is obtained by summing up the values of $k_{g h i j}(n)$ over all possible choicecs of $g, h, i, j$, the remainder we are looking for is 1 .