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

%I #13 Dec 09 2020 04:51:32

%S 30,348,3459,33145,316164,3013590,28722567,273751765,2609096478,

%T 24866992602,237004387635,2258860992595,21528938911842,

%U 205189789087374,1955639788756293,18638973217791295,177645865363829526,1693121885638023396,16136945905019298321,153799336805212613275

%N Number of (undirected) cycles on the n X 3 king graph.

%H Seiichi Manyama, <a href="/A339197/b339197.txt">Table of n, a(n) for n = 2..1000</a>

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

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

%F Empirical g.f.: -x^2 * (11*x^4 + 49*x^3 + 69*x^2 + 48*x + 30) / ((x-1)^2 * (6*x^4 + 5*x^3 + 14*x^2 + 8*x - 1)). - _Vaclav Kotesovec_, Dec 09 2020

%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 A339098(n, k):

%o universe = make_nXk_king_graph(n, k)

%o GraphSet.set_universe(universe)

%o cycles = GraphSet.cycles()

%o return cycles.len()

%o def A339197(n):

%o return A339098(n, 3)

%o print([A339197(n) for n in range(2, 30)])

%Y Column 3 of A339098.

%Y Cf. A339200.

%K nonn

%O 2,1

%A _Seiichi Manyama_, Nov 27 2020