OFFSET
0
COMMENTS
Also sign(cot(n)) for n > 0.
Also sign(sin(2n)) = A070747(2n).
FORMULA
a(n) = +1 if 0 < {n/Pi} < 1/2, -1 if 1/2 < {n/Pi} < 1, where {} is the fractional part.
MATHEMATICA
a[n_] := Sign[Tan[n]]
PROG
(PARI) a(n) = sign(tan(n))
CROSSREFS
KEYWORD
sign
AUTHOR
Jianing Song, Nov 27 2019
STATUS
approved