%I #18 Oct 16 2024 10:33:53
%S 1,2,1,5,6,2,16,33,24,6,65,196,228,120,24,326,1305,2120,1740,720,120,
%T 1957,9786,20550,23160,14760,5040,720,13700,82201,212352,305970,
%U 265440,138600,40320,5040,109601,767208,2356424,4146576,4571280,3232320,1431360,362880,40320
%N Triangle T(n,k) read by rows, where o.g.f. for T(n,k) is n!*Sum_{k=0..n} (1+x)^(n-k)/k!.
%C Row sums give A010844.
%H Alois P. Heinz, <a href="/A073474/b073474.txt">Rows n = 0..140, flattened</a>
%F E.g.f.: exp(x)/(1-x-x*y). - _Vladeta Jovovic_, Oct 17 2003
%F T(n, k) = Sum_{j=0..n} binomial(j, k)*FallingFactorial(n, j). - _Peter Luschny_, Oct 16 2024
%e Triangle begins:
%e 1;
%e 2, 1;
%e 5, 6, 2;
%e 16, 33, 24, 6;
%e 65, 196, 228, 120, 24;
%e 326, 1305, 2120, 1740, 720, 120;
%e ...
%p G:=simplify(series(exp(x)/(1-x-x*y),x=0,13)): P[0]:=1: for n from 1 to 11 do P[n]:=sort(n!*coeff(G,x^n)) od: seq(seq(coeff(y*P[n],y^k),k=1..n+1),n=0..9);
%p # second Maple program:
%p b:= proc(n, k) option remember; `if`(k>n, 0, `if`(k=0, 1,
%p n*(b(n-1, k-1)+b(n-1, k))))
%p end:
%p T:= (n, k)-> b(n+1, k+1)/(n+1):
%p seq(seq(T(n, k), k=0..n), n=0..9); # _Alois P. Heinz_, Sep 12 2019
%t b[n_, k_] := b[n, k] = If[k>n, 0, If[k==0, 1, n (b[n-1, k-1]+b[n-1, k])]];
%t T[n_, k_] := b[n+1, k+1]/(n+1);
%t Table[T[n, k], {n, 0, 9}, {k, 0, n}] // Flatten (* _Jean-François Alcover_, Dec 09 2019, after _Alois P. Heinz_ *)
%t T[n_, k_] := Sum[Binomial[j, k] FactorialPower[n, j], {j, 0, n}]; (* _Peter Luschny_, Oct 16 2024 *)
%o (SageMath)
%o def T(n, k): return sum(binomial(j, k) * falling_factorial(n, j) for j in range(n+1))
%o for n in range(8): print([T(n, k) for k in range(n+1)])
%o # _Peter Luschny_, Oct 16 2024
%Y Cf. A000142, A000522, A073107, A010844 (row sums).
%K easy,nonn,tabl
%O 0,2
%A _Vladeta Jovovic_, Aug 26 2002
%E Edited by _Emeric Deutsch_, Jun 10 2004