%I #79 Oct 19 2023 12:51:31
%S 1,2,1,4,8,1,8,52,20,1,16,320,292,40,1,32,1936,3824,1092,70,1,64,
%T 11648,47824,25664,3192,112,1,128,69952,585536,561104,121424,7896,168,
%U 1,256,419840,7096384,11807616,4203824,453056,17304,240,1,512,2519296,85576448,243248704,137922336,23232176,1422080,34584,330,1
%N Triangle of Legendre-Stirling numbers of the second kind T(n,j), n >= 1, 1 <= j <= n, read by rows.
%C Removing a factor of 2^m from the m-th subdiagonal (the main diagonal corresponds to m = 0) gives the triangle A080248. - _Peter Bala_, Oct 15 2023
%H Robert Israel, <a href="/A071951/b071951.txt">Table of n, a(n) for n = 1..10011</a> (first 141 rows, flattened)
%H G. E. Andrews, W. Gawronski and L. L. Littlejohn, <a href="https://doi.org/10.1016/j.disc.2011.02.028">The Legendre-Stirling Numbers</a>, Discrete Mathematics, Volume 311, Issue 14, 28 July 2011, Pages 1255-1272.
%H M. W. Coffey, M. C. Lettington, <a href="http://arxiv.org/abs/1510.05402">On Fibonacci Polynomial Expressions for Sums of mth Powers, their implications for Faulhaber's Formula and some Theorems of Fermat</a>, arXiv:1510.05402 [math.NT], 2015.
%H R. B. Corcino, K. J. M. Gonzales, M. J. C. Loquias and E. L. Tan, <a href="http://arxiv.org/abs/1302.4694">Dually weighted Stirling-type sequences</a>, arXiv:1302.4694 [math.CO], 2013.
%H R. B. Corcino, K. J. M. Gonzales, M. J. C. Loquias and E. L. Tan, <a href="http://dx.doi.org/10.1016/j.ejc.2014.06.010">Dually weighted Stirling-type sequences</a>, Europ. J. Combin., 43, 2015, 55-67.
%H José L. Cereceda, <a href="https://arxiv.org/abs/2301.02141">A refinement of Lang's formula for the sum of powers of integers</a>, arXiv:2301.02141 [math.NT], 2023.
%H E. S. Egge, <a href="https://doi.org/10.1016/j.ejc.2010.03.005">Legendre-Stirling permutations</a>, Eur. J. Combin. 13 (2010) 1735-1750.
%H W. N. Everitt, L. L. Littlejohn and R. Wellman, <a href="http://dx.doi.org/10.1016/S0377-0427(02)00582-4">Legendre polynomials, Legendre-Stirling numbers and the left-definite spectral analysis of the Legendre differential expression</a>, J. Comput. Appl. Math. 148, 2002, 213-238.
%H H. Li, T. MacHenry, <a href="https://cs.uwaterloo.ca/journals/JIS/VOL16/MacHenry/machenry7.html">Permanents and Determinants, Weighted Isobaric Polynomials, and Integer Sequences</a>, J. Int. Seq. 16 (2013) #13.3.5, Theorem 43.
%H L. L. Littlejohn and R. Wellman, <a href="http://dx.doi.org/10.1006/jdeq.2001.4078">A general left-definite theory for certain self-adjoint operators with applications to differential equations</a>, J. Differential Equations, 181(2), 2002, 280-339.
%F T(n, j) = Sum_{r=1..j} (-1)^(r+j)*(2*r+1)*(r^2+r)^n/((r+j+1)!*(j-r)!).
%F G.f. for j-th column (without leading zeros): 1/Product_{r=1..j} (1 - r*(r+1)*x), j >= 1. From eq.(4.5) of the Everitt et al. paper.
%F A135921(n+1) = row sums. - _Michael Somos_, Feb 25 2012
%F Sum_{n=j..m} binomial(m,n)*T(n,j)*4^(n-j) = A160562(m,j) for 1 <= j <= m. - _Werner Schulte_, Dec 03 2015
%e The triangle begins:
%e n\j 1 2 3 4 5 6 7 8 9 ...
%e 1: 1
%e 2: 2 1
%e 3: 4 8 1
%e 4: 8 52 20 1
%e 5: 16 320 292 40 1
%e 6: 32 1936 3824 1092 70 1
%e 7: 64 11648 47824 25664 3192 112 1
%e 8: 128 69952 585536 561104 121424 7896 168 1
%e 9: 256 419840 7096384 11807616 4203824 453056 17304 240 1
%e ...
%e Row 10: 512 2519296 85576448 243248704 137922336 23232176 1422080 34584 330 1. Reformatted by _Wolfdieter Lang_, Apr 10 2013
%p N:= 20: # to get the first N rows, flattened
%p for j from 1 to N do S[j]:= series(x^j/mul(1-r*(r+1)*x, r=1..j), x, N+1) od:
%p seq(seq(coeff(S[j],x,i),j=1..i),i=1..N); # _Robert Israel_, Dec 03 2015
%p # alternative
%p A071951 := proc(n,k)
%p option remember;
%p if k =0 then
%p if n = 0 then
%p 1;
%p else
%p 0;
%p end if;
%p elif n = 0 then
%p if k =0 then
%p 1;
%p else
%p 0;
%p end if;
%p else
%p procname(n-1,k-1)+k*(k+1)*procname(n-1,k) ;
%p end if;
%p end proc: # _R. J. Mathar_, Jun 30 2018
%t Flatten[ Table[ Sum[(-1)^{r + j}(2r + 1)(r^2 + r)^n/((r + j + 1)!(j - r)!), {r, j}], {n, 10}, {j, n}]]
%o (PARI) {T(n, k) = sum( i=0, k, (-1)^(i+k) * (2*i + 1) * (i*i + i)^n / (k-i)! / (k+i+1)! )} /* _Michael Somos_, Feb 25 2012 */
%o (Magma) [[(&+[(-1)^(r+j)*(2*r+1)*(r^2+r)^n/(Factorial(r+j+1)*Factorial(j-r)): r in [1..j]]): j in [1..n]]: n in [1..12]]; // _G. C. Greubel_, Mar 16 2019
%o (Sage) [[sum( (-1)^(r+j)*(2*r+1)*(r^2+r)^n/(factorial(r+j+1)*factorial(j-r)) for r in (1..j)) for j in (1..n)] for n in (1..12)] # _G. C. Greubel_, Mar 16 2019
%Y Diagonals give A007290, A000079, A016129, A016309.
%Y The column sequences are A000079 (powers of 2), A016129, A016309, A071952, A089274, A089277.
%Y Cf. A080248, A089278, A089500, A160562.
%K nonn,tabl
%O 1,2
%A _N. J. A. Sloane_, Jun 16 2002