exam: BalticWay

problem:
Find all triples $(x, y, z)$ of positive integers satisfying the system of equations

$$
\left\{\begin{array}{l}
x^{2}=2(y+z) \\
x^{6}=y^{6}+z^{6}+31\left(y^{2}+z^{2}\right)
\end{array}\right.
$$

solution: From the first equation it follows that $x$ is even. The second equation implies $x>y$ and $x>z$. Hence $4 x>2(y+z)=x^{2}$, and therefore $x=2$ and $y+z=2$, so $y=z=1$. It is easy to check that the triple $(2,1,1)$ satisfies the given system of equations.

solution_match: Solution.


problem: Let $a$ and $k$ be positive integers such that $a^{2}+k$ divides $(a-1) a(a+1)$. Prove that $k \geq a$.

solution: We have $(a-1) a(a+1)=a\left(a^{2}+k\right)-(k+1) a$. Hence $a^{2}+k$ divides $(k+1) a$, and thus $k+1 \geq a$, or equivalently, $k \geq a$.


problem: The positive integers $a, b, c$ are pairwise relatively prime, $a$ and $c$ are odd and the numbers satisfy the equation $a^{2}+b^{2}=c^{2}$. Prove that $b+c$ is a square of an integer.

solution: Since $a$ and $c$ are odd, $b$ must be even. We have $a^{2}=c^{2}-b^{2}=(c+b)(c-b)$. Let $d=\operatorname{gcd}(c+b, c-b)$. Then $d$ divides $(c+b)+(c-b)=2 c$ and $(c+b)-(c-b)=2 b$. Since $c+b$ and $c-b$ are odd, $d$ is odd, and hence $d$ divides both $b$ and $c$. But $b$ and $c$ are relatively prime, so $d=1$, i.e., $c+b$ and $c-b$ are also relatively prime. Since $(c+b)(c-b)=a^{2}$ is a square, it follows that $c+b$ and $c-b$ are also squares. In particular, $b+c$ is a square as required.


problem: John is older than Mary. He notices that if he switches the two digits of his age (an integer), he gets Mary's age. Moreover, the difference between the squares of their ages is the square of an integer. How old are Mary and John?

solution:
Let John's age be $10 a+b$ where $0 \leq a, b \leq 9$. Then Mary's age is $10 b+a$, and hence $a>b$. Now

$$
(10 a+b)^{2}-(10 b+a)^{2}=9 \cdot 11(a+b)(a-b) .
$$

Since this is the square of an integer, $a+b$ or $a-b$ must be divisible by 11 . The only possibility is clearly $a+b=11$. Hence $a-b$ must be a square. A case study yields the only possibility $a=6, b=5$. Thus John is 65 and Mary 56 years old.


problem: Let $a<b<c$ be three positive integers. Prove that among any $2 c$ consecutive positive integers there exist three different numbers $x, y, z$ such that $a b c$ divides $x y z$.

solution:
First we show that among any $b$ consecutive numbers there are two different numbers $x$ and $y$ such that $a b$ divides $x y$. Among the $b$ consecutive numbers there is clearly a number $x^{\prime}$ divisible by $b$, and a number $y^{\prime}$ divisible by $a$. If $x^{\prime} \neq y^{\prime}$, we can take $x=x^{\prime}$ and $y=y^{\prime}$, and we are done. Now assume that $x^{\prime}=y^{\prime}$. Then $x^{\prime}$ is divisible by $e$, the least common multiple of $a$ and $b$. Let $d=\operatorname{gcd}(a, b)$. As $a<b$, we have $d \leq \frac{1}{2} b$. Hence there is a number $z^{\prime} \neq x^{\prime}$ among the $b$ consecutive numbers such that $z^{\prime}$ is divisible by $d$. Hence $x^{\prime} z^{\prime}$ is divisible by $d e$. But $d e=a b$, so we can take $x=x^{\prime}$ and $y=z^{\prime}$.

Now divide the $2 c$ consecutive numbers into two groups of $c$ consecutive numbers. In the first group, by the above reasoning, there exist distinct numbers $x$ and $y$ such that $a b$ divides $x y$. The second group contains a number $z$ divisible by $c$. Then $a b c$ divides $x y z$.


problem:
Prove that for positive $a, b, c, d$

$$
\frac{a+c}{a+b}+\frac{b+d}{b+c}+\frac{c+a}{c+d}+\frac{d+b}{d+a} \geq 4 .
$$

solution:
The inequality between the arithmetic and harmonic mean gives

$$
\begin{aligned}
& \frac{a+c}{a+b}+\frac{c+a}{c+d} \geq \frac{4}{\frac{a+b}{a+c}+\frac{c+d}{c+a}}=4 \cdot \frac{a+c}{a+b+c+d} \\
& \frac{b+d}{b+c}+\frac{d+b}{d+a} \geq \frac{4}{\frac{b+c}{b+d}+\frac{d+a}{d+b}}=4 \cdot \frac{b+d}{a+b+c+d}
\end{aligned}
$$

and adding these inequalities yields the required inequality.


solution:
We have

$$
\begin{aligned}
\sin ^{3} 18^{\circ}+\sin ^{2} 18^{\circ} & =\sin ^{2} 18^{\circ}\left(\sin 18^{\circ}+\sin 90^{\circ}\right)=\sin ^{2} 18^{\circ} \cdot 2 \sin 54^{\circ} \cos 36^{\circ}=2 \sin ^{2} 18^{\circ} \cos ^{2} 36^{\circ} \\
& =\frac{2 \sin ^{2} 18^{\circ} \cos ^{2} 18^{\circ} \cos ^{2} 36^{\circ}}{\cos ^{2} 18^{\circ}}=\frac{\sin ^{2} 36^{\circ} \cos ^{2} 36^{\circ}}{2 \cos ^{2} 18^{\circ}}=\frac{\sin ^{2} 72^{\circ}}{8 \cos ^{2} 18^{\circ}}=\frac{1}{8} .
\end{aligned}
$$


problem: The real numbers $a, b$ and $c$ satisfy the inequalities $|a| \geq|b+c|,|b| \geq|c+a|$ and $|c| \geq|a+b|$. Prove that $a+b+c=0$.

solution:
Squaring both sides of the given inequalities we get

$$
\left\{\begin{array}{l}
a^{2} \geq(b+c)^{2} \\
b^{2} \geq(c+a)^{2} \\
c^{2} \geq(a+b)^{2}
\end{array}\right.
$$

Adding these three inequalities and rearranging, we get $(a+b+c)^{2} \leq 0$. Clearly equality must hold, and we have $a+b+c=0$.


solution:
Denote the left-hand side of the equation by $L$, and the right-hand side by $R$. Then

$$
\begin{aligned}
L & =\sum_{k=1}^{1996}(-1)^{k+1}\left(\frac{1997}{k+1}-1\right)=1997 \cdot \sum_{k=1}^{1996}(-1)^{k+1} \cdot \frac{1}{k+1}=1997 \cdot \sum_{k=1}^{1996}(-1)^{k} \cdot \frac{1}{k}+1996, \\
R & =\sum_{k=1}^{998}\left(\frac{2 k+1996}{998+k}-\frac{1997}{998+k}\right)=1996-1997 \cdot \sum_{k=1}^{998} \frac{1}{k+998} .
\end{aligned}
$$

We must verify that $\sum_{k=1}^{1996}(-1)^{k-1} \cdot \frac{1}{k}=\sum_{k=1}^{998} \frac{1}{k+998}$. But this follows from the calculation

$$
\sum_{k=1}^{1996}(-1)^{k-1} \cdot \frac{1}{k}=\sum_{k=1}^{1996} \frac{1}{k}-2 \cdot \sum_{k=1}^{998} \frac{1}{2 k}=\sum_{k=1}^{998} \frac{1}{k+998}
$$


problem:
Find all real-valued functions $f$ defined on the set of all non-zero real numbers such that:

(i) $f(1)=1$,

(ii) $f\left(\frac{1}{x+y}\right)=f\left(\frac{1}{x}\right)+f\left(\frac{1}{y}\right)$ for all non-zero $x, y, x+y$,

(iii) $(x+y) f(x+y)=x y f(x) f(y)$ for all non-zero $x, y, x+y$.

solution:
Substituting $x=y=\frac{1}{2} z$ in (ii) we get

$$
f\left(\frac{1}{z}\right)=2 f\left(\frac{2}{z}\right)
$$

for all $z \neq 0$. Substituting $x=y=\frac{1}{z}$ in (iii) yields

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

for all $z \neq 0$, and hence

$$
2 f\left(\frac{2}{z}\right)=\frac{1}{z}\left(f\left(\frac{1}{z}\right)\right)^{2} .
$$

From (1) and (2) we get

$$
f\left(\frac{1}{z}\right)=\frac{1}{z}\left(f\left(\frac{1}{z}\right)\right)^{2},
$$

or, equivalently,

$$
f(x)=x(f(x))^{2}
$$

for all $x \neq 0$. If $f(x)=0$ for some $x$, then by (iii) we would have

$$
f(1)=(x+(1-x)) f(x+(1-x))=(1-x) f(x) f(1-x)=0
$$

which contradicts the condition (i). Hence $f(x) \neq 0$ for all $x$, and (3) implies $x f(x)=1$ for all $x$, and thus $f(x)=\frac{1}{x}$. It is easily verified that this function satisfies the given conditions.


problem: In how many ways can the set of integers $\{1,2, \ldots, 1995\}$ be partitioned into three nonempty sets so that none of these sets contains two consecutive integers?

solution: We construct the three subsets by adding the numbers successively, and disregard at first the condition that the sets must be non-empty. The numbers 1 and 2 must belong to two different subsets, say $A$ and $B$. We then have two choices for each of the numbers $3,4, \ldots, 1995$, and different choices lead to different partitions. Hence there are $2^{1993}$ such partitions, one of which has an empty part. The number of partitions satisfying the requirements of the problem is therefore $2^{1993}-1$.


problem: Assume we have 95 boxes and 19 balls distributed in these boxes in an arbitrary manner. We take six new balls at a time and place them in six of the boxes, one ball in each of the six. Can we, by repeating this process a suitable number of times, achieve a situation in which each of the 95 boxes contains an equal number of balls?

solution: Since $6 \cdot 16=96$, we can put 16 times 6 balls in the boxes so that the number of balls in one of the boxes increases by two, while in all other boxes it increases by one. Repeating this procedure, we can either diminish the difference between the number of balls in the box which has most balls and the number of balls in the box with the least number of balls, or diminish the number of boxes having the least number of balls, until all boxes have the same number of balls.


problem: Consider the following two person game. A number of pebbles are situated on the table. Two players make their moves alternately. A move consists of taking off the table $x$ pebbles where $x$ is the square of any positive integer. The player who is unable to make a move loses. Prove that there are infinitely many initial situations in which the second player can win no matter how his opponent plays.

solution: Suppose that there is an $n$ such that the first player always wins if there are initially more than $n$ pebbles. Consider the initial situation with $n^{2}+n+1$ pebbles. Since $(n+1)^{2}>n^{2}+n+1$, the first player can take at most $n^{2}$ pebbles, leaving at least $n+1$ pebbles on the table. By the assumption, the second player now wins. This contradiction proves that there are infinitely many situations in which the second player wins no matter how the first player plays.


problem:
There are $n$ fleas on an infinite sheet of triangulated paper. Initially the fleas are in different small triangles, all of which are inside some equilateral triangle consisting of $n^{2}$ small triangles (see Figure 1 for a possible initial configuration with $n=5$ ). Once a second each flea jumps from its triangle to one of the three small triangles as indicated in the figure. For which positive integers $n$ does there exist an initial configuration such that after a finite number of jumps all the $n$ fleas can meet in a single small triangle?

![](https://cdn.mathpix.com/cropped/2024_04_17_e0eeca76de2a70e8352dg-3.jpg?height=571&width=751&top_left_y=2076&top_left_x=664)

Figure 1

solution:
The small triangles can be coloured in four colours as shown in Figure 2. Then each flea can only reach triangles of a single colour. Moreover, number the horizontal rows are numbered as in Figure 2, and note that with each move a flea jumps from a triangle in an even-numbered row to a triangle in an odd-numbered row, or vice versa. Hence, if all the fleas are to meet in one small triangle, then they must initially be located in triangles of the same colour and in rows of the same parity. On the other hand, if these conditions are met, then the fleas can end up all in some designated triangle (of the right colour and parity). When a flea reaches this triangle, it can jump back and forth between the designated triangle and one of its neighbours until the other fleas arrive.

It remains to find the values of $n$ for which the big triangle contains at least $n$ small triangles of one colour, in rows of the same parity. For any odd $n$ there are at least $1+2+\cdots+\frac{n+1}{2}=\frac{1}{8}\left(n^{2}+4 n+3\right) \geq n$ such triangles. For even $n \geq 6$ we also have at least $1+2+\cdots+\frac{n}{2}=\frac{1}{8}\left(n^{2}+2 n\right) \geq n$ triangles of the required kind. Finally, it is easy to check that for $n=2$ and $n=4$ the necessary set of small triangles cannot be found.

Hence it is possible for the fleas to meet in one small triangle for all $n$ except 2 and 4 .

![](https://cdn.mathpix.com/cropped/2024_04_17_e0eeca76de2a70e8352dg-4.jpg?height=371&width=448&top_left_y=894&top_left_x=818)

Figure 2


problem: A polygon with $2 n+1$ vertices is given. Show that it is possible to label the vertices and midpoints of the sides of the polygon, using all the numbers $1,2, \ldots, 4 n+2$, so that the sums of the three numbers assigned to each side are all equal.

solution: First, label the midpoints of the sides of the polygon with the numbers $1,2, \ldots, 2 n+1$, in clockwise order. Then, beginning with the vertex between the sides labelled by 1 and 2 , label every second vertex in clockwise order with the numbers $4 n+2,4 n+1, \ldots, 2 n+2$.


problem: In the triangle $A B C$, let $l$ be the bisector of the external angle at $C$. The line through the midpoint $O$ of the segment $A B$ parallel to $l$ meets the line $A C$ at $E$. Determine $|C E|$, if $|A C|=7$ and $|C B|=4$.

solution: Let $F$ be the intersection point of $l$ and the line $A B$. Since $|A C|>|B C|$, the point $E$ lies on the segment $A C$, and $F$ lies on the ray $A B$. Let the line through $B$ parallel to $A C$ meet $C F$ at $G$. Then the triangles $A F C$ and $B F G$ are similar. Moreover, we have $\angle B G C=\angle B C G$, and hence the triangle $C B G$ is isosceles with $|B C|=|B G|$. Hence $\frac{|F A|}{|F B|}=\frac{|A C|}{|B G|}=\frac{|A C|}{|B C|}=\frac{7}{4}$. Therefore $\frac{|A O|}{|A F|}=\frac{3}{2} / 7=\frac{3}{14}$. Since the triangles $A C F$ and $A E O$ are similar, $\frac{|A E|}{|A C|}=\frac{|A O|}{|A F|}=\frac{3}{14}$, whence $|A E|=\frac{3}{2}$ and $|E C|=\frac{11}{2}$.


problem:
Prove that there exists a number $\alpha$ such that for any triangle $A B C$ the inequality

$$
\max \left(h_{A}, h_{B}, h_{C}\right) \leq \alpha \cdot \min \left(m_{A}, m_{B}, m_{C}\right)
$$

holds, where $h_{A}, h_{B}, h_{C}$ denote the lengths of the altitudes and $m_{A}, m_{B}, m_{C}$ denote the lengths of the medians. Find the smallest possible value of $\alpha$.

solution: Let $h=\max \left(h_{A}, h_{B}, h_{C}\right)$ and $m=\min \left(m_{A}, m_{B}, m_{C}\right)$. If the longest height and the shortest median are drawn from the same vertex, then obviously $h \leq m$. Now let the longest height and shortest median be $A D$ and $B E$, respectively, with $|A D|=h$ and $|B E|=m$. Let $F$ be the point on the line $B C$ such that $E F$ is parallel to $A D$. Then $m=|E B| \geq|E F|=\frac{h}{2}$, whence $h \leq 2 m$. For an example with $h=2 m$, consider a triangle where $D$ lies on the ray $C B$ with $|C B|=|B D|$. Hence the smallest such value is $\alpha=2$.


problem: Let $M$ be the midpoint of the side $A C$ of a triangle $A B C$ and let $H$ be the foot point of the altitude from $B$. Let $P$ and $Q$ be the orthogonal projections of $A$ and $C$ on the bisector of angle $B$. Prove that the four points $M, H, P$ and $Q$ lie on the same circle.

solution:
If $|A B|=|B C|$, the points $M, H, P$ and $Q$ coincide and the circle degenerates to a point. We will assume that $|A B|<|B C|$, so that $P$ lies inside the triangle $A B C$, and $Q$ lies outside of it.

Let the line $A P$ intersect $B C$ at $P_{1}$, and let $C Q$ intersect $A B$ at $Q_{1}$. Then $|A P|=\left|P P_{1}\right|$ (since $\triangle A P B \cong$ $\left.\triangle P_{1} P B\right)$, and therefore $M P \| B C$. Similarly, $M Q \| A B$. Therefore $\angle A M Q=\angle B A C$. We have two cases:

(i) $\angle B A C \leq 90^{\circ}$. Then $A, H, P$ and $B$ lie on a circle in this order. Hence $\angle H P Q=180^{\circ}-\angle H P B=$ $\angle B A C=\angle H M Q$. Therefore $H, P, M$ and $Q$ lie on a circle.

(ii) $\angle B A C>90^{\circ}$. Then $A, H, B$ and $P$ lie on a circle in this order. Hence $\angle H P Q=180^{\circ}-\angle H P B=$ $180^{\circ}-\angle H A B=\angle B A C=\angle H M Q$, and therefore $H, P, M$ and $Q$ lie on a circle.

![](https://cdn.mathpix.com/cropped/2024_04_17_e0eeca76de2a70e8352dg-5.jpg?height=646&width=651&top_left_y=682&top_left_x=720)

Figure 3


problem:
The following construction is used for training astronauts: A circle $C_{2}$ of radius $2 R$ rolls along the inside of another, fixed circle $C_{1}$ of radius $n R$, where $n$ is an integer greater than 2 . The astronaut is fastened to a third circle $C_{3}$ of radius $R$ which rolls along the inside of circle $C_{2}$ in such a way that the touching point of the circles $C_{2}$ and $C_{3}$ remains at maximum distance from the touching point of the circles $C_{1}$ and $C_{2}$ at all times (see Figure 3).

How many revolutions (relative to the ground) does the astronaut perform together with the circle $C_{3}$ while the circle $C_{2}$ completes one full lap around the inside of circle $C_{1}$ ?

solution:
Consider a circle $C_{4}$ with radius $R$ that rolls inside $C_{2}$ in such a way that the two circles always touch in the point opposite to the touching point of $C_{2}$ and $C_{3}$. Then the circles $C_{3}$ and $C_{4}$ follow each other and make the same number of revolutions, and so we will assume that the astronaut is inside the circle $C_{4}$ instead. But the touching point of $C_{2}$ and $C_{4}$ coincides with the touching point of $C_{1}$ and $C_{2}$. Hence the circles $C_{4}$ and $C_{1}$ always touch each other, and we can disregard the circle $C_{2}$ completely.

Suppose the circle $C_{4}$ rolls inside $C_{1}$ in counterclockwise direction. Then the astronaut revolves in clockwise direction. If the circle $C_{4}$ had rolled along a straight line of length $2 \pi n R$ (instead of the inside of $C_{1}$ ), the circle $C_{4}$ would have made $n$ revolutions during its movement. As the path of the circle $C_{4}$ makes a $360^{\circ}$ counterclockwise turn itself, the total number of revolutions of the astronaut relative to the ground is $n-1$.

Remark: The radius of the intermediate circle $C_{2}$ is irrelevant. Moreover, for any number of intermediate circles the answer remains the same, depending only on the radii of the outermost and innermost circles.


problem: Prove that if both coordinates of every vertex of a convex pentagon are integers, then the area of this pentagon is not less than $\frac{5}{2}$.

solution:
There are two vertices $A_{1}$ and $A_{2}$ of the pentagon that have their first coordinates of the parity, and their second coordinates of the same parity. Therefore the midpoint $M$ of $A_{1} A_{2}$ has integer coordinates. There are two possibilities:

(i) The considered vertices are not consecutive. Then $M$ lies inside the pentagon (because it is convex) and is the common vertex of five triangles having as their bases the sides of the pentagon. The area of any one of these triangles is not less than $\frac{1}{2}$, so the area of the pentagon is at least $\frac{5}{2}$.
(ii) The considered vertices are consecutive. Since the pentagon is convex, the side $A_{1} A_{2}$ is not simultaneously parallel to $A_{3} A_{4}$ and $A_{4} A_{5}$. Suppose that the segments $A_{1} A_{2}$ and $A_{3} A_{4}$ are not parallel. Then the triangles $A_{2} A_{3} A_{4}, M A_{3} A_{4}$ and $A-1 A_{3} A_{4}$ have different areas, since their altitudes dropped onto the side $A_{3} A_{4}$ form a monotone sequence. At least one of these triangles has area not less than $\frac{3}{2}$, and the pentagon has area not less than $\frac{5}{2}$.