OFFSET
1,1
COMMENTS
We start with A001223:
S1= 1, 2, 2, 4, 2, 4, 2, 4, 6, 2, 6, 4, 2, 4, 6, 6, 2, 6, 4, 2, 6, 4, 6, 8, 4, 2, 4.
Local minima are shown in brackets:
S2= 1, 2, 2, {4,2,4}, {4,2,4}, {6,2,6}, {4,2,4}, 6, {6,2,6}, {4,2,6}, {6,4,6}, 8, {4,2,4}, {4,2,4}, {14,4,6}, {6,2,10};
values of local minima are 2, 2, 2, 2, 2, 2, 4, 2, 2, 4, 2, and positions of local minima in A001223 give this sequence. Note that in the first and second brackets we take A001223(6)=4 twice. Also note that all 2's starting with A001223(5) and so on are local minima but there are many other local minima.
LINKS
Reinhard Zumkeller, Table of n, a(n) for n = 1..10000
Zak Seidov, Crests and troughs in A001223
EXAMPLE
MATHEMATICA
nn = 1001; t = Differences[Prime[Range[nn]]]; t2 = {}; Do[If[t[[n - 1]] > t[[n]] && t[[n]] < t[[n + 1]], AppendTo[t2, {n, t[[n]]}]], {n, 2, nn - 2}]; Transpose[t2][[1]] (* T. D. Noe, Dec 27 2011 *)
PROG
(Haskell)
a196175 n = a196175_list !! (n-1)
a196175_list = map (+ 2) $ elemIndices True $
zipWith (\x y -> x < 0 && y > 0) a036263_list $ tail a036263_list
-- Reinhard Zumkeller, Oct 29 2011
CROSSREFS
KEYWORD
nonn
AUTHOR
Zak Seidov, Oct 27 2011
STATUS
approved