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.

Showing 1-3 of 3 results.

A035250 Number of primes between n and 2n (inclusive).

Original entry on oeis.org

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
Offset: 1

Views

Author

Keywords

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 number of primes in the interval [n,2*n) is the same sequence as this, except that a(1) = 0. - N. J. A. Sloane, Oct 18 2024
The smallest and largest primes between n and 2n inclusive are A007918 and A060308 respectively. - Lekraj Beedassy, Jan 01 2007
The number of partitions of 2n into exactly two parts with first part prime, n > 1. - Wesley Ivan Hurt, Jun 15 2013

Examples

			The primes between n = 13 and 2n = 26, inclusive, are 13, 17, 19, 23; so a(13) = 4.
a(5) = 2, since 2(5) = 10 has 5 partitions into exactly two parts: (9,1),(8,2),(7,3),(6,4),(5,5).  Two primes are among the first parts: 7 and 5.
		

References

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

Crossrefs

Related sequences:
Primes (p) and composites (c): A000040, A002808, A000720, A065855.
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.
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.

Programs

Formula

a(n) = A000720(2*n) - A000720(n-1); a(n) <= A179211(n). - Reinhard Zumkeller, Jul 05 2010
a(A059316(n)) = n and a(m) <> n for m < A059316(n). - Reinhard Zumkeller, Jan 08 2012
a(n) = sum(A010051(k): k=n..2*n). [Reinhard Zumkeller, Jan 08 2012]
a(n) = pi(2n) - pi(n-1). [Wesley Ivan Hurt, Jun 15 2013]

A060756 a(n) is the smallest number for which exactly n primes are bounded between a(n) and 2a(n) exclusively.

Original entry on oeis.org

1, 2, 4, 9, 10, 16, 22, 27, 34, 36, 40, 51, 52, 55, 57, 70, 82, 87, 91, 96, 99, 100, 120, 121, 126, 135, 136, 142, 147, 159, 175, 177, 187, 190, 205, 210, 216, 217, 220, 222, 232, 246, 250, 255, 262, 289, 297, 300, 301, 304, 309, 310, 324, 327, 330, 339, 342
Offset: 0

Views

Author

Lekraj Beedassy, Apr 23 2001

Keywords

Comments

a(n) is the first occurrence of n in A060715.

Examples

			a(10)=40 since ten primes,namely,41,43,47,53,59,61,67,71,73,79,first arise between 40 and its double.
		

Crossrefs

Programs

  • Haskell
    import Data.List (elemIndex)
    import Data.Maybe (mapMaybe)
    a060756 n = a060756_list !! n
    a060756_list = map (+ 1) $ mapMaybe (`elemIndex` a060715_list) [0..]
    -- Reinhard Zumkeller, Jan 05 2012

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Jun 05 2001

A097502 Least integer m such that there are at least n composite numbers between m and 2*m.

Original entry on oeis.org

2, 3, 4, 5, 6, 8, 8, 11, 12, 13, 14, 14, 17, 18, 18, 20, 20, 23, 24, 25, 26, 28, 29, 30, 32, 32, 33, 35, 38, 38, 39, 41, 42, 43, 44, 44, 46, 47, 48, 48, 50, 53, 54, 56, 58, 59, 60, 60, 61, 62, 62, 63, 65, 67, 68, 68, 71, 72, 72, 73, 74, 74, 77, 78, 80, 80, 81, 83, 84, 85, 86, 88
Offset: 1

Views

Author

Reinhard Zumkeller, Aug 25 2004

Keywords

Comments

a(n) = Min{m: n <= #{x composite: m<=x<=2*m}}.

Crossrefs

Showing 1-3 of 3 results.