%I #81 Aug 23 2021 22:32:34
%S 1,1,1,1,1,1,1,1,2,1,1,1,3,5,1,1,1,4,12,15,1,1,1,5,22,60,52,1,1,1,6,
%T 35,154,358,203,1,1,1,7,51,315,1304,2471,877,1,1,1,8,70,561,3455,
%U 12915,19302,4140,1,1,1,9,92,910,7556,44590,146115,167894,21147,1,1,1,10,117
%N Square array A(n,k), n >= 0, k >= 0, read by antidiagonals, where the e.g.f. of column k is 1+g^(k+1)(x) with g = x-> exp(x)-1.
%C A(n,k) is also the number of (k+1)-level labeled rooted trees with n leaves.
%C Number of ways to start with set {1,2,...,n} and then repeat k times: partition each set into subsets. - _Alois P. Heinz_, Aug 14 2015
%C Equivalently, A(n,k) is the number of length k+1 multichains from bottom to top in the set partition lattice of an n-set. - _Geoffrey Critzer_, Dec 05 2020
%H Alois P. Heinz, <a href="/A144150/b144150.txt">Antidiagonals n = 0..140, flattened</a>
%H E. T. Bell, <a href="http://doi.org/10.2307/1968633">The Iterated Exponential Integers</a>, Annals of Mathematics, 39(3) (1938), 539-557.
%H Pierpaolo Natalini and Paolo Emilio Ricci, <a href="https://doi.org/10.2298/AADM1702327N">Higher order Bell polynomials and the relevant integer sequences</a>, in Appl. Anal. Discrete Math. 11 (2017), 327-339.
%H Pierpaolo Natalini and Paolo E. Ricci, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL20/Ricci/ricci3.html">Integer Sequences Connected with Extensions of the Bell Polynomials</a>, Journal of Integer Sequences, 2017, Vol. 20, #17.10.2.
%H Ivar Henning Skau and Kai Forsberg Kristensen, <a href="https://arxiv.org/abs/1903.07979">An asymptotic Formula for the iterated exponential Bell Numbers</a>, arXiv:1903.07979 [math.CO], 2019.
%H Ivar Henning Skau and Kai Forsberg Kristensen, <a href="https://arxiv.org/abs/1903.08379">Sets of iterated Partitions and the Bell iterated Exponential Integers</a>, arXiv:1903.08379 [math.CO], 2019.
%H <a href="/index/Ro#rooted">Index entries for sequences related to rooted trees</a>
%F E.g.f. of column k: 1 + g^(k+1)(x) with g = x-> exp(x)-1.
%F Column k+1 is Stirling transform of column k.
%e Square array begins:
%e 1, 1, 1, 1, 1, 1, ...
%e 1, 1, 1, 1, 1, 1, ...
%e 1, 2, 3, 4, 5, 6, ...
%e 1, 5, 12, 22, 35, 51, ...
%e 1, 15, 60, 154, 315, 561, ...
%e 1, 52, 358, 1304, 3455, 7556, ...
%p g:= proc(p) local b; b:= proc(n) option remember; if n=0 then 1
%p else (n-1)! *add(p(k)*b(n-k)/(k-1)!/(n-k)!, k=1..n) fi
%p end end:
%p A:= (n,k)-> (g@@k)(1)(n):
%p seq(seq(A(n, d-n), n=0..d), d=0..12);
%p # second Maple program:
%p A:= proc(n, k) option remember; `if`(n=0 or k=0, 1,
%p add(binomial(n-1, j-1)*A(j, k-1)*A(n-j, k), j=1..n))
%p end:
%p seq(seq(A(n, d-n), n=0..d), d=0..12); # _Alois P. Heinz_, Aug 14 2015
%p # third Maple program:
%p b:= proc(n, t, m) option remember; `if`(t=0, 1, `if`(n=0,
%p b(m, t-1, 0), m*b(n-1, t, m)+b(n-1, t, m+1)))
%p end:
%p A:= (n, k)-> b(n, k, 0):
%p seq(seq(A(n, d-n), n=0..d), d=0..12); # _Alois P. Heinz_, Aug 04 2021
%t g[k_] := g[k] = Nest[Function[x, E^x - 1], x, k]; a[n_, k_] := SeriesCoefficient[1 + g[k + 1], {x, 0, n}]*n!; Table[a[n - k, k], {n, 0, 12}, {k, n, 0, -1}] // Flatten (* _Jean-François Alcover_, Dec 06 2013 *)
%o (Python)
%o from sympy.core.cache import cacheit
%o from sympy import binomial
%o @cacheit
%o def A(n, k): return 1 if n==0 or k==0 else sum([binomial(n - 1, j - 1)*A(j, k - 1)*A(n - j, k) for j in range(1, n + 1)])
%o for n in range(51): print([A(k, n - k) for k in range(n + 1)]) # _Indranil Ghosh_, Aug 07 2017
%Y Columns k=0-10 give: A000012, A000110, A000258, A000307, A000357, A000405, A001669, A081624, A081629, A081697, A081740.
%Y Rows n=0+1, 2-5 give: A000012, A000027, A000326, A005945, A005946.
%Y First lower diagonal gives A139383.
%Y First upper diagonal gives A346802.
%Y Main diagonal gives A261280.
%Y Cf. A000142, A111672, A290353.
%K nonn,tabl
%O 0,9
%A _Alois P. Heinz_, Sep 11 2008