If $n > 1$ and all $n$ positive integers $a, a + k, \cdots , a+ (n - 1)k$ are odd primes, show every prime $<n \mid k$. Background: This is from Rosen 5th edition, $3.2.15$ Number Theory.
This is an important proof because $3$ following problems require it to be correct.

If $i=0$, and $j=p$ then this proof is wrong and $p\mid (i-j)$ and $p$ may not divide $k$. Can this proof be modified so that it is correct or do I not understand it?
Assume that $p\nmid k$ for some prime $p&lt;n.$ Then $kx\equiv-a\pmod p$ for some integer $0\leqslant x&lt;p$ so $a+kx\equiv0\pmod p$ and since each of the numbers $a+ik,$ with $0\leqslant i&lt;n,$ is a prime then $a+kx=p.$ Now notice that for each $1\leqslant i&lt;n$ we have $\gcd(a,i)=1$ for otherwise the number $a+ik=\gcd(a,i)\left(\frac{a}{\gcd(a,i)}+\frac{i}{\gcd(a,i)}k\right)$ would not be a prime. Thus $a\geqslant n.$ Therefore we have $n\leqslant a\leqslant a+kx=p&lt;n,$ which is a contradiction. Thus the primorial $(n-1)\#$ divides $k.$
If $i=0$, then $p$ would have to be equal to $-j$. This would be a contradiction since $i, j, p &gt; 0$. WLOG, we can assume $i-j&gt;0$.

Moreover, since $i \le p$ and $j \le p$, then the claim that $i-j &lt; p$ holds, and the proof is true. Does that help?