login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A132419
Period 6: repeat [1, 1, -2, -1, -1, 2].
2
1, 1, -2, -1, -1, 2, 1, 1, -2, -1, -1, 2, 1, 1, -2, -1, -1, 2, 1, 1, -2, -1, -1, 2, 1, 1, -2, -1, -1, 2, 1, 1, -2, -1, -1, 2, 1, 1, -2, -1, -1, 2, 1, 1, -2, -1, -1, 2, 1, 1, -2, -1, -1, 2, 1, 1, -2, -1, -1, 2, 1, 1, -2, -1, -1, 2, 1, 1, -2, -1, -1, 2, 1, 1, -2, -1, -1, 2, 1, 1, -2, -1, -1, 2, 1, 1, -2, -1, -1, 2, 1, 1, -2, -1, -1
OFFSET
0,3
FORMULA
a(n) = A061347(n+1) * (-1)^floor(n/3).
From Wesley Ivan Hurt, Jun 21 2016: (Start)
G.f.: (1+x-2*x^2)/(1+x^3).
a(n) + a(n-3) = 0 for n>2.
a(n) = (5*cos(n*Pi/3) - 2*cos(n*Pi) - sqrt(3)*sin(n*Pi/3))/3. (End)
MAPLE
A132419:=n->[1, 1, -2, -1, -1, 2][(n mod 6)+1]: seq(A132419(n), n=0..100); # Wesley Ivan Hurt, Jun 21 2016
MATHEMATICA
PadRight[{}, 100, {1, 1, -2, -1, -1, 2}] (* Wesley Ivan Hurt, Jun 21 2016 *)
PROG
(PARI) a(n)=[1, 1, -2, -1, -1, 2][n%6+1] \\ Charles R Greathouse IV, Jun 02 2011
(Magma) &cat [[1, 1, -2, -1, -1, 2]^^20]; // Wesley Ivan Hurt, Jun 21 2016
CROSSREFS
Cf. A061347.
Sequence in context: A131713 A100063 A057079 * A131556 A107751 A132367
KEYWORD
sign,easy,less
AUTHOR
Paul Curtz, Nov 13 2007
EXTENSIONS
Comment changed to formula by Wesley Ivan Hurt, Jun 21 2016
STATUS
approved