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.
a(1) = 2 is Bertrand's postulate: pi(x) - pi(x/2) >= 1 for all x >= 2. a(2) = 11 because a(2) < 8 log 8 < 17 and pi(n) - pi(n/2) > 1 for n = 16, 15, ..., 11 but pi(10) - pi(5) = 1. Consider a(9)=71. Then the nearest prime > 71/2 is 37, and between a(9) and 2*37, that is, between 71 and 74, there exists a prime (73). - _Vladimir Shevelev_, Aug 14 2009 [corrected by _Jonathan Sondow_, Jun 17 2013]
A104272 := proc(n::integer) local R; if n = 1 then return 2; end if; R := ithprime(3*n-1) ; # upper limit Laishram's thrm Thrm 3 arXiv:1105.2249 while true do if A056171(R) = n then # Defn. 1. of Shevelev JIS 14 (2012) 12.1.1 return R ; end if; R := prevprime(R) ; end do: end proc: seq(A104272(n),n=1..200) ; # slow downstream search <= p(3n-1) R. J. Mathar, Sep 21 2017
(RamanujanPrimeList[n_] := With[{T=Table[{k,PrimePi[k]-PrimePi[k/2]}, {k,Ceiling[N[4*n*Log[4*n]]]}]}, Table[1+First[Last[Select[T,Last[ # ]==i-1&]]],{i,1,n}]]; RamanujanPrimeList[54]) (* Jonathan Sondow, Aug 15 2009 *) (FasterRamanujanPrimeList[n_] := With[{T=Table[{k,PrimePi[k]-PrimePi[k/2]}, {k,Prime[3*n]}]}, Table[1+First[Last[Select[T,Last[ # ]==i-1&]]],{i,1,n}]]; FasterRamanujanPrimeList[54]) nn=1000; R=Table[0,{nn}]; s=0; Do[If[PrimeQ[k], s++]; If[PrimeQ[k/2], s--]; If[sT. D. Noe, Nov 15 2010 *)
ramanujan_prime_list(n) = {my(L=vector(n), s=0, k=1); for(k=1, prime(3*n)-1, if(isprime(k), s++); if(k%2==0 && isprime(k/2), s--); if(sSatish Bysany, Mar 02 2017
use ntheory ":all"; my $r = ramanujan_primes(1000); say "[@$r]"; # Dana Jacobsen, Sep 06 2015
R(4) = 29, the fourth Ramanujan prime, the next Ramanujan prime is a(4) = 3 primes away or R(5) = 41.
67 and 71 are the first two Ramanujan primes that are consecutive primes, so a(2) = 67.
nn=10000; t=Table[0, {nn}]; len=Prime[3*nn]; s=0; Do[If[PrimeQ[k], s++]; If[PrimeQ[k/2], s--]; If[s
use ntheory ":all"; my $r=ramanujan_primes(1e8); my $max = 0; for (0..$#$r-2) { my $k=0; $k++ while next_prime($r->[$+$k]) == $r->[$+$k+1]; say ++$max," ",$r->[$] while $k >= $max; } # _Dana Jacobsen, Jul 14 2016
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.
Of the 4 primes < 10^1, the last 3 are not Ramanujan primes, so a(1) = 3.
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