A080356 Number of twin primes between n and 2n: a(n) = number of j in range n <= j <= 2*n such that j and j+2 are primes.
0, 1, 2, 1, 1, 1, 1, 1, 2, 2, 2, 1, 1, 1, 2, 2, 2, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 4, 4, 4, 4, 4, 4, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 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, 7, 6, 6, 6, 6
Offset: 1
Keywords
Examples
n=36: between 36 and 72 the primes p such that (p,p+2) is a pair of twin primes are {41,59,71}, so a(36)=3.
Links
- T. D. Noe, Table of n, a(n) for n=1..10000
Programs
-
Mathematica
Table[Count[Table[PrimeQ[j]&&PrimeQ[j+2], {j, n, 2*n}], True], {n, 1, 1000}]
Extensions
Definition clarified by N. J. A. Sloane, Aug 22 2021