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.

Showing 1-10 of 11 results. Next

A165959 Size of the range of the Ramanujan Prime Corollary, 2*A168421(n) - A104272(n).

Original entry on oeis.org

2, 3, 5, 5, 5, 11, 3, 7, 3, 9, 5, 11, 7, 9, 7, 11, 15, 13, 27, 25, 21, 15, 13, 11, 5, 17, 7, 3, 11, 9, 15, 9, 21, 13, 3, 15, 13, 7, 5, 15, 11, 11, 17, 15, 27, 21, 15, 13, 7, 21, 19, 15, 9, 3, 17, 15, 7, 7, 7, 9, 9, 17, 15, 11, 9, 5, 5, 21, 17, 11, 7, 15, 9
Offset: 1

Views

Author

John W. Nicholson, Sep 12 2011

Keywords

Comments

All but the first term is odd because A104272 has only one even term, 2. Because of all primes > 2 are odd, 1 can be subtracted from each term.
If this sequence has an infinite number of terms in which a(n) = 3, then the twin prime conjecture can be proved.
R_n is the sequence A104272(n) and k = pi(R_n)= A000720(R_n) with i>k.
By comparing the fractions we can see that (p_(i+1)-p_i)/(2*sqrt(p_i)) and a(n)/(2*sqrt(p_k)) are < 1 for all n > 0, in fact a(n)/(1.8*sqrt(p_k)) < 1 for all n > 0. When taking into account numbers in A182873(n) and A190874(n) to sqrt(R_n) we see that A182873(n)/(A190874(n)*sqrt(R_n)) < 1 for all n > 1.

Examples

			A168421(19) = 127, A104272(19) = 227; so a(19) = 2*A168421(19) - A104272(19) = 254 - 227 = 27. Note: for n = 20, 21, 22, 23, A168421(n) = 127. Because A168421 remains the same for these n and A104272 increases, the size of the range for a(n) for these n decreases. Note: a(18) = 2*97 - 181 = 194 - 181 = 13. This is nearly half a(19). The actual gap betweens A104272(19) and the next prime, 229, is 2.
		

Crossrefs

Programs

  • Mathematica
    nn = 100; 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; t = Table[0, {nn}];
    Do[m = PrimePi[2 n] - PrimePi[n]; If[0 < m <= nn, t[[m]] = n], {n, 15 nn}];
    A168421 = NextPrime[Join[{1}, t]] // Most;
    A165979 = 2 A168421 - A104272 (* Jean-François Alcover, Nov 07 2018, after T. D. Noe in A104272 *)

Formula

a(n) = 2*A168421(n) - A104272(n).

A104272 Ramanujan primes R_n: a(n) is the smallest number such that if x >= a(n), then pi(x) - pi(x/2) >= n, where pi(x) is the number of primes <= x.

Original entry on oeis.org

2, 11, 17, 29, 41, 47, 59, 67, 71, 97, 101, 107, 127, 149, 151, 167, 179, 181, 227, 229, 233, 239, 241, 263, 269, 281, 307, 311, 347, 349, 367, 373, 401, 409, 419, 431, 433, 439, 461, 487, 491, 503, 569, 571, 587, 593, 599, 601, 607, 641, 643, 647, 653, 659
Offset: 1

Views

Author

Jonathan Sondow, Feb 27 2005

Keywords

Comments

Referring to his proof of Bertrand's postulate, Ramanujan (1919) states a generalization: "From this we easily deduce that pi(x) - pi(x/2) >= 1, 2, 3, 4, 5, ..., if x >= 2, 11, 17, 29, 41, ..., respectively." Since the a(n) are prime (by their minimality), I call them "Ramanujan primes."
See the additional references and links mentioned in A143227.
2n log 2n < a(n) < 4n log 4n for n >= 1, and prime(2n) < a(n) < prime(4n) if n > 1. Also, a(n) ~ prime(2n) as n -> infinity.
Shanta Laishram has proved that a(n) < prime(3n) for all n >= 1.
a(n) - 3n log 3n is sometimes positive, but negative with increasing frequency as n grows since a(n) ~ 2n log 2n. There should be a constant m such that for n >= m we have a(n) < 3n log 3n.
A good approximation to a(n) = R_n for n in [1..1000] is A162996(n) = round(k*n * (log(k*n)+1)), with k = 2.216 determined empirically from the first 1000 Ramanujan primes, which approximates the {k*n}-th prime number which in turn approximates the n-th Ramanujan prime and where abs(A162996(n) - R_n) < 2 * sqrt(A162996(n)) for n in [1..1000]. Since R_n ~ prime(2n) ~ 2n * (log(2n)+1) ~ 2n * log(2n), while A162996(n) ~ prime(k*n) ~ k*n * (log(k*n)+1) ~ k*n * log(k*n), A162996(n) / R_n ~ k/2 = 2.216/2 = 1.108 which implies an asymptotic overestimate of about 10% (a better approximation would need k to depend on n and be asymptotic to 2). - Daniel Forgues, Jul 29 2009
Let p_n be the n-th prime. If p_n >= 3 is in the sequence, then all integers (p_n+1)/2, (p_n+3)/2, ..., (p_(n+1)-1)/2 are composite numbers. - Vladimir Shevelev, Aug 12 2009
Denote by q(n) the prime which is the nearest from the right to a(n)/2. Then there exists a prime between a(n) and 2q(n). Converse, generally speaking, is not true, i.e., there exist primes outside the sequence, but possess such property (e.g., 109). - Vladimir Shevelev, Aug 14 2009
The Mathematica program FasterRamanujanPrimeList uses Laishram's result that a(n) < prime(3n).
See sequence A164952 for a generalization we call a Ramanujan k-prime. - Vladimir Shevelev, Sep 01 2009
From Jonathan Sondow, May 22 2010: (Start)
About 46% of primes < 19000 are Ramanujan primes. About 78% of the lesser of twin primes < 19000 are Ramanujan primes.
About 15% of primes < 19000 are the lesser of twin primes. About 26% of Ramanujan primes < 19000 are the lesser of twin primes.
A reason for the jumps is in Section 7 of "Ramanujan primes and Bertrand's postulate" and in Section 4 of "Ramanujan Primes: Bounds, Runs, Twins, and Gaps". (See the arXiv link for a corrected version of Table 1.)
See Shapiro 2008 for an exposition of Ramanujan's proof of his generalization of Bertrand's postulate. (End)
The (10^n)-th R prime: 2, 97, 1439, 19403, 242057, 2916539, 34072993, 389433437, .... - Robert G. Wilson v, May 07 2011, updated Aug 02 2012
The number of R primes < 10^n: 1, 10, 72, 559, 4459, 36960, 316066, 2760321, .... - Robert G. Wilson v, Aug 02 2012
a(n) = R_n = R_{0.5,n} in "Generalized Ramanujan Primes."
All Ramanujan primes are in A164368. - Vladimir Shevelev, Aug 30 2011
If n tends to infinity, then limsup(a(n) - A080359(n-1)) = infinity; conjecture: also limsup(a(n) - A080359(n)) = infinity (cf. A182366). - Vladimir Shevelev, Apr 27 2012
Or the largest prime x such that the number of primes in (x/2,x] equals n. This equivalent definition underlines an important analogy between Ramanujan and Labos primes (cf. A080359). - Vladimir Shevelev, Apr 29 2012
Research questions on R_n - prime(2n) are at A233739, and on n-Ramanujan primes at A225907. - Jonathan Sondow, Dec 16 2013
The questions on R_n - prime(2n) in A233739 have been answered by Christian Axler in "On generalized Ramanujan primes". - Jonathan Sondow, Feb 13 2014
Srinivasan's Lemma (2014): prime(k-n) < prime(k)/2 if R_n = prime(k) and n > 1. Proof: By the minimality of R_n, the interval (prime(k)/2,prime(k)] contains exactly n primes and so prime(k-n) < prime(k)/2. - Jonathan Sondow, May 10 2014
For some n and k, we see that A168421(k) = a(n) so as to form a chain of primes similar to a Cunningham chain. For example (and the first example), A168421(2) = 7, links a(2) = 11 = A168421(3), links a(3) = 17 = A168421(4), links a(4) = 29 = A168421(6), links a(6) = 47. Note that the links do not have to be of a form like q = 2*p+1 or q = 2*p-1. - John W. Nicholson, Feb 22 2015
Extending Sondow's 2010 comments: About 48% of primes < 10^9 are Ramanujan primes. About 76% of the lesser of twin primes < 10^9 are Ramanujan primes. - Dana Jacobsen, Sep 06 2015
Sondow, Nicholson, and Noe's 2011 conjecture that pi(R_{m*n}) <= m*pi(R_n) for m >= 1 and n >= N_m (see A190413, A190414) was proved for n > 10^300 by Shichun Yang and Alain Togbé in 2015. - Jonathan Sondow, Dec 01 2015
Berliner, Dean, Hook, Marr, Mbirika, and McBee (2016) prove in Theorem 18 that the graph K_{m,n} is prime for n >= R_{m-1}-m; see A291465. - Jonathan Sondow, May 21 2017
Okhotin (2012) uses Ramanujan primes to prove Lemma 8 in "Unambiguous finite automata over a unary alphabet." - Jonathan Sondow, May 30 2017
Sepulcre and Vidal (2016) apply Ramanujan primes in Remark 9 of "On the non-isolation of the real projections of the zeros of exponential polynomials." - Jonathan Sondow, May 30 2017
Axler and Leßmann (2017) compute the first k-Ramanujan prime for k >= 1 + epsilon; see A277718, A277719, A290394. - Jonathan Sondow, Jul 30 2017

Examples

			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]
		

References

  • Srinivasa Ramanujan, Collected Papers of Srinivasa Ramanujan (Ed. G. H. Hardy, S. Aiyar, P. Venkatesvara and B. M. Wilson), Amer. Math. Soc., Providence, 2000, pp. 208-209.
  • Harold N. Shapiro, Ramanujan's idea, Section 9.3B in Introduction to the Theory of Numbers, Dover, 2008.

Crossrefs

Cf. A006992 (Bertrand primes), A056171 (pi(n) - pi(n/2)).
Cf. A162996 (Round(kn * (log(kn)+1)), with k = 2.216 as an approximation of R_n = n-th Ramanujan Prime).
Cf. A163160 (Round(kn * (log(kn)+1)) - R_n, where k = 2.216 and R_n = n-th Ramanujan prime).
Cf. A178127 (Lesser of twin Ramanujan primes), A178128 (Lesser of twin primes if it is a Ramanujan prime).
Cf. A181671 (number of Ramanujan primes less than 10^n).
Cf. A174635 (non-Ramanujan primes), A174602, A174641 (runs of Ramanujan and non-Ramanujan primes).
Cf. A189993, A189994 (lengths of longest runs).
Cf. A190124 (constant of summation: 1/a(n)^2).
Cf. A192820 (2- or derived Ramanujan primes R'_n), A192821, A192822, A192823, A192824, A225907.
Cf. A193761 (0.25-Ramanujan primes), A193880 (0.75-Ramanujan primes).
Cf. A185004 - A185007 ("modular" Ramanujan primes).
Not to be confused with the Ramanujan numbers or Ramanujan tau function, A000594.

Programs

  • Maple
    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
  • Mathematica
    (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 *)
  • PARI
    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
  • Perl
    use ntheory ":all"; my $r = ramanujan_primes(1000); say "[@$r]"; # Dana Jacobsen, Sep 06 2015
    

Formula

a(n) = 1 + max{k: pi(k) - pi(k/2) = n - 1}.
a(n) = A080360(n-1) + 1 for n > 1.
a(n) >= A080359(n). - Vladimir Shevelev, Aug 20 2009
A193761(n) <= a(n) <= A193880(n).
a(n) = 2*A084140(n) - 1, for n > 1. - Jonathan Sondow, Dec 21 2012
a(n) = prime(2n) + A233739(n) = (A233822(n) + a(n+1))/2. - Jonathan Sondow, Dec 16 2013
a(n) = max{prime p: pi(p) - pi(p/2) = n} (see Shevelev 2012). - Jonathan Sondow, Mar 23 2016
a(n) = A000040(A179196(n)). - R. J. Mathar, Sep 21 2017
Sum_{n>=1} (-1)^(n+1)/a(n) = A190303. - Amiram Eldar, Nov 20 2020

A005382 Primes p such that 2p-1 is also prime.

Original entry on oeis.org

2, 3, 7, 19, 31, 37, 79, 97, 139, 157, 199, 211, 229, 271, 307, 331, 337, 367, 379, 439, 499, 547, 577, 601, 607, 619, 661, 691, 727, 811, 829, 877, 937, 967, 997, 1009, 1069, 1171, 1237, 1279, 1297, 1399, 1429, 1459, 1531, 1609, 1627, 1657, 1759, 1867, 2011
Offset: 1

Views

Author

Keywords

Comments

Sequence gives values of p such Sum_{i=1..p} gcd(p,i) = A018804(p) is prime. - Benoit Cloitre, Jan 25 2002
Let q = 2n-1. For these n (and q), the sum of two cyclotomic polynomials can be written as a product of cyclotomic polynomials and as a cyclotomic polynomial in x^2: Phi(q,x) + Phi(2q,x) = 2 Phi(n,x) Phi(2n,x) = 2 Phi(n,x^2). - T. D. Noe, Nov 04 2003
Primes in A006254. - Zak Seidov, Mar 26 2013
If a(n) is in A168421 then A005383(n) is a twin prime with a Ramanujan prime, A005383(n) - 2. If this sequence has an infinite number of terms in A168421, then the twin prime conjecture can be proved. - John W. Nicholson, Dec 05 2013
Records subsequence of A023509 (n >= 2). - David James Sycamore, May 05 2025

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A010051, A000040, A053685 (subsequence), A006254.
Cf. A023509.

Programs

  • Haskell
    a005382 n = a005382_list !! (n-1)
    a005382_list = filter
       ((== 1) . a010051 . (subtract 1) . (* 2)) a000040_list
    -- Reinhard Zumkeller, Oct 03 2012
    
  • Magma
    [n: n in [0..1000] | IsPrime(n) and IsPrime(2*n-1)]; // Vincenzo Librandi, Nov 18 2010
    
  • Maple
    f := proc(Q) local t1,i,j; t1 := []; for i from 1 to 500 do j := ithprime(i); if isprime(2*j-Q) then t1 := [op(t1),j]; fi; od: t1; end; f(1);
    # second Maple program:
    q:= p-> andmap(isprime, [p, 2*p-1]):
    select(q, [$2..2500])[];  # Alois P. Heinz, Dec 16 2024
  • Mathematica
    Select[Prime[Range[300]], PrimeQ[2#-1]&]
  • PARI
    select(p->isprime(2*p-1),primes(500)) \\ Charles R Greathouse IV, Apr 26 2012
    
  • PARI
    forprime(n=2, 10^3, if(ispseudoprime(2*n-1), print1(n, ", "))) \\ Felix Fröhlich, Jun 15 2014

Formula

a(n) = A129521(n) / A005383(n). - Reinhard Zumkeller, Apr 19 2007
a(n) = (A005383(n) + 1)/2. - Zak Seidov, Nov 04 2010

A005383 Primes p such that (p+1)/2 is prime.

Original entry on oeis.org

3, 5, 13, 37, 61, 73, 157, 193, 277, 313, 397, 421, 457, 541, 613, 661, 673, 733, 757, 877, 997, 1093, 1153, 1201, 1213, 1237, 1321, 1381, 1453, 1621, 1657, 1753, 1873, 1933, 1993, 2017, 2137, 2341, 2473, 2557, 2593, 2797, 2857, 2917, 3061, 3217, 3253
Offset: 1

Views

Author

Keywords

Comments

Also, n such that sigma(n)/2 is prime. - Joseph L. Pe, Dec 10 2001; confirmed by Vladeta Jovovic, Dec 12 2002
Primes that are followed by twice a prime, i.e., are followed by a semiprime. (For primes followed by two semiprimes, see A036570.) - Zak Seidov, Aug 03 2013, Dec 31 2015
If A005382(n) is in A168421 then a(n) is a twin prime with a Ramanujan prime, A104272(k) = a(n) - 2. - John W. Nicholson, Jan 07 2016
Starting with 13 all terms are congruent to 1 mod 12. - Zak Seidov, Feb 16 2017
Numbers n such that both n and n+12 are terms are 61, 661, 1201, 4261, 5101, 6121, 6361 (all congruent to 1 mod 60). - Zak Seidov, Mar 16 2017
Primes p for which there exists a prime q < p such that 2q == 1 (mod p). Proof: q = (p + 1)/2. - David James Sycamore, Nov 10 2018
Prime numbers n such that phi(sigma(2n)) = phi(2n), excluding n=3 and n=5; as well as phi(sigma(3n)) = phi(3n), excluding n=3 only. - Richard R. Forberg, Dec 22 2020

Examples

			Both 3 and (3+1)/2 = 2 are primes, both 5 and (5+1)/2 = 3 are primes. - _Zak Seidov_, Nov 19 2012
		

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

A subsequence of A000040 which has A036570 as subsequence.

Programs

  • Haskell
    a005383 n = a005383_list !! (n-1)
    a005383_list = [p | p <- a065091_list, a010051 ((p + 1) `div` 2) == 1]
    -- Reinhard Zumkeller, Nov 06 2012
    
  • MATLAB
    LIMIT = 8000 % Find all members of A005383 less than LIMIT A = primes(LIMIT); n = length(A); %n is number of primes less than LIMIT B = 2*A - 1; C = ones(n, 1)*A; %C is an n X n matrix, with C(i, j) = j-th prime D = B'*ones(1, n); %D is an n X n matrix, with D(i, j) = (i-th prime)*2 - 1 [i, j] = find(C == D); A(j)
    
  • Magma
    [n: n in [1..3300] | IsPrime(n) and IsPrime((n+1) div 2) ]; // Vincenzo Librandi, Sep 25 2012
    
  • Maple
    for n to 300 do
      X := ithprime(n);
    Y := ithprime(n+1);
    Z := 1/2 mod Y;
      if isprime(Z) then print(Y);
    end if:
    end do:
    # David James Sycamore, Nov 11 2018
  • Mathematica
    Select[Prime[Range[1000]], PrimeQ[(# + 1)/2] &] (* Zak Seidov, Nov 19 2012 *)
  • PARI
    A005383_list(n) = select(m->isprime(m\2+1),primes(n)[2..n]) \\ Charles R Greathouse IV, Sep 25 2012
    
  • Python
    from sympy import isprime
    [n for n in range(3, 5000) if isprime(n) and isprime((n + 1)//2)]
    # Indranil Ghosh, Mar 17 2017
    
  • Sage
    [n for n in prime_range(3, 1000) if is_prime((n + 1) // 2)]
    # F. Chapoton, Dec 17 2019

Formula

a(n) = A129521(n)/A005382(n). - Reinhard Zumkeller, Apr 19 2007
A000035(a(n))*A010051(a(n))*A010051((a(n)+1)/2) = 1. - Reinhard Zumkeller, Nov 06 2012
a(n) = 2*A005382(n) - 1. - Zak Seidov, Nov 19 2012
a(n) = A005382(n) + phi(A005382(n)) = A005382(n) + A000010(A005382(n)). - Torlach Rush, Mar 10 2014

Extensions

More terms from David Wasserman, Jan 18 2002
Name changed by Jianing Song, Nov 27 2021

A000101 Record gaps between primes (upper end) (compare A002386, which gives lower ends of these gaps).

Original entry on oeis.org

3, 5, 11, 29, 97, 127, 541, 907, 1151, 1361, 9587, 15727, 19661, 31469, 156007, 360749, 370373, 492227, 1349651, 1357333, 2010881, 4652507, 17051887, 20831533, 47326913, 122164969, 189695893, 191913031, 387096383, 436273291, 1294268779
Offset: 1

Views

Author

Keywords

Comments

See A002386 for complete list of known terms and further references.
Except for a(1)=3 and a(2)=5, a(n) = A168421(k). Primes 3 and 5 are special in that they are the only primes which do not have a Ramanujan prime between them and their double, <= 6 and 10 respectively. Because of the large size of a gap, there are many repeats of the prime number in A168421. - John W. Nicholson, Dec 10 2013

References

  • B. C. Berndt, Ramanujan's Notebooks Part IV, Springer-Verlag, see p. 133.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A000040, A001223 (differences between primes), A002386 (lower ends), A005250 (record gaps), A107578.
Cf. also A005669, A111943.

Programs

  • Mathematica
    s = {3}; gm = 1; Do[p = Prime[n + 1]; g = p - Prime[n]; If[g > gm, Print[p]; AppendTo[s, p]; gm = g], {n, 2, 1000000}]; s  (* Jean-François Alcover, Mar 31 2011 *)
  • PARI
    p=q=2;g=0;until( g<(q=nextprime(1+p=q))-p & print1(p+g=q-p,","),) \\ M. F. Hasler, Dec 13 2007

Formula

a(n) = A002386(n) + A005250(n) = A008995(n-1) + 1. - M. F. Hasler, Dec 13 2007

A084140 a(n) is the smallest number j such that if x >= j there are at least n primes between x and 2x exclusively.

Original entry on oeis.org

2, 6, 9, 15, 21, 24, 30, 34, 36, 49, 51, 54, 64, 75, 76, 84, 90, 91, 114, 115, 117, 120, 121, 132, 135, 141, 154, 156, 174, 175, 184, 187, 201, 205, 210, 216, 217, 220, 231, 244, 246, 252, 285, 286, 294, 297, 300, 301, 304, 321, 322, 324, 327, 330, 339, 360, 364
Offset: 1

Views

Author

Harry J. Smith, May 15 2003

Keywords

Comments

For all m >= a(n) there are at least n primes between m and 2m exclusively. This calculation relies on the fact that pi(2m) - pi(m) > m/(3*log(m)) for m >= 5. This is one more than the terms of A084139 with offset changed from 0 to 1.
For n > 5889, pi(2n) - pi(n) > f(2, 2n) - f(3, n) where f(k, x) = x/log x * (1 + 1/log x + k/(log x)^2). This may be useful for checking larger terms. The constant 3 can be improved at the cost of an increase in the constant 5889. - Charles R Greathouse IV, May 02 2012
A168421(n) = nextprime(a(n)), where nextprime(x) is the next prime >= x. - John W. Nicholson, Dec 21 2012
a(1) = ceiling((A104272(1)+1)/2) modifies the only even prime, 2; which has been stated, in Formula, as a(1) = A104272(1); for all others, a(n) = (A104272(n)+1)/2 = ceiling ((A104272(n)+1)/2). - John W. Nicholson, Dec 24 2012
Srinivasan's Lemma (2014): previousprime(a(n)) = p_(k-n) < (p_k)/2, where the n-th Ramanujan Prime R_n is the k-th prime p_k, and with n > 1. Proof: By the minimality of R_n, the interval ((p_k)/2,p_k] contains exactly n primes, so p_(k-n) < (p_k)/2. - Copied and adapted from a comment by Jonathan Sondow in A168421 by John W. Nicholson, Feb 17 2015

Examples

			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.
		

References

  • Paulo Ribenboim, The Little Book of Big Primes, Springer-Verlag, 1991, p. 140.
  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag, 2004, p. 181.

Crossrefs

Programs

Formula

a(1) = A104272(1); for n >= 2, a(n) = (A104272(n)+1)/2. - Vladimir Shevelev, Dec 07 2012
a(n) = ceiling((A104272(n)+1)/2) for n >= 1. - John W. Nicholson, Dec 24 2012

A179196 Number of primes up to the n-th Ramanujan prime: A000720(A104272(n)).

Original entry on oeis.org

1, 5, 7, 10, 13, 15, 17, 19, 20, 25, 26, 28, 31, 35, 36, 39, 41, 42, 49, 50, 51, 52, 53, 56, 57, 60, 63, 64, 69, 70, 73, 74, 79, 80, 81, 83, 84, 85, 89, 93, 94, 96, 104, 105, 107, 108, 109, 110, 111, 116, 117, 118, 119, 120, 123, 128, 129, 131, 133, 136, 140, 142, 143
Offset: 1

Views

Author

John W. Nicholson, Jul 02 2010

Keywords

Comments

a(n) = k = pi(p_k) = pi(R_n), where pi is the prime number counting function and R_n is the n-th Ramanujan prime. I.e., p_k, the k-th prime, is the n-th Ramanujan prime.
Prime index of A168421(n), that is A000720(A168421(n)), is equal to a(n) - n + 1. - John W. Nicholson, Sep 16 2015

Examples

			The 10th Ramanujan prime is 97, and pi(97) = 25, so a(10) = 25.
		

Crossrefs

Programs

Formula

a(n) = A000720(A104272(n)).
a(n) = rho(n) in the paper by Sondow, Nicholson, and Noe.
prime(a(n)) = R_n = A104272(n).
a(n) = A000720(A168421(n)) + n - 1. - John W. Nicholson, Sep 16 2015

A168425 Large Associated Ramanujan Prime, p_i.

Original entry on oeis.org

3, 13, 19, 31, 43, 53, 61, 71, 73, 101, 103, 109, 131, 151, 157, 173, 181, 191, 229, 233, 239, 241, 251, 269, 271, 283, 311, 313, 349, 353, 373, 379, 409, 419, 421, 433, 439, 443, 463, 491, 499, 509, 571, 577, 593, 599, 601, 607, 613, 643, 647, 653, 659, 661
Offset: 1

Views

Author

John W. Nicholson, Nov 25 2009

Keywords

Comments

a(n) is the smallest prime on the right side of the Ramanujan Prime Corollary, 2*p_(i-n) > p_i, for i > k where k = pi(p_k) = pi(R_n) That is, p_k is the n-th Ramanujan Prime, R_n and the k-th prime.
a(n) = nextprime(R_n) = nextprime(p_k), where nextprime(x) is the next prime larger than x.
This is very useful in showing the number of primes in the range [p_k, 2*p_(i-n)] is greater than or equal to 1. By taking into account the size of the gaps between primes in [p_(i-n),p_k], one can see that the average prime gap is about log(p_k) using the following R_n / (2*n) ~ log(R_n).
Proof of Corollary: See Wikipedia link.
The number of primes until the next Ramanujan prime, R_(n+1), can be found in A190874.
Srinivasan's Lemma (2014): p_(k-n) < (p_k)/2 if R_n = p_k and n > 1. Proof: By the minimality of R_n, the interval ((p_k)/2,p_k] contains exactly n primes, so p_(k-n) < (p_k)/2. - Jonathan Sondow, May 10 2014
In spite of the name Large Associated Ramanujan Prime, a(n) is not a Ramanujan prime for many values of n. - Jonathan Sondow, May 10 2014

Examples

			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, 101 is the large associated Ramanujan prime.
		

Crossrefs

Programs

  • Mathematica
    nn = 100; 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]}
    ];
    RamanujanPrimes = R + 1;
    Prime[PrimePi[#]+1]& /@ RamanujanPrimes (* Jean-François Alcover, Nov 03 2018, after T. D. Noe in A104272 *)
  • PARI
    genit(n=100)={my(L=vector(n),s=0,k=1,z);for(k=1,prime(3*n)-1,if(ispseudoprime(k),s++);if(k%2==0&&ispseudoprime(k/2),s--);if(snextprime(x+1),L);v} \\ Bill McEachen, Jun 24 2023 (incorporates code from A104272)
  • Perl
    use ntheory ":all"; say next_prime(nth_ramanujan_prime($)) for 1..100; # _Dana Jacobsen, Dec 25 2015
    

Formula

a(n) = prime(primepi(A104272(n)) + 1).
a(n) = A151800(A104272(n)). - Michel Marcus, Jun 27 2023

A190874 First differences of A179196, pi(R_(n+1)) - pi(R_n) where R_n is A104272(n).

Original entry on oeis.org

4, 2, 3, 3, 2, 2, 2, 1, 5, 1, 2, 3, 4, 1, 3, 2, 1, 7, 1, 1, 1, 1, 3, 1, 3, 3, 1, 5, 1, 3, 1, 5, 1, 1, 2, 1, 1, 4, 4, 1, 2, 8, 1, 2, 1, 1, 1, 1, 5, 1, 1, 1, 1, 3, 5, 1, 2, 2, 3, 4, 2, 1, 1, 3, 1, 4, 7, 1, 1, 2, 3, 3, 2, 1, 1, 3, 1, 1, 1, 2, 1, 2, 1, 5, 2, 3
Offset: 1

Views

Author

John W. Nicholson, May 22 2011

Keywords

Comments

The count of primes of the interval (R_n,R_(n+1)] where R_n is A104272(n).
The sequence A182873 is the first difference of Ramanujan primes R_(n+1)- R_n. While each non-Ramanujan prime is bound by Ramanujan primes, the maximal non-Ramanujan prime gap is less than the maximal Ramanujan prime gap, A182873, and the ratio of a(n)/A182873(n) is the average gap size at R_n.
Record terms of n, a(n) are in A202186, A202187. Each record term value of a(n) - 1 is the index m of A168425(m). A202188 is the index of A168425 when A174641(n) = A168425(m), it has repeated values of A202187.
Starting at index n = A191228(A174602(m)) in this sequence, the first instance of a count of m - 1 consecutive 1's is seen.
Limit inferior of a(n) is positive, because there are infinitely many Ramanujan primes and each term of the sequence is >= 1.
Limit superior of a(n)/log(pi(R_n)) is positive infinity. Equivalently, there are infinitely many n > 0 such that pi(R_(n+1)) > pi(R_n) + t log(pi(R_n)), for every t > 0.
For all n > 3, a(n) < n.
a(n) = rho(n+1) - rho(n) using rho(x) as defined in Sondow, Nicholson, Noe.

Examples

			R(4) = 29, the fourth Ramanujan prime, the next Ramanujan prime is a(4) = 3 primes away or R(5) = 41.
		

Crossrefs

Programs

  • Mathematica
    nn = 100;
    R = Table[0, {nn}]; s = 0; Do[If[PrimeQ[k], s++]; If[PrimeQ[k/2], s--]; If[sJean-François Alcover, Nov 11 2018, after T. D. Noe in A104272 *)

Formula

a(n) = pi(R_(n+1)) - pi(R_n) or
a(n) = A000720(A104272(n+1)) - A000720(A104272(n)).
a(n) = A179196(n+1) - A179196(n).

A084139 a(n) is the largest number for which exactly n primes are bounded between a(n) and 2a(n) exclusively.

Original entry on oeis.org

1, 5, 8, 14, 20, 23, 29, 33, 35, 48, 50, 53, 63, 74, 75, 83, 89, 90, 113, 114, 116, 119, 120, 131, 134, 140, 153, 155, 173, 174, 183, 186, 200, 204, 209, 215, 216, 219, 230, 243, 245, 251, 284, 285, 293, 296, 299, 300, 303, 320, 321, 323, 326, 329, 338, 359, 363
Offset: 0

Views

Author

Harry J. Smith, May 15 2003

Keywords

Comments

a(n) is the index of last occurrence of n in A060715. This calculation relies on the fact that Pi(2*m)-Pi(m) > m/(3*Log(m)) for m>=5. It can be shown that every integer >= 0 occurs in A060715, so there is no problem in finding the last occurrence.
A168421(n) = nextprime(a(n)), where nextprime(x) is the next prime > x. Note: some a(n) may be prime, therefore nextprime(x) not equal to x. - John W. Nicholson, Oct 11 2013

Examples

			a(10) = 50 since ten primes last arise between 50 and 100: 53, 59, 61, 67, 71, 73, 79, 83, 89, 97.
		

References

  • P. Ribenboim, The Little Book of Big Primes. Springer-Verlag, 1991, p. 140.

Crossrefs

Programs

  • Mathematica
    nn = 100; t = Table[0, {nn}]; Do[m = PrimePi[2*n] - PrimePi[n]; If[0 < m <= nn, t[[m]] = n], {n, 15*nn}]; Join[{1}, t] (* T. D. Noe, Dec 31 2012 *)

Formula

a(n) = floor((A104272(n)+1)/2) for n >= 1. - John W. Nicholson, Oct 11 2013
a(n) = A084140(n+1) - 1. - John W. Nicholson, Oct 11 2013
Showing 1-10 of 11 results. Next