OFFSET
0,5
LINKS
Index entries for linear recurrences with constant coefficients, signature (3,-3,1,3).
FORMULA
G.f. : (1-2x+x^2)/(1-3x+3x^2-x^3-3x^4); a(n)=3a(n-1)-3a(n-2)+a(n-3)+3a(n-4); a(n)=sum{k=0..floor(n/3), binomial(n-k, 3k)3^k}.
MATHEMATICA
CoefficientList[Series[(1-x)^2/((1-x)^3-3x^4), {x, 0, 40}], x] (* or *) LinearRecurrence[{3, -3, 1, 3}, {1, 1, 1, 1}, 40] (* Harvey P. Dale, Aug 25 2023 *)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Jul 25 2004
STATUS
approved