TITLE: How to prove $\,x^a-1 \mid x^b-1 \iff a\mid b$
QUESTION [9 upvotes]: How to prove $x^a-1\mid x^b-1 \iff a \mid b$, where $x \ge 2$ and $a,b,x \in \Bbb Z$.
I've tried the following in attempting to solve this:
$$a\mid b \Rightarrow aq=b \Rightarrow x^{aq}=x^b \Rightarrow x^ax^q=x^b$$
Because $x^q \in \Bbb Z$, it follows that $x^a\mid x^b$.
This is as far as I have gotten; any help getting further is appreciated.
Note: It may be that this identity is not true at all?

REPLY [2 votes]: This is adapted from this answer.
Since
$$
\frac{a^k-1}{a-1}=\sum_{j=0}^{k-1}a^j\tag{1}
$$
we immediately get that $x^m-1\mid x^n-1$ when $m\mid n$.
Now, suppose that $x^m-1\mid x^n-1$ and that $n=km+r$ where $0\le r< m$. Then
$$
\begin{align}
\frac{x^n-1}{x^m-1}
&=\frac{x^{km+r}-x^{km}}{x^m-1}+\frac{x^{km}-1}{x^m-1}\\
&=x^{km}\frac{x^r-1}{x^m-1}+\frac{x^{km}-1}{x^m-1}\\
&\in\mathbb{Z}\tag{2}
\end{align}
$$
It immediately follows from $(1)$ that $\frac{x^{km}-1}{x^m-1}\in\mathbb{Z}$. Therefore, we must also have $x^{km}\frac{x^r-1}{x^m-1}\in\mathbb{Z}$:
$$
x^m-1\mid x^{km}(x^r-1)\tag{3}
$$
Since $\left(x^{km},x^m-1\right)=1$, $(3)$ implies that $x^m-1\mid x^r-1$. However, since $0\le r< m$, we have that $0\le x^r-1< x^m-1$. Therefore, $x^r-1=0$; that is, $r=0$ and $n=km$; hence, $m\mid n$.