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.

A036378 Number of primes p between powers of 2, 2^n < p <= 2^(n+1).

Original entry on oeis.org

1, 1, 2, 2, 5, 7, 13, 23, 43, 75, 137, 255, 464, 872, 1612, 3030, 5709, 10749, 20390, 38635, 73586, 140336, 268216, 513708, 985818, 1894120, 3645744, 7027290, 13561907, 26207278, 50697537, 98182656, 190335585, 369323305, 717267168, 1394192236, 2712103833
Offset: 0

Views

Author

Keywords

Comments

Number of primes whose binary order (A029837) is n+1, i.e., those with ceiling(log_2(p)) = n+1. [corrected by Jon E. Schoenfield, May 13 2018]
First differences of A007053. This sequence illustrates how far the Bertrand postulate is oversatisfied.
Scaled for Ramanujan primes as in A190501, A190502.
This sequence appears complete such that any nonnegative number can be written as a sum of distinct terms of this sequence. The sequence has been checked for completeness up to the gap between 2^46 and 2^47. Assuming that after 2^46 the formula x/log(x) is a good approximation to primepi(x), it can be proved that 2*a(n) > a(n+1) for all n >= 46, which is a sufficient condition for completeness. [Frank M Jackson, Feb 02 2012]

Examples

			The 7 primes for which A029837(p)=6 are 37, 41, 43, 47, 53, 59, 61.
		

Crossrefs

Programs

  • Magma
    [1,1] cat [#PrimesInInterval(2^n, 2^(n+1)): n in [2..29]]; // Vincenzo Librandi, Nov 18 2014
  • Mathematica
    t = Table[PrimePi[2^n], {n, 0, 20}]; Rest@t - Most@t (* Robert G. Wilson v, Mar 20 2006 *)
  • PARI
    a(n) = primepi(1<<(n+1))-primepi(1<
    				

Formula

a(n) = primepi(2^(n+1)) - primepi(2^n).
a(n) = A095005(n)+A095006(n) = A095007(n) + A095008(n) = A095013(n) + A095014(n) = A095015(n) + A095016(n) (for n > 1) = A095021(n) + A095022(n) + A095023(n) + A095024(n) = A095019(n) + A095054(n) = A095020(n) + A095055(n) = A095060(n) + A095061(n) = A095063(n) + A095064(n) = A095094(n) + A095095(n).

Extensions

More terms from Labos Elemer, May 13 2004
Entries checked by Robert G. Wilson v, Mar 20 2006

A190502 Number of Ramanujan primes <= 2^n.

Original entry on oeis.org

0, 1, 1, 1, 2, 4, 7, 13, 23, 42, 75, 137, 255, 463, 872, 1612, 3030, 5706, 10749, 20387, 38635, 73584, 140336, 268216, 513705, 985818, 1894120, 3645744, 7027290, 13561906, 26207278, 50697533, 98182656, 190335585, 369323301, 717267167, 1394192236, 2712103833
Offset: 0

Views

Author

John W. Nicholson, May 11 2011

Keywords

Crossrefs

Programs

  • PARI
    \\ With RR[.] is a list of A104272(.). The output of this program is n, a(n), and RR[a(n)].
    j=0; while(2^jJohn W. Nicholson, Dec 01 2012
    
  • Perl
    use ntheory ":all"; sub a190502 { scalar(@{ramanujan_primes(1 << shift)}) } say a190502($) for 0..20; # _Dana Jacobsen, Dec 19 2015
    
  • Perl
    use ntheory ":all"; my $t = 0; for my $e (1..32) { $t += scalar(@{ramanujan_primes(2**($e-1)+1,2**$e)}); say "$e $t" } # Dana Jacobsen, Dec 19 2015
    
  • Perl
    use ntheory ":all"; say ramanujan_prime_count(2**$) for 0..47; # _Dana Jacobsen, Jan 03 2016

Extensions

Extended by T. D. Noe, May 11 2011
Extended to n = 32 by John W. Nicholson, Dec 01 2012
a(33)-a(41) from Dana Jacobsen, Dec 19 2015
Showing 1-2 of 2 results.