login
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).
1

%I #16 May 13 2020 18:58:21

%S 1,9,130,2401,50346,1141030,27222364,673340265,17104148290,

%T 443406172278,11680186909062,311667574680190,8404755004516300,

%U 228659546010880620,6267500870514732780,172891678107177498193,4795723803862121368590,133668769806498536349670

%N 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).

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Lattice_path">Lattice path</a>

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Self-avoiding_walk">Self-avoiding walk</a>

%F a(n) = (2n+1) * A328269(n).

%F a(n) is odd <=> n in { A000225 }.

%e 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)].

%p b:= proc(l) option remember; `if`(l[-1]=0, 1, (r-> add(

%p add(add(`if`(i+j+k=1, (h-> `if`(h[1]<0, 0, b(h)))(

%p sort(l-[i, j, k])), 0), k=r), j=r), i=r))([$-1..1]))

%p end:

%p a:= n-> (2*n+1)*b([0, n$2]):

%p seq(a(n), n=0..23);

%t 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}]];

%t a[n_] := (2n+1) b[{0, n, n}];

%t a /@ Range[0, 23] (* _Jean-François Alcover_, May 13 2020, after Maple *)

%Y Cf. A000225, A328269.

%K nonn,walk

%O 0,2

%A _Alois P. Heinz_, Oct 10 2019