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

A035789 Start of a string of exactly 1 consecutive (but disjoint) pair of twin primes.

Original entry on oeis.org

29, 41, 59, 71, 227, 239, 269, 281, 311, 347, 461, 521, 569, 599, 617, 641, 659, 857, 881, 1091, 1151, 1229, 1277, 1289, 1301, 1319, 1427, 1451, 1607, 1619, 1667, 1697, 1721, 1787, 1997, 2027, 2141, 2237, 2267, 2309, 2339, 2381, 2549, 2591, 2657, 2687
Offset: 1

Views

Author

Randall L Rathbun, Nov 30 1998

Keywords

Comments

Lesser of lonely twin primes.
Old Name was: Let P1,P2,..,P6 be any 6 consecutive primes. The sequence consists of those values of P3 for which P2-P1>2, P4-P3=2 and P6-P5>2.

Examples

			The first lonely twin primes (A069453) are 29,31 (23 and 37 are non-twin), 41,43 (37 and 47 are non-twin), 59,61 (53 and 67 are non-twin). Of these, the lesser twins are 29,41,59, so this is how the sequence begins.
23, 27, 29, 31, 37, 41: 27-23>2, 31-29=2, 41-37>2; so 29 is in the sequence.
From _Hartmut F. W. Hoft_, Apr 05 2016: (Start)
The example should read: 19, 23, 29, 31, 37, 41: 23-19>2, 31-29=2, 41-37>2; so 29 is in the sequence.
a(n)=A069453(2n-1), n>=1.
(End)
		

Crossrefs

Programs

  • Mathematica
    PrimeNext[n_]:=Module[{k},k=n+1;While[ !PrimeQ[k],k++ ];k]; PrimePrev[n_]:=Module[{k},k=n-1;While[ !PrimeQ[k],k-- ];k]; lst={};Do[p=Prime[n];If[ !PrimeQ[p-2]&&!PrimeQ[p+4]&&PrimeQ[p+2]&&!PrimeQ[PrimePrev[p]-2]&&!PrimeQ[PrimeNext[p+2]+2],AppendTo[lst,p]],{n,6!}];lst (* Vladimir Joseph Stephan Orlovsky, Jul 22 2009 *)
    (* starting at n=3 would eliminate the first two primality tests, Hartmut F. W. Hoft, Apr 09 2016 *)

Extensions

Edited by Hugo Pfoertner, Oct 15 2003

A087641 Start of the first sequence of exactly n consecutive pairs of twin primes.

Original entry on oeis.org

29, 101, 5, 9419, 909287, 325267931, 678771479, 1107819732821, 170669145704411, 3324648277099157, 789795449254776509
Offset: 1

Views

Author

Hugo Pfoertner, Sep 15 2003

Keywords

Comments

Start of the smallest twin prime clusters of order n such that the following and preceding two primes must be neither twin primes between themselves nor with the ends of the string. - Herman Jamke (hermanjamke(AT)fastmail.fm), Oct 22 2006
Sequences of n consecutive pairs of twin primes are called twin prime clusters of order n. Here (and in the sequences A035789, ..., A035795) it is requested that the order be exactly n, i.e., the preceding prime and the following prime must not be (upper resp. smaller) member of another twin prime pair. Note that a(3)=5 is preceded by 3 which is member of the twin prime pair (3,5) but not upper member of a preceding twin prime pair. Since it cannot happen elsewhere that P2=P3-2 if P3=P4-2 (using notations of A179067 and A035791), there is no condition imposed on P3-P2, and the condition on P2-P1 is also satisfied for P3=5. This sequence lists the starting prime of the cluster corresponding to the first occurrence of n in A179067. - M. F. Hasler, May 04 2015

Examples

			a(6)=325267931 is the starting point of the first occurrence of 6 consecutive pairs of twin primes: (325267931 325267933) (325267937 325267939) (325267949 325267951) (325267961 325267963) (325267979 325267981) (325267991 325267993).
		

Crossrefs

The sequence consists of the initial terms of A035789, A035790, A035791, A035792, A035793, A035794, A035795, A263205, A259034.

Extensions

Extended by Jud McCranie
a(8)-a(10) from Herman Jamke (hermanjamke(AT)fastmail.fm), Oct 22 2006
a(11) found by Gabor Levai in October 2011 (see Rivera), added by Dmitry Kamenetsky, Dec 15 2018

A035790 Start of a string of exactly 2 consecutive (but disjoint) pairs of twin primes.

Original entry on oeis.org

101, 137, 419, 1019, 1049, 1481, 1871, 1931, 2081, 2111, 2969, 3251, 3461, 4259, 5009, 5651, 5867, 6689, 6947, 7331, 7547, 8219, 8969, 10007, 11057, 11159, 11699, 12239, 13001, 13709, 13997, 14561, 15641, 15731, 16061, 16631, 17579, 17909
Offset: 1

Views

Author

Randall L Rathbun, Nov 30 1998

Keywords

Comments

Let P1,P2,..,P8 be any 8 consecutive primes. The sequence consists of those values of P3 for which P2-P1 > 2, P4-P3 = 2, P6-P5= 2 and P8-P7 > 2.

Examples

			89, 97, 101, 103, 107, 109, 113, 127: 97-89 > 2, 103-101 = 2, 109-107 = 2, 127-113 > 2.
		

References

  • Posting to Number Theory List (NMBRTHRY(AT)LISTSERV.NODAK.EDU), Nov. 19 1998.

Crossrefs

Programs

  • Mathematica
    Select[Prime@ Range@ 2100, And[NextPrime[#, -1] - NextPrime[#, -2] > 2, NextPrime@ # - # == 2, NextPrime[#, 3] - NextPrime[#, 2] == 2, NextPrime[#, 5] - NextPrime[#, 4] > 2] &] (* Michael De Vlieger, Apr 25 2015 *)
  • PARI
    a(n)={L=vector(7);forprime(p=o=1,,L=concat(L[2..7],-o+o=p); L[3]==2&&L[5]==2&&L[1]>2&&L[2]>2&&L[4]>2&&L[6]>2&&L[7]>2&&!n--&&return(p-sum(i=3,7,L[i])))} \\ M. F. Hasler, May 04 2015

Formula

a(10)=2111, a(10^2)=77261, a(10^3)=1603697, a(10^4)=27397631, a(10^5)=435140477, a(10^6)=6391490657. - M. F. Hasler, May 04 2015

Extensions

Edited by Hugo Pfoertner, Oct 15 2003
Offset corrected by Arkadiusz Wesolowski, May 06 2012
Double-checked up to a(10^4)=27397631 by M. F. Hasler, May 04 2015

A035791 Start of a string of exactly 3 consecutive (but disjoint) pairs of twin primes.

Original entry on oeis.org

5, 179, 809, 3359, 4217, 6761, 18041, 21587, 26861, 49367, 67187, 80447, 82721, 91127, 97841, 98897, 103967, 109829, 122597, 154157, 178037, 203321, 208931, 225749, 227609, 236867, 243671, 251201, 266447, 285611, 289109, 295871, 317729
Offset: 1

Views

Author

Keywords

Examples

			a(2)=179 because (179,181),(191,193),(197,199) is the second occurrence (after (5,7),(11,13),(17,19)) of exactly 3 pairs of twin primes.
		

References

  • Posting to Number Theory List (NMBRTHRY(AT)LISTSERV.NODAK.EDU), Nov. 19 1998.

Crossrefs

Programs

  • Mathematica
    Select[Prime@ Range@ 30000, And[ NextPrime[#, -1] - NextPrime[#, -2] != 2, NextPrime@ # - # == 2, NextPrime[#, 3] - NextPrime[#, 2] == 2, NextPrime[#, 5] - NextPrime[#, 4] == 2, NextPrime[#, 7] - NextPrime[#, 6] > 2] &] (* Michael De Vlieger, Apr 25 2015 *)
    Select[Partition[Prime[Range[30000]],10,1],#[[8]]-#[[7]]==#[[6]]-#[[5]] == #[[4]] - #[[3]]==2&&#[[2]]-#[[1]]!=2&&#[[10]]-#[[9]]!=2&][[All,3]] (* Harvey P. Dale, Mar 14 2018 *)

Extensions

More terms from Hugo Pfoertner, Sep 05 2003
Offset corrected by Arkadiusz Wesolowski, May 06 2012

A035792 Start of a string of exactly 4 consecutive (but disjoint) pairs of twin primes.

Original entry on oeis.org

9419, 62969, 72221, 392261, 495569, 663569, 1006301, 1138367, 1159187, 1173539, 1322147, 2144477, 2168651, 2502341, 2668217, 3020999, 3215711, 3664679, 4890857, 5248079, 5261699, 5532269, 5561597, 5651729, 5787317, 6256727
Offset: 1

Views

Author

Keywords

References

  • Posting to Number Theory List (NMBRTHRY(AT)LISTSERV.NODAK.EDU), Nov. 19 1998.

Crossrefs

The first term of this sequence is in A087641.

Programs

  • Mathematica
    Prime[Select[Range[1000000], Prime[ # + 1] - Prime[ # ] == 2 && Prime[ # + 3] - Prime[ # + 2] == 2 && Prime[ # + 5] - Prime[ # + 4] == 2 && Prime[ # + 7] - Prime[ # + 6] == 2 &]] (* Tanya Khovanova, Sep 07 2007 *)

Extensions

a(11)-a(26) from Hugo Pfoertner, Sep 16 2003

A035793 Start of a string of exactly 5 consecutive (but disjoint) pairs of twin primes.

Original entry on oeis.org

909287, 2596619, 9617981, 12628337, 18873497, 21579629, 25739771, 34140077, 39433367, 62832101, 67369397, 84733211, 90122507, 102243017, 132826607, 140456711, 142749149, 180929687, 201057539, 212461979, 219970547, 228001649
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    lst={};Do[p0=Prime[n];p1=Prime[n+1];p2=Prime[n+2];p3=Prime[n+3];p4=Prime[n+4];p5=Prime[n+5];p6=Prime[n+6];p7=Prime[n+7];p8=Prime[n+8];p9=Prime[n+9];If[p1-p0==p3-p2==p5-p4==p7-p6==p9-p8==2,AppendTo[lst,p0]],{n,10!}];lst (* Vladimir Joseph Stephan Orlovsky, Apr 02 2010 *)

Extensions

a(11)-a(22) from Hugo Pfoertner, Sep 16 2003
Offset corrected by Arkadiusz Wesolowski, May 06 2012

A179067 Orders of consecutive clusters of twin primes.

Original entry on oeis.org

1, 3, 1, 1, 1, 1, 2, 2, 3, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 2, 1, 1, 3, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 2, 1, 1, 1, 1, 1, 1, 1
Offset: 1

Views

Author

Franz Vrabec, Jun 27 2010

Keywords

Comments

For k>=1, 2k+4 consecutive primes P1, P2, ..., P2k+4 defining a cluster of twin primes of order k iff P2-P1 <> 2, P4-P3 = P6-P5 = ... = P2k+2 - P2k+1 = 2, P2k+4 - P2k+3 <> 2.
Also the lengths of maximal runs of terms differing by 2 in A029707 (leading index of twin primes), complement A049579. - Gus Wiseman, Dec 05 2024

Examples

			The twin prime cluster ((101,103),(107,109)) of order k=2 stems from the 2k+4 = 8 consecutive primes (89, 97, 101, 103, 107, 109, 113, 127) because 97-89 <> 2, 103-101 = 109-107 = 2, 127-113 <> 2.
From _Gus Wiseman_, Dec 05 2024: (Start)
The leading indices of twin primes are:
  2, 3, 5, 7, 10, 13, 17, 20, 26, 28, 33, 35, 41, 43, 45, 49, 52, ...
with maximal runs of terms differing by 2:
  {2}, {3,5,7}, {10}, {13}, {17}, {20}, {26,28}, {33,35}, {41,43,45}, {49}, {52}, ...
with lengths a(n).
(End)
		

Crossrefs

Cf. A077800.
A000040 lists the primes, differences A001223 (run-lengths A333254, A373821).
A006512 gives the greater of twin primes.
A029707 gives the leading index of twin primes, complement A049579.
A038664 finds the first prime gap of length 2n.
A046933 counts composite numbers between primes.

Programs

  • Maple
    R:= 1: count:= 1: m:= 0:
    q:= 5: state:= 1:
    while count < 100 do
     p:= nextprime(q);
     if state = 1 then
        if p-q = 2 then state:= 2; m:= m+1;
        else
          if m > 0 then R:= R,m; count:= count+1; fi;
          m:= 0
        fi
     else state:= 1;
     fi;
     q:= p
    od:
    R; # Robert Israel, Feb 07 2023
  • Mathematica
    Length/@Split[Select[Range[2,100],Prime[#+1]-Prime[#]==2&],#2==#1+2&] (* Gus Wiseman, Dec 05 2024 *)
  • PARI
    a(n)={my(o,P,L=vector(3));n++;forprime(p=o=3,,L=concat(L[2..3],-o+o=p);L[3]==2||next;L[1]==2&&(P=concat(P,p))&&next;n--||return(#P);P=[p])} \\ M. F. Hasler, May 04 2015

Extensions

More terms from M. F. Hasler, May 04 2015

A263205 Start of a string of exactly 8 consecutive (but disjoint) pairs of twin primes.

Original entry on oeis.org

1107819732821, 3735283249697, 4588646146631, 6340698579419, 8412649748537, 9206359843907, 9667145661911, 10261787848841, 10877306469737, 13792968231041, 17231043159311, 18996369140627, 21471510972419, 21791129807147, 23105869316669, 23224938371519
Offset: 1

Views

Author

Dmitry Petukhov, Oct 12 2015

Keywords

Examples

			Starting from 1107819732769 = A151799(A151799(1107819732821)), the gaps between the next primes are (40, 12, 2, 88, 2, 4, 2, 28, 2, 10, 2, 16, 2, 58, 2, 22, 2, 24, 16) with 8 occurrences of 2, so 1107819732821 is a term. - _Michel Marcus_, Oct 16 2015
		

Crossrefs

A259034 Start of a string of exactly 9 consecutive (but disjoint) pairs of twin primes.

Original entry on oeis.org

170669145704411, 597655503030737, 1209758169609917, 1529543606818727, 1980326398382819, 2752137854763287, 3748062700238369, 4071945430128767, 4518517172328671, 4662894516572177, 5979435335619701, 6264049608329957, 7609375387833677, 8064845880680819
Offset: 1

Views

Author

Dmitry Petukhov, Nov 08 2015

Keywords

Crossrefs

Extensions

Terms a(6) and beyond from Tomáš Brada, Jun 04 2020
Showing 1-9 of 9 results.