login
A330035
a(n) = sign(tan(n)).
4
0, 1, -1, -1, 1, -1, -1, 1, -1, -1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, -1, 1, -1, -1, 1, -1, -1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, -1, 1, -1, -1, 1, -1, -1, 1, -1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, 1, 1, -1, -1, 1, -1, -1, 1, -1, -1, 1, -1
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
Cf. A057427 (sign), A070747 (sign(sin(n)) or sign(csc(n))), A330034 (sign(cos(n)) or sign(sec(n))), A327422 (indices of +1), A327423 (indices of -1).
Sequence in context: A070750 A011598 A324672 * A011599 A011600 A011601
KEYWORD
sign
AUTHOR
Jianing Song, Nov 27 2019
STATUS
approved