OFFSET
0,3
COMMENTS
For n > 0, a(n) is the n-th row sum of the triangle A325516.
LINKS
Stefano Spezia, Table of n, a(n) for n = 0..10000
Index entries for linear recurrences with constant coefficients, signature (3,-1,-5,5,1,-3,1).
FORMULA
O.g.f.: x*(1 + 3*x + 7*x^2 + 3*x^3 + 2*x^4)/((1 - x)^5*(1 + x)^2).
E.g.f.: (1/24)*exp(-x)*x*(3 + 21*exp(2*x) + 54*exp(2*x)*x + 30*exp(2*x)*x^2 + 4*exp(2*x)*x^3).
a(n) = 3*a(n-1) - a(n-2) - 5*a(n-3) + 5*a(n-4) + a(n-5) - 3*a(n-6) + a(n-7) for n > 6.
a(n) = n^2*(2*n^2 + 3*n + 4)/12 if n is even.
a(n) = n*(n + 1)*(2*n^2 + n + 3)/12 if n is odd.
a(n) = n*A131941(n). - Stefano Spezia, Dec 21 2021
MAPLE
a:=n->n*((2*n + 1)*(2*n^2 + 2*n + 3) - 3*(-1)^n)/24: seq(a(n), n=0..50);
MATHEMATICA
a[n_]:=n*((2*n + 1)*(2*n^2 + 2*n + 3) - 3*(-1)^n)/24; Array[a, 50, 0]
PROG
(GAP) Flat(List([0..50], n->n*((2*n + 1)*(2*n^2 + 2*n + 3) - 3*(-1)^n)/24));
(Magma) [n*((2*n + 1)*(2*n^2 + 2*n + 3) - 3*(-1)^n)/24: n in [0..50]];
(PARI) a(n) = n*((2*n + 1)*(2*n^2 + 2*n + 3) - 3*(-1)^n)/24;
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Stefano Spezia, May 07 2019
STATUS
approved