%I #9 Mar 05 2022 01:39:37
%S 1,1,1,1,-1,1,1,-2,-2,1,1,-3,5,-3,1,1,-4,3,3,-4,1,1,-5,12,-17,12,-5,1,
%T 1,-6,12,-5,-5,12,-6,1,1,-7,23,-50,47,-50,23,-7,1,1,-8,25,-27,64,64,
%U -27,25,-8,1
%N Triangle read by rows: T(n, k) = (1-n+k)*T(n-1, k-1) + (2-k)*T(n-1, k) - T(n-2, k-1) with T(n, 1) = T(n, n) = 1.
%H G. C. Greubel, <a href="/A144444/b144444.txt">Rows n = 1..50 of the triangle, flattened</a>
%F T(n, k) = (1-n+k)*T(n-1, k-1) + (2-k)*T(n-1, k) - T(n-2, k-1) with T(n, 1) = T(n, n) = 1.
%F Sum_{k=1..n} T(n, k) = s(n), where s(n) = -(n-4)*s(n-1) - s(n-2), s(1) = 1, s(2) = 2.
%F From _G. C. Greubel_, Mar 04 2022: (Start)
%F Sum_{k=1..n} T(n, k) = 2*[n<3] + (-1)^(n-1)*A075374(n-2).
%F T(n, n-k) = T(n, k).
%F T(n, 2) = [n=2] - n + 2.
%F T(n, 3) = (1/2)*((n^2 -5*n +5) -5*(-1)^n) - [n=3]. (End)
%e Triangle begins as:
%e 1;
%e 1, 1;
%e 1, -1, 1;
%e 1, -2, -2, 1;
%e 1, -3, 5, -3, 1;
%e 1, -4, 3, 3, -4, 1;
%e 1, -5, 12, -17, 12, -5, 1;
%e 1, -6, 12, -5, -5, 12, -6, 1;
%e 1, -7, 23, -50, 47, -50, 23, -7, 1;
%e 1, -8, 25, -27, 64, 64, -27, 25, -8, 1;
%t T[n_, k_, m_, j_]:= T[n,k,m,j]= If[k==1 || k==n, 1, (m*(n-k)+1)*T[n-1,k-1,m,j] + (m*(k-1)+1)*T[n-1,k,m,j] + j*T[n-2,k-1,m,j]];
%t Table[T[n,k,-1,-1], {n,15}, {k,n}]//Flatten (* modified by _G. C. Greubel_, Mar 04 2022 *)
%o (Sage)
%o def T(n,k,m,j):
%o if (k==1 or k==n): return 1
%o else: return (m*(n-k)+1)*T(n-1,k-1,m,j) + (m*(k-1)+1)*T(n-1,k,m,j) + j*T(n-2,k-1,m,j)
%o def A144444(n,k): return T(n,k,-1,-1)
%o flatten([[A144444(n,k) for k in (1..n)] for n in (1..15)]) # _G. C. Greubel_, Mar 04 2022
%Y Cf. A144431, A144432, A144435, A144436, A144438, A144439, A144440, A144441, A144442, A144443, A144445.
%Y Cf. A075374.
%K sign,tabl
%O 1,8
%A _Roger L. Bagula_ and _Gary W. Adamson_, Oct 05 2008