## Task A-4.6.

Each term of the sequence $\left(a_{n}\right)_{n \in \mathbb{N}}$ of positive real numbers, starting from the second, is equal to the arithmetic mean of the geometric and arithmetic means of its two neighboring terms.

If $a_{1}=\frac{1}{505}$ and $a_{505}=505$, determine $a_{1010}$.
## Solution.

According to the condition of the problem, for each $n \geqslant 2$ we have

$$
a_{n}=\frac{\sqrt{a_{n-1} a_{n+1}}+\frac{a_{n-1}+a_{n+1}}{2}}{2}=\frac{\left(\sqrt{a_{n-1}}+\sqrt{a_{n+1}}\right)^{2}}{4}
$$

Therefore,

$$
\sqrt{a_{n}}=\frac{\sqrt{a_{n-1}}+\sqrt{a_{n+1}}}{2}
$$

so the sequence $\left(\sqrt{a_{n}}\right)_{n \in \mathbb{N}}$ is an arithmetic sequence.

Let $d$ be the common difference of this sequence. From the condition of the problem, we get

$$
(505-1) d=\sqrt{a_{505}}-\sqrt{a_{1}}=\sqrt{505}-\frac{1}{\sqrt{505}}=\frac{504}{\sqrt{505}} \Longrightarrow d=\frac{1}{\sqrt{505}}
$$

Thus,

$$
\sqrt{a_{1010}}=\sqrt{a_{1}}+(1010-1) d=\frac{1010}{\sqrt{505}}=2 \sqrt{505}
$$

i.e., $a_{1010}=4 \cdot 505=2020$.

1 point