|
|
A335588
|
|
Number of n-step n-dimensional nonnegative lattice walks starting at the origin and using steps that increment all components or decrement one component by 1.
|
|
2
|
|
|
1, 1, 3, 13, 81, 686, 7525, 102173, 1655241, 31119382, 665254791, 15927737772, 422179410829, 12275253219828, 388591800808471, 13309116622983421, 490515662121994785, 19362705183912628838, 815258217524407553989, 36479395828632610279316, 1729012534789121191076601
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
0,3
|
|
LINKS
|
|
|
FORMULA
|
a(n) == 1 (mod n) for n >= 2.
|
|
EXAMPLE
|
a(2) = 3: [(0,0),(1,1),(2,2)], [(0,0),(1,1),(0,1)], [(0,0),(1,1),(1,0)].
|
|
MAPLE
|
b:= proc(n, l) option remember; `if`(n=0, 1, b(n-1, map(x-> x+1, l))+add(
`if`(l[i]>0, b(n-1, sort(subsop(i=l[i]-1, l))), 0), i=1..nops(l)))
end:
a:= n-> b(n, [0$n]):
seq(a(n), n=0..23);
|
|
MATHEMATICA
|
b[n_, l_] := b[n, l] = If[n == 0, 1, b[n - 1, l + 1] + Sum[If[l[[i]] > 0, b[n - 1, Sort[ReplacePart[l, i -> l[[i]] - 1]]], 0], {i, 1, Length[l]}]];
a[n_] := b[n, Table[0, {n}]];
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,walk
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|