login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

A333796
Number of self-avoiding closed paths on an n X n grid which pass through all points on the diagonal connecting NW and SE corners.
2
1, 2, 22, 716, 73346, 23374544, 23037365786, 69630317879888
OFFSET
2,2
COMMENTS
a(11) = 18267559028025887599256.
EXAMPLE
a(2) = 1;
+--*
| |
*--+
a(3) = 2;
+--*--* +--*
| | | |
*--+ * * +--*
| | | |
*--+ *--*--+
a(4) = 22;
+--*--*--* +--*--*--* +--*--*--*
| | | | | |
*--+--* * *--+--* * *--+--* *
| | | | | |
*--*--+ * *--+ * + *
| | | | | |
*--*--*--+ *--*--+ *--+
+--*--*--* +--*--*--* +--*--*--*
| | | | | |
*--+ *--* *--+ *--* *--+ *
| | | | | |
*--* +--* * +--* *--+ *
| | | | | |
*--*--*--+ *--*--+ *--+
+--*--*--* +--*--*--* +--*--*--*
| | | | | |
* +--*--* * +--* * * +--* *
| | | | | | | | | |
* *--+--* *--* + * * * + *
| | | | | | | |
*--*--*--+ *--+ *--* *--+
+--*--* +--*--* +--*--*
| | | | | |
*--+ *--* *--+ * *--+ *
| | | | | |
*--+ * *--* +--* * +--*
| | | | | |
*--+ *--*--*--+ *--*--+
+--*--* +--* *--* +--* *--*
| | | | | | | | | |
* +--* * +--* * * +--* *
| | | | | |
* *--+--* *--*--+ * * *--+ *
| | | | | | | |
*--*--*--+ *--+ *--* *--+
+--* *--* +--* +--*
| | | | | | | |
* + * * * +--*--* * +--*--*
| | | | | | | |
* *--+ * *--*--+ * * *--+ *
| | | | | | | |
*--*--*--+ *--+ *--* *--+
+--* +--* +--*
| | | | | |
* +--* * +--* * + *--*
| | | | | | | |
*--* +--* * +--* * *--+ *
| | | | | |
*--*--+ *--*--*--+ *--*--*--+
+--*
| |
* +
| |
* *--+--*
| |
*--*--*--+
PROG
(Python)
# Using graphillion
from graphillion import GraphSet
import graphillion.tutorial as tl
def A333796(n):
universe = tl.grid(n - 1, n - 1)
GraphSet.set_universe(universe)
cycles = GraphSet.cycles()
points = [i + 1 for i in range(n * n) if i % n - i // n == 0]
for i in points:
cycles = cycles.including(i)
return cycles.len()
print([A333796(n) for n in range(2, 10)])
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Seiichi Manyama, Apr 05 2020
STATUS
approved