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-3 of 3 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

A336298 Greatest prime < prime(n)/2.

Original entry on oeis.org

2, 3, 5, 5, 7, 7, 11, 13, 13, 17, 19, 19, 23, 23, 29, 29, 31, 31, 31, 37, 41, 43, 47, 47, 47, 53, 53, 53, 61, 61, 67, 67, 73, 73, 73, 79, 83, 83, 89, 89, 89, 89, 97, 97, 103, 109, 113, 113, 113, 113, 113, 113, 127, 131, 131, 131, 137, 139, 139, 139, 151, 151
Offset: 3

Views

Author

Clark Kimberling, Nov 16 2020

Keywords

Comments

The n-th prime appears A102820(n) times. - Flávio V. Fernandes, Apr 08 2021
A080191 lists the distinct terms of this sequence. - Flávio V. Fernandes, Jun 19 2021

Examples

			Prime(3)/2 = 2.5, so a(3) = 2.
		

Crossrefs

Programs

  • Mathematica
    z = 120; t = Table[NextPrime[Prime[n]/2], {n, 3, z}]; (* A039734, A079953 *)
    u = NextPrime[t, -1]  (* A336298 *)
    t - u (* A336299 *)
    Table[NextPrime[Prime[n]/2, -1], {n, 3, 80}] (* Wesley Ivan Hurt, Nov 26 2020 *)
  • PARI
    a(n) = precprime(prime(n)/2); \\ Michel Marcus, Nov 16 2020
    
  • Python
    from sympy import prime, prevprime
    def A336298(n):
        return prevprime(prime(n)//2+1) # Chai Wah Wu, Nov 26 2020

Formula

a(n) = A151799(A000040(n)/2) for n >= 3. - Wesley Ivan Hurt, Nov 26 2020

A080190 Smallest prime p such that n applications of f lead form p to 2, where f is the mapping of primes > 2 to primes defined by A052248.

Original entry on oeis.org

2, 3, 5, 7, 13, 23, 43, 83, 163, 317, 631, 1259, 2503, 5003, 9973, 19937, 39869, 119617, 239233, 480023, 960031, 1920049, 3840091, 7680181, 15360361, 30720719, 61441379, 122882741, 245765449, 491530873, 983061713, 1966123417
Offset: 0

Views

Author

Klaus Brockhaus, Feb 10 2003

Keywords

Comments

RECORDS transform of A080189; prime p sets a new record for the number of applications of f that are required to reach 2. - a(n) = prime preceding 2*a(n-1) as long as a(n-1) is a term of A080191; if however a(n-1) is a term of A080192, then a(n) > 2*a(n-1). - Next term a(32) > 3932600000, presumably a(32) = 5274863189, a(33) = 10549726367. - The sequence coincides with A006992 (Bertrand primes: a(n) is largest prime < 2*a(n-1)) for the first 17 terms; first divergence occurs after term 39869 because this is the first term which belongs to A080192.

Examples

			f(23) = 13, f(13) = 7, f(7) = 5, f(5) = 3, f(3) = 2; five applications of f are required to reach 2 and for all primes < 23 at most four applications are required, so a(5) = 23.
		

Crossrefs

Formula

f^n(p) = 2.
Showing 1-3 of 3 results.