Let a prime $p\ge 3$ and let $q$, a prime such that $q \mid 2^p - 1$. prove that $q \mid 2^{q-1} - 1$ and show that it has the form $q = 1+2kp$, $k\in\mathbb N$.
Note: I have been asked to show first that $q\mid \gcd \left( 2^p - 1, 2^{q-1} -1 \right)$ and to use the lemma:$ \gcd \left( N^a -1 , N^b - 1 \right) = N^{\gcd(a,b)} - 1$
So I followed the hint:
$$\gcd\left( 2^p -1, 2^{q-1}-1 \right) = 2^{\gcd(p,q-1)} - 1$$
Then we have to show that $q\mid 2^{\gcd(p,q-1)}$.
Now, since $p$ is a prime: $\gcd(p,q-1)\in\{1,p\}$. If $\gcd(p,q-1) = p$ then it works out since $q\mid 2^p - 1$ by definition. But, it may be that $\gcd(p,q-1) = 1$. Isn't it? That would imply $q=1$ - A contradiction to the primality of $q$.
I guess I need to somehow eliminate the option that $\gcd(p,q-1)=1$.
How?