OFFSET
0,2
FORMULA
T(n, k) = binomial(n, k)*Sum_{j=k..n} n!/(k!*(j-k)!).
T(n, k) = binomial(n, k)^2 * KummerU(k - n, k - n, 1).
T(n, k) = binomial(n, k) * A073107(n, k).
EXAMPLE
Triangle starts:
[0] 1;
[1] 2, 1;
[2] 5, 8, 1;
[3] 16, 45, 18, 1;
[4] 65, 256, 180, 32, 1;
[5] 326, 1625, 1600, 500, 50, 1;
[6] 1957, 11736, 14625, 6400, 1125, 72, 1;
[7] 13700, 95893, 143766, 79625, 19600, 2205, 98, 1;
[8] 109601, 876800, 1534288, 1022336, 318500, 50176, 3920, 128, 1;
MAPLE
T := (n, k) -> exp(1)*GAMMA(n - k + 1, 1)*binomial(n, k)^2:
seq(seq(simplify(T(n, k)), k = 0..n), n=0..8);
# Alternative:
A377661 := (n, k) -> n!*binomial(n, k)*add(1/(k!*(j-k)!), j = k..n):
for n from 0 to 8 do seq(A377661(n, k), k = 0..n) od;
# Or:
T := (n, k) -> binomial(n, k)^2 * KummerU(k - n, k - n, 1):
for n from 0 to 8 do seq(simplify(T(n, k)), k= 0..n) od;
MATHEMATICA
T[n_, k_] := E Binomial[n, k]^2 Gamma[1 - k + n, 1];
Table[T[n, k], {n, 0, 8}, {k, 0, n}] // Flatten
PROG
(Python)
from math import comb, isqrt, factorial
def A377661(n):
a = (m:=isqrt(k:=n+1<<1))-(k<=m*(m+1))
b = n-comb(a+1, 2)
fa, fb = factorial(a), factorial(b)
return comb(a, b)*sum(fa//(fb*factorial(j-b)) for j in range(b, a+1)) # Chai Wah Wu, Nov 12 2024
CROSSREFS
KEYWORD
nonn,tabl
AUTHOR
Peter Luschny, Nov 03 2024
STATUS
approved