login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A339763 Number of (undirected) Hamiltonian paths in the 5 X n king graph. 6

%I #15 Jan 17 2022 06:12:53

%S 1,768,43676,4743130,364618672,28808442502,2125185542510,

%T 153198148096800,10739936528121270,738599412949227054,

%U 49945111084852186032,3331294312194018084810,219599512046978073473186,14331641424452867055092544,927231520831830806024847178

%N Number of (undirected) Hamiltonian paths in the 5 X n king graph.

%H Andrew Howroyd, <a href="/A339763/b339763.txt">Table of n, a(n) for n = 1..200</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/GraphPath.html">Graph Path</a>

%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/KingGraph.html">King Graph</a>

%o (Python)

%o # Using graphillion

%o from graphillion import GraphSet

%o def make_nXk_king_graph(n, k):

%o grids = []

%o for i in range(1, k + 1):

%o for j in range(1, n):

%o grids.append((i + (j - 1) * k, i + j * k))

%o if i < k:

%o grids.append((i + (j - 1) * k, i + j * k + 1))

%o if i > 1:

%o grids.append((i + (j - 1) * k, i + j * k - 1))

%o for i in range(1, k * n, k):

%o for j in range(1, k):

%o grids.append((i + j - 1, i + j))

%o return grids

%o def A(start, goal, n, k):

%o universe = make_nXk_king_graph(n, k)

%o GraphSet.set_universe(universe)

%o paths = GraphSet.paths(start, goal, is_hamilton=True)

%o return paths.len()

%o def B(n, k):

%o m = k * n

%o s = 0

%o for i in range(1, m):

%o for j in range(i + 1, m + 1):

%o s += A(i, j, n, k)

%o return s

%o def A339763(n):

%o return B(n, 5)

%o print([A339763(n) for n in range(1, 11)])

%Y Row 5 of A350729.

%Y Cf. A003778, A308129, A339760, A339761, A339762.

%K nonn

%O 1,2

%A _Seiichi Manyama_, Dec 16 2020

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 16 02:10 EDT 2024. Contains 375959 sequences. (Running on oeis4.)