OFFSET
1,3
LINKS
Clark Kimberling, Table of n, a(n) for n = 1..4000
MATHEMATICA
z = 520; f[x_] := f[x] = Cos[x]; t = Range[0, z];
Select[t, f[#] > f[# + 1] &] (* A026311 *)
Select[t, f[#] < f[# + 1] > f[# + 2] &] (* A246300 *)
Select[t, f[#] < f[# + 1] < f[# + 2] > f[# + 3] &] (* A246301 *)
Select[t, f[#] < f[# + 1] < f[# + 2] < f[# + 3] > f[# + 4] &] (* A246302 *)
Join[{0}, Position[Partition[Cos[Range[120]], 2, 1], _?(#[[1]]>#[[2]]&), 1, Heads -> False]//Flatten] (* Harvey P. Dale, Aug 09 2021 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
EXTENSIONS
Comment, Mathematica, Crossrefs by Clark Kimberling, Aug 22 2014
STATUS
approved