Let $n\in \mathbb{N}$. Prove that there exists a rational number $a_n$ for which $$(x^2+\frac{1}{2}x+1)\mid(x^{2n}+a_nx^n+1)$$
My attempt :
I try $n=2$,
$(x^2+\frac{1}{2}x+1)(x^2-\frac{1}{2}x+1)=x^4+\frac{7}{4}x^2+1$
$a_2 = \frac{7}{4}$
Let $n\in \mathbb{N}$. Prove that there exists a rational number $a_n$ for which $$(x^2+\frac{1}{2}x+1)\mid(x^{2n}+a_nx^n+1)$$
My attempt :
I try $n=2$,
$(x^2+\frac{1}{2}x+1)(x^2-\frac{1}{2}x+1)=x^4+\frac{7}{4}x^2+1$
$a_2 = \frac{7}{4}$
just an idea
The roots of the left polynom are
$$x_1=\frac{-1+i\sqrt {15} }{4}=e^{it}$$ $$x_2=\frac {-1-i\sqrt {15} }{4}=e^{-it} $$
they are also roots of the right one
$$e^{2int}+a_ne^{int}+1=0$$ $$e^{-2int}+a_ne^{-int}+1=0$$
thus $$a_n=-\frac {\sin (2nt)}{\sin (nt)} $$
$$=-2\cos (nt) $$
For example, $$a_2=-2\cos (2t)=2 (1-2\cos^2 (t)) $$ $$=2-4\frac {1}{16}=\frac {7}{4} $$
We define $$p_n(x)=x^{2n}+a_n\,x^n+1,$$ so we have to prove $$\left.x^2+\frac12\,x+1\right|p_n(x).$$ This is clearly true for $n=1$ with $a_1=1/2$, and it was shown for $n=2$ with $a_2=7/4$. Induction step: we assume it's true for $n=k-1$ and $n=k$. Then, as can be seen by expanding the products, $$p_{k+1}(x)=(x^{2k}+1)\left(x^2+\frac12\,x+1\right)-\frac12\,x\,p_k(x)-x^2\,p_{k-1}(x),$$ if only $$a_{k+1}=-\frac12\,a_k-a_{k-1},$$ so $$\left.x^2+\frac12\,x+1\right|p_{k+1}(x).$$