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 27 results. Next

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

A080359 The smallest integer x > 0 such that the number of primes in (x/2, x] equals n.

Original entry on oeis.org

2, 3, 13, 19, 31, 43, 53, 61, 71, 73, 101, 103, 109, 113, 139, 157, 173, 181, 191, 193, 199, 239, 241, 251, 269, 271, 283, 293, 313, 349, 353, 373, 379, 409, 419, 421, 433, 439, 443, 463, 491, 499, 509, 523, 577, 593, 599, 601, 607, 613, 619, 647, 653, 659
Offset: 1

Views

Author

Labos Elemer, Feb 21 2003

Keywords

Comments

a(n) is the same as: Smallest integer x > 0 such that the number of unitary-prime-divisors of x! equals n.
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
For n >= 3, denote by q(n) the prime which is the nearest from the left to a(n)/2. Then there exists a prime between 2q(n) and a(n). The converse, generally speaking, is not true; i.e., there exist primes that are outside the sequence, but possess such property (e.g., 131). - Vladimir Shevelev, Aug 14 2009
See sequence A164958 for a generalization. - Vladimir Shevelev, Sep 02 2009
a(n) is the n-th Labos prime.

Examples

			n=5: in 31! five unitary-prime-divisors appear (firstly): {17,19,23,29,31}, while other primes {2,3,5,7,11,13} are at least squared. Thus a(5)=31.
Consider a(9)=71. Then the nearest prime < 71/2 is q(9)=31, and between 2q(9) and a(9), i.e., between 62 and 71 there exists a prime (67). - _Vladimir Shevelev_, Aug 14 2009
		

Crossrefs

Cf. A104272 (Ramanujan primes).
Cf. A060756, A080360 (largest integer x with n primes in (x/2,x]).

Programs

  • Mathematica
    nn=1000; t=Table[0, {nn+1}]; s=0; Do[If[PrimeQ[k], s++]; If[PrimeQ[k/2], s--]; If[s<=nn && t[[s+1]]==0, t[[s+1]]=k], {k, Prime[3*nn]}]; Rest[t]
    (* Second program: *)
    a[1] = 2; a[n_] := a[n] = Module[{x = a[n-1]}, While[(PrimePi[x]-PrimePi[Quotient[x, 2]]) != n, x++ ]; x]; Array[a, 54] (* Jean-François Alcover, Sep 14 2018 *)
  • PARI
    a(n) = {my(x = 1); while ((primepi(x) - primepi(x\2)) != n, x++;); x;} \\ Michel Marcus, Jan 15 2014
    
  • Sage
    def A():
        i = 0; n = 1
        while True:
            p = prime_pi(i) - prime_pi(i//2)
            if p == n:
                yield i
                n += 1
            i += 1
    A080359 = A()
    [next(A080359) for n in range(54)] # Peter Luschny, Sep 03 2014

Formula

a(n) = Min{x; Pi[x]-Pi[x/2]=n} = Min{x; A056171(x)=n}=Min{x; A056169(n!)=n}; where Pi()=A000720().
a(n) <= A193507(n) (cf. A194186). - Vladimir Shevelev, Aug 18 2011

Extensions

Definition corrected by Jonathan Sondow, Aug 10 2008
Shrunk title and moved part of title to comments by John W. Nicholson, Sep 18 2011

A164368 Primes p with the property: if q is the smallest prime > p/2, then a prime exists between p and 2q.

Original entry on oeis.org

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

Views

Author

Vladimir Shevelev, Aug 14 2009

Keywords

Comments

The Ramanujan primes possess the following property:
If p = prime(n) > 2, then all numbers (p+1)/2, (p+3)/2, ..., (prime(n+1)-1)/2 are composite.
The sequence equals all primes with this property, whether Ramanujan or not.
All Ramanujan primes A104272 are in the sequence.
Every lesser of twin primes (A001359), beginning with 11, is in the sequence. - Vladimir Shevelev, Aug 31 2009
109 is the first non-Ramanujan prime in this sequence.
A very simple sieve for the generation of the terms is the following: let p_0=1 and, for n>=1, p_n be the n-th prime. Consider consecutive intervals of the form (2p_n, 2p_{n+1}), n=0,1,2,... From every interval containing at least one prime we remove the last one. Then all remaining primes form the sequence. Let us demonstrate this sieve: For p_n=1,2,3,5,7,11,... consider intervals (2,4), (4,6), (6,10), (10,14), (14,22), (22,26), (26,34), ... . Removing from the set of all primes the last prime of each interval, i.e., 3,5,7,13,19,23,31,... we obtain 2,11,17,29, etc. - Vladimir Shevelev, Aug 30 2011
This sequence and A194598 are the mutually wrapping up sequences:
A194598(1) <= a(1) <= A194598(2) <= a(2) <= ...
From Peter Munn, Oct 30 2017: (Start)
The sequence is the list of primes p = prime(k) such that there are no primes between prime(k)/2 and prime(k+1)/2. Changing "k" to "k-1" and therefore "k+1" to "k" produces a definition very similar to A164333's: it differs by prefixing an initial term 3. From this we get a(n+1) = prevprime(A164333(n)) = A151799(A164333(n)) for n >= 1.
The sequence is the list of primes that are not the largest prime less than 2*prime(k) for any k, so that - as a set - it is the complement relative to A000040 of the set of numbers in A059788.
{{2}, A166252, A166307} is a partition.
(End)

Examples

			2 is in the sequence, since then q=2, and there is a prime 3 between 2 and 4. - _N. J. A. Sloane_, Oct 15 2009
		

Crossrefs

Cf. Ramanujan primes, A104272, and related sequences: A164288, A080359, A164294, A193507, A194184, A194186.
A001359, A166252, A166307 are subsets.
Cf. A001262, A001567, A062568, A141232 (all relate to pseudoprimes to base 2).

Programs

  • Maple
    a:= proc(n) option remember; local q, k, p;
          k:= nextprime(`if`(n=1, 1, a(n-1)));
          do q:= nextprime(floor(k/2));
             p:= nextprime(k);
             if p<2*q then break fi;
             k:= p
          od; k
        end:
    seq(a(n), n=1..55);  # Alois P. Heinz, Aug 30 2011
  • Mathematica
    Reap[Do[q=NextPrime[p/2]; If[PrimePi[2*q] != PrimePi[p], Sow[p]], {p, Prime[Range[100]]}]][[2, 1]]
    (* Second program: *)
    fQ[n_] := PrimePi[ 2NextPrime[n/2]] != PrimePi[n];
    Select[ Prime@ Range@ 105, fQ]
  • PARI
    is(n)=nextprime(n+1)<2*nextprime(n/2) && isprime(n) \\ Charles R Greathouse IV, Apr 24 2015

Formula

As a set, this sequence = A000040 \ A059788 = A000040 \ prevprime(2*A000040) = A000040 \ A151799(A005843(A000040)). - Peter Munn, Oct 30 2017

Extensions

Definition clarified and simplified by Jonathan Sondow, Oct 25 2011

A164294 Primes prime(k) such that all integers in [(prime(k-1)+1)/2,(prime(k)-1)/2] are composite, excluding those primes in A080359.

Original entry on oeis.org

131, 151, 229, 233, 311, 571, 643, 727, 941, 1013, 1051, 1153, 1373, 1531, 1667, 1669, 1723, 1783, 1787, 1831, 1951, 1979, 2029, 2131, 2213, 2239, 2311, 2441, 2593, 2621, 2633, 2659, 2663, 2887, 3001, 3011, 3019, 3121, 3169, 3209, 3253, 3347, 3413, 3457
Offset: 1

Views

Author

Vladimir Shevelev, Aug 12 2009

Keywords

Comments

The primes of A080359 larger than 3 all have the property that the integers in the interval selected by halving the value of the preceding prime and halving their own value are all composite. This sequence here collects the primes that are not in A080359 but still share this property of the prime-free subinterval.

Examples

			For the prime 1531=A000040(242), the preceding prime is A000040(241)=1523, and the integers from (1523+1)/2 = 762 up to (1531-1)/2 = 765 are all composite, as they fall in the gap between A000040(135) and A000040(136). In addition, 1531 is not in A080359, which adds 1531 to this sequence here.
		

Crossrefs

Programs

  • Mathematica
    maxPrime = 3500;
    kmax = PrimePi[maxPrime];
    A164333 = Select[Table[{(Prime[k - 1] + 1)/2, (Prime[k] - 1)/2}, {k, 3, kmax}], AllTrue[Range[#[[1]], #[[2]]], CompositeQ] &][[All, 2]]*2 + 1;
    b[1] = 2; b[n_] := b[n] = Module[{k = b[n - 1]}, While[(PrimePi[k] - PrimePi[Quotient[k, 2]]) != n, k++]; k];
    A080359 = Reap[For[n = 1, b[n] <= maxPrime, n++, Sow[b[n]]]][[2, 1]];
    Complement[A164333, A080359] (* Jean-François Alcover, Sep 14 2018 *)
  • PARI
    okprime(p) = { my(k = primepi(p)); for (i = (prime(k-1)+1)/2, (prime(k)-1)/2, if (isprime(i), return (0));); return (1);}
    lista(nn) = {vlp = readvec("b080359.txt"); forprime (p=2, nn, if (! vecsearch(vlp, p) && okprime(p), print1(p, ", ")););} \\ Michel Marcus, Jan 15 2014

Formula

Extensions

Extended beyond 571 by R. J. Mathar, Oct 02 2009

A166251 Isolated primes: Primes p such that there is no other prime in the interval [2*prevprime(p/2), 2*nextprime(p/2)].

Original entry on oeis.org

5, 7, 23, 37, 79, 83, 89, 163, 211, 223, 257, 277, 317, 331, 337, 359, 383, 389, 397, 449, 457, 467, 479, 541, 547, 557, 563, 631, 673, 701, 709, 761, 787, 797, 839, 863, 877, 887, 919, 929, 977, 1129, 1181, 1201, 1213, 1237, 1283, 1307, 1327, 1361, 1399, 1409
Offset: 1

Views

Author

Vladimir Shevelev, Oct 10 2009, Oct 14 2009

Keywords

Comments

Other formulation: Suppose a prime p >= 5 lies in the interval (2p_k, 2p_(k+1)), where p_n is the n-th prime; p is called isolated if the interval (2p_k, 2p_(k+1)) does not contain any other primes.
The sequence is connected with the following classification of primes: The first two primes 2,3 form a separate set of primes; let p >= 5 be in interval(2p_k, 2p_(k+1)), then 1)if in this interval there are primes only more than p, then p is called a right prime; 2) if in this interval there are primes only less than p, then p is called a left prime; 3) if in this interval there are prime more and less than p, then p is called a central prime; 4) if this interval does not contain other primes, then p is called an isolated prime. In particular, the right primes form sequence A166307 and all Ramanujan primes (A104272) more than 2 are either right or central primes; the left primes form sequence A182365 and all Labos primes (A080359) greater than 3 are either left or central primes.
From Peter Munn, Jun 01 2023: (Start)
The isolated primes are prime(k) such that k-1 and k occur as consecutive terms in A020900.
In the tree of primes described in A290183, the isolated primes label the nodes with no sibling nodes.
Conjecture: a(n)/A000040(n) is asymptotic to 9. This would follow from my conjectured asymptotic proportion of 1's in A102820 (the first differences of A020900).
(End)

Examples

			Since 2*17 < 37 < 2*19, and the interval (34, 38) does not contain other primes, 37 is an isolated prime.
		

Crossrefs

Programs

  • Haskell
    a166251 n = a166251_list !! (n-1)
    a166251_list = concat $ (filter ((== 1) . length)) $
       map (filter ((== 1) . a010051)) $
       zipWith enumFromTo a100484_list (tail a100484_list)
    -- Reinhard Zumkeller, Apr 27 2012
    
  • Mathematica
    isolatedQ[p_] := p == NextPrime[2*NextPrime[p/2, -1]] && p == NextPrime[2*NextPrime[p/2], -1]; Select[Prime /@ Range[300], isolatedQ] (* Jean-François Alcover, Nov 29 2012, after M. F. Hasler *)
  • PARI
    is_A166251(n)={n==nextprime(2*precprime(n\2)) & n==precprime(2*nextprime(n/2))}  \\ M. F. Hasler, Oct 05 2012

Extensions

Edited by N. J. A. Sloane, Oct 15 2009
More terms from Alois P. Heinz, Apr 26 2012
Given terms double-checked with new PARI code by M. F. Hasler, Oct 05 2012

A164333 Primes prime(k) such that all integers in the interval [(prime(k-1)+1)/2, (prime(k)-1)/2] are composite numbers.

Original entry on oeis.org

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

Views

Author

Vladimir Shevelev, Aug 13 2009

Keywords

Comments

Let p_k be the k-th prime. A prime p is in the sequence iff the interval of the form (2p_k, 2p_(k+1)), containing p, also contains a prime less than p. The sequence is connected with the following classification of primes: the first two primes 2,3 form a separate set of primes; let p >= 5 be in the interval (2p_k, 2p_(k+1)), then 1) if in this interval there are only primes greater than p, then p is called a right prime; 2) if in this interval there are only primes less than p, then p is called a left prime; 3) if in this interval there are primes both greater and less than p, then p is called a central prime; 4) if this interval does not contain other primes, then p is called an isolated prime. In particular, the right primes form sequence A166307, and all Ramanujan primes (A104272) greater than 2 are either right or central primes; the left primes form sequence A182365, and all Labos primes (A080359) greater than 3 are either left or central primes; the central primes form A166252 and the isolated primes form A166251. [Vladimir Shevelev, Oct 10 2009] [Sequence reference updated by Peter Munn, Jun 01 2023]
Disjoint union of A166252 and A182365. - Peter Munn, Jun 01 2023 [an edited version of a contribution by Vladimir Shevelev in 2009]

Examples

			Let p=53. We see that 2*23<53<2*29. Since the interval (46, 58) contains prime 47<53 and does not contain any prime more than 53, then, by the considered classification 53 is left prime and it is in the sequence. [_Vladimir Shevelev_, Oct 10 2009]
		

Crossrefs

Programs

  • Maple
    isA164333 := proc(n)
            local i ;
            if isprime(n) and n > 3 then
                    for i from (prevprime(n)+1)/2 to (n-1)/2 do
                            if isprime(i) then
                                    return false;
                            end if;
                    end do;
                    return true;
            else
                    false;
            end if;
    end proc:
    for i from 2 to 700 do
            if isA164333(i) then
                    printf("%d,",i);
            end if;
    end do: # R. J. Mathar, Oct 29 2011
  • Mathematica
    kmax = 200; Select[Table[{(Prime[k - 1] + 1)/2, (Prime[k] - 1)/2}, {k, 3, kmax}], AllTrue[Range[#[[1]], #[[2]]], CompositeQ]&][[All, 2]]*2 + 1 (* Jean-François Alcover, Nov 14 2017 *)

Formula

{A080359} union {A164294} = {this sequence} union {2,3}. - Vladimir Shevelev, Oct 29 2011
A164368(2)A164368(3)A164368(4)Vladimir Shevelev, Oct 10 2009]

Extensions

Definition rephrased by R. J. Mathar, Oct 02 2009

A164554 Ramanujan primes A104272(n) for which A104272(n) = A080359(n).

Original entry on oeis.org

2, 71, 101, 181, 239, 241, 269, 349, 373, 409, 419, 433, 439, 491, 593, 599, 601, 607, 647, 653, 659, 823, 827, 857, 947, 1021, 1031, 1061, 1063, 1091, 1103, 1301, 1427, 1429, 1447, 1451, 1489, 1553, 1559, 1567, 1601, 1607, 1609, 1789, 1867, 1871, 1913, 1999, 2003
Offset: 1

Views

Author

Vladimir Shevelev, Aug 15 2009

Keywords

Comments

For every n>=1, A104272(n) >= A080359(n), and the sequence shows where the inequality becomes an equality.
Let prime(m) < a(n)/2 < prime(m+1); then there exist primes p
For example, a(2) = 71, 31 < a(2)/2 < 37 and intervals (62,71), (71,74) contain the primes p = 67 and q = 73 respectively.
Let us call a prime p compatible with another prime q, if the intervals (p/2,q/2) and (p,q], if q>p, (or intervals (q/2,p/2) and (q,p], if qVladimir Shevelev, Apr 25 2012]

Examples

			a(2)=71, such that 31<71/2<37, and we see that p=67 is in interval (62, 71) and q=73 is in interval (71, 74).
		

Programs

  • Mathematica
    nn = 200; t = Table[0, {nn+1}]; s = 0;
    Do[If[PrimeQ[k], s++]; If[PrimeQ[k/2], s--]; If[s <= nn && t[[s+1]] == 0, t[[s+1]] = k], {k, Prime[3nn]}
    ];
    A080359 = Rest[t];
    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[3nn]}
    ];
    A104272 = R+1;
    Intersection[A104272, A080359] (* Jean-François Alcover, Oct 28 2018, after T. D. Noe in A104272 *)

Formula

All solutions of the equation A104272(x)=A080359(x) are x=pi(a(n))-pi(a(n)/2). - Vladimir Shevelev, Apr 25 2012

Extensions

Terms beyond 659 from R. J. Mathar, Dec 17 2009

A195270 3-gap primes: Prime p is a term iff there is no prime between 3*p and 3*q, where q is the next prime after p.

Original entry on oeis.org

71, 107, 137, 281, 347, 379, 443, 461, 557, 617, 641, 727, 809, 827, 853, 857, 991, 1031, 1049, 1091, 1093, 1289, 1297, 1319, 1433, 1489, 1579, 1607, 1613, 1697, 1747, 1787, 1867, 1871, 1877, 1931, 1987, 1997, 2027, 2237, 2269, 2309, 2377, 2381, 2473, 2591
Offset: 1

Author

Vladimir Shevelev, Sep 14 2011

Keywords

Comments

For a real r>1, a prime p is called an r-gap prime, if there is no prime between r*p and r*q, where q is the next prime after p. In particular, 2-gap primes are in A080192.
In many cases, q=p+2. E.g., among first 1000 terms there are 509 such cases. - Zak Seidov, Jun 29 2015

Programs

  • Maple
    filter:= p -> isprime(p) and nextprime(3*p)>3*nextprime(p):
    select(filter, [2,seq(2*i+1,i=1..2000)]); # Robert Israel, Jun 29 2015
  • Mathematica
    pQ[p_, r_] := Block[{q = NextPrime@ p}, Union@ PrimeQ@ Range[r*p, r*q] == {False}]; Select[ Prime@ Range@ 380, pQ[#, 3] &] (* Robert G. Wilson v, Sep 18 2011 *)
    k = 3; p = 71; Reap[Do[While[NextPrime[k*p] < k*(q = NextPrime[p]), p = q]; Sow[p]; p = q, {1000}]][[2, 1]] (* for first 1000 terms. - Zak Seidov, Jun 29 2015 *)
    Prime/@SequencePosition[PrimePi[3*Prime[Range[400]]],{x_,x_}][[;;,1]] (* Harvey P. Dale, Nov 29 2023 *)

A166252 Primes which are not the smallest or largest prime in an interval of the form (2*prime(k),2*prime(k+1)).

Original entry on oeis.org

71, 101, 109, 151, 181, 191, 229, 233, 239, 241, 269, 283, 311, 349, 373, 409, 419, 433, 439, 491, 571, 593, 599, 601, 607, 643, 647, 653, 659, 683, 727, 823, 827, 857, 941, 947, 991, 1021, 1031, 1033, 1051, 1061, 1063, 1091, 1103, 1301, 1373, 1427, 1429
Offset: 1

Author

Vladimir Shevelev, Oct 10 2009, Oct 14 2009

Keywords

Comments

Called "central primes" in A166251, not to be confused with the central polygonal primes A055469.
The primes tabulated in intervals (2*prime(k),2*prime(k+1)) are
5, k=1
7, k=2
11,13, k=3
17,19, k=4
23, k=5
29,31, k=6
37, k=7
41,43, k=8
47,53, k=9
59,61, k=10
67,71,73, k=11
79, k=12
83, k=13
89, k=14
97,101,103, k=15
and only rows with at least 3 primes contribute primes to the current sequence.
For n >= 2, these are numbers of A164368 which are in A194598. - Vladimir Shevelev, Apr 27 2012

Examples

			Since 2*31 < 71 < 2*37 and the interval (62, 74) contains prime 67 < 71 and prime 73 > 71, then 71 is in the sequence.
		

Programs

  • Mathematica
    n = 0; t = {}; While[Length[t] < 100, n++; ps = Select[Range[2*Prime[n], 2*Prime[n+1]], PrimeQ]; If[Length[ps] > 2, t = Join[t, Rest[Most[ps]]]]]; t (* T. D. Noe, Apr 30 2012 *)

A166307 The smallest prime in some interval of the form (2*prime(k),2*prime(k+1)) if this interval contains at least 2 primes.

Original entry on oeis.org

11, 17, 29, 41, 47, 59, 67, 97, 107, 127, 137, 149, 167, 179, 197, 227, 263, 281, 307, 347, 367, 401, 431, 461, 487, 503, 521, 569, 587, 617, 641, 677, 719, 739, 751, 769, 809, 821, 853, 881, 907, 937, 967, 983, 1009, 1019, 1049, 1087, 1097, 1117, 1151, 1163, 1187, 1217, 1229, 1249, 1277
Offset: 1

Author

Vladimir Shevelev, Oct 11 2009, Oct 17 2009

Keywords

Comments

These are called "right primes" in A166251.

Examples

			For p=29 we have: 2*13 < 29 < 2*17 and interval (26, 29) is free from primes while interval (29, 34) contains a prime. Therefore 29 is in the sequence for k=6.
		

Programs

  • Mathematica
    f[n_] := Block[{t = Select[ Table[i, {i, 2 Prime[n], 2 Prime[n + 1]}], PrimeQ]}, If[ Length@ t > 1, t[[1]], 0]]; Rest@ Union@ Array[f, 115] (* Robert G. Wilson v, May 08 2011 *)
Showing 1-10 of 27 results. Next