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-4 of 4 results.

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

A213273 The smallest m such that the complete bipartite graph K_{n,n} has a coprime labeling using labels from {1,...,m}.

Original entry on oeis.org

2, 4, 7, 9, 11, 15, 17, 21, 23, 27, 29, 32, 37, 40, 43, 46, 49, 53, 57, 61, 63, 67, 71, 73, 77, 81, 83, 88, 92, 97, 100, 103, 107, 111, 113, 118, 122, 125, 128, 133, 135, 139, 143, 147, 149, 153, 157, 163, 165, 167, 171, 173, 178, 181, 188, 191, 194, 197, 202
Offset: 1

Views

Author

Adam Berliner, Nate Dean, Jonelle Hook, Alison Marr, Aba Mbirika, Cayla McBee, Jun 08 2012

Keywords

Comments

A prime labeling of a graph G is a labeling of the vertices with the integers 1, 2, ..., v (where v is the number of vertices) such that any two adjacent vertices have labels that are relatively prime. Here we are allowing the largest label m >= v and calling that a coprime labeling. Our goal is to find the smallest m that makes the labeling possible for K_{n,n} (which clearly does not have a prime labeling for n>2).

Examples

			For n=12 and K_{12,12} the two independent sets would be labeled {1,3,5,9,15,17,19,23,25,27,29,31} and {2,4,7,8,11,13,14,16,22,26,28,32}.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, k, t, s) option remember;
          nops(s)>=t and (k>=t or n>1 and (b(n-1, k, t, s) or
          b(n-1, k+1, t, select(x-> igcd(n, x)=1, s))))
        end:
    a:= proc(n) option remember; local m; forget(b);
          for m from `if`(n=1, 1, a(n-1))
          while not b(m, 1, n, {$2..m}) do od; m
        end:
    seq(a(n), n=1..14);  # Alois P. Heinz, Jun 16 2012
  • Mathematica
    b[n_, k_, t_, s_] := b[n, k, t, s] = Length[s] >= t && (k >= t || n > 1 && (b[n - 1, k, t, s] || b[n - 1, k + 1, t, Select[s, GCD[n, #] == 1 &]]));
    a[n_] := a[n] = Module[{m}, m = If[n == 1, 1, a[n - 1]]; While[!b[m, 1, n, Range[2, m]], m++]; m];
    Table[Print["a(", n, ") = ", a[n]]; a[n], {n, 1, 23}] (* Jean-François Alcover, Nov 06 2017, after Alois P. Heinz *)

Extensions

More terms from Alois P. Heinz, Jun 16 2012
a(24) and beyond from Paul Tabatabai, Apr 29 2019

A213806 Number of minimal coprime labelings for the complete bipartite graph K_{n,n}.

Original entry on oeis.org

1, 1, 7, 3, 1, 3, 4, 5, 1, 9, 1, 1, 39, 2, 46, 16, 42, 68, 1, 175, 1, 5, 50, 1, 627, 1256, 1177, 10, 1860, 7144, 15, 170, 27156, 178, 64, 2, 6335, 6334, 15592, 4522, 3230, 113926, 99010, 72256, 114606, 199042, 1, 198518, 151036, 236203, 8557, 26542, 21388
Offset: 1

Views

Author

Alois P. Heinz, Jun 20 2012

Keywords

Comments

A minimal coprime labeling for K_{n,n} uses two disjoint n-subsets of {1,...,m} with minimal m = A213273(n) >= 2*n as labels for the two disjoint vertex sets such that labels of adjacent vertices are relatively prime. One of the label sets contains m.

Examples

			a(1) = 1: the two label sets are {{1}, {2}} with m=2.
a(2) = 1: {{1,3}, {2,4}} with m=4.
a(3) = 7: {{2,4,5}, {1,3,7}}, {{1,3,5}, {2,4,7}}, {{2,3,4}, {1,5,7}}, {{2,3,6}, {1,5,7}}, {{2,4,6}, {1,5,7}}, {{3,4,6}, {1,5,7}}, {{1,2,4}, {3,5,7}}.
a(4) = 3: {{2,4,7,8}, {1,3,5,9}}, {{2,4,5,8}, {1,3,7,9}}, {{1,2,4,8}, {3,5,7,9}}.
a(5) = 1: {{2,4,5,8,10}, {1,3,7,9,11}}.
a(21) = 1: {{2,4,5,8,10,11,16,20,22,23,25,29,31,32,40,44,46,50,55,58,62}, {1,3,7,9,13,17,19,21,27,37,39,41,43,47,49,51,53,57,59,61,63}}.
		

Crossrefs

Programs

  • Maple
    b:= proc(n, k, t, s) option remember;
          `if`(nops(s)>=t and k>=t, binomial(nops(s), t),
          `if`(n<1, 0, b(n-1, k, t, s)+ b(n-1, k+1, t,
          select(x-> x<>n and igcd(n, x)=1, s))))
        end:
    g:= proc(n) option remember; local m, r;
          for m from `if`(n=1, 2, g(n-1)[1]) do
            r:= b(m-1, 1, n, select(x-> igcd(m, x)=1, {$1..m-1}));
            if r>0 then break fi
          od; [m, r]
        end:
    a:= n-> g(n)[2]:
    seq(a(n), n=1..11);
  • Mathematica
    b[n_, k_, t_, s_] := b[n, k, t, s] = If[Length[s] >= t && k >= t, Binomial[Length[s], t], If[n < 1, 0, b[n - 1, k, t, s] + b[n - 1, k + 1, t, Select[s, # != n && GCD[n, #] == 1 &]]]];
    g[n_] := g[n] = Module[{m, r}, For[ m = If[n == 1, 2, g[n - 1][[1]] ], True, m++, r = b[m - 1, 1, n, Select[Range[1, m - 1], GCD[m, #] == 1 &]]; If [r > 0,  Break[]]]; {m, r}];
    a[n_] := a[n] = g[n][[2]];
    Table[Print["a(", n, ") = ", a[n]]; a[n], {n, 1, 18}] (* Jean-François Alcover, Nov 08 2017, after Alois P. Heinz *)

Formula

a(A284875(n)) = 1. - Jonathan Sondow, May 21 2017

Extensions

Terms a(24) and beyond from Kevin Cuadrado, Dec 01 2020

A284875 Values of m for which the complete bipartite graph K_{m,m} has a unique minimal coprime labeling.

Original entry on oeis.org

1, 2, 5, 9, 11, 12, 19, 21, 24, 47, 105, 109, 117, 118, 131, 132, 137, 144, 145, 146, 188, 189, 190, 191, 192, 194, 195, 222, 223, 224, 225, 226, 227, 228, 229, 230, 231, 232, 287, 288, 289, 290, 291, 310, 311, 312, 314, 315, 316, 317, 333, 341, 342, 343, 365
Offset: 1

Views

Author

Jonathan Sondow, May 14 2017

Keywords

Comments

For definitions and examples, see A213273, A213806, and Berliner, Dean, Hook, Marr, Mbirika (2016) section 3.1.

Crossrefs

Formula

A213806(a(n)) = 1.

Extensions

a(9) onwards from Kevin Cuadrado, Dec 01 2020
Showing 1-4 of 4 results.