OFFSET
1,2
LINKS
FORMULA
a(n) = 2*a(n-1)+6*a(n-2)-4*a(n-3). G.f.: -x^2*(3*x-2)/((2*x+1)*(2*x^2-4*x+1)). [Colin Barker, Nov 08 2012]
MATHEMATICA
M = {{0, -1, 2}, {-1, 2, -1}, {2, -1, 0}}; v[1] = {0, 0, 1}; v[n_] := v[n] = M.v[n - 1]; a1 = Table[v[n][[1]], {n, 1, 50}]
LinearRecurrence[{2, 6, -4}, {0, 2, 1}, 40] (* Harvey P. Dale, Jul 18 2015 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Roger L. Bagula and Gary W. Adamson, Oct 31 2006
EXTENSIONS
Edited by N. J. A. Sloane, Nov 04 2006
STATUS
approved