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

A090952 Erroneous version of A053778.

Original entry on oeis.org

3, 5, 11, 17, 101, 137, 179, 191, 419, 809, 821
Offset: 0

Views

Author

Keywords

A329164 Let P1, P2, P3, P4 be consecutive primes, with P2-P1=P4-P3=2. a(n)=(P1+P2)/12 when P3-P2 sets a new record.

Original entry on oeis.org

1, 23, 322, 495, 3407, 8113, 28893, 139708, 716182, 2497092, 5130198, 5761777, 7315173, 13194622, 145995245, 201544467, 417649822, 566513637, 833667068, 2266818768, 4710228962, 5186737183, 5192311957, 7454170028, 9853412390, 11817808908
Offset: 1

Views

Author

Hugo Pfoertner, Nov 07 2019

Keywords

Comments

Position of record gaps with no primes bounded by consecutive pairs of twin primes. The length of the corresponding record gaps (P3-P1)/6 is given by A329165.
In the neighborhood of a(15), the growth of this sequence seems to change notably. See the plot2 graph in the links. Does this signify anything important? - Peter Munn, Aug 01 2025

Examples

			Values of P1, P2, P3, P4 corresponding to record gaps:
  P3-P1 P1   P2   P3   P4                   a(n)
   6     5    7   11   13        (5+7)/12 =   1
  12   137  139  149  151    (137+139)/12 =  23
  18  1931 1933 1949 1951  (1931+1933)/12 = 322
  30  2969 2971 2999 3001  (2969+2971)/12 = 495
		

Crossrefs

Programs

  • PARI
    p1=3;p2=5;p3=7;r=0;forprime(p4=11,1e9,if(p2-p1==2&&p4-p3==2,d=p3-p2;if(d>r,r=d;print1((p1+p2)/12,", ")));p1=p2;p2=p3;p3=p4)

A105409 Numbers k such that prime(k)-2 and prime(k+2)-2 are both primes.

Original entry on oeis.org

4, 6, 27, 34, 42, 44, 82, 141, 143, 172, 177, 235, 287, 295, 314, 319, 429, 459, 474, 476, 485, 578, 580, 585, 672, 744, 773, 863, 871, 873, 892, 935, 958, 1031, 1116, 1166, 1168, 1170, 1231, 1340, 1352, 1405, 1463, 1549, 1622, 1652, 1708, 1824, 1834, 1868
Offset: 1

Views

Author

Cino Hilliard, May 01 2005

Keywords

Crossrefs

Programs

  • PARI
    pnpk(n, m=2, k=2) = { local(x, v1, v2); for(x=1, n, v1 = prime(x)-k; v2 = prime(x+m)-k; if(isprime(v1)&isprime(v2), print1(x, ", ") ) ) ; } \\ corrected by Amiram Eldar, Oct 04 2024
    
  • PARI
    lista(pmax) = {my(k = 1, p = primes(4)); forprime(p1 = p[#p], pmax, k++; p[#p] = p1; if(p[2]- p[1] == 2 && p[4] - p[3] == 2, print1(k, ", ")); for(i = 1, #p-1, p[i] = p[i+1]));} \\ Amiram Eldar, Oct 04 2024

Extensions

Offset corrected by Amiram Eldar, Oct 04 2024

A329165 Let P1, P2, P3, P4 be consecutive primes with P2-P1=P4-P3=2. a(n)=(P3-P1)/6 when the length of the gap with no primes between the two pairs of twin primes sets a record.

Original entry on oeis.org

1, 2, 3, 5, 6, 9, 12, 17, 18, 21, 22, 23, 25, 31, 33, 35, 40, 41, 42, 47, 48, 49, 51, 52, 53, 57, 58, 62, 63, 66, 71, 75, 77, 78, 81, 83, 85, 90, 91, 93, 98, 100, 105, 108, 111, 115, 119, 123, 125, 135, 138, 148, 150, 152, 165, 170, 173, 180
Offset: 1

Views

Author

Hugo Pfoertner, Nov 07 2019

Keywords

Comments

The position of the occurrence of the n-th record is given by A329164(n)=(P1+P2)/12.

Examples

			See A329164.
		

Crossrefs

Programs

  • Mathematica
    With[{s = Partition[Prime@ Range[10^5], 4, 1]}, Union@ FoldList[Max, Map[(#3 - #1)/6 & @@ # &, Select[s, #2 - #1 == #4 - #3 == 2 & @@ # &]]]] (* Michael De Vlieger, May 26 2020 *)
  • PARI
    p1=3;p2=5;p3=7;r=0;forprime(p4=11,1e9,if(p2-p1==2&&p4-p3==2,d=p3-p1;if(d>r,r=d;print1(d/6,", ")));p1=p2;p2=p3;p3=p4)

Extensions

a(27)-a(28) from Jinyuan Wang, Mar 01 2020
a(29)-a(58) found by Tomáš Brada, Natalia Makarova, May 12 2020

A069457 Lowest primes in twin packs.

Original entry on oeis.org

3, 101, 137, 179, 419, 809, 1019, 1049, 1481, 1871, 1931, 2081, 2111, 2969, 3251, 3359, 3461, 4217, 4259, 5009, 5651, 5867, 6689, 6761, 6947, 7331, 7547, 8219, 8969, 9419, 10007, 11057, 11159, 11699, 12239, 13001, 13709, 13997
Offset: 1

Views

Author

Neil Fernandez, Mar 23 2002

Keywords

Comments

As the example (below) explains, "A twin pack of primes contains 2 or more pairs of twin primes, between which pairs there are no other primes." The key phrase is "or more." The first twin pack is therefore ((3,5),(5,7),(11,13),(17,19)). Because all of the consecutive primes from 3 to 19 are included in this twin pack, the lowest primes in the two pairs of twin primes ((5,7),(11,13)) and ((11,13),(17,19)) are not included because they are already subsumed in the first twin pack. - Harvey P. Dale, Mar 02 2025

Examples

			A twin pack of primes contains 2 or more pairs of twin primes, between which pairs there are no other primes. 137 is in the sequence because 137,139 are primes and the next primes are 149,151.
		

Crossrefs

Programs

  • Maple
    state:= 0: p:=13: Res:= 3: count:= 1;
    while count < 100 do
      q:= nextprime(p);
      if state = 0 then
         if q = p+2 then state:= 1; r:= p; p:= nextprime(q);
         else p:= q
         fi;
       elif state = 1 then
         if q = p+2 then
           count:= count+1; Res:= Res, r; state:= 2; p:= nextprime(q);
         else p:= q; state:= 0
         fi
       else
         if q = p+2 then
           p:= nextprime(q);
         else p:= q; state:= 0
         fi
       fi
    od:
    Res; # Robert Israel, Jan 13 2020

A089628 Smallest member of a pair of consecutive twin prime pairs that have no primes between them.

Original entry on oeis.org

3, 5, 11, 101, 137, 179, 191, 419, 809, 821, 1019, 1049, 1481, 1871, 1931, 2081, 2111, 2969, 3251, 3359, 3371, 3461, 4217, 4229, 4259, 5009, 5651, 5867, 6689, 6761, 6779, 6947, 7331, 7547, 8219, 8969, 9419, 9431, 9437, 10007, 11057, 11159, 11699, 12239
Offset: 3

Views

Author

Cino Hilliard, Jan 01 2004

Keywords

Comments

Run the PARI script savetwins(100000) or so to build the twinprime array of lower bounds before you run the main script.
Except for first term, same as A053778. - David Wasserman, Feb 22 2006

Examples

			Twin prime pairs 5,7 and 11,13 contain only the composite numbers 6,7,8,9,10 between them. So 5 is in the table. 11,13 and 17,19 have no primes between.
11 is in the table. 41,43 and 59,61 have primes 47 and 53 between then so 41 is not listed.
		

Programs

  • Mathematica
    Join[{3},Select[Partition[Prime[Range[1500]],4,1],#[[4]]-#[[3]]==#[[2]]- #[[1]] == 2&][[All,1]]] (* Harvey P. Dale, Dec 15 2018 *)
  • PARI
    \save as twinpr.gp pbetweentw(n) = { forstep(x1=1,n,2, c=0; t1 = twin[x1]; t2 = twin[x1+2]; for(y=t1+3,t2-1, if(isprime(y),c++) ); if(c==0,print1(t1",")) ) } savetwins(n) = build a table of twin prime I want to upload a supporting file to store with the OEIS and add a link to it.lower bounds { twin = vector(n); c=1; forprime(x=3,n, if(isprime(x+2), twin[c]=x; c++; ) ) }
Showing 1-6 of 6 results.