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

A204099 Number of integers between successive twin prime pairs.

Original entry on oeis.org

0, 3, 3, 9, 9, 15, 9, 27, 3, 27, 9, 27, 9, 3, 27, 9, 27, 9, 27, 33, 69, 9, 27, 57, 45, 27, 15, 21, 15, 147, 9, 3, 27, 21, 135, 9, 15, 9, 27, 57, 75, 45, 9, 9, 15, 105, 21, 27, 3, 117, 9, 45, 27, 21, 63, 81, 3, 51, 15, 45, 27, 51, 3, 21, 15, 9, 93, 27, 39
Offset: 1

Views

Author

Michel Lagneau, Jan 10 2012

Keywords

Comments

a(n) is divisible by 3.

Examples

			a(1) = 0 because (3,5) is adjacent to (5,7); a(2) = 3 because the numbers 8, 9 and 10 are between (5,7) and (11,13), ...
		

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):od:
  • Mathematica
    Module[{tr=Transpose[Select[Partition[Prime[Range[450]],2,1],#[[2]]- #[[1]] == 2&]],fir,las},fir=Rest[tr[[1]]];las=Most[tr[[2]]];Flatten[Abs[ Differences/@ Thread[{fir,las}]]]-1/.{-1->0}] (* Harvey P. Dale, Jun 11 2014 *)

Formula

a(n) = A167132(n) - 1.
a(n) = A063091(n+1) - A063091(n) - 3.

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

A214000 Number of twin prime pairs between two consecutive prime triples (p, p+2, p+6).

Original entry on oeis.org

0, 0, 1, 2, 0, 3, 0, 3, 0, 2, 4, 2, 0, 0, 4, 2, 1, 1, 1, 0, 0, 5, 2, 1, 3, 0, 5, 0, 8, 5, 0, 3, 3, 1, 3, 9, 1, 2, 1, 0, 3, 3, 0, 2, 6, 12, 14, 2, 1, 0, 2, 4, 8, 0, 13, 0, 0, 10, 5, 5, 7, 0, 4, 2, 1, 0, 3, 1, 5, 7, 0, 2, 0, 1, 9, 3, 13, 3, 4, 5, 0, 7, 5, 4, 2
Offset: 1

Views

Author

Michel Lagneau, Jun 30 2012

Keywords

Examples

			a(6)= 3 because between the 6th and 7th prime triples there are 3 twin prime pairs : (107,109,113), (137,139), (149,151), (179,181), (191,193,197).
		

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 and type(q+2,prime) = true and q+2 <>p2 then i:=i+1:else fi:od: printf(`%d, `,i):od:
Showing 1-3 of 3 results.