There exists rational number $a_n$, $(x^2+\frac{1}{2}x+1)\mid(x^{2n}+a_nx^n+1)$ 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}$

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).$$
