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):








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








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.

  • 1
    $\begingroup$ crosspost math.stackexchange.com/questions/3965108/… $\endgroup$
    – Will Jagy
    Dec 29, 2020 at 1:13
  • $\begingroup$ 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). $\endgroup$
    – LSpice
    Dec 29, 2020 at 2:31

1 Answer 1


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$.

  • $\begingroup$ 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. $\endgroup$ Dec 28, 2020 at 22:36
  • 2
    $\begingroup$ 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))$. $\endgroup$
    – Jack L.
    Dec 28, 2020 at 22:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.