di-zhang-fdu/OlympiadExtended huggingface dataset:
Subfield: Geometry


Question: Let $I$ be the incentre of a non-equilateral triangle $A B C, I_{A}$ be the $A$-excentre, $I_{A}^{\prime}$ be the reflection of $I_{A}$ in $B C$, and $l_{A}$ be the reflection of line $A I_{A}^{\prime}$ in $A I$. Define points $I_{B}, I_{B}^{\prime}$ and line $l_{B}$ analogously. Let $P$ be the intersection point of $l_{A}$ and $l_{B}$.
Let one of the tangents from $P$ to the incircle of triangle $A B C$ meet the circumcircle at points $X$ and $Y$. Show that $\angle X I Y=120^{\circ}$.

Solution:
By Poncelet's Porism, the other tangents to the incircle of triangle $A B C$ from $X$ and $Y$ meet at a point $Z$ on $\Gamma$. Let $T$ be the touching point of the incircle to $X Y$, and let $D$ be the midpoint of $X Y$. We have

$$
\begin{aligned}
O D & =I T \cdot \frac{O P}{I P}=r\left(1+\frac{O I}{I P}\right)=r\left(1+\frac{O I^{2}}{O I \cdot I P}\right)=r\left(1+\frac{R^{2}-2 R r}{R^{2}-I O^{2}}\right) \\
& =r\left(1+\frac{R^{2}-2 R r}{2 R r}\right)=\frac{R}{2}=\frac{O X}{2} .
\end{aligned}
$$
Denote by $R$ and $r$ the circumradius and inradius of triangle $A B C$. Note that by the above transformation, we have $\triangle A P O \sim \triangle A A^{\prime} I_{A}^{\prime}$ and $\triangle A A^{\prime} I_{A} \sim \triangle A I O$. Therefore, we find that

$$
P O=A^{\prime} I_{A}^{\prime} \cdot \frac{A O}{A I_{A}^{\prime}}=A I_{A} \cdot \frac{A O}{A^{\prime} I_{A}}=\frac{A I_{A}}{A^{\prime} I_{A}} \cdot A O=\frac{A O}{I O} \cdot A O
$$

This shows $P O \cdot I O=R^{2}$, and it follows that $P$ and $I$ are mapped to each other under the inversion with respect to the circumcircle $\Gamma$ of triangle $A B C$. Then $P X \cdot P Y$, which is the power of $P$ with respect to $\Gamma$, equals $P I \cdot P O$. This yields $X, I, O, Y$ are concyclic.

Let $T$ be the touching point of the incircle to $X Y$, and let $D$ be the midpoint of $X Y$. Then

$$
O D=I T \cdot \frac{P O}{P I}=r \cdot \frac{P O}{P O-I O}=r \cdot \frac{R^{2}}{R^{2}-I O^{2}}=r \cdot \frac{R^{2}}{2 R r}=\frac{R}{2}
$$

This shows $\angle D O X=60^{\circ}$ and hence $\angle X I Y=\angle X O Y=120^{\circ}$.
This shows $\angle X Z Y=60^{\circ}$ and hence $\angle X I Y=120^{\circ}$.
Subfield: Number Theory


Question: Define $P(n)=n^{2}+n+1$. For any positive integers $a$ and $b$, the set

$$
\{P(a), P(a+1), P(a+2), \ldots, P(a+b)\}
$$

is said to be fragrant if none of its elements is relatively prime to the product of the other elements. Determine the smallest size of a fragrant set.

Solution:
We have the following observations.

(i) $(P(n), P(n+1))=1$ for any $n$.

We have $(P(n), P(n+1))=\left(n^{2}+n+1, n^{2}+3 n+3\right)=\left(n^{2}+n+1,2 n+2\right)$. Noting that $n^{2}+n+1$ is odd and $\left(n^{2}+n+1, n+1\right)=(1, n+1)=1$, the claim follows.

(ii) $(P(n), P(n+2))=1$ for $n \not \equiv 2(\bmod 7)$ and $(P(n), P(n+2))=7$ for $n \equiv 2(\bmod 7)$.

From $(2 n+7) P(n)-(2 n-1) P(n+2)=14$ and the fact that $P(n)$ is odd, $(P(n), P(n+2))$ must be a divisor of 7 . The claim follows by checking $n \equiv 0,1, \ldots, 6(\bmod 7)$ directly.

(iii) $(P(n), P(n+3))=1$ for $n \not \equiv 1(\bmod 3)$ and $3 \mid(P(n), P(n+3))$ for $n \equiv 1(\bmod 3)$.

From $(n+5) P(n)-(n-1) P(n+3)=18$ and the fact that $P(n)$ is odd, $(P(n), P(n+3))$ must be a divisor of 9 . The claim follows by checking $n \equiv 0,1,2(\bmod 3)$ directly.

Suppose there exists a fragrant set with at most 5 elements. We may assume it contains exactly 5 elements $P(a), P(a+1), \ldots, P(a+4)$ since the following argument also works with fewer elements. Consider $P(a+2)$. From (i), it is relatively prime to $P(a+1)$ and $P(a+3)$. Without loss of generality, assume $(P(a), P(a+2))>1$. From (ii), we have $a \equiv 2(\bmod 7)$. The same observation implies $(P(a+1), P(a+3))=1$. In order that the set is fragrant, $(P(a), P(a+3))$ and $(P(a+1), P(a+4))$ must both be greater than 1 . From (iii), this holds only when both $a$ and $a+1$ are congruent to $1 \bmod 3$, which is a contradiction.

It now suffices to construct a fragrant set of size 6 . By the Chinese Remainder Theorem, we can take a positive integer $a$ such that

$$
a \equiv 7 \quad(\bmod 19), \quad a+1 \equiv 2 \quad(\bmod 7), \quad a+2 \equiv 1 \quad(\bmod 3)
$$

For example, we may take $a=197$. From (ii), both $P(a+1)$ and $P(a+3)$ are divisible by 7. From (iii), both $P(a+2)$ and $P(a+5)$ are divisible by 3 . One also checks from $19 \mid P(7)=57$ and $19 \mid P(11)=133$ that $P(a)$ and $P(a+4)$ are divisible by 19 . Therefore, the set $\{P(a), P(a+1), \ldots, P(a+5)\}$ is fragrant.

Therefore, the smallest size of a fragrant set is 6 .

Final answer: 6
Subfield: Number Theory


Question: Let $n, m, k$ and $l$ be positive integers with $n \neq 1$ such that $n^{k}+m n^{l}+1$ divides $n^{k+l}-1$. Prove that

- $m=1$ and $l=2 k$; or
- $l \mid k$ and $m=\frac{n^{k-l}-1}{n^{l}-1}$.

Solution:
It is given that

$$
n^{k}+m n^{l}+1 \mid n^{k+l}-1
\tag{1}
$$

This implies

$$
n^{k}+m n^{l}+1 \mid\left(n^{k+l}-1\right)+\left(n^{k}+m n^{l}+1\right)=n^{k+l}+n^{k}+m n^{l} .\tag{2}
$$

We have two cases to discuss.

- Case 1. $l \geqslant k$.

Since $\left(n^{k}+m n^{l}+1, n\right)=1,(2)$ yields

$$
n^{k}+m n^{l}+1 \mid n^{l}+m n^{l-k}+1
$$

In particular, we get $n^{k}+m n^{l}+1 \leqslant n^{l}+m n^{l-k}+1$. As $n \geqslant 2$ and $k \geqslant 1,(m-1) n^{l}$ is at least $2(m-1) n^{l-k}$. It follows that the inequality cannot hold when $m \geqslant 2$. For $m=1$, the above divisibility becomes

$$
n^{k}+n^{l}+1 \mid n^{l}+n^{l-k}+1
$$

Note that $n^{l}+n^{l-k}+1<n^{l}+n^{l}+1<2\left(n^{k}+n^{l}+1\right)$. Thus we must have $n^{l}+n^{l-k}+1=n^{k}+n^{l}+1$ so that $l=2 k$, which gives the first result.

- Case 2. $l<k$.

This time (2) yields

$$
n^{k}+m n^{l}+1 \mid n^{k}+n^{k-l}+m \text {. }
$$

In particular, we get $n^{k}+m n^{l}+1 \leqslant n^{k}+n^{k-l}+m$, which implies

$$
m \leqslant \frac{n^{k-l}-1}{n^{l}-1}
\tag{3}
$$

On the other hand, from (1) we may let $n^{k+l}-1=\left(n^{k}+m n^{l}+1\right) t$ for some positive integer $t$. Obviously, $t$ is less than $n^{l}$, which means $t \leqslant n^{l}-1$ as it is an integer. Then we have $n^{k+l}-1 \leqslant\left(n^{k}+m n^{l}+1\right)\left(n^{l}-1\right)$, which is the same as

$$
m \geqslant \frac{n^{k-l}-1}{n^{l}-1}\tag{4}
$$

Equations (3) and (4) combine to give $m=\frac{n^{k-l}-1}{n^{l}-1}$. As this is an integer, we have $l \mid k-l$. This means $l \mid k$ and it corresponds to the second result.
It is given that

$$
n^{k}+m n^{l}+1 \mid n^{k+l}-1
\tag{1}
$$

This implies

$$
n^{k}+m n^{l}+1 \mid\left(n^{k+l}-1\right)+\left(n^{k}+m n^{l}+1\right)=n^{k+l}+n^{k}+m n^{l} .\tag{2}
$$

we begin with equation (2).

- Case 1. $l \geqslant k$.

Then (2) yields

$$
n^{k}+m n^{l}+1 \mid n^{l}+m n^{l-k}+1 \text {. }
$$

Since $2\left(n^{k}+m n^{l}+1\right)>2 m n^{l}+1>n^{l}+m n^{l-k}+1$, it follows that $n^{k}+m n^{l}+1=n^{l}+m n^{l-k}+1$, that is,

$$
m\left(n^{l}-n^{l-k}\right)=n^{l}-n^{k} .
$$

If $m \geqslant 2$, then $m\left(n^{l}-n^{l-k}\right) \geqslant 2 n^{l}-2 n^{l-k} \geqslant 2 n^{l}-n^{l}>n^{l}-n^{k}$ gives a contradiction. Hence $m=1$ and $l-k=k$, which means $m=1$ and $l=2 k$.

- Case 2. $l<k$.

Then (2) yields

$$
n^{k}+m n^{l}+1 \mid n^{k}+n^{k-l}+m \text {. }
$$

Since $2\left(n^{k}+m n^{l}+1\right)>2 n^{k}+m>n^{k}+n^{k-l}+m$, it follows that $n^{k}+m n^{l}+1=n^{k}+n^{k-l}+m$. This gives $m=\frac{n^{k-l}-1}{n^{l}-1}$. Note that $n^{l}-1 \mid n^{k-l}-1$ implies $l \mid k-l$ and hence $l \mid k$. The proof is thus complete.
Subfield: Number Theory


Question: Denote by $\mathbb{N}$ the set of all positive integers. Find all functions $f: \mathbb{N} \rightarrow \mathbb{N}$ such that for all positive integers $m$ and $n$, the integer $f(m)+f(n)-m n$ is nonzero and divides $m f(m)+n f(n)$.

Solution:
It is given that

$$
f(m)+f(n)-m n \mid m f(m)+n f(n) .
\tag{1}
$$

Taking $m=n=1$ in (1), we have $2 f(1)-1 \mid 2 f(1)$. Then $2 f(1)-1 \mid 2 f(1)-(2 f(1)-1)=1$ and hence $f(1)=1$.

Let $p \geqslant 7$ be a prime. Taking $m=p$ and $n=1$ in (1), we have $f(p)-p+1 \mid p f(p)+1$ and hence

$$
f(p)-p+1 \mid p f(p)+1-p(f(p)-p+1)=p^{2}-p+1 .
$$

If $f(p)-p+1=p^{2}-p+1$, then $f(p)=p^{2}$. If $f(p)-p+1 \neq p^{2}-p+1$, as $p^{2}-p+1$ is an odd positive integer, we have $p^{2}-p+1 \geqslant 3(f(p)-p+1)$, that is,

$$
f(p) \leqslant \frac{1}{3}\left(p^{2}+2 p-2\right)
\tag{2}
$$

Taking $m=n=p$ in (1), we have $2 f(p)-p^{2} \mid 2 p f(p)$. This implies

$$
2 f(p)-p^{2} \mid 2 p f(p)-p\left(2 f(p)-p^{2}\right)=p^{3} .
$$

By $(2)$ and $f(p) \geqslant 1$, we get

$$
-p^{2}<2 f(p)-p^{2} \leqslant \frac{2}{3}\left(p^{2}+2 p-2\right)-p^{2}<-p
$$

since $p \geqslant 7$. This contradicts the fact that $2 f(p)-p^{2}$ is a factor of $p^{3}$. Thus we have proved that $f(p)=p^{2}$ for all primes $p \geqslant 7$.

Let $n$ be a fixed positive integer. Choose a sufficiently large prime $p$. Consider $m=p$ in (1). We obtain

$$
f(p)+f(n)-p n \mid p f(p)+n f(n)-n(f(p)+f(n)-p n)=p f(p)-n f(p)+p n^{2} .
$$

As $f(p)=p^{2}$, this implies $p^{2}-p n+f(n) \mid p\left(p^{2}-p n+n^{2}\right)$. As $p$ is sufficiently large and $n$ is fixed, $p$ cannot divide $f(n)$, and so $\left(p, p^{2}-p n+f(n)\right)=1$. It follows that $p^{2}-p n+f(n) \mid p^{2}-p n+n^{2}$ and hence

$$
p^{2}-p n+f(n) \mid\left(p^{2}-p n+n^{2}\right)-\left(p^{2}-p n+f(n)\right)=n^{2}-f(n) .
$$

Note that $n^{2}-f(n)$ is fixed while $p^{2}-p n+f(n)$ is chosen to be sufficiently large. Therefore, we must have $n^{2}-f(n)=0$ so that $f(n)=n^{2}$ for any positive integer $n$.

Finally, we check that when $f(n)=n^{2}$ for any positive integer $n$, then

$$
f(m)+f(n)-m n=m^{2}+n^{2}-m n
$$

and

$$
m f(m)+n f(n)=m^{3}+n^{3}=(m+n)\left(m^{2}+n^{2}-m n\right) .
$$

The latter expression is divisible by the former for any positive integers $m, n$. This shows $f(n)=n^{2}$ is the only solution.

Final answer: $f(n)=n^{2}$
Subfield: Algebra


Question: Let $n$ be a positive integer, and set $N=2^{n}$. Determine the smallest real number $a_{n}$ such that, for all real $x$,

$$
\sqrt[N]{\frac{x^{2 N}+1}{2}} \leqslant a_{n}(x-1)^{2}+x
$$

Solution:
First of all, assume that $a_{n}<N / 2$ satisfies the condition. Take $x=1+t$ for $t>0$, we should have

$$
\frac{(1+t)^{2 N}+1}{2} \leqslant\left(1+t+a_{n} t^{2}\right)^{N}
$$

Expanding the brackets we get

$$
\left(1+t+a_{n} t^{2}\right)^{N}-\frac{(1+t)^{2 N}+1}{2}=\left(N a_{n}-\frac{N^{2}}{2}\right) t^{2}+c_{3} t^{3}+\ldots+c_{2 N} t^{2 N}
\tag{1}
$$

with some coefficients $c_{3}, \ldots, c_{2 N}$. Since $a_{n}<N / 2$, the right hand side of (1) is negative for sufficiently small $t$. A contradiction.

It remains to prove the following inequality

$$
\text{let   }\mathcal{I}(N, x)\text{   be   }\sqrt[N]{\frac{1+x^{2 N}}{2}} \leqslant x+\frac{N}{2}(x-1)^{2}
$$

where $N=2^{n}$.

Use induction in $n$. The base case $n=0$ is trivial: $N=1$ and both sides of $\mathcal{I}(N, x)$ are equal to $\left(1+x^{2}\right) / 2$. For completing the induction we prove $\mathcal{I}(2 N, x)$ assuming that $\mathcal{I}(N, y)$ is established for all real $y$. We have

$$
\begin{aligned}
\left(x+N(x-1)^{2}\right)^{2} & =x^{2}+N^{2}(x-1)^{4}+N(x-1)^{2} \frac{(x+1)^{2}-(x-1)^{2}}{2} \\
& =x^{2}+\frac{N}{2}\left(x^{2}-1\right)^{2}+\left(N^{2}-\frac{N}{2}\right)(x-1)^{4} \geqslant x^{2}+\frac{N}{2}\left(x^{2}-1\right)^{2} \geqslant \sqrt[N]{\frac{1+x^{4 N}}{2}}
\end{aligned}
$$

where the last inequality is $\mathcal{I}\left(N, x^{2}\right)$. Since

$$
x+N(x-1)^{2} \geqslant x+\frac{(x-1)^{2}}{2}=\frac{x^{2}+1}{2} \geqslant 0
$$

taking square root we get $\mathcal{I}(2 N, x)$. The inductive step is complete.

Final answer: $\frac{N}{2}$
Subfield: Algebra


Question: Let $\mathcal{A}$ denote the set of all polynomials in three variables $x, y, z$ with integer coefficients. Let $\mathcal{B}$ denote the subset of $\mathcal{A}$ formed by all polynomials which can be expressed as

$$
(x+y+z) P(x, y, z)+(x y+y z+z x) Q(x, y, z)+x y z R(x, y, z)
$$

with $P, Q, R \in \mathcal{A}$. Find the smallest non-negative integer $n$ such that $x^{i} y^{j} z^{k} \in \mathcal{B}$ for all nonnegative integers $i, j, k$ satisfying $i+j+k \geqslant n$.

Solution:
We start by showing that $n \leqslant 4$, i.e., any monomial $f=x^{i} y^{j} z^{k}$ with $i+j+k \geqslant 4$ belongs to $\mathcal{B}$. Assume that $i \geqslant j \geqslant k$, the other cases are analogous.

Let $x+y+z=p, x y+y z+z x=q$ and $x y z=r$. Then

$$
0=(x-x)(x-y)(x-z)=x^{3}-p x^{2}+q x-r
$$

therefore $x^{3} \in \mathcal{B}$. Next, $x^{2} y^{2}=x y q-(x+y) r \in \mathcal{B}$.

If $k \geqslant 1$, then $r$ divides $f$, thus $f \in \mathcal{B}$. If $k=0$ and $j \geqslant 2$, then $x^{2} y^{2}$ divides $f$, thus we have $f \in \mathcal{B}$ again. Finally, if $k=0, j \leqslant 1$, then $x^{3}$ divides $f$ and $f \in \mathcal{B}$ in this case also.

In order to prove that $n \geqslant 4$, we show that the monomial $x^{2} y$ does not belong to $\mathcal{B}$. Assume the contrary:

$$
x^{2} y=p P+q Q+r R
\tag{1}
$$

for some polynomials $P, Q, R$. If polynomial $P$ contains the monomial $x^{2}$ (with nonzero coefficient), then $p P+q Q+r R$ contains the monomial $x^{3}$ with the same nonzero coefficient. So $P$ does not contain $x^{2}, y^{2}, z^{2}$ and we may write

$$
x^{2} y=(x+y+z)(a x y+b y z+c z x)+(x y+y z+z x)(d x+e y+f z)+g x y z
$$

where $a, b, c ; d, e, f ; g$ are the coefficients of $x y, y z, z x ; x, y, z ; x y z$ in the polynomials $P$; $Q ; R$, respectively (the remaining coefficients do not affect the monomials of degree 3 in $p P+q Q+r R$ ). By considering the coefficients of $x y^{2}$ we get $e=-a$, analogously $e=-b$, $f=-b, f=-c, d=-c$, thus $a=b=c$ and $f=e=d=-a$, but then the coefficient of $x^{2} y$ in the right hand side equals $a+d=0 \neq 1$.

Final answer: 4
Subfield: Algebra


Question: Let $a, b, c, d$ be four real numbers such that $a \geqslant b \geqslant c \geqslant d>0$ and $a+b+c+d=1$. Prove that

$$
(a+2 b+3 c+4 d) a^{a} b^{b} c^{c} d^{d}<1
$$

Solution:
The weighted AM-GM inequality with weights $a, b, c, d$ gives

$$
a^{a} b^{b} c^{c} d^{d} \leqslant a \cdot a+b \cdot b+c \cdot c+d \cdot d=a^{2}+b^{2}+c^{2}+d^{2}
$$

so it suffices to prove that $(a+2 b+3 c+4 d)\left(a^{2}+b^{2}+c^{2}+d^{2}\right)<1=(a+b+c+d)^{3}$. This can be done in various ways, for example:

$$
\begin{gathered}
(a+b+c+d)^{3}>a^{2}(a+3 b+3 c+3 d)+b^{2}(3 a+b+3 c+3 d) \\
\quad+c^{2}(3 a+3 b+c+3 d)+d^{2}(3 a+3 b+3 c+d) \\
\geqslant\left(a^{2}+b^{2}+c^{2}+d^{2}\right) \cdot(a+2 b+3 c+4 d)
\end{gathered}
$$
From $b \geqslant d$ we get

$$
a+2 b+3 c+4 d \leqslant a+3 b+3 c+3 d=3-2 a .
$$

If $a<\frac{1}{2}$, then the statement can be proved by

$$
(a+2 b+3 c+4 d) a^{a} b^{b} c^{c} d^{d} \leqslant(3-2 a) a^{a} a^{b} a^{c} a^{d}=(3-2 a) a=1-(1-a)(1-2 a)<1 .
$$

From now on we assume $\frac{1}{2} \leqslant a<1$.

By $b, c, d<1-a$ we have

$$
b^{b} c^{c} d^{d}<(1-a)^{b} \cdot(1-a)^{c} \cdot(1-a)^{d}=(1-a)^{1-a} .
$$

Therefore,

$$
(a+2 b+3 c+4 d) a^{a} b^{b} c^{c} d^{d}<(3-2 a) a^{a}(1-a)^{1-a} .
$$

For $0<x<1$, consider the functions

$f(x)=(3-2 x) x^{x}(1-x)^{1-x} \quad$ and $\quad g(x)=\log f(x)=\log (3-2 x)+x \log x+(1-x) \log (1-x) ;$ hereafter, log denotes the natural logarithm. It is easy to verify that

$$
g^{\prime \prime}(x)=-\frac{4}{(3-2 x)^{2}}+\frac{1}{x}+\frac{1}{1-x}=\frac{1+8(1-x)^{2}}{x(1-x)(3-2 x)^{2}}>0,
$$

so $g$ is strictly convex on $(0,1)$.

By $g\left(\frac{1}{2}\right)=\log 2+2 \cdot \frac{1}{2} \log \frac{1}{2}=0$ and $\lim _{x \rightarrow 1-} g(x)=0$, we have $g(x) \leqslant 0$ (and hence $f(x) \leqslant 1$ ) for all $x \in\left[\frac{1}{2}, 1\right)$, and therefore

$$
(a+2 b+3 c+4 d) a^{a} b^{b} c^{c} d^{d}<f(a) \leqslant 1 .
$$
Subfield: Algebra


Question: A magician intends to perform the following trick. She announces a positive integer $n$, along with $2 n$ real numbers $x_{1}<\ldots<x_{2 n}$, to the audience. A member of the audience then secretly chooses a polynomial $P(x)$ of degree $n$ with real coefficients, computes the $2 n$ values $P\left(x_{1}\right), \ldots, P\left(x_{2 n}\right)$, and writes down these $2 n$ values on the blackboard in non-decreasing order. After that the magician announces the secret polynomial to the audience.

Prove that the magician cannot find a strategy to perform such a trick.

Solution:
Let $x_{1}<x_{2}<\ldots<x_{2 n}$ be real numbers chosen by the magician. We will construct two distinct polynomials $P(x)$ and $Q(x)$, each of degree $n$, such that the member of audience will write down the same sequence for both polynomials. This will mean that the magician cannot distinguish $P$ from $Q$.

Claim. There exists a polynomial $P(x)$ of degree $n$ such that $P\left(x_{2 i-1}\right)+P\left(x_{2 i}\right)=0$ for $i=$ $1,2, \ldots, n$.

Proof. We want to find a polynomial $a_{n} x^{n}+\ldots+a_{1} x+a_{0}$ satisfying the following system of equations:

$$
\left\{\begin{array}{l}
\left(x_{1}^{n}+x_{2}^{n}\right) a_{n}+\left(x_{1}^{n-1}+x_{2}^{n-1}\right) a_{n-1}+\ldots+2 a_{0}=0 \\
\left(x_{3}^{n}+x_{4}^{n}\right) a_{n}+\left(x_{3}^{n-1}+x_{4}^{n-1}\right) a_{n-1}+\ldots+2 a_{0}=0 \\
\ldots \\
\left(x_{2 n-1}^{n}+x_{2 n}^{n}\right) a_{n}+\left(x_{2 n-1}^{n-1}+x_{2 n}^{n-1}\right) a_{n-1}+\ldots+2 a_{0}=0
\end{array}\right.
$$

We use the well known fact that a homogeneous system of $n$ linear equations in $n+1$ variables has a nonzero solution. (This fact can be proved using induction on $n$, via elimination of variables.) Applying this fact to the above system, we find a nonzero polynomial $P(x)$ of degree not exceeding $n$ such that its coefficients $a_{0}, \ldots, a_{n}$ satisfy this system. Therefore $P\left(x_{2 i-1}\right)+P\left(x_{2 i}\right)=0$ for all $i=1,2, \ldots, n$. Notice that $P$ has a root on each segment $\left[x_{2 i-1}, x_{2 i}\right]$ by the Intermediate Value theorem, so $n$ roots in total. Since $P$ is nonzero, we get $\operatorname{deg} P=n$.

Now consider a polynomial $P(x)$ provided by the Claim, and take $Q(x)=-P(x)$. The properties of $P(x)$ yield that $P\left(x_{2 i-1}\right)=Q\left(x_{2 i}\right)$ and $Q\left(x_{2 i-1}\right)=P\left(x_{2 i}\right)$ for all $i=1,2, \ldots, n$. It is also clear that $P \neq-P=Q$ and $\operatorname{deg} Q=\operatorname{deg} P=n$.

So the magician cannot find a strategy to perform such a trick.
Subfield: Algebra


Question: Let $n$ and $k$ be positive integers. Prove that for $a_{1}, \ldots, a_{n} \in\left[1,2^{k}\right]$ one has

$$
\sum_{i=1}^{n} \frac{a_{i}}{\sqrt{a_{1}^{2}+\ldots+a_{i}^{2}}} \leqslant 4 \sqrt{k n}
$$

Solution:
Partition the set of indices $\{1,2, \ldots, n\}$ into disjoint subsets $M_{1}, M_{2}, \ldots, M_{k}$ so that $a_{\ell} \in\left[2^{j-1}, 2^{j}\right]$ for $\ell \in M_{j}$. Then, if $\left|M_{j}\right|=: p_{j}$, we have

$$
\sum_{\ell \in M_{j}} \frac{a_{\ell}}{\sqrt{a_{1}^{2}+\ldots+a_{\ell}^{2}}} \leqslant \sum_{i=1}^{p_{j}} \frac{2^{j}}{2^{j-1} \sqrt{i}}=2 \sum_{i=1}^{p_{j}} \frac{1}{\sqrt{i}}
$$

where we used that $a_{\ell} \leqslant 2^{j}$ and in the denominator every index from $M_{j}$ contributes at least $\left(2^{j-1}\right)^{2}$. Now, using $\sqrt{i}-\sqrt{i-1}=\frac{1}{\sqrt{i}+\sqrt{i-1}} \geqslant \frac{1}{2 \sqrt{i}}$, we deduce that

$$
\sum_{\ell \in M_{j}} \frac{a_{\ell}}{\sqrt{a_{1}^{2}+\ldots+a_{\ell}^{2}}} \leqslant 2 \sum_{i=1}^{p_{j}} \frac{1}{\sqrt{i}} \leqslant 2 \sum_{i=1}^{p_{j}} 2(\sqrt{i}-\sqrt{i-1})=4 \sqrt{p_{j}}
$$

Therefore, summing over $j=1, \ldots, k$ and using the QM-AM inequality, we obtain

$$
\sum_{\ell=1}^{n} \frac{a_{\ell}}{\sqrt{a_{1}^{2}+\ldots+a_{\ell}^{2}}} \leqslant 4 \sum_{j=1}^{k} \sqrt{\left|M_{j}\right|} \leqslant 4 \sqrt{k \sum_{j=1}^{k}\left|M_{j}\right|}=4 \sqrt{k n}
$$
Apply induction on $n$. The base $n \leqslant 16$ is clear: our sum does not exceed $n \leqslant 4 \sqrt{n k}$. For the inductive step from $1, \ldots, n-1$ to $n \geqslant 17$ consider two similar cases.

Case 1: $n=2 t$.

Let $x_{\ell}=\frac{a_{\ell}}{\sqrt{a_{1}^{2}+\ldots+a_{\ell}^{2}}}$. We have

$$
\exp \left(-x_{t+1}^{2}-\ldots-x_{2 t}^{2}\right) \geqslant\left(1-x_{t+1}^{2}\right) \ldots\left(1-x_{2 t}^{2}\right)=\frac{a_{1}^{2}+\ldots+a_{t}^{2}}{a_{1}^{2}+\ldots+a_{2 t}^{2}} \geqslant \frac{1}{1+4^{k}}
$$

where we used that the product is telescopic and then an estimate $a_{t+i} \leqslant 2^{k} a_{i}$ for $i=1, \ldots, t$. Therefore, $x_{t+1}^{2}+\ldots+x_{2 t}^{2} \leqslant \log \left(4^{k}+1\right) \leqslant 2 k$, where log denotes the natural logarithm. This implies $x_{t+1}+\ldots+x_{2 t} \leqslant \sqrt{2 k t}$. Hence, using the inductive hypothesis for $n=t$ we get

$$
\sum_{\ell=1}^{2 t} x_{\ell} \leqslant 4 \sqrt{k t}+\sqrt{2 k t} \leqslant 4 \sqrt{2 k t}
$$



Case 2: $n=2 t+1$.

Analogously, we get $x_{t+2}^{2}+\ldots+x_{2 t+1}^{2} \leqslant \log \left(4^{k}+1\right) \leqslant 2 k$ and

$$
\sum_{\ell=1}^{2 t+1} x_{\ell} \leqslant 4 \sqrt{k(t+1)}+\sqrt{2 k t} \leqslant 4 \sqrt{k(2 t+1)}
$$

The last inequality is true for all $t \geqslant 8$ since

$$
4 \sqrt{2 t+1}-\sqrt{2 t} \geqslant 3 \sqrt{2 t}=\sqrt{18 t} \geqslant \sqrt{16 t+16}=4 \sqrt{t+1} .
$$
Subfield: Combinatorics


Question: In a regular 100-gon, 41 vertices are colored black and the remaining 59 vertices are colored white. Prove that there exist 24 convex quadrilaterals $Q_{1}, \ldots, Q_{24}$ whose corners are vertices of the 100 -gon, so that

- the quadrilaterals $Q_{1}, \ldots, Q_{24}$ are pairwise disjoint, and
- every quadrilateral $Q_{i}$ has three corners of one color and one corner of the other color.

Solution:
Call a quadrilateral skew-colored, if it has three corners of one color and one corner of the other color. We will prove the following

Claim. If the vertices of a convex $(4 k+1)$-gon $P$ are colored black and white such that each color is used at least $k$ times, then there exist $k$ pairwise disjoint skew-colored quadrilaterals whose vertices are vertices of $P$. (One vertex of $P$ remains unused.)

The problem statement follows by removing 3 arbitrary vertices of the 100-gon and applying the Claim to the remaining 97 vertices with $k=24$.

Proof of the Claim. We prove by induction. For $k=1$ we have a pentagon with at least one black and at least one white vertex. If the number of black vertices is even then remove a black vertex; otherwise remove a white vertex. In the remaining quadrilateral, there are an odd number of black and an odd number of white vertices, so the quadrilateral is skew-colored.

For the induction step, assume $k \geqslant 2$. Let $b$ and $w$ be the numbers of black and white vertices, respectively; then $b, w \geqslant k$ and $b+w=4 k+1$. Without loss of generality we may assume $w \geqslant b$, so $k \leqslant b \leqslant 2 k$ and $2 k+1 \leqslant w \leqslant 3 k+1$.

We want to find four consecutive vertices such that three of them are white, the fourth one is black. Denote the vertices by $V_{1}, V_{2}, \ldots, V_{4 k+1}$ in counterclockwise order, such that $V_{4 k+1}$ is black, and consider the following $k$ groups of vertices:

$$
\left(V_{1}, V_{2}, V_{3}, V_{4}\right),\left(V_{5}, V_{6}, V_{7}, V_{8}\right), \ldots,\left(V_{4 k-3}, V_{4 k-2}, V_{4 k-1}, V_{4 k}\right)
$$

In these groups there are $w$ white and $b-1$ black vertices. Since $w>b-1$, there is a group, $\left(V_{i}, V_{i+1}, V_{i+2}, V_{i+3}\right)$ that contains more white than black vertices. If three are white and one is black in that group, we are done. Otherwise, if $V_{i}, V_{i+1}, V_{i+2}, V_{i+3}$ are all white then let $V_{j}$ be the first black vertex among $V_{i+4}, \ldots, V_{4 k+1}$ (recall that $V_{4 k+1}$ is black); then $V_{j-3}, V_{j-2}$ and $V_{j-1}$ are white and $V_{j}$ is black.

Now we have four consecutive vertices $V_{i}, V_{i+1}, V_{i+2}, V_{i+3}$ that form a skew-colored quadrilateral. The remaining vertices form a convex $(4 k-3)$-gon; $w-3$ of them are white and $b-1$ are black. Since $b-1 \geqslant k-1$ and $w-3 \geqslant(2 k+1)-3>k-1$, we can apply the Claim with $k-1$.