%I
%S 1,7,49,373,3105,26515,227441,1953099,16782957,144262743,1240194297,
%T 10662034451,91663230249,788046822891,6775004473757,58246174168047,
%U 500755017859261,4305100014182879,37011883913816129,318199242452585915,2735628331213604009,23518793814422304163
%N Number of self-avoiding closed paths on an n X 5 grid which pass through four corners ((0,0), (0,4), (n-1,4), (n-1,0)).
%C Also number of self-avoiding closed paths on a 5 X n grid which pass through four corners ((0,0), (0,n-1), (4,n-1), (4,0)).
%H Seiichi Manyama, <a href="/A333515/b333515.txt">Table of n, a(n) for n = 2..1000</a>
%e a(2) = 1;
%e +--*--*--*--+
%e | |
%e +--*--*--*--+
%e a(3) = 7;
%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 A333513(n, k):
%o universe = tl.grid(n - 1, k - 1)
%o GraphSet.set_universe(universe)
%o cycles = GraphSet.cycles()
%o for i in [1, k, k * (n - 1) + 1, k * n]:
%o cycles = cycles.including(i)
%o return cycles.len()
%o def A333515(n):
%o return A333513(n, 5)
%o print([A333515(n) for n in range(2, 25)])
%Y Column k=5 of A333513.
%K nonn
%O 2,2
%A _Seiichi Manyama_, Mar 25 2020
|