[go: up one dir, main page]

login
A144444
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.
8
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, 1, -6, 12, -5, -5, 12, -6, 1, 1, -7, 23, -50, 47, -50, 23, -7, 1, 1, -8, 25, -27, 64, 64, -27, 25, -8, 1
OFFSET
1,8
FORMULA
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.
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.
From G. C. Greubel, Mar 04 2022: (Start)
Sum_{k=1..n} T(n, k) = 2*[n<3] + (-1)^(n-1)*A075374(n-2).
T(n, n-k) = T(n, k).
T(n, 2) = [n=2] - n + 2.
T(n, 3) = (1/2)*((n^2 -5*n +5) -5*(-1)^n) - [n=3]. (End)
EXAMPLE
Triangle begins as:
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;
1, -6, 12, -5, -5, 12, -6, 1;
1, -7, 23, -50, 47, -50, 23, -7, 1;
1, -8, 25, -27, 64, 64, -27, 25, -8, 1;
MATHEMATICA
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]];
Table[T[n, k, -1, -1], {n, 15}, {k, n}]//Flatten (* modified by G. C. Greubel, Mar 04 2022 *)
PROG
(Sage)
def T(n, k, m, j):
if (k==1 or k==n): return 1
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)
def A144444(n, k): return T(n, k, -1, -1)
flatten([[A144444(n, k) for k in (1..n)] for n in (1..15)]) # G. C. Greubel, Mar 04 2022
KEYWORD
sign,tabl
AUTHOR
STATUS
approved