%I #31 Mar 08 2020 11:36:50
%S 1,1,1,1,2,2,1,4,6,6,1,7,18,24,24,1,11,46,96,120,120,1,16,101,326,600,
%T 720,720,1,22,197,932,2556,4320,5040,5040,1,29,351,2311,9080,22212,
%U 35280,40320,40320,1,37,583,5119,27568,94852,212976,322560,362880
%N Triangle read by rows: T(n,1) = 1, T(n,k) = T(n-1,k)+(n-1)*T(n-1,k-1) for 1<=k<=n+1.
%C Note: rows continue as factorials - stopped at second factorial for clarity.
%C T(n,n) = T(n,n+1) = n!. Sum of row n = n! + s(n,2), where s(n,2) are signless Stirling numbers of the first kind (A081046). T(n,k) = A109822(n,k) for 1<=k<=n (i.e. triangle without the last column is A109822). - _Emeric Deutsch_, Jul 03 2005
%C Sum(k=0..n-1, T(n,k))/T(n,n-1) are for n>=1 the harmonic numbers A001008(n)/A002805(n). - _Peter Luschny_, Sep 15 2014
%H Robert Israel, <a href="/A096747/b096747.txt">Table of n, a(n) for n = 0..10152</a> (rows 0..141, flattened)
%H R. P. Stanley, <a href="https://arxiv.org/abs/math/0501256">Ordering events in Minkowski space</a>, arXiv:math/0501256 [math.CO], 2005.
%F T(n+1, i) = n*T(n, i-1)+T(n, i)
%F T(n, k) = sum(|stirling1(n, n-i)|, i=0..k-1) for 1<=k<=n. - _Emeric Deutsch_, Jul 03 2005
%F E.g.f. as triangle: g(x,y) = Sum_{n>=0} Sum_{1<=k<=n+1} T(n,k) x^n y^k/n! where
%F g(x,y) = -y^2/((y-1)*(x*y-1)) - (1-x*y)^(-1/y)*(-y+y^2/(y-1)). - _Robert Israel_, Nov 28 2016
%e Triangle begins:
%e *0.........................1
%e *1......................1.....1
%e *2...................1.....2.....2
%e *3................1.....4.....6.....6
%e *4.............1.....7....18....24....24
%e *5..........1....11....46....96...120...120
%e *6.......1....16...101...326...600...720...720
%e *7....1....22...197...932..2556..4320..5040..5040
%e T(5,3)=46 because 4*7+18=46
%p T:=proc(n,k) if k=1 then 1 elif k=n+1 then n! else T(n-1,k)+(n-1)*T(n-1,k-1) fi end: for n from 0 to 11 do seq(T(n,k),k=1..n+1) od; # yields sequence in triangular form
%p with(combinat): T:=(n,k)->sum(abs(stirling1(n,n-i)),i=0..k-1): for n from 0 to 11 do seq(T(n,k),k=1..n+1) od; # yields sequence in triangular form; _Emeric Deutsch_, Jul 03 2005
%t T[n_, k_] := Sum[Abs[StirlingS1[n, n - i]], {i, 0, k}]; T[0, 0] := 1;
%t Table[T[n, k], {n, 0, 15}, {k, 0, n}]//Flatten (* _G. C. Greubel_, Dec 08 2016 *)
%o (Sage)
%o @CachedFunction
%o def T(n,k):
%o if n == 0: return 1
%o if k < 0: return 0
%o return T(n-1,k)+(n-1)*T(n-1,k-1)
%o for n in range(9): print([T(n,k) for k in (0..n)]) # _Peter Luschny_, Sep 15 2014
%Y Cf. A081046, A109822.
%K nonn,easy,tabl
%O 0,5
%A Thomas J Engelsma (tom(AT)opertech.com), Dec 05 2004
%E More terms from _Emeric Deutsch_, Jul 03 2005