%I #19 Aug 12 2013 14:15:27
%S 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,
%T 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,
%U 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
%N Number of twin-prime pairs between n and 2n (inclusive).
%C To be counted, both members of the twin-prime pair must be between n and 2n, inclusive. It appears that a(n) > 0 for all n > 6. However, it has not been proved that there are an infinite number of twin primes.
%C Same as the number of lower twin primes between n-1 and 2(n-1), exclusive. If the twin prime conjecture is true, there are at least n lower twin primes between x/2 and x for all x >= A186312(n).
%H T. D. Noe, <a href="/A088018/b088018.txt">Table of n, a(n) for n=1..10000</a>
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/TwinPrimes.html">Twin Primes</a>
%t 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]
%t Table[Total[Length /@ Split[Select[Range[n, 2 n], PrimeQ], #2 - #1 == 2 &] - 1], {n, 105}] (* _Jayanta Basu_, Aug 12 2013 *)
%Y Cf. A035250 (number of primes between n and 2n), A088019 (number of twin primes between n and 2n).
%K easy,nonn
%O 1,10
%A _T. D. Noe_, Sep 18 2003, Feb 17 2011