Problem 1. Let $n(n \geq 1)$ be an integer. Consider the equation $$ 2 \cdot\left\lfloor\frac{1}{2 x}\right\rfloor-n+1=(n+1)(1-n x) $$ where $x$ is the unknown real variable. (a) Solve the equation for $n=8$. (b) Prove that there exists an integer $n$ for which the equation has at least 2021 solutions. (For any real number $y$ by $\lfloor y\rfloor$ we denote the largest integer $m$ such that $m \leq y$.) Solution. Let $k=\left[\frac{1}{2 x}\right], k \in \mathbb{Z}$. (a) For $n=8$, the equation becomes $$ k=\left[\frac{1}{2 x}\right]=8-36 x \Rightarrow x \neq 0 \text { and } x=\frac{8-k}{36} $$ Since $x \neq 0$, we have $k \neq 8$, and the last relation implies $k=\left[\frac{1}{2 x}\right]=\left[\frac{18}{8-k}\right]$. Checking signs, we see that $02021$ ensures that there exist at least 2021 integer values of $k$ which satisfy (2). Problem 2. For any set $A=\left\{x_{1}, x_{2}, x_{3}, x_{4}, x_{5}\right\}$ of five distinct positive integers denote by $S_{A}$ the sum of its elements, and denote by $T_{A}$ the number of triples $(i, j, k)$ with $1 \leqslant ix_{4}$ and $x_{3}>x_{2}$. Analogously we can show that any triple of form $(x, y, 5)$ where $y>2$ isn't good. By above, the number of good triples can be at most 5 and only triples $(1,2,5),(2,3,4)$, $(1,3,4),(1,2,4),(1,2,3)$ can be good. But if triples $(1,2,5)$ and $(2,3,4)$ are simultaneously good we have that: $$ x_{1}+x_{2}+x_{5} \mid x_{3}+x_{4} \Rightarrow x_{5}10$. Determine the largest possible number of elements of $M$. Solution. The set $M=\{1016,1017, \ldots, 2021\}$ has 1006 elements and satisfies the required property, since $a, b, c \in M$ implies that $a+b-c \geqslant 1016+1016-2021=11$. We will show that this is optimal. Suppose $M$ satisfies the condition in the problem. Let $k$ be the minimal element of $M$. Then $k=|k+k-k|>10 \Rightarrow k \geqslant 11$. Note also that for every $m$, the integers $m, m+k-10$ cannot both belong to $M$, since $k+m-(m+k-10)=10$. Claim 1: $M$ contains at most $k-10$ out of any $2 k-20$ consecutive integers. Proof: We can partition the set $\{m, m+1, \ldots, m+2 k-21\}$ into $k-10$ pairs as follows: $$ \{m, m+k-10\},\{m+1, m+k-9\}, \ldots,\{m+k-11, m+2 k-21\} $$ It remains to note that $M$ can contain at most one element of each pair. Claim 2: $M$ contains at most $[(t+k-10) / 2]$ out of any $t$ consecutive integers. Proof: Write $t=q(2 k-20)+r$ with $r \in\{0,1,2 \ldots, 2 k-21\}$. From the set of the first $q(2 k-20)$ integers, by Claim 1 at most $q(k-10)$ can belong to $M$. Also by claim 1, it follows that from the last $r$ integers, at $\operatorname{most} \min \{r, k-10\}$ can belong to $M$. Thus, - If $r \leqslant k-10$, then at most $$ q(k-10)+r=\frac{t+r}{2} \leqslant \frac{t+k-10}{2} \text { integers belong to } M $$ - If $r>k-10$, then at most $$ q(k-10)+k-10=\frac{t-r+2(k-10)}{2} \leqslant \frac{t+k-10}{2} \text { integers belong to } M $$ By Claim 2, the number of elements of $M$ amongst $k+1, k+2, \ldots, 2021$ is at most $$ \left[\frac{(2021-k)+(k-10)}{2}\right]=1005 $$ Since amongst $\{1,2, \ldots, k\}$ only $k$ belongs to $M$, we conclude that $M$ has at most 1006 elements as claimed.