<s>[INST] if $d\mid n$ then $x^d-1\mid x^n-1$ proof How would you show that if $d\mid n$ then $x^d-1\mid x^n-1$ ?
My attempt :

$dq=n$ for some $q$. $$ 1+x+\cdots+x^{d-1}\mid 1+x+\cdots+x^{n-1} \tag 1$$ in fact, $$(1+x^d+x^{2d}+\cdots+x^{(q-1)d=n-d})\cdot(1+x+\cdots+x^{d-1}) = 1+x+x^2 + \cdots + x^{n-1}$$
By multiplying both sides of $(1)$ by $(x-1)$ we get that $1-x^d\mid 1-x^n$ which is the final result

Is this an ok proof?
 [/INST] Notice that for any $x$ and and natural $n$ that $$(x-1)(x^{n-1} + ..... + x + 1) = (x^n + x^{n-1} +....... +x) - (x^{n-1} + x^{n-2} +.... +1) = x^n -1$$ so that $x-1|x^n - 1$ always.
Lemma: $x-1|x^n-1$ for natural $n$.
Now $d|n$ so let $m = \frac nd$ and let $y= x^d$.
Then $y-1|y^m -1$.
But $y-1 = x^d -1$ and $y^m -1 = x^n - 1$.
In particular:  $(x^d -1)(x^{n-d} + x^{n-2d} + ..... + x^d + 1) = x^n - 1$
</s>