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.

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