OFFSET
1,3
LINKS
PROG
(Python)
# Using graphillion
from graphillion import GraphSet
import graphillion.tutorial as tl
def A333580(n, k):
if n == 1 or k == 1: return 1
universe = tl.grid(n - 1, k - 1)
GraphSet.set_universe(universe)
start, goal = 1, k * n
paths = GraphSet.paths(start, goal, is_hamilton=True)
return paths.len()
def A333584(n):
return A333580(n, 9)
print([A333584(n) for n in range(1, 20)])
CROSSREFS
KEYWORD
nonn
AUTHOR
Seiichi Manyama, Mar 27 2020
STATUS
approved