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.

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

A104380 Smallest prime p(i) such that between 2p(i) and 2p(i+1) there exist n primes.

Original entry on oeis.org

59, 2, 5, 31, 89, 509, 113, 1129, 1951, 7253, 19609, 16141, 13339, 28229, 1327, 281431, 396733, 1122287, 461717, 370261, 2010733, 492113, 3279841, 14246971, 3117299, 5826001, 20831323, 47326693, 60487759, 189695659, 191912783, 1301171033, 2044207843, 3129752191, 476956933, 836806669, 2433630109
Offset: 0

Views

Author

Ali A. Tanara (tanara(AT)khayam.ut.ac.ir) and Robert G. Wilson v, Mar 03 2005

Keywords

Examples

			a(0)=59 because between 2*59=118 and 2*61=122 there are no primes and 59 is the least prime with this characteristic.
a(4)=89 because between 2*89=178 and 2*97=194 there are 4 primes, namely 179, 181, 191 and 193.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := PrimePi[2Prime[n + 1]] - PrimePi[2Prime[n]]; t = Table[0, {30}]; Do[a = f[n]; If[t[[a + 1]] == 0, t[[a + 1]] = Prime[n]], {n, 2500000}]; t
  • PARI
    ct(a,b)=sum(k=a,b,isprime(k))
    a(n)=my(p=2); forprime(q=3,, if(ct(2*p+1,2*q-1)==n, return(p)); p=q) \\ Charles R Greathouse IV, Nov 05 2017

Extensions

a(27)-a(36) from Charles R Greathouse IV, Nov 05 2017

A215237 Least number k for which primepi(prime(k+1)/2) - primepi(prime(k)/2) = n.

Original entry on oeis.org

1, 2, 30, 259, 429, 4612, 26466, 88110, 31545, 104071, 2775456, 14614604, 15793779, 164082567, 476853784, 495207013, 3613011290, 9032608100, 69827848342
Offset: 0

Views

Author

T. D. Noe, Oct 09 2012

Keywords

Comments

See A215238 and A215239 for prime(a(n)) and the next prime.
Equivalently stated, a(n) is least k such that there are exactly n primes between prime(k)/2 and prime(k+1)/2. - Peter Munn, May 20 2019

Examples

			For n = 2, the consecutive primes are 113 and 127; there are two primes between 56.5 and 63.5.  For n = 3, the consecutive primes are 1637 and 1657; there are three primes between 818.5 and 828.5.
		

Crossrefs

Programs

  • Mathematica
    t = Table[PrimePi[Prime[n+1]/2] - PrimePi[Prime[n]/2], {n, 100000}]; Flatten[Table[Position[t, n, 1, 1], {n, 0, 8}]]

Extensions

a(14)-a(18) from Donovan Johnson, Oct 13 2012

A215239 Prime number following prime(A215237).

Original entry on oeis.org

3, 5, 127, 1657, 2999, 44351, 305717, 1133131, 370373, 1357333, 46006967, 268119667, 291057563, 3429782399, 10502593369, 10926444847, 87241771051, 226751019863, 1901687257829
Offset: 0

Views

Author

T. D. Noe, Oct 11 2012

Keywords

Comments

We use offset 0 because A215237 uses that offset.

Crossrefs

Programs

  • Mathematica
    t = Table[PrimePi[Prime[n + 1]/2] - PrimePi[Prime[n]/2], {n, 100000}]; t2 = Flatten[Table[Position[t, n, 1, 1], {n, 0, 8}]]; NextPrime[Prime[t2]]

Extensions

a(14)-a(18) from Donovan Johnson, Oct 13 2012
Showing 1-4 of 4 results.