If p is a prime, find the possible values of gcd(a, a + p).
and find a necessary and sufficient condition for gcd(a, a+p) = 1 where p is a
prime.
If $\displaystyle d$ divides both $\displaystyle a$ and $\displaystyle a+p$ then $\displaystyle d|p$, so $\displaystyle d=1$ or $\displaystyle d=p$.
A necessary and sufficient condition that $\displaystyle \mbox{gcd }(a,a+p)=1$ is that $\displaystyle p\nmid a$.