|
|
A330034
|
|
a(n) = sign(cos(n)).
|
|
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, 1, -1
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0
|
|
COMMENTS
|
Also sign(sec(n)).
|
|
LINKS
|
|
|
FORMULA
|
a(n) = -1 if 1/4 < {n/(2*Pi)} < 3/4, +1 if n = 0 or 0 < {n/(2*Pi)} < 1/4 or 3/4 < {n/(2*Pi)} < 1, where {} is the fractional part.
|
|
MATHEMATICA
|
a[n_] := Sign[Cos[n]]; Array[a, 100, 0]
|
|
PROG
|
(PARI) a(n) = sign(cos(n))
|
|
CROSSREFS
|
|
|
KEYWORD
|
sign,easy
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|