OFFSET
0,2
FORMULA
a(n) = ((3*n^2 - 7*n + 2)*a(n - 1) - (n^2 - n)*a(n - 3) - (n^2 - 3*n)*a(n - 2)) / ((n - 1)*(n - 2)) for n >= 4.
MAPLE
a := proc(n) option remember; if n < 4 then return [1, 2, 4, 10][n + 1] fi;
((3*n^2 - 7*n + 2)*a(n - 1) - (n^2 - n)*a(n - 3) - (n^2 - 3*n)*a(n - 2))/((n - 1)*(n - 2)) end: seq(a(n), n = 0..29);
# Alternative:
ogf := (x^5 + 5*x^4 + 4*x^3 - 3*x + 1)/((1 - x)*(x^2 + 2*x - 1)^2):
ser := series(ogf, x, 40): seq(coeff(ser, x, n), n = 0..29);
CROSSREFS
KEYWORD
nonn
AUTHOR
Peter Luschny, Mar 23 2023
STATUS
approved