olympiads-ref / BalticWay /md /en-bw20sol.md
beichen0426's picture
Duplicate from AI-MO/olympiads-ref
63c5bce verified

Baltic Way 2020

Official solutions

Problem 1. Let $a_{0}>0$ be a real number, and let

an=an11+2020an12, for n=1,2,,2020 a_{n}=\frac{a_{n-1}}{\sqrt{1+2020 \cdot a_{n-1}^{2}}}, \quad \text { for } n=1,2, \ldots, 2020

Show that $a_{2020}<\frac{1}{2020}$.

Solution.

Let $b_{n}=\frac{1}{a_{n}^{2}}$. Then $b_{0}=\frac{1}{a_{0}^{2}}$ and

bn=1+2020an12an12=bn1(1+20201bn1)=bn1+2020. b_{n}=\frac{1+2020 \cdot a_{n-1}^{2}}{a_{n-1}^{2}}=b_{n-1}\left(1+2020 \cdot \frac{1}{b_{n-1}}\right)=b_{n-1}+2020 .

Hence $b_{2020}=b_{0}+2020^{2}=\frac{1}{a_{0}^{2}}+2020^{2}$ and $a_{2020}^{2}=\frac{1}{\frac{1}{a_{0}^{2}}+2020^{2}}<\frac{1}{2020^{2}}$ which shows that $a_{2020}<\frac{1}{2020}$.

Problem 2. Let $a, b, c$ be positive real numbers such that $a b c=1$. Prove that

1ac2+1+1ba2+1+1cb2+1>2. \frac{1}{a \sqrt{c^{2}+1}}+\frac{1}{b \sqrt{a^{2}+1}}+\frac{1}{c \sqrt{b^{2}+1}}>2 .

Solution.

Denote $a=\frac{x}{y}, b=\frac{y}{z}, c=\frac{z}{x}$. Then

1ac2+1=1xyz2x2+1=yz2+x22y2x2+y2+z2 \frac{1}{a \sqrt{c^{2}+1}}=\frac{1}{\frac{x}{y} \sqrt{\frac{z^{2}}{x^{2}}+1}}=\frac{y}{\sqrt{z^{2}+x^{2}}} \geqslant \frac{2 y^{2}}{x^{2}+y^{2}+z^{2}}

where the last inequality follows from the AM-GM inequality

yx2+z2y2+(x2+z2)2. y \sqrt{x^{2}+z^{2}} \leqslant \frac{y^{2}+\left(x^{2}+z^{2}\right)}{2} .

If we do the same estimation also for the two other terms of the original inequality then we get

1ac2+1+1ba2+1+1cb2+12y2x2+y2+z2+2z2x2+y2+z2+2x2x2+y2+z2=2. \frac{1}{a \sqrt{c^{2}+1}}+\frac{1}{b \sqrt{a^{2}}+1}+\frac{1}{c \sqrt{b^{2}+1}} \geqslant \frac{2 y^{2}}{x^{2}+y^{2}+z^{2}}+\frac{2 z^{2}}{x^{2}+y^{2}+z^{2}}+\frac{2 x^{2}}{x^{2}+y^{2}+z^{2}}=2 .

Equality holds only if $y^{2}=x^{2}+z^{2}, z^{2}=x^{2}+y^{2}$ and $x^{2}=y^{2}+z^{2}$ what is impossible.

Problem 3. A real sequence $\left(a_{n}\right){n=0}^{\infty}$ is defined recursively by $a{0}=2$ and the recursion formula

an={an12 if an1<3an123 if an13 a_{n}= \begin{cases}a_{n-1}^{2} & \text { if } a_{n-1}<\sqrt{3} \\ \frac{a_{n-1}^{2}}{3} & \text { if } a_{n-1} \geqslant \sqrt{3}\end{cases}

Another real sequence $\left(b_{n}\right)_{n=1}^{\infty}$ is defined in terms of the first by the formula

bn={0 if an1<312n if an13 b_{n}= \begin{cases}0 & \text { if } a_{n-1}<\sqrt{3} \\ \frac{1}{2^{n}} & \text { if } a_{n-1} \geqslant \sqrt{3}\end{cases}

valid for each $n \geqslant 1$. Prove that

b1+b2++b2020<23 b_{1}+b_{2}+\cdots+b_{2020}<\frac{2}{3}

Solution.

The first step is to prove, using induction, the formula

an=22n32n(b1+b2++bn). a_{n}=\frac{2^{2^{n}}}{3^{2^{n}\left(b_{1}+b_{2}+\cdots+b_{n}\right)}} .

The base case $n=0$ is trivial. Assume the formula is valid for $a_{n-1}$, that is,

an1=22n132n1(b1+b2++bn1). a_{n-1}=\frac{2^{2^{n-1}}}{3^{2^{n-1}\left(b_{1}+b_{2}+\cdots+b_{n-1}\right)}} .

If now $a_{n-1}<\sqrt{3}$, then $b_{n}=0$, and so

an=an12=22n32n(b1+b2++bn1)=22n32n(b1+b2++bn1+bn) a_{n}=a_{n-1}^{2}=\frac{2^{2^{n}}}{3^{2^{n}\left(b_{1}+b_{2}+\cdots+b_{n-1}\right)}}=\frac{2^{2^{n}}}{3^{2^{n}\left(b_{1}+b_{2}+\cdots+b_{n-1}+b_{n}\right)}}

whereas if $a_{n-1} \geqslant \sqrt{3}$, then $b_{n}=\frac{1}{2^{n}}$, and so

an=an123=22n32n(b1+b2++bn1)+1=22n32n(b1+b2++bn1+bn). a_{n}=\frac{a_{n-1}^{2}}{3}=\frac{2^{2^{n}}}{3^{2^{n}\left(b_{1}+b_{2}+\cdots+b_{n-1}\right)+1}}=\frac{2^{2^{n}}}{3^{2^{n}\left(b_{1}+b_{2}+\cdots+b_{n-1}+b_{n}\right)}} .

This completes the induction.

Next, we inductively establish the inequality $a_{n} \geqslant 1$. The base case $n=0$ is again trivial. Suppose $a_{n-1} \geqslant 1$. If $a_{n-1}<\sqrt{3}$, then

an=an1212=1, a_{n}=a_{n-1}^{2} \geqslant 1^{2}=1,

whereas if $a_{n-1} \geqslant \sqrt{3}$, then

an=an123(3)23=1 a_{n}=\frac{a_{n-1}^{2}}{3} \geqslant \frac{(\sqrt{3})^{2}}{3}=1

and the induction is complete.

From

1an=22n32n(b1+b2++bn)=(23b1+b2++bn)2n, 1 \leqslant a_{n}=\frac{2^{2^{n}}}{3^{2^{n}\left(b_{1}+b_{2}+\cdots+b_{n}\right)}}=\left(\frac{2}{3^{b_{1}+b_{2}+\cdots+b_{n}}}\right)^{2^{n}},

we may then draw the conclusion

3b1+b2++bn2. 3^{b_{1}+b_{2}+\cdots+b_{n}} \leqslant 2 .

Since $3^{2 / 3}>2$ (and the function $x \mapsto 3^{x}$ is strictly increasing), we must have

b1+b2++bn<23 b_{1}+b_{2}+\cdots+b_{n}<\frac{2}{3}

for all $n$, and we are finished.

Remark. Using only slightly more work, it may be proved that

1an=22n32n(b1+b2++bn)<3 1 \leqslant a_{n}=\frac{2^{2^{n}}}{3^{2^{n}\left(b_{1}+b_{2}+\cdots+b_{n}\right)}}<3

which entails

112n23b1+b2++bn<312n 1^{\frac{1}{2^{n}}} \leqslant \frac{2}{3^{b_{1}+b_{2}+\cdots+b_{n}}}<3^{\frac{1}{2^{n}}}

for all $n$, hence

3b1+b2+=2 3^{b_{1}+b_{2}+\cdots}=2 \text {. }

The problem thus provides an algorithm for calculating

b1+b2+=log320.63 b_{1}+b_{2}+\cdots=\log _{3} 2 \approx 0.63

in binary.

Problem 4. Find all functions $f: \mathbb{R} \rightarrow \mathbb{R}$ so that

f(f(x)+x+y)=f(x+y)+yf(y) f(f(x)+x+y)=f(x+y)+y f(y)

for all real numbers $x, y$.

Solution 1.

Answer: $f(x)=0$ for all $x$.

We first notice that if there exists a number $\alpha$ so that $f(\alpha)=0$, then $f(\alpha+y)=$ $f(f(\alpha)+\alpha+y)=f(\alpha+y)+y f(y)$ for all real $y$. Hence $y f(y)=0$ for all $y$, meaning that $f(y)=0$ for all $y \neq 0$. We are therefore done if we can show that $f(0)=0$, as then $f(x)=0$ for all $x$, which is a solution.

Substituting $y=0$ in the equation yields that:

f(f(x)+x)=f(x)x f(f(x)+x)=f(x) \quad \forall x

Substituting $y=f(x)$ in the equation yields that:

f(f(x)+x+f(x))=f(x+f(x))+f(x)f(f(x)) f(f(x)+x+f(x))=f(x+f(x))+f(x) f(f(x))

Let $z=x+f(x)$. Then:

f(x)=f(x+f(x))=f(z)=f(f(z)+z)=f(f(x+f(x))+x+f(x))=f(f(x)+x+f(x))=f(x+f(x))+f(x)f(f(x))=f(x)+f(x)f(f(x)) \begin{aligned} f(x) & =f(x+f(x))=f(z)=f(f(z)+z) \\ & =f(f(x+f(x))+x+f(x)) \\ & =f(f(x)+x+f(x)) \\ & =f(x+f(x))+f(x) f(f(x)) \\ & =f(x)+f(x) f(f(x)) \end{aligned}

Hence $f(x) f(f(x))=0$ for all $x$. Letting $x=0$ in (1), we get that $f(f(0))=f(0)$, which means that $f(0)^{2}=f(0) f(f(0))=0$. But then we must have $f(0)=0$.

Solution 2.

Substitute $x=0$ and $y=-1$. We obtain $f(f(0)-1)=f(-1)+(-1) \cdot f(-1)=0$.

Substitute $x=f(0)-1$. Then $f(x)=0$ and therefore $f(f(x)+x+y)$ and $f(x+y)$ cancel out. We obtain $0=y f(y)$ for all $y$. It follows that if $y \neq 0$ then $f(y)=0$.

Now, substitute $x=y=0$. We obtain $f(f(0))=f(0)$. Substituting $y=f(0)$ to $0=y f(y)$ yields $f(0) f(f(0))=0$, which means $f(0)^{2}=0$, and finally $f(0)=0$.

Therefore $f(x)=0$ for all $x$, which clearly satisfies the equation.

Problem 5. Find all real numbers $x, y, z$ so that

x2y+y2z+z2=0z3+z2y+zy3+x2y=14(x4+y4) \begin{aligned} x^{2} y+y^{2} z+z^{2} & =0 \\ z^{3}+z^{2} y+z y^{3}+x^{2} y & =\frac{1}{4}\left(x^{4}+y^{4}\right) \end{aligned}

Solution.

Answer: $x=y=z=0$.

$y=0 \Longrightarrow z^{2}=0 \Longrightarrow z=0 \Longrightarrow \frac{1}{4} x^{4}=0 \Longrightarrow x=0 . x=y=z=0$ is a solution, so assume that $y \neq 0$. Then $z=0 \Longrightarrow x^{2} y=0 \Longrightarrow x=0 \Longrightarrow \frac{1}{4} y^{4}=0$, which is a contradiction. Hence $z \neq 0$. Now we solve the quadratic (first) equation w.r.t. $x, y$, and $z$.

x=±4y3z4yz22yy=x2±x44z32zz=y2±y44x2y2 \begin{aligned} & x= \pm \frac{\sqrt{-4 y^{3} z-4 y z^{2}}}{2 y} \\ & y=\frac{-x^{2} \pm \sqrt{x^{4}-4 z^{3}}}{2 z} \\ & z=\frac{-y^{2} \pm \sqrt{y^{4}-4 x^{2} y}}{2} \end{aligned}

The discriminants must be non-negative.

4y3z4yz20x44z30y44x2y0 \begin{gathered} -4 y^{3} z-4 y z^{2} \geqslant 0 \\ x^{4}-4 z^{3} \geqslant 0 \\ y^{4}-4 x^{2} y \geqslant 0 \end{gathered}

Adding the inequalities we get

y44x2y+x44z34y3z4yz2014(x4+y4)z3+z2y+zy3+x2y \begin{gathered} y^{4}-4 x^{2} y+x^{4}-4 z^{3}-4 y^{3} z-4 y z^{2} \geqslant 0 \\ \frac{1}{4}\left(x^{4}+y^{4}\right) \geqslant z^{3}+z^{2} y+z y^{3}+x^{2} y \end{gathered}

But equation 2 says that $\frac{1}{4}\left(x^{4}+y^{4}\right)=z^{3}+z^{2} y+z y^{3}+x^{2} y$. This is only possible if all of the inequalities are in fact equalities, so we have

4y3z4yz2=0x44z3=0y44x2y=0 \begin{gathered} -4 y^{3} z-4 y z^{2}=0 \\ x^{4}-4 z^{3}=0 \\ y^{4}-4 x^{2} y=0 \end{gathered}

This means that $x= \pm \frac{\sqrt{0}}{2 y}=0 \Longrightarrow y=\frac{-0^{2} \pm \sqrt{0}}{2 z}=0$, which is a contradiction. Hence the only solution is $x=y=z=0$.

Problem 6. Let $n>2$ be a given positive integer. There are $n$ guests at Georg's bachelor party and each guest is friends with at least one other guest. Georg organizes a party game among the guests. Each guest receives a jug of water such that there are no two guests with the same amount of water in their jugs. All guests now proceed simultaneously as follows. Every guest takes one cup for each of his friends at the party and distributes all the water from his jug evenly in the cups. He then passes a cup to each of his friends. Each guest having received a cup of water from each of his friends pours the water he has received into his jug. What is the smallest possible number of guests that do not have the same amount of water as they started with?

Solution.

Answer: 2 .

If there are guests $1,2, \ldots, n$ and guest $i$ is friends with guest $i-1$ and $i+1$ modulo $n$ (e.g. guest 1 and guest $n$ are friends). Then if guest $i$ has $i$ amount of water in their jug at the start of the game, then only guest 1 and $n$ end up with a different amount of water than they started with.

To show that there always will be at least two guests with a different amount of water at the end of the game than they started with, let $x_{i}$ and $d_{i}$ be the amount of water and number of friends, respectively, that guest $i$ has. Define $z_{v}=x_{v} / d_{v}$ and assume without loss of generality that the friendship graph of the party is connected. Since every friend has at least one friend, there must exist two guests $a$ and $b$ at the party with the same number of friends by the pigeonhole principle. They must satisfy $z_{a} \neq z_{b}$. Thus, the sets

S={czc=mindzd} and T={czc=maxdzd} S=\left\{c \mid z_{c}=\min _{d} z_{d}\right\} \text { and } T=\left\{c \mid z_{c}=\max _{d} z_{d}\right\}

are non-empty and disjoint. Since we assumed the friendship graph to be connected, there exists a guest $c \in S$ that has a friend $d$ not in $S$. Let $F$ be the friends of $c$ at the party. Then the amount of water in $c$ 's cup at the end of the game is

fFzfzd+(dc1)zc>dczc=xc \sum_{f \in F} z_{f} \geqslant z_{d}+\left(d_{c}-1\right) z_{c}>d_{c} \cdot z_{c}=x_{c}

Thus, $c$ ends up with a different amount of water at the end of the game. Similarly, there is a guest in $T$ that ends up with a different amount of water at the end of the game than what they started with.

Problem 7. A mason has bricks with dimensions $2 \times 5 \times 8$ and other bricks with dimensions $2 \times 3 \times 7$. She also has a box with dimensions $10 \times 11 \times 14$. The bricks and the box are all rectangular parallelepipeds. The mason wants to pack bricks into the box filling its entire volume and with no bricks sticking out. Find all possible values of the total number of bricks that she can pack.

Solution.

Answer: 24.

Let the number of $2 \times 5 \times 8$ bricks in the box be $x$, and the number of $2 \times 3 \times 7$ bricks $y$. We must figure out the sum $x+y$. The volume of the box is divisible by 7 , and so is the volume of any $2 \times 3 \times 7$ brick. The volume of a $2 \times 5 \times 8$ brick is not divisible by 7 , which means that $x$ must be divisible by 7 .

The volume of the box is $10 \cdot 11 \cdot 14$. The volume of the $2 \times 5 \times 8$ bricks in the box is $x \cdot 2 \cdot 5 \cdot 8=80 x$. Since this volume cannot exceed the volume of the box, we must have

x10111480=1174=774<20. x \leqslant \frac{10 \cdot 11 \cdot 14}{80}=\frac{11 \cdot 7}{4}=\frac{77}{4}<20 .

Since $x$ was divisible by 7 , and certainly nonnegative, we conclude that $x$ must be 0,7 or 14 . Let us explore each of these possibilities separately.

If we had $x=0$, then the volume of the $2 \times 3 \times 7$ bricks, which is $y \cdot 2 \cdot 3 \cdot 7$, would be equal to the volume of the box, which is $10 \cdot 11 \cdot 14$. However, this is not possible since the volume of the $2 \times 3 \times 7$ bricks is divisible by three whereas the volume of the box is not. Thus $x$ must be 7 or 14 .

If we had $x=7$, then equating the total volume of the bricks with the volume of the box would give

7258+y237=101114 7 \cdot 2 \cdot 5 \cdot 8+y \cdot 2 \cdot 3 \cdot 7=10 \cdot 11 \cdot 14

so that

y237=1011147258=1540560=980. y \cdot 2 \cdot 3 \cdot 7=10 \cdot 11 \cdot 14-7 \cdot 2 \cdot 5 \cdot 8=1540-560=980 .

However, again the left-hand side, the volume of the $2 \times 3 \times 7$ bricks, is divisible by three, whereas the right-hand side, 980, is not. Thus we cannot have have $x=7$ either, and the only possibility is $x=14$.

Since $x=14$, equating the volumes of the bricks and the box gives

14258+y237=101114 14 \cdot 2 \cdot 5 \cdot 8+y \cdot 2 \cdot 3 \cdot 7=10 \cdot 11 \cdot 14

which in turn leads to

y237=10111414258=15401120=420 y \cdot 2 \cdot 3 \cdot 7=10 \cdot 11 \cdot 14-14 \cdot 2 \cdot 5 \cdot 8=1540-1120=420

so that

y=420237=42042=10 y=\frac{420}{2 \cdot 3 \cdot 7}=\frac{420}{42}=10

Thus the number of bricks in the box can only be $14+10=24$. Finally, for completeness, let us observe that 14 bricks with dimensions $2 \times 5 \times 8$ can be used to fill a volume with dimensions $10 \times 8 \times 14$, and 10 bricks with dimensions $2 \times 3 \times 7$ can be used to fill a volume with dimensions $10 \times 3 \times 14$, so that these 24 bricks can indeed be packed in the box.

Problem 8. Let $n$ be a given positive integer. A restaurant offers a choice of $n$ starters, $n$ main dishes, $n$ desserts and $n$ wines. A merry company dines at the restaurant, with each guest choosing a starter, a main dish, a dessert and a wine. No two people place exactly the same order. It turns out that there is no collection of $n$ guests such that their orders coincide in three of these aspects, but in the fourth one they all differ. (For example, there are no $n$ people that order exactly the same three courses of food, but $n$ different wines.) What is the maximal number of guests?

Solution.

Answer: The maximal number of guests is $n^{4}-n^{3}$.

The possible menus are represented by quadruples

(a,b,c,d),1a,b,c,dn. (a, b, c, d), \quad 1 \leqslant a, b, c, d \leqslant n .

Let us count those menus satisfying

a+b+c+d≢0(n) a+b+c+d \not \equiv 0 \quad(\bmod n)

The numbers $a, b, c$ may be chosen arbitrarily ( $n$ choices for each), and then $d$ is required to satisfy only $d \not \equiv-a-b-c$. Hence there are

n3(n1)=n4n3 n^{3}(n-1)=n^{4}-n^{3}

such menus.

If there are $n^{4}-n^{3}$ guests, and they have chosen precisely the $n^{4}-n^{3}$ menus satisfying $a+b+c+d \not \equiv 0(\bmod n)$, we claim that the condition of the problem is fulfilled. So suppose there is a collection of $n$ people whose orders coincide in three aspects, but differ in the fourth. With no loss of generality, we may assume they have ordered exactly the same food, but $n$ different wines. This means they all have the same value of $a, b$ and $c$, but their values of $d$ are distinct. A contradiction arises since, given $a, b$ and $c$, there are only $n-1$ values available for $d$.

We now show that for $n^{4}-n^{3}+1$ guests (or more), it is impossible to obtain the situation stipulated in the problem. The $n^{3}$ sets

Ma,b,c={(a,b,c,d)1dn},1a,b,cn M_{a, b, c}=\{(a, b, c, d) \mid 1 \leqslant d \leqslant n\}, \quad 1 \leqslant a, b, c \leqslant n

form a partition of the set of possible menus, totalling $n^{4}$. When the number of guests is at least $n^{4}-n^{3}+1$, there are at most $n^{3}-1$ unselected menus. Therefore, there exists a set $M_{a, b, c}$ which contains no unselected menus. That is, all the $n$ menus in $M_{a, b, c}$ have been selected, and the condition of the problem is violated.

Problem 9. Each vertex $v$ and each edge $e$ of a graph $G$ are assigned numbers $f(v) \in{1,2}$ and $f(e) \in{1,2,3}$, respectively. Let $S(v)$ be the sum of numbers assigned to the edges incident to $v$ plus the number $f(v)$. We say that an assignment $f$ is cool if $S(u) \neq S(v)$ for every pair $(u, v)$ of adjacent (i.e. connected by an edge) vertices in $G$. Prove that for every graph there exists a cool assignment.

Solution.

Let $v_{1}, v_{2}, \ldots, v_{n}$ be any ordering of the vertices of $G$. Initially each vertex assigned number 1 , and each edge assigned number 2. One may imagine that there is a chip lying on each vertex, while two chips are lying on each edge. We are going to refine this assignment so as to get a cool one by performing the following greedy procedure. To explain what we do in the $i$ th step, denote by $x_{1}, x_{2}, \ldots, x_{k}$ denote all neighbours of $v_{i}$ with lower index, and let $e_{j}=v_{i} x_{j}$, with $j=1,2, \ldots, k$, denote the corresponding backward edges. For each edge $e_{j}$ we have two possibilities:

(a) if there is only one chip on $x_{j}$, then we may move one chip from $e_{j}$ to $x_{j}$ or do nothing;

(b) if there are two chips on $x_{j}$ we may move one chip from $x_{j}$ to $e_{j}$ or do nothing.

Notice that none of the sums $S\left(x_{j}\right)$ may change as a result of such action. Also, any action on each edge may change the total sum for $v_{i}$ just by one. Hence there are $k+1$ possible values for $S\left(v_{i}\right)$. So, at least one combination of chips gives a sum which is different from each of $S\left(x_{j}\right)$. We fix this combination and go to the next step.

To see that this algorithm ends in a desired configuration, note the following:

  • by the definition of the steps, no vertex value ever leaves the set ${1,2}$;
  • each edge $v_{m} v_{i}$ with $m<i$ is only considered at step $i$, so its value may change only once, staying in $2+{-1,0,+1}={1,2,3}$;
  • $S\left(v_{i}\right)$ can only change in the $i$-th step, when it is made to differ from all $S\left(v_{m}\right)$ with $m<i$ and $v_{m} v_{i}$ being an edge - hence all neighbouring pairs of values $S(\cdot)$ will end up being different.

Problem 10. Alice and Bob are playing hide and seek. Initially, Bob chooses a secret fixed point $B$ in the unit square. Then Alice chooses a sequence of points $P_{0}, P_{1}, \ldots, P_{N}$ in the plane. After choosing $P_{k}$ (but before choosing $P_{k+1}$ ) for $k \geqslant 1$, Bob tells "warmer" if $P_{k}$ is closer to $B$ than $P_{k-1}$, otherwise he says "colder". After Alice has chosen $P_{N}$ and heard Bob's answer, Alice chooses a final point $A$. Alice wins if the distance $A B$ is at most $\frac{1}{2020}$, otherwise Bob wins. Show that if $N=18$, Alice cannot guarantee a win.

Solution.

Let $S_{0}$ be the set of all points in the square, and for each $1 \leqslant k \leqslant N$, let $S_{k}$ be the set of possible points $B$ consistent with everything Bob has said. For each $k$, we then have that $S_{k}$ is the disjoint union of the two possible values $S_{k+1}$ can take for each of Bob's possible answers. Hence once of these must have area $\leqslant \frac{\left|S_{k+1}\right|}{2}$, and the other must have area $\geqslant \frac{\left|S_{k+1}\right|}{2}$. Suppose now that Alice always receives the answer resulting in the greater half. After receiving $N$ answers, then, $\left|S_{N}\right| \geqslant \frac{1}{2^{N}}$. If Alice has a winning strategy, there must be a point $A$ in $S_{N}$ so that the circle of radius $\frac{1}{2020}$ centered at $A$ contains $S_{N}$. Hence $\frac{\pi}{2020^{2}} \geqslant \frac{1}{2^{N}}$. It therefore suffices to show that this inequality does not hold for $N=18$. This follows from the estimates $\pi \leqslant 2^{2}$ and $2020>1024=2^{10}$, meaning that $\frac{\pi}{2020^{2}}>\frac{2^{2}}{2^{20}}=\frac{1}{2^{18}}$.

Comment. In fact, it also holds for $N=20$, but this requires some more estimation work to show by hand. Also, there is a winning strategy for $N=22$, where the square is dissected into right isosceles triangles of successively smaller sizes. This can evidently always be done exactly by choosing $P_{k}$ outside the square. It also seems possible to do this for $P_{k}$ restricted to the interior of the square, but is harder to write up precisely.

Problem 11. Let $A B C$ be a triangle with $A B>A C$. The internal angle bisector of $\angle B A C$ intersects the side $B C$ at $D$. The circles with diameters $B D$ and $C D$ intersect the circumcircle of $\triangle A B C$ a second time at $P \neq B$ and $Q \neq C$, respectively. The lines $P Q$ and $B C$ intersect at $X$. Prove that $A X$ is tangent to the circumcircle of $\triangle A B C$.

Solution 1.

The key observation is that the circumcircle of $\triangle D P Q$ is tangent to $B C$. This can be proved by angle chasing:

BDP=90PBD=90PBC=90(180CQP)=CQP90=DQP. \begin{aligned} \measuredangle B D P & =90^{\circ}-\measuredangle P B D=90^{\circ}-\measuredangle P B C=90^{\circ}-\left(180^{\circ}-\measuredangle C Q P\right) \\ & =\measuredangle C Q P-90^{\circ}=\measuredangle D Q P . \end{aligned}

Now let the tangent to the circumcircle of $\triangle A B C$ at $A$ intersect $B C$ at $Y$. It is well-known (and easy to show) that $Y A=Y D$. This implies that $Y$ lies on the radical axis of the circumcircles of $\triangle A B C$ and $\triangle P D Q$, which is the line $P Q$. Thus $Y \equiv X$, and the claim follows.

Solution 2.

Apply an inversion with center $D$. Let $A^{\prime}$ denote the image of point $A$, etc. Then $\measuredangle C^{\prime} B^{\prime} A^{\prime}=$ $\measuredangle D B^{\prime} A^{\prime}=\measuredangle B A D=\measuredangle D A C=\measuredangle A^{\prime} C^{\prime} D=\measuredangle A^{\prime} C^{\prime} B^{\prime}$, which means that the triangle $\triangle A^{\prime} B^{\prime} C^{\prime}$ is isosceles at $A^{\prime}$. The images of the circles with diameters $B D$ and $C D$ are the lines perpendicular to $B^{\prime} C^{\prime}$ through $B^{\prime}$ and $C^{\prime}$, respectively, and $P^{\prime}, Q^{\prime}$ are the second intersections of these lines with the circumcircle of $\triangle A^{\prime} B^{\prime} C^{\prime}$.

Now let $\rho$ denote the reflection with respect to the perpendicular bisector of $B^{\prime} C^{\prime}$. By symmetry, $\rho$ maps the circumcircle of $\triangle A^{\prime} B^{\prime} C^{\prime}$ to itself and swaps $B^{\prime}, C^{\prime}$, thus it follows that $\rho$ swaps $P^{\prime}$ and $Q^{\prime}$. The point $X^{\prime}$ is the second intersection of the circumcircle of $\triangle D P^{\prime} Q^{\prime}$ with $B^{\prime} C^{\prime}$. Since $\rho$ maps the line $B^{\prime} C^{\prime}$ to itself, this implies that $\rho$ swaps $D$ and $X^{\prime}$. By symmetry, this yields that the circumcircles of $\triangle A^{\prime} B^{\prime} C^{\prime}$ and $\triangle A^{\prime} D X^{\prime}$ are tangent at $A^{\prime}$, which is what we needed to show.

Solution 3.

Define $Y$ as in the first solution. Since $Y D^{2}=Y A^{2}=Y B \cdot Y C$, it follows that the inversion with center $Y$ and radius $Y D$ swaps $B$ and $C$. Since inversion preserves angles, this implies that the circles with diameters $B D$ and $C D$ are mapped to each other. Moreover, the circumcircle of $\triangle A B C$ is mapped to itself. This implies that $P$ and $Q$ are swapped under the inversion, and therefore $P, Q, Y$ are collinear.

Problem 12. Let $A B C$ be a triangle with circumcircle $\omega$. The internal angle bisectors of $\angle A B C$ and $\angle A C B$ intersect $\omega$ at $X \neq B$ and $Y \neq C$, respectively. Let $K$ be a point on $C X$ such that $\angle K A C=90^{\circ}$. Similarly, let $L$ be a point on $B Y$ such that $\angle L A B=90^{\circ}$. Let $S$ be the midpoint of $\operatorname{arc} C A B$ of $\omega$. Prove that $S K=S L$.

Solution 1.

W.l.o.g. let $A B<A C$. We will prove that triangles $K X S$ and $S Y L$ are congruent by SAS, which will finish the proof.

As $B X$ and $C Y$ are angle bisectors, we obtain:

12C\overparenAB=C\overparenXS=\overparenCX+\overparenXS=12C\overparenXA+\overparenXS \frac{1}{2} C \overparen{A} B=C \overparen{X} S=\overparen{C X}+\overparen{X S}=\frac{1}{2} C \overparen{X} A+\overparen{X S}

This implies $\widehat{X S}=\frac{1}{2} A \widehat{Y} B=\widehat{Y B}$ and therefore $S X=Y B$. Note that $B Y=Y A$, hence $Y$ is the midpoint of the hypotenuse $B L$ in $\triangle A B L$. Thus $S X=Y B=Y L$. Similarly, we get $S Y=X K$.

Finally, as $S$ is the midpoint of $\operatorname{arc} C \widehat{A} B$, we obtain $\angle S X C=\angle B Y S$, thus $\angle K X S=\angle S Y L$, finishing the proof of congruency.

Solution 2.

Let $I$ be the incenter of $\triangle A B C$. It is well-known that $A Y=B Y=I Y$ and $A X=C X=I X$. By Thales, this implies that $Y$ is the midpoint of $B L$ and $X$ is the midpoint of $C K$. In particular, $I Y=L Y$ and $I X=K X$.

Next, observe that $\measuredangle S Y L=180^{\circ}-\measuredangle B Y S=\measuredangle S C B=\measuredangle C B S=\measuredangle C Y S=\measuredangle I Y S$, which means that $S Y$ is the angle bisector of $\angle I Y L$. Since $I Y=L Y$, this implies that $I S=L S$. Analogously, we can show that $I S=K S$, which completes the proof.

Problem 13. Let $A B C$ be an acute triangle with circumcircle $\omega$. Let $\ell$ be the tangent line to $\omega$ at $A$. Let $X$ and $Y$ be the projections of $B$ onto lines $\ell$ and $A C$, respectively. Let $H$ be the orthocenter of $B X Y$. Let $C H$ intersect $\ell$ at $D$. Prove that $B A$ bisects angle $C B D$.

Solution 1.

Note that $X H \perp B Y \perp A C$ and $Y H \perp B X \perp A D$. Therefore $X H | A C$ and $Y H | A D$. It follows that

ADAX=CDCH=CACYADCA=AXCY=ABcosXABCBcosYCB \frac{A D}{A X}=\frac{C D}{C H}=\frac{C A}{C Y} \Longrightarrow \frac{A D}{C A}=\frac{A X}{C Y}=\frac{A B \cos \angle X A B}{C B \cos \angle Y C B}

Since $\ell$ is tangent to $\omega$, we have $\angle X A B=\angle Y C B$. Thus the cosines in the equality above cancel out and we obtain

ADCA=ABCB \frac{A D}{C A}=\frac{A B}{C B}

This, along with $\angle D A B=\angle A C B$, proves that $\triangle D A B \sim \triangle A C B$ by SAS. Therefore $\angle C B A=$ $\angle A B D$. This shows that $B A$ bisects angle $C B D$.

Solution 2.

Let $D^{\prime}$ be a point on $\ell$ such that $\angle C B A=\angle A B D^{\prime}$. Let $Z$ and $T$ be projections of $A$ onto $B C$ and $B D^{\prime}$, respectively. Note that the circle with diameter $A B$ passes through $X, Y, Z, T$. By Pascal's theorem for hexagon $A X Z B T Y$, points $D^{\prime}, C$, and $H^{\prime}:=X Z \cap T Y$ are collinear.

We have

XZB=XAB=CAB=90ZBY \angle X Z B=\angle X A B=\angle C A B=90^{\circ}-\angle Z B Y

which shows that $X Z \perp B Y$.

By definition of $D^{\prime}$,

BDA=180DABABD=180ACBCBA=BAC. \angle B D^{\prime} A=180^{\circ}-\angle D^{\prime} A B-\angle A B D^{\prime}=180^{\circ}-\angle A C B-\angle C B A=\angle B A C .

Therefore

DAT=90TDA=90BAC, \angle D^{\prime} A T=90^{\circ}-\angle T D^{\prime} A=90^{\circ}-\angle B A C,

hence

XYT+BXY=XAT+BAY=90BAC+BAC=90. \angle X Y T+\angle B X Y=\angle X A T+\angle B A Y=90^{\circ}-\angle B A C+\angle B A C=90^{\circ} .

This shows that $Y T \perp B X$.

Since $X Z \perp B Y$ and $Y T \perp B X$, it follows that $H^{\prime}$ is the orthocenter of $B X Y$, i.e. $H^{\prime}=H$. Since $D^{\prime}, C, H^{\prime}$ are collinear and $D^{\prime}$ lies on $\ell$, it follows that $D^{\prime}=D$. Therefore $\angle A B D=\angle C B A$ and we are done.

Problem 14. An acute triangle $A B C$ is given and let $H$ be its orthocenter. Let $\omega$ be the circle through $B, C$ and $H$, and let $\Gamma$ be the circle with diameter $A H$. Let $X \neq H$ be the other intersection point of $\omega$ and $\Gamma$, and let $\gamma$ be the reflection of $\Gamma$ over $A X$.

Suppose $\gamma$ and $\omega$ intersect again at $Y \neq X$, and line $A H$ and $\omega$ intersect again at $Z \neq H$. Show that the circle through $A, Y, Z$ passes through the midpoint of segment $B C$.

Solution.

Let $M$ be the midpoint of $B C$. We first show that $X$ lies on $A M$. Consider $A^{\prime}$, the reflection of $A$ across $M$. As $A B A^{\prime} C$ is a parallelogram, we have that $\angle B A^{\prime} C=\angle B A C=180^{\circ}-\angle B H C$, which in turn gives us that $A^{\prime}$ lies on $\omega$. Now $\angle H B A^{\prime}=\angle H B C+\angle C B A^{\prime}=\angle H B C+\angle A C B=$ $90^{\circ}$. Hence $H A$ is a diameter of $\omega$. In particular we must have $\angle H X A^{\prime}=90^{\circ}$. Consequently $\angle A X A^{\prime}=\angle A X H+\angle H X A^{\prime}=90^{\circ}+90^{\circ}=180^{\circ}$, i.e. $A, X, A^{\prime}$ are collinear. But $A, M, A^{\prime}$ collinear by definition, hence $X$ lies on the $A$-median.

Now it suffices to show that $\angle A Y Z=\angle A M Z$. We note the two following facts:

  • $\angle A H X=\angle A Y X$, since $\omega$ and $\Gamma$ have the same radius and the two angles span the same chord $A X$.
  • $\omega$ is the reflection of the circumcircle of $A B C$ across $B C$. That gives us that $Z$ is the reflection of $A$ across $D$, the feet of the $A$-altitude to $B C$.

Hence we can write: $\angle A Y Z=\angle A Y X+\angle X Y Z=\angle A H X+\left(180^{\circ}-\angle X H Z\right)=2 \angle A H X=$ $2 \angle A M D=\angle A M Z$, which is what we wanted.

Problem 15. On a plane, Bob chooses 3 points $A_{0}, B_{0}, C_{0}$ (not necessarily distinct) such that $A_{0} B_{0}+B_{0} C_{0}+C_{0} A_{0}=1$. Then he chooses points $A_{1}, B_{1}, C_{1}$ (not necessarily distinct) in such a way that $A_{1} B_{1}=A_{0} B_{0}$ and $B_{1} C_{1}=B_{0} C_{0}$. Next he chooses points $A_{2}, B_{2}, C_{2}$ as a permutation of points $A_{1}, B_{1}, C_{1}$. Finally, Bob chooses points $A_{3}, B_{3}, C_{3}$ (not necessarily distinct) in such a way that $A_{3} B_{3}=A_{2} B_{2}$ and $B_{3} C_{3}=B_{2} C_{2}$. What are the smallest and the greatest possible values of $A_{3} B_{3}+B_{3} C_{3}+C_{3} A_{3}$ Bob can obtain?

Solution.

Answer: $\frac{1}{3}$ and 3 .

Denote the lengths $A_{0} B_{0}, B_{0} C_{0}, C_{0} A_{0}$ by $x, y, z$ in non-increasing order. Similarly, denote the lengths $A_{1} B_{1}, B_{1} C_{1}, C_{1} A_{1}$ by $x^{\prime}, y^{\prime}, z^{\prime}$ in non-increasing order, and the lengths $A_{3} B_{3}, B_{3} C_{3}$, $C_{3} A_{3}$ by $x^{\prime \prime}, y^{\prime \prime}, z^{\prime \prime}$ in non-increasing order. (As permuting the points does not change the distances, we do not need a separate vector for $A_{2} B_{2}, B_{2} C_{2}, C_{2} A_{2}$.) Then we have $x+y+z=1$, $y+z \geqslant x, y^{\prime}+z^{\prime} \geqslant x^{\prime}, y^{\prime \prime}+z^{\prime \prime} \geqslant x^{\prime \prime}$. By construction, triples $(x, y, z)$ and $\left(x^{\prime}, y^{\prime}, z^{\prime}\right)$ have two values in common (but not necessarily at corresponding places), similarly $\left(x^{\prime}, y^{\prime}, z^{\prime}\right)$ and $\left(x^{\prime \prime}, y^{\prime \prime}, z^{\prime \prime}\right)$ have two values in common.

Using these observations, calculate:

x+y+z2(y+z)2(x+y)2(y+y+z)2(x+x+y)6x3(x+y+z)=3. \begin{aligned} x^{\prime \prime}+y^{\prime \prime}+z^{\prime \prime} & \leqslant 2\left(y^{\prime \prime}+z^{\prime \prime}\right) \leqslant 2\left(x^{\prime}+y^{\prime}\right) \leqslant 2\left(y^{\prime}+y^{\prime}+z^{\prime}\right) \\ & \leqslant 2(x+x+y) \leqslant 6 x \leqslant 3(x+y+z)=3 . \end{aligned}

We can achieve the value 3 as follows. Let $A_{0} B_{0}=\frac{1}{2}$ and $C_{0}=A_{0}$. Let $A_{1}=A_{0}$, $B_{1}=B_{0}$ and $\overrightarrow{B_{1} C_{1}}=-\overrightarrow{B_{0} C_{0}}$. Let $A_{2}=A_{1}$ and $B_{2}=C_{1}, C_{2}=B_{1}$. Finally, let $A_{3}=A_{2}$, $B_{3}=B_{2}$ and $\overrightarrow{B_{3} C_{3}}=-\overrightarrow{B_{2} C_{2}}$. By construction, $A_{3} B_{3}=1, B_{3} C_{3}=\frac{1}{2}$ and $C_{3} A_{3}=\frac{3}{2}$, so $A_{3} B_{3}+B_{3} C_{3}+C_{3} A_{3}=3$.

This establishes the upper bound. For the lower bound, note that all steps are reversible and the 3-step process itself is symmetric. By scaling, we can also make the initial configuration to satisfy the conditions of the problem. Hence all processes satisfying the conditions of the problem and achieving a final value $t$ are in one-to-one correspondence with processes satisfying the conditions of the problem and achieving the final value $\frac{1}{t}$. This shows that the lower bound is $\frac{1}{3}$.

Problem 16. Richard and Kaarel are taking turns to choose numbers from the set ${1, \ldots, p-1}$ where $p>3$ is a prime. Richard is the first one to choose. A number which has been chosen by one of the players cannot be chosen again by either of the players. Every number chosen by Richard is multiplied with the next number chosen by Kaarel. Kaarel wins the game if at any moment after his turn the sum of all of the products calculated so far is divisible by $p$. Richard wins if this does not happen, i.e. the players run out of numbers before any of the sums is divisible by $p$. Can either of the players guarantee their victory regardless of their opponent's moves and if so, which one?

Solution 1.

Answer: Yes, Kaarel.

Let us split the numbers in the set to the following pairs: $(1, p-1),(2, p-2), \ldots,\left(\frac{p-1}{2}, \frac{p+1}{2}\right)$. If Richard chooses some number $a$, then let Kaarel choose the other number from the pair i.e. $p-a$. This forces Richard to choose a number from a pair in which both of the numbers have not been chosen yet and hence Kaarel can make his desired move. The residues modulo $p$ of the products are of the form $-a^{2}$. The residue of the sum of all the products is congruent to $-\left(1^{2}+2^{2}+\ldots+\left(\frac{p-1}{2}\right)^{2}\right)$. For every natural number $n$, we have $1^{2}+2^{2}+\ldots+n^{2}=\frac{n(n+1)(2 n+1)}{6}$, therefore $1^{2}+2^{2}+\ldots+\left(\frac{p-1}{2}\right)^{2}=\frac{(p-1) p(p+1)}{24}$. This must be an integer and as $p$ and 24 are coprime, $\frac{(p-1) p(p+1)}{24}$ must be divisible by $p$. Therefore, when the last number is chosen from the set, the sum of the products is divisible by $p$.

Solution 2.

If Richard initially chooses some number $x$, then Kaarel chooses $p-x$ as above (distinct from $x$ as $p$ is odd). Since $p-1>2$, there are still numbers left, so the game continues.

If next Richard chooses $y$ as his second number, then Kaarel wins by choosing the unique number $1 \leqslant a \leqslant p-1$ congruent to $x^{2} \cdot y^{-1}$ modulo $p$. In order for Kaarel's second move to be legal, we must confirm that $a$ is different from $x,-x$ and $y$ modulo $p$.

If $a \equiv x(\bmod p)$, then $y \equiv x(\bmod p)$ contradicting Richards second move. If $a \equiv-x$ $(\bmod p)$, then $y \equiv-x(\bmod p)$ also contradicting Richards second move. Finally, if $a \equiv y$ $(\bmod p)$, then $x^{2} \equiv y^{2}(\bmod p)$ implying $y \equiv \pm x(\bmod p)$ with the same contradictions once more.

We conclude that $a$ is distinct from the previous numbers, and $x \cdot(p-x)+y \cdot a \equiv 0(\bmod p)$, so Kaarel wins.

Problem 17. For a prime number $p$ and a positive integer $n$, denote by $f(p, n)$ the largest integer $k$ such that $p^{k} \mid n$ !. Let $p$ be a given prime number and let $m$ and $c$ be given positive integers. Prove that there exist infinitely many positive integers $n$ such that $f(p, n) \equiv c$ $(\bmod m)$.

Solution 1.

We start by noting that

f(p,n)=np+np2+np3+ f(p, n)=\left\lfloor\frac{n}{p}\right\rfloor+\left\lfloor\frac{n}{p^{2}}\right\rfloor+\left\lfloor\frac{n}{p^{3}}\right\rfloor+\ldots

which is the well-known Legendre Formula. Now, if we choose

n=pa1+pa2++pak n=p^{a_{1}}+p^{a_{2}}+\cdots+p^{a_{k}}

for positive integers $a_{1}>a_{2}>\cdots>a_{k}$ to be determined, this formula immediately shows that

f(p,n)=(pa11+pa12++p+1)+(pa21+pa22++p+1)+=pa11p1+pa21p1+ \begin{aligned} f(p, n) & =\left(p^{a_{1}-1}+p^{a_{1}-2}+\cdots+p+1\right)+\left(p^{a_{2}-1}+p^{a_{2}-2}+\cdots+p+1\right)+\ldots \\ & =\frac{p^{a_{1}}-1}{p-1}+\frac{p^{a_{2}}-1}{p-1}+\ldots \end{aligned}

We thus consider the numbers $\left(p^{a}-1\right) /(p-1)$. If we can show that there is a residue class $C$ $(\bmod m)$ which is coprime to $m$ occuring infinitely often among these numbers, we will be done since we can choose $a_{1}, \ldots, a_{k}$ with $k C \equiv c(\bmod m)$ arbitrarily among these numbers. Now, how to find such a number $C$ ?

To this end, write $m=p^{t} \cdot m^{\prime}$ with $p \nmid m^{\prime}$. Since $p^{a}$ is certainly periodic modulo $m^{\prime} \cdot(p-1)$, the sequence $\left(p^{a}-1\right) /(p-1)$ is periodic modulo $m^{\prime}$ with some period $d$ and hence for $a \equiv 1(\bmod d)$, the numbers are always $1\left(\bmod m^{\prime}\right)$. Moreover, for $a \geq t$, all the numbers are equal to $\left(p^{t}-1\right) /(p-1)$ modulo $p^{t}$ and hence by the Chinese Remainder Theorem, all the numbers $\left(p^{a}-1\right) /(p-1)$ for $a \geq t$ and $a \equiv 1(\bmod d)$ are in the same residue class $C$ $(\bmod m)$, with $C$ coprime to $m$, as desired.

Solution 2.

We denote $v_{p}(n)$ for the largest power of $p$ dividing $n$.

We start with a lemma.

Lemma. For any prime $q$ and modulus $m^{\prime}$ not divisible by $q$, there exists infinitely many powers $q^{n}$ of $q$ such that $v_{p}\left(q^{n} !\right) \equiv 1\left(\bmod m^{\prime}\right)$.

Proof. Define $a_{k}=v_{q}\left(q^{k} !\right)$. We then have $a_{k+1}=q a_{k}+1$. This sequence is eventually periodic modulo $m^{\prime}$. It must actually be periodic starting from 0 , as $a_{i} \equiv a_{i+T}\left(\bmod m^{\prime}\right)$ implies $q a_{i-1} \equiv q a_{i+T-1}\left(\bmod m^{\prime}\right)$ and therefore $a_{i-1} \equiv a_{i+T-1}\left(\bmod m^{\prime}\right)$, since $q \nmid m^{\prime}$. Thus, for infinitely many $n$ we have $a_{n} \equiv a_{1}=1\left(\bmod m^{\prime}\right)$.

We now turn to solving the problem. Write $m=p^{t} m^{\prime}$, where $p \nmid m^{\prime}$. The sequence $v_{p}(p !), v_{p}\left(p^{2} !\right), v_{p}\left(p^{3} !\right), \ldots$ is eventually constant modulo $p^{t}$. Denote this constant by $C$. Since $p \nmid C$, by the Chinese remainder theorem there exists a positive integer $s$ such that $C s \equiv c$ $\left(\bmod p^{t}\right)$ and $s \equiv c\left(\bmod m^{\prime}\right)$. Now, choose

n=pb1+pb2++pbs n=p^{b_{1}}+p^{b_{2}}+\ldots+p^{b_{s}}

where $b_{i}$ are distinct positive integers such that $v_{p}\left(p_{i}^{b} !\right) \equiv 1\left(\bmod m^{\prime}\right)($ possible by the lemma) and large enough such that $v_{p}\left(p_{i}^{b} !\right) \equiv C\left(\bmod p^{t}\right)$. We have

vp(n!)=vp(p1b!)++vp(pbs!)Csc(pt) v_{p}(n !)=v_{p}\left(p_{1}^{b} !\right)+\ldots+v_{p}\left(p^{b_{s}} !\right) \equiv C s \equiv c \quad\left(\bmod p^{t}\right)

and

vp(n!)=vp(p1b!)++vp(pbs!)sc(m) v_{p}(n !)=v_{p}\left(p_{1}^{b} !\right)+\ldots+v_{p}\left(p^{b_{s}} !\right) \equiv s \equiv c \quad\left(\bmod m^{\prime}\right)

which proves $v_{p}(n !) \equiv c(\bmod m)$. Since there are infinitely many of possible choices $n$, we are done.

Comment. IMO shortlist 2007 N7 asks to prove that for given $d$ and primes $p_{1}, \ldots, p_{k}$ there exists infinitely many integers $n$ such that $d \mid v_{p_{i}}(n !)$ for all $i$. While the IMO shortlist problem is of similar flavor, it would seem that it is more difficult than the problem above, and the methods are a bit different. (There is no clear way to use prime powers in the IMO SL problem similarly to the solution above.)

Comment. As a vast generalization of the problem above and the IMO shortlist problem, one could ask whether the following holds: For any modulus $m$ and distinct primes $p_{1}, \ldots, p_{k}$, the function

n(vp1(n!)(m),vp2(n!)(m),,vpk(n!)(m)) n \rightarrow\left(v_{p_{1}}(n !) \quad(\bmod m), v_{p_{2}}(n !) \quad(\bmod m), \ldots, v_{p_{k}}(n !) \quad(\bmod m)\right)

(viewed as a function $\mathbb{Z}{+} \rightarrow\left(\mathbb{Z}{m}\right)^{k}$ ) is equidistributed. The author of the problem believes this generalization to hold, but he has no proof.

Problem 18. Let $n \geqslant 1$ be a positive integer. We say that an integer $k$ is a fan of $n$ if $0 \leqslant k \leqslant n-1$ and there exist integers $x, y, z \in \mathbb{Z}$ such that

x2+y2+z20(n);xyzk(n). \begin{aligned} x^{2}+y^{2}+z^{2} & \equiv 0 \quad(\bmod n) ; \\ x y z & \equiv k \quad(\bmod n) . \end{aligned}

Let $f(n)$ be the number of fans of $n$. Determine $f(2020)$.

Solution.

Answer: $f(2020)=f(4) \cdot f(5) \cdot f(101)=1 \cdot 1 \cdot 101=101$.

To prove our claim we show that $f$ is multiplicative, that is, $f(r s)=f(r) f(s)$ for coprime numbers $r, s \in \mathbb{N}$, and that

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

(ii) $f(5)=1$,

(iii) $f(101)=101$.

The multiplicative property follows from the Chinese Remainder Theorem.

(i) Integers $x, y$ and $z$ satisfy $x^{2}+y^{2}+z^{2} \equiv 0 \bmod 4$ if and only if they are all even. In this case $x y z \equiv 0 \bmod 4$. Hence 0 is the only fan of 4 .

(ii) Integers $x, y$ and $z$ satisfy $x^{2}+y^{2}+z^{2} \equiv 0 \bmod 5$ if and only if at least one of them is divisible by 5 . In this case $x y z \equiv 0 \bmod 5$. Hence 5 is the only fan of 5 .

(iii) We have $9^{2}+4^{2}+2^{2}=81+16+4=101$. Hence $(9 x)^{2}+(4 x)^{2}+(2 x)^{2}$ is divisible by 101 for every integer $x$. Hence the residue of $9 x \cdot 4 x \cdot 2 x=72 x^{3}$ upon division by 101 is a fan of 101 for every $x \in \mathbb{Z}$. If we substitute $x=t^{67}$, then $x^{3}=t^{201} \equiv t \bmod 101$. Since 72 is coprime to 101 , the number $72 x^{3} \equiv 72 t$ can take any residue modulo 101 .

Note: In general for $p \not \equiv 1(\bmod 3)$, we have $f(p)=p$ as soon as we have at least one non-zero fan.

Problem 19. Denote by $d(n)$ the number of positive divisors of a positive integer $n$. Prove that there are infinitely many positive integers $n$ such that $|\sqrt{3} \cdot d(n)|$ divides $n$.

Solution 1.

Note that $\lfloor\sqrt{3} \cdot 8\rfloor=13$. Therefore all numbers with 8 divisors that are divisible by 13 satisfy the condition. There are infinitely many of those, for example, all numbers in the form $13 p^{3}$, where $p$ is a prime different from 13 .

Solution 2.

Based on the solution by the Finnish team: Instead of finding infinitely many solutions with $d(n)=2^{3}$, we prove that every power $2^{k}, k \geqslant 0$, has at least one solution with $d(n)=2^{k}$.

Let $k \geqslant 0$ be given, and let $p_{1}, p_{2}, \ldots$ be the sequence of all prime numbers. We then write the prime factorization of $\left\lfloor 2^{k} \sqrt{3}\right\rfloor$ as

2k3=i=1pibi \left\lfloor 2^{k} \sqrt{3}\right\rfloor=\prod_{i=1}^{\infty} p_{i}^{b_{i}}

with $b_{i} \geqslant 0$ and only finitely many $b_{i}$ different from 0 .

Since $\sqrt{3}<2$, we have

2k+1>2k3=i=1pibii=12bi=2i=1bi 2^{k+1}>\left\lfloor 2^{k} \sqrt{3}\right\rfloor=\prod_{i=1}^{\infty} p_{i}^{b_{i}} \geqslant \prod_{i=1}^{\infty} 2^{b_{i}}=2^{\sum_{i=1}^{\infty} b_{i}}

and from this we conclude $\sum_{i=1}^{\infty} b_{i} \leqslant k$. We know that $m+1 \leqslant 2^{m}$ for any integer $m \geqslant 0$, and this brings us a further estimate

i=1log2(bi+1)i=1bik \sum_{i=1}^{\infty}\left\lceil\log _{2}\left(b_{i}+1\right)\right\rceil \leqslant \sum_{i=1}^{\infty} b_{i} \leqslant k

By increasing values if necessary, we can choose a sequence of non-negative integers $a_{1}, a_{2}, \ldots$ such that $a_{i} \geqslant\left\lceil\log {2}\left(b{i}+1\right)\right\rceil$ for all $i$, and $\sum_{i=1}^{\infty} a_{i}=k$. [Editor's note: In fact, unless $\sum_{i=1}^{\infty}\left\lceil\log {2}\left(b{i}+1\right)\right\rceil=k$ already, we have an infinite choice of such sequences - each leading to a distinct $n$ with the required properties.] We now define

n=i=1pi2ai1 n=\prod_{i=1}^{\infty} p_{i}^{2^{a_{i}}-1}

which is a valid product since all but finitely many $a_{i}$ are equal to zero. By construction we have $2^{a_{i}}-1 \geqslant b_{i}$ for all $i$, so $\left\lfloor 2^{k} \sqrt{3}\right\rfloor$ divides $n$. Finally, the number of divisors in $n$ can be calculated as

d(n)=i=1((2ai1)+1)=i=12ai=2i=1ai=2k d(n)=\prod_{i=1}^{\infty}\left(\left(2^{a_{i}}-1\right)+1\right)=\prod_{i=1}^{\infty} 2^{a_{i}}=2^{\sum_{i=1}^{\infty} a_{i}}=2^{k}

so $n$ satisfies that $\lfloor d(n) \sqrt{3}\rfloor=\left\lfloor 2^{k} \sqrt{3}\right\rfloor$ divides $n$.

Solution 3.

Based on the solution by the Norwegian team: In this third solution, instead of letting $d(n)$ be a power of 2 , we prove that there a infinitely many solutions with $n=2^{k}$.

Consider the sequence $a_{i}=\lfloor i \sqrt{3}\rfloor$ for $i \geqslant 1$. If $k \geqslant 3$, then $(k+1) \sqrt{3}<2(k+1) \leqslant 2^{k}$. Consequently, whenever $a_{k+1}=2^{m}$ and $k \geqslant 3$, we get

d(2k)3=(k+1)3=ak+1=2m2k \left\lfloor d\left(2^{k}\right) \sqrt{3}\right\rfloor=\lfloor(k+1) \sqrt{3}\rfloor=a_{k+1}=2^{m} \mid 2^{k}

so $n=2^{k}$ satisfies the properties of the problem. It is therefore sufficient to prove that the integer sequence $a_{i}=\lfloor i \sqrt{3}\rfloor$ contains infinitely many powers of 2 . Since $\sqrt{3}>1$, the sequence is strictly increasing, and since $\sqrt{3}<2$, we have

ai+1ai=(i+1)3i3<(i+1)3(i31)=3+1<3. a_{i+1}-a_{i}=\lfloor(i+1) \sqrt{3}\rfloor-\lfloor i \sqrt{3}\rfloor<(i+1) \sqrt{3}-(i \sqrt{3}-1)=\sqrt{3}+1<3 .

Hence the sequence jump by at most 2 at each step.

Suppose for contradiction that the sequence constains only finitely many powers of two, say the largest is $2^{N}$. Then for every $m>N$ we can find a unique index $k$ such that $a_{k}=2^{m}-1$ and $a_{k+1}=2^{m}+1$.

Define $d_{i}=i \sqrt{3}-a_{i}$ to be the fractional part for each $i$, so that $0 \leqslant d_{i}<1$. For $k$ as above we then have

k3(2m1)=dk0,(k+1)3(2m+1)=dk+10, and thus (2k+1)32m+1=dk+dk+10 \begin{aligned} k \sqrt{3}-\left(2^{m}-1\right) & =d_{k} \geqslant 0, \\ (k+1) \sqrt{3}-\left(2^{m}+1\right) & =d_{k+1} \geqslant 0, \\ \text { and thus }(2 k+1) \sqrt{3}-2^{m+1} & =d_{k}+d_{k+1} \geqslant 0 \end{aligned}

If $d_{k}+d_{k+1}<1$, we would have $a_{2 k+1}=2^{m+1}$ contrary to our assumptions, hence $1 \leqslant d_{k}+d_{k+1}<2$ and consequently $a_{2 k+1}=2^{m+1}+1$ and $a_{2 k}=2^{m+1}-1$.

Since $a_{2 k}=2^{m+1}-1$, we have a recursive expression for $d_{2 k}$ as well:

d2k=2k3(2m+11)=2(dk+2m1)(2m+11)=2dk1. d_{2 k}=2 k \sqrt{3}-\left(2^{m+1}-1\right)=2\left(d_{k}+2^{m}-1\right)-\left(2^{m+1}-1\right)=2 d_{k}-1 .

We can now repeat the process with $2 k$ and $2 k+1$ in place of $k$ and $k+1$ in order to prove the following statements by induction for all $j \geqslant 0$ :

  • $a_{2^{j} k}=2^{m+j}-1$ and $a_{2^{j} k+1}=2^{m+j}+1$
  • $d_{2^{j} k}=2^{j} d_{k}-\left(2^{j}-1\right)=2^{j}\left(d_{k}-1\right)+1$

Finally, since $d_{k}-1<0$, the second property implies that $d_{2 j k}$ tends to $-\infty$ as $j$ tends to $\infty$. This clearly contradicts that $d_{2^{j} k} \geqslant 0$ for all $k$ and $j$, hence we conclude that the sequence $a_{i}$ contains infinitely many powers of 2 as required.

Problem 20. Let $A$ and $B$ be sets of positive integers with $|A| \geq 2$ and $|B| \geq 2$. Let $S$ be a set consisting of $|A|+|B|-1$ numbers of the form $a b$ where $a \in A$ and $b \in B$. Prove that there exist pairwise distinct $x, y, z \in S$ such that $x$ is a divisor of $y z$.

Solution 1.

We use induction on $k=|A|+|B|-1$.

For $k=3$ we have $|A|=|B|=2$. Let $A={x, y}, B={z, t}$. Then $S$ consists of three numbers from the set ${x z, y z, x t, y t}$. Relabelling the elements of $A$ and $B$ if necessary, we can assume without loss of generality that the missing number is $y t$. Then $x z, x t, y z \in S$ and $x z \mid x t \cdot y z$ which concludes the base case of induction.

For the inductive step, suppose the thesis holds for some $k-1 \geq 3$. Since $k=|A|+|B|-1 \geq$ 4, we have that $\max (|A|,|B|) \geq 3$, WLOG assume $|B| \geq 3$. Since the set $S$ consists of $k=|A|+|B|-1>|A|$ elements, by pigeonhole principle there exists a number $x \in A$ which appears as the first of the two factors of at least two elements of $S$. So, there exist $y, z \in B$ with $x y, x z \in S$. If there exists $t \in A \backslash{x}$ such that $t y \in S$ and $t y \neq x z$, then we are done because $x y \mid x z \cdot t y$. If there exists no such $t$ then apply the inductive hypothesis to the sets $A$, $B \backslash{y}$ and $S \backslash{x y}$ - note here that every element of $S \backslash{x y}$ still has the form $a b$ for $a \in A$ and $b \in B \backslash{y}$.

Solution 2.

Based on the solution by the Latvian team: We construct a bipartite graph $G$ where the elements of $A$ form one class of vertices, and the elements of $B$ form the other class of vertices. For each element $s \in S$ write $s=a b$ with $a \in A$ and $b \in B$ then put a single edge between $a$ and $b$ in $G$ (if $s$ decomposes as $a b$ in multiple ways, only place an edge for one of these decompositions). Now suppose $G$ has a path of length 3, i.e.

then $x \mid y z$ and since each element of $S$ only labels one edge, $x, y$ and $z$ are distinct. It is thus sufficient to show that if $|A|,|B| \geqslant 2$ and $|S|=|A|+|B|-1$, then $G$ has a path of length 3 . We shall prove the contrapositive statement: If $|S|=|A|+|B|-1$ and $G$ has no path of length 3 , then $|A|=1$ or $|B|=1$.

Suppose $G$ is bipartite and has no path of length 3, then in particular $G$ has no cycles, so $G$ is a forest (a collection of trees). The number of trees in a forest can be calculated as

# vertices # edges =(A+B)(A+B1)=1 \# \text { vertices }-\# \text { edges }=(|A|+|B|)-(|A|+|B|-1)=1

hence $G$ is a single tree. If $G$ is a tree and has not path of length 3, then $G$ has to be a star graph. A bipartite star graph necessarily has the central vertex in one class and all the leaves in the other class, hence either $|A|=1$ or $|B|=1$ as required.