Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).
%I #15 May 13 2020 07:02:31
%S 1,2,9,36,225,1458,11277,92520,829521,7827750,77868945,805275756,
%T 8628016761,95164931610,1076945117265,12459200094864,146980338550101,
%U 1763951883200982,21496281107991273,265571585920327140,3321596194293592593,42009000779476030410
%N Total number of nodes in all walks on cubic lattice starting at (0,0,0), ending at (0,0,n), remaining in the first (nonnegative) octant and using steps which are permutations of (-2,1,2), (-1,0,2), (-1,1,1), (0,0,1).
%H Alois P. Heinz, <a href="/A328268/b328268.txt">Table of n, a(n) for n = 0..848</a>
%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) = (n+1) * A328267(n).
%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))([$-2..2]))
%p end:
%p a:= n-> (n+1)*b([0$2, n]):
%p seq(a(n), n=0..25);
%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}]][Range[-2, 2]]];
%t a[n_] := (n + 1) b[{0, 0, n}];
%t a /@ Range[0, 25] (* _Jean-François Alcover_, May 13 2020, after Maple *)
%Y Cf. A328267.
%K nonn,walk
%O 0,2
%A _Alois P. Heinz_, Oct 10 2019