OFFSET
0,3
COMMENTS
Fourth column of triangle A054450.
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (1,4,-3,-6,3,4,-1,-1).
FORMULA
G.f.: 1/((1-x^2)^3*(1-x-x^2)).
a(n) = a(n-1) + 4*a(n-2) - 3*a(n-3) - 6*a(n-4) + 3*a(n-5) + 4*a(n-6) - a(n-7) - a(n-8);
a(n) = Sum_{k=0..n} Fibonacci(n-k+1)*binomial(k/2 +2, 2)*(1+(-1)^k)/2.
a(n) = Fibonacci(n+4) + (-1)^n*(n^2 + 4*n + 7)/16 - (n^2 + 12*n + 39)/16. - G. C. Greubel, Jul 25 2022
MATHEMATICA
Table[Sum[Binomial[n-k+3, k], {k, 0, Floor[n/2]}], {n, 0, 40}] (* or *) LinearRecurrence[{1, 4, -3, -6, 3, 4, -1, -1}, {1, 1, 5, 6, 17, 23, 50, 73}, 40] (* Harvey P. Dale, Jun 04 2021 *)
PROG
(Magma) [Fibonacci(n+4) +(-1)^n*(n^2+4*n+7)/16 -(n^2+12*n+39)/16: n in [0..40]]; // G. C. Greubel, Jul 25 2022
(SageMath) [fibonacci(n+4) +(-1)^n*(n^2+4*n+7)/16 -(n^2+12*n+39)/16 for n in (0..40)] # G. C. Greubel, Jul 25 2022
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Paul Barry, Oct 23 2004
STATUS
approved