login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A328299 Number of n-step walks on cubic lattice starting at (0,0,0), ending at (floor(n/3), floor((n+1)/3), floor((n+2)/3)), remaining in the first (nonnegative) octant and using steps (0,0,1), (0,1,0), (1,0,0), (-1,1,1), (1,-1,1), and (1,1,-1). 3
1, 1, 3, 12, 41, 179, 909, 3968, 19680, 106368, 516905, 2717631, 15139485, 77813569, 422589823, 2395441908, 12734635078, 70577595746, 404540380566, 2199035619696, 12356298623126, 71368686011040, 394076753535029, 2236273925952447, 12988459939106601 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,3
LINKS
Wikipedia, Lattice path
EXAMPLE
a(2) = 3: [(0,0,0),(1,0,0),(0,1,1)], [(0,0,0),(0,1,0),(0,1,1)], [(0,0,0),(0,0,1),(0,1,1)].
MAPLE
b:= proc(l) option remember; `if`(l[-1]=0, 1, (r-> add(
add(add(`if`(i+j+k=1, (h-> `if`(h[1]<0, 0, b(h)))(
sort(l-[i, j, k])), 0), k=r), j=r), i=r))([$-1..1]))
end:
a:= n-> b([floor((n+i)/3)$i=0..2]):
seq(a(n), n=0..24);
MATHEMATICA
b[l_] := b[l] = If[Last[l] == 0, 1, Sum[If[i + j + k == 1, Function[h, If[h[[1]] < 0, 0, b[h]]][Sort[l - {i, j, k}]], 0], {i, {-1, 0, 1}}, {j, {-1, 0, 1}}, {k, {-1, 0, 1}}]];
a[n_] := b[Table[Floor[(n+i)/3], {i, 0, 2}]];
a /@ Range[0, 24] (* Jean-François Alcover, May 12 2020, after Maple *)
CROSSREFS
Sequence in context: A017940 A038342 A260153 * A135264 A358690 A084529
KEYWORD
nonn,walk
AUTHOR
Alois P. Heinz, Oct 11 2019
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 10:34 EDT 2024. Contains 371967 sequences. (Running on oeis4.)