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-10 of 12 results. Next

A053778 First of four consecutive primes that comprise two sets of twin primes.

Original entry on oeis.org

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: 1

Views

Author

Labos Elemer, Mar 24 2000

Keywords

Comments

These twins are not necessarily at the minimal distance as in A007530 (which is a subsequence).

Examples

			These primes initiate consecutive p quadruples as follows: [p,p+2,p+6k,p+6k+2]. For 6k=6,12,18,24,30,36,54 such a p =5,137,1931,9437,2968, 20441 and 48677 resp. Such a quadruple is [48677,48679,48731,48733], with [2,52,2] difference pattern.
		

Crossrefs

Programs

  • Mathematica
    Transpose[Select[Partition[Prime[Range[1500]],4,1],#[[4]]-#[[3]]== #[[2]]-#[[1]]== 2&]][[1]] (* Harvey P. Dale, Jul 07 2011 *)
  • PARI
    forprime( p=1,10^5, isprime(p+2) || next; isprime(nextprime(p+4)+2) && print1(p","))
    
  • PARI
    nextA053778(p)=until( isprime(nextprime(p+1)+2), until( p+2==p=nextprime(p+1),)); p-2
    
  • PARI
    p=0; A053778=vector(100,i, p=nextA053778(p+1))

Formula

A001359 primes for which A048614 is zero. Lesser of 2-twin primes after which the consecutive prime difference pattern (of A001223) is [2, 6k-2, 2] for some k.

Extensions

Edited by N. J. A. Sloane, Apr 13 2008, at the suggestion of M. F. Hasler.

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

A078731 Sum of primes between successive pairs of twin primes.

Original entry on oeis.org

0, 0, 0, 23, 37, 100, 67, 348, 0, 371, 0, 660, 0, 0, 434, 233, 771, 277, 600, 985, 3810, 0, 1788, 3435, 2208, 1757, 1220, 631, 1300, 13190, 0, 0, 1692, 1740, 16239, 0, 1039, 0, 2156, 6678, 10749, 3745, 1283, 1297, 1307, 11040, 4319, 2930, 0, 23259, 1613, 6584
Offset: 1

Views

Author

Reinhard Zumkeller, Dec 20 2002

Keywords

Examples

			Between the 8th and 9th pairs of twin primes are 4 primes: (71,73) 79 83 89 97 (101,103), therefore a(8) = 79+83+89+97 = 348.
		

Crossrefs

Programs

  • Mathematica
    seq[lim_] := Module[{p = Prime[Range[lim]], d, i}, d = Differences[p]; i = Position[d, 2] // Flatten; If[First[#] + 2 >= Last[#], 0, Total[p[[First[#] + 2 ;; Last[#] - 1]]]] & /@ Partition[i, 2, 1]]; seq[300] (* Amiram Eldar, Apr 06 2025 *)

A227063 Prime in the middle of a list of 7 consecutive primes such that each of them is a member of a twin pair.

Original entry on oeis.org

11, 9433, 9437, 62983, 62987, 72229, 72251, 392269, 392279, 495589, 495611, 663583, 663587, 909301, 909317, 909319, 909329, 1006309, 1006331, 1138393, 1138409, 1159201, 1159229, 1173553, 1173581, 1322161, 1322171, 2144491
Offset: 1

Views

Author

Irina Gerasimova, Jun 30 2013

Keywords

Comments

This is roughly a search for at least three successive zeros in A048614.

Examples

			The twin prime 9433 is in the sequence because it is in the middle of the list of 7 successive primes 9419, 9421, 9431, 9433, 9437, 9439, 9461, of which each is a member of a twin prime pair.
		

Crossrefs

Programs

  • Maple
    L:= [seq(ithprime(i),i=1..8)]: Flags:= [false,true$6]: count:= 0: R:= NULL:
    while count < 40 do
      L:= [seq(L[i],i=2..8),nextprime(L[8])];
      Flags:= [seq(Flags[i],i=2..7),(L[7]-L[6]=2) or (L[8]-L[7]=2)];
      if Flags = [true$7] then R:= R, L[4]; count:= count+1;  fi
    od:
    R; # Robert Israel, Mar 05 2025
  • Mathematica
    tp7Q[lst_]:=Total[If[PrimeQ[#+2]||PrimeQ[#-2],1,0]&/@lst]==7; Select[Partition[Prime[ Range[ 160000]],7,1],tp7Q][[;;,4]] (* Harvey P. Dale, Oct 22 2023 *)

A204136 Number of composites between successive twin prime pairs.

Original entry on oeis.org

0, 3, 3, 8, 8, 13, 8, 23, 3, 24, 9, 23, 9, 3, 25, 8, 24, 8, 25, 30, 59, 9, 23, 50, 41, 24, 13, 20, 13, 129, 9, 3, 25, 19, 118, 9, 14, 9, 25, 51, 66, 42, 8, 8, 14, 97, 18, 25, 3, 102, 8, 41, 26, 20, 56, 74, 3, 47, 15, 41, 24, 47, 3, 20, 15, 8, 86, 25, 34, 26
Offset: 1

Views

Author

Michel Lagneau, Jan 11 2012

Keywords

Examples

			a(4)= 8 because between the 4th and 5th pairs of twins (17,19) and (29,31), there are 8 composites: 20, 21, 22, 24, 25, 26, 27, 28.
		

Crossrefs

Programs

Formula

a(n) = A204099(n) - A048614(n).

A212361 Number of primes between two consecutive prime triples (p, p+2, p+6).

Original entry on oeis.org

0, 0, 3, 10, 0, 12, 3, 12, 2, 17, 24, 23, 3, 1, 27, 21, 3, 10, 6, 0, 14, 30, 13, 8, 16, 1, 45, 3, 65, 23, 5, 17, 27, 6, 13, 43, 9, 15, 12, 3, 28, 25, 0, 14, 59, 70, 114, 18, 13, 5, 21, 37, 60, 1, 93, 5, 1, 71, 54, 36, 86, 7, 67, 6, 9, 0, 15, 16, 30, 108, 7, 31
Offset: 1

Views

Author

Michel Lagneau, Jun 29 2012

Keywords

Examples

			a(4)= 10 because between the 4th and 5th prime triples there are 10 primes: (41,43,47) 53, 59 61, 67, 71, 73, 79, 83, 89, 97 (101,103,107).
		

Crossrefs

Programs

  • Maple
    with(numtheory):T:=array(1..1000):k:=1:for n from 1 to 4000 do:p:=ithprime(n):if type(p+2,prime)=true and type(p+6,prime) = true then T[k]:=p:T[k+1]:=p+6:k:=k+2:else fi:od:for m from 2 by 2 to k-2 do: p1:= T[m]:p2:=T[m+1]:i:=0:for q from p1+1 to p2-1 do:if type(q,prime)=true then i:=i+1:else fi:od: printf(`%d, `,i):od:
  • Mathematica
    If[#>0,#-1,#]&/@(PrimePi[#[[1]]]-PrimePi[#[[2]]]&/@({#[[2,1]], #[[1,3]]}&/@ Partition[Select[Partition[Prime[Range[2000]],3,1], Differences[#]=={2,4}&],2,1])) (* Harvey P. Dale, Jun 08 2016 *)

A213997 Number of integers between successive prime triples (p, p+2, p+6).

Original entry on oeis.org

0, 0, 17, 53, 0, 77, 29, 77, 29, 107, 173, 173, 29, 17, 203, 179, 17, 119, 47, 0, 113, 257, 119, 77, 149, 23, 383, 23, 557, 203, 59, 137, 239, 77, 119, 383, 113, 143, 137, 29, 257, 239, 17, 143, 539, 623, 1043, 203, 137, 53, 239, 317, 563, 23, 863, 89, 23, 707
Offset: 1

Views

Author

Michel Lagneau, Jun 30 2012

Keywords

Comments

Property of this sequence: either a(n) is odd == 2 (mod 3), or a(n) =0.

Examples

			a(3)= 17 because between the 3rd and 4th prime triples there are 17 integers: (17,19,23), 24, 25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40, (41,43,47).
		

Crossrefs

Programs

  • Maple
    A213997 := proc(n)
            max(0,A022004(n+1)-A022004(n)-7) ;
    end proc: # R. J. Mathar, Jul 11 2012
  • Mathematica
    Flatten[Differences/@Table[Take[Flatten[Select[Partition[Prime[ Range[ 2000]],3,1], Differences[#]=={2,4}&]],{3n,3n+1}],{n,60}]]-1/.{-1->0} (* Harvey P. Dale, Jun 10 2014 *)

A242398 Partial sums of the number of primes separating successive pairs of twin primes.

Original entry on oeis.org

0, 0, 0, 1, 2, 4, 5, 9, 9, 12, 12, 16, 16, 16, 18, 19, 22, 23, 25, 28, 38, 38, 42, 49, 53, 56, 58, 59, 61, 79, 79, 79, 81, 83, 100, 100, 101, 101, 103, 109, 118, 121, 122, 123, 124, 132, 135, 137, 137, 152, 153, 157, 158, 159, 166, 173, 173, 177, 177, 181, 184, 188, 188, 189, 189, 190, 197, 199, 204, 205, 210
Offset: 1

Views

Author

Sam Mathers, Aug 16 2014

Keywords

Comments

a(n) is the number of primes that are not twin primes greater than the first twin prime pair (3,5) and less than the (n+1)th twin prime pair. All primes, other than two either exist in one of the twin prime pairs or are counted in the sum. Two is not included because it occurs before the first twin prime pair.

Examples

			For n=4, a(4)=1. We can get this by writing the first n+1 twin prime pairs and taking the sum of the primes in between them. The pairs are (3,5),(5,7),(11,13),(17,19),(29,31). The only prime between these pairs is 23, thus the answer is one.
		

Crossrefs

Partial sum of A048614.

Programs

  • PARI
    s=0; forprime(p=5, 10^4, if(isprime(p+2), print1(s", "); s--, s++)) \\ Jens Kruse Andersen, Aug 17 2014

A130973 Number of primes between successive pairs of twin primes, for a(n) > 0.

Original entry on oeis.org

1, 1, 2, 1, 4, 3, 4, 2, 1, 3, 1, 2, 3, 10, 4, 7, 4, 3, 2, 1, 2, 18, 2, 2, 17, 1, 2, 6, 9, 3, 1, 1, 1, 8, 3, 2, 15, 1, 4, 1, 1, 7, 7, 4, 4, 3, 4, 1, 1, 7, 2, 5, 1, 5, 18, 2, 5, 4, 3, 1, 5, 1, 18, 12, 2, 8, 1, 4, 2, 5, 4, 1, 1, 1, 9, 10
Offset: 1

Views

Author

Omar E. Pol, Aug 23 2007

Keywords

Comments

a(k) corresponds to the k-th term in the isolated prime sequence A007510 or A134797. a(1) corresponds to 23. a(2) corresponds to 37. a(3) corresponds to 47 and 53. - Enrique Navarrete, Jan 28 2017
Lengths of the runs of consecutive integers in A176656. - R. J. Mathar, Feb 19 2017

Crossrefs

Cf. A001223, A007510 (isolated primes), A027883, A048614, A048198, A052011, A052012, A061273, A076777, A073784, A082602, A088700, A179067 (clusters of twin primes).

A168433 One half of (n-th sum of primes between successive pairs of twin primes minus n-th number of primes between successive pairs of twin primes).

Original entry on oeis.org

0, 0, 0, 11, 18, 49, 33, 172, 0, 184, 0, 328, 0, 0, 216, 116, 384, 138, 299, 491, 1900, 0, 892, 1714, 1102, 877, 609, 315, 649, 6586, 0, 0, 845, 869, 8111, 0, 519, 0, 1077, 3336, 5370, 1871, 641, 648, 653, 5516, 2158, 1464, 0, 11622, 806, 3290, 846, 854, 6143
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Nov 25 2009

Keywords

Formula

a(n)=(A078731(n)-A048614(n))/2.

Extensions

Corrected (389 replaced by 384, 1700 by 1900) by R. J. Mathar, Jun 04 2010
Showing 1-10 of 12 results. Next