A202188 Index of A168425 when A174641(n) = A168425(m); a(n) = m.
1, 1, 1, 9, 18, 18, 42, 165, 165, 317, 559, 559, 559, 634, 634
Offset: 1
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.
Since R_2=11 (see A104272), then for x >= 11, we have pi(x) - pi(x/2) >= 2. However, if to consider only prime x, then we see that, for x=7,5,3, pi(x) - pi(x/2)= 2, but pi(2) - pi(1)= 1. Therefore, already for prime x>=3, we have pi(x) - pi(x/2) >= 2. Thus a(2)=3.
nn = 120; (* nn=120 returns 54 terms *) R = Table[0, {nn}]; s = 0; Do[If[PrimeQ[k], s++]; If[PrimeQ[k/2], s--]; If[s < nn, R[[s + 1]] = k], {k, Prime[3 nn]}]; A104272 = R + 1; Join[{2}, Select[Prime[Range[nn]], MemberQ[A104272, NextPrime[#, -1]]&]] (* Jean-François Alcover, Nov 07 2018, after T. D. Noe in A104272 *)
a(11)=51 since there are at least 11 primes between m and 2m for all m >= 51 and this is not true for any m < 51. Although a(100)=720 is not listed, for all m >= 720, there are at least 100 primes between m and 2m.
nn = 60; R = Table[0, {nn}]; s = 0; Do[If[PrimeQ[k], s++]; If[PrimeQ[k/2], s--]; If[s < nn, R[[s + 1]] = k], {k, Prime[3 nn]}]; A104272 = R + 1; Ceiling[(A104272 + 1)/2] (* Jean-François Alcover, Nov 07 2018, after T. D. Noe in A104272 *)
For n=10, the n-th Ramanujan prime is A104272(n)= 97, the value of k = 25, so i is >= 26, i-n >= 16, the i-n prime is 53, and 2*53 = 106. This leaves the range [97, 106] for the 26th prime which is 101. In this example, 53 is the small associated Ramanujan prime.
nn = 100; t = Table[0, {nn}]; Do[m = PrimePi[2n] - PrimePi[n]; If[0 < m <= nn, t[[m]] = n], {n, 15 nn}]; A084139 = Join[{1}, t]; a[n_] := NextPrime[A084139[[n]]]; Array[a, nn] (* Jean-François Alcover, Nov 07 2018, after T. D. Noe in A084139 *)
use ntheory ":all"; say next_prime((nth_ramanujan_prime($)+1) >> 1) for 1..100; # _Dana Jacobsen, Mar 02 2016
The 10th Ramanujan prime is 97, and pi(97) = 25, so a(10) = 25.
f[n_] := With[{s = Table[{k, PrimePi[k] - PrimePi[k/2]}, {k, Prime[3 n]}]}, Table[1 + First@ Last@ Select[s, Last@ # == i - 1 &], {i, n}]]; PrimePi@ f@ 63 (* Michael De Vlieger, Nov 14 2017, after Jonathan Sondow at A104272 *)
use ntheory ":all"; say prime_count(nth_ramanujan_prime($)) for 1..100; # _Dana Jacobsen, Dec 25 2015
R(4) = 29, the fourth Ramanujan prime, the next Ramanujan prime is a(4) = 3 primes away or R(5) = 41.
With n = 4, a(4)=42, and A202186(4) = 8. So, A190874(42)=8. However, A174641(A202186(4)-1) = A174641(8-1) = A168425(a(4)) = A168425(42) = 509.
With n = 4, A202187(4)=42, and a(4) = 8. So, A190874(42)=8. However, A174641(a(4)-1) = A174641(8-1) = A168425(A202187(4)) = A168425(42) = 509.
perl -Mntheory=:all -nE 'my $n = $1 if /(\d+)$/; say ++$x," ",prev_prime($n) unless $seen{$n}++;' b174641.txt # Dana Jacobsen, Jul 14 2016
use ntheory ":all"; my($max,$r)=(0,ramanujan_primes(1e7)); for (0..$#$r-1) { my $d=prime_count($r->[$+1])-prime_count($r->[$]); if ($d > $max) { say $r->[$]; $max=$d; } } # _Dana Jacobsen, Jul 14 2016
Comments