[go: up one dir, main page]

login
A340591
Number A(n,k) of n*(k+1)-step k-dimensional nonnegative closed lattice walks starting at the origin and using steps that increment all components or decrement one component by 1; square array A(n,k), n>=0, k>=0, read by antidiagonals.
6
1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 6, 16, 5, 1, 1, 24, 288, 192, 14, 1, 1, 120, 9216, 24444, 2816, 42, 1, 1, 720, 460800, 7303104, 2738592, 46592, 132, 1, 1, 5040, 33177600, 4234233600, 8204167296, 361998432, 835584, 429, 1, 1, 40320, 3251404800, 4223111040000, 59027412643200, 11332298092032, 53414223552, 15876096, 1430, 1
OFFSET
0,8
LINKS
EXAMPLE
Square array A(n,k) begins:
1, 1, 1, 1, 1, 1, ...
1, 1, 2, 6, 24, 120, ...
1, 2, 16, 288, 9216, 460800, ...
1, 5, 192, 24444, 7303104, 4234233600, ...
1, 14, 2816, 2738592, 8204167296, 59027412643200, ...
1, 42, 46592, 361998432, 11332298092032, 1052109889288796160, ...
MAPLE
b:= proc(n, l) option remember; `if`(n=0, 1, (k-> add(
`if`(l[i]>0, b(n-1, sort(subsop(i=l[i]-1, l))), 0), i=1..k)+
`if`(add(i, i=l)+k<n, b(n-1, map(x-> x+1, l)), 0))(nops(l)))
end:
A:= (n, k)-> b(k*n+n, [0$k]):
seq(seq(A(n, d-n), n=0..d), d=0..10);
MATHEMATICA
b[n_, l_] := b[n, l] = If[n == 0, 1, Function[k, Sum[
If[l[[i]]>0, b[n-1, Sort[ReplacePart[l, i -> l[[i]]-1]]], 0], {i, 1, k}]+
If[Sum[i, {i, l}] + k < n, b[n - 1, Map[#+1&, l]], 0]][Length[l]]];
A[n_, k_] := b[k*n + n, Table[0, {k}]];
Table[Table[A[n, d - n], {n, 0, d}], {d, 0, 10}] // Flatten (* Jean-François Alcover, Jan 26 2021, after Alois P. Heinz *)
CROSSREFS
Columns k=0-3 give: A000012, A000108, A006335, A340540.
Rows n=0-2 give: A000012, A000142, |A055546|.
Main diagonal gives A340590.
Cf. A335570.
Sequence in context: A139331 A173886 A090441 * A155794 A107876 A121554
KEYWORD
nonn,tabl,walk
AUTHOR
Alois P. Heinz, Jan 12 2021
STATUS
approved