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.

A051635 Weak primes: prime(n) < (prime(n-1) + prime(n+1))/2.

Original entry on oeis.org

3, 7, 13, 19, 23, 31, 43, 47, 61, 73, 83, 89, 103, 109, 113, 131, 139, 151, 167, 181, 193, 199, 229, 233, 241, 271, 283, 293, 313, 317, 337, 349, 353, 359, 383, 389, 401, 409, 421, 433, 443, 449, 463, 467, 491, 503, 509, 523, 547, 571, 577, 601, 619, 643, 647
Offset: 1

Views

Author

Felice Russo, Nov 15 1999

Keywords

Comments

Primes prime(n) such that prime(n)-prime(n-1) < prime(n+1)-prime(n). - Juri-Stepan Gerasimov, Jan 01 2011
a(n) < A051634(n). a(n) ~ 2*prime(n). - Thomas Ordowski, Jul 25 2012
The inequality above is false. The least counterexample is a(19799) = 496291 > A051634(19799) = 496283. - Amiram Eldar, Nov 26 2023
Erdős called a weak prime an "early prime." He conjectured that there are infinitely many consecutive pairs of early primes, and offered $100 for a proof and $25000 for a disproof (Kuperberg 1992). See A229832 for a stronger conjecture. - Jonathan Sondow, Oct 13 2013

Examples

			7 belongs to the sequence because 7 < (5+11)/2.
		

References

  • A. Murthy, Smarandache Notions Journal, Vol. 11 N. 1-2-3 Spring 2000

Crossrefs

Subsequence of A178943.
Cf. A225495 (multiplicative closure).

Programs

  • Haskell
    a051635 n = a051635_list !! (n-1)
    a051635_list = g a000040_list where
       g (p:qs@(q:r:ps)) = if 2 * q < (p + r) then q : g qs else g qs
    -- Reinhard Zumkeller, May 09 2013
  • Mathematica
    Transpose[Select[Partition[Prime[Range[10^2]], 3, 1], #[[2]]<(#[[1]]+#[[3]])/2 &]][[2]] (* Vladimir Joseph Stephan Orlovsky, May 01 2008 *)
    p=Prime[Range[200]]; p[[Flatten[1+Position[Sign[Differences[p, 2]], 1]]]]
  • PARI
    p=2;q=3;forprime(r=5,1e3,if(2*qCharles R Greathouse IV, Jul 25 2011
    

Formula

a(1) = A229832(1). - Jonathan Sondow, Oct 13 2013
Conjecture: Limit_{n->oo} n / PrimePi(a(n)) = 1/2. - Alain Rocchelli, Mar 17 2024

Extensions

More terms from James Sellers

A051634 Strong primes: prime(k) > (prime(k-1) + prime(k+1))/2.

Original entry on oeis.org

11, 17, 29, 37, 41, 59, 67, 71, 79, 97, 101, 107, 127, 137, 149, 163, 179, 191, 197, 223, 227, 239, 251, 269, 277, 281, 307, 311, 331, 347, 367, 379, 397, 419, 431, 439, 457, 461, 479, 487, 499, 521, 541, 557, 569, 587, 599, 613, 617, 631, 641, 659, 673, 701
Offset: 1

Views

Author

Felice Russo, Nov 15 1999

Keywords

Comments

Prime(k) such that prime(k) - prime(k-1) > prime(k+1) - prime(k). - Juri-Stepan Gerasimov, Jan 01 2011
a(n) > A051635(n). - Thomas Ordowski, Jul 25 2012
The inequality above is false. The least counterexample is a(19799) = 496283 < A051635(19799) = 496291. - Amiram Eldar, Nov 26 2023
Conjecture: Limit_{N->oo} Sum_{n=1..N} (NextPrime(a(n))-a(n)) / a(N) = 1/4. [A heuristic proof is available at www.primepuzzles.net - Conjecture 91] - Alain Rocchelli, Nov 14 2022
A131499 is a subsequence. - Davide Rotondo, Oct 16 2023

Examples

			11 belongs to the sequence because 11 > (7 + 13)/2.
		

References

  • A. Murthy, Smarandache Notions Journal, Vol. 11 N. 1-2-3 Spring 2000.

Crossrefs

Subsequence of A178943.
Cf. A225493 (multiplicative closure), A131499 (subsequence).

Programs

  • Haskell
    a051634 n = a051634_list !! (n-1)
    a051634_list = f a000040_list where
       f (p:qs@(q:r:ps)) = if 2 * q > (p + r) then q : f qs else f qs
    -- Reinhard Zumkeller, May 09 2013
    
  • Maple
    q:= n-> isprime(n) and 2*n>prevprime(n)+nextprime(n):
    select(q, [$3..1000])[];  # Alois P. Heinz, Jun 21 2023
  • Mathematica
    Transpose[Select[Partition[Prime[Range[10^2]], 3, 1], #[[2]]>(#[[1]]+#[[3]])/2 &]][[2]] (* Vladimir Joseph Stephan Orlovsky, May 01 2008 *)
    p=Prime[Range[200]]; p[[Flatten[1+Position[Sign[Differences[p,2]], -1]]]]
  • PARI
    p=2;q=3;forprime(r=5,1e4,if(2*q>p+r,print1(q", "));p=q;q=r) \\ Charles R Greathouse IV, Jul 19 2011
    
  • Python
    from sympy import nextprime
    def aupto(limit):
        alst, p, q, r = [], 2, 3, 5
        while q <= limit:
            if 2*q > p + r: alst.append(q)
            p, q, r = q, r, nextprime(r)
        return alst
    print(aupto(701)) # Michael S. Branicky, Nov 17 2021

Formula

Conjecture: Limit_{n->oo} n / PrimePi(a(n)) = 1/2. - Alain Rocchelli, Mar 17 2024

A158939 First primes followed by sequences of exactly n monotonic increasing prime gaps.

Original entry on oeis.org

3, 2, 17, 347, 2903, 15373, 128981, 1319407, 17797517, 94097537, 6927837557, 48486712783, 968068681511, 1472840004017, 129001208165717
Offset: 1

Views

Author

Alan Worley (aw(AT)xiboo.co.uk), Mar 31 2009

Keywords

Comments

For n > 1, a(n) is the prime preceding A229832(n-1). [Follows from the definitions] - Chris Boyd, Mar 28 2015
Banks, Freiberg, & Turnage-Butterbaugh show that a(n) exists for each n. - Charles R Greathouse IV, Jun 30 2022

Examples

			a(8)=1319407 is the first prime to be followed by n=8 monotonic increasing prime gaps: 4,8,10,14,16,18,32,34.
a(14)=1472840004017 is the first prime to be followed by n=14 monotonic increasing prime gaps: 2,4,6,8,10,12,14,28,30,38,48,64,66,74.
		

Crossrefs

Cf. A158940 (monotonic decreasing prime gaps), A229832.
Cf. A133697.

Programs

  • PARI
    is(p,k,g=0)=my(q=nextprime(p+1));if(g>=q-p,0,if(k>1,is(q,k-1,q-p),q-p>=nextprime(q+1)-q))
    a(n)=forprime(p=2,,if(is(p,n),return(p))) \\ Charles R Greathouse IV, Nov 02 2012

Extensions

a(15) from Giovanni Resta, Apr 19 2016

A054835 Second term of weak prime septet: p(m)-p(m-1) < p(m+1)-p(m) < p(m+2)-p(m+1) < p(m+3)-p(m+2) < p(m+4)-p(m+3) < p(m+5)-p(m+4).

Original entry on oeis.org

15377, 64921, 68209, 68899, 128983, 128987, 143513, 154081, 158003, 192377, 221719, 222389, 244463, 249727, 285289, 318679, 337279, 354373, 357829, 374177, 385393, 394729, 402583, 402587, 419599, 439163, 441913, 448379, 457399, 457673, 458191, 482509, 527983, 529813, 577531, 582763, 655913
Offset: 1

Views

Author

Henry Bottomley, Apr 10 2000

Keywords

Crossrefs

Cf. A054800 .. A054803: members of balanced prime quartets (= consecutive primes in arithmetic progression); A054804 .. A054818: members of strong prime quartet, quintet, sextet; A054819 .. A054840: members of weak prime quartet, quintet, sextet, septets.

Formula

a(1) = A229832(5). - Jonathan Sondow, Oct 13 2013
a(n) = A151800(A054834(n)) = A151799(A054836(n)), A151800 = nextprime, A151799 = prevprime; A054835 = { m = A054828(n) | m = nextprime(A054828(n-1)) }. - M. F. Hasler, Oct 27 2018

Extensions

More terms from M. F. Hasler, Oct 27 2018

A054824 Second term of weak prime quintets: p(m)-p(m-1) < p(m+1)-p(m) < p(m+2)-p(m+1) < p(m+3)-p(m+2).

Original entry on oeis.org

349, 677, 1429, 1489, 1621, 2207, 2239, 2689, 2909, 2917, 4093, 4129, 4933, 5573, 5927, 6271, 6473, 6703, 6829, 8089, 8171, 8233, 8933, 10333, 10733, 11779, 12109, 12281, 13469, 13477, 13903, 13907, 14083, 14629, 14657, 14951, 14957, 15077
Offset: 1

Views

Author

Henry Bottomley, Apr 10 2000

Keywords

Comments

a(1) = A229832(3). - Jonathan Sondow, Oct 13 2013

Crossrefs

Programs

  • Mathematica
    wpqQ[{a_,b_,c_,d_,e_}]:=b-aHarvey P. Dale, Jul 29 2019 *)

A054829 Second term of weak prime sextet: p(m)-p(m-1) < p(m+1)-p(m) < p(m+2)-p(m+1) < p(m+3)-p(m+2) < p(m+4)-p(m+3).

Original entry on oeis.org

2909, 13469, 13903, 14951, 15377, 15383, 21401, 21559, 21863, 28279, 30871, 33203, 35593, 37693, 42223, 42571, 45823, 55663, 64663, 64921, 64927, 68209, 68213, 68899, 68903, 73943, 74203, 78583, 83093, 85517, 87317, 88003, 90911
Offset: 1

Views

Author

Henry Bottomley, Apr 10 2000

Keywords

Comments

a(1) = A229832(4). - Jonathan Sondow, Oct 13 2013

Crossrefs

Programs

  • Mathematica
    wps[{a_,b_,c_,d_,e_,f_}]:=b-aHarvey P. Dale, Jun 25 2013 *)

A054820 Second term of weak prime quartet: p(m)-p(m-1) < p(m+1)-p(m) < p(m+2)-p(m+1).

Original entry on oeis.org

19, 43, 83, 109, 229, 283, 313, 349, 353, 383, 401, 443, 463, 503, 571, 643, 677, 683, 829, 859, 883, 911, 1033, 1063, 1093, 1193, 1231, 1279, 1303, 1321, 1373, 1429, 1433, 1453, 1489, 1493, 1553, 1609, 1621, 1627, 1699, 1879, 1999, 2029, 2089, 2161
Offset: 1

Views

Author

Henry Bottomley, Apr 10 2000

Keywords

Comments

Lesser of a pair p(m), p(m+1) of consecutive weak primes A051635. See A229832 for more comments, references and links. - Jonathan Sondow, Oct 13 2013
a(1) = A229832(2). - Jonathan Sondow, Oct 13 2013

Crossrefs

A235874 First term of the earliest sequence of n consecutive strong primes.

Original entry on oeis.org

11, 37, 1657, 1847, 74687, 322193, 5051341, 11938853, 245333213, 397597169, 130272314657, 1273135176871
Offset: 1

Views

Author

Giovanni Resta, Jan 16 2014

Keywords

Comments

A strong prime is a prime p(n) such that p(n) > (p(n-1) + p(n+1))/2.

Examples

			a(2) = 37 because the two consecutive primes 37 and 41 are both strong and are the first such pair.
		

Crossrefs

Showing 1-8 of 8 results.