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 A347811 #31 Nov 03 2021 08:40:43 %S A347811 1,1,1,1,1,1,1,3,1,1,1,19,25,1,1,1,323,211075,241,1,1,1,38716, %T A347811 1322634996717,2062017739,2545,1,1,1,32253681,16042961630858858915656, %U A347811 29261778984922904560001,32191353922714,28203,1,1 %N 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. %C A347811 Lattice points may have negative coordinates, and different walks may differ in length. All walks are self-avoiding. %H A347811 Alois P. Heinz, <a href="/A347811/b347811.txt">Antidiagonals n = 0..11, flattened</a> %H A347811 Alois P. Heinz, <a href="/A347811/a347811.gif">Animation of A(2,2) = 25 walks</a> %H A347811 Wikipedia, <a href="https://en.wikipedia.org/wiki/Lattice_path#Counting_lattice_paths">Counting lattice paths</a> %H A347811 Wikipedia, <a href="https://en.wikipedia.org/wiki/Self-avoiding_walk">Self-avoiding walk</a> %e A347811 Square array A(n,k) begins: %e A347811 1, 1, 1, 1, 1, 1, ... %e A347811 1, 1, 3, 19, 323, 38716, ... %e A347811 1, 1, 25, 211075, 1322634996717, ... %e A347811 1, 1, 241, 2062017739, 29261778984922904560001, ... %e A347811 1, 1, 2545, 32191353922714, ... %e A347811 1, 1, 28203, ... %e A347811 ... %p A347811 s:= proc(n) option remember; %p A347811 `if`(n=0, [[]], map(x-> seq([x[], i], i=-1..1), s(n-1))) %p A347811 end: %p A347811 b:= proc(l) option remember; (n-> `if`(l=[0$n], 1, add((h-> `if`( %p A347811 add(i^2, i=h)<add(i^2, i=l), b(sort(h)), 0))(l+x), x=s(n))))(nops(l)) %p A347811 end: %p A347811 A:= (n, k)-> b([n$k]): %p A347811 seq(seq(A(n, d-n), n=0..d), d=0..8); %t A347811 s[n_] := s[n] = If[n == 0, {{}}, Sequence @@ Table[Append[#, i], {i, -1, 1}]& /@ s[n-1]]; %t A347811 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 A347811 A[n_, k_] := b[Table[n, {k}]]; %t A347811 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 A347811 Columns k=0+1, 2-3 give: A000012, A346539, A347813. %Y A347811 Rows n=0-2 give: A000012, A346840, A347812. %Y A347811 Main diagonal gives A347810. %Y A347811 Cf. A089759, A187783, A335570. %K A347811 nonn,tabl,walk %O A347811 0,8 %A A347811 _Alois P. Heinz_, Sep 14 2021