## Task 1.

If $a_{1}, a_{2}, \ldots, a_{2000}$ is a sequence of 2000 positive real numbers, for how many indices $i \in$ $\{1,2, \ldots, 2000\}$ can the equality

$$
a_{i} a_{i+3}=a_{i} a_{i+1}+a_{i+1} a_{i+2}+a_{i+2} a_{i+3} ?
$$

hold? We consider that $a_{j+2000}=a_{j}$ for $j \in\{1,2,3\}$.
## Solution.

For an index $i$, we say it is good if it satisfies the equality in the problem statement.

Assume there exist two consecutive good indices $i, i+1$. Then we have

$$
\begin{aligned}
a_{i} a_{i+3} & =a_{i} a_{i+1}+a_{i+1} a_{i+2}+a_{i+2} a_{i+3} \\
a_{i+1} a_{i+4} & =a_{i+1} a_{i+2}+a_{i+2} a_{i+3}+a_{i+3} a_{i+4}
\end{aligned}
$$

From the first equality, it follows that $a_{i+1}a_{i+3}$, which is a contradiction. Therefore, there do not exist two consecutive good indices, so the number of good indices is at most 1000.

Furthermore, if index $i$ is good, then $a_{i}>a_{i+2}$. Assume there are 1000 good indices. Then these indices are $i, i+2, i+4, \ldots, i+1998$ for some $i$. However, then we have

$$
a_{i}>a_{i+2}>a_{i+4}>\ldots>a_{i+1998}>a_{i+2000}=a_{i}
$$

which is a contradiction. We conclude that there are at most 999 good indices.

Now we construct an example of a 2000-tuple where the indices $1,3,5, \ldots, 1997$ are good. Let $a_{1}>a_{3}>\ldots>a_{1999}$ be arbitrary positive real numbers, and let $a_{2}$ be any positive real number. Assume we have defined the numbers $a_{2}, a_{4}, \ldots, a_{2 i}$ for some $i \in\{1, \ldots, 999\}$.

We recursively define $a_{2 i+2}$ so that $2 i-1$ is a good index, i.e., $a_{2 i+2}$ is defined as a number such that $a_{2 i-1} a_{2 i+2}=a_{2 i-1} a_{2 i}+a_{2 i} a_{2 i+1}+a_{2 i+1} a_{2 i+2}$, or

$$
a_{2 i+2}=a_{2 i} \cdot \frac{a_{2 i-1}+a_{2 i+1}}{a_{2 i-1}-a_{2 i+1}}
$$

It is easy to see that $a_{2 i+2}$ is a well-defined positive real number, since $a_{2 i-1}>a_{2 i+1}$. Thus, the 2000-tuple $(a_{1}, a_{2}, \ldots, a_{2000})$ defined in this way has 999 good indices.

Note: Of course, it is also possible to explicitly construct a sequence with 999 good indices. For example, the sequence

$$
2^{0}, 3^{0}, 2^{-1}, 3^{1}, 2^{-2}, 3^{2}, \ldots, 2^{-999}, 3^{999}
$$