Find all pairs of positive integers $(m, n)$ for which $X^m + X + 1$ divides $X^n + 1$ and pairs $(m,n)$ for which $X^m +X −1$ divides $X^n +1$? 
The special case I can think of is when $n=3$, and $m=2$ for the first part. But I don't know if other cases exist. Any help would be appreciated. Thanks!

I get that
there are no solutions
for $x^m+x+1$.
The roots of
$x^n+1$ are
$e^{(2k+1) \pi i/n}$
for $k = 0$ to $n-1$,
so
all the roots have magnitude $1$.
If $m = 1$ then
$x = -\frac12$
so
$\dfrac{(-1)^n}{2^n}+1 = 0$
which can't be.
If $m = 2$
the roots of
$x^2+x+1$
are
$x_{1, 2}
=\dfrac{-1\pm\sqrt{-3}}{2}
=e^{\pm 2\pi i/3}
$.
Then
$x_1^n
=e^{2\pi n i/3}
=-1
=e^{(2k+1)\pi i}
$
for some $k$
so
$2n/3 =2k+1
$
so
$2n = 6k+3
$
and this can't be since
the left side is even
and the right side is odd.
The same thing holds for
$x_2
=e^{-2\pi i/3}
$.
Therefore
there are no solutions for
$m = 2$.
If $m > 2$ then
for $m$ values of
$0 \le k \le n-1$,
$\begin{array}\\
0
&= x^m+x+1\\
&=e^{(2k+1)m \pi i/n}+e^{(2k+1) \pi i/n}+1\\
&=\cos((2k+1)m\pi/n)+i\sin((2k+1)m\pi/m)
+\cos((2k+1)\pi/n)+i\sin((2k+1)\pi/m)
+1\\
&=\cos((2k+1)m\pi/n)+\cos((2k+1)\pi/n)+1
+i(\sin((2k+1)m\pi/m)+\sin((2k+1)\pi/m))\\
&=\cos((2k+1)m\pi/n)+\cos((2k+1)\pi/n)+1\\
&=\cos(mr)+\cos(r)+1
\qquad\text{where }r = (2k+1)\pi/n\\
\text{and}\\
0
&=\sin((2k+1)m\pi/n)+\sin((2k+1)\pi/n)\\
&=\sin(mr)+\sin(r)\\
\end{array}
$
Therefore
$\sin(mr)
=-\sin(r)
$
so
$\sin^2(mr)
=\sin^2(r)
$
$\cos^2(mr)
=\cos^2(r)
$.
If
$\cos(mr)
=\cos(r)
$
then
$0
=\cos(mr)+\cos(r)+1
=2\cos(r)+1
$
so,
since
$0 < r < 2\pi$,
$r 
= 2\pi/3,
= -2\pi/3
$.
If $r = 2\pi/3$,
$2/3
=(2k+1)/n
$
so
$2n
=3(2k+1)
=3k+3
$
but this can not be since
the left side is even
and the right side is odd.
Similarly,
If $r = -2\pi/3$,
then
$-2/3
=(2k+1)/n
$
so
$-2n
=3(2k+1)
=3k+3
$
but this also can not be since
the left side is even
and the right side is odd.
Therefore there
are no solutions.
