## Task A-2.4.

Determine all real numbers $a_{1} \geqslant a_{2} \geqslant \cdots \geqslant a_{2020} \geqslant 0$ for which

$$
a_{1}+a_{2}+\cdots+a_{2020}=1 \quad \text { and } \quad a_{1}^{2}+a_{2}^{2}+\cdots+a_{2020}^{2}=a_{1}
$$
## Solution.

If we multiply the first equality by $\mathrm{s} a_{1}$ and subtract the second equality from the resulting equality, we get:

$$
a_{2}\left(a_{1}-a_{2}\right)+a_{3}\left(a_{1}-a_{3}\right)+\cdots+a_{2020}\left(a_{1}-a_{2020}\right)=0 .
$$

Since $a_{1} \geqslant a_{k}$ and $a_{k} \geqslant 0$, we see that we have a sum of non-negative numbers that equals zero. We conclude that each addend is zero:

$$
a_{k}\left(a_{1}-a_{k}\right)=0, \quad \text { for all } k \in\{2,3, \ldots, 2020\}
$$

that is, for each $k \in\{2,3, \ldots, 2020\}$, it holds that $a_{k}=a_{1}$ or $a_{k}=0$.

Since $a_{1}+a_{2}+\cdots+a_{2020}=1$ and $a_{1} \geqslant a_{2} \geqslant \cdots \geqslant a_{2020} \geqslant 0$, we conclude that $a_{1}>0$ (otherwise, the sum cannot be positive). Also, if any number in this sequence is equal to 0, we conclude that all subsequent numbers are also equal to 0.

Thus, any sequence that satisfies the given conditions will look such that the first few numbers are equal to each other and their sum is 1, while all the remaining numbers are equal to 0. Finally, for each natural number $n \in\{1,2, \ldots, 2020\}$, we have a unique solution

$$
a_{1}=\cdots=a_{n}=\frac{1}{n} \quad \text { and } \quad a_{n+1}=\cdots=a_{2020}=0
$$