problem:
The real numbers $a, b, c$ are such that $a^{2}+b^{2}=2 c^{2}$, and also such that $a \neq b, c \neq-a, c \neq-b$. Show that

$$
\frac{(a+b+2 c)\left(2 a^{2}-b^{2}-c^{2}\right)}{(a-b)(a+c)(b+c)}
$$

is an integer.

solution:
Let us first note that

$$
\frac{a+b+2 c}{(a+c)(b+c)}=\frac{(a+c)+(b+c)}{(a+c)(b+c)}=\frac{1}{a+c}+\frac{1}{b+c}
$$

Further we have

$$
2 a^{2}-b^{2}-c^{2}=2 a^{2}-\left(2 c^{2}-a^{2}\right)-c^{2}=3 a^{2}-3 c^{2}=3(a+c)(a-c)
$$

and

$$
2 a^{2}-b^{2}-c^{2}=2\left(2 c^{2}-b^{2}\right)-b^{2}-c^{2}=3 c^{2}-3 b^{2}=3(b+c)(c-b)
$$

so that

$$
\frac{(a+b+2 c)\left(2 a^{2}-b^{2}-c^{2}\right)}{(a-b)(a+c)(b+c)}=\frac{3(a-c)+3(c-b)}{a-b}=\frac{3(a-b)}{a-b}=3
$$

an integer.

problem_match: PROBLEM 1.

solution_match: SolUTiON.


problem: Given a triangle $A B C$, let $P$ lie on the circumcircle of the triangle and be the midpoint of the arc $B C$ which does not contain $A$. Draw a straight line $l$ through $P$ so that $l$ is parallel to $A B$. Denote by $k$ the circle which passes through $B$, and is tangent to $l$ at the point $P$. Let $Q$ be the second point of intersection of $k$ and the line $A B$ (if there is no second point of intersection, choose $Q=B)$. Prove that $A Q=A C$.

solution:
There are three possibilities: $Q$ between $A$ and $B, Q=B$, and $B$ between $A$ and $Q$. If $Q=B$ we have that $\angle A B P$ is right, and $A P$ is a diameter
of the circumcircle. The triangles $A B P$ and $A C P$ are then congruent (they have $A P$ in common, $P B=P C$, and both have a right angle opposite to $A P$ ). Hence ir follows that $A B=A C$.

The solutions in the other two cases are very similar. We present the one in the case when $Q$ lies between $A$ and $B$.

The segment $A P$ is the angle bisector of the angle at $A$, since $P$ is the midpoint of the arc $B C$ of the circumcircle which does not contain $A$. Also, $P C=P B$. Since the segment $Q B$ is parallel to the tangent to $k$ at $P$, it is orthogonal to the diameter of $k$ through $P$. Thus this diameter cuts $Q B$ in halves, to form two congruent right triangles, and it follows that $P Q=P B$. We have (in the usual notation) $\angle P C B=\angle P B C=\frac{\alpha}{2}$, and

$$
\angle A Q P=180^{\circ}-\angle B Q P=180^{\circ}-\angle Q B P=180^{\circ}-\beta-\frac{\alpha}{2}=\frac{\alpha}{2}+\gamma=\angle A C P
$$

Hence the triangles $A Q P$ and $A C P$ are congruent (two pairs of equal angles and one pair of equal corresponding sides), and it follows that $A C=A Q$.

problem_match: Problem 2.

solution_match: Solution I.


solution:
Again we consider the case when $Q$ is between $A$ and $B$. We shall use trigonometry. As above, we have $\angle A B P=\beta+\frac{\alpha}{2}$, and thus

$$
Q B=2 P B \cos \left(\beta+\frac{\alpha}{2}\right)=2 P B \cos \left(\pi-\frac{\alpha}{2}-\gamma\right)
$$

and

$$
A Q=2 R \sin \gamma-4 R \sin \frac{\alpha}{2} \cos \left(\pi-\frac{\alpha}{2}-\gamma\right)
$$

Since $A C=2 R \cos \beta$, it remains to prove that

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

which is easy, using standard trigonometry.

solution_match: Solution II.


problem:
Find the smallest positive integer $n$, such that there exist $n$ integers $x_{1}, x_{2}, \ldots, x_{n}$ (not necessarily different), with $1 \leq x_{k} \leq n, 1 \leq k \leq n$, and such that

$$
x_{1}+x_{2}+\cdots+x_{n}=\frac{n(n+1)}{2}, \quad \text { and } \quad x_{1} x_{2} \cdots x_{n}=n!
$$

but $\left\{x_{1}, x_{2}, \ldots, x_{n}\right\} \neq\{1,2, \ldots, n\}$.

solution:
If it is possible to find a set of numbers as required for some $n=k$, then it will also be possible for $n=k+1$ (choose $x_{1}, \ldots, x_{k}$ as for $n=k$, and
let $x_{k+1}=k+1$ ). Thus we have to find a positive integer $n$ such that a set as required exists, and prove that such a set does not exist for $n-1$.

For $n=9$ we have $8+6+3=9+4+4$, and $8 \cdot 6 \cdot 3=9 \cdot 4 \cdot 4$, so that a set of numbers as required will exist for all $n \geq 9$. It remains to eliminate $n=8$.

Assume $x_{1}, \ldots, x_{8}$ are numbers that satisfy the conditions of the problem. Since 5 and 7 are primes, and since $2 \cdot 5>8$ and $2 \cdot 7>8$, two of the $x$-numbers have to be equal to 5 and 7 ; without loss of generality we can assume that $x_{1}=5, x_{2}=7$. For the remaining numbers we have $x_{3} x_{4} \cdots x_{8}=2^{7} \cdot 3^{2}$, and $x_{3}+x_{4}+\cdots+x_{8}=36-12=24$. Since $3^{2}=9>8$, it follows that exactly two of the numbers $x_{3}, \ldots, x_{8}$ are divisible by 3 , and the rest of the numbers are powers of 2. There are three possible cases to consider: two of the numbers are equal to 3 ; two of the numbers are equal to 6 ; one number is equal to 3 and another one is equal to 6 .

Case 1. $x_{3}=x_{4}=3$

We then have $x_{5}+x_{6}+x_{7}+x_{8}=18$, and $x_{5} x_{6} x_{7} x_{8}=2^{7}$. The possible powers of 2 with sum 18 are $(1,1,8,8)$ and $(2,4,4,8)$, none of them gives the product $2^{7}$.

Case 2. $x_{3}=3, x_{4}=6$

We have $x_{5}+x_{6}+x_{7}+x_{8}=15$, and $x_{5} x_{6} x_{7} x_{8}=2^{6}$. It is immediate to check that the only possibility for the remaining numbers is $(1,2,4,8)$, which is not allowed, since it gives $\left\{x_{1}, x_{2}, \ldots, x_{8}\right\}=\{1,2, \ldots, 8\}$.

Case 3. $x_{3}=x_{4}=6$

Now we have $x_{5}+x_{6}+x_{7}+x_{8}=12$, and $x_{5} x_{6} x_{7} x_{8}=2^{5}$. The possible powers of 2 which give the correct sum are $(1,1,2,8)$ and $(2,2,4,4)$, but again, they do not give the desired product.

Thus the smallest positive integer with the required property is 9 .

problem_match: Problem 3.

solution_match: Solution.


problem: The number 1 is written on the blackboard. After that a sequence of numbers is created as follows: at each step each number $a$ on the blackboard is replaced by the numbers $a-1$ and $a+1$; if the number 0 occurs, it is erased immediately; if a number occurs more than once, all its occurrences are left on the blackboard. Thus the blackboard will show 1 after 0 steps; 2 after 1 step; 1,3 after 2 steps; 2, 2, 4 after 3 steps, and so on. How many numbers will there be on the blackboard after $n$ steps?

solution:
Let $S$ be a set of different numbers, all of them less than $2^{n-1}$, and create two new sets as follows: $S_{1}$, consisting of all the numbers in $S$ except
the smallest one, and $S_{2}$, with elements the smallest element of $S$ and all the numbers we get by adding $2^{n-1}$ to each number in $S$. Note that if the number of elements in $S$ is $a$, then $S_{1}$ has $a-1$ elements, and $S_{2}$ has $a+1$ elements. This corresponds to the operations we are allowed to perform on the blackboard, if we throw away all empty sets. If we now operate simultaneously on the sets and on the numbers, then after $n$ steps the number of sets will be exactly equal to the number of numbers on the blackboard.

Let us see what the set operations look like. We must start with a set, consisting only of the number 0 . Next we get an empty set (thrown away), and the set $\{0,1\}$; next the sets $\{1\}$ and $\{0,2,3\}$; next again (an empty set and) $\{1,5\},\{2,3\},\{0,4,6,7\}$, etc.

It is now fairly easy to prove by induction that after $n$ steps

(1) each number less than $2^{n}$ appears in exactly one set;

(2) the number of elements in the sets corresponds exactly to the numbers on the blackboard;

(3) if the numbers in each set are written in increasing order, then the difference between two neighbours is a power of 2 ; thus the binary representations of two neighbours differ in exactly one position (in the binary system the example above looks like this: $\{0\} ;\{0,1\} ;\{01\},\{00,10,11\} ;\{001,101\},\{010,011\}$, $\{000,100,110,111\}) ;$

(4) if $k$ is the number of ones in the binary code of the smallest number of a set, and $l$ the number of ones in the largest number of the same set, then $k+l=n$; (5) each set contains exactly one number with $\left\lfloor\frac{n}{2}\right\rfloor$ ones.

The last property tells us that the number of sets after $n$ steps is equal to the number of numbers such that their binary representation contains exactly $\left\lfloor\frac{n}{2}\right\rfloor$ ones out of $n$ digits, i.e. the number of numbers on the blackboard after $n$ steps will be equal to $\binom{n}{\left\lfloor\frac{n}{2}\right\rfloor}$.

problem_match: Problem 4.


solution:
Denote by $\sigma_{n}$ the number of numbers on the blackboard after $n$ steps (thus $\sigma_{0}=\sigma_{1}=1, \sigma_{2}=2, \sigma_{3}=3, \ldots$ ). Regard all points in the plane with coordinates $(m, n)$, where $m, n$ are defined as follows: the number $n$ is written on the blackboard after $m$ steps ( $m, n$ are positive integers by the condition). At each node, i.e. each point with integer coordinates of the above type, write the number of occurrences of $n$ after $m$ steps. Thus the number written at $(3,2)$ will be the number of occurrences of 2 directly after step 3 , which is 2 . Observe that the number at each node is equal to the number of ways to reach this node from the point $(0,1)$, walking from one node to another one step at the time, from left to right and either up or down, without going down to the horizontal axis.

(Since all zeroes are erased, we can never reach the horizontal axis.) For each $m$ we want to find the total number of paths $\sigma_{m}$, reaching the vertical line $y=m$.

If we were to remove the constraint that we are not allowed to step on the horizontal axis (i.e. that all zeroes are erased), we would get Pascal's triangle, and the total number of paths would be $2^{m}$. The binomial coefficient at each node is then the total number of paths to reach this node, without constraint.

We need to find and subtract the number of paths from $A(0,1)$ to a point $B$ among the allowed nodes, which go down to the horizontal axis. Choose such a path, and find a new one by reflecting in the horizontal axis the part between the starting point $(0,1)$ and the path's first contact with the horizontal axis. The original path and the reflected one will end at the same point (among the allowed nodes); the reflected one will start at $A^{\prime}(0,-1)$. We have constructed a bijection between the original set of paths from $A$ to $B$ that reach down to the horizontal axis and the set of paths from $A^{\prime}$ to $B$. Observe that starting at $A^{\prime}$ we can get another copy of Pascal's triangle, which is the original one, translated two units down. It is easier to count the number of paths from $A^{\prime}$ to $B$, since they are not subject to any constraints. Thus the number of "positive" paths from $A$ to the points above the horizontal axis for $m=2 k$ will be

$$
\begin{gathered}
\left(\binom{2 k}{2 k}+\binom{2 k}{2 k-1}+\cdots+\binom{2 k}{k+1}+\binom{2 k}{k}\right)- \\
-\left(\binom{2 k}{2 k}+\binom{2 k}{2 k-1}+\cdots+\binom{2 k}{k+1}\right)=\binom{2 k}{k}
\end{gathered}
$$

In case $m$ is odd, a modification of the above argument gives the answer obtained in solution I.

solution_match: SolUTION II.