|
|
A144435
|
|
Triangle T(n, k) = (m*(n-k) + 1)*T(n-1, k-1) + (m*(k-1) + 1)*T(n-1, k) + j*T(n-2, k-1), where T(n, 1) = T(n, n) = 1, m = -1, and j = 2, read by rows.
|
|
11
|
|
|
1, 1, 1, 1, 2, 1, 1, 1, 1, 1, 1, 0, 2, 0, 1, 1, -1, 0, 0, -1, 1, 1, -2, 3, 4, 3, -2, 1, 1, -3, 3, -17, -17, 3, -3, 1, 1, -4, 8, 28, 110, 28, 8, -4, 1, 1, -5, 10, -90, -476, -476, -90, 10, -5, 1
(list;
table;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,5
|
|
LINKS
|
|
|
FORMULA
|
T(n, k) = (m*(n-k) + 1)*T(n-1, k-1) + (m*(k-1) + 1)*T(n-1, k) + j*T(n-2, k-1), where T(n, 1) = T(n, n) = 1, m = -1, and j = 2.
T(n, n-k) = T(n, k).
T(n, 2) = 5 - n, n >= 3.
T(n, 3) = (1/2)*(n^2 - 11*n + 32) - (-1)^n, n >= 4.
T(n, 4) = (1/12)*(-2*n^3 + 36*n^2 - 226*n + 496 - (-1)^n*(2^n - 12*(n-1))), n >= 5. (End)
|
|
EXAMPLE
|
Triangle begins as:
1;
1, 1;
1, 2, 1;
1, 1, 1, 1;
1, 0, 2, 0, 1;
1, -1, 0, 0, -1, 1;
1, -2, 3, 4, 3, -2, 1;
1, -3, 3, -17, -17, 3, -3, 1;
1, -4, 8, 28, 110, 28, 8, -4, 1;
1, -5, 10, -90, -476, -476, -90, 10, -5, 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, 2], {n, 15}, {k, n}]//Flatten (* modified by G. C. Greubel, Mar 03 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 A144435(n, k): return T(n, k, -1, 2)
|
|
CROSSREFS
|
|
|
KEYWORD
|
|
|
AUTHOR
|
|
|
EXTENSIONS
|
|
|
STATUS
|
approved
|
|
|
|