%I #36 Sep 18 2017 12:52:00
%S -1,-1,5,25,70,154,294,510,825,1265,1859,2639,3640,4900,6460,8364,
%T 10659,13395,16625,20405,24794,29854,35650,42250,49725,58149,67599,
%U 78155,89900,102920,117304,133144,150535,169575,190365,213009,237614,264290,293150,324310,357889,394009,432795,474375
%N A diagonal of A008296.
%D L. Comtet, Advanced Combinatorics, Reidel, 1974, p. 139, b(n,n-2).
%H Vincenzo Librandi, <a href="/A059302/b059302.txt">Table of n, a(n) for n = 2..1000</a>
%H <a href="/index/Rec#order_05">Index entries for linear recurrences with constant coefficients</a>, signature (5, -10, 10, -5, 1).
%F a(n) = (n-1)n(n+1)(3n-10)/24.
%F If we define f(n,i,a) = Sum_{k=0..n-i} binomial(n,k)*Stirling1(n-k,i)*Product_{j=0..k-1} (-a-j), then a(n-1) = f(n,n-2,-1), for n >= 3. - _Milan Janjic_, Dec 20 2008
%F G.f.: -x^2*(1-4*x)/(1-x)^5. - _Colin Barker_, Mar 21 2012
%F a(2)=-1, a(3)=-1, a(4)=5, a(5)=25, a(6)=70, a(n) = 5*a(n-1) - 10*a(n-2) + 10*a(n-3) - 5*a(n-4) + a(n-5). - _Harvey P. Dale_, Jun 05 2012
%F a(n) = Sum_{k=1..n} Sum_{i=1..k} (n-i)*(n-k-1). - _Wesley Ivan Hurt_, Sep 12 2017
%p with(combinat): for n from 3 to 100 do for k from n-2 to n-2 do printf(`%d,`,sum(binomial(l,k)*k^(l-k)*stirling1(n,l), l=k..n)) od: od:
%t f[n_] := 3*n - 1; s1 = s2 = s3 = 0; lst = {}; Do[a = f[n]; s1 += a;
%t s2 += s1; s3 += s2; AppendTo[lst, s3], {n, 0, 5!}]; lst (* _Vladimir Joseph Stephan Orlovsky_, Jun 27 2009 *)
%t Drop[CoefficientList[Series[-x^2 (1 - 4*x)/(1 - x)^5, {x, 0, 50}], x], 2] (* _Vincenzo Librandi_, Mar 22 2012 *)
%t Rest[Table[(n - 1) n (n + 1)(3 n - 10)/24, {n, 50}]] (* or *) LinearRecurrence[ {5, -10, 10, -5, 1},{-1, -1, 5, 25, 70}, 50] (* _Harvey P. Dale_, Jun 05 2012 *)
%o (PARI) x='x+O('x^99); Vec(x^2*(-1+4*x)/(1-x)^5) \\ _Altug Alkan_, Sep 13 2017
%Y Cf. similar sequences listed in A241765.
%K sign,easy
%O 2,3
%A _N. J. A. Sloane_, Jan 26 2001
%E More terms from _James A. Sellers_, Jan 26 2001