I am studying Linear Congruential Generators (LCG). In the proof of the main theorem of these generators:
Theorem: The sequence defined by $X_{n+1}=(aX_n+c) \;mod\;m$, has full period $m$, provided that:
$(i)$ $c$ is relatively prime to $m$
$(ii)$ $a\equiv 1 \pmod{p}$ if $p$ is a prime factor of $m$.
$(iii)$ $a\equiv 1 \pmod {4} $, if 4 is a factor of $m$
Thet sequence can be written as $$ \frac{(a^n-1)(x_0(a-1)+c)}{a-1}\equiv 0\pmod{m} $$ To reduce that expression to the following: $$ \frac{(a^n-1)}{a-1}\equiv 0\pmod{m} $$ The author says that that can be done because due to "the conditions of the theorem (I think $i$ and $ii$), $x_0(a-1)+c$ is relatively prime to $m$.
Why that's true? And why with that can the congruence be simplified?