login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A181671
Number of Ramanujan primes less than 10^n.
2
1, 10, 72, 559, 4459, 36960, 316066, 2760321, 24491666, 220098288, 1998400235, 18299775876, 168773875190, 1566017986235, 14606736768049, 136860923837558, 1287462389890262
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
Cf. A104272 (Ramanujan primes).
Cf. A190502 (Number of Ramanujan primes <= 2^n).
Sequence in context: A037614 A138782 A155606 * A058111 A223120 A240275
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