Find $n$ such that $x^2 + x + 1$ is a factor of $(x+1)^n - x^n - 1$.

Solution 1:

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