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.

Showing 1-4 of 4 results.

A080841 Number of pairs (p,q) of (not necessarily consecutive) primes with q-p = 6 and q < 10^n.

Original entry on oeis.org

0, 15, 74, 411, 2447, 16386, 117207, 879908, 6849047, 54818296, 448725003, 3741217498
Offset: 1

Views

Author

Jason Earls, Mar 28 2003

Keywords

Comments

Note that one has to be careful to distinguish between pairs of consecutive primes (p,q) with q-p = 6 (A031924), and pairs of primes (p,q) with q-p = 6 (A023201). Here we consider the latter, whereas A093738 considers the former. - N. J. A. Sloane, Mar 07 2021

Crossrefs

Programs

  • PARI
    {c=0; p=7; for(n=1,9, while(p<10^n,if(isprime(p-6),c++); p=nextprime(p+1)); print1(c,","))}

Extensions

a(8) and a(9) from Klaus Brockhaus, Mar 30 2003
More terms from R. J. Mathar, Aug 05 2007

A093737 Number of prime pairs below 10^n having a difference of 4.

Original entry on oeis.org

0, 7, 40, 202, 1215, 8143, 58621, 440257, 3424679, 27409998, 224373160, 1870585458, 15834656002, 135779962759, 1177207270203, 10304191320776, 90948823579814, 808675898548205
Offset: 1

Views

Author

Enoch Haga, Apr 15 2004

Keywords

Examples

			a(2) = 7 because there are 7 prime gaps of 4 below 10^2.
		

Crossrefs

Programs

  • PARI
    a(n)=my(p=2,s); forprime(q=3,10^n, if(q-p==4, s++); p=q); s \\ Charles R Greathouse IV, Feb 05 2016
  • UBASIC
    20 N=1:dim T(34); 30 A=nxtprm(N); 40 N=A; 50 B=nxtprm(N); 60 D=B-A; 70 for x=2 to 34 step 2; 80 if D=X and B<10^2+1 then T(X)=T(X)+1; 90 next X; 100 if B>10^2+1 then 140; 110 B=A; 120 N=N+1; 130 goto 30; 140 for x=2 to 34 step 2; 150 print T(X);, 160 next (This program simultaneously finds values from 2 to 34 -- if gap=2 add 1-- adjust lines 80 and 100 for desired 10^n)
    

Extensions

a(10)-a(13) from Washington Bomfim, Jun 22 2012
a(14)-a(18) from S. Herzog's website added by Giovanni Resta, Aug 14 2018

A093739 Number of prime pairs below 10^n having a difference of 8.

Original entry on oeis.org

0, 1, 15, 101, 773, 5569, 42352, 334180, 2695109, 22160841, 185402143, 1573331564, 13515180171, 117333792953, 1028087693781, 9081524454631, 80799078096971, 723494891844589
Offset: 1

Views

Author

Enoch Haga, Apr 15 2004

Keywords

Examples

			a(3) = 15 because there are 15 prime gaps of 8 below 10^3.
		

Crossrefs

Programs

  • UBASIC
    20 N=1:dim T(34);
    30 A=nxtprm(N);
    40 N=A;
    50 B=nxtprm(N);
    60 D=B-A;
    70 for x=2 to 34 step 2;
    80 if D=X and B<10^2+1 then T(X)=T(X)+1;
    90 next X;
    100 if B>10^2+1 then 140;
    110 B=A;
    120 N=N+1;
    130 goto 30;
    140 for x=2 to 34 step 2;
    150 print T(X);,
    160 next
    ## (This program simultaneously finds values from 2 to 34 - if gap=2 add 1- adjust lines 80 and 100 for desired 10^n)

Extensions

a(10)-a(13) from Washington Bomfim, Jun 20 2012
a(14)-a(18) from S. Herzog's website added by Giovanni Resta, Aug 14 2018

A341843 Number of sexy consecutive prime pairs below 2^n.

Original entry on oeis.org

0, 0, 0, 0, 1, 4, 7, 13, 25, 45, 80, 136, 251, 443, 784, 1377, 2420, 4312, 7756, 14106, 25554, 46776, 85774, 157325, 290773, 538520, 1000321, 1861364, 3473165, 6493997, 12167342, 22851920, 42987462, 81018661, 152945700, 289206487, 547722346, 1038786862
Offset: 1

Views

Author

Artur Jasinski, Feb 21 2021

Keywords

Comments

a(n) is the number of pairs of consecutive sexy primes {A023201, A046117} less than 2^n.
For each n from 9 through 48, the most frequently occurring difference between consecutive primes is 6. On p. 108 of the article by Odlyzko et al., the authors estimate that around n=117, the jumping champion (i.e., the most frequently occurring difference between consecutive primes) becomes 30, and around n=1412 it becomes 210. Successive jumping champions are conjecturaly the primorial numbers A002110.
Data for n >= 15 taken from Marek Wolf's prime gaps computation.
For the number of pairs of consecutive primes below 10^n having a difference of 6, see A093738.
For the number of sexy primes less than 10^n, see A080841.
There are 8 known cases in which a power of 2 falls between the members of the sexy consecutive prime pair (see A220951), but if a pair (p, p+6) is such that p < 2^n < p+6, that pair is not counted in a(n).

Examples

			a(6)=4 because 2^6=64 and we have 4 sexy consecutive prime pairs less than 64: {23,29}, {31,37}, {47,53}, {53,59}.
		

Crossrefs

Programs

  • Mathematica
    pp = {}; Do[kk = 0; Do[If[Prime[m + 1] - Prime[m] == 6, kk = kk + 1], {m, 2, PrimePi[2^n] - 1}]; AppendTo[pp, kk], {n, 4, 20}]; pp
Showing 1-4 of 4 results.