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

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

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

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

A182365 The largest 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

13, 19, 31, 43, 53, 61, 73, 103, 113, 131, 139, 157, 173, 193, 199, 251, 271, 293, 313, 353, 379, 421, 443, 463, 499, 509, 523, 577, 613, 619, 661, 691, 733, 743, 757, 773, 811, 829, 859, 883, 911, 953, 971, 997, 1013, 1039, 1069, 1093, 1109, 1123, 1153
Offset: 1

Views

Author

Vladimir Shevelev, Apr 26 2012

Keywords

Comments

These are called "left primes" in A166251.

Examples

			For k=6 we have 2*13 < 29 < 31 < 2*17, and the interval contains two primes. Therefore 31 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, AppendTo[t, ps[[-1]]]]]; t (* T. D. Noe, Apr 30 2012 *)

A166574 If p, q are successive primes, and there is a number k with p < k <= q such that r = p+k is a prime, then r is in the sequence.

Original entry on oeis.org

5, 7, 11, 17, 23, 29, 41, 47, 59, 67, 83, 89, 97, 107, 109, 127, 137, 149, 151, 167, 179, 181, 197, 227, 229, 233, 239, 257, 263, 281, 283, 307, 317, 337, 347, 349, 359, 367, 383, 389, 401, 409, 431, 433, 449, 461, 467, 479, 487, 491
Offset: 1

Views

Author

Vladimir Shevelev, Oct 17 2009

Keywords

Comments

The old definition was: Primes p>=5 with the property: if Prime(k)

If A(x) is the counting function of a(n) not exceeding x, then, in view of the symmetry, it is natural to conjecture that A(x)~pi(x)/2.

Examples

			Taking p=2, q=3, k=3 we get r=2+3=5, the first term.
Taking p=3, q=5, k=4 we get r=3+4=7, the second term.
From p=89, q=97 we can take both k=90 and k=92, getting the terms 89+90=179 and 89+92=181. - _Art Baker_, Mar 16 2019
		

Programs

  • Mathematica
    Reap[Do[p=Prime[n]; k=PrimePi[p/2]; If[p<=Prime[k]+Prime[k+1], Sow[p]], {n,3,PrimePi[1000]}]][[2,1]]
    Select[#[[1]]+Range[#[[1]]+1,#[[2]]],PrimeQ]&/@Partition[Prime[Range[60]],2,1]//Flatten (* Harvey P. Dale, Jul 02 2024 *)

Extensions

Extended by T. D. Noe, Dec 01 2010
Edited with simpler definition based on a suggestion from Art Baker. -N. J. A. Sloane, Mar 16 2019

A166575 Primes p>=5 with the property: if Prime(k)

=Prime(k)+ Prime(k+1).

Original entry on oeis.org

5, 13, 19, 31, 37, 43, 53, 61, 71, 73, 79, 101, 103, 113, 131, 139, 157, 163, 173, 191, 193, 199, 211, 223, 241, 251, 269, 271, 277, 293, 311, 313, 331, 353, 373, 379, 397, 419, 421, 439, 443, 457, 463, 499, 509, 521, 523, 541, 577, 601, 607, 613, 619, 631, 653, 659, 661, 673, 691
Offset: 1

Author

Vladimir Shevelev, Oct 17 2009

Keywords

Comments

If A(x) is the counting function of a(n) not exceeding x, then, in view of the symmetry, it is natural to conjecture that A(x)~pi(x)/2.

Examples

			Let p=13. Then we have 5<13/2<7. Since 13>5+7, then 13 is in the sequence.
		

Programs

  • Mathematica
    Reap[Do[p=Prime[n]; k=PrimePi[p/2]; If[p>=Prime[k]+Prime[k+1], Sow[p]], {n,3,PrimePi[1000]}]][[2,1]]

A166576 Intersection of A104272 and A166252.

Original entry on oeis.org

71, 101, 151, 181, 229, 233, 239, 241, 269, 311, 349, 373, 409, 419, 433, 439, 491, 571, 593, 599, 601, 607, 643, 647, 653, 659, 727, 823, 827, 857, 941, 947, 1021, 1031, 1051, 1061, 1063, 1091, 1103, 1301, 1373, 1427, 1429, 1447, 1451, 1489, 1553, 1559, 1567
Offset: 1

Author

Vladimir Shevelev, Oct 17 2009

Keywords

Comments

Each Ramanujan prime A104272 larger than 2 is either a central prime (A166272) or a right prime (A166307).

Extensions

Extended beyond 571 by R. J. Mathar, Oct 21 2009
Showing 1-8 of 8 results.