login
Number of Ramanujan primes <= 2^n.
4

%I #40 May 05 2017 19:36:14

%S 0,1,1,1,2,4,7,13,23,42,75,137,255,463,872,1612,3030,5706,10749,20387,

%T 38635,73584,140336,268216,513705,985818,1894120,3645744,7027290,

%U 13561906,26207278,50697533,98182656,190335585,369323301,717267167,1394192236,2712103833

%N Number of Ramanujan primes <= 2^n.

%H Dana Jacobsen, <a href="/A190502/b190502.txt">Table of n, a(n) for n = 0..56</a>

%o (PARI) \\ With RR[.] is a list of A104272(.). The output of this program is n, a(n), and RR[a(n)].

%o j=0; while(2^j<RR[10^8], {n=1;while(RR[n]<=2^j,n++); if(n<=1,print(j," ",0," none"), print(j," ",n-1," ",RR[n-1])); j++}); \\ _John W. Nicholson_, Dec 01 2012

%o (Perl) use ntheory ":all"; sub a190502 { scalar(@{ramanujan_primes(1 << shift)}) } say a190502($_) for 0..20; # _Dana Jacobsen_, Dec 19 2015

%o (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

%o (Perl) use ntheory ":all"; say ramanujan_prime_count(2**$_) for 0..47; # _Dana Jacobsen_, Jan 03 2016

%Y Cf. A007053, A036378, A104272, A181671, A190501.

%K nonn

%O 0,5

%A _John W. Nicholson_, May 11 2011

%E Extended by _T. D. Noe_, May 11 2011

%E Extended to n = 32 by _John W. Nicholson_, Dec 01 2012

%E a(33)-a(41) from _Dana Jacobsen_, Dec 19 2015