OFFSET
0,4
COMMENTS
A digraph is Hamiltonian if it contains a directed cycle passing through every vertex exactly once.
LINKS
Wikipedia, Hamiltonian path
EXAMPLE
The a(3) = 15 edge-sets:
{12,23,31} {12,13,21,32} {12,13,21,23,31} {12,13,21,23,31,32}
{13,21,32} {12,13,23,31} {12,13,21,23,32}
{12,21,23,31} {12,13,21,31,32}
{12,23,31,32} {12,13,23,31,32}
{13,21,23,32} {12,21,23,31,32}
{13,21,31,32} {13,21,23,31,32}
MATHEMATICA
Table[Length[Select[Subsets[Select[Tuples[Range[n], 2], UnsameQ@@#&]], FindHamiltonianCycle[Graph[Range[n], DirectedEdge@@@#]]!={}&]], {n, 0, 4}] (* Mathematica 8.0+. Warning: Using HamiltonianGraphQ instead of FindHamiltonianCycle returns a(4) = 1200 which is incorrect *)
CROSSREFS
KEYWORD
nonn,more
AUTHOR
Gus Wiseman, Jun 15 2019
STATUS
approved