# Search for gaps between primes where each composite is divisible by increasing integers (2, 3, 4, ...)

Almost every text of number theory contains in its first chapters something similar to the following:

For any integer n, the factorial n! is the product of all positive integers up to and including n. Then in the sequence $$\,n!+2,\,n!+3,\,\ldots,\,n!+n\,$$ the first term is divisible by 2, the second term is divisible by 3, and so on. Thus, this is a sequence of $$\,n-1\,$$ consecutive composite integers, and it must belong to a gap between primes having length at least $$\,n$$.

But what about gaps between primes where each composite is divisible by increasing integers $$\,(2,\,3,\,4,\,\ldots)$$, without using factorials?

Obviously, we shall say that $$\,g_n\,$$ is a "maximal gap", if $$\,g_m\lt g_n\,$$ for all $$\,m\lt n$$.

A list of the primes bounding the first maximal gaps (found searching into the first $$\,10^7$$ primes):

$$(g=2)\;\;\;\;\;\;\,3,\,5\;\;\;\;\;\;\;\;(2|4)$$

$$(g=4)\;\;\;\;\;\;13,\,17\;\;\;\;\;\,(2|14,\,3|15,\,4|16)$$

$$(g=6)\;\;\;\;\;\;\,61,\,67\;\;\;\;\;(2|62,\,3|63,\,4|64,\,5|65,\,6|66)$$

$$(g=10)\;\;\;\;\;2521,\,2531\;\;\;\;\;(\ldots)$$

$$(g=12)\;\;\;\;\;471241,\,471253\;\;\;\;\;(\ldots)$$

$$(g=16)\;\;\;\;\;4324321,\,4324337\;\;\;\;\;(\ldots)$$

$$(g=18)\;\;\;\;\;110270161,\,110270179\;\;\;\;\;(\ldots)$$

Here, instead, is a list of the frequencies ($$f_g$$) of all gaps (also not maximal) up to the first $$\,10^7$$ primes:

$$(g=2)\;\;\;\;\;\;\,f_2=738597$$

$$(g=4)\;\;\;\;\;\;\,f_4=368781$$

$$(g=6)\;\;\;\;\;\;\,f_6=123052$$

$$(g=10)\;\;\;\;\;f_{10}=4136$$

$$(g=12)\;\;\;\;\;f_{12}=447$$

$$(g=16)\;\;\;\;\;f_{16}=17$$

$$(g=18)\;\;\;\;\;f_{18}=1$$

Some remarks: starting from $$g=6$$, in order to have satisfied the divisibility by 5, the first prime must be congruent to 1 (mod 20); $$\,g\,$$ seems always long $$\,p-1$$ (or it is just a coincidence?); $$\,f_2\sim 2f_4\sim 6f_6$$; maybe, there are infinitely many maximal gaps.

Could the previous remarks (except for the first) be explained in any way?

Many thanks.

• Dec 29 '20 at 1:13
• What does "$g$ seems always long $p - 1$" mean, and what is $p$? Also, since your point is that the gap is precisely between primes, maybe you would change the title to reflect that (rather than drawing attention with the artificial restriction not to use factorials, which seems not really related to the essential parts of the question). Dec 29 '20 at 2:31

Without using factorials, will you consider using the least common multiple as acceptable? That is, let $$\ell(n):={\rm lcm}\,\{1,2,\ldots,n\}\,,$$ and consider the sequence $$\ell(n)+2\,,\ell(n)+3,\ldots, \ell(n)+n\,.$$ Then, by a similar argument to using factorials, the sequence is respectively divisible by $$2,3,\ldots, n$$.
• Surely, but $\,n!+1\,$ and $\,n!+1+n\,$ are not always both primes, as well as $\,lcm(1,\,2,\,\ldots,\,n)+1\,$ and $\,lcm(1,\,2,\,\ldots,\,n)+1+n\,$. So, my point of view is different. Dec 28 '20 at 22:36
• Ah, so you are looking for precisely between prime numbers? For that, I believe, there is no explicit expression; at best, once could only obtain some asymptotic expression, which I wouldn’t be surprised is simply $\ell(n)$ or $\mathcal{O}(\ell(n))$. Dec 28 '20 at 22:41