OFFSET
0,2
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..639
Wikipedia, Lattice path
Wikipedia, Self-avoiding walk
FORMULA
a(n) = A328300(2n,n).
a(n) is odd <=> n in { A000225 }.
a(n) ~ c * 2^(3*n) * (2 + sqrt(3))^n / n^2, where c =
0.081957778985952080274457799679795068000445171394180053136120884510526907545... - Vaclav Kotesovec, May 10 2020
EXAMPLE
a(1) = 3: [(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)].
a(2) = 26: [(0,0,0),(1,0,0),(2,0,0),(1,1,1),(0,2,2)], [(0,0,0),(1,0,0),(1,1,0),(1,1,1),(0,2,2)], ..., [(0,0,0),(0,0,1),(0,1,1),(0,1,2),(0,2,2)], [(0,0,0),(0,0,1),(0,0,2),(0,1,2),(0,2,2)].
MAPLE
b:= proc(l) option remember; `if`(l[-1]=0, 1, (r-> add(
add(add(`if`(i+j+k=1, (h-> `if`(h[1]<0, 0, b(h)))(
sort(l-[i, j, k])), 0), k=r), j=r), i=r))([$-1..1]))
end:
a:= n-> b([0, n$2]):
seq(a(n), n=0..23);
MATHEMATICA
b[l_] := b[l] = If[Last[l] == 0, 1, Sum[If[i + j + k == 1, Function[h, If[h[[1]] < 0, 0, b[h]]][Sort[l - {i, j, k}]], 0], {i, {-1, 0, 1}}, {j, {-1, 0, 1}}, {k, {-1, 0, 1}}]];
a[n_] := b[{0, n, n}];
a /@ Range[0, 23] (* Jean-François Alcover, May 12 2020, after Maple *)
CROSSREFS
KEYWORD
nonn,walk
AUTHOR
Alois P. Heinz, Oct 10 2019
STATUS
approved