Consider the recurrence relation
$$P(1)=1$$ $$P(2)=x$$ $$P(n)=x\cdot P(n-1)+P(n-2)$$
The first few polynomials are $$1,x,x^2+1,x^3+2x,x^4+3x^2+1$$
The polynomials occur in the convergents of the number with continued fraction $[x,x,x,\cdots]$
Is there a closed form for $P(n)$ for all $n\in\mathbb N$ ?
Let $\alpha,\beta$ be the solutions of $t^2=xt+1$.
Since $$\alpha+\beta=x,\quad \alpha\beta=-1$$ we have $$P(n+1)=(\alpha+\beta)P(n)-\alpha\beta P(n-1)$$
So, we get $$P(n+1)-\alpha P(n)=\beta (P(n)-\alpha P(n-1))=\cdots =\beta^{n-1}(P(2)-\alpha P(1))$$ and $$P(n+1)-\beta P(n)=\alpha (P(n)-\beta P(n-1))=\cdots =\alpha^{n-1}(P(2)-\beta P(1))$$
Subtracting the latter from the former gives $$(\beta-\alpha)P(n)=\beta^{n-1}(x-\alpha)-\alpha^{n-1}(x-\beta),$$ i.e. $$P(n)=\frac{\beta^{n-1}(x-\alpha)-\alpha^{n-1}(x-\beta)}{\beta-\alpha}$$ where $$\alpha=\frac{x-\sqrt{x^2+4}}{2},\quad\beta=\frac{x+\sqrt{x^2+4}}{2}$$