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.

A195325 Least n-gap prime: a(n) = least prime p for which there is no prime between n*p and n*q, where q is the next prime after p.

Original entry on oeis.org

2, 59, 71, 29, 59, 149, 191, 641, 149, 347, 809, 461, 3371, 1487, 857, 1301, 1877, 5849, 4721, 9239, 4271, 1619, 1481, 20507, 20981, 32117, 13337, 19379, 24977, 48779, 20441, 25301, 5651, 37991, 17747, 43577, 176777, 145757, 191249, 84809, 150209, 11717
Offset: 1

Views

Author

Vladimir Shevelev, Sep 15 2011

Keywords

Comments

Such a prime always exists.
The sequence is unbounded.
Conjecture. For n >= 2, a(n) is a lesser of twin primes (A001359). This implies the twin prime conjecture. - Vladimir Shevelev, Sep 15 2011
If a member of this sequence is not the lesser of a twin prime pair, it is greater than 10^10. - Charles R Greathouse IV, Sep 15 2011
A dual sequence: b(n)= least prime p for which there is no prime between n*q and n*p, where q is the previous prime before p. Evidently, b(n) is the next prime after a(n): 3,61,73,31,..., and for n>=2, by the same conjecture, b(n) is a greater of twin primes.

Crossrefs

Programs

  • Maple
    a:= proc(n) local p, q;
          p:= 2; q:= nextprime(p);
          while nextprime(n*p) < (n*q) do
            p, q:= q, nextprime(q)
          od; p
        end:
    seq (a(n), n=1..25); # Alois P. Heinz, Sep 15 2011
  • Mathematica
    pQ[p_, r_] := Block[{q = NextPrime[p]},NextPrime[r*p]> r*q]; f[n_] := Block[{p = 2}, While[ !pQ[p, n], p = NextPrime[p]]; p]; f[1] = 2; Array[f, 42] (* Robert G. Wilson v, Sep 18 2011 *) (* Revised by Zak Seidov, Sep 19 2011 *)

A080192 Complement of A080191 relative to A000040. Prime p is a term iff there is no prime between 2*p and 2*q, where q is the next prime after p.

Original entry on oeis.org

59, 71, 101, 107, 149, 263, 311, 347, 461, 499, 521, 569, 673, 757, 821, 823, 857, 881, 883, 907, 967, 977, 1009, 1061, 1091, 1093, 1151, 1213, 1279, 1283, 1297, 1301, 1319, 1433, 1487, 1489, 1493, 1549, 1571, 1597, 1619, 1667, 1697, 1721, 1787, 1871, 1873
Offset: 1

Views

Author

Klaus Brockhaus, Feb 10 2003

Keywords

Comments

From Peter Munn, Oct 19 2017: (Start)
This is also a list of the leaf node labels in the tree of primes described in A290183.
For k > 0, the earliest run of k adjacent primes in this sequence starts with the least prime greater than A215238(k+1)/2. Thus we see that A215238(3) = 1637 corresponds to 821 followed by 823 being the first run of 2 adjacent primes in this sequence.
(End)
From Peter Munn, Nov 02 2017: (Start)
If p is in A005384 (a Sophie Germain prime), 2p+1 is therefore a prime, so p cannot be in this sequence. Similarly, any prime p in A023204 has a corresponding prime 2p+3, which (if p>2) likewise implies its absence (and if p=2 it is in A005384).
If p is the lesser of twin primes it is in this sequence if it is neither Sophie Germain nor in A023204.
Conjecture: a(n)/A000040(n) is asymptotic to 3. Reason: I expect the distribution of terms in A102820 to converge to a geometric distribution with mean value 2.
(End)

Examples

			59 is a term since 113 is the prime preceding 2*59, 127 is the next prime and 61 is the largest of all prime factors of 114, ..., 122 = 2*61, ..., 126.
		

Crossrefs

A080191 is the complement of this sequence relative to A000040.
Sequences with related analysis: A005384, A023204, A052248, A102820, A215238, A290183.
Sequences with similar definitions: A195270, A195271, A195325, A195377.

Programs

  • Mathematica
    Select[Prime[Range[300]],NextPrime[2#]>2NextPrime[#]&] (* Harvey P. Dale, Jul 07 2011 *)
  • NARS2000
    ¯1↓b/⍨(1⌽a)<1πa←2×b←¯2π⍳1E4 ⍝ Michael Turniansky, Dec 29 2020
  • PARI
    {forprime(k=2,1873,p=precprime(2*k); q=nextprime(p+1); m=0; for(j=p+1,q-1,f=factor(j); a=f[matsize(f)[1],1]; if(m
    				
  • PARI
    isok(p) = isprime(p) && (primepi(2*p) == primepi(2*nextprime(p+1)));
    forprime(p=2, 2000, if (isok(p), print1(p, ", "))) \\ Michel Marcus, Sep 22 2017
    
  • PARI
    first(n) = my(res = vector(n), i = 0); {n==0&&return([]); forprime(p = 2, , if(nextprime(2*p) > 2*nextprime(p + 1), i++; res[i] = p; if(i == n, return(res))))} \\ David A. Corneth, Oct 25 2017
    

Formula

For all k, prime(k) = A000040(k) is a term if and only if A102820(k) = 0. - Peter Munn, Oct 24 2017

A195377 2.5-gap primes: Prime p is a term if there is no prime between 2.5*p and 2.5*q, where q is the next prime after p.

Original entry on oeis.org

127, 197, 281, 311, 347, 431, 613, 659, 673, 739, 877, 991, 1049, 1229, 1277, 1289, 1367, 1481, 1579, 1613, 1667, 1721, 1787, 1877, 1907, 2027, 2081, 2087, 2141, 2203, 2213, 2237, 2239, 2269, 2287, 2309, 2377, 2383, 2473, 2657, 2689, 2707, 2749, 2767, 2801
Offset: 1

Views

Author

Vladimir Shevelev, Sep 17 2011

Keywords

Crossrefs

Programs

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

A218769 Let (p,p+2) be the n-th twin prime pair. a(n) is the least integer r > 1 for which the interval (r*p, r*(p+2)) contains no primes, or a(n)=0, if no such r exists.

Original entry on oeis.org

0, 0, 0, 0, 4, 0, 2, 2, 2, 2, 3, 2, 5, 5, 4, 5, 4, 4, 3, 2, 2, 4, 4, 2, 2, 2, 6, 3, 3, 4, 3, 2, 3, 2, 2, 7, 3, 3, 2, 2, 2, 6, 0, 3, 2, 2, 5, 5, 23, 2, 3, 2, 2, 2, 2, 2, 2, 2, 3, 2, 2, 3, 2, 5, 2
Offset: 1

Views

Author

Keywords

Comments

For n<=20000, the largest a(n) is a(49)=23. a(n)=0 for n = 1, 2, 3, 4, 6, 43, 37890, 606457, ... corresponding to the twin primes (p, p+2) with p=3, 5, 11, 17, 41, 1277, 5995727, 143556431, ....

Examples

			The 13th twin prime pair is {179, 181}. For r = 2 the range {358, ..., 362} contains prime 359; for r = 3, the range {537, ..., 543} contains prime 541; for r = 4, the range {716, ..., 724} contains prime 719. But for r = 5, the range {895, ..., 905} does not contain any prime. Thus a(13) = 5.
		

Crossrefs

Programs

  • Mathematica
    rmax = 100; p1[1] = 3; p1[n_] := p1[n] = (p = NextPrime[p1[n-1]]; While[ !PrimeQ[p+2], p = NextPrime[p]]; p); a[n_] := Catch[ For[r = 2, r <= rmax, r++, If[ PrimePi[r*p1[n]] == PrimePi[r*(p1[n] + 2)], Throw[r], If[r == rmax, Throw[0]]]]]; Table[ a[n] , {n, 1, 65}] (* Jean-François Alcover, Dec 13 2012 *)

Extensions

Typo in definition corrected by Jonathan Sondow, Dec 21 2012

A195329 Records of A195325.

Original entry on oeis.org

2, 59, 71, 149, 191, 641, 809, 3371, 5849, 9239, 20507, 20981, 32117, 48779, 176777, 191249, 204509, 211061, 223679, 245129, 358877, 654161, 2342771, 3053291, 4297961, 4755347, 6750221, 8019509, 9750371, 10196759, 11237981, 23367077, 34910219, 93929219, 186635747
Offset: 1

Views

Author

Vladimir Shevelev, Sep 15 2011

Keywords

Comments

The sequence is infinite. Conjecture. For n>=2, all terms are in A001359. This conjecture (weaker than the conjecture in comment to A195325) also implies the twin prime conjecture.

Crossrefs

A195379 3.5-gap primes: Primes prime(k) such that there is no prime between 7*prime(k)/2 and 7*prime(k+1)/2.

Original entry on oeis.org

2, 137, 281, 521, 641, 883, 937, 1087, 1151, 1229, 1277, 1301, 1489, 1567, 1607, 1697, 2027, 2081, 2237, 2381, 2543, 2591, 2657, 2687, 2729, 2801, 2851, 2969, 3119, 3257, 3301, 3359, 3463, 3467, 3529, 3673, 3733, 3793, 3821, 3851, 4073, 4217, 4229, 4241, 4259, 4283, 4337, 4421, 4481
Offset: 1

Views

Author

Vladimir Shevelev, Sep 17 2011

Keywords

Crossrefs

Programs

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

Extensions

Corrected by R. J. Mathar, Sep 20 2011

A218561 4-gap primes: Prime p is a term iff there is no prime between 4*p and 4*nextprime(p), where nextprime=A151800.

Original entry on oeis.org

29, 71, 137, 197, 239, 269, 347, 419, 431, 641, 659, 809, 821, 1061, 1091, 1151, 1289, 1489, 1607, 1721, 1783, 1877, 1949, 1993, 2083, 2141, 2267, 2339, 2381, 2389, 2549, 2729, 2801, 2833, 2969, 2999, 3019, 3041, 3217, 3253, 3299, 3329, 3389, 3461
Offset: 1

Views

Author

Keywords

Examples

			29 is in the sequence since there are no primes in the interval(4*29,4*31)=(116,124)
		

Crossrefs

Programs

A195465 The first a(n) n-gap primes are lessers of twin primes, a(n) maximal.

Original entry on oeis.org

0, 5, 5, 17, 5, 6, 14, 6, 24, 75, 2, 4, 27, 11, 48, 50, 46, 9, 21, 7, 16, 137, 4, 55, 85, 14, 111, 24, 102, 291, 67, 89, 155, 180, 137, 330, 127, 413, 250, 241, 332, 619, 139, 234, 453, 929, 94, 160, 169, 22, 131, 434
Offset: 1

Views

Author

Vladimir Shevelev, Sep 19 2011

Keywords

Comments

For definition of n-gap primes, see comment to A195270.
Conjecture: a(n)>0 for n>1. This conjecture is equivalent to the conjecture that all terms of A195325 are lessers of twin primes.

Crossrefs

Programs

  • Maple
    a:= proc(n) local i, p, q;
          p, q:= 2, 3;
          for i from 0 do
            while nextprime(n*p) < (n*q) do
              p, q:= q, nextprime(q)
            od;
            if not isprime(p+2) then return i fi;
            p, q:= q, nextprime(q)
          od
        end:
    seq(a(n), n=1..20);  # Alois P. Heinz, Sep 20 2011
  • Mathematica
    a[n_] := a[n] = Module[{i, p = 2, q = 3}, For[i = 0, True, i++, While[NextPrime[n p] < n q, p = q; q = NextPrime[q]]; If[!PrimeQ[p+2], Return[i]]; p = q; q = NextPrime[q]]];
    Array[a, 20] (* Jean-François Alcover, Nov 21 2020, after Alois P. Heinz *)
Showing 1-8 of 8 results.