%I #26 Dec 04 2020 12:04:30
%S 1,2304,1612127,1064918960,698512774464,457753027631164,
%T 299940605530116319,196531575367664678400,128774089577828985307985,
%U 84377085408032081020147412,55286683084713553039968700608,36225680193828279388607070447232,23736274839549237072891352060244017
%N Number of spanning trees in the n X 4 king graph.
%H Seiichi Manyama, <a href="/A338617/b338617.txt">Table of n, a(n) for n = 1..300</a>
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/KingGraph.html">King Graph</a>
%H Eric Weisstein's World of Mathematics, <a href="http://mathworld.wolfram.com/SpanningTree.html">Spanning Tree</a>
%F Empirical g.f.: x*(56*x^7 + 7072*x^6 - 162708*x^5 + 371791*x^4 + 18080*x^3 - 49920*x^2 + 1556*x + 1) / (x^8 - 748*x^7 + 61345*x^6 - 368764*x^5 + 680848*x^4 - 368764*x^3 + 61345*x^2 - 748*x + 1). - _Vaclav Kotesovec_, Dec 04 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 A338029(n, k):
%o if n == 1 or k == 1: return 1
%o universe = make_nXk_king_graph(n, k)
%o GraphSet.set_universe(universe)
%o spanning_trees = GraphSet.trees(is_spanning=True)
%o return spanning_trees.len()
%o def A338617(n):
%o return A338029(n, 4)
%o print([A338617(n) for n in range(1, 20)])
%Y Column 4 of A338029.
%Y Cf. A003696.
%K nonn
%O 1,2
%A _Seiichi Manyama_, Nov 29 2020
|