# Smallest positive integers k such that there exists a prime P with the property that the six numbers P, P+K,P+2K,P+3K, P+4K, P+5K are all primes

Compact way to find the smallest positive integer $$K$$ such that there exists a prime $$P$$ with the property that the six numbers $$P$$, $$P+K$$,$$P+2K$$,$$P+3K$$,$$P+4K$$,$$P+5K$$ are all primes.

Here we can notice that $$K$$ and $$P$$ must be greater than $$5$$ to avoid getting composite numbers. In addition to this, by simply trial and error, I have got $$30$$ as $$K$$ and $$7$$ as $$P$$. Is it possible to get a rigorous proof?

We can generalize this problem as follows:

'Is it possible to find the largest n and the smallest positive integer $$K$$ such that there exists a prime $$P$$ with the property that the $$n+1$$ numbers $$P$$, $$P+K$$,$$P+2K$$,$$\cdots$$, $$P+nK$$ are all primes?'

Consider a given positive integer $$n \ge 1$$, and a corresponding positive integer $$K$$, for which a prime $$P$$ exists such that $$P$$, $$P + K$$, $$P + 2K$$, $$\ldots$$, $$P + nK$$ are all primes. Note $$K$$ must be an integral multiple of the primorial $$p_j\#$$, where the index refers to the prime index (e.g., $$p_1 = 2$$, $$p_2 = 3$$, etc.) and $$p_j$$ is the largest prime $$\le n$$. Thus, the smallest possible $$K$$ would be $$p_j\#$$ itself. This is why the minimum $$K$$ for your example where $$n = 5 = p_3$$ is $$30$$ since $$30 = p_3\# = 2(3)(5)$$.
To prove $$p_j\# \mid K$$, first note if $$P = p_i$$ for some $$1 \le i \le j$$, then $$p_i \mid P + p_i(K)$$, so it can't be prime, which means $$P \ge p_{j+1}$$. Next, assume there's a $$p_i$$, with $$i \le j$$, where $$p_i \nmid K$$. Then $$P$$, $$P + K$$, $$\ldots$$, $$P + (p_i - 1)K$$ all have different remainders modulo $$p_i$$ (since if any $$2$$ were the same, say $$P + qK$$ and $$P + rK$$ with $$r \gt q$$, the difference of $$(r - q)K$$ must be divisible by $$p_i$$ but $$0 \lt r - q \lt p_i$$). Since there are $$p_i$$ possible remainders from $$0$$ to $$p_i - 1$$ among these $$p_i$$ values, one of them must be $$0$$. As it must be $$\gt p_i$$, it can't be prime. This shows the original assumption that $$p_i \nmid K$$ must be false.
A special case to consider is if $$n + 1$$ is prime, i.e., it's $$p_{j+1}$$. If so, then if $$p_{j+1} \nmid K$$, you must have $$P = p_{j+1}$$ since, otherwise, one of the $$P + iK$$ for $$1 \le i \le n$$ must be a multiple of $$p_{j + 1}$$ and $$\gt p_{j+1}$$, so it can't be prime.
Regarding proving there always exists a prime $$P$$ where, with $$K = p_j\#$$, you have $$P + ik \; \forall \; 1 \le i \le n$$ being prime, there's no general method I know of to prove this. Although I suspect such a $$P$$ always exists, the only thing known for sure now is that a $$K$$ and $$P$$ do exist for any positive $$n$$, as explained in the next paragraph.
As for finding the largest $$n$$ where there's a $$K$$, including a smallest such $$K$$, where $$P$$, $$P + K$$, $$\ldots$$, $$P + nK$$ are all prime, there is no such maximum $$n$$. Note the Green–Tao theorem states