A088018 Number of twin-prime pairs between n and 2n (inclusive).
0, 0, 1, 1, 1, 0, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 2, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 6, 7, 7, 6, 6, 6, 6
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
nn=100; p=Select[Prime[Range[PrimePi[2*nn]]], PrimeQ[#+2] &]; t=Table[0, {nn}]; Do[t[[Span[Ceiling[i/2], Min[nn,i-1]]]]++, {i, p}]; Prepend[t,0] Table[Total[Length /@ Split[Select[Range[n, 2 n], PrimeQ], #2 - #1 == 2 &] - 1], {n, 105}] (* Jayanta Basu, Aug 12 2013 *)
Comments