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.

A333511 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.

This page as a plain text file.
%I A333511 #19 Mar 26 2020 07:34:01
%S A333511 1,16,95,426,1745,6838,25897,95292,342505,1208392,4201765,14445130,
%T A333511 49221691,166563454,560595853,1878809676,6275993883,20910561068
%N A333511 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 A333511 a(1) = 1;
%e A333511    +--*--+
%e A333511 a(2) = 16;
%e A333511    +  *--+   +  *  +   +--*  +   +--*--+
%e A333511    |  |      |     |      |  |
%e A333511    *--*  *   *--*--*   *  *--*   *  *  *
%e A333511    -------------------------------------
%e A333511    +  *--*   +  *  *   +--*  *   +--*--*
%e A333511    |  |  |   |            |            |
%e A333511    *--*  +   *--*--+   *  *--+   *  *  +
%e A333511    -------------------------------------
%e A333511    *--*  +   *--*--+   *  *--+   *  *  +
%e A333511    |  |  |   |            |            |
%e A333511    +  *--*   +  *  *   +--*  *   +--*--*
%e A333511    -------------------------------------
%e A333511    *--*  *   *--*--*   *  *--*   *  *  *
%e A333511    |  |      |     |      |  |
%e A333511    +  *--+   +  *  +   +--*  +   +--*--+
%o A333511 (Python)
%o A333511 # Using graphillion
%o A333511 from graphillion import GraphSet
%o A333511 import graphillion.tutorial as tl
%o A333511 def A(start, goal, n, k):
%o A333511     universe = tl.grid(n - 1, k - 1)
%o A333511     GraphSet.set_universe(universe)
%o A333511     paths = GraphSet.paths(start, goal)
%o A333511     return paths.len()
%o A333511 def A333509(n, k):
%o A333511     if n == 1: return 1
%o A333511     s = 0
%o A333511     for i in range(1, n + 1):
%o A333511         for j in range(k * n - n + 1, k * n + 1):
%o A333511             s += A(i, j, k, n)
%o A333511     return s
%o A333511 def A333511(n):
%o A333511     return A333509(n, 3)
%o A333511 print([A333511(n) for n in range(1, 15)])
%Y A333511 Column k=3 of A333509.
%K A333511 nonn
%O A333511 1,2
%A A333511 _Seiichi Manyama_, Mar 25 2020