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.

A329250 Let P1, P2, P3, P4 be consecutive primes, with P2 - P1 = P4 - P3 = 2. a(n) = (P1 + P2)/12 for the first occurrence of (P3 - P1)/6 = n.

Original entry on oeis.org

1, 23, 322, 1573, 495, 3407, 10498, 85067, 8113, 112912, 166302, 28893, 189052, 510548, 598532, 812752, 139708, 716182, 2582073, 4576458, 2497092, 5130198, 5761777, 25381573, 7315173, 20200532, 40629683, 33185292, 69948743, 38771927, 13194622
Offset: 1

Views

Author

Hugo Pfoertner, Nov 09 2019

Keywords

Comments

Position of first occurrence of a gap of length P3 - P2 = 6*n - 2 containing no primes, bounded by twin primes (P1,P2) below and (P3,P4) above.

Examples

			a(4) = 1573, because the 4 primes P1 = 6*1573 - 1 = 9437, P2 = 6*1573 + 1 = 9439, P3 = P1 + 6*4 = 9461, P4 = 9463 produce the first occurrence of the gap P3 - P2 = 9461 - 9439 = 6*4 - 2 = 22. See also example in A329164.
		

Crossrefs

Programs

  • PARI
    my(v=vector(31),p1=3,p2=5,p3=7,r=0,d);forprime(p4=11,5e8,if(p2-p1==2&&p4-p3==2,d=(p3-p1)/6;if(v[d]==0,v[d]=(p1+p2)/12));p1=p2;p2=p3;p3=p4);v

A329251 Let P1 >= 3, P2, P3 be consecutive primes, with P3 - P2 = 2. a(n) = (P2 + P3)/12 for the first occurrence of (P2 - P1)/2 = n.

Original entry on oeis.org

1, 2, 5, 0, 25, 87, 0, 325, 213, 0, 192, 758, 0, 500, 1158, 0, 1668, 5383, 0, 4217, 13130, 0, 15180, 4713, 0, 5955, 19583, 0, 66642, 17127, 0, 48108, 49485, 0, 28905, 171005, 0, 175530, 61838, 0, 314192, 76967, 0, 192637, 96147, 0, 812768, 708780, 0
Offset: 1

Views

Author

Hugo Pfoertner, Nov 10 2019

Keywords

Comments

Position of first occurrence of a gap of length P2 - P1 = 2*n containing no primes, immediately before the twin primes (P2,P3). To indicate impossible gaps of lengths 8, 14, 20, ..., a(3k+1) is set to 0 for all k >= 1.

Examples

			a(5) = 25 because the prime gap immediately before P2 = 25*6 - 1 = 149, P3 = 25*6 + 1 = 151 is the first such gap with length 2*n = 2*5 = 10. P2 - P1 = 149 - 139 =10.
		

Crossrefs

Programs

  • Mathematica
    Module[{nn=500000,lst},lst={(#[[2]]-#[[1]])/2,(#[[2]]+#[[3]])/12}&/@ Select[ Partition[Prime[Range[2,nn]],3,1],#[[3]]-#[[2]]==2&];Table[ SelectFirst[ lst,#[[1]]==n&],{n,50}]/.Missing["NotFound"]->{0,0}] [[All,2]] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Nov 04 2020 *)
  • PARI
    my(v=vector(70), p1=3, p2=5, d); forprime(p3=7, 5e6, if(p3-p2==2, d=(p2-p1)/2; if(v[d]==0, v[d]=(p2+p3)/12)); p1=p2; p2=p3); v[1..49]
Showing 1-2 of 2 results.