login
a(n) = (1/24)*n*((4*n + 3)*(2*n^2 + 1) - 3*(-1)^n).
2

%I #15 Sep 08 2022 08:46:24

%S 0,1,8,36,104,245,492,896,1504,2385,3600,5236,7368,10101,13524,17760,

%T 22912,29121,36504,45220,55400,67221,80828,96416,114144,134225,156832,

%U 182196,210504,242005,276900,315456,357888,404481,455464,511140,571752,637621,709004,786240

%N a(n) = (1/24)*n*((4*n + 3)*(2*n^2 + 1) - 3*(-1)^n).

%C For n > 0, a(n) is the n-th row sum of the triangle A325655.

%H Stefano Spezia, <a href="/A325656/b325656.txt">Table of n, a(n) for n = 0..10000</a>

%H <a href="/index/Rec#order_07">Index entries for linear recurrences with constant coefficients</a>, signature (3,-1,-5,5,1,-3,1).

%F O.g.f.: -x*(1 + 5*x + 13*x*2 + 9*x^3 + 4*x^4)/((-1 + x)^5*(1 + x)^2).

%F E.g.f.: (1/24)*exp(-x)*x*(3 + 21*exp(2*x) + 78*exp(2*x)*x + 54*exp(2*x)*x^2 + 8*exp(2*x)*x*3).

%F a(n) = 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.

%F a(n) = (1/12)*n^2*(4*n^2 + 3*n + 2) if n is even.

%F a(n) = (1/12)*n*(n + 1)*(4*n^2 - n + 3) if n is odd.

%F a(n) = n*A173722(2*n). - _Stefano Spezia_, Dec 21 2021

%p a:=n->(1/24)*n*(3 - 3*(- 1)^n + 4*n + 6*n^2 + 8*n^3): seq(a(n), n=0..50);

%t a[n_]:=(1/24)*n*(3 - 3*(- 1)^n + 4*n + 6*n^2 + 8*n^3); Array[a,50,0]

%o (GAP) Flat(List([0..50], n->(1/24)*n*(3 - 3*(- 1)^n + 4*n + 6*n^2 + 8*n^3)));

%o (Magma) [(1/24)*n*(3 - 3*(- 1)^n + 4*n + 6*n^2 + 8*n^3): n in [0..50]];

%o (PARI) a(n) = (1/24)*n*(3 - 3*(- 1)^n + 4*n + 6*n^2 + 8*n^3);

%Y Cf. A173722, A317614, A322277, A325655.

%K nonn,easy

%O 0,3

%A _Stefano Spezia_, May 13 2019