Find $n$ such that $x^2 + x + 1$ is a factor of $(x+1)^n - x^n - 1$. I have to find the form of n i.e. whether n is even or odd and whether it is multiple of 2 or 3 such that:
$x^2 + x + 1$ is a factor of $(x+1)^n - x^n - 1$
What I tried:
$$x^2 + x + 1 = (x + 1)^2 - x $$
also,
$$(x+1)^n-x^n-1= \binom{n}{o}x^n + \binom{n}{1}x^{n-1} + ... + \binom{n}{n-1}x + \binom{n}{n}.1 - x^n - 1$$
$$=\binom{n}{1}x^{n-1} + ... + \binom{n}{n-1}x$$
after getting this far I tried with taking x and n common but still couldn't able to find the right direction.
I need extra hints to solve this.

The roots of $x^2 + x + 1 = 0$ are the cube roots of unity. Call them $w, w^2$. As  $x^2 + x + 1 = 0$, we get $w + 1 = -w^2$ and $w^2 + 1 = -w$. Thus, the problem reduces to finding $n$, such that $(-1)^{n+1}*w^{2n} + w^n + 1 = 0$. Thus the answer is, whenever n is not divisible by 3 and n is not divisible by 2, i.e., $n\equiv 1,5\mod 6$.
