TITLE: Prove：$x^d-1 \mid x^n-1$ iff $d \mid n$.
QUESTION [7 upvotes]: Consider the polynomial ring $F\left[x\right]$ over a field $F$. Let $d$ and $n$ be two nonnegative integers.
Prove：$x^d-1 \mid x^n-1$ iff $d \mid n$.

my tries:

necessity, Let $n=d t+r$, $0\le r<d$
since $x^d-1 \mid x^n-1$, so,
$x^n-1=\left(x^d-1\right)\left(x^{\text{dt}+r-d}+\dots+1\right)$...
so,,, to prove $r=0$?
I don't know, and I can't go on.
How to do it.

REPLY [2 votes]: Here is another take.

$F=\mathbb Q$: Write $x^n-1 = (x^d-1)q(x)$ with $q(x) \in \mathbb Z[x]$, because $x^d-1$ is monic. Now take derivatives: $nx^{n-1} = dx^{d-1}q(x) + (x^d-1)q'(x)$. Finally, take $x=1$ to get $n=dq(1)$. Note that $q(1) \in \mathbb Z$.
$F$ arbitrary: The $q(x) \in \mathbb Z[x]$ as above also works in $F[x]$. This is a subtle point.