login
A131714
Period 6: repeat [1, -2, 2, -1, 2, -2].
2
1, -2, 2, -1, 2, -2, 1, -2, 2, -1, 2, -2, 1, -2, 2, -1, 2, -2, 1, -2, 2, -1, 2, -2, 1, -2, 2, -1, 2, -2, 1, -2, 2, -1, 2, -2, 1, -2, 2, -1, 2, -2, 1, -2, 2, -1, 2, -2, 1, -2, 2, -1, 2, -2, 1, -2, 2, -1, 2, -2, 1, -2, 2, -1, 2, -2, 1, -2, 2, -1, 2, -2, 1, -2
OFFSET
0,2
FORMULA
G.f.: (1-2*x+2*x^2)/(x+1)/(x^2-x+1). - R. J. Mathar, Nov 14 2007
From Wesley Ivan Hurt, Jun 19 2016: (Start)
a(n) + a(n-3) = 0 for n>2.
a(n) = (5*cos(n*Pi)-2*cos(n*Pi/3))/3. (End)
MAPLE
A131714:=n->[1, -2, 2, -1, 2, -2][(n mod 6)+1]: seq(A131714(n), n=0..100); # Wesley Ivan Hurt, Jun 19 2016
MATHEMATICA
PadRight[{}, 200, {1, -2, 2, -1, 2, -2}] (* Wesley Ivan Hurt, Jun 19 2016 *)
PROG
(Magma) &cat[[1, -2, 2, -1, 2, -2]^^20]; // Wesley Ivan Hurt, Jun 19 2016
CROSSREFS
Sequence in context: A243759 A098398 A306211 * A130196 A230866 A158209
KEYWORD
sign,easy
AUTHOR
Paul Curtz, Sep 14 2007
STATUS
approved