A333606
Number of directed Hamiltonian walks from NW to SW corners of a 10 X n grid.
Original entry on oeis.org
1, 1, 256, 1480, 117852, 1513468, 71154709, 1283569420, 47001928863, 1013346943033, 32440676063382, 771708613086275, 22928865477892898, 576390471202016758, 16424125813587374688, 425923820730159849603, 11854446538789342310672, 312866945593394069370317
Offset: 1
-
# Using graphillion
from graphillion import GraphSet
import graphillion.tutorial as tl
def A271592(n, k):
if k == 1: return 1
universe = tl.grid(k - 1, n - 1)
GraphSet.set_universe(universe)
start, goal = 1, n
paths = GraphSet.paths(start, goal, is_hamilton=True)
return paths.len()
def A333606(n):
return A271592(10, n)
print([A333606(n) for n in range(1, 8)])
More terms from
Ed Wynn, Jun 28 2023
A333602
Number of directed Hamiltonian walks from NW to SW corners of a 6 X n grid.
Original entry on oeis.org
1, 1, 16, 47, 397, 1770, 11658, 59946, 359962, 1958968, 11341696, 63142224, 360314940, 2024278172, 11485023624, 64758162416, 366573071464, 2069908196378, 11706322628832, 66139560111600, 373914808423830, 2113066820134474, 11944325099736622, 67505931650135578
Offset: 1
- Andrew Howroyd, Table of n, a(n) for n = 1..500
- Index entries for linear recurrences with constant coefficients, signature (5,14,-63,12,90,-35,-66,118,-8,-82,42,28,-4,2).
-
# Using graphillion
from graphillion import GraphSet
import graphillion.tutorial as tl
def A271592(n, k):
if k == 1: return 1
universe = tl.grid(k - 1, n - 1)
GraphSet.set_universe(universe)
start, goal = 1, n
paths = GraphSet.paths(start, goal, is_hamilton=True)
return paths.len()
def A333602(n):
return A271592(6, n)
print([A333602(n) for n in range(1, 10)])
A333603
Number of directed Hamiltonian walks from NW to SW corners of a 7 X (2*n+1) grid.
Original entry on oeis.org
1, 32, 1584, 88418, 4999752, 283163450, 16039767268, 908585449166, 51467614908516, 2915428131919456, 165146980589118258, 9354895388703582168, 529916244425510621368, 30017569886372177468776, 1700371542421991554910438, 96319035592388073867700014, 5456076149237165677047910650
Offset: 0
Row n=7 of
A271592 (with 0 omitted).
-
# Using graphillion
from graphillion import GraphSet
import graphillion.tutorial as tl
def A271592(n, k):
if k == 1: return 1
universe = tl.grid(k - 1, n - 1)
GraphSet.set_universe(universe)
start, goal = 1, n
paths = GraphSet.paths(start, goal, is_hamilton=True)
return paths.len()
def A333603(n):
return A271592(7, 2 * n + 1)
print([A333603(n) for n in range(20)])
A333605
Number of directed Hamiltonian walks from NW to SW corners of a 9 X (2*n+1) grid.
Original entry on oeis.org
1, 128, 28002, 7503654, 2087813834, 585874869236, 164719994049404, 46331085939142414, 13032851914297031372, 3666193548666012258524, 1031319586988812684556890, 290115923359022569718438776, 81611236566429170178900484740, 22957699681804739055041075650848
Offset: 0
Row n=9 of
A271592 (with 0 omitted).
-
# Using graphillion
from graphillion import GraphSet
import graphillion.tutorial as tl
def A271592(n, k):
if k == 1: return 1
universe = tl.grid(k - 1, n - 1)
GraphSet.set_universe(universe)
start, goal = 1, n
paths = GraphSet.paths(start, goal, is_hamilton=True)
return paths.len()
def A333605(n):
return A271592(9, 2 * n + 1)
print([A333605(n) for n in range(15)])
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