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

A356223 Position of n-th appearance of 2n in the sequence of prime gaps (A001223). If 2n does not appear at least n times, set a(n) = -1.

Original entry on oeis.org

2, 6, 15, 79, 68, 121, 162, 445, 416, 971, 836, 987, 2888, 1891, 1650, 5637, 5518, 4834, 9237, 8152, 10045, 21550, 20248, 20179, 29914, 36070, 24237, 53355, 52873, 34206, 103134, 90190, 63755, 147861, 98103, 117467, 209102, 206423, 124954, 237847, 369223
Offset: 1

Views

Author

Gus Wiseman, Aug 04 2022

Keywords

Comments

Prime gaps (A001223) are the differences between consecutive prime numbers. They begin: 1, 2, 2, 4, 2, 4, 2, 4, 6, ...

Examples

			We need the first 15 prime gaps (1, 2, 2, 4, 2, 4, 2, 4, 6, 2, 6, 4, 2, 4, 6) before we reach the 3rd appearance of 6, so a(6) = 15.
		

Crossrefs

The first appearances are at A038664, seconds A356221.
Diagonal of A356222.
A001223 lists the prime gaps.
A073491 lists numbers with gapless prime indices.
A356224 counts divisors with gapless prime indices, complement A356225.
A356226 = gapless interval lengths of prime indices, run-lengths A287170.

Programs

  • Mathematica
    nn=1000;
    gaps=Differences[Array[Prime,nn]];
    Table[Position[gaps,2*n][[n,1]],{n,Select[Range[nn],Length[Position[gaps,2*#]]>=#&]}]

A356221 Position of second appearance of 2n in the sequence of prime gaps A001223; if 2n does not appear at least twice, a(n) = -1.

Original entry on oeis.org

3, 6, 11, 72, 42, 47, 62, 295, 180, 259, 297, 327, 446, 462, 650, 1315, 1059, 1532, 4052, 2344, 3732, 3861, 8805, 7234, 4754, 2810, 4231, 14124, 5949, 9834, 17200, 10229, 19724, 25248, 15927, 30765, 42673, 28593, 24554, 50523, 44227, 44390, 29040, 89715, 47350
Offset: 1

Views

Author

Gus Wiseman, Aug 02 2022

Keywords

Comments

Prime gaps (A001223) are the differences between consecutive prime numbers. They begin: 1, 2, 2, 4, 2, 4, 2, 4, 6, ...

Crossrefs

The position of the first (instead of second) appearance of 2n is A038664.
Column k = 2 of A356222.
The position of the n-th appearance of 2n is A356223.
A001223 lists the prime gaps, reduced A028334.
A073491 lists numbers with gapless prime indices.
A274121 counts appearances of the n-th prime gap in those prior.
A356226 gives the lengths of maximal gapless intervals of prime indices.

Programs

  • Mathematica
    nn=1000;
    gaps=Differences[Array[Prime,nn]];
    mnrm[s_]:=If[Min@@s==1,mnrm[DeleteCases[s-1,0]]+1,0];
    Table[Position[gaps,2*n][[2,1]],{n,mnrm[Select[Range[nn],Length[Position[gaps,2*#]]>=2&]]}]
Showing 1-2 of 2 results.