# $21^{\text {th }}$ Junior Balkan Mathematical Olympiad Problem 1. Determine all the sets of six consecutive positive integers such that the product of some two of them, added to the product of some other two of them is equal to the product of the remaining two numbers. Solution. Exactly two of the six numbers are multiples of 3 and these two need to be multiplied together, otherwise two of the three terms of the equality are multiples of 3 but the third one is not. Let $n$ and $n+3$ denote these multiples of 3 . Two of the four remaining numbers give remainder 1 when divided by 3 , while the other two give remainder 2 , so the two other products are either $\equiv 1 \cdot 1=1$ $(\bmod 3)$ and $\equiv 2 \cdot 2 \equiv 1(\bmod 3)$, or they are both $\equiv 1 \cdot 2 \equiv 2(\bmod 3)$. In conclusion, the term $n(n+3)$ needs to be on the right hand side of the equality. Looking at parity, three of the numbers are odd, and three are even. One of $n$ and $n+3$ is odd, the other even, so exactly two of the other numbers are odd. As $n(n+3)$ is even, the two remaining odd numbers need to appear in different terms. We distinguish the following cases: I. The numbers are $n-2, n-1, n, n+1, n+2, n+3$. The product of the two numbers on the RHS needs to be larger than $n(n+3)$. The only possibility is $(n-2)(n-1)+n(n+3)=(n+1)(n+2)$ which leads to $n=3$. Indeed, $1 \cdot 2+3 \cdot 6=4 \cdot 5$. II. The numbers are $n-1, n, n+1, n+2, n+3, n+4$. As $(n+4)(n-1)+n(n+3)=(n+1)(n+2)$ has no solutions, $n+4$ needs to be on the RHS, multiplied with a number having a different parity, so $n-1$ or $n+1$. $(n+2)(n-1)+n(n+3)=(n+1)(n+4)$ leads to $n=3$. Indeed, $2 \cdot 5+3 \cdot 6=4 \cdot 7$. $(n+2)(n+1)+n(n+3)=(n-1)(n+4)$ has no solution. III. The numbers are $n, n+1, n+2, n+3, n+4, n+5$. We need to consider the following situations: $(n+1)(n+2)+n(n+3)=(n+4)(n+5)$ which leads to $n=6$; indeed $7 \cdot 8+6 \cdot 9=10 \cdot 11$; $(n+2)(n+5)+n(n+3)=(n+1)(n+4)$ obviously without solutions, and $(n+1)(n+4)+n(n+3)=(n+2)(n+5)$ which leads to $n=2$ (not a multiple of 3 ). In conclusion, the problem has three solutions: $$ 1 \cdot 2+3 \cdot 6=4 \cdot 5, \quad 2 \cdot 5+3 \cdot 6=4 \cdot 7, \quad \text { and } \quad 7 \cdot 8+6 \cdot 9=10 \cdot 11 $$ Problem 2. Let $x, y, z$ be positive integers such that $x \neq y \neq z \neq x$. Prove that $$ (x+y+z)(x y+y z+z x-2) \geq 9 x y z $$ When does the equality hold? Solution. Since $x, y, z$ are distinct positive integers, the required inequality is symmetric and WLOG we can suppose that $x \geq y+1 \geq z+2$. We consider 2 possible cases: Case 1. $y \geq z+2$. Since $x \geq y+1 \geq z+3$ it follows that $$ (x-y)^{2} \geq 1, \quad(y-z)^{2} \geq 4, \quad(x-z)^{2} \geq 9 $$ which are equivalent to $$ x^{2}+y^{2} \geq 2 x y+1, \quad y^{2}+z^{2} \geq 2 y z+4, \quad x^{2}+z^{2} \geq 2 x z+9 $$ or otherwise $$ z x^{2}+z y^{2} \geq 2 x y z+z, \quad x y^{2}+x z^{2} \geq 2 x y z+4 x, \quad y x^{2}+y z^{2} \geq 2 x y z+9 y $$ Adding up the last three inequalities we have $$ x y(x+y)+y z(y+z)+z x(z+x) \geq 6 x y z+4 x+9 y+z $$ which implies that $(x+y+z)(x y+y z+z x-2) \geq 9 x y z+2 x+7 y-z$. Since $x \geq z+3$ it follows that $2 x+7 y-z \geq 0$ and our inequality follows. Case 2. $y=z+1$. Since $x \geq y+1=z+2$ it follows that $x \geq z+2$, and replacing $y=z+1$ in the required inequality we have to prove $$ (x+z+1+z)(x(z+1)+(z+1) z+z x-2) \geq 9 x(z+1) z $$ which is equivalent to $$ (x+2 z+1)\left(z^{2}+2 z x+z+x-2\right)-9 x(z+1) z \geq 0 $$ Doing easy algebraic manipulations, this is equivalent to prove $$ (x-z-2)(x-z+1)(2 z+1) \geq 0 $$ which is satisfied since $x \geq z+2$. The equality is achieved only in the Case 2 for $x=z+2$, so we have equality when $(x, y, z)=$ $(k+2, k+1, k)$ and all the permutations for any positive integer $k$. Problem 3. Let $A B C$ be an acute triangle such that $A B \neq A C$, with circumcircle $\Gamma$ and circumcenter $O$. Let $M$ be the midpoint of $B C$ and $D$ be a point on $\Gamma$ such that $A D \perp B C$. Let $T$ be a point such that $B D C T$ is a parallelogram and $Q$ a point on the same side of $B C$ as $A$ such that $$ \angle B Q M=\angle B C A \quad \text { and } \quad \angle C Q M=\angle C B A $$ Let the line $A O$ intersect $\Gamma$ at $E,(E \neq A)$ and let the circumcircle of $\triangle E T Q$ intersect $\Gamma$ at point $X \neq E$. Prove that the points $A, M$, and $X$ are collinear. Solution. Let $X^{\prime}$ be symmetric point to $Q$ in line $B C$. Now since $\angle C B A=\angle C Q M=\angle C X^{\prime} M$, $\angle B C A=\angle B Q M=\angle B X^{\prime} M$, we have $$ \angle B X^{\prime} C=\angle B X^{\prime} M+\angle C X^{\prime} M=\angle C B A+\angle B C A=180^{\circ}-\angle B A C $$ we have that $X^{\prime} \in \Gamma$. Now since $\angle A X^{\prime} B=\angle A C B=\angle M X^{\prime} B$ we have that $A, M, X^{\prime}$ are collinear. Note that since $$ \angle D C B=\angle D A B=90^{\circ}-\angle A B C=\angle O A C=\angle E A C $$ we get that $D B C E$ is an isosceles trapezoid. ![](https://cdn.mathpix.com/cropped/2024_06_05_7b55aeb0100cae01314ag-2.jpg?height=802&width=771&top_left_y=1478&top_left_x=677) Since $B D C T$ is a parallelogram we have $M T=M D$, with $M, D, T$ being collinear, $B D=C T$, and since $B D E C$ is an isosceles trapezoid we have $B D=C E$ and $M E=M D$. Since $$ \angle B T C=\angle B D C=\angle B E D, \quad C E=B D=C T \quad \text { and } \quad M E=M T $$ we have that $E$ and $T$ are symmetric with respect to the line $B C$. Now since $Q$ and $X^{\prime}$ are symmetric with respect to the line $B C$ as well, this means that $Q X^{\prime} E T$ is an isosceles trapezoid which means that $Q, X^{\prime}, E, T$ are concyclic. Since $X^{\prime} \in \Gamma$ this means that $X \equiv X^{\prime}$ and therefore $A, M, X$ are collinear. Alternative solution. Denote by $H$ the orthocenter of $\triangle A B C$. We use the following well known properties: (i) Point $D$ is the symmetric point of $H$ with respect to $B C$. Indeed, if $H_{1}$ is the symmetric point of $H$ with respect to $B C$ then $\angle B H_{1} C+\angle B A C=180^{\circ}$ and therefore $H_{1} \equiv D$. (ii) The symmetric point of $H$ with respect to $M$ is the point $E$. Indeed, if $H_{2}$ is the symmetric point of $H$ with respect to $M$ then $B H_{2} C H$ is parallelogram, $\angle B H_{2} C+\angle B A C=180^{\circ}$ and since $E B \| C H$ we have $\angle E B A=90^{\circ}$. Since $D E T H$ is a parallelogram and $M H=M D$ we have that $D E T H$ is a rectangle. Therefore $M T=M E$ and $T E \perp B C$ implying that $T$ and $E$ are symmetric with respect to $B C$. Denote by $Q^{\prime}$ the symmetric point of $Q$ with respect to $B C$. Then $Q^{\prime} E T Q$ is isosceles trapezoid, so $Q^{\prime}$ is a point on the circumcircle of $\triangle E T Q$. Moreover $\angle B Q^{\prime} C+\angle B A C=180^{\circ}$ and we conclude that $Q^{\prime} \in \Gamma$. Therefore $Q^{\prime} \equiv X$. It remains to observe that $\angle C X M=\angle C Q M=\angle C B A$ and $\angle C X A=\angle C B A$ and we infer that $X, M$ and $A$ are collinear. Problem 4. Consider a regular $2 n$-gon $P, A_{1} A_{2} \ldots A_{2 n}$ in the plane, where $n$ is a positive integer. We say that a point $S$ on one of the sides of $P$ can be seen from a point $E$ that is external to $P$, if the line segment $S E$ contains no other points that lie on the sides of $P$ except $S$. We color the sides of $P$ in 3 different colors (ignore the vertices of $P$, we consider them colorless), such that every side is colored in exactly one color, and each color is used at least once. Moreover, from every point in the plane external to $P$, points of at most 2 different colors on $P$ can be seen. Find the number of distinct such colorings of $P$ (two colorings are considered distinct if at least one of the sides is colored differently). Solution Answer: For $n=2$, the answer is 36 ; for $n=3$, the answer is 30 and for $n \geq 4$, the answer is $6 n$. Lemma 1. Given a regular $2 n$-gon in the plane and a sequence of $n$ consecutive sides $s_{1}, s_{2}, \ldots, s_{n}$ there is an external point $Q$ in the plane, such that the color of each $s_{i}$ can be seen from $Q$, for $i=1,2, \ldots, n$. Proof. It is obvious that for a semi-circle $S$, there is a point $R$ in the plane far enough on the bisector of its diameter such that almost the entire semi-circle can be seen from $R$. Now, it is clear that looking at the circumscribed circle around the $2 n$-gon, there is a semi-circle $S$ such that each $s_{i}$ either has both endpoints on it, or has an endpoint that's on the semi-circle, and is not on the semi-circle's end. So, take $Q$ to be a point in the plane from which almost all of $S$ can be seen, clearly, the color of each $s_{i}$ can be seen from $Q$. Lemma 2. Given a regular $2 n$-gon in the plane, and a sequence of $n+1$ consecutive sides $s_{1}, s_{2}, \ldots, s_{n+1}$ there is no external point $Q$ in the plane, such that the color of each $s_{i}$ can be seen from $Q$, for $i=1,2, \ldots, n+1$. Proof. Since $s_{1}$ and $s_{n+1}$ are parallel opposite sides of the $2 n$-gon, they cannot be seen at the same time from an external point. For $n=2$, we have a square, so all we have to do is make sure each color is used. Two sides will be of the same color, and we have to choose which are these 2 sides, and then assign colors according to this choice, so the answer is $\binom{4}{2} .3 .2=36$. For $n=3$, we have a hexagon. Denote the sides as $a_{1}, a_{2}, \ldots q_{6}$, in that order. There must be 2 consecutive sides of different colors, say $a_{1}$ is red, $a_{2}$ is blue. We must have a green side, and only $a_{4}$ and $a_{5}$ can be green. We have 3 possibilities: 1) $a_{4}$ is green, $a_{5}$ is not. So, $a_{3}$ must be blue and $a_{5}$ must be blue (by elimination) and $a_{6}$ must be blue, so we get a valid coloring. 2) Both $a_{4}$ and $a_{5}$ are green, thus $a_{6}$ must be red and $a_{5}$ must be blue, and we get the coloring rbbggr. 3) $a_{5}$ is green, $a_{4}$ is not. Then $a_{6}$ must be red. Subsequently, $a_{4}$ must be red (we assume it is not green). It remains that $a_{3}$ must be red, and the coloring is rbrrgr. Thus, we have 2 kinds of configurations: i) 2 opposite sides have 2 opposite colors and all other sides are of the third color. This can happen in 3.(3.2.1) $=18$ ways (first choosing the pair of opposite sides, then assigning colors), ii) 3 pairs of consecutive sides, each pair in one of the 3 colors. This can happen in $2.6=12$ ways (2 partitioning into pairs of consecutive sides, for each partitioning, 6 ways to assign the colors). Thus, for $n=3$, the answer is $18+12=30$. Finally, let's address the case $n \geq 4$. The important thing now is that any 4 consecutive sides can be seen from an external point, by Lemma 1 . Denote the sides as $a_{1}, a_{2}, \ldots, a_{2 n}$. Again, there must be 2 adjacent sides that are of different colors, say $a_{1}$ is blue and $a_{2}$ is red. We must have a green side, and by Lemma 1 , that can only be $a_{n+1}$ or $a_{n+2}$. So, we have 2 cases: Case 1: $a_{n+1}$ is green, so $a_{n}$ must be red (cannot be green due to Lemma 1 applied to $a_{1}, a_{2}, \ldots, a_{n}$, cannot be blue for the sake of $a_{2}, \ldots, a_{n+1}$. If $a_{n+2}$ is red, so are $a_{n+3}, \ldots, a_{2 n}$, and we get a valid coloring: $a_{1}$ is blue, $a_{n+1}$ is green, and all the others are red. If $a_{n+2}$ is green: a) $a_{n+3}$ cannot be green, because of $a_{2}, a_{1}, a_{2 n} \ldots, a_{n+3}$. b) $a_{n+3}$ cannot be blue, because the 4 adjacent sides $a_{n}, \ldots, a_{n+3}$ can be seen (this is the case that makes the separate treatment of $n \geq 4$ necessary) c) $a_{n+3}$ cannot be red, because of $a_{1}, a_{2 n}, \ldots, a_{n+2}$. So, in the case that $a_{n+2}$ is also green, we cannot get a valid coloring. Case 2: $a_{n+2}$ is green is treated the same way as Case 1. This means that the only valid configuration for $n \geq 4$ is having 2 opposite sides colored in 2 different colors, and all other sides colored in the third color. This can be done in $n .3 .2=6 n$ ways.