OFFSET
1,5
LINKS
G. C. Greubel, Rows n = 1..50 of the triangle, flattened
FORMULA
T(n, k) = (3*n-3*k+1)*T(n-1, k-1) +(3*k-2)*T(n-1, k) + 3*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) = (3*n-4)*s(n-1) + 3*s(n-2), s(1) = 1, s(2) = 2.
From G. C. Greubel, Mar 03 2022: (Start)
T(n, n-k) = T(n, k).
T(n, 2) = (1/3)*(11*4^(n-2) - (3*n+2)).
T(n, 3) = (1/18)*(9*n^2 + 3*n - 11 - 22*4^(n-3)*(12*n-1) + 709*7^(n-3)). (End)
EXAMPLE
Triangle begins as:
1;
1, 1;
1, 11, 1;
1, 54, 54, 1;
1, 229, 789, 229, 1;
1, 932, 7975, 7975, 932, 1;
1, 3747, 68628, 161867, 68628, 3747, 1;
1, 15010, 543144, 2534759, 2534759, 543144, 15010, 1;
1, 60065, 4098439, 34243778, 66389335, 34243778, 4098439, 60065, 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, 3, 3], {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 A144440(n, k): return T(n, k, 3, 3)
flatten([[A144440(n, k) for k in (1..n)] for n in (1..15)]) # G. C. Greubel, Mar 03 2022
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Roger L. Bagula and Gary W. Adamson, Oct 05 2008
STATUS
approved