OFFSET
1,2
COMMENTS
LINKS
Clark Kimberling, Table of n, a(n) for n = 1..10000
MATHEMATICA
z = 400; f[x_] := Cos[x];
Select[Range[z], f[#] > 0 && f[# + 2] > 0 &] (* A277136 *)
Select[Range[z], f[#] > 0 && f[# + 2] < 0 &] (* A277137 *)
Select[Range[z], f[#] < 0 && f[# + 2] > 0 &] (* A277138 *)
Select[Range[z], f[#] < 0 && f[# + 2] < 0 &] (* A277139 *)
Position[Partition[Table[Cos[n], {n, 200}], 3, 1], _?(#[[1]]>0&&#[[3]]<0&), 1, Heads->False]//Flatten (* Harvey P. Dale, Jan 26 2018 *)
PROG
(PARI) is(n) = cos(n) > 0 && cos(n+2) < 0 \\ Felix Fröhlich, Oct 14 2016
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Oct 04 2016
STATUS
approved