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!)
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). 3

%I #22 May 12 2020 11:50:49

%S 1,1,4,21,88,440,2385,11781,62832,352128,1842240,10132320,57775905,

%T 311810785,1746140396,10060071021,55367204256,313747490784,

%U 1820016119376,10152658848528,58015193420160,338183208699840,1905152077559808,10954624445968896,64089909936535329

%N 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 These walks are not restricted to the first (nonnegative) octant.

%H Alois P. Heinz, <a href="/A328345/b328345.txt">Table of n, a(n) for n = 0..650</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>

%e 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 b:= proc(l) option remember; `if`(l[-1]=0, 1, (r-> add(add(

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

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

%p end:

%p a:= n-> b([floor((n+i)/3)$i=0..2]):

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

%t 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 a[n_] := b[Table[Floor[(n + i)/3], {i, 0, 2}]];

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

%Y Cf. A002426, A328299, A328347.

%K nonn,walk

%O 0,3

%A _Alois P. Heinz_, Oct 13 2019

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 23 22:36 EDT 2024. Contains 371917 sequences. (Running on oeis4.)