cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

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.

This page as a plain text file.
%I A274122 #34 Apr 02 2024 14:33:39
%S A274122 97,103,109,137,163,397,457,463,569,613,739,821,827,857,2111,2137,
%T A274122 2203,2239,2269,2309,2347,2381,4127,4217,8803,9337,12487,12739,12889,
%U A274122 12917,19991,20021,20717,20747,20771,20959,21187,21313,21319,21379,21599,21613,21817,21859,22037,22091,22129,22157,22271,22277,22481,22567
%N 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.
%C A274122 Gaps 2 and 4 are conjectured to occur roughly equally often and each occur infinitely often (see link "Polignac's conjecture").
%C A274122 Conjecture: This sequence is infinite.
%H A274122 David A. Corneth, <a href="/A274122/b274122.txt">Table of n, a(n) for n = 1..862 (all terms up to 10^8)</a>
%H A274122 David A. Corneth, <a href="/A274122/a274122.gp.txt">PARI program</a>
%H A274122 PolyMath, <a href="http://michaelnielsen.org/polymath1/index.php?title=Bounded_gaps_between_primes">Bounded gaps between primes.</a>
%H A274122 Wikipedia, <a href="https://en.wikipedia.org/wiki/Polignac%27s_conjecture">Polignac's conjecture.</a>
%e A274122 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.
%o A274122 (PARI) \\ See link by name "PARI program" for an extended version with comments.
%o A274122 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));
%o A274122 gapcount[g\2]++; if(g<6&&#gapcount>1,if(gapcount[1]==gapcount[2],listput(is24,i)))); is24} \\ _David A. Corneth_, Jun 28 2016
%Y A274122 Cf. A007351, A274121, A274123.
%K A274122 nonn
%O A274122 1,1
%A A274122 _David A. Corneth_, Jun 10 2016