OFFSET
0,3
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (-1,3,3,-3,-3,1,1).
FORMULA
G.f.: (1+x+22*x^2-2*x^3+9*x^4+x^5) / ((1-x)^3*(1+x)^4).
a(n) = -a(n-1)+3*a(n-2)+3*a(n-3)-3*a(n-4)-3*a(n-5)+a(n-6)+a(n-7).
From Colin Barker, Jan 29 2016: (Start)
a(n) = (n+1)*(2*(-1)^n*n^2+4*(-1)^n*n+3*n+3)/3.
a(n) = (2*n^3+9*n^2+10*n+3)/3 for n even.
a(n) = (-2*n^3-3*n^2+2*n+3)/3 for n odd.
(End)
MATHEMATICA
LinearRecurrence[{-1, 3, 3, -3, -3, 1, 1}, {1, 0, 25, -24, 105, -104, 273}, 40] (* Harvey P. Dale, Aug 19 2012 *)
PROG
(PARI) Vec((1+x+22*x^2-2*x^3+9*x^4+x^5)/((1-x)^3*(1+x)^4) + O(x^50)) \\ Colin Barker, Jan 29 2016
CROSSREFS
KEYWORD
easy,sign
AUTHOR
Paul Barry, Mar 20 2009
STATUS
approved