OFFSET
0,8
COMMENTS
T(n,k) is the number of k-step closed paths (from origin to origin) in 2-dimensional lattice, using steps (t_1,t_2) (|t_1| + |t_2| = 2*n).
T(n,k) is the constant term in the expansion of (Sum_{j=0..2*n} (x^j + 1/x^j)*(y^(2*n-j) + 1/y^(2*n-j)) - x^(2*n) - 1/x^(2*n) - y^(2*n) - 1/y^(2*n))^k for n > 0.
LINKS
Seiichi Manyama, Antidiagonals n = 0..100, flattened
Wikipedia, Taxicab geometry.
FORMULA
T(0,k) = 1^k = 1.
See the second code written in PARI.
EXAMPLE
Square array begins:
1, 1, 1, 1, 1, 1, ...
1, 0, 8, 24, 216, 1200, ...
1, 0, 16, 48, 1200, 10200, ...
1, 0, 24, 72, 3336, 34800, ...
1, 0, 32, 96, 7008, 82800, ...
1, 0, 40, 120, 12600, 162000, ...
PROG
(PARI) {T(n, k) = if(n==0, 1, polcoef(polcoef((sum(j=0, 2*n, (x^j+1/x^j)*(y^(2*n-j)+1/y^(2*n-j)))-x^(2*n)-1/x^(2*n)-y^(2*n)-1/y^(2*n))^k, 0), 0))}
(PARI) f(n) = (x^(n+1)-1/x^n)/(x-1);
T(n, k) = if(n==0, 1, sum(j=0, k, (-1)^(k-j)*binomial(k, j)*polcoef(f(n)^j*f(n-1)^(k-j), 0)^2))
CROSSREFS
KEYWORD
AUTHOR
Seiichi Manyama, Nov 03 2019
STATUS
approved