login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

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

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

%S 0,1,6,24,64,145,282,504,832,1305,1950,2816,3936,5369,7154,9360,12032,

%T 15249,19062,23560,28800,34881,41866,49864,58944,69225,80782,93744,

%U 108192,124265,142050,161696,183296,207009,232934,261240,292032,325489,361722,400920,443200

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

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

%H Stefano Spezia, <a href="/A325517/b325517.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 + 3*x + 7*x^2 + 3*x^3 + 2*x^4)/((1 - x)^5*(1 + x)^2).

%F 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).

%F 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) = n^2*(2*n^2 + 3*n + 4)/12 if n is even.

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

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

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

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

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

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

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

%Y Cf. A131941, A317614, A322277, A325516.

%K nonn,easy

%O 0,3

%A _Stefano Spezia_, May 07 2019