OFFSET
1,2
MATHEMATICA
nn=50000; t=Table[0, {nn}]; s=0; Do[If[PrimeQ[k], s++]; If[PrimeQ[k/2], s--]; If[s<nn, t[[s+1]]=k], {k, Prime[3*nn]}]; t=t+1; i=1; Table[While[t[[i]]<10^n, i++]; i-1, {n, Floor[Log[10, t[[-1]]]]}]
PROG
(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
CROSSREFS
KEYWORD
nonn,more
AUTHOR
T. D. Noe, Nov 18 2010
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
STATUS
approved