## Task B-4.1.

Let $a_{1}, a_{2}, \ldots$ be a sequence of numbers defined by

$$
\begin{aligned}
a_{1} & =1 \\
a_{n+1} & =\sqrt{a_{n}^{2}-2 a_{n}+3}+1 \quad \text { for all } n \in \mathbb{N}
\end{aligned}
$$

Determine $a_{801}$.
## Solution.

We have

$$
\begin{gathered}
a_{2}=\sqrt{1-2+3}+1=\sqrt{2}+1 \\
a_{3}=\sqrt{(\sqrt{2}+1)^{2}-2(\sqrt{2}+1)+3}+1=\sqrt{2+2 \sqrt{2}+1-2 \sqrt{2}-2+3}+1=\sqrt{4}+1=3 \\
a_{4}=\sqrt{6}+1 \\
a_{5}=\sqrt{6+2 \sqrt{6}+1-2 \sqrt{6}-2+3}+1=\sqrt{8}+1
\end{gathered}
$$

Let's show that $a_{n}=\sqrt{2(n-1)}+1$, for all $n \in \mathbb{N}$.

We prove this by mathematical induction.

For $n=1$, the statement holds because $a_{1}=\sqrt{2(1-1)}+1=0+1=1$.

Assume that for some natural number $n$, $a_{n}=\sqrt{2(n-1)}+1$. We need to prove that $a_{n+1}=\sqrt{2(n+1-1)}+1=\sqrt{2 n}+1$.

From the initial recursion that defines the sequence, we have

$$
\begin{aligned}
a_{n+1} & =\sqrt{a_{n}^{2}-2 a_{n}+3}+1=(\text { by the induction hypothesis }) \\
& =\sqrt{(\sqrt{2(n-1)}+1)^{2}-2(\sqrt{2(n-1)}+2)+3}+1 \\
& =\sqrt{2(n-1)+2 \sqrt{2(n-1)}+1-2 \sqrt{2(n-1)}-2+3}+1=\sqrt{2 n}+1
\end{aligned}
$$

Since from the assumption that the statement holds for some $n$, it follows that it also holds for the next natural number $n+1$, we conclude that $a_{n}=\sqrt{2(n-1)}+1, \forall n \in \mathbb{N}$.

Therefore, $a_{801}=\sqrt{2(801-1)}+1=41$.