152

Let $g_i $ be the $i^{th}$ prime gap $p_{i+1}-p_i.$

If we re-arrange the sequence $ (g_{n,i})_{i=1}^n$ so that for any finite $n$ the gaps are arranged from smallest to largest we have a new sequence $(\hat{g}_{n,i})_{i=1}^n.$

For example, for $n = 10,$

$$(g_{10,i})_{i=1}^{10} = 1, 2, 2, 4, 2, 4, 2, 4, 6, 2; $$ $$(\hat{g}_{10,i})_{i=1}^{10} = 1, 2, 2, 2, 2, 2, 4, 4, 4, 6. $$

We can ask about the number of elements of the original sequence which are fixed under the sorting operation. For the example above $g_i = \hat{g}_i$ for $i = 1,2,3,5,8.$

The number of elements fixed by sorting appears to grow in a familiar way. Letting $f(n)$ be the number fixed for given $n$ :

$$\begin{array}{c | c | c | c | c | c | c | c | } n & 500 & 5000 & 50000 & 500000 & 1000000 & 2000000 \\ \hline f(n) & 82 & 614 & 4843 & 39072 & 74195 & 141777 \end{array}$$

For comparison, n and $\pi(n)$ (number of primes not exceeding n) are:

$$\begin{array}{c | c | c | c | c | c | c | c |} n & 500 & 5000 & 50000 & 500000 & 1000000 & 2000000 \\ \hline \pi(n) & 95 & 669 & 5133 & 41538 & 78498 & 148933 \end{array}$$

and the ratio $f(n)/\pi(n)$ at least for the numbers above appears to approach 1.

So my question is whether this might be an indirect consequence of the prime number theorem?

Edit:

This process seems to approximate the number of primes on intervals generally. For example, if we sort the prime gaps from $g_{120000}$ to $g_{127000}$, 556 are fixed. And $\pi(127000)- \pi(120000) = 600. $ So maybe a better way of putting the question is, why might it be true that

$$ f(g_m,g_{m+1},...,g_k) \approx \pi(k) - \pi(m) ?$$

Some things I have looked at. The prime number theorem gives us that $(g_n)$ is not monotone. I don't have an idea to support the suggestion that $f(n)/n \sim 1/\log n.$ If the probability (loosely speaking) that $g_k = \hat{g_k}$ is $1/\log n$ then maybe this can be explained in terms of the multiplicity, in some average sense, of $g_k$ in a particular finite sequence of gaps.

It occurs to me that if the number of gaps less than $n$ of size (say) 2 is $k(n),$ it is not possible to understand the probabilities involved without knowing whether $k(n)$ is bounded as $n$ gets large. So maybe the idea can be shown to be incorrect but showing it to be correct might require answering the threshold question about gaps.

Taking the suggestion above as true, assuming infinite gaps of all lengths (a conjecture of Polignac) and letting $c_k(n)$ be the number of prime gaps of length $k$ for given $n,$ if we assume also something akin to a well-distributed property in the distribution of gaps of length $k$ (which follows in a qualified way from a conjecture of Hardy-Littlewood$^1$) we have a simplification of notation based on geometry:

$$ f(n) \approx S = \frac{1}{n}\sum_{k = 1}^{n} c_k(n)^2\approx \frac{n}{\log n}.$$

If nothing else the expression conveys the idea of an average. While it doesn't seem fortuitous I cannot justify it.

Some numbers:

$$\begin{array}{c | c | c |c | } n & S & \pi(n) & S/ \pi(n) \\ \hline 100 & 21.01 & 25 &0.8404 \\ \hline 1000 & 145.13 & 168 &0.8638\\ \hline 10000 & 1071.45 & 1229 &0.8718\\ \hline 100000 &8562.17& 9592& 0.8926 \\ \hline \end{array}$$

Edit: Some palaver replaced by an image that shows the distribution of the first million prime gaps in terms of deviation from PNT. The peak is at 0 (the graph is shifted by about 70). The spacing of indices of the 74195 fixed gaps (deviation = 0) is quite prime-like.

image.

$^1$ See Conjectures 3.2, 3.4 of this very readable note by Chris Caldwell.

YuiTo Cheng
  • 4,337
  • 18
  • 23
  • 57
daniel
  • 9,714
  • 5
  • 30
  • 66
  • 5
    Your notation looks very sloppy to me. You are using $n$ as the index variable for your sequence $(\hat{g}_n)$, and also as the maximum value that your index variable is allowed to take. You need something like $(\hat{g}_{n,i})_{i=1}^n$. – TonyK Oct 03 '14 at 16:59
  • 8
    A fun fact is that in your first example, the indices of fixed prime gaps are consecutive Fibonacci numbers. – Sylvain Julien Oct 24 '18 at 06:19
  • 2
    @SylvainJulien why care about a small example when the number of overlaps is forced. –  Feb 26 '19 at 17:42
  • Thinking about the ratio of number of gaps of certain sizes seems more useful. Spacing of gaps also affects things, but if each gap type is half as likely as the last you get half+quarter+eighth+... = 1 of all gaps and any increase above these ratios of total numbers of gaps forces overlaps. –  Feb 27 '19 at 14:20
  • Nobody even brought up that 63% of the time it's guaranteed to have overlap. se: https://www.youtube.com/watch?v=pbXg5EI5t4c&app=desktop as well as https://oeis.org/search?q=derangements%20with%20fixed%20points –  May 22 '19 at 19:31
  • @daniel derangements are permutations with fixed points, you're permuting the prime gaps and looking for fixed points ( aka ovrlap) –  May 23 '19 at 09:41
  • Have you at least applied pigeonhole principle. –  May 24 '19 at 19:42
  • When does 2 go from being over 50% of gaps to less than 50% of gaps ? those are the times we can't gaurantee overlap. –  May 24 '19 at 22:08
  • Just Follow ... – Josh fisher Aug 04 '19 at 19:40
  • So youre trying to solve the twin prime conjecture? If there are infinitely many twin primes your sequence will simply be $(1,2,2,2,2,2,2,2,\ldots)$. Mathematicians "believe" this to be the case though it has yet to be proven. The sequence would be pretty trivial even though there are larger gaps. If you can show that your sequence is anything BUT that, then youve solve the twin prime conjecture. – CogitoErgoCogitoSum Mar 10 '20 at 02:30
  • 1
    @CogitoErgoCogitoSum: AFAIK this has nothing to do with the twin prime conjecture. – daniel Mar 10 '20 at 22:29
  • Listing the gaps in order from smallest gap to largest gap doesnt solve the twin prime conjecture? How so? The TPC asks if there are infinitely many twin primes. If there are, the sequence in question becomes the trivial sequence $(1,2,2,2,2,2,\ldots)$. How is this not the case? – CogitoErgoCogitoSum Mar 11 '20 at 00:24
  • The OPs sequence is based on ORDERING all gaps. I dont know why this is difficult to comprehend. Yes, there are gaps of 4 and gaps of 6, etc. But those dont matter... they are put "at the end" of the sequence. If there are an infinite many twin primes then there are infinitely many 2's in the ORDERED sequence (1,2,2,2,2,2,2..... 4,4,4,4,4.... , 6,6,6,6,...). There is nothing to be said about OPs sequence if it is so trivial as to be an infinite sequence of 2's. If there is or isnt, the TPC is solved. Am I really so off base here? – CogitoErgoCogitoSum Mar 11 '20 at 01:02
  • 1
    @CogitoErgoCogitoSum The OP is asking about the asymptotic behaviour of the fixed points of the gaps after reordering. The twin prime conjecture is equivalent to the limit of the ordered sequence being $(1,2,2,2,2,\dots)$ (with a suitable metric), but that is not what the OP is asking. The asymptotic behaviour of $f(n)$ is not determined by the limit of $\hat{g}_n$ – epiliam Jul 07 '20 at 01:58
  • 1
    @CogitoErgoCogitoSum The question is not related to the twin prime conjecture. The question is asking to compute the limit of f(n)/pi(n) as n tends to infinity. Or equivalently, the limit of f(n)*log(n)/n. – shalop Jul 07 '20 at 18:19
  • 2
    I suspect $f(n)$ is approximately $n/\log{n}$ for a random permutation of the prime gaps, so that sorting isn't special, but I haven't been able to prove it. – Sophie Jul 13 '20 at 03:01
  • @Sophie: My guess is that random permutations don't give the same limit but would be happy to see a proof either way. – daniel Jul 16 '20 at 15:48

0 Answers0