OFFSET
0,1
COMMENTS
LINKS
Clark Kimberling, Table of n, a(n) for n = 0..1000
MATHEMATICA
z = 400; f[x_] := Sin[x]
Select[Range[0, z], f[#]*f[# + 1] <= 0 &] (* A022844 *)
Select[Range[0, z], f[#] >= 0 && f[# + 1] <= 0 &] (* A246388 *)
Select[Range[0, z], f[#] <= 0 && f[# + 1] >= 0 &] (* A038130 *)
Select[Range[0, z], f[#]*f[# + 1] > 0 &] (* A054386 *)
Select[Range[0, z], f[#] >= 0 && f[# + 1] >= 0 &] (* A246389 *)
Select[Range[0, z], f[#] <= 0 && f[# + 1] <= 0 &] (* A246390 *)
SequencePosition[Table[If[Sin[n]<=0, 1, 0], {n, 200}], {1, 1}][[;; , 1]] (* Harvey P. Dale, Apr 02 2023 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Aug 24 2014
STATUS
approved