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

A182405 Records of A164368(n) - A194598(n).

Original entry on oeis.org

0, 8, 10, 24, 28, 34, 46, 52, 58, 66, 78, 80, 94, 96, 126, 134, 162, 166, 180, 208, 240, 258, 270
Offset: 1

Views

Author

Vladimir Shevelev, Apr 27 2012

Keywords

Comments

Theorem. If in the intervals {(A194598(n), A164368(n))} with lengths a(n)-1 the number of primes is unbounded, then there exist arbitrarily long sequences of consecutive primes p_k, p_(k+1),...,p_m such that every interval (p_i/2, p_(i+1)/2), i=k,k+1,...,m-1, contains a prime.

Crossrefs

A182423 Number of primes in interval (A194598(n), A164368(n)).

Original entry on oeis.org

0, 2, 0, 1, 1, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 2, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 3, 0, 1, 0, 3, 0, 0, 0, 0, 0, 2, 2, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 2, 0, 0, 0, 1, 2, 0, 0, 0, 1, 0, 2, 1, 2, 0, 0, 0, 1, 0, 0
Offset: 1

Views

Author

Vladimir Shevelev, Apr 28 2012

Keywords

Comments

Theorem. If the sequence is unbounded, then there exist arbitrarily long sequences of consecutive primes p_k, p_(k+1),...,p_m such that every interval (p_i/2, p_(i+1)/2), i=k,k+1,...,m-1, contains a prime.

Crossrefs

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

A193507 Ramanujan primes of the second kind: a(n) is the smallest prime such that if prime 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, 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
Offset: 1

Views

Author

Vladimir Shevelev, Aug 18 2011

Keywords

Comments

Apparently A168425 and the 2. - R. J. Mathar, Aug 25 2011
An odd prime p is in the sequence iff the previous prime is Ramanujan. The Ramanujan primes and the Ramanujan primes of the second kind are the mutually wrapping up sequences: a(1)<=R_1<=a(2)<=R_2<=a(3)<=R_3<=.... . - Vladimir Shevelev, Aug 29 2011
All terms of the sequence are in A194598. - Vladimir Shevelev, Aug 30 2011

Examples

			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.
		

Crossrefs

Cf. A104272 (Ramanujan primes).

Programs

  • Mathematica
    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 *)

Formula

A080359(n) <= a(n) <= A104272(n) = R_n (Cf. A194184, A194186).
a(n)>p_(2*n-1); a(n)~p_{2n} (Cf. properties of R_n in A104272 and the above comment). - Vladimir Shevelev, Aug 28 2011

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

Views

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

Crossrefs

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

Views

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.
		

Crossrefs

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 *)

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

Original entry on oeis.org

2, 5, 17, 29, 41, 79, 101, 137, 149, 163, 191, 197, 227, 269, 281, 313, 349, 353, 461, 463, 521, 541, 569, 593, 599, 613, 617, 641, 757, 769, 809, 821, 827, 857, 881, 887, 941, 1009, 1049, 1061, 1087, 1093, 1097, 1117, 1151, 1223, 1229, 1277, 1279, 1289
Offset: 1

Views

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 form A080192 and 3-gap primes form A195270.

Crossrefs

Programs

  • Mathematica
    Select[Prime[Range[400]], PrimePi[3*NextPrime[#]/2] == PrimePi[3*#/2] &] (* T. D. Noe, Sep 14 2011 *)

A182426 Lengths of runs of consecutive isolated primes beginning with A166251(n).

Original entry on oeis.org

2, 1, 1, 1, 3, 2, 1, 1, 2, 1, 1, 1, 3, 2, 1, 1, 3, 2, 1, 2, 1, 2, 1, 4, 3, 2, 1, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 2, 1, 1, 1, 1, 2, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 1, 1, 1, 1, 2, 1, 4, 3, 2, 1, 1, 2, 1, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 1, 3, 2, 1, 2, 1, 1, 2, 1, 2, 1, 3, 2, 1
Offset: 1

Views

Author

Vladimir Shevelev, Apr 28 2012

Keywords

Comments

Theorem. If the sequence is unbounded, then there exist arbitrarily long sequences of consecutive primes p_k, p_(k+1),...,p_m such that every interval (p_i/2, p_(i+1)/2), i=k,k+1,...,m-1, contains a prime.

Crossrefs

Programs

  • Haskell
    import Data.List (group)
    a182426 n = a182426_list !! (n-1)
    a182426_list = concatMap f $ group $ zipWith (-) (tail ips) ips where
       f xs | head xs == 1 = reverse $ enumFromTo 2 $ length xs + 1
            | otherwise    = take (length xs) $ repeat 1
       ips = map a049084 a166251_list
    -- Reinhard Zumkeller, May 18 2012

Extensions

Data corrected: a(49)=2.

A194674 Positions of nonzero terms of A194659(n)-A194186(n+1), n>=1.

Original entry on oeis.org

20, 27, 73, 77, 85, 95, 106, 116, 117, 122, 125, 132, 137, 144, 145, 152, 162, 167, 168, 189, 191, 192, 193, 198, 201, 208, 213, 234, 235, 236, 243, 249, 258, 259, 265, 275, 279, 286, 287, 291, 318, 319, 321, 329, 330, 331, 340
Offset: 1

Views

Author

Vladimir Shevelev, Sep 01 2011

Keywords

Comments

The sequence (together with A194953) characterizes a right-left symmetry in the distribution of primes over intervals (2*p_n, 2*p_(n+1)), n=1,2,..., where p_n is the n-th prime.

Crossrefs

A229608 Square array read by antidiagonals downwards: each row starts with the least prime not in a previous row, and each prime p in a row is followed by the least prime > 2*p.

Original entry on oeis.org

2, 5, 3, 11, 7, 13, 23, 17, 29, 19, 47, 37, 59, 41, 31, 97, 79, 127, 83, 67, 43, 197, 163, 257, 167, 137, 89, 53, 397, 331, 521, 337, 277, 179, 107, 61, 797, 673, 1049, 677, 557, 359, 223, 127, 71, 1597, 1361, 2099, 1361, 1117, 719, 449, 257, 149, 73, 3203
Offset: 1

Views

Author

Clark Kimberling, Sep 26 2013

Keywords

Comments

Conjectures: (row 1) = A055496, (column 1) = A193507, and for each row r(k), the limit of r(k)/2^k exists. For rows 1 to 4, the respective limits are 1.569985..., 2.677285..., 8.230592..., 10.709142...; see Franklin T. Adams-Watters's comment at A055496.
The above conjecture row 1 = A055496 is true; additionally, row 2 = A065545; row 3 = A065546; the first 5 terms of row 6 are a contiguous subsequence of A064934; and column 1 = A194598. - Bob Selcoe, Oct 27 2015; corrected by Peter Munn, Jul 30 2017
The conjecture for column 1 is true iff A194598 and A193507 are equivalent. Is this the case? - Bob Selcoe, Oct 29 2015
Column 1 diverges from A193507 at A(14,1) = 113, a prime not in A193507. 113 is in column 1 as it does not follow a prime in a row: 107 follows 53 and 127 follows 59, the next prime after 53. - Peter Munn, Jul 30 2017

Examples

			Northwest corner:
    2    5   11   23   47   97  197
    3    7   17   37   79  163  331
   13   29   59  127  257  521 1049
   19   41   83  167  337  677 1361
   31   67  137  277  557 1117 2237
   43   89  179  359  719 1439 2879
   53  107  223  449  907 1823 3659
		

Crossrefs

Programs

  • Mathematica
    seqL = 14; arr2[1] = {2}; Do[AppendTo[arr2[1], NextPrime[2*Last[arr2[1]]]], {seqL}];
    Do[tmp = Union[Flatten[Map[arr2, Range[z]]]]; arr2[z] = {Prime[NestWhile[# + 1 &, 1, PrimePi[tmp[[#]]] - # == 0 &]]}; Do[AppendTo[arr2[z], NextPrime[2*Last[arr2[z]]]], {seqL}], {z, 2, 12}]; m = Map[arr2, Range[12]]; m // TableForm
    t = Table[m[[n - k + 1]][[k]], {n, 12}, {k, n, 1, -1}] // Flatten (* Peter J. C. Moses, Sep 26 2013 *)

Extensions

Incorrect comment deleted and example extended by Peter Munn, Jul 30 2017
Showing 1-10 of 14 results. Next