A338617 Number of spanning trees in the n X 4 king graph.
1, 2304, 1612127, 1064918960, 698512774464, 457753027631164, 299940605530116319, 196531575367664678400, 128774089577828985307985, 84377085408032081020147412, 55286683084713553039968700608, 36225680193828279388607070447232, 23736274839549237072891352060244017
Offset: 1
Keywords
Links
- Seiichi Manyama, Table of n, a(n) for n = 1..300
- Eric Weisstein's World of Mathematics, King Graph
- Eric Weisstein's World of Mathematics, Spanning Tree
Programs
-
Python
# Using graphillion from graphillion import GraphSet def make_nXk_king_graph(n, k): grids = [] for i in range(1, k + 1): for j in range(1, n): grids.append((i + (j - 1) * k, i + j * k)) if i < k: grids.append((i + (j - 1) * k, i + j * k + 1)) if i > 1: grids.append((i + (j - 1) * k, i + j * k - 1)) for i in range(1, k * n, k): for j in range(1, k): grids.append((i + j - 1, i + j)) return grids def A338029(n, k): if n == 1 or k == 1: return 1 universe = make_nXk_king_graph(n, k) GraphSet.set_universe(universe) spanning_trees = GraphSet.trees(is_spanning=True) return spanning_trees.len() def A338617(n): return A338029(n, 4) print([A338617(n) for n in range(1, 20)])
Formula
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