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-7 of 7 results.

A053303 Length of maximal prime gap p_{k+1} - p_k with starting prime p_k < 10^n.

Original entry on oeis.org

4, 8, 20, 36, 72, 114, 154, 220, 282, 354, 464, 540, 674, 804, 906, 1132
Offset: 1

Views

Author

Enoch Haga, Mar 05 2000

Keywords

Comments

Prime gaps associated with A053302.
a(17) is probably 1220 and a(19) is probably 1296. - Robert G. Wilson v, Mar 16 2004

Examples

			a(1) = 4 from 7 to 11. a(2) = 8 from 89 to 97. a(3) = 20 from 887 to 907.
a(5)=72 because the 5-digit prime 31397 begins a gap of 72.
		

Crossrefs

p_k's are in A053302. Cf. A005250, A002386. Essentially the same as A038460.

Extensions

a(16) from Eric W. Weisstein, Mar 05 2004

A213930 Table of frequencies of gaps of size 2d between consecutive primes below 10^n, n >= 1; d = 1,2,...,A213949(n).

Original entry on oeis.org

2, 8, 7, 7, 1, 35, 40, 44, 15, 16, 7, 7, 0, 1, 1, 205, 202, 299, 101, 119, 105, 54, 33, 40, 15, 16, 15, 3, 5, 11, 1, 2, 1, 1224, 1215, 1940, 773, 916, 964, 484, 339, 514, 238, 223, 206, 88, 98, 146, 32, 33, 54, 19, 28, 19, 5, 4, 3, 5
Offset: 1

Views

Author

Washington Bomfim, Jun 24 2012

Keywords

Comments

Sum of elements in line n is Pi(10^n)-2. Column d is the sequence of the numbers of gaps of size 2d between consecutive primes up to 10^n. For example, column 1 is A007508, and column 2 is A093737. Column 3 corresponds to the jumping champion 6. Column 15 corresponds to the next champion 30. It is interesting that local maximums appear in the beginning of this column, 11 in line 4, and 146 in line 5.

Examples

			Table begins
   2
   8    7    7   1
  35   40   44  15  16   7   7   0   1   1
  205  202  299 101 119 105  54  33  40  15  16  15  3  5  11  1  2  1
1224 1215 1940 773 916 964 484 339 514 238 223 206 88 98 146 32 33 54 19 28...
		

Crossrefs

Cf. A038460, A000720, A007508, A093737, A213949 (row lengths).

Programs

  • Mathematica
    Table[t2 = Sort[Tally[Table[Prime[k + 1] - Prime[k], {k, 2, PrimePi[10^n] - 1}]]]; maxDiff = t2[[-1, 1]]/2; t3 = Table[0, {k, maxDiff}];Do[t3[[t2[[i, 1]]/2]] = t2[[i, 2]], {i, Length[t2]}]; t3, {n, 5}] (* T. D. Noe, Jun 25 2012 *)

A046728 Let p1, p2 be first pair of consecutive primes with difference 2n; let p3, p4 be 2nd such pair; sequence gives "wadi" value p3-p1.

Original entry on oeis.org

2, 6, 8, 270, 42, 12, 180, 102, 546, 750, 822, 510, 660, 300, 534, 5208, 7140, 3302, 7800, 1476, 18840, 20706, 9570, 44960, 13986, 5862, 4672, 71118, 14538, 59370, 156348, 17688, 59184, 155736, 1782, 328694, 110370, 119616, 93402, 76116
Offset: 1

Views

Author

Keywords

Examples

			First consecutive prime pair having difference 60 is p1=43331, p2=43391; next is p3=102701, p4=102761; so a(30)=102701-43331=59370.
		

References

  • Enoch Haga, Exploring Prime Numbers on Your PC, 2nd edition, 1998, ISBN 1-885794-16-9, Table 5, pp. 40-41.

Crossrefs

Cf. A038460, A038343. a(i)=b(i)-c(i) where b(i) is A046789 and c(i) is A000230.

Programs

  • Mathematica
    Flatten[Table[Differences[First /@ Take[Select[Partition[Prime[Range[60000]], 2, 1], Differences[#] == {2 n} &], 2]], {n, 40}]] (* Jayanta Basu, Jun 27 2013 *)
  • PARI
    a(n)=my(k,p=2,p1);forprime(q=3,,if(q-p==2*n,if(k++>1,return(p-p1),p1=p));p=q) \\ Charles R Greathouse IV, Jun 27 2013

Formula

a(n) = A046789(n) - A000230(n). - Robert G. Wilson v, Nov 26 2020

Extensions

More terms from Jud McCranie
a(31) inserted by Jayanta Basu, Jun 27 2013

A123386 Largest difference between successive semiprimes up to 10^n inclusive.

Original entry on oeis.org

3, 7, 14, 24, 38, 47, 74, 74, 95, 112, 146, 163, 174
Offset: 1

Views

Author

Alexander Adamchuk, Nov 09 2006

Keywords

Comments

There are 4 semiprimes up to 10^1 {4, 6, 9, 10}. The differences between successive semiprimes are {2, 3, 1}. Thus a(1) = Max[ {2, 3, 1} ] = 3.

Crossrefs

Programs

  • PARI
    A001358(prev)={ local(a=prev+1) ; while(bigomega(a)!=2, a++ ; ) ; return(a) ; }
    A123386(n)={ local(sp1=4,sp2=6,a=2) ; while(sp2<=10^n, a=max(a,sp2-sp1) ; sp1=sp2 ; sp2=A001358(sp1) ; ) ; return(a) ; }
    { for(n=1,13, print(A123386(n)) ; ) ; } \\ 2 more terms from R. J. Mathar, Jan 17 2008

Extensions

2 more term from R. J. Mathar, Jan 17 2008
a(8)-a(9) from Donovan Johnson, Sep 05 2008
a(10)-a(11) from Donovan Johnson, Apr 14 2010
a(12)-a(13) from Donovan Johnson, Sep 20 2012

A213949 One half of largest prime gap up to 10^n.

Original entry on oeis.org

1, 4, 10, 18, 36, 57, 77, 110, 141, 177, 232, 270, 337, 402, 453, 566, 610, 721
Offset: 1

Views

Author

Washington Bomfim, Jun 26 2012

Keywords

Comments

Row lengths of A213930.

Crossrefs

Formula

a(n) = A038460(n)/2.

A380139 Prime gaps between 10^m and 10^(m+1), m>=0, sorted first by falling number of occurrences and then by rising gap size, written as an irregular triangle.

Original entry on oeis.org

2, 1, 4, 4, 6, 2, 8, 6, 4, 2, 10, 8, 12, 14, 18, 20, 6, 2, 4, 10, 12, 8, 14, 18, 16, 22, 24, 20, 30, 28, 26, 34, 32, 36, 6, 2, 4, 12, 10, 8, 18, 14, 16, 20, 22, 24, 30, 28, 26, 36, 32, 34, 40, 38, 42, 52, 44, 50, 46, 54, 58, 48, 56, 60, 62, 64, 72
Offset: 1

Views

Author

Hugo Pfoertner based on an idea by Richard Stephen Donovan, Jan 23 2025

Keywords

Comments

A gap between two primes p1 and p2 is assumed to belong to the range [10^m .. 10^(m+1)[ if 10^m <= (p1+p2)/2 < 10^(m+1). Thus the gap between 7 and 11 is counted in the interval 1 .. 10. Gaps symmetric to 10^k occur for k = 17, 45, ... .

Examples

			The triangle begins, with corresponding counts in [...]:
  [2, 1, 1]
   2, 1, 4,
  [7, 7, 6, 1]
   4, 6, 2, 8,
  [37, 32, 27, 16, 14,  8,  7,  1,  1]
    6,  4,  2, 10,  8, 12, 14, 18, 20
  [255, 170, 162, 103, 98, 86, 47, 39, 33, 16, 15, 14, 11,  5,  3,  3,  1,  1]
    6,   2,   4,   10, 12,  8, 14, 18, 16, 22, 24, 20, 30, 28, 26, 34, 32, 36,
  [1641, 1018, 1013, 860, 797, 672, 474, 430, 306, 223, 207, 191, 135, 93, 85, ...]
     6,    2,    4,   12,  10,  8,   18,  14,  16,  20,  22,  24,  30, 28, 26, ...
  [11609, 7040, 6945, 6928, 6163, 4796, 4395, 3749, 2542, 2476, 2164, 1949, ...]
     6,    12,    2,    4,   10,    8,   18,   14,   16,   24,   20,   22,  ...
  6, 12, 2, 4, 10, 18, 8, 14, 24, 16, 30, 20, 22, 28, 26, 36, 42, 34, ...
  6, 12, 4, 2, 10, 18, 8, 14, 24, 30, 16, 20, 22, 28, 26, 36, 42, 34, ...
  6, 12, 10, 4, 2, 18, 8, 14, 24, 30, 16, 20, 22, 28, 36, 26, 42, 34, ...
  6, 12, 18, 10, 2, 4, 8, 24, 30, 14, 20, 16, 22, 36, 28, 26, 42, 34, ...
		

Crossrefs

Cf. A005597, A173557, A305444 for the asymptotic behavior of gap sizes.

A286894 a(n) = maximum difference between two consecutive primes up to 2^n.

Original entry on oeis.org

0, 1, 2, 4, 6, 6, 14, 14, 14, 20, 34, 34, 34, 44, 72, 72, 72, 86, 114, 114, 148, 148, 154, 154, 210, 220, 222, 248, 282, 282, 292, 336, 354, 382, 456, 464, 468, 486, 532, 540, 602, 652, 674, 716, 766, 778, 804, 906, 906, 906
Offset: 1

Views

Author

Jean-François Alcover, May 15 2017

Keywords

Examples

			Up to 2^5 = 32, the maximum difference between two consecutive primes is 6 (at 29 - 23), so a(5)=6.
		

Crossrefs

Programs

  • Mathematica
    a[n_] := If[n == 1, 0, Prime[Range[PrimePi[NextPrime[2^n, -1]]]] // Differences // Max]; Table[an = a[n]; Print["a(", n, ") = ", an]; an, {n, 1, 30}]
  • PARI
    a(n) = {maxg = 0; p = 2; forprime(q=3, 2^n, maxg = max(maxg, q-p); p=q;); maxg;} \\ Michel Marcus, May 15 2017

Extensions

a(33)-a(50) from David A. Corneth, May 16 2017
Showing 1-7 of 7 results.