OFFSET
0,3
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (2,3,-4,1)
FORMULA
G.f.: x/((1+x-x^2)(1-3x+x^2)).
a(n) = Sum_{k=0..n} (-1)^k*F(k+1)*F(2(n-k)).
a(n) = Sum_{k=0..n} C(n,k)*F(k+1)*(1-(-1)^(n-k))/2.
a(n) = 2*a(n-1) + 3*a(n-2) - 4*a(n-3) + a(n-4).
MATHEMATICA
LinearRecurrence[{2, 3, -4, 1}, {0, 1, 2, 7}, 30] (* Harvey P. Dale, Jul 12 2011 *)
CoefficientList[Series[x / ((1 + x - x^2) (1 - 3 x + x^2)), {x, 0, 33}], x] (* Vincenzo Librandi, Sep 13 2017 *)
PROG
(PARI) x='x+O('x^50); concat([0], Vec(x/((1+x-x^2)*(1-3*x+x^2)))) \\ G. C. Greubel, Sep 12 2017
(Magma) I:=[0, 1, 2, 7]; [n le 4 select I[n] else 2*Self(n-1)+3*Self(n-2)-4*Self(n-3)+Self(n-4): n in [1..30]]; // Vincenzo Librandi, Sep 13 2017
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Aug 11 2009
STATUS
approved