For which $n \in \mathbb{N}$ it is true that $x^2+x+1 | (x+1)^n-x^n-1$ I have to find such $n \in \mathbb{N}$ for which $x^2+x+1 | (x+1)^n-x^n-1$.
$x^2+x+1$ has 2 complex roots: $x_1=-((-1)^{(1/3)})$, $x_2=(-1)^{(2/3)}$ so I tried to divide $(x+1)^n-x^n-1$ by $(x-x_1)$ and then $(x-x_2)$ but it was too difficult. Any other hints?

As $(x-1)(x^2+x+1)=x^3-1,$ the roots of $x^2+x+1=0$ are complex cube roots$(w,w^2)$ of unity
So, $w^2+w+1=0$
Let $w=e^{2\pi i/3}\implies w^2=e^{-2\pi i/3},-w^2=e^{\pi i(1-2/3)}$
Now using About Euler's formula $e^{ix}=\cos x+i\sin x$,
$$f(w)=(w+1)^n-w^n-1=(-w^2)^n-w^n-1=(e^{\pi i/3})^n-(e^{2\pi i/3})^n-1$$
$$=\cos\dfrac{n\pi}3+i\sin\dfrac{n\pi}3-1-\cos\dfrac{2n\pi}3-i\sin\dfrac{2n\pi}3$$
We need $f(w)=0$
Equate the imaginary & the real parts -
$$\sin\dfrac{2n\pi}3=\sin\dfrac{n\pi}3$$
$\implies$ either $(i)\dfrac{2n\pi}3\equiv\dfrac{n\pi}3\pmod{2\pi}$
or $n\equiv0\pmod6$
But then $\cos\dfrac{n\pi}3-1-\cos\dfrac{2n\pi}3\ne0$
or $(ii)\dfrac{2n\pi}3\equiv\pi-\dfrac{n\pi}3\pmod{2\pi}$
$\implies n\equiv1\pmod2$
Again, $\cos\dfrac{n\pi}3-1-\cos\dfrac{2n\pi}3=\cos\dfrac{n\pi}3-2\cos^2\dfrac{n\pi}3=-\cos\dfrac{n\pi}3\left(2\cos\dfrac{n\pi}3-1\right)$
I hope yo can take it from here!
