OFFSET
0,3
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (1,1,0,1,-3,-1,0,1,3,-1,0,-1,-1,1).
FORMULA
G.f.: 1 + Sum_{j>0} x^j / Product_{i=0..4} (1-x^(i+j)).
G.f.: (x^14-x^13-x^12+2*x^9-x^6-x^5+x^4-1) / ((x-1)^5*(x+1)^3*(x^2+1)^2*(x^2+x+1)). - Colin Barker, Mar 05 2015
MAPLE
b:= proc(n, i, k) option remember; `if`(n<0 or k<0, 0,
`if`(n=0, 1, `if`(i<1, 0, b(n, i-1, k-1) +b(n-i, i, k))))
end:
a:= n-> `if`(n=0, 1, 0) +add(b(n-i, i, 4), i=1..n):
seq(a(n), n=0..80);
MATHEMATICA
b[n_, i_, k_] := b[n, i, k] = If[n < 0 || k < 0, 0, If[n == 0, 1, If[i < 1, 0, b[n, i - 1, k - 1] + b[n - i, i, k]]]];
a[n_] := If[n == 0, 1, 0] + Sum[b[n - i, i, 4], {i, 1, n}];
Table[a[n], {n, 0, 80}] (* Jean-François Alcover, May 20 2018, after Alois P. Heinz *)
PROG
(PARI) Vec((x^14-x^13-x^12+2*x^9-x^6-x^5+x^4-1)/((x-1)^5*(x+1)^3*(x^2+1)^2*(x^2+x+1)) + O(x^100)) \\ Colin Barker, Mar 05 2015
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Alois P. Heinz, Oct 31 2012
STATUS
approved