2. Let $A_{1}$ be the midpoint of the segment $A B$. We denote by $A_{2}$ the midpoint of $A A_{1}$, by $A_{3}$ the midpoint of $A_{1} A_{2}$, by $A_{4}$ the midpoint of $A_{2} A_{3}$, etc. Find the limit to which the sequence of lengths of the segments $A A_{1}, A A_{2}, A A_{3}, \ldots$ tends.
Solution. Let $\overline{A B}=a$; then

$$
\overline{A A_{n}}=a\left(\frac{1}{2}-\frac{1}{2^{2}}+\frac{1}{2^{3}}-\frac{1}{2^{4}}+\ldots+\frac{(-1)^{n+1}}{2^{n}}\right)=\frac{a}{3}\left(1+\frac{(-1)^{n+1}}{2^{n}}\right)
$$

Thus,

$$
\lim _{n \rightarrow \infty} \overline{A A_{n}}=\frac{a}{3}
$$