login
a(n) = n*(n^2 + 12*n - 25)/6.
4

%I #30 Sep 08 2022 08:44:49

%S 0,-2,1,10,26,50,83,126,180,246,325,418,526,650,791,950,1128,1326,

%T 1545,1786,2050,2338,2651,2990,3356,3750,4173,4626,5110,5626,6175,

%U 6758,7376,8030,8721,9450,10218,11026,11875,12766,13700,14678,15701,16770,17886,19050

%N a(n) = n*(n^2 + 12*n - 25)/6.

%C For n >= 4, this is dot_product(n,n-1,...2,1)*(4,5,...,n,1,2,3).

%H Vincenzo Librandi, <a href="/A026057/b026057.txt">Table of n, a(n) for n = 0..1000</a>

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

%F G.f.: x*(-2 +9*x -6*x^2)/(1-x)^4. - _Colin Barker_, Sep 17 2012

%F E.g.f.: x*(-12 +15*x +x^2)*exp(x)/6. - _G. C. Greubel_, Oct 30 2019

%p seq(n*(n^2+12*n-25)/6, n=0..60); # _G. C. Greubel_, Oct 30 2019

%t CoefficientList[Series[x(-2 +9x -6x^2)/(1-x)^4, {x, 0, 60}], x] (* _Vincenzo Librandi_, Oct 17 2013 *)

%t Table[n (n^2+12n-25)/6,{n,0,50}] (* or *) LinearRecurrence[{4,-6,4,-1},{0,-2,1,10},50] (* _Harvey P. Dale_, Jan 28 2020 *)

%o (Magma) [n*(n^2+12*n-25)/6: n in [0..60]]; // _Vincenzo Librandi_, Oct 17 2013

%o (PARI) a(n)=n*(n^2+12*n-25)/6 \\ _Charles R Greathouse IV_, Oct 07 2015

%o (Sage) [n*(n^2+12*n-25)/6 for n in (0..60)] # _G. C. Greubel_, Oct 30 2019

%o (GAP) List([0..60], n-> n*(n^2+12*n-25)/6); # _G. C. Greubel_, Oct 30 2019

%Y Cf. column 3 of triangle A094415.

%K sign,easy

%O 0,2

%A _Clark Kimberling_

%E New definition from _Ralf Stephan_, Apr 30 2004

%E Edited by _N. J. A. Sloane_, Dec 13 2008