OFFSET
1,2
COMMENTS
Does lim q(n)/a(n+1) converge?
The Prime Number Theorem implies that the limit is 1. [Charles R Greathouse IV, Dec 08 2011]
FORMULA
a(n) = pi( 3*q(n)/2 -1 ) - pi( q(n)/2 -1 ).
EXAMPLE
a(2) = 3 primes in [3,9], 9-3 = 6 = q(2) = 3*2. a(3) = 8 primes in [15,45], 45-15 = 30 = q(3) = 5*6. a(4) = 38 primes in [105,315], 315-105 = 210 = q(4) = 7*30.
PROG
(Python)
from __future__ import division
from sympy import primepi, primorial
def A065914(n):
pm = primorial(n)
return primepi(3*pm//2-1)-primepi(pm//2-1) # Chai Wah Wu, Apr 28 2018
(PARI) q(n) = prod(k=1, n, prime(k)); \\ A002110
a(n) = my(nb=q(n)); primepi(3*nb/2-1)-primepi(nb/2-1); \\ Michel Marcus, Aug 04 2021
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Frank Ellermann, Dec 07 2001
EXTENSIONS
Corrected by Jason Earls, Dec 19 2001
STATUS
approved