A333864
Number of Hamiltonian cycles on an n X 2*n grid.
Original entry on oeis.org
1, 4, 236, 18684, 32463802, 54756073582, 2365714170297014, 87106950271042689032, 88514516642574170326003422, 71598455565101470929617326988084, 1673219200189416324422979402201514800461, 29815394539834813572600735261571894552950941626, 15836807024750749574106724392556189684881848226515147589
Offset: 2
- Huaide Cheng, Table of n, a(n) for n = 2..16
- Olga Bodroža-Pantić, B. Pantić, I. Pantić AND M. Bodroža-Solarov: Enumeration of Hamiltonian cycles in some grid grafs. MATCH Commun. Math. Comput. Chem. 70:1 (2013), 181-204. on Research Gate.
-
# Using graphillion
from graphillion import GraphSet
import graphillion.tutorial as tl
def A333864(n):
universe = tl.grid(n - 1, 2 * n - 1)
GraphSet.set_universe(universe)
cycles = GraphSet.cycles(is_hamilton=True)
return cycles.len()
print([A333864(n) for n in range(2, 8)])
a(10) and a(12) quoted from Olga's paper.
A333903
Number of directed Hamiltonian paths in a 2*n X n grid starting at the upper left corner and finishing in the lower left corner.
Original entry on oeis.org
1, 1, 16, 264, 117852, 43399371, 443064195958, 3575671586791915, 831655228913958996424, 147303585340262824414389642, 774577888161337889995061257722609, 3015734636186832309974653370241824509796, 356606519352227259565296610082412177642016167446
Offset: 1
a(1) = 1;
S
|
*
|
E
a(2) = 1;
S--*
|
*--*
|
*--*
|
E--*
a(3) = 16;
S--*--* S--*--* S--*--* S--*--*
| | | |
*--*--* *--*--* *--*--* *--*--*
| | | |
*--*--* *--*--* * *--* * *--*
| | | | | | | |
*--*--* *--* * *--* * * * *
| | | | | | | |
*--*--* * * * *--* * *--* *
| | | | | | | |
E--*--* E *--* E *--* E--*--*
S--*--* S--*--* S--*--* S--*--*
| | | |
*--* * *--* * *--* * *--* *
| | | | | | | | | | | |
* *--* * *--* * * * * * *
| | | | | | | |
*--*--* * *--* * *--* * * *
| | | | | | | |
*--* * *--* * *--*--* * * *
| | | | | | | |
E *--* E--*--* E--*--* E *--*
S *--* S *--* S *--* S *--*
| | | | | | | | | | | |
*--* * *--* * *--* * *--* *
| | | |
*--*--* *--*--* *--* * *--* *
| | | | | | | |
*--*--* * *--* * *--* * * *
| | | | | | | |
*--* * *--* * *--*--* * * *
| | | | | | | |
E *--* E--*--* E--*--* E *--*
S *--* S *--* S *--* S *--*
| | | | | | | | | | | |
* * * * * * * * * * * *
| | | | | | | | | | | |
*--* * *--* * * * * * * *
| | | | | | | |
*--*--* *--* * *--* * * * *
| | | | | | | |
*--*--* * * * *--* * *--* *
| | | | | | | |
E--*--* E *--* E *--* E--*--*
-
# Using graphillion
from graphillion import GraphSet
import graphillion.tutorial as tl
def A333903(n):
universe = tl.grid(n - 1, 2 * n - 1)
GraphSet.set_universe(universe)
start, goal = 1, 2 * n
paths = GraphSet.paths(start, goal, is_hamilton=True)
return paths.len()
print([A333903(n) for n in range(1, 8)])
a(8), a(10), a(12), a(14)-a(18) from
Ed Wynn, Jun 28 2023
Showing 1-2 of 2 results.