cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A065914 Number of primes in the interval [ 1/2 * q(n), 3/2 * q(n) - 1 ] where q(n) is prime(n)#, the n-th primorial.

This page as a plain text file.
%I A065914 #24 Aug 05 2021 12:49:25
%S A065914 1,3,8,38,294,2922,38949,604764,11635147,287020007,7721129740,
%T A065914 250811981714
%N A065914 Number of primes in the interval [ 1/2 * q(n), 3/2 * q(n) - 1 ] where q(n) is prime(n)#, the n-th primorial.
%C A065914 Does lim q(n)/a(n+1) converge?
%C A065914 The Prime Number Theorem implies that the limit is 1. [_Charles R Greathouse IV_, Dec 08 2011]
%F A065914 a(n) = pi( 3*q(n)/2 -1 ) - pi( q(n)/2 -1 ).
%e A065914 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.
%o A065914 (Python)
%o A065914 from __future__ import division
%o A065914 from sympy import primepi, primorial
%o A065914 def A065914(n):
%o A065914     pm = primorial(n)
%o A065914     return primepi(3*pm//2-1)-primepi(pm//2-1) # _Chai Wah Wu_, Apr 28 2018
%o A065914 (PARI) q(n) = prod(k=1, n, prime(k)); \\ A002110
%o A065914 a(n) = my(nb=q(n)); primepi(3*nb/2-1)-primepi(nb/2-1); \\ _Michel Marcus_, Aug 04 2021
%Y A065914 q(n) = A002110(n), pi(n) = A000720(n).
%K A065914 nonn,more
%O A065914 1,2
%A A065914 _Frank Ellermann_, Dec 07 2001
%E A065914 Corrected by _Jason Earls_, Dec 19 2001