OFFSET
0,5
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (0,1,1,2,0,1).
FORMULA
G.f.: 1/(1-x^2-x^3-2*x^4-x^6).
a(n) = a(n-2)+a(n-3)+2*a(n-4)+a(n-6) for n>5, a(0) = a(2) = a(3) = 1, a(1) = 0, a(4) = 3, a(5) = 2.
EXAMPLE
a(4) = 3:
._._._._. ._._._._. ._._._._.
| | | | | | | |
| | |___|___| |___|___|
| | | | | | |
|_______| | | |___|___|
| | | | | | | |
|___|___| |_______| |___|___|
MAPLE
a:= n-> (Matrix(6, (i, j)-> `if`(i+1=j, 1,
`if`(i=6, [1, 0, 2, 1, 1, 0][j], 0)))^n. <<1, 0, 1, 1, 3, 2>>)[1, 1]:
seq(a(n), n=0..60);
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Alois P. Heinz, Jun 05 2013
STATUS
approved