login
A181678
Number of twin Ramanujan prime pairs less than 10^n.
3
0, 0, 10, 73, 508, 3468, 25629, 194614, 1537504, 12447679, 102834428
OFFSET
1,3
LINKS
J. Sondow, Ramanujan primes and Bertrand's postulate, Amer. Math. Monthly 116 (2009) 630-635.
J. Sondow, J. W. Nicholson, and T. D. Noe, Ramanujan Primes: Bounds, Runs, Twins, and Gaps, J. Integer Seq. 14 (2011) Article 11.6.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; cnt=0; i=1; Table[While[t[[i]]<10^n, If[t[[i]]+2 == t[[i+1]], cnt++]; i++]; cnt, {n, Floor[Log[10, t[[-1]]]]}]
PROG
(Perl) use ntheory ":all"; for my $n (0..9) { my $r = ramanujan_primes(10**$n); my $t=0; for (0..$#$r-1) { $t++ if $r->[$_+1] - $r->[$_] == 2; } say "$n $t"; } # Dana Jacobsen, Sep 06 2015
CROSSREFS
Cf. A178127 (lesser of twin Ramanujan primes), A007508 (number of twin primes pairs < 10^n), A190654 (twin Ramanujan primes).
Sequence in context: A055424 A243878 A200580 * A206817 A159687 A199556
KEYWORD
nonn,more
AUTHOR
T. D. Noe, Nov 18 2010
EXTENSIONS
a(10)-a(11) from Dana Jacobsen, Apr 29 2015
STATUS
approved