OFFSET
0,2
COMMENTS
Row sums of number triangle A119305.
LINKS
Indranil Ghosh, Table of n, a(n) for n = 0..4534
Index entries for linear recurrences with constant coefficients, signature (1,-3,3,-1).
FORMULA
G.f.: (1 - 4*x)/(1 - x + 3*x^2 - 3*x^3 + x^4).
a(n) = a(n-1) - 3*a(n-2) + 3*a(n-3) - a(n-4).
a(n) = Sum_{k=0..n} (C(3*k,n-k) + 4*C(3*k,n-k-1))*(-1)^(n-k).
MATHEMATICA
CoefficientList[Series[(1 - 4 x)/(1 - x (1 - x)^3), {x, 0, 36}], x] (* or *) LinearRecurrence[{1, -3, 3, -1}, {1, -3, -6, 6}, 37] (* or *) Table[Sum[(Binomial[3 k, n - k] + 4 Binomial[3 k, n - k - 1]) (-1)^(n - k), {k, 0, n}], {n, 0, 36}] (* Indranil Ghosh, Feb 27 2017 *)
PROG
(PARI) a(n) = sum(k=0, n, (binomial(3*k, n-k)+4*binomial(3*k, n-k-1))*(-1)^(n-k)); \\ Indranil Ghosh, Feb 27 2017
CROSSREFS
KEYWORD
sign,easy
AUTHOR
Paul Barry, May 13 2006
STATUS
approved