login
A144447
Triangle T(n, k) = T(n-1, k) + T(n, k-1) + T(n-1, k-1) + T(n-2, k-1), with T(n, 1) = T(n, n) = 1, read by rows.
3
1, 1, 1, 1, 4, 1, 1, 7, 13, 1, 1, 10, 34, 49, 1, 1, 13, 64, 160, 211, 1, 1, 16, 103, 361, 781, 994, 1, 1, 19, 151, 679, 1981, 3967, 4963, 1, 1, 22, 208, 1141, 4162, 10891, 20815, 25780, 1, 1, 25, 274, 1774, 7756, 24790, 60463, 112021, 137803, 1
OFFSET
1,5
FORMULA
T(n, k) = T(n-1, k) + T(n, k-1) + T(n-1, k-1) + T(n-2, k-1), with T(n, 1) = T(n, n) = 1.
From G. C. Greubel, Mar 09 2022: (Start)
T(n, 2) = (3*n) - 5.
T(n, 3) = (1/2!)*((3*n)^2 - 13*(3*n) + 38).
T(n, 4) = (1/3!)*((3*n)^3 - 24*(3*n)^2 + 195*(3*n) - 606).
T(n, 5) = (1/4!)*((3*n)^4 - 38*(3*n)^3 + 579*(3*n)^2 - 4422*(3*n) + 13704). (End)
EXAMPLE
Triangle begins as:
1;
1, 1;
1, 4, 1;
1, 7, 13, 1;
1, 10, 34, 49, 1;
1, 13, 64, 160, 211, 1;
1, 16, 103, 361, 781, 994, 1;
1, 19, 151, 679, 1981, 3967, 4963, 1;
1, 22, 208, 1141, 4162, 10891, 20815, 25780, 1;
1, 25, 274, 1774, 7756, 24790, 60463, 112021, 137803, 1;
MATHEMATICA
T[n_, k_]:= T[n, k]= If[k==1 || k==n, 1, T[n-1, k]+T[n, k-1]+T[n-1, k-1]+T[n-2, k-1]];
Table[T[n, k], {n, 15}, {k, n}]//Flatten
PROG
(Sage)
def T(n, k): return 1 if (k==1 or k==n) else T(n-1, k) + T(n, k-1) + T(n-1, k-1) + T(n-2, k-1) # A144447
flatten([[T(n, k) for k in (1..n)] for n in (1..15)]) # G. C. Greubel, Mar 06 2022
CROSSREFS
Sequence in context: A193636 A232968 A119673 * A051455 A346875 A289511
KEYWORD
nonn,tabl
AUTHOR
EXTENSIONS
Edited by G. C. Greubel, Mar 06 2022
STATUS
approved