cp's OEIS Frontend

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.

A348201 Number of walks on cubic lattice from (n,n,n) to (0,0,0) using steps that decrease the Euclidean distance to the origin and that change each coordinate by 1 or by -1.

Original entry on oeis.org

1, 1, 25, 211, 4057, 79945, 1559719, 34166335, 784027759, 18367309153, 447879467629, 11160419719795, 283032843838285, 7307188685246689, 191139484940529781, 5056715112537049897, 135152031778121985907, 3642958379395296513337, 98930628058690700138443
Offset: 0

Views

Author

Alois P. Heinz, Oct 06 2021

Keywords

Comments

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

Examples

			a(2) = 25:
  ((2,2,2), (1,1,1), (0,0,0)),
  ((2,2,2), (1,1,3), (0,0,2), (-1,-1,1), (0,0,0)),
  ((2,2,2), (1,1,3), (0,0,2), (-1,1,1), (0,0,0)),
  ((2,2,2), (1,1,3), (0,0,2), (1,-1,1), (0,0,0)),
  ((2,2,2), (1,1,3), (0,0,2), (1,1,1), (0,0,0)),
  ((2,2,2), (1,1,3), (0,2,2), (-1,1,1), (0,0,0)),
  ((2,2,2), (1,1,3), (0,2,2), (1,1,1), (0,0,0)),
  ((2,2,2), (1,1,3), (2,0,2), (1,-1,1), (0,0,0)),
  ((2,2,2), (1,1,3), (2,0,2), (1,1,1), (0,0,0)),
  ((2,2,2), (1,3,1), (0,2,0), (-1,1,-1), (0,0,0)),
  ((2,2,2), (1,3,1), (0,2,0), (-1,1,1), (0,0,0)),
  ((2,2,2), (1,3,1), (0,2,0), (1,1,-1), (0,0,0)),
  ((2,2,2), (1,3,1), (0,2,0), (1,1,1), (0,0,0)),
  ((2,2,2), (1,3,1), (0,2,2), (-1,1,1), (0,0,0)),
  ((2,2,2), (1,3,1), (0,2,2), (1,1,1), (0,0,0)),
  ((2,2,2), (1,3,1), (2,2,0), (1,1,-1), (0,0,0)),
  ((2,2,2), (1,3,1), (2,2,0), (1,1,1), (0,0,0)),
  ((2,2,2), (3,1,1), (2,0,0), (1,-1,-1), (0,0,0)),
  ((2,2,2), (3,1,1), (2,0,0), (1,-1,1), (0,0,0)),
  ((2,2,2), (3,1,1), (2,0,0), (1,1,-1), (0,0,0)),
  ((2,2,2), (3,1,1), (2,0,0), (1,1,1), (0,0,0)),
  ((2,2,2), (3,1,1), (2,0,2), (1,-1,1), (0,0,0)),
  ((2,2,2), (3,1,1), (2,0,2), (1,1,1), (0,0,0)),
  ((2,2,2), (3,1,1), (2,2,0), (1,1,-1), (0,0,0)),
  ((2,2,2), (3,1,1), (2,2,0), (1,1,1), (0,0,0)).
		

Crossrefs

Cf. A347813.

Programs

  • Maple
    s:= proc(n) option remember;
         `if`(n=0, [[]], map(x-> seq([x[], i], i=[-1, 1]), s(n-1)))
        end:
    b:= proc(l) option remember; (n-> `if`(l=[0$n], 1, add((h-> `if`(
          add(i^2, i=h) b([n$3]):
    seq(a(n), n=0..20);
  • Mathematica
    s[n_] := s[n] = If[n == 0, {{}}, Sequence @@ Table[Append[#, i], {i, {-1, 1}}] & /@ s[n - 1]];
    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]}]]];
    a[n_] := b[{n, n, n}];
    Table[a[n], {n, 0, 20}] (* Jean-François Alcover, May 23 2024, after Alois P. Heinz *)

Formula

a(n) ~ c * d^n / n, where d = (3*(292 + 4*sqrt(5))^(1/3))/2 + 66/(292 + 4*sqrt(5))^(1/3) + 10 = 29.900786688498085577218938127572448... and c = 0.00221301854906444252905280527969234142... - Vaclav Kotesovec, Oct 24 2021