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.

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

A190501 Number of Ramanujan primes R_k such that 2^(n-1) < R_k <= 2^n.

Original entry on oeis.org

0, 1, 0, 0, 1, 2, 3, 6, 10, 19, 33, 62, 118, 208, 409, 740, 1418, 2676, 5043, 9638, 18248, 34949, 66752, 127880, 245489, 472113, 908302, 1751624, 3381546, 6534616, 12645372, 24490255, 47485123, 92152929, 178987716, 347943866, 676925069, 1317911597, 2567659990, 5005877954, 9765539069, 19062301793, 37230980158, 72756216207, 142253989491, 278275735952, 544621563320, 1066382258001
Offset: 0

Views

Author

John W. Nicholson, May 11 2011

Keywords

Crossrefs

Programs

Extensions

Extended by T. D. Noe, May 11 2011
Modified the name as to match offset to A190502 and added leading term, John W. Nicholson, May 12 2011
Extended to n = 32 by John W. Nicholson, Dec 01 2012
Extended to n = 47, using A190502 data, by John W. Nicholson, Jan 31 2016

A181671 Number of Ramanujan primes less than 10^n.

Original entry on oeis.org

1, 10, 72, 559, 4459, 36960, 316066, 2760321, 24491666, 220098288, 1998400235, 18299775876, 168773875190, 1566017986235, 14606736768049, 136860923837558, 1287462389890262
Offset: 1

Views

Author

T. D. Noe, Nov 18 2010

Keywords

Crossrefs

Cf. A104272 (Ramanujan primes).
Cf. A190502 (Number of Ramanujan primes <= 2^n).

Programs

  • Mathematica
    nn=50000; t=Table[0,{nn}]; s=0; Do[If[PrimeQ[k], s++]; If[PrimeQ[k/2], s--]; If[s
    				
  • Perl
    use ntheory ":all"; for my $e (1..9) { say "$e ",scalar(@{ramanujan_primes(10**$e)}); } # Dana Jacobsen, May 10 2015
    # To control memory use at cost of speed:
    
  • Perl
    use ntheory ":all"; my($n,$inc,$start,$sum)=(1e10,1e9,0,0); while ($start < $n) { $sum += scalar(@{ramanujan_primes($start,$start+$inc-1)}); $start += $inc; } say $sum; # Dana Jacobsen, May 10 2015
    
  • Perl
    use ntheory ":all"; say ramanujan_prime_count(10**$) for 1..11; # _Dana Jacobsen, Jan 03 2016

Extensions

a(10)-a(11) from Dana Jacobsen, Dec 29 2014
a(12) from Dana Jacobsen, Sep 08 2015
a(13)-a(14) from Dana Jacobsen, Jan 03 2016
a(15)-a(17) from Dana Jacobsen, Apr 26 2017
Showing 1-3 of 3 results.