# Math Help - Show that if (a,m) = 1 and m has a prime factor p such that (p-1) | Q, then (a^Q-1,m)

1. ## Show that if (a,m) = 1 and m has a prime factor p such that (p-1) | Q, then (a^Q-1,m)

Show that if (a,m) = 1 and m has a prime factor p such that (p-1) | Q, then $(a^Q-1,m) > 1$

I am not sure how to do this, so any help would be great!

2. since p divides m, if we show that $p \text{ divides } a^Q-1$,then the statement is proved.
since p-1 divides Q, there exist integer k such that Q=(p-1)k.
by the fermat theorem: $p \text{ divides } a^{p-1}-1$;
and $a^Q-1=(a^{p-1}-1)(1+a^{p-1}+a^{2(p-1)}+ \cdot \cdot \cdot +a^{(k-1)(p-1)})$
thus p divides $a^Q-1$. QED