A342631 Number of Hamiltonian paths (or Gray codes) on n-cube with the origin as the starting node, up to a permutation of the coordinates.
1, 1, 3, 238, 48828036
Offset: 1
Examples
For n=2, the two Hamiltonian paths of the square that start at (0,0), i.e., (0,0) -->-- (1,0) (0,0) (1,0) | | | V and V ^ | | | (0,1) --<-- (1,1) (0,1) -->-- (1,1), only account for one, as one is obtained from the other by the x <-> y permutation; so a(2) = 1.
Links
- Luc Rousseau, A C program that computes a(n)
- Eric Weisstein's World of Mathematics, Hamiltonian Path
- Eric Weisstein's World of Mathematics, Hypercube Graph
Programs
-
C
/* See Rousseau link. */
Formula
a(n) = A003043(n) / n!.