OFFSET
0,3
FORMULA
a(n) = (n*(n - 1)*a(n-2) + 2*n*(n - 2)*a(n-1)) / ((n - 2)*(n - 1)) for n >= 4.
a(n) = Sum_{k=0..n-1} F(n-1, 2) for n >= 2, where F(n, x) is the n-th Fibonacci polynomial.
a(n) = n*A000129(n-1), a(0)=1, a(1)=1. - Vladimir Kruchinin, Apr 19 2024
a(n) = 2^(n-2)*n*hypergeom([(3-n)/2, (2-n)/2], [2-n], -1)) for n >= 2. - Peter Luschny, Apr 19 2024
MAPLE
a := proc(n) option remember; if n < 4 then return [1, 1, 2, 6][n + 1] fi;
(n*(n - 1)*a(n - 2) + 2*n*(n - 2)*a(n - 1)) / ((n - 2)*(n - 1)) end:
seq(a(n), n = 0..30);
# Alternative:
F := n -> add(combinat:-fibonacci(n - 1, 2), k = 0..n-1):
a := n -> F(n) + ifelse(n < 2, 1, 0): seq(a(n), n=0..30);
# Using the generating function:
ogf := (x^5 + 5*x^4 + 4*x^3 - 3*x + 1)/(x^2 + 2*x - 1)^2:
ser := series(ogf, x, 40): seq(coeff(ser, x, n), n = 0..30);
# Or:
a := n -> ifelse(n < 2, 1, 2^(n-2)*n*hypergeom([(3-n)/2, (2-n)/2], [2-n], -1));
seq(simplify(a(n)), n = 0..30); # Peter Luschny, Apr 19 2024
CROSSREFS
KEYWORD
nonn
AUTHOR
Peter Luschny, Mar 23 2023
STATUS
approved