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.

A190124 Decimal expansion of Ramanujan prime constant: Sum_{n>=1} (1/R_n)^2, where R_n is the n-th Ramanujan prime, A104272(n).

This page as a plain text file.
%I A190124 #66 Jan 30 2016 03:55:28
%S A190124 2,6,5,5,6,3,2,7,5,8,0
%N A190124 Decimal expansion of Ramanujan prime constant: Sum_{n>=1} (1/R_n)^2, where R_n is the n-th Ramanujan prime, A104272(n).
%C A190124 By computing all Ramanujan primes less than 10^9, we find that about 9 decimal places of the sum should be correct: 0.265563275 (truncated, not rounded). The following table shows the number of Ramanujan primes between powers of 10 and the sum of the squared reciprocals of those primes.
%C A190124 1          1    0.25000000000000000
%C A190124 2          9    0.01477600368240514
%C A190124 3         62    0.00072814919125266
%C A190124 4        487    0.00005457480850461
%C A190124 5       3900    0.00000417097012694
%C A190124 6      32501    0.00000034491619098
%C A190124 7     279106    0.00000002943077197
%C A190124 8    2444255    0.00000000255829675
%C A190124 9   21731345    0.00000000022619762
%C A190124 Total:          0.26556327578374667 - _T. D. Noe_, May 05 2011
%C A190124 From _Jonathan Sondow_, May 06 2011: (Start)
%C A190124 Since R_n > n, the bound Sum_{n > N} 1/(R_n)^2 < 1/N holds, by the integral test. Taking N = #{R_n < 10^9} = 24491666, the error is < 4.09 x 10^-8.
%C A190124 Using the stronger inequality R_n > 2n log 2n (from "Ramanujan primes and Bertrand's postulate"), the error is actually < 2.94 * 10^-11. So the sum 0.265563275... is correct. The next digit is either 7 or 8. (End)
%C A190124 A190124 and A085548 (Prime Zeta(2)) converge by comparison with A013661 (Zeta(2)), which converges by the integral test. As real numbers, A190124 < A085548 < A013661. - _Robert G. Wilson v_, May 08 2011
%C A190124 Prime Zeta(2) - (this constant) = 0.4522474200 - 0.2655632757 = 0.186684144 (truncated, not rounded). - _John W. Nicholson_, May 24 2011
%C A190124 From _Dana Jacobsen_, Jul 27 2015: (Start)
%C A190124 Calculating more Ramanujan primes, we can expand on the earlier table, which should give us more terms.
%C A190124    1            1  0.25000000000000000000  0.25000000000000000000
%C A190124    2            9  0.26477600368240513652  0.01477600368240513652
%C A190124    3           62  0.26550415287365779725  0.00072814919125266073
%C A190124    4          487  0.26555872768216240627  0.00005457480850460902
%C A190124    5         3900  0.26556289865228934691  0.00000417097012694064
%C A190124    6        32501  0.26556324356848032844  0.00000034491619098153
%C A190124    7       279106  0.26556327299925229431  0.00000002943077196587
%C A190124    8      2444255  0.26556327555754904279  0.00000000255829674847
%C A190124    9     21731345  0.26556327578374665897  0.00000000022619761618
%C A190124   10    195606622  0.26556327580402332096  0.00000000002027666198
%C A190124   11   1778301947  0.26556327580586060071  0.00000000000183727975
%C A190124   12  16301375641  0.26556327580602856045  0.00000000000016795974. (End)
%H A190124 J. Sondow, <a href="http://arxiv.org/abs/0907.5232"> Ramanujan primes and Bertrand's postulate</a>, Amer. Math. Monthly 116 (2009), 630-635.
%H A190124 J. Sondow, J. W. Nicholson, and T. D. Noe, <a href="http://arxiv.org/abs/1105.2249"> Ramanujan Primes: Bounds, Runs, Twins, and Gaps</a>, arXiv:1105.2249 [math.NT], 2011.
%e A190124 0.265563275...
%o A190124 (Perl)
%o A190124 use ntheory ":all";
%o A190124 use Math::MPFR qw/Rmpfr_get_str Rmpfr_set_default_prec Rmpfr_printf/;
%o A190124 Rmpfr_set_default_prec(500);
%o A190124 my $limit = shift || 9;
%o A190124 my($maxexp, $sum) = (9, Math::MPFR->new(0));
%o A190124 for my $e (1..$limit) {
%o A190124   my($numrp, $psum) = (0, Math::MPFR->new(0));
%o A190124   if ($e <= $maxexp) {
%o A190124     my $rp = ramanujan_primes(10**($e-1),10**$e);
%o A190124     $numrp += scalar @$rp;
%o A190124     $psum += (1/Math::MPFR->new("$_"))**2 for @$rp;
%o A190124   } else {
%o A190124     for my $k (10**($e-$maxexp-1) .. 10**($e-$maxexp)-1) {
%o A190124       my $rp = ramanujan_primes($k*10**$maxexp,($k+1)*10**$maxexp);
%o A190124       $numrp += scalar @$rp;
%o A190124       $psum += (1/Math::MPFR->new("$_"))**2 for @$rp;
%o A190124     }
%o A190124   }
%o A190124   Rmpfr_printf("%2d ", $e);
%o A190124   Rmpfr_printf("%14lu   ", $numrp);
%o A190124   Rmpfr_printf("%.20Rf  ", $sum += $psum);
%o A190124   Rmpfr_printf("%.20Rf\n", $psum);
%o A190124 } # _Dana Jacobsen_, Jul 27 2015
%Y A190124 Cf. A078437, A085548, A104272.
%K A190124 nonn,cons,more
%O A190124 0,1
%A A190124 _John W. Nicholson_, May 04 2011
%E A190124 a(10) and a(11) (from data above by Dana Jacobsen_, Jul 27 2015) added by _John W. Nicholson_, Dec 17 2015