1. The sequence $(a_{n})$ is defined by $a_{1}=1, a_{2}=\sqrt{19}$ and $a_{n+1}+a_{n}+a_{n-1}=3 n, n \geq 2$.

Calculate $a_{2011}$.
Solution. By the principle of mathematical induction, it is shown that for $k \geq 1$ the following holds

$$
\begin{aligned}
& a_{3 k}=3(k+1)-\left(a_{1}+a_{2}\right) \\
& a_{3 k+1}=3 k+a_{1} \\
& a_{3 k+2}=3 k+a_{2}
\end{aligned}
$$

Since $2011=3 \cdot 670+1$, it follows that

$$
a_{2011}=a_{3 \cdot 670+1}=3 \cdot 670+a_{1}=3 \cdot 670+1=2011
$$