2022 Azerbaijan EGMO/CMO TST

G1

Let $ABC$ be an isosceles triangle with $AC = BC$ and circumcircle $k$. The point $D$ lies on the shorter arc of $k$ over the chord $BC$ and is different from $B$ and $C$. Let $E$ denote the intersection of $CD$ and $AB$. Prove that the line through $B$ and $C$ is a tangent of the circumcircle of the triangle $BDE$. (Karl Czakler)

A2

Let $a, b$ and $c$ be pairwise different natural numbers. Prove $\frac{a^3 + b^3 + c^3}{3} \ge abc + a + b + c$. When does equality holds? (Karl Czakler)

C3

Suppose $n\geq 3$ is an integer. There are $n$ grids on a circle. We put a stone in each grid. Find all positive integer $n$, such that we can perform the following operation $n-2$ times, and then there exists a grid with $n-1$ stones in it: $\bullet$ Pick a grid $A$ with at least one stone in it. And pick a positive integer $k\leq n-1$. Take all stones in the $k$-th grid after $A$ in anticlockwise direction. And put then in the $k$-th grid after $A$ in clockwise direction.

N4

Let $n\geq 1$ be a positive integer. We say that an integer $k$ is a fan of $n$ if $0\leq k\leq n-1$ and there exist integers $x,y,z\in\mathbb{Z}$ such that \begin{align*} x^2+y^2+z^2 &\equiv 0 \pmod n;\\ xyz &\equiv k \pmod n. \end{align*}Let $f(n)$ be the number of fans of $n$. Determine $f(2020)$.