cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A339200 Number of (undirected) Hamiltonian cycles on the n X 3 king graph.

This page as a plain text file.
%I A339200 #16 Feb 16 2025 08:34:01
%S A339200 4,16,120,744,4922,31904,208118,1354872,8826022,57483536,374412158,
%T A339200 2438639080,15883563110,103454037120,673825180718,4388811619032,
%U A339200 28585557862518,186185731404016,1212679737590398,7898522254036168,51445284278407878,335077523213321312,2182453613487235150,14214930709900240312
%N A339200 Number of (undirected) Hamiltonian cycles on the n X 3 king graph.
%H A339200 Seiichi Manyama, <a href="/A339200/b339200.txt">Table of n, a(n) for n = 2..1000</a>
%H A339200 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/HamiltonianCycle.html">Hamiltonian Cycle</a>
%H A339200 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/KingGraph.html">King Graph</a>
%H A339200 <a href="/index/Gra#graphs">Index entries for sequences related to graphs, Hamiltonian</a>
%F A339200 Empirical g.f.: 2*x^2 * (3*x^4 + 4*x^3 + 2*x^2 - 2) / (6*x^4 + 8*x^3 + 15*x^2 + 4*x - 1). - _Vaclav Kotesovec_, Dec 09 2020
%o A339200 (Python)
%o A339200 # Using graphillion
%o A339200 from graphillion import GraphSet
%o A339200 def make_nXk_king_graph(n, k):
%o A339200     grids = []
%o A339200     for i in range(1, k + 1):
%o A339200         for j in range(1, n):
%o A339200             grids.append((i + (j - 1) * k, i + j * k))
%o A339200             if i < k:
%o A339200                 grids.append((i + (j - 1) * k, i + j * k + 1))
%o A339200             if i > 1:
%o A339200                 grids.append((i + (j - 1) * k, i + j * k - 1))
%o A339200     for i in range(1, k * n, k):
%o A339200         for j in range(1, k):
%o A339200             grids.append((i + j - 1, i + j))
%o A339200     return grids
%o A339200 def A339190(n, k):
%o A339200     universe = make_nXk_king_graph(n, k)
%o A339200     GraphSet.set_universe(universe)
%o A339200     cycles = GraphSet.cycles(is_hamilton=True)
%o A339200     return cycles.len()
%o A339200 def A339200(n):
%o A339200     return A339190(n, 3)
%o A339200 print([A339200(n) for n in range(2, 20)])
%Y A339200 Column 3 of A339190.
%Y A339200 Cf. A339197.
%K A339200 nonn
%O A339200 2,1
%A A339200 _Seiichi Manyama_, Nov 27 2020