OFFSET
0,2
LINKS
Alois P. Heinz, Table of n, a(n) for n = 0..448
Alois P. Heinz, Animation of a(4)=111 walks
Wikipedia, Lattice path
Wikipedia, Self-avoiding walk
FORMULA
a(n) ~ c * n^(n+2) / exp(n), where c = 0.7741273379869056907732932906458364317717498069987762339667734187318... - Vaclav Kotesovec, Mar 27 2017
Conjecture: a(n) -a(n-1) +(-n^2-n+3)*a(n-2) +(-n+2)*a(n-3) +(n-2)*(n-3)*a(n-4)=0. - R. J. Mathar, Apr 09 2017
EXAMPLE
a(0) = 1: [(0,0)].
a(1) = 2: [(0,0),(1,0)], [(0,0),(0,1),(1,0)].
a(2) = 5: [(0,0),(1,0),(2,0)], [(0,0),(0,1),(1,0),(2,0)], [(0,0),(1,1),(2,0)], [(0,0),(0,1),(0,2),(1,1),(2,0)], [(0,0),(1,0),(0,1),(0,2),(1,1),(2,0)].
MAPLE
a:= proc(n) option remember; `if`(n<2, n+1,
(n+irem(n, 2))*a(n-1)+(n-1)*a(n-2))
end:
seq(a(n), n=0..25);
MATHEMATICA
a[n_]:=If[n<2, n + 1, (n + Mod[n, 2]) * a[n - 1] + (n - 1) a[n - 2]]; Table[a[n], {n, 0, 25}] (* Indranil Ghosh, Mar 27 2017 *)
CROSSREFS
KEYWORD
nonn,walk
AUTHOR
Alois P. Heinz, Mar 23 2017
STATUS
approved