A088019 Number of twin primes between n and 2n (inclusive).
0, 1, 2, 2, 2, 2, 3, 2, 3, 4, 4, 3, 3, 2, 3, 4, 4, 3, 3, 2, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 4, 4, 4, 4, 5, 6, 6, 6, 6, 6, 5, 5, 4, 4, 4, 4, 4, 4, 4, 5, 6, 6, 7, 8, 8, 8, 8, 8, 7, 7, 6, 6, 6, 6, 6, 6, 6, 7, 8, 8, 7, 7, 6, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 10, 10, 10, 10, 10, 11, 12, 12, 13, 14
Offset: 1
Links
- T. D. Noe, Table of n, a(n) for n=1..10000
- Eric Weisstein's World of Mathematics, Twin Primes
Crossrefs
Programs
-
Mathematica
pl=Prime[Range[PrimePi[20000]]]; twl={}; Do[If[pl[[i-1]]+2==pl[[i]], twl=Join[twl, {pl[[i-1]], pl[[i]]}]], {i, 2, Length[pl]}]; twl=Union[twl]; i1=1; i2=1; nMin=(twl[[1]]-1)/2; nMax=(twl[[ -1]]+1)/2; Join[Table[0, {nMin-1}], Table[While[twl[[i1]]
Comments