A346225 Number of n-step 4-dimensional nonnegative lattice walks starting at the origin and using steps that increment all components or decrement one component by 1.
1, 1, 5, 21, 81, 325, 1433, 6473, 28741, 128457, 585837, 2711361, 12591237, 58423305, 272649261, 1281745485, 6054729657, 28656157453, 135772544321, 645415060421, 3078755726041, 14721799860429, 70493732528001, 337920205112261, 1623127315174873, 7811948782194781
Offset: 0
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..200
Crossrefs
Column k=4 of A335570.
Programs
-
Maple
b:= proc(n, l) option remember; `if`(n=0, 1, (k-> `if`(n>min(l), add(`if`(l[i]=0, 0, b(n-1, sort(subsop(i=l[i]-1, l)))), i=1..k)+b(n-1, map(x-> x+1, l)), (k+1)^n))(nops(l))) end: a:= n-> b(n, [0$4]): seq(a(n), n=0..27);
Formula
a(n) == 1 (mod 4).