OFFSET
0,4
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (2,-3,2,-1).
FORMULA
a(0, n) = n - Sum_{k=0..(n-1)} binomial(2*n-k-1, n-1)*a(0, k).
From Franklin T. Adams-Watters, May 12 2006: (Start)
G.f.: (x-2*x^2)/(1-x+x^2)^2. (End)
EXAMPLE
a(0,n): 0, 1, 0, -3, -4,...
a(1,n): 0, 1, 1, -2, -6,...
a(2,n): 0, 1, 2, 0, -6,...
a(3,n): 0, 1, 3, 3, -3,...
a(4,n): 0, 1, 4, 7, 4,...
Main diagonal of array is 0, 1, 2, 3, 4,...
MATHEMATICA
LinearRecurrence[{2, -3, 2, -1}, {0, 1, 0, -3}, 80] (* Harvey P. Dale, Dec 19 2015 *)
a[0, n_] := a[0, n] = If[n < 3, {0, 1, 0}[[n+1]], (n((n-2)a[0, n-1] - (n-1)a[0, n-2]))/((n-1)(n-2))];
Table[a[0, n], {n, 0, 79}] (* Jean-François Alcover, Mar 29 2020 *)
PROG
(PARI) my(x='x+O('x^50)); concat([0], Vec((x-2*x^2)/(1-x+x^2)^2)) \\ G. C. Greubel, Sep 03 2017
CROSSREFS
KEYWORD
easy,sign
AUTHOR
Leroy Quet, Aug 02 2005
EXTENSIONS
More terms from Franklin T. Adams-Watters, May 12 2006
STATUS
approved