<s>[INST] Modular arithmetic. $x \equiv 1 \pmod {m^k}$ implies $x^m \equiv 1 \pmod {m^{k+1}}$ Show that for $k \gt 0$ and $m \ge 1$, $x \equiv 1 \pmod {m^k}$ implies $x^m \equiv 1 \pmod {m^{k+1}}$
This question has already been asked in SE (Show that for $k \gt 0$ and $m \ge 1$, $x \equiv 1 \pmod {m^k}$ implies $x^m \equiv 1 \pmod {m^{k+1}}$.), but I think it´s not really answered. ( the hint given was enough but I didn’t realize it before)
I tried with Fermat´s little theorem but I get nowhere.
note: If $a \equiv b \pmod m$, then $a \cdot t \equiv b \cdot t \pmod {m \cdot t}$ with $t \gt 0$ (don´t know if this is useful)
Any help would be appreciated. Thanks.
 [/INST] We have $x^m - 1 = (x-1) (x^{m-1} + x^{m-2} + \cdots + 1)$.  Now, by hypothesis, $m^k \mid x-1$.  On the other hand, since $k > 0$, we also have $x \equiv 1 \pmod{m}$, so $x^{m-1} \equiv 1 \pmod{m}$, $x^{m-2} \equiv 1 \pmod{m}$, ..., $1 \equiv 1 \pmod{m}$.  Therefore, $x^{m-1} + x^{m-2} + \cdots + 1 \equiv 1 + 1 + \cdots + 1 = m \equiv 0 \pmod{m}$, so $m \mid x^{m-1} + x^{m-2} + \cdots + 1$.
</s>