Task 2. (10 points) A numerical sequence is given:

$x_{0}=\frac{1}{n} ; x_{k}=\frac{1}{n-k}\left(x_{0}+x_{1}+\ldots+x_{k-1}\right) ; k=1,2, \ldots, n-1$.

Find $S_{n}=x_{0}+x_{1}+\ldots+x_{n-1}$, if $n=2021$.
# Solution. 

We will prove by mathematical induction that $x_{0}+x_{1}+\ldots+x_{k-1}+x_{k}=\frac{1}{n-k}$. For $k=0$, this equality holds. For $k=1$, $x_{0}+x_{1}=\frac{1}{n}+\frac{1}{n-1} \cdot \frac{1}{n}=\frac{1}{n-1}$. Suppose this equality holds for all $m \leq k$, then it should also hold for $k+1$. Let's check this:

$$
\begin{aligned}
& \left(x_{0}+x_{1}+\ldots+x_{k}\right)+x_{k+1}=\frac{1}{n-k}+x_{k+1}=\frac{1}{n-k}+\frac{1}{n-(k+1)}\left(x_{0}+x_{1}+\ldots+x_{k}\right)= \\
& =\frac{1}{n-k}+\frac{1}{(n-k-1)(n-k)}=\frac{1}{n-(k+1)} .
\end{aligned}
$$

Thus, this equality also holds for $k+1$. Therefore, our assumption that $x_{0}+x_{1}+\ldots+x_{k-1}+x_{k}=\frac{1}{n-k}$ is correct.

Then, for $n=2021$ and $k=n-1=2020: S_{2021}=x_{0}+x_{1}+\ldots+x_{2020}=\frac{1}{2021-2020}=1$.