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.

A338617 Number of spanning trees in the n X 4 king graph.

This page as a plain text file.
%I A338617 #27 Feb 16 2025 08:34:00
%S A338617 1,2304,1612127,1064918960,698512774464,457753027631164,
%T A338617 299940605530116319,196531575367664678400,128774089577828985307985,
%U A338617 84377085408032081020147412,55286683084713553039968700608,36225680193828279388607070447232,23736274839549237072891352060244017
%N A338617 Number of spanning trees in the n X 4 king graph.
%H A338617 Seiichi Manyama, <a href="/A338617/b338617.txt">Table of n, a(n) for n = 1..300</a>
%H A338617 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/KingGraph.html">King Graph</a>
%H A338617 Eric Weisstein's World of Mathematics, <a href="https://mathworld.wolfram.com/SpanningTree.html">Spanning Tree</a>
%F A338617 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 A338617 (Python)
%o A338617 # Using graphillion
%o A338617 from graphillion import GraphSet
%o A338617 def make_nXk_king_graph(n, k):
%o A338617     grids = []
%o A338617     for i in range(1, k + 1):
%o A338617         for j in range(1, n):
%o A338617             grids.append((i + (j - 1) * k, i + j * k))
%o A338617             if i < k:
%o A338617                 grids.append((i + (j - 1) * k, i + j * k + 1))
%o A338617             if i > 1:
%o A338617                 grids.append((i + (j - 1) * k, i + j * k - 1))
%o A338617     for i in range(1, k * n, k):
%o A338617         for j in range(1, k):
%o A338617             grids.append((i + j - 1, i + j))
%o A338617     return grids
%o A338617 def A338029(n, k):
%o A338617     if n == 1 or k == 1: return 1
%o A338617     universe = make_nXk_king_graph(n, k)
%o A338617     GraphSet.set_universe(universe)
%o A338617     spanning_trees = GraphSet.trees(is_spanning=True)
%o A338617     return spanning_trees.len()
%o A338617 def A338617(n):
%o A338617     return A338029(n, 4)
%o A338617 print([A338617(n) for n in range(1, 20)])
%Y A338617 Column 4 of A338029.
%Y A338617 Cf. A003696.
%K A338617 nonn
%O A338617 1,2
%A A338617 _Seiichi Manyama_, Nov 29 2020