OFFSET
1,2
COMMENTS
Number of ordered pairs of prime numbers, (p,q), such that p <= n <= q < 2n.
Also the number of ordered pairs of prime numbers, (p,q) that can be made with p <= q, where p and q appear as the smaller and larger parts (respectively) of the partitions of 2n into 2 parts that contain at least 1 prime.
LINKS
Eric Weisstein's World of Mathematics, Prime Counting Function.
Wikipedia, Prime-counting function.
FORMULA
a(n) = Sum_{p <= n <= q < 2n, p,q prime} 1.
EXAMPLE
a(5) = 6; there are 6 ordered pairs of prime numbers, (p,q), such that p <= 5 <= q < 10: (2,5), (2,7), (3,5), (3,7), (5,5), and (5,7).
Another interpretation for a(5): the 3 partitions of 2*5 = 10 into 2 parts containing at least one prime are 2+8 = 3+7 = 5+5. There are 6 ordered pairs of primes (p,q) that can be made with p <= q, which are the same ordered pairs in the previous example.
MATHEMATICA
Table[PrimePi[n] (PrimePi[2 n - 1] - PrimePi[n - 1]), {n, 100}]
PROG
(PARI) a(n) = primepi(n)*(primepi(2*n-1) - primepi(n-1)); \\ Michel Marcus, Apr 01 2022
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Wesley Ivan Hurt, Apr 01 2022
STATUS
approved