<s>[INST] Does $(x^2+xy+y^2)$ divide $(x+y)^n-x^n-y^n$ if and only if n has no prime factors less than 5 I noticed that for $n$ with prime factors greater than 5, that $xy(x+y)(x^2+xy+y^2)$ always seems to divide $(x+y)^n-x^n-y^n$. The $xy(x+y)$ factors seem fairly obvious, but I can't figure out where the $x^2+xy+y^2$ term comes from. Strangely, if $n$ is congruent to 6 mod 1, then $(x^2+xy+y^2)^2$ seems to divide $(x+y)^n-x^n-y^n$.
Is this true for all $n$ as specified? Is the converse true, i.e. if $x^2+xy+y^2$ divides $(x+y)^n-x^n-y^n$ then $n$ has no prime factors less than 5, and if $(x^2+xy+y^2)^2$ divides $(x+y)^n-x^n-y^n$, then n is congruent to 1 mod 6?
 [/INST] By homogeneity, it’s enough to show that $x^2+x+1$ divides $(x+1)^n-x^n-1$. Because these polynomials are rational and $x^2+x+1$ is irreducible over $\mathbb{Q}$, it’s enough to show that $(j+1)^n-j^n-1=0$, where $j=e^{2i\pi/3}$ is a primitive third root of unity.
Now, $(j+1)^n-j^n-1=(-j^2)^n-j^n-1=-(1+j^n+j^{2n})$. Now, $3$ doesn’t divide $n$ so $j^n \in \{j,j^2\}$ and both of these elements are roots of $X^2+X+1$.
By the same reasoning, $(x^2+xy+y^2)^2|(x+y)^n-x^n-y^n$ iff $x^2+x+1$ divides the derivative $D$ of $(x+1)^n-x^n-1$, iff $D(j)=0$.
But $D(X)=n((X+1)^{n-1}-X^{n-1})$, so $D(j)=0$ iff $(j+1)^{n-1}=j^{n-1}$ iff $(-j^2)^{n-1}=j^{n-1}$ iff ($n$ is odd) $j^{2n-2}=j^{n-1}$ iff $3|n-1$, so iff $6|n-1$.
</s>