%I #82 Apr 07 2023 02:47:02
%S 1,0,1,0,1,3,0,1,10,15,0,1,25,105,105,0,1,56,490,1260,945,0,1,119,
%T 1918,9450,17325,10395,0,1,246,6825,56980,190575,270270,135135,0,1,
%U 501,22935,302995,1636635,4099095,4729725,2027025
%N Triangle read by rows, Ward numbers T(n, k) = Sum_{m=0..k} (-1)^(m + k) * binomial(n + k, n + m) * Stirling2(n + m, m), for n >= 0, 0 <= k <= n.
%C We propose to call this sequence the 'Ward set numbers' and sequence A269940 the 'Ward cycle numbers'. - _Peter Luschny_, Nov 25 2022
%H Peter Luschny, <a href="http://oeis.org/wiki/User:Peter_Luschny/P-Transform">The P-transform</a>.
%H Andrew Elvey Price and Alan D. Sokal, <a href="https://arxiv.org/abs/2001.01468">Phylogenetic trees, augmented perfect matchings, and a Thron-type continued fraction (T-fraction) for the Ward polynomials</a>, arXiv:2001.01468 [math.CO], 2020.
%H Marko Riedel, Math Stackexchange, <a href="http://math.stackexchange.com/questions/1739641/">Upper Stirling numbers and Ward numbers</a>.
%F T(n,k) = (-1)^k*FF(n+k,n)*P[n,k](1/(n+1)) where P is the P-transform and FF the falling factorial function. For the definition of the P-transform see the link.
%F T(n,k) = A268437(n,k)*FF(n+k,n)/(2*n)!.
%F T(n,k) = (n+k)! [z^{n+k}] (exp(z)-z-1)^k/k!. - _Marko Riedel_, Apr 14 2016
%F From _Fabián Pereyra_, Jan 12 2022: (Start)
%F T(n,k) = k*T(n-1,k) + (n+k-1)*T(n-1,k-1) for n > 0, T(0,0) = 1, T(n,0) = 0 for n > 0. (See the second Maple program.)
%F E.g.f.: A(x,t) = 1/((1+t)*(1 + W(-t/(1+t)*exp((x-t)/(1+t))))), where W(x) is the Lambert W-function.
%F T(n,k) = Sum_{j=0..k} E2(n,j)*binomial(n-j,k-j), where E2(n,k) are the second-order Eulerian numbers A340556.
%F T(n,k) = Sum_{j=k..n} (-1)^(n-j)*A112486(n,j)*binomial(j,k). (End)
%e Triangle starts:
%e 1;
%e 0, 1;
%e 0, 1, 3;
%e 0, 1, 10, 15;
%e 0, 1, 25, 105, 105;
%e 0, 1, 56, 490, 1260, 945;
%e 0, 1, 119, 1918, 9450, 17325, 10395;
%e 0, 1, 246, 6825, 56980, 190575, 270270, 135135;
%p # first version
%p A269939 := (n,k) -> add((-1)^(m+k)*binomial(n+k,n+m)*Stirling2(n+m, m), m=0..k):
%p seq(seq(A269939(n,k), k=0..n), n=0..8);
%p # Alternatively:
%p T := proc(n,k) option remember;
%p `if`(k=0 and n=0, 1,
%p `if`(k<=0 or k>n, 0,
%p k*T(n-1,k)+(n+k-1)*T(n-1,k-1))) end:
%p for n from 0 to 6 do seq(T(n,k),k=0..n) od;
%p # simple, third version
%p T := (n,k)-> (n+k)!*coeftayl((exp(z)-z-1)^k/k!, z=0, n+k); # _Marko Riedel_, Apr 14 2016
%t Table[Sum[(-1)^(m + k) Binomial[n + k, n + m] StirlingS2[n + m, m], {m, 0, k}], {n, 0, 8}, {k, 0, n}] // Flatten (* _Michael De Vlieger_, Apr 15 2016 *)
%o (Sage)
%o T = lambda n,k: sum((-1)^(m+k)*binomial(n+k,n+m)*stirling_number2(n+m,m) for m in (0..k))
%o for n in (0..6): print([T(n,k) for k in (0..n)])
%o (Sage) # uses[PtransMatrix from A269941]
%o PtransMatrix(8, lambda n: 1/(n+1), lambda n, k: (-1)^k*falling_factorial(n+k,n))
%o (PARI)
%o T(n) = {[Vecrev(Pol(p)) | p<-Vec(serlaplace(1/((1+y)*(1 + lambertw(-y/(1+y)*exp((x-y)/(1+y) + O(x*x^n)))))))]}
%o { my(A=T(8)); for(n=1, #A, print(A[n])) } \\ _Andrew Howroyd_, Jan 14 2022
%Y Variants: A134991 (main entry for this triangle), A181996.
%Y Row sums are A000311.
%Y Alternating row sums are signed factorials A133942.
%Y Cf. A269940 (Stirling1 counterpart), A268437.
%K nonn,tabl
%O 0,6
%A _Peter Luschny_, Mar 26 2016