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-2 of 2 results.

A060715 Number of primes between n and 2n exclusive.

Original entry on oeis.org

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

Views

Author

Lekraj Beedassy, Apr 25 2001

Keywords

Comments

See the additional references and links mentioned in A143227. - Jonathan Sondow, Aug 03 2008
a(A060756(n)) = n and a(m) <> n for m < A060756(n). - Reinhard Zumkeller, Jan 08 2012
For prime n conjecturally a(n) = A226859(n). - Vladimir Shevelev, Jun 27 2013
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

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.

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

  • 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
a(n) = Sum_{k=(n^2-n+2)/2..(n^2+n-2)/2} A010051(A128076(k)). - Wesley Ivan Hurt, Jan 08 2022

Extensions

Corrected by Dug Eichelberger (dug(AT)mit.edu), Jun 04 2001
More terms from Larry Reeves (larryr(AT)acm.org), Jun 05 2001

A079614 Decimal expansion of Bertrand's constant.

Original entry on oeis.org

1, 2, 5, 1, 6, 4, 7, 5, 9, 7, 7, 9, 0, 4, 6, 3, 0, 1, 7, 5, 9, 4, 4, 3, 2, 0, 5, 3, 6, 2, 3, 3, 4, 6, 9, 6, 9
Offset: 1

Views

Author

Benoit Cloitre, Jan 29 2003

Keywords

Comments

From Bertrand's postulate (i.e., there is always a prime p in the range n < p < 2n) one can show there is a constant b such that floor(2^b), floor(2^2^b), ..., floor(2^2^2...^b), ... are all primes.
This result is due to Wright (1951), so Bertrand's constant might be better called Wright's constant, by analogy with Mills's constant A051021. - Jonathan Sondow, Aug 02 2013

Examples

			2^(2^(2^1.251647597790463017594432053623)) is approximately 37.0000000000944728917062132870071 and A051501(3)=37.
		

References

  • S. Finch, Mathematical Constants, Cambridge Univ. Press, 2003; see section 2.13 Mills's constant.

Crossrefs

Formula

1.251647597790463017594432053623346969...

Extensions

More digits (from the Prime Curios page) added by Frank Ellermann, Sep 19 2011
a(16)-a(37) from Charles R Greathouse IV, Sep 20 2011
Definition clarified by Jonathan Sondow, Aug 02 2013
Showing 1-2 of 2 results.