login
This site is supported by donations to The OEIS Foundation.
Logo

Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A035250 Number of primes between n and 2n (inclusive). 18
1, 2, 2, 2, 2, 2, 3, 2, 3, 4, 4, 4, 4, 3, 4, 5, 5, 4, 5, 4, 5, 6, 6, 6, 6, 6, 7, 7, 7, 7, 8, 7, 7, 8, 8, 9, 10, 9, 9, 10, 10, 10, 10, 9, 10, 10, 10, 9, 10, 10, 11, 12, 12, 12, 13, 13, 14, 14, 14, 13, 13, 12, 12, 13, 13, 14, 14, 13, 14, 15, 15, 14, 14, 13, 14, 15 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

By Bertrand's Postulate (proved by Chebyshev), there is always a prime between n and 2n, i.e. a(n) is positive for all n.

The smallest and largest primes between n and 2n inclusive are A007918 and A060308 respectively. - Lekraj Beedassy, Jan 01 2007

a(n) = A000720(2*n) - A000720(n-1); a(n) <= A179211(n). [From Reinhard Zumkeller, Jul 05 2010]

a(A059316(n)) = n and a(m) <> n for m < A059316(n). [Reinhard Zumkeller, Jan 08 2012]

REFERENCES

Aigner, M. and Ziegler, G. Proofs from The Book (2nd edition). Springer-Verlag, 2001.

LINKS

T. D. Noe, Table of n, a(n) for n=1..1000

International Mathematics Olympiad, Proof of Bertrand's Postulate

FORMULA

a(n) = sum(A010051(k): k=n..2*n). [Reinhard Zumkeller, Jan 08 2012]

EXAMPLE

The primes between n = 13 and 2n = 26, inclusive, are 13, 17, 19, 23; so a(13) = 4.

MATHEMATICA

f[n_] := PrimePi[ 2n] - PrimePi[n - 1]; Array[f, 76] (* Robert G. Wilson v, Dec 23 2012 *)

PROG

(Haskell)

a035250 n = sum $ map a010051 [n..2*n] -- Reinhard Zumkeller, Jan 08 2012

(MAGMA) [#PrimesInInterval(n, 2*n): n in [1..80]]; // Bruno Berselli, Sep 05 2012

CROSSREFS

Cf. A073837, A073838, A099802. [From Reinhard Zumkeller, Jul 05 2010]

Cf. A060715.

Sequence in context: A125973 A189172 A001031 * A165054 A067743 A029230

Adjacent sequences:  A035247 A035248 A035249 * A035251 A035252 A035253

KEYWORD

nonn

AUTHOR

Erich Friedman

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Transforms | Puzzles | Hot | Classics
Recent Additions | More pages | Superseeker | Maintained by The OEIS Foundation Inc.

Content is available under The OEIS End-User License Agreement .

Last modified May 23 04:04 EDT 2013. Contains 225585 sequences.