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!)
A347811 Number A(n,k) of k-dimensional lattice walks from {n}^k to {0}^k using steps that decrease the Euclidean distance to the origin and that change each coordinate by at most 1; square array A(n,k), n>=0, k>=0, read by antidiagonals. 6

%I #31 Nov 03 2021 08:40:43

%S 1,1,1,1,1,1,1,3,1,1,1,19,25,1,1,1,323,211075,241,1,1,1,38716,

%T 1322634996717,2062017739,2545,1,1,1,32253681,16042961630858858915656,

%U 29261778984922904560001,32191353922714,28203,1,1

%N Number A(n,k) of k-dimensional lattice walks from {n}^k to {0}^k using steps that decrease the Euclidean distance to the origin and that change each coordinate by at most 1; square array A(n,k), n>=0, k>=0, read by antidiagonals.

%C Lattice points may have negative coordinates, and different walks may differ in length. All walks are self-avoiding.

%H Alois P. Heinz, <a href="/A347811/b347811.txt">Antidiagonals n = 0..11, flattened</a>

%H Alois P. Heinz, <a href="/A347811/a347811.gif">Animation of A(2,2) = 25 walks</a>

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Lattice_path#Counting_lattice_paths">Counting lattice paths</a>

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

%e Square array A(n,k) begins:

%e 1, 1, 1, 1, 1, 1, ...

%e 1, 1, 3, 19, 323, 38716, ...

%e 1, 1, 25, 211075, 1322634996717, ...

%e 1, 1, 241, 2062017739, 29261778984922904560001, ...

%e 1, 1, 2545, 32191353922714, ...

%e 1, 1, 28203, ...

%e ...

%p s:= proc(n) option remember;

%p `if`(n=0, [[]], map(x-> seq([x[], i], i=-1..1), s(n-1)))

%p end:

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

%p add(i^2, i=h)<add(i^2, i=l), b(sort(h)), 0))(l+x), x=s(n))))(nops(l))

%p end:

%p A:= (n, k)-> b([n$k]):

%p seq(seq(A(n, d-n), n=0..d), d=0..8);

%t s[n_] := s[n] = If[n == 0, {{}}, Sequence @@ Table[Append[#, i], {i, -1, 1}]& /@ s[n-1]];

%t b[l_List] := b[l] = With[{n = Length[l]}, If[l == Table[0, {n}], 1, Sum[With[{h = l+x}, If[h.h < l.l, b[Sort[h]], 0]], {x, s[n]}]]];

%t A[n_, k_] := b[Table[n, {k}]];

%t Table[Table[A[n, d-n], {n, 0, d}], {d, 0, 8}] // Flatten (* _Jean-François Alcover_, Nov 03 2021, after _Alois P. Heinz_ *)

%Y Columns k=0+1, 2-3 give: A000012, A346539, A347813.

%Y Rows n=0-2 give: A000012, A346840, A347812.

%Y Main diagonal gives A347810.

%Y Cf. A089759, A187783, A335570.

%K nonn,tabl,walk

%O 0,8

%A _Alois P. Heinz_, Sep 14 2021

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 September 8 11:24 EDT 2024. Contains 375753 sequences. (Running on oeis4.)