Why are $q$ and $p+1$ relatively prime if $q$ divides $p-1$? Looking at the solution of an exercise on Sylow theorems, I see that, if $q$ and $p$ are odd primes such that $q|(p-1),$ then $q$ and $p(p+1)$ are relatively prime.
I understand that $q$ and $p$ are relatively prime, but is there a reason (theorem) why $q$ and $(p+1)$ are relatively prime?
Thank you for your help.

Consider $q = 3$, $p = 7$. Obviously in this instance $p - 1$ is a multiple of $q$, let's say $mq$, where $m \geq 2$. Then $p(p + 1)$$ = p^2 + p = (mq + 1)^2 + mq + 1$. And $(mq + 1)^2 + mq + 1 = m^2 q^2 + 2mq + 1 + mq + 1$$ = m^2 q^2$$ + 3mq + 2.$
Since $q$ is at least $3$, and $m^2 q^2 + 3mq$ is a multiple of $q$, and the next higher multiple is $m^2 q^2 + 3mq + q$, it follows that $\gcd(q, p^2 + p) = 1$. If you've been following along with the example, you've seen that $\gcd(3, 56) = 1$, that $54$ is a multiple of $3$ and the next multiple of $3$ is $57$.
