A096969
Number of ways to number the cells of an n X n square grid with 1,2,3,...,n^2 so that successive integers are in adjacent cells (horizontally or vertically).
Original entry on oeis.org
1, 8, 40, 552, 8648, 458696, 27070560, 6046626568, 1490832682992, 1460089659025264, 1573342970540617696, 6905329711608694708440, 33304011435341069362631160, 663618176813467308855850585056, 14527222735920532980525200234503048
Offset: 1
One of the 8648 numberings of a 5 X 5 grid is
.
3---2---1 20--21
| | |
4 17--18--19 22
| | |
5 16--15--14 23
| | |
6 9--10 13 24
| | | | |
7---8 11--12 25
- Andrew Howroyd, Table of n, a(n) for n = 1..17
- Nicolas Bělohoubek, All possible paths in 4th term (552) presented by A..D 1..4 coordination system.
- Nicolas Bělohoubek, All possible paths in 5th term (8648) presented by A..E 1..5 coordination system.
- Nicolas Bělohoubek, All possible paths in 5th term (8648) in image, blue to red.
- Stéphane Duguay and Steven Pigeon, Comparison of Pixel Correlation Induced by Space-Filling Curves on 2D Image Data, The 10th IEEE International Conference on Intelligent Data Acquisition and Advanced Computing Systems: Technology and Applications (Metz, France, 2019) Vol. 1, 294-297.
- Mary Grace Hanson and David A. Nash, Minimal and maximal Numbrix puzzles, arXiv:1706.09389 [math.CO], 2017.
- Eric Weisstein's World of Mathematics, Grid Graph
- Eric Weisstein's World of Mathematics, Hamiltonian Path
- Index entries for sequences related to graphs, Hamiltonian
A268894
Number of Hamiltonian paths in C_n X P_n.
Original entry on oeis.org
1, 4, 144, 4016, 152230, 14557092, 1966154260, 761411682704, 411068703517542, 684434716944151900, 1572754514153890134760, 11579615738168536799184984, 117186519917858266359631481672, 3877921919790491112398750141807648, 176258463464553583688099296874564393850, 26493868301658838913487471166447301509560736
Offset: 1
A265914
Number of Hamiltonian paths on an n X n grid reduced for symmetry, i.e., where rotations and reflections are not counted as distinct.
Original entry on oeis.org
1, 1, 3, 38, 549, 28728, 1692417, 377919174, 93177169027, 91255604983167, 98333935794279062, 431583106977641773651, 2081500714709464758363648, 41476136050841717002906372881, 907951420995033325255530074961505, 82829339673122474155192677008453291270
Offset: 1
- Oliver R. Bellwood, Heitor P. Casagrande, and William J. Munro, Fractal Path Strategies for Efficient 2D DMRG Simulations, arXiv:2507.11820 [cond-mat.str-el], 2025. See p. 5.
- Jean-Marc Mayer, Claude Guez, and Jean Dayantis, Exact computer enumeration of the number of Hamiltonian paths in small square plane lattices, Physical Review B, Vol. 42 Number 1, 1990.
A288032
Number of (undirected) paths in the n X n grid graph.
Original entry on oeis.org
0, 12, 322, 14248, 1530196, 436619868, 343715004510, 766012555199052, 4914763477312679808, 91781780911712980966236, 5028368533802124263609489682, 813124448051069045700905179168520
Offset: 1
A236753
Number of simple (non-intersecting) directed paths on the grid graph P_n X P_n.
Original entry on oeis.org
1, 28, 653, 28512, 3060417, 873239772, 687430009069, 1532025110398168, 9829526954625359697, 183563561823425961932572, 10056737067604248527218979485, 1626248896102138091401810358337184
Offset: 1
For n=2 there are 4 zero length paths (one for each vertex), 8 paths with 1 one edge, 8 paths with 2 edges and 8 paths with 3 edges, so a(2)=28. - _Andrew Howroyd_, May 27 2017
Cf.
A236690 (includes diagonal edges).
A328931
Number of Hamiltonian paths in an n X n square, starting from an edge, finishing anywhere, all symmetries excluded.
Original entry on oeis.org
1, 1, 4, 51, 660, 30745, 1621471, 312637285, 72599875346, 60968508324409, 64128000370443037, 240651566540823214362, 1162174738476331286327484, 19776621796151182708398884540, 441809773825445785471324877668710
Offset: 1
All distinct paths through a 1 X 1 labyrinth visiting all cells.
+ +
|**|
+--+
.
All distinct paths through a 2 X 2 labyrinth visiting all cells.
+ +--+
| |**|
+ + +
| |
+--+--+
.
All distinct paths through a 3 X 3 labyrinth visiting all cells.
+ +--+--+
| | |
+ + + +
| | |
+--+--+ +
|** |
+--+--+--+
.
+ +--+--+
| | **|
+ + +--+
| | |
+ +--+ +
| |
+--+--+--+
.
+ +--+--+
| | |
+ + + +
| |**| |
+ +--+ +
| |
+--+--+--+
.
+ +--+--+
| | |
+ + + +
| | | |
+ + + +
| |**|
+--+--+--+
A366399
Triangle read by rows: T(n,k) is the number of paths traveling orthogonally on an n X k grid that visit every cell.
Original entry on oeis.org
1, 1, 4, 1, 8, 20, 1, 14, 62, 276, 1, 22, 132, 1006, 4324, 1, 32, 336, 3610, 26996, 229348, 1, 44, 688, 12010, 109722, 1620034, 13535280, 1, 58, 1578, 38984, 602804, 12071462, 175905310, 3023313284, 1, 74, 3190, 122188, 2434670, 82550864, 1449655468, 43551685370, 745416341496
Offset: 1
T(n,k) is a triangular array read by rows:
1,
1, 4,
1, 8, 20,
1, 14, 62, 276,
...
T(2,2) = 4:
+---+---+ +---+---+ +---+---+ +---+---+
| | | | | | | | | | | |
| **|** | | * | * | | **|** | | **|** |
| | * | | * | * | | * | | | * | * |
+---+---+ +---+---+ +---+---+ +---+---+
| | * | | * | * | | * | | | * | * |
| **|** | | **|** | | **|** | | * | * |
| | | | | | | | | | | |
+---+---+ +---+---+ +---+---+ +---+---+
A363577
Number of inequivalent Hamiltonian paths starting in the lower left corner of an n X n grid graph (paths differing only by rotations and reflections are regarded as equivalent).
Original entry on oeis.org
1, 1, 3, 23, 347, 10199, 683227, 85612967, 25777385143, 14396323278040, 19799561204761862, 50351228336401026361, 319210377672595552740369, 3736517399241599771428011100, 109790442395888863208285555153329, 5952238893391106787883489313797219949
Offset: 1
There are 3 paths for n=3:
+--+--+ +--+--+ +--+ +
| | | | | | |
+ + + + +--+ + + +
| | | | | | | |
+ +--+ + +--+ + +--+
A fourth path:
+--+--+
|
+--+ +
| | |
+ +--+
is the same as the second one in the row above after a 90-degree rotation.
All paths starting E are the same as the corresponding ones starting N after reflection in the forward diagonal.
Comments