Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.
%I #21 May 25 2023 17:42:13
%S 1,13,42,94,175,291,448,652,909,1225,1606,2058,2587,3199,3900,4696,
%T 5593,6597,7714,8950,10311,11803,13432,15204,17125,19201,21438,23842,
%U 26419,29175,32116,35248,38577,42109,45850,49806,53983,58387,63024,67900
%N a(n) = (2*n^3 + 5*n^2 - 5*n)/2.
%H Vincenzo Librandi, <a href="/A162265/b162265.txt">Table of n, a(n) for n = 1..1000</a>
%H <a href="/index/Rec#order_04">Index entries for linear recurrences with constant coefficients</a>, signature (4,-6,4,-1).
%F Row sums from A154684: a(n) = Sum_{m=1..n} 2*m*n+m+n-3.
%F G.f.: x*(1+9*x-4*x^2)/(1-x)^4. - _Vincenzo Librandi_, Mar 05 2012
%F a(n) = 4*a(n-1) -6*a(n-2) +4*a(n-3) -a(n-4). - _Vincenzo Librandi_, Mar 05 2012
%p A162265:=n->(2*n^3 + 5*n^2 - 5*n)/2: seq(A162265(n), n=1..60); # _Wesley Ivan Hurt_, Apr 11 2017
%t LinearRecurrence[{4, -6, 4, -1}, {4, 19, 51, 106}, 50] (* or *) CoefficientList[Series[(1+9*x-4*x^2)/(1-x)^4,{x,0,40}],x] (* _Vincenzo Librandi_, Mar 05 2012 *)
%t Table[(2n^3+5n^2-5n)/2,{n,40}] (* _Harvey P. Dale_, May 25 2023 *)
%o (PARI) 5*binomial(n,2)+n^3 \\ _Charles R Greathouse IV_, Jan 11 2012
%o (Magma) [(2*n^3 + 5*n^2 - 5*n)/2 : n in [1..50]]; // _Wesley Ivan Hurt_, May 07 2021
%Y Cf. A154684.
%K nonn,easy
%O 1,2
%A _Vincenzo Librandi_, Jun 29 2009