TITLE: sequence of primes in arithmetic progression
QUESTION [9 upvotes]: The question is:
Suppose $p_1<p_2<...<p_{15}$ is a sequence of prime numbers in arithmetic progression, with common difference $d$. Prove that $d$ is divisible by $2,3,5,7,11$ and $13$.
Let $p_n = a+(n-1)d$, by the definition of an arithmetic sequence. It is easy to see that $a$ is odd, and I can prove that $d$ is even easily enough. 
I could then show $d$ is divisble by 3 by using the technique of letting $d=3x+c$, and $a=3y+d$, and by going through each possible value of c and d, d not equal to zero, I showed that the only solution where a and d were still prime was when $c=0$ or $3$.
While I could do the same thing for showing d is divisible by 5,7,11 and 13, this is a very laborious process that takes quite a long time. Are there any faster ways of proving this? I feel there is a way to do it using modular arithmetic, but I'm not very competent with regards to modular arithmetic, so I can't think of anything.

REPLY [2 votes]: First we show that $d$ divides all of $2, 3, 5, 7$. Take some $q$ in the set $\{2, 3, 5, 7\}$. Since $2q < 15$ we know that there is a sub-sequence of terms of length $2q$ in our arithmetic progression. Now, if $q$ does not divide $d$, because $q$ is a prime, $d$ and $q$ must be coprime. So there must be two numbers in our progression of $2q$ terms that divide $q$. Which contradicts the fact that all are distinct primes. Call this result (1).
Now, for the cases of $q$ in the set $\{11, 13\}$. If $q$ divides $d$, then we're done. So suppose it doesn't, towards a contradiction. Well, then, we again have the case that $q$ and $d$ must be coprime. Because $q < 15$, there is always a sub-sequence of $q$ terms in our sequence. And because $d$ and $q$ are coprime, one of these terms must divide $q$. But being prime, it must actually equal $q$. Now, suppose this $q$ appears as the first term in our main sequence i.e. $p_1 = q$. Then we know there is a sub-sequence of $14$ terms in sequence to the right, and so because of coprime $d$ and $q$ one of them must also equal $q$, which is a contraction. So there is always a term to the left of $q$, call it $p_i$. Now, $p_i$ is positive, and we have that $p_i + d = q$ by our definition of arithmetic progression. And $d$ is positive, by our assumption. So $d < q$. But we know that $q \leq 13$. So $d < 13$. But we know from our earlier result (1) that $d$ divides $2, 3, 5, 7$. So $2 \times 3 \times 5 \times 7 \leq d$. Which implies $2 \times 3 \times 5 \times 7 < 13$. This is clearly false.

Note: we only needed 14 terms in our arithmetic progression for this proof to work. This result can be generalised: given any progression of $p + 1$ or more primes, for some prime $p$, then the common difference $d$ of the progression divides all primes less than or equal to $p$. For the first few primes $2, 3, 5, 7$ we need to tweak the above proof a bit. In the the general case, we rely on a lower bound for the primorial (product of all primes up to a given prime). The bound is $2^{\frac{n(n+1)}{2}}$ for some prime $p \geq 2^{n}$. This bound can be derived from Bertrand's postulate.