A274122 Let F(g,p) be the frequency of g up to prime nextprime(p+1). Primes p such that F(2,p) = F(4,p) and g = 2 or 4.
97, 103, 109, 137, 163, 397, 457, 463, 569, 613, 739, 821, 827, 857, 2111, 2137, 2203, 2239, 2269, 2309, 2347, 2381, 4127, 4217, 8803, 9337, 12487, 12739, 12889, 12917, 19991, 20021, 20717, 20747, 20771, 20959, 21187, 21313, 21319, 21379, 21599, 21613, 21817, 21859, 22037, 22091, 22129, 22157, 22271, 22277, 22481, 22567
Offset: 1
Keywords
Examples
Up to 89, gaps 2 and 4 occur respectively 8 and 7 times. After 97 (the next prime after 89), there is a gap of 4. So up to 97, gaps 2 and 4 occur the same number of times and the gap after 97 is 2 or 4, so 97 is in the sequence.
Links
- David A. Corneth, Table of n, a(n) for n = 1..862 (all terms up to 10^8)
- 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(),is24 = List()); 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]++; if(g<6&gapcount>1,if(gapcount[1]==gapcount[2],listput(is24,i)))); is24} \\ David A. Corneth, Jun 28 2016
Comments