18. A sequence of polynomials $a_{n}(x)$ are defined recursively by
$$
\begin{array}{l}
a_{0}(x)=1, \\
a_{1}(x)=x^{2}+x+1, \\
a_{n}(x)=\left(x^{n}+1\right) a_{n-1}(x)-a_{n-2}(x), \text { for all } n \geq 2 .
\end{array}
$$

For example,
$$
\begin{aligned}
a_{2}(x) & =\left(x^{2}+1\right)\left(x^{2}+x+1\right)-1=x^{4}+x^{3}+2 x^{2}+x, \\
a_{3}(x) & =\left(x^{3}+1\right)\left(x^{4}+x^{3}+2 x^{2}+x\right)-\left(x^{2}+x+1\right) \\
& =x^{7}+x^{6}+2 x^{5}+2 x^{4}+x^{3}+x^{2}-1 .
\end{aligned}
$$

Evaluate $a_{2010}(1)$.
18. Ans: 4021 .
$a_{n}(1)$ is the simple recurrence relation $f_{n}=2 f_{n-1}-f_{n-2}, f_{0}=1$ and $f_{1}=3$. Using standard technique or simply guess and verify that $f_{n}=2 n+1$. So $a_{2010}(1)=f_{2010}=2(2010)+1$.