OFFSET
0,4
LINKS
Colin Barker, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (2,4,-1).
FORMULA
a(n) = 2*a(n-1) + 5*a(n-2) - 3*a(n-3) - 4*a(n-4) + a(n-5); a(0)=0, a(1)=1, a(2)=1,a(3)=6,a(4)=15 (follows from the minimal polynomial of M).
From Colin Barker, Mar 03 2017: (Start)
G.f.: x*(1 - x) / (1 - 2*x - 4*x^2 + x^3).
a(n) = 2*a(n-1) + 4*a(n-2) - a(n-3) for n>2.
(End)
MAPLE
a[0]:=0: a[1]:=1: a[2]:=1: a[3]:=6: a[4]:=15: for n from 5 to 26 do a[n]:=2*a[n-1]+5*a[n-2]-3*a[n-3]-4*a[n-4]+a[n-5] od: seq(a[n], n=0..26);
MATHEMATICA
M = {{1, 1, 1, 1, 1, 1}, {1, 0, 0, 0, 1, 0}, {1, 0, 0, 1, 0, 0}, {1, 0, 1, 0, 0, 0}, {1, 1, 0, 0, 0, 0}, {1, 0, 0, 0, 0, 0}}; v[1] = {0, 0, 0, 0, 0, 1}; v[n_] := v[n] = M.v[n - 1]; a1 = Table[v[n][[1]], {n, 1, 50}]
PROG
(PARI) concat(0, Vec(x*(1 - x) / (1 - 2*x - 4*x^2 + x^3) + O(x^40))) \\ Colin Barker, Mar 03 2017
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Gary W. Adamson and Roger L. Bagula, Oct 19 2006
EXTENSIONS
Edited by N. J. A. Sloane, Oct 29 2006
STATUS
approved