login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Numbers k such that cos(k) > cos(k+1) < cos(k+2).
4

%I #6 Apr 23 2015 16:24:02

%S 2,8,15,21,27,34,40,46,52,59,65,71,78,84,90,96,103,109,115,122,128,

%T 134,140,147,153,159,166,172,178,184,191,197,203,209,216,222,228,235,

%U 241,247,253,260,266,272,279,285,291,297,304,310,316,323,329,335,341

%N Numbers k such that cos(k) > cos(k+1) < cos(k+2).

%C The sequences A246303, A246304, A246305, A246306 partition the nonnegative integers.

%H Clark Kimberling, <a href="/A246304/b246304.txt">Table of n, a(n) for n = 1..1000</a>

%t z = 500; f[x_] := f[x] = Cos[x]; t = Range[0, z];

%t Select[t, f[#] < f[# + 1] &] (* A246303 *)

%t Select[t, f[#] > f[# + 1] < f[# + 2] &] (* A246304 *)

%t Select[t, f[#] > f[# + 1] > f[# + 2] < f[# + 3] &] (* A246305 *)

%t Select[t, f[#] > f[# + 1] > f[# + 2] > f[# + 3] < f[# + 4] &] (* A246306 *)

%t Flatten[Position[Partition[Cos[Range[400]],3,1],_?(#[[1]]>#[[2]] && #[[2]]< #[[3]]&),{1},Heads->False]] (* _Harvey P. Dale_, Apr 23 2015 *)

%Y Cf. A026303, A246305, A246306, A026311 (complement of A246303).

%K nonn,easy

%O 1,1

%A _Clark Kimberling_, Aug 22 2014