OFFSET
1,2
COMMENTS
a(n) = least positive integer k such that cos(n*k) and cos(n*k + k) have opposite signs.
EXAMPLE
The signs of cos(6), cos(12), ..., sin(36) are indicated by + + + + + -; that's five +'s followed by -, so that a(6) = 5.
MATHEMATICA
Table[First[Map[Length, Split[Table[Sign[Cos[k n]], {k, 1, 500}]]]], {n, 1, 100}]
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Clark Kimberling, Apr 21 2020
STATUS
approved