OFFSET
1,1
LINKS
Clark Kimberling, Table of n, a(n) for n = 1..1000
MATHEMATICA
z = 500; f[x_] := f[x] = Cos[x]; t = Range[0, z];
Select[t, f[#] < f[# + 1] &] (* A246303 *)
Select[t, f[#] > f[# + 1] < f[# + 2] &] (* A246304 *)
Select[t, f[#] > f[# + 1] > f[# + 2] < f[# + 3] &] (* A246305 *)
Select[t, f[#] > f[# + 1] > f[# + 2] > f[# + 3] < f[# + 4] &] (* A246306 *)
Flatten[Position[Partition[Cos[Range[400]], 3, 1], _?(#[[1]]>#[[2]] && #[[2]]< #[[3]]&), {1}, Heads->False]] (* Harvey P. Dale, Apr 23 2015 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Aug 22 2014
STATUS
approved