OFFSET
0,3
COMMENTS
With offset 1, a(n) satisfies the interesting recurrence: a(n+1) = Sum_{k=1..n} binomial(n, k)*(-1)^k*a(k); see Mathematica code below. - John M. Campbell, May 05 2012
LINKS
FORMULA
From Wesley Ivan Hurt, Jun 19 2016: (Start)
G.f.: (1-3*x+x^2)/(1-2*x+2*x^2-x^3).
a(n) = 2*a(n-1) - 2*a(n-2) + a(n-3) for n>2.
a(n) = (6*cos(n*Pi/3) - 2*sqrt(3)*sin(n*Pi/3) - 3)/3. (End)
MAPLE
A130778:=n->[1, -1, -3, -3, -1, 1][(n mod 6)+1]: seq(A130778(n), n=0..100); # Wesley Ivan Hurt, Jun 19 2016
MATHEMATICA
Table1 = {1}; a[1] = 1; n = 1; While[n < 314, a[n + 1] = Sum[Binomial[n, k]*(-1)^k*a[k], {k, 1, n}]; AppendTo[Table1, a[n + 1]]; n++]; Print[Table1] (* John M. Campbell, May 05 2012 *)
PadRight[{}, 200, {1, -1, -3, -3, -1, 1}] (* Wesley Ivan Hurt, Jun 19 2016 *)
PROG
(Magma) &cat[[1, -1, -3, -3, -1, 1]^^20]; // Wesley Ivan Hurt, Jun 19 2016
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Paul Curtz, Jul 14 2007
STATUS
approved