A274121 The gap prime(n+1) - prime(n) occurs for the a(n)-th time.
1, 1, 2, 1, 3, 2, 4, 3, 1, 5, 2, 4, 6, 5, 3, 4, 7, 5, 6, 8, 6, 7, 7, 1, 8, 9, 9, 10, 10, 1, 11, 8, 11, 1, 12, 9, 10, 12, 11, 12, 13, 2, 14, 13, 15, 1, 2, 14, 16, 15, 13, 17, 3, 14, 15, 16, 18, 17, 16, 19, 4, 2, 17, 20, 18, 3, 18, 5, 21, 19, 19, 2, 20, 21, 20, 22, 3, 21, 4, 6, 22, 7, 23, 23, 22, 24, 5, 23, 24, 24, 3, 6
Offset: 1
Keywords
Examples
(p, g) denotes a prime p and the gap up to the next prime. So p + g is the next prime after p. These pairs start (2, 1), (3, 2), (5, 2), (7, 4), (11, 2). From here we see that: - the gap after the first prime, 1 occurs for the first time, so a(1) = 1. - the gap after the second prime, 2, occurs for the first time, so a(2) = 1. - the gap after the third prime, 2, occurs for the second time, so a(3) = 2. - the gap after the fourth prime, 4, occurs for the first time, so a(4) = 1. - the gap after the fifth prime, 2, occurs for the third time, so a(5) = 3.
Links
- David A. Corneth, Table of n, a(n) for n = 1..100021 (all terms up to 1300000)
- David A. Corneth, PARI program
- PolyMath, Bounded gaps between primes.
- Wikipedia, Polignac's conjecture.
Programs
-
PARI
\\ See link by name "PARI program" for an extended version with comments. upto(n) = {my(gapcount=List(), freqgap = List([1])); n = max(n, 3); forprime(i=3,n, g = nextprime(i+1) - i; for(i=#gapcount+1, g\2, listput(gapcount,0)); gapcount[g\2]++; listput(freqgap,gapcount[g\2]));freqgap} \\ David A. Corneth, Jun 28 2016
Comments