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.

A204136 Number of composites between successive twin prime pairs.

This page as a plain text file.
%I A204136 #10 Jun 25 2013 10:47:41
%S A204136 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 A204136 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 A204136 41,26,20,56,74,3,47,15,41,24,47,3,20,15,8,86,25,34,26
%N A204136 Number of composites between successive twin prime pairs.
%H A204136 Harvey P. Dale, <a href="/A204136/b204136.txt">Table of n, a(n) for n = 1..1000</a>
%F A204136 a(n) = A204099(n) - A048614(n).
%e A204136 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 A204136 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 A204136 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 A204136 Cf. A048614, A204099.
%K A204136 nonn
%O A204136 1,2
%A A204136 _Michel Lagneau_, Jan 11 2012