A328300
Number T(n,k) of n-step walks on cubic lattice starting at (0,0,0), ending at (0,k,n-k), 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); triangle T(n,k), n>=0, 0<=k<=n, read by rows.
Original entry on oeis.org
1, 1, 1, 1, 3, 1, 1, 7, 7, 1, 1, 15, 26, 15, 1, 1, 31, 82, 82, 31, 1, 1, 63, 237, 343, 237, 63, 1, 1, 127, 651, 1257, 1257, 651, 127, 1, 1, 255, 1730, 4256, 5594, 4256, 1730, 255, 1, 1, 511, 4494, 13669, 22411, 22411, 13669, 4494, 511, 1, 1, 1023, 11485, 42279, 83680, 103730, 83680, 42279, 11485, 1023, 1
Offset: 0
Triangle T(n,k) begins:
1;
1, 1;
1, 3, 1;
1, 7, 7, 1;
1, 15, 26, 15, 1;
1, 31, 82, 82, 31, 1;
1, 63, 237, 343, 237, 63, 1;
1, 127, 651, 1257, 1257, 651, 127, 1;
1, 255, 1730, 4256, 5594, 4256, 1730, 255, 1;
...
-
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:
T:= (n, k)-> b(sort([0, k, n-k])):
seq(seq(T(n, k), k=0..n), n=0..12);
-
b[l_List] := b[l] = If[l[[-1]] == 0, 1, Function[r, Sum[Sum[Sum[If[i + j + k == 1, Function[h, If[h[[1]] < 0, 0, b[h]]][Sort[l - {i, j, k}]], 0], {k, r}], {j, r}], {i, r}]][{-1, 0, 1}]];
T[n_, k_] := b[Sort[{0, k, n - k}]];
Table[T[n, k], {n, 0, 12}, {k, 0, n}] // Flatten (* Jean-François Alcover, May 10 2020, after Maple *)
A328280
Number of n-step walks on cubic lattice starting at (0,0,0), ending at (0,floor(n/2),ceiling(n/2)), 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).
Original entry on oeis.org
1, 1, 3, 7, 26, 82, 343, 1257, 5594, 22411, 103730, 440350, 2094028, 9255877, 44889351, 204385719, 1006126370, 4685719954, 23337166962, 110633755459, 556199376622, 2674751727209, 13550764116530, 65935784179142, 336190200180652, 1651985253047884
Offset: 0
Bisection gives
A328269 (even part).
-
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-> (t-> b([0, t, n-t]))(iquo(n, 2)):
seq(a(n), n=0..31);
-
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_] := With[{t = Quotient[n, 2]}, b[{0, t, n - t}]];
a /@ Range[0, 31] (* Jean-François Alcover, May 12 2020, after Maple *)
A328270
Total number of nodes in all walks on cubic lattice starting at (0,0,0), ending at (0,n,n), 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).
Original entry on oeis.org
1, 9, 130, 2401, 50346, 1141030, 27222364, 673340265, 17104148290, 443406172278, 11680186909062, 311667574680190, 8404755004516300, 228659546010880620, 6267500870514732780, 172891678107177498193, 4795723803862121368590, 133668769806498536349670
Offset: 0
a(1) = 9: nodes in [(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)].
-
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-> (2*n+1)*b([0, n$2]):
seq(a(n), n=0..23);
-
b[l_] := b[l] = If[Last[l] == 0, 1, Function[r, Sum[If[i + j + k == 1, Function[h, If[h[[1]] < 0, 0, b[h]]][Sort[l - {i, j, k}]], 0], {i, r}, {j, r}, {k, r}]][{-1, 0, 1}]];
a[n_] := (2n+1) b[{0, n, n}];
a /@ Range[0, 23] (* Jean-François Alcover, May 13 2020, after Maple *)
Showing 1-3 of 3 results.