login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A204136 Number of composites between successive twin prime pairs. 1

%I #10 Jun 25 2013 10:47:41

%S 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,

%T 20,13,129,9,3,25,19,118,9,14,9,25,51,66,42,8,8,14,97,18,25,3,102,8,

%U 41,26,20,56,74,3,47,15,41,24,47,3,20,15,8,86,25,34,26

%N Number of composites between successive twin prime pairs.

%H Harvey P. Dale, <a href="/A204136/b204136.txt">Table of n, a(n) for n = 1..1000</a>

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

%e 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.

%p T:=array(1..200,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 1 to k do:i:= T[p,2]+1: j:= T[p+1,1]-1 :ii:=0:for q from i to j do:if type(q,prime)=false then ii:=ii+1:else fi:od: printf(`%d, `,ii):od:

%t nc[{a_,b_}]:=Count[Range[a+3,b-1],_?(!PrimeQ[#]&)]; With[{tp=Partition[ Transpose[ Select[Partition[Prime[Range[ 500]],2,1],Last[#]-First[#] == 2&]][[1]],2,1]},nc/@tp] (* _Harvey P. Dale_, Jun 25 2013 *)

%Y Cf. A048614, A204099.

%K nonn

%O 1,2

%A _Michel Lagneau_, Jan 11 2012

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified June 21 09:34 EDT 2024. Contains 373543 sequences. (Running on oeis4.)