A371568 Array read by ascending antidiagonals: A(n, k) is the number of paths of length k in Z^n from the origin to points such that x1+x2+...+xn = k with x1,...,xn > 0.
1, 0, 1, 0, 2, 1, 0, 0, 6, 1, 0, 0, 6, 14, 1, 0, 0, 0, 36, 30, 1, 0, 0, 0, 24, 150, 62, 1, 0, 0, 0, 0, 240, 540, 126, 1, 0, 0, 0, 0, 120, 1560, 1806, 254, 1, 0, 0, 0, 0, 1800, 8400, 5796, 510, 1
Offset: 1
Examples
n\k 1 2 3 4 5 6 7 8 9 10 -------------------------------------------------- 1| 1 1 1 1 1 1 1 1 1 1 2| 0 2 6 14 30 62 126 254 510 1022 3| 0 0 6 36 150 540 1806 5796 18150 55980 4| 0 0 0 24 240 1560 8400 40824 186480 818520 5| 0 0 0 0 120 1800 16800 126000 834120 5103000 6| 0 0 0 0 0 720 15120 191520 1905120 16435440 7| 0 0 0 0 0 0 5040 141120 2328480 29635200 8| 0 0 0 0 0 0 0 40320 1451520 30240000 9| 0 0 0 0 0 0 0 0 362880 16329600 10| 0 0 0 0 0 0 0 0 0 3628800
Crossrefs
Programs
-
Mathematica
A[n_,k_] := Sum[(-1)^(n-i) * i^k * Binomial[n,i], {i,1,n}]
-
Python
# The Akiyama-Tanigawa algorithm for the binomial generates the rows. # Adds row(0) = 0^k and column(0) = 0^n. from math import comb as binomial def ATBinomial(n, len): A = [0] * len R = [0] * len for k in range(len): R[k] = binomial(k, n) for j in range(k, 0, -1): R[j - 1] = j * (R[j] - R[j - 1]) A[k] = R[0] return A for n in range(11): print([n], ATBinomial(n, 11)) # Peter Luschny, Apr 19 2024
Formula
A(n,k) = Sum_{i=1..n} (-1)^(n-i) * binomial(n,i) * i^k
Comments