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!)
A328140 Total number of nodes in all self-avoiding planar walks starting at (0,0), ending at (n,0), not extending above the line (x,2x) or below the line (x,-2x), and using steps (0,1), (-1,1), and (1,-1) with the restriction that (-1,1) and (1,-1) are always immediately followed by (0,1). 2

%I #11 May 13 2020 07:02:25

%S 1,2,8,22,81,260,854,2738,8710,27550,86696,271726,848681,2642662,

%T 8207726,25434686,78663773,242865100,748650655,2304552576,7085109570,

%U 21757557324,66745430284,204559349854,626379255199,1916485240548,5859359429380,17901726707224

%N Total number of nodes in all self-avoiding planar walks starting at (0,0), ending at (n,0), not extending above the line (x,2x) or below the line (x,-2x), and using steps (0,1), (-1,1), and (1,-1) with the restriction that (-1,1) and (1,-1) are always immediately followed by (0,1).

%H Alois P. Heinz, <a href="/A328140/b328140.txt">Table of n, a(n) for n = 0..2093</a>

%H Alois P. Heinz, <a href="/A328139/a328139.gif">Animation of A328139(7) = 222 walks with a(7) = 2738 nodes</a>

%H Wikipedia, <a href="https://en.wikipedia.org/wiki/Lattice_path">Lattice path</a>

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

%p b:= proc(x, y, t) option remember; (p-> p+[0, p[1]])(`if`(x<0

%p or abs(y)>2*x, 0, `if`(x=0, [1, 0], b(x-1, y, 1)+

%p `if`(t=1, b(x-1, y+1, 0)+b(x+1, y-1, 0), 0))))

%p end:

%p a:= n-> b(n, 0$2)[2]:

%p seq(a(n), n=0..32);

%t b[x_, y_, t_] := b[x, y, t] = Function[p, p + {0, p[[1]]}][If[x < 0 || Abs[y] > 2x, {0, 0}, If[x == 0, {1, 0}, b[x - 1, y, 1] + If[t == 1, b[x - 1, y + 1, 0] + b[x + 1, y - 1, 0], 0]]]];

%t a[n_] := b[n, 0, 0][[2]];

%t a /@ Range[0, 32] (* _Jean-François Alcover_, May 13 2020, after Maple *)

%Y Cf. A328139.

%K nonn,walk

%O 0,2

%A _Alois P. Heinz_, Oct 04 2019

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 May 9 23:14 EDT 2024. Contains 372354 sequences. (Running on oeis4.)