login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

a(n) = Sum_{k=0..floor(n/2)} (n-k)*(k+1).
0

%I #29 Dec 23 2022 16:22:56

%S 1,4,7,16,22,40,50,80,95,140,161,224,252,336,372,480,525,660,715,880,

%T 946,1144,1222,1456,1547,1820,1925,2240,2360,2720,2856,3264,3417,3876,

%U 4047,4560,4750,5320,5530,6160,6391,7084,7337,8096,8372,9200,9500,10400,10725

%N a(n) = Sum_{k=0..floor(n/2)} (n-k)*(k+1).

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

%F G.f.: x * (1+3*x)/((1-x)^4*(1+x)^3). - _Joerg Arndt_, Jun 25 2017

%F a(n) = 1/16 + 13*n/24 + 7*n^2/16 + n^3/12 + (-1)^n*(-1/16 + n/8 + n^2/16). - _Vaclav Kotesovec_, Jun 25 2017

%F E.g.f.: (x*(21 + 18*x + 2*x^2)*cosh(x) + (3 + 30*x + 15*x^2 + 2*x^3)*sinh(x))/24. - _Stefano Spezia_, Dec 23 2022

%e a(2) = (2*1)+(1*2) = 4.

%e a(3) = (3*1)+(2*2) = 7.

%e a(4) = (4*1)+(3*2)+(2*3) = 16.

%e a(5) = (5*1)+(4*2)+(3*3) = 22.

%t Table[Sum[(n - k) (k + 1), {k, 0, Floor[n/2]}], {n, 49}] (* _Michael De Vlieger_, Jun 23 2017 *)

%o (PARI) a(n) = sum(k=0, n\2, (n-k)*(k+1)); \\ _Michel Marcus_, Jun 15 2017

%o (PARI) a(n) = my(r = n%2, n = (n + 4)>>1); 4 * binomial(n, 3) + r * binomial(n, 2); \\ _David A. Corneth_, Jun 23 2017

%Y Cf. A000292 (with n instead of n/2).

%K nonn,easy

%O 1,2

%A _Zhandos Mambetaliyev_, Jun 15 2017

%E More terms from _Michel Marcus_, Jun 15 2017