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.
%I A060715 #97 Feb 16 2025 08:32:44 %S A060715 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, %T A060715 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, %U A060715 12,12,12,13,13,14,13,13,14,15,14,14,13,13,14,15,15 %N A060715 Number of primes between n and 2n exclusive. %C A060715 See the additional references and links mentioned in A143227. - _Jonathan Sondow_, Aug 03 2008 %C A060715 a(A060756(n)) = n and a(m) <> n for m < A060756(n). - _Reinhard Zumkeller_, Jan 08 2012 %C A060715 For prime n conjecturally a(n) = A226859(n). - _Vladimir Shevelev_, Jun 27 2013 %C A060715 The number of partitions of 2n+2 into exactly two parts where the first part is a prime strictly less than 2n+1. - _Wesley Ivan Hurt_, Aug 21 2013 %D A060715 M. Aigner and C. M. Ziegler, Proofs from The Book, Chapter 2, Springer NY 2001. %H A060715 N. J. A. Sloane, <a href="/A060715/b060715.txt">Table of n, a(n) for n = 1..20000</a> [First 1000 terms from T. D. Noe] %H A060715 C. K. Caldwell, The Prime Glossary, <a href="https://t5k.org/glossary/page.php/Bertrandspostulate.html">Bertrand's postulate</a> %H A060715 R. Chapman, <a href="http://www.maths.ex.ac.uk/~rjc/etc/bertrand.pdf">Bertrand postulate</a> [Broken link] %H A060715 Math Olympiads, <a href="http://matholymp.com/TUTORIALS/Bertrand.pdf">Bertrand's Postulate</a> [Broken link] %H A060715 S. Ramanujan, <a href="http://ramanujan.sirinudi.org/Volumes/published/ram24.html">A proof of Bertrand's postulate</a>, J. Indian Math. Soc., 11 (1919), 181-182. %H A060715 Vladimir Shevelev, <a href="http://arxiv.org/abs/0909.0715">Ramanujan and Labos Primes, Their Generalizations, and Classifications of Primes</a>, arXiv:0909.0715v13 [math.NT] %H A060715 Vladimir Shevelev, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL15/Shevelev/shevelev19.html">Ramanujan and Labos Primes, Their Generalizations, and Classifications of Primes</a>, Journal of Integer Sequences, Vol. 15 (2012), Article 12.5.4 %H A060715 M. Slone, PlanetMath.org, <a href="http://planetmath.org/encyclopedia/ProofOfBertrandsConjecture.html">Proof of Bertrand's conjecture</a> %H A060715 Jonathan Sondow and Eric Weisstein, <a href="https://mathworld.wolfram.com/BertrandsPostulate.html">Bertrand's Postulate</a>, World of Mathematics %H A060715 Wikipedia, <a href="http://en.wikipedia.org/wiki/Proof_of_Bertrand%27s_postulate">Proof of Bertrand's postulate</a> %H A060715 Dr. Wilkinson, The Math Forum, <a href="http://mathforum.org/library/drmath/view/51527.html">Erdos' Proof</a> %H A060715 Wolfram Research, <a href="http://functions.wolfram.com/NumberTheoryFunctions/Prime/31/03/ShowAll.html">Bertrand hypothesis</a> %F A060715 a(n) = Sum_{k=1..n-1} A010051(n+k). - _Reinhard Zumkeller_, Dec 03 2009 %F A060715 a(n) = pi(2n-1) - pi(n). - _Wesley Ivan Hurt_, Aug 21 2013 %F A060715 a(n) = Sum_{k=(n^2-n+2)/2..(n^2+n-2)/2} A010051(A128076(k)). - _Wesley Ivan Hurt_, Jan 08 2022 %e A060715 a(35)=8 since eight consecutive primes (37,41,43,47,53,59,61,67) are located between 35 and 70. %p A060715 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: %p A060715 with(numtheory); seq(pi(2*k-1)-pi(k),k=1..100); # _Wesley Ivan Hurt_, Aug 21 2013 %t A060715 a[n_]:=PrimePi[2n-1]-PrimePi[n]; Table[a[n],{n,1,84}] (* _Jean-François Alcover_, Mar 20 2011 *) %o A060715 (PARI) { for (n=1, 1000, write("b060715.txt", n, " ", primepi(2*n - 1) - primepi(n)); ) } \\ _Harry J. Smith_, Jul 10 2009 %o A060715 (Haskell) %o A060715 a060715 n = sum $ map a010051 [n+1..2*n-1] -- _Reinhard Zumkeller_, Jan 08 2012 %o A060715 (Magma) [0] cat [#PrimesInInterval(n+1, 2*n-1): n in [2..80]]; // _Bruno Berselli_, Sep 05 2012 %o A060715 (Python) from sympy import primerange as pr %o A060715 def A060715(n): return len(list(pr(n+1, 2*n))) # _Karl-Heinz Hofmann_, May 05 2022 %Y A060715 Cf. A060756, A070046, A006992, A051501, A035250, A101909. %Y A060715 Cf. A000720, A014085, A104272, A143227, A128076. %Y A060715 Cf. A143223, A143224, A143225, A143226. %Y A060715 Related sequences: %Y A060715 Primes (p) and composites (c): A000040, A002808, A000720, A065855. %Y A060715 Primes between p(n) and 2*p(n): A063124, A070046; between c(n) and 2*c(n): A376761; between n and 2*n: A035250, A060715, A077463, A108954. %Y A060715 Composites between p(n) and 2*p(n): A246514; between c(n) and 2*c(n): A376760; between n and 2*n: A075084, A307912, A307989, A376759. %K A060715 nonn,easy %O A060715 1,4 %A A060715 _Lekraj Beedassy_, Apr 25 2001 %E A060715 Corrected by Dug Eichelberger (dug(AT)mit.edu), Jun 04 2001 %E A060715 More terms from Larry Reeves (larryr(AT)acm.org), Jun 05 2001