The OEIS Foundation is supported by donations from users of the OEIS and by a grant from the Simons Foundation.

 Hints (Greetings from The On-Line Encyclopedia of Integer Sequences!)
 A070046 Number of primes between prime(n) and 2*prime(n) exclusive. 6
 1, 1, 1, 2, 3, 3, 4, 4, 5, 6, 7, 9, 9, 9, 9, 11, 13, 12, 13, 14, 13, 15, 15, 16, 19, 20, 19, 19, 18, 18, 23, 23, 25, 25, 27, 26, 28, 28, 28, 28, 30, 30, 32, 32, 32, 32, 35, 38, 38, 38, 39, 39, 39, 41, 42, 43, 42, 42, 42, 42, 42, 44, 49, 50, 49, 49, 54, 54, 56, 55, 55, 55, 57, 58 (list; graph; refs; listen; history; text; internal format)
 OFFSET 1,4 LINKS Robert Israel, Table of n, a(n) for n = 1..10000 Eric Weisstein's World of Mathematics, Bertrand's Postulate FORMULA a(n) = primepi(2*prime(n))-n. - Charles R Greathouse IV, Aug 28 2014 a(n) = A060715(A000040(n)). EXAMPLE a(1)=1 because between p=2 and 4 there is exactly one prime, 3. a(10)=6 since six consecutive primes (31,37,41,43,47,53) are located between p(10) = 29 and 58. MAPLE N:= 1000: # to get a(n) for n <= pi(N) Primes:=select(isprime, [\$1..N]): seq(numtheory:-pi(2*Primes[n])-n, n=1..nops(Primes)); # Robert Israel, Aug 28 2014 MATHEMATICA pp[n_]:=Module[{pr=Prime[n]}, PrimePi[2pr]-PrimePi[pr]]; Array[pp, 80] (* Harvey P. Dale, Mar 30 2015 *) PROG (PARI) forprime(p=2, 5000, n=0; for(q=p+1, 2*p-1, if(isprime(q), n++)); print1(n, ", ")) \\Harry J. Smith, Dec 13 2007, improved by Colin Barker, Aug 28 2014 (PARI) a(n)=primepi(2*prime(n))-n \\ Charles R Greathouse IV, Aug 28 2014 CROSSREFS Cf. A060715, A077463, A246514. Sequence in context: A076895 A282029 A029086 * A130120 A204892 A164512 Adjacent sequences:  A070043 A070044 A070045 * A070047 A070048 A070049 KEYWORD easy,nonn AUTHOR Enoch Haga, May 05 2002 EXTENSIONS Edited by N. J. A. Sloane, May 15 2008 at the suggestion of R. J. Mathar STATUS approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

Last modified September 27 19:34 EDT 2021. Contains 347694 sequences. (Running on oeis4.)