exam: BalticWay

problem:
Determine all real numbers $a, b, c, d$ that satisfy the following system of equations.

$$
\left\{\begin{array}{r}
a b c+a b+b c+c a+a+b+c=1 \\
b c d+b c+c d+d b+b+c+d=9 \\
c d a+c d+d a+a c+c+d+a=9 \\
d a b+d a+a b+b d+d+a+b=9
\end{array}\right.
$$

solution:
Answer: $a=b=c=\sqrt[3]{2}-1, d=5 \sqrt[3]{2}-1$.

Substituting $A=a+1, B=b+1, C=c+1, D=d+1$, we obtain

$$
\begin{aligned}
& A B C=2 \\
& B C D=10 \\
& C D A=10 \\
& D A B=10
\end{aligned}
$$

Multiplying (1), (2), (3) gives $C^{3}(A B D)^{2}=200$, which together with (4) implies $C^{3}=2$. Similarly we find $A^{3}=B^{3}=2$ and $D^{3}=250$. Therefore the only solution is $a=b=c=\sqrt[3]{2}-1, d=5 \sqrt[3]{2}-1$.


problem: Determine all positive integers $n$ with the property that the third root of $n$ is obtained by removing the last three decimal digits of $n$.

solution:
Answer: 32768 is the only such integer.

If $n=m^{3}$ is a solution, then $m$ satisfies $1000 m \leqslant m^{3}<1000(m+1)$. From the first inequality, we get $m^{2} \geqslant 1000$, or $m \geqslant 32$. By the second inequality, we then have

$$
m^{2}<1000 \cdot \frac{m+1}{m} \leqslant 1000 \cdot \frac{33}{32}=1000+\frac{1000}{32} \leqslant 1032,
$$

or $m \leqslant 32$. Hence, $m=32$ and $n=m^{3}=32768$ is the only solution.


problem:
Determine all positive integers $n \geqslant 3$ such that the inequality

$$
a_{1} a_{2}+a_{2} a_{3}+\cdots+a_{n-1} a_{n}+a_{n} a_{1} \leqslant 0
$$

holds for all real numbers $a_{1}, a_{2}, \ldots, a_{n}$ which satisfy $a_{1}+\cdots+a_{n}=0$.

solution:
Answer: $n=3$ and $n=4$.

For $n=3$ we have

$$
\begin{aligned}
& a_{1} a_{2}+a_{2} a_{3}+a_{3} a_{1}=\frac{\left(a_{1}+a_{2}+a_{3}\right)^{2}-\left(a_{1}^{2}+a_{2}^{3}+a_{3}^{2}\right)}{2} \leqslant \\
& \quad \leqslant \frac{\left(a_{1}+a_{2}+a_{3}\right)^{2}}{2}=0 .
\end{aligned}
$$

For $n=4$, applying the AM-GM inequality we have

$$
\begin{aligned}
& a_{1} a_{2}+a_{2} a_{3}+a_{3} a_{4}+a_{4} a_{1}=\left(a_{1}+a_{3}\right)\left(a_{2}+a_{4}\right) \leqslant \\
& \\
& \leqslant \frac{\left(a_{1}+a_{2}+a_{3}+a_{4}\right)^{2}}{4}=0 .
\end{aligned}
$$

For $n \geqslant 5$ take $a_{1}=-1, a_{2}=-2, a_{3}=a_{4}=\cdots=a_{n-2}=0, a_{n-1}=2$, $a_{n}=1$. This gives

$$
a_{1} a_{2}+a_{2} a_{3}+\ldots+a_{n-1} a_{n}+a_{n} a_{1}=2+2-1=3>0 .
$$


problem:
For all positive real numbers $x$ and $y$ let

$$
f(x, y)=\min \left(x, \frac{y}{x^{2}+y^{2}}\right) .
$$

Show that there exist $x_{0}$ and $y_{0}$ such that $f(x, y) \leqslant f\left(x_{0}, y_{0}\right)$ for all positive $x$ and $y$, and find $f\left(x_{0}, y_{0}\right)$.

solution:
Answer: the maximum value is $f\left(\frac{1}{\sqrt{2}}, \frac{1}{\sqrt{2}}\right)=\frac{1}{\sqrt{2}}$.

We shall make use of the inequality $x^{2}+y^{2} \geqslant 2 x y$. If $x \leqslant \frac{y}{x^{2}+y^{2}}$, then

$$
x \leqslant \frac{y}{x^{2}+y^{2}} \leqslant \frac{y}{2 x y}=\frac{1}{2 x},
$$

implying $x \leqslant \frac{1}{\sqrt{2}}$, and the equality holds if and only if $x=y=\frac{1}{\sqrt{2}}$.

If $x>\frac{1}{\sqrt{2}}$, then

$$
\frac{y}{x^{2}+y^{2}} \leqslant \frac{y}{2 x y}=\frac{1}{2 x}<\frac{1}{\sqrt{2}} .
$$

Hence always at least one of $x$ and $\frac{y}{x^{2}+y^{2}}$ does not exceed $\frac{1}{\sqrt{2}}$. Consequently $f(x, y) \leqslant \frac{1}{\sqrt{2}}$, with an equality if and only if $x=y=\frac{1}{\sqrt{2}}$.


problem: The point $(a, b)$ lies on the circle $x^{2}+y^{2}=1$. The tangent to the circle at this point meets the parabola $y=x^{2}+1$ at exactly one point. Find all such points $(a, b)$.

solution:
Answer: $(-1,0),(1,0),(0,1),\left(-\frac{2 \sqrt{6}}{5},-\frac{1}{5}\right),\left(\frac{2 \sqrt{6}}{5},-\frac{1}{5}\right)$.

Since any non-vertical line intersecting the parabola $y=x^{2}+1$ has exactly two intersection points with it, the line mentioned in the problem must be either vertical or a common tangent to the circle and the parabola. The only vertical lines with the required property are the lines $x=1$ and $x=-1$, which meet the circle in the points $(1,0)$ and $(-1,0)$, respectively.

Now, consider a line $y=k x+l$. It touches the circle if and only if the system of equations

$$
\left\{\begin{array}{l}
x^{2}+y^{2}=1 \\
y=k x+l
\end{array}\right.
$$

has a unique solution, or equivalently the equation $x^{2}+(k x+l)^{2}=1$ has unique solution, i.e. if and only if

$$
D_{1}=4 k^{2} l^{2}-4\left(1+k^{2}\right)\left(l^{2}-1\right)=4\left(k^{2}-l^{2}+1\right)=0 \text {, }
$$

or $l^{2}-k^{2}=1$. The line is tangent to the parabola if and only if the system

$$
\left\{\begin{array}{l}
y=x^{2}+1 \\
y=k x+l
\end{array}\right.
$$

has a unique solution, or equivalently the equation $x^{2}=k x+l-1$ has unique solution, i.e. if and only if

$$
D_{2}=k^{2}-4(1-l)=k^{2}+4 l-4=0 \text {. }
$$

From the system of equations

$$
\left\{\begin{array}{l}
l^{2}-k^{2}=1 \\
k^{2}+4 l-4=0
\end{array}\right.
$$

we have $l^{2}+4 l-5=0$, which has two solutions $l=1$ and $l=-5$. Hence the last system of equations has the solutions $k=0, l=1$ and $k= \pm 2 \sqrt{6}$, $l=-5$. From (5) we now have $(0,1)$ and $\left( \pm \frac{2 \sqrt{6}}{5},-\frac{1}{5}\right)$ as the possible points of tangency on the circle.


problem: What is the least number of moves it takes a knight to get from one corner of an $n \times n$ chessboard, where $n \geqslant 4$, to the diagonally opposite corner?

solution:
Answer: $2 \cdot\left\lfloor\frac{n+1}{3}\right\rfloor$.

Label the squares by pairs of integers $(x, y), x, y=1, \ldots, n$, and consider a sequence of moves that takes the knight from square $(1,1)$ to square $(n, n)$.

The total increment of $x+y$ is $2(n-1)$, and the maximal increment in each move is 3 . Furthermore, the parity of $x+y$ shifts in each move, and $1+1$ and $n+n$ are both even. Hence, the number of moves is even and larger than or equal to $\frac{2 \cdot(n-1)}{3}$. If $N=2 m$ is the least integer that satisfies these conditions, then $m$ is the least integer that satisfies $m \geqslant \frac{n-1}{3}$, i.e. $m=\left\lfloor\frac{n+1}{3}\right\rfloor$.

![](https://cdn.mathpix.com/cropped/2024_04_17_4295e1732196be96a5e3g-06.jpg?height=254&width=246&top_left_y=1342&top_left_x=190)

$n=4$

![](https://cdn.mathpix.com/cropped/2024_04_17_4295e1732196be96a5e3g-06.jpg?height=309&width=310&top_left_y=1286&top_left_x=543)

$n=5$

![](https://cdn.mathpix.com/cropped/2024_04_17_4295e1732196be96a5e3g-06.jpg?height=371&width=375&top_left_y=1225&top_left_x=918)

$n=6$

Figure 1

For $n=4, n=5$ and $n=6$ the sequences of moves are easily found that take the knight from square $(1,1)$ to square $(n, n)$ in 2,4 and 4 moves,
respectively (see Figure 1). In particular, the knight may get from square $(k, k)$ to square $(k+3, k+3)$ in 2 moves. Hence, by simple induction, for any $n$ the knight can get from square $(1,1)$ to square $(n, n)$ in a number of moves equal to twice the integer part of $\frac{n+1}{3}$, which is the minimal possible number of moves.


problem:
Two squares on an $8 \times 8$ chessboard are called adjacent if they have a common edge or common corner. Is it possible for a king to begin in some
square and visit all squares exactly once in such a way that all moves except the first are made into squares adjacent to an even number of squares already visited?

solution:
Answer: No, it is not possible.

Consider the set $S$ of all (non-ordered) pairs of adjacent squares. Call an element of $S$ treated if the king has visited both its squares. After the first move there is one treated pair. Each subsequent move creates a further even number of treated pairs. So after each move the total number of treated pairs is odd. If the king could complete his tour then the total number of pairs of adjacent squares (i.e. the number of elements of $S$ ) would have to be odd. But the number of elements of $S$ is even as can be seen by the following argument. Rotation by 180 degrees around the centre of the board induces a bijection of $S$ onto itself. This bijection leaves precisely two pairs fixed, namely the pairs of squares sharing only a common corner at the middle of the board. It follows that the number of elements of $S$ is even.


problem: We are given 1999 coins. No two coins have the same weight. A machine is provided which allows us with one operation to determine, for any three coins, which one has the middle weight. Prove that the coin that is the 1000 -th by weight can be determined using no more than 1000000 operations and that this is the only coin whose position by weight can be determined using this machine.

solution:
It is possible to find the 1000 -th coin (i.e. the medium one among the 1999 coins). First we exclude the lightest and heaviest coin - for this we use 1997 weighings, putting the medium-weighted coin aside each time. Next we exclude the 2 -nd and 1998 -th coins using 1995 weighings, etc. In total we need

$$
1997+1995+1993+\ldots+3+1=999 \cdot 999<1000000
$$

weighings to determine the 1000 -th coin in such a way.

It is not possible to determine the position by weight of any other coin, since we cannot distinguish between the $k$-th and $(2000-k)$-th coin. To prove this, label the coins in some order as $a_{1}, a_{2}, \ldots, a_{1999}$. If a procedure for finding the $k$-th coin exists then it should work as follows. First we choose some three coins $a_{i_{1}}, a_{j_{1}}, a_{k_{1}}$, find the medium-weighted one among them, then choose again some three coins $a_{i_{2}}, a_{j_{2}}, a_{k_{2}}$ (possibly using the information obtained from the previous weighing) etc. The results of these
weighings can be written in a table like this:

| Coin 1 | Coin 2 | Coin 3 | Medium |
| :---: | :---: | :---: | :---: |
| $a_{i_{1}}$ | $a_{j_{1}}$ | $a_{k_{1}}$ | $a_{m_{1}}$ |
| $a_{i_{2}}$ | $a_{j_{2}}$ | $a_{k_{2}}$ | $a_{m_{2}}$ |
| $\ldots$ | $\ldots$ | $\ldots$ | $\ldots$ |
| $a_{i_{n}}$ | $a_{j_{n}}$ | $a_{k_{n}}$ | $a_{m_{n}}$ |

Suppose we make a decision " $a_{k}$ is the $k$-th coin" based on this table. Now let us exchange labels of the lightest and the heaviest coins, of the 2-nd and 1998 -th (by weight) coins etc. It is easy to see that, after this relabeling, each step in the procedure above gives the same result as before - but if $a_{k}$ was previously the $k$-th coin by weight, then now it is the $(2000-k)$-th coin, so the procedure yields a wrong coin which gives us the contradiction.


problem: A cube with edge length 3 is divided into 27 unit cubes. The numbers $1,2, \ldots, 27$ are distributed arbitrarily over the unit cubes, with one number in each cube. We form the 27 possible row sums (there are nine such sums of three integers for each of the three directions parallel to the edges of the cube). At most how many of the 27 row sums can be odd?

solution:
Answer: 24.

Since each unit cube contributes to exactly three of the row sums, then the total of all the 27 row sums is $3 \cdot(1+2+\ldots+27)=3 \cdot 14 \cdot 27$, which is even. Hence there must be an even number of odd row sums.

![](https://cdn.mathpix.com/cropped/2024_04_17_4295e1732196be96a5e3g-08.jpg?height=144&width=149&top_left_y=1062&top_left_x=210)

(a)

![](https://cdn.mathpix.com/cropped/2024_04_17_4295e1732196be96a5e3g-08.jpg?height=148&width=149&top_left_y=1060&top_left_x=414)

(b)

![](https://cdn.mathpix.com/cropped/2024_04_17_4295e1732196be96a5e3g-08.jpg?height=144&width=147&top_left_y=1062&top_left_x=689)

I

![](https://cdn.mathpix.com/cropped/2024_04_17_4295e1732196be96a5e3g-08.jpg?height=144&width=145&top_left_y=1062&top_left_x=888)

II

![](https://cdn.mathpix.com/cropped/2024_04_17_4295e1732196be96a5e3g-08.jpg?height=146&width=148&top_left_y=1061&top_left_x=1080)

III

Figure 2

Figure 3

We shall prove that if one of the three levels of the cube (in any given direction) contains an even row sum, then there is another even row sum within that same level - hence there cannot be 26 odd row sums. Indeed, if this even row sum is formed by three even numbers (case (a) on Figure 2, where + denotes an even number and - denotes an odd number), then in order not to have even column sums (i.e. row sums in the perpendicular direction), we must have another even number in each of the three columns. But then the two remaining rows contain three even and three odd numbers, and hence their row sums cannot both be odd. Consider now the other case when the even row sum is formed by one even number and two odd numbers (case (b) on Figure 2). In order not to have even column sums, the column
containing the even number must contain another even number and an odd number, and each of the other two columns must have two numbers of the same parity. Hence the two other row sums have different parity, and one of them must be even.

It remains to notice that we can achieve 24 odd row sums (see Figure 3, where the three levels of the cube are shown).


problem: Can the points of a disc of radius 1 (including its circumference) be partitioned into three subsets in such a way that no subset contains two points separated by distance 1 ?

solution:
Answer: no.

Let $O$ denote the centre of the disc, and $P_{1}, \ldots, P_{6}$ the vertices of an inscribed regular hexagon in the natural order (see Figure 4).

If the required partitioning exists, then $\{O\},\left\{P_{1}, P_{3}, P_{5}\right\}$ and $\left\{P_{2}, P_{4}, P_{6}\right\}$ are contained in different subsets. Now consider the circles of radius 1 centered in $P_{1}, P_{3}$ and $P_{5}$. The circle of radius $1 / \sqrt{3}$ centered in $O$ intersects these three circles in the vertices $A_{1}, A_{2}, A_{3}$ of an equilateral triangle of side length 1 . The vertices of this triangle belong to different subsets, but none of them can belong to the same subset as $P_{1}$ - a contradiction. Hence the required partitioning does not exist.

![](https://cdn.mathpix.com/cropped/2024_04_17_4295e1732196be96a5e3g-09.jpg?height=511&width=484&top_left_y=975&top_left_x=323)

Figure 4


problem: Prove that for any four points in the plane, no three of which are collinear, there exists a circle such that three of the four points are on the circumference and the fourth point is either on the circumference or inside the circle.

solution:
Consider a circle containing all these four points in its interior. First, decrease its radius until at least one of these points (say, $A$ ) will be on the circle. If the other three points are still in the interior of the circle, then rotate the circle around $A$ (with its radius unchanged) until at least one of the other three points (say, $B$ ) will also be on the circle. The centre of the circle now lies on the perpendicular bisector of the segment $A B$ - moving
the centre along that perpendicular bisector (and changing its radius at the same time, so that points $A$ and $B$ remain on the circle) we arrive at a situation where at least one of the remaining two points will also be on the circle (see Figure 5).

![](https://cdn.mathpix.com/cropped/2024_04_17_4295e1732196be96a5e3g-10.jpg?height=343&width=1037&top_left_y=399&top_left_x=210)

Figure 5

Alternative solution. The quadrangle with its vertices in the four points can be convex or non-convex.

If the quadrangle is non-convex, then one of the points lies in the interior of the triangle defined by the remaining three points (see Figure 6) - the circumcircle of that triangle has the required property.

![](https://cdn.mathpix.com/cropped/2024_04_17_4295e1732196be96a5e3g-10.jpg?height=419&width=397&top_left_y=1096&top_left_x=221)

Figure 6

![](https://cdn.mathpix.com/cropped/2024_04_17_4295e1732196be96a5e3g-10.jpg?height=419&width=469&top_left_y=1098&top_left_x=740)

Figure 7

Assume now that the quadrangle $A B C D$ (where $A, B, C, D$ are the four points) is convex. Then it has a pair of opposite angles, the sum of which is at least $180^{\circ}$ - assume these are at vertices $B$ and $D$ (see Figure 7). We shall prove that point $D$ lies either in the interior of the circumcircle of triangle $A B C$ or on that circle. Indeed, let the ray drawn from the
circumcentre $O$ of triangle $A B C$ through point $D$ intersect the circumcircle in $D^{\prime}$ : since $\angle B+\angle D^{\prime}=180^{\circ}$ and $\angle B+\angle D \geqslant 180^{\circ}$, then $D$ cannot lie in the exterior of the circumcircle.


problem: In a triangle $A B C$ it is given that $2|A B|=|A C|+|B C|$. Prove that the incentre of $A B C$, the circumcentre of $A B C$, and the midpoints of $A C$ and $B C$ are concyclic.

solution:
Let $N$ be the midpoint of $B C$ and $M$ the midpoint of $A C$. Let $O$ be the circumcentre of $A B C$ and $I$ its incentre (see Figure 8). Since $\angle C M O=\angle C N O=90^{\circ}$, the points $C, N, O$ and $M$ are concyclic (regardless of whether $O$ lies inside the triangle $A B C$ ). We now have to show that the points $C, N, I$ and $M$ are also concyclic, i.e $I$ lies on the same circle as $C, N, O$ and $M$. It will be sufficient to show that $\angle N C M+\angle N I M=180^{\circ}$ in the quadrilateral $C N I M$. Since

$$
|A B|=\frac{|A C|+|B C|}{2}=|A M|+|B N|
$$

we can choose a point $D$ on the side $A B$ such that $|A D|=|A M|$ and $|B D|=|B N|$. Then triangle $A I M$ is congruent to triangle $A I D$, and similarly triangle $B I N$ is congruent to triangle $B I D$. Therefore

$$
\begin{aligned}
\angle N C M+\angle N I M & =\angle N C M+\left(360^{\circ}-2 \angle A I D-2 \angle B I D\right)= \\
& =\angle B C A+360^{\circ}-2 \angle A I B= \\
& =\angle B C A+360^{\circ}-2 \cdot\left(180^{\circ}-\frac{\angle B A C}{2}-\frac{\angle A B C}{2}\right)= \\
& =\angle B C A+\angle A B C+\angle C A B=180^{\circ} .
\end{aligned}
$$

![](https://cdn.mathpix.com/cropped/2024_04_17_4295e1732196be96a5e3g-11.jpg?height=433&width=516&top_left_y=1212&top_left_x=210)

Figure 8

![](https://cdn.mathpix.com/cropped/2024_04_17_4295e1732196be96a5e3g-11.jpg?height=476&width=489&top_left_y=1213&top_left_x=738)

Figure 9

Alternative solution. Let $O$ be the circumcentre of $A B C$ and $I$ its in-
centre, and let $G, H$ and $K$ be the points where the incircle touches the sides $B C, A C$ and $A B$ of the triangle, respectively. Also, let $N$ be the midpoint of $B C$ and $M$ the midpoint of $A C$ (see Figure 9). Since $\angle C M O=\angle C N O=90^{\circ}$, points $M$ and $N$ lie on the circle with diameter $O C$. We will show that point $I$ also lies on that circle. Indeed, we have

$$
|A H|+|B G|=|A K|+|B K|=|A B|=\frac{|A C|+|B C|}{2}=|A M|+|B N|,
$$

implying $|M H|=|N G|$. Since $M H$ and $N G$ are the perpendicular projections of $O I$ to the lines $A C$ and $B C$, respectively, then $I O$ must be either parallel or perpendicular to the bisector $C I$ of angle $A C B$. (To formally prove this, consider unit vectors $\overrightarrow{e_{1}}$ and $\overrightarrow{e_{2}}$ defined by the rays $C A$ and $C B$, and show that the condition $|M H|=|N G|$ is equivalent to $\left(\overrightarrow{e_{1}} \pm \overrightarrow{e_{2}}\right) \cdot \overrightarrow{I O}=0$.)

If $I O$ is perpendicular to $C I$, then $\angle C I O=90^{\circ}$ and we are done. If $I O$ is parallel to $C I$, the the circumcentre $O$ of triangle $A B C$ lies on the bisector $C I$ of angle $A C B$, whence $|A C|=|B C|$ and the condition $2|A B|=|A C|+|B C|$ implies that $A B C$ is an equilateral triangle. Hence in this case points $O$ and $I$ coincide and the claim of the problem holds trivially.

## 13. Answer: $60^{\circ}$.

Let $F$ be the point of the side $A B$ such that $|A F|=|A E|$ and $|B F|=|B D|$ (see Figure 10). The line $A D$ is the angle bisector of $\angle A$ in the isosceles triangle $A E F$. This implies that $A D$ is the perpendicular bisector of $E F$, whence $|D E|=|D F|$. Similarly we show that $|D E|=|E F|$. This proves that the triangle $D E F$ is equilateral, i.e. $\angle E F D=60^{\circ}$. Hence $\angle A F E+\angle B F D=120^{\circ}$, and also $\angle A E F+\angle B D F=120^{\circ}$. Thus $\angle C A B+\angle C B A=120^{\circ}$ and finally $\angle C=60^{\circ}$.

Alternative solution. Let $I$ be the incenter of triangle $A B C$, and let $G$, $H, K$ be the points where its incircle touches the sides $B C, A C, A B$ respectively (see Figure 11). Then

$$
|A E|+|B D|=|A B|=|A K|+|B K|=|A H|+|B G| \text {, }
$$

implying $|D G|=|E H|$. Hence the triangles $D I G$ ja $E I H$ are congruent,
and

$\angle D I E=\angle G I H=180^{\circ}-\angle C$.

![](https://cdn.mathpix.com/cropped/2024_04_17_4295e1732196be96a5e3g-13.jpg?height=432&width=492&top_left_y=325&top_left_x=220)

Figure 10

![](https://cdn.mathpix.com/cropped/2024_04_17_4295e1732196be96a5e3g-13.jpg?height=434&width=491&top_left_y=324&top_left_x=735)

Figure 11

On the other hand,

$$
\angle D I E=\angle A I B=180^{\circ}-\frac{\angle A+\angle B}{2} .
$$

Hence

$$
\angle C=\frac{\angle A+\angle B}{2}=90^{\circ}-\frac{\angle C}{2}
$$

which gives $\angle C=60^{\circ}$.


problem:
Let $A B C$ be an isosceles triangle with $|A B|=|A C|$. Points $D$ and $E$ lie on the sides $A B$ and $A C$, respectively. The line passing through $B$ and parallel to $A C$ meets the line $D E$ at $F$. The line passing through $C$ and parallel to $A B$ meets the line $D E$ at $G$. Prove that

$$
\frac{[D B C G]}{[F B C E]}=\frac{|A D|}{|A E|}
$$

where $[P Q R S]$ denotes the area of the quadrilateral $P Q R S$.

solution:
The quadrilaterals $D B C G$ and $F B C E$ are trapeziums. The area of a trapezium is equal to half the sum of the lengths of the parallel sides multiplied by the distance between them. But the distance between the parallel sides is the same for both of these trapeziums, since the distance from $B$ to $A C$ is equal to the distance from $C$ to $A B$. It therefore suffices to show that

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

(see Figure 12). Now, since the triangles $B D F, A D E$ and $C G E$ are similar, we have

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

which implies the required equality.

![](https://cdn.mathpix.com/cropped/2024_04_17_4295e1732196be96a5e3g-14.jpg?height=412&width=389&top_left_y=274&top_left_x=209)

Figure 12

![](https://cdn.mathpix.com/cropped/2024_04_17_4295e1732196be96a5e3g-14.jpg?height=426&width=607&top_left_y=257&top_left_x=699)

Figure 13

Alternative solution. As in the first solution, we need to show that

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

Let $M$ be the midpoint of $B C$, and let $F^{\prime}$ and $G^{\prime}$ be the points symmetric to $F$ and $G$, respectively, relative to $M$ (see Figure 13). Since $C G$ is parallel to $A B$, then point $G^{\prime}$ lies on the line $A B$, and $\left|B G^{\prime}\right|=|C G|$. Similarly point $F^{\prime}$ lies on the line $A C$, and $\left|C F^{\prime}\right|=|B F|$. It remains to show that

$$
\frac{\left|D G^{\prime}\right|}{\left|E F^{\prime}\right|}=\frac{|A D|}{|A E|}
$$

which follows from $D E$ and $F^{\prime} G^{\prime}$ being parallel.

Another solution. Express the areas of the quadrilaterals as

$$
[D B C G]=[A B C]-[A D E]+[E C G]
$$

and

$$
[F B C E]=[A B C]-[A D E]+[D B F]
$$

The required equality can now be proved by direct computation.


problem: Let $A B C$ be a triangle with $\angle C=60^{\circ}$ and $|A C|<|B C|$. The point $D$ lies on the side $B C$ and satisfies $|B D|=|A C|$. The side $A C$ is extended to the point $E$ where $|A C|=|C E|$. Prove that $|A B|=|D E|$.

solution:
Consider a point $F$ on $B C$ such that $|C F|=|B D|$ (see Figure 14). Since $\angle A C F=60^{\circ}$, triangle $A C F$ is equilateral. Therefore $|A F|=|A C|=|C E|$
and $\angle A F B=\angle E C D=120^{\circ}$. Moreover, $|B F|=|C D|$. This implies that triangles $A F B$ and $E C D$ are congruent, and $|A B|=|D E|$.

![](https://cdn.mathpix.com/cropped/2024_04_17_4295e1732196be96a5e3g-15.jpg?height=444&width=538&top_left_y=311&top_left_x=320)

Figure 14

Alternative solution. The cosine law in triangle $A B C$ implies

$$
\begin{aligned}
|A B|^{2} & =|A C|^{2}+|B C|^{2}-2 \cdot|A C| \cdot|B C| \cdot \cos \angle A C B= \\
& =|A C|^{2}+|B C|^{2}-|A C| \cdot|B C|= \\
& =|A C|^{2}+(|B D|+|D C|)^{2}-|A C| \cdot(|B D|+|D C|)= \\
& =|A C|^{2}+(|A C|+|D C|)^{2}-|A C| \cdot(|A C|+|D C|)= \\
& =|A C|^{2}+|D C|^{2}+|A C| \cdot|D C|
\end{aligned}
$$

On the other hand, the cosine law in triangle $C D E$ gives

$$
\begin{aligned}
|D E|^{2} & =|D C|^{2}+|C E|^{2}-2 \cdot|D C| \cdot|C E| \cdot \cos \angle D C E= \\
& =|D C|^{2}+|C E|^{2}+|D C| \cdot|E C|= \\
& =|D C|^{2}+|A C|^{2}+|D C| \cdot|A C| .
\end{aligned}
$$

Hence $|A B|=|D E|$.


problem: Find the smallest positive integer $k$ which is representable in the form $k=19^{n}-5^{m}$ for some positive integers $m$ and $n$.

solution:
Answer: 14.

Assume that there are integers $n, m$ such that $k=19^{n}-5^{m}$ is a positive integer smaller than $19^{1}-5^{1}=14$. For obvious reasons, $n$ and $m$ must be positive.

Case 1: Assume that $n$ is even. Then the last digit of $k$ is 6 . Consequently, we have $19^{n}-5^{m}=6$. Considering this equation modulo 3 implies that $m$
must be even as well. With $n=2 n^{\prime}$ and $m=2 m^{\prime}$ the above equation can be restated as $\left(19^{n^{\prime}}+5^{m^{\prime}}\right)\left(19^{n^{\prime}}-5^{m^{\prime}}\right)=6$ which evidently has no solution in positive integers.

Case 2: Assume that $n$ is odd. Then the last digit of $k$ is 4 . Consequently, we have $19^{n}-5^{m}=4$. On the other hand, the remainder of $19^{n}-5^{m}$ modulo 3 is never 1 , a contradiction.


problem: Does there exist a finite sequence of integers $c_{1}, \ldots, c_{n}$ such that all the numbers $a+c_{1}, \ldots, a+c_{n}$ are primes for more than one but not infinitely many different integers $a$ ?

solution:
Answer: yes.

Let $n=5$ and consider the integers $0,2,8,14,26$. Adding $a=3$ or $a=5$ to all of these integers we get primes. Since the numbers $0,2,8,14$ and 26 have pairwise different remainders modulo 5 then for any integer $a$ the numbers $a+0, a+2, a+8, a+14$ and $a+26$ have also pairwise different remainders modulo 5 ; therefore one of them is divisible by 5 . Hence if the numbers $a+0, a+2, a+8, a+14$ and $a+26$ are all primes then one of them must be equal to 5 , which is only true for $a=3$ and $a=5$.


problem: Let $m$ be a positive integer such that $m \equiv 2(\bmod 4)$. Show that there exists at most one factorization $m=a b$ where $a$ and $b$ are positive integers satisfying $0<a-b<\sqrt{5+4 \sqrt{4 m+1}}$.

solution:
Squaring the second inequality gives $(a-b)^{2}<5+4 \sqrt{4 m+1}$. Since $m=a b$, we have

$$
(a+b)^{2}<5+4 \sqrt{4 m+1}+4 m=(\sqrt{4 m+1}+2)^{2}
$$

implying

$$
a+b<\sqrt{4 m+1}+2 \text {. }
$$

Since $a>b$, different factorizations $m=a b$ will give different values for the sum $a+b(a b=m, a+b=k, a>b$ has at most one solution in $(a, b))$. Since $m \equiv 2(\bmod 4)$, we see that $a$ and $b$ must have different parity, and $a+b$ must be odd. Also note that

$$
a+b \geqslant 2 \sqrt{a b}=\sqrt{4 m}
$$

Since $4 m$ cannot be a square we have

$$
a+b \geqslant \sqrt{4 m+1} .
$$

Since $a+b$ is odd and the interval $[\sqrt{4 m+1}, \sqrt{4 m+1}+2)$ contains exactly one odd integer, then there can be at most one pair $(a, b)$ such that $a+b<\sqrt{4 m+1}+2$, or equivalently $a-b<\sqrt{5+4 \sqrt{4 m+1}}$.


problem: Prove that there exist infinitely many even positive integers $k$ such that for every prime $p$ the number $p^{2}+k$ is composite.

solution:
Note that the square of any prime $p \neq 3$ is congruent to 1 modulo 3 . Hence the numbers $k=6 m+2$ will have the required property for any $p \neq 3$, as
$p^{2}+k$ will be divisible by 3 and hence composite.

In order to have $3^{2}+k$ also composite, we look for such values of $m$ for which $k=6 m+2$ is congruent to 1 modulo 5 - then $3^{2}+k$ will be divisible by 5 and hence composite. Taking $m=5 t+4$, we have $k=30 t+26$, which is congruent to 2 modulo 3 and congruent to 1 modulo 5 . Hence $p^{2}+(30 t+26)$ is composite for any positive integer $t$ and prime $p$.


problem:
Let $a, b, c$ and $d$ be prime numbers such that $a>3 b>6 c>12 d$ and $a^{2}-b^{2}+c^{2}-d^{2}=1749$. Determine all possible values of $a^{2}+b^{2}+c^{2}+d^{2}$.

## Solutions

solution:
Answer: the only possible value is 1999 .

Since $a^{2}-b^{2}+c^{2}-d^{2}$ is odd, one of the primes $a, b, c$ and $d$ must be 2 , and in view of $a>3 b>6 c>12 d$ we must have $d=2$. Now

$$
1749=a^{2}-b^{2}+c^{2}-d^{2}>9 b^{2}-b^{2}+4 d^{2}-d^{2}=8 b^{2}-12,
$$

implying $b \leqslant 13$. From $4<c<\frac{b}{2}$ we now have $c=5$ and $b$ must be either 11 or 13 . It remains to check that $1749+2^{2}-5^{2}+13^{2}=1897$ is not a square of an integer, and $1749+2^{2}-5^{2}+11^{2}=1849=43^{2}$. Hence $b=11$, $a=43$ and

$$
a^{2}+b^{2}+c^{2}+d^{2}=43^{2}+11^{2}+5^{2}+2^{2}=1999
$$