OFFSET
0,2
LINKS
Nathaniel Johnston, Table of n, a(n) for n = 0..500
Index entries for linear recurrences with constant coefficients, signature (5,2,1).
FORMULA
a(n) = Sum_{k=0..n} binomial(3*n-k,3*n-3*k).
From Colin Barker, Mar 21 2012: (Start)
a(n) = 5*a(n-1) + 2*a(n-2) + a(n-3).
G.f.: (1-3*x)/(1-5*x-2*x^2-x^3). (End)
MAPLE
seq(add(binomial(3*n-k, 3*n-3*k), k=0..n), n=0..20);
MATHEMATICA
Table[Sum[Binomial[3n - k, 3n - 3k], {k, 0, n}], {n, 0, 22}]
LinearRecurrence[{5, 2, 1}, {1, 2, 12}, 30] (* G. C. Greubel, Dec 30 2017 *)
PROG
(Maxima) makelist(sum(binomial(3*n-k, 3*n-3*k), k, 0, n), n, 0, 22);
(PARI) x='x+O('x^30); Vec((1-3*x)/(1-5*x-2*x^2-x^3)) \\ G. C. Greubel, Dec 30 2017
(Magma) I:=[1, 2, 12]; [n le 3 select I[n] else 5*Self(n-1) +2*Self(n-2) + Self(n-3): n in [1..30]]; // G. C. Greubel, Dec 30 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Emanuele Munarini, May 05 2011
STATUS
approved