This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.
%I A328345 #22 May 12 2020 11:50:49 %S A328345 1,1,4,21,88,440,2385,11781,62832,352128,1842240,10132320,57775905, %T A328345 311810785,1746140396,10060071021,55367204256,313747490784, %U A328345 1820016119376,10152658848528,58015193420160,338183208699840,1905152077559808,10954624445968896,64089909936535329 %N A328345 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)) and using steps (0,0,1), (0,1,0), (1,0,0), (-1,1,1), (1,-1,1), and (1,1,-1). %C A328345 These walks are not restricted to the first (nonnegative) octant. %H A328345 Alois P. Heinz, <a href="/A328345/b328345.txt">Table of n, a(n) for n = 0..650</a> %H A328345 Wikipedia, <a href="https://en.wikipedia.org/wiki/Lattice_path">Lattice path</a> %H A328345 Wikipedia, <a href="https://en.wikipedia.org/wiki/Self-avoiding_walk">Self-avoiding walk</a> %e A328345 a(2) = 4: [(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)], [(0,0,0),(-1,1,1),(0,1,1)]. %p A328345 b:= proc(l) option remember; `if`(l[-1]=0, 1, (r-> add(add( %p A328345 add(`if`(i+j+k=1, (h-> `if`(add(t, t=h)<0, 0, b(h)))( %p A328345 sort(l-[i, j, k])), 0), k=r), j=r), i=r))([$-1..1])) %p A328345 end: %p A328345 a:= n-> b([floor((n+i)/3)$i=0..2]): %p A328345 seq(a(n), n=0..24); %t A328345 b[l_] := b[l] = If[Last[l] == 0, 1, Sum[If[i + j + k == 1, Function[h, If[Total[h] < 0, 0, b[h]]][Sort[l - {i, j, k}]], 0], {i, {-1, 0, 1}}, {j, {-1, 0, 1}}, {k, {-1, 0, 1}}]]; %t A328345 a[n_] := b[Table[Floor[(n + i)/3], {i, 0, 2}]]; %t A328345 a /@ Range[0, 24] (* _Jean-François Alcover_, May 12 2020, after Maple *) %Y A328345 Cf. A002426, A328299, A328347. %K A328345 nonn,walk %O A328345 0,3 %A A328345 _Alois P. Heinz_, Oct 13 2019