OFFSET
1,1
COMMENTS
This was originally formulated as (-prime(n) + 2*prime(n+1) - prime(n+2))/((1 - prime(n) + prime(n+1))^(3/2)) > 0, which relates it to other sequences. This is equivalent since the denominator is always positive.
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
EXAMPLE
The gap between 7 and the next prime, 11, is 4, which is greater than the next prime gap from 11 to 13, so 7 is in the sequence.
MATHEMATICA
d2[n_] = Prime[n + 2] - 2*Prime[n + 1] + Prime[n]; d1[n_] = Prime[n + 1] - Prime[n]; k[n_] = -d2[n]/(1 + d1[n])^(3/2); Flatten[Table[If[k[n] > 0, Prime[n], {}], {n, 1, 100}]]
Select[Partition[Prime[Range[150]], 3, 1], #[[2]]-#[[1]]>#[[3]]-#[[2]]&][[All, 1]] (* Harvey P. Dale, Mar 29 2022 *)
PROG
(Haskell)
import Data.List (findIndices)
a147812 n = a147812_list !! (n-1)
a147812_list = map (a000040 . (+ 1)) $ findIndices (< 0) a036263_list
-- Reinhard Zumkeller, Jan 20 2012
(Ruby)
require 'mathn'
Prime.take(100).each_cons(3).select{ |a, b, c| b-a>c-b }.map(&:first)
-- Aaron Weiner, Dec 05 2013
CROSSREFS
KEYWORD
nonn
AUTHOR
Roger L. Bagula, Nov 13 2008
EXTENSIONS
Edited by Alonso del Arte and Joerg Arndt, Nov 01 2013
Simpler formula added by Aaron Weiner, Dec 05 2013
STATUS
approved