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

A204100 Number of integers between successive twin primes, divided by 3.

Original entry on oeis.org

0, 1, 1, 3, 3, 5, 3, 9, 1, 9, 3, 9, 3, 1, 9, 3, 9, 3, 9, 11, 23, 3, 9, 19, 15, 9, 5, 7, 5, 49, 3, 1, 9, 7, 45, 3, 5, 3, 9, 19, 25, 15, 3, 3, 5, 35, 7, 9, 1, 39, 3, 15, 9, 7, 21, 27, 1, 17, 5, 15, 9, 17, 1, 7, 5, 3, 31, 9, 13, 9, 13, 55, 13, 21, 9, 7, 5, 19
Offset: 1

Views

Author

Michel Lagneau, Jan 10 2012

Keywords

Examples

			a(2) = 1 because there exists three numbers 8, 9 and 10 between (5,7) and (11,13) => a(2) = 3/3 = 1.
		

Crossrefs

Programs

  • Maple
    T:=array(1..100,1..2):k:=0:for n from 1 to 1000 do:p1:=ithprime(n):p2:=ithprime(n+1):if p2-p1 = 2 then k:=k+1:T[k,1]:=p1:T[k,2]:=p2:else fi:od: for p from 2 to k do:x:= T[p+1,1]- T[p,2]: printf(`%d, `,(x-1)/3):od:
  • Mathematica
    Join[{0},Rest[(#[[2]]-#[[1]]-1)/3&/@Partition[Rest[Flatten[Select[ Partition[ Prime[Range[500]],2,1],#[[2]]-#[[1]]==2&]]],2]]] (* Harvey P. Dale, Jan 10 2016 *)

Formula

a(n) = (A063091(n+1)- A063091(n)-3)/3 = A204099(n)/3

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).

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 *)

A242757 Partial sums of the number of integers between successive twin prime pairs.

Original entry on oeis.org

0, 3, 6, 15, 24, 39, 48, 75, 78, 105, 114, 141, 150, 153, 180, 189, 216, 225, 252, 285, 354, 363, 390, 447, 492, 519, 534, 555, 570, 717, 726, 729, 756, 777, 912, 921, 936, 945, 972, 1029, 1104, 1149, 1158, 1167
Offset: 1

Views

Author

Sam Mathers, Aug 16 2014

Keywords

Comments

a(n) is the partial sum of the number of integers separating each successive pair of twin prime numbers less than and up to the n-th pair of twin primes.

Examples

			For n=4, a(4)=15 because the number of integers separating the first 4 pairs of twin prime numbers are as follows, 0 between (3,5) and (5,7), 3 between (5,7) and (11,13), 3 between (11,13) and (17,19), and 9 between (17,19) and (29,31). 0+3+3+9=15 so a(4)=15.
		

Crossrefs

Cf. A001359, A006512. Partial sums of A204099.

Programs

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

Formula

a(n) = A001359(n+1) - 2 - 3*n. - Robert Israel, Aug 17 2014
Showing 1-4 of 4 results.