login

Reminder: The OEIS is hiring a new managing editor, and the application deadline is January 26.

Number of self-avoiding walks in the n X 3 grid graph which start at any of the n vertices on left side of the graph and terminate at any of the n vertices on the right side.
3

%I #19 Mar 26 2020 07:34:01

%S 1,16,95,426,1745,6838,25897,95292,342505,1208392,4201765,14445130,

%T 49221691,166563454,560595853,1878809676,6275993883,20910561068

%N Number of self-avoiding walks in the n X 3 grid graph which start at any of the n vertices on left side of the graph and terminate at any of the n vertices on the right side.

%e a(1) = 1;

%e +--*--+

%e a(2) = 16;

%e + *--+ + * + +--* + +--*--+

%e | | | | | |

%e *--* * *--*--* * *--* * * *

%e -------------------------------------

%e + *--* + * * +--* * +--*--*

%e | | | | | |

%e *--* + *--*--+ * *--+ * * +

%e -------------------------------------

%e *--* + *--*--+ * *--+ * * +

%e | | | | | |

%e + *--* + * * +--* * +--*--*

%e -------------------------------------

%e *--* * *--*--* * *--* * * *

%e | | | | | |

%e + *--+ + * + +--* + +--*--+

%o (Python)

%o # Using graphillion

%o from graphillion import GraphSet

%o import graphillion.tutorial as tl

%o def A(start, goal, n, k):

%o universe = tl.grid(n - 1, k - 1)

%o GraphSet.set_universe(universe)

%o paths = GraphSet.paths(start, goal)

%o return paths.len()

%o def A333509(n, k):

%o if n == 1: return 1

%o s = 0

%o for i in range(1, n + 1):

%o for j in range(k * n - n + 1, k * n + 1):

%o s += A(i, j, k, n)

%o return s

%o def A333511(n):

%o return A333509(n, 3)

%o print([A333511(n) for n in range(1, 15)])

%Y Column k=3 of A333509.

%K nonn

%O 1,2

%A _Seiichi Manyama_, Mar 25 2020