OFFSET
0,2
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (3,0,2).
FORMULA
G.f.: 1/(1-3*x-2*x^3).
a(n) = Sum_{k=0..floor(n/2)} Sum_{i=0..n} Sum_{j=0..i} C(n-2*k,i)*C(i,j) *C(j, k)*2^k.
MATHEMATICA
CoefficientList[Series[1/(1-3*x-2*x^3), {x, 0, 50}], x] (* or *) LinearRecurrence[{3, 0, 2}, {1, 3, 9}, 50] (* G. C. Greubel, Feb 03 2018 *)
PROG
(PARI) x='x+O('x^30); Vec(1/(1-3*x-2*x^3)) \\ G. C. Greubel, Feb 03 2018
(Magma) I:=[1, 3, 9]; [n le 3 select I[n] else 3*Self(n-1) + 2*Self(n-3): n in [1..30]]; // G. C. Greubel, Feb 03 2018
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Sep 16 2004
STATUS
approved