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”).
%I #30 Sep 08 2022 08:45:32
%S 0,1,9,66,490,3915,34251,328804,3452436,39456405,488273005,6510306726,
%T 93097386174,1421850988831,23105078568495,398118276872520,
%U 7251440043035176,139227648826275369,2810658160680434001,59519819873232720010,1319356007189991960210
%N Sum of entries in all the arrangements of the set {1,2,...,n} (to n=0 there corresponds the empty set).
%C Appears to be the binomial transform of A001286 (filled with the appropriate two leading zeros), shifted one index left. - _R. J. Mathar_, Apr 04 2012
%H Alois P. Heinz, <a href="/A134432/b134432.txt">Table of n, a(n) for n = 0..447</a>
%F a(n) = Sum_{k=0..n*(n+1)/2} k*A134431(n,k).
%F a(n) = (d/dt)P[n](t) evaluated at t=1; here P[n](t)=Q[n](t,1) where the polynomials Q[n](t,x) are defined by Q[0]=1 and Q[n]=Q[n-1] + xt^n (d/dx)xQ[n-1]. (Q[n](t,x) is the bivariate generating polynomial of the arrangements of {1,2,...,n}, where t (x) marks the sum (number) of the entries; for example, Q[2](t,x) = 1 + tx + t^2*x + 2t^3*x^2, corresponding to: empty, 1, 2, 12 and 21, respectively.)
%F E.g.f.: exp(x)*x*(2 + x - x^2) / (2*(1 - x)^3). - _Ilya Gutkovskiy_, Jun 02 2020
%F From _G. C. Greubel_, Jan 09 2022: (Start)
%F a(n) = A271705(n+1, 2).
%F a(n) = ((n+1)/2) * Sum_{j=0..n} j * j! * binomial(n, j).
%F a(n) = (1/n!)*binomial(n+1, 2) * Sum_{j=0..n} (j!)^2 * A271703(n, j). (End)
%F D-finite with recurrence (-n+1)*a(n) +(n+1)^2*a(n-1) -n*(n+1)*a(n-2)=0. - _R. J. Mathar_, Jul 26 2022
%e a(2)=9 because the arrangements of {1,2} are (empty), 1, 2, 12 and 21.
%p Q[0]:=1: for n to 17 do Q[n]:=sort(simplify(Q[n-1]+t^n*x*(diff(x*Q[n-1], x))), t) end do: for n from 0 to 17 do P[n]:=sort(subs(x=1,Q[n])) end do: seq(subs(t =1,diff(P[n],t)),n=0..17);
%p # second Maple program:
%p b:= proc(n, t) option remember; `if`(n=0, [t!, 0],
%p b(n-1, t)+(p-> p+[0, n*p[1]])(b(n-1, t+1)))
%p end:
%p a:= n-> b(n, 0)[2]:
%p seq(a(n), n=0..23); # _Alois P. Heinz_, Feb 19 2020
%t (* First program *)
%t b[n_, s_, t_]:= b[n, s, t] = If[n==0, t! x^s, b[n-1, s, t] + b[n-1, s+n, t+1]];
%t T[n_]:= T[n]= Function[p, Table[Coefficient[p, x, i], {i, 0, Exponent[p, x]}]] @ b[n, 0, 0];
%t a[n_] := Sum[k T[n][[k+1]], {k, 0, n(n+1)/2}];
%t a /@ Range[0, 20] (* _Jean-François Alcover_, Feb 19 2020, after _Alois P. Heinz_ *)
%t (* Second program *)
%t a[n_]:= ((n+1)/2)*Sum[j*j!*Binomial[n,j], {j,0,n}];
%t Table[a[n], {n, 0, 30}] (* _G. C. Greubel_, Jan 09 2022 *)
%o (Magma) [Binomial(n+1,2)*(&+[Factorial(j)*Binomial(n-1, j-1): j in [0..n]]): n in [0..30]]; // _G. C. Greubel_, Jan 09 2022
%o (Sage) [((n+1)/2)*sum( j*factorial(j)*binomial(n, j) for j in (0..n) ) for n in (0..30)] # _G. C. Greubel_, Jan 09 2022
%Y Cf. A000522, A001286, A134431, A271703, A271705, A326659.
%K nonn
%O 0,3
%A _Emeric Deutsch_, Nov 16 2007
%E More terms from _Alois P. Heinz_, Dec 22 2017