OFFSET
0,2
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..2000
Index entries for linear recurrences with constant coefficients, signature (1,1,0,0,0,-2,0,1)
FORMULA
G.f.: (x+1)*(x^5+x^4-x^3-x^2-1)/((x-1)*(x^7+x^6-x^5-x^4-x^3-x^2+1)).
MAPLE
a:= n-> (Matrix(8, (i, j)-> `if`(i+1=j, 1, `if`(i=8,
[1, 0, -2, 0$3, 1$2][j], 0)))^n. <<1, 2, 4, 8, 12, 18, 27, 41>>)[1$2]:
seq(a(n), n=0..45);
MATHEMATICA
LinearRecurrence[{1, 1, 0, 0, 0, -2, 0, 1}, {1, 2, 4, 8, 12, 18, 27, 41}, 40] (* Jean-François Alcover, Nov 02 2021 *)
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Alois P. Heinz, Oct 22 2017
STATUS
approved