OFFSET
9,2
LINKS
Alois P. Heinz, Table of n, a(n) for n = 9..1000
Index entries for linear recurrences with constant coefficients, signature (1,1,0,-1,-1,1).
FORMULA
From Chai Wah Wu, Apr 18 2024: (Start)
a(n) = a(n-1) + a(n-2) - a(n-4) - a(n-5) + a(n-6) for n > 15.
G.f.: x^9*(-x^6 + 2*x^4 + x^3 - 2*x - 1)/((x - 1)^3*(x + 1)*(x^2 + x + 1)). (End)
MAPLE
a:= proc(n) option remember; `if`(n<14, [1, 3, 4, 6, 7][n-8],
((-4*n+56)*a(n-5) +(3*n-16)*a(n-4) +(7*n-66)*a(n-3)
+(4*n-44)*a(n-2) +(28-3*n)*a(n-1)) / (7*n-78))
end:
seq(a(n), n=9..80);
MATHEMATICA
b[n_, i_] := b[n, i] = If[n == 0, 1, If[i<1, 0, b[n, i-1] + If[i>n, 0, Function[p, Expand[x*(p-Coefficient[p, x, i-1]*x^(i-1))]][b[n-i, i]]]]];
a[n_] := Coefficient[b[n, n], x, 3];
Table[a[n], {n, 9, 80}] (* Jean-François Alcover, May 01 2018, after Alois P. Heinz *)
CROSSREFS
KEYWORD
nonn
AUTHOR
Alois P. Heinz, Jun 23 2014
STATUS
editing