A060715 Number of primes between n and 2n exclusive.
0, 1, 1, 2, 1, 2, 2, 2, 3, 4, 3, 4, 3, 3, 4, 5, 4, 4, 4, 4, 5, 6, 5, 6, 6, 6, 7, 7, 6, 7, 7, 7, 7, 8, 8, 9, 9, 9, 9, 10, 9, 10, 9, 9, 10, 10, 9, 9, 10, 10, 11, 12, 11, 12, 13, 13, 14, 14, 13, 13, 12, 12, 12, 13, 13, 14, 13, 13, 14, 15, 14, 14, 13, 13, 14, 15, 15
Offset: 1
Examples
a(35)=8 since eight consecutive primes (37,41,43,47,53,59,61,67) are located between 35 and 70.
References
- M. Aigner and C. M. Ziegler, Proofs from The Book, Chapter 2, Springer NY 2001.
Links
- N. J. A. Sloane, Table of n, a(n) for n = 1..20000 [First 1000 terms from T. D. Noe]
- C. K. Caldwell, The Prime Glossary, Bertrand's postulate
- R. Chapman, Bertrand postulate [Broken link]
- Math Olympiads, Bertrand's Postulate [Broken link]
- S. Ramanujan, A proof of Bertrand's postulate, J. Indian Math. Soc., 11 (1919), 181-182.
- Vladimir Shevelev, Ramanujan and Labos Primes, Their Generalizations, and Classifications of Primes, arXiv:0909.0715v13 [math.NT]
- Vladimir Shevelev, Ramanujan and Labos Primes, Their Generalizations, and Classifications of Primes, Journal of Integer Sequences, Vol. 15 (2012), Article 12.5.4
- M. Slone, PlanetMath.org, Proof of Bertrand's conjecture
- Jonathan Sondow and Eric Weisstein, Bertrand's Postulate, World of Mathematics
- Wikipedia, Proof of Bertrand's postulate
- Dr. Wilkinson, The Math Forum, Erdos' Proof
- Wolfram Research, Bertrand hypothesis
Crossrefs
Programs
-
Haskell
a060715 n = sum $ map a010051 [n+1..2*n-1] -- Reinhard Zumkeller, Jan 08 2012
-
Magma
[0] cat [#PrimesInInterval(n+1, 2*n-1): n in [2..80]]; // Bruno Berselli, Sep 05 2012
-
Maple
a := proc(n) local counter, i; counter := 0; from i from n+1 to 2*n-1 do if isprime(i) then counter := counter +1; fi; od; return counter; end: with(numtheory); seq(pi(2*k-1)-pi(k),k=1..100); # Wesley Ivan Hurt, Aug 21 2013
-
Mathematica
a[n_]:=PrimePi[2n-1]-PrimePi[n]; Table[a[n],{n,1,84}] (* Jean-François Alcover, Mar 20 2011 *)
-
PARI
{ for (n=1, 1000, write("b060715.txt", n, " ", primepi(2*n - 1) - primepi(n)); ) } \\ Harry J. Smith, Jul 10 2009
-
Python
from sympy import primerange as pr def A060715(n): return len(list(pr(n+1, 2*n))) # Karl-Heinz Hofmann, May 05 2022
Formula
a(n) = Sum_{k=1..n-1} A010051(n+k). - Reinhard Zumkeller, Dec 03 2009
a(n) = pi(2n-1) - pi(n). - Wesley Ivan Hurt, Aug 21 2013
Extensions
Corrected by Dug Eichelberger (dug(AT)mit.edu), Jun 04 2001
More terms from Larry Reeves (larryr(AT)acm.org), Jun 05 2001
Comments