login
A144446
Array t(n, k) = (k*(n-1) +2-k)*t(n-1, k) + k*t(n-2, k), with t(1, k) = 1, t(2, k) = 2, read by antidiagonals.
2
1, 2, 1, 7, 2, 1, 30, 10, 2, 1, 157, 64, 13, 2, 1, 972, 532, 110, 16, 2, 1, 6961, 5448, 1249, 168, 19, 2, 1, 56660, 66440, 17816, 2416, 238, 22, 2, 1, 516901, 941056, 306619, 44160, 4141, 320, 25, 2, 1, 5225670, 15189776, 6185828, 981184, 92292, 6532, 414, 28, 2, 1
OFFSET
1,2
LINKS
FORMULA
T(n, k) = t(n-k+1, k), where t(n, k) = (k*(n-1) +2-k)*t(n-1, k) + k*t(n-2, k) with t(1, k) = 1, t(2, k) = 2.
T(n, 1) = A001053(n+1).
T(n, k) = (k*(n-k)+2-k)*T(n-1, k) + k*T(n-2, k) with T(n, n-1) = 2, T(n, n) = 1 (as a triangle). - G. C. Greubel, Mar 05 2022
EXAMPLE
Array t(n,k) begins as:
1, 1, 1, 1, 1, 1, ...;
2, 2, 2, 2, 2, 2, ...;
7, 10, 13, 16, 19, 22, ...;
30, 64, 110, 168, 238, 320, ...;
157, 532, 1249, 2416, 4141, 6532, ...;
972, 5448, 17816, 44160, 92292, 171752, ...;
Antidiagonal triangle T(n,k) begins as:
1;
2, 1;
7, 2, 1;
30, 10, 2, 1;
157, 64, 13, 2, 1;
972, 532, 110, 16, 2, 1;
6961, 5448, 1249, 168, 19, 2, 1;
56660, 66440, 17816, 2416, 238, 22, 2, 1;
516901, 941056, 306619, 44160, 4141, 320, 25, 2, 1;
5225670, 15189776, 6185828, 981184, 92292, 6532, 414, 28, 2, 1;
MATHEMATICA
t[n_, k_]:= t[n, k]= If[n<3, n, (k*(n-1) +2-k)*t[n-1, k] + k*t[n-2, k]];
T[n_, k_]:= t[n-k+1, k];
Table[T[n, k], {n, 12}, {k, n}]//Flatten (* modified by G. C. Greubel, Mar 05 2022 *)
PROG
(Magma)
function T(n, k) // triangle form; A144446
if k gt n-2 then return n-k+1;
else return (k*(n-k)+2-k)*T(n-1, k) + k*T(n-2, k);
end if; return T;
end function;
[T(n, k): k in [1..n], n in [1..12]]; // G. C. Greubel, Mar 05 2022
(Sage)
def t(n, k): return n if(n<3) else (k*(n-1) +2-k)*t(n-1, k) + k*t(n-2, k)
def A144446(n, k): return t(n-k+1, k)
flatten([[A144446(n, k) for k in (1..n)] for n in (1..12)]) # G. C. Greubel, Mar 05 2022
KEYWORD
nonn,tabl
AUTHOR
EXTENSIONS
Edited by G. C. Greubel, Mar 05 2022
STATUS
approved