A116469 Square array read by antidiagonals: T(m,n) = number of spanning trees in an m X n grid.
1, 1, 1, 1, 4, 1, 1, 15, 15, 1, 1, 56, 192, 56, 1, 1, 209, 2415, 2415, 209, 1, 1, 780, 30305, 100352, 30305, 780, 1, 1, 2911, 380160, 4140081, 4140081, 380160, 2911, 1, 1, 10864, 4768673, 170537640, 557568000, 170537640, 4768673, 10864, 1
Offset: 1
Examples
a(2,2) = 4, since we must have exactly 3 of the 4 possible connections: if we have all 4 there are multiple paths between points; if we have fewer some points will be isolated from others. Array begins: 1, 1, 1, 1, 1, 1, ... 1, 4, 15, 56, 209, 780, ... 1, 15, 192, 2415, 30305, 380160, ... 1, 56, 2415, 100352, 4140081, 170537640, ... 1, 209, 30305, 4140081, 557568000, 74795194705, ... 1, 780, 380160, 170537640, 74795194705, 32565539635200, ...
Links
- Seiichi Manyama, Antidiagonals n = 1..50, flattened
- Germain Kreweras, Complexité et circuits Eulériens dans les sommes tensorielles de graphes, J. Combin. Theory, B 24 (1978), 202-212. - From _N. J. A. Sloane_, May 27 2012
Crossrefs
Programs
-
Maple
Digits:=200; T:=(m,n)->round(Re(evalf(simplify(expand( mul(mul( 4*sin(h*Pi/(2*m))^2+4*sin(k*Pi/(2*n))^2, h=1..m-1), k=1..n-1)))))); # crude Maple program from N. J. A. Sloane, May 27 2012
-
Mathematica
T[m_, n_] := Product[4 Sin[h Pi/(2 m)]^2 + 4 Sin[k Pi/(2 n)]^2, {h, m - 1}, {k, n - 1}]; Flatten[Table[FullSimplify[T[k, r - k]], {r, 2, 10}, {k, 1, r - 1}]] (* Ben Branman, Mar 10 2013 *)
-
PARI
T(n,m) = polresultant(polchebyshev(n-1, 2, x/2), polchebyshev(m-1, 2, (4-x)/2)); \\ Michel Marcus, Apr 13 2020
-
Python
# Using graphillion from graphillion import GraphSet import graphillion.tutorial as tl def A116469(n, k): if n == 1 or k == 1: return 1 universe = tl.grid(n - 1, k - 1) GraphSet.set_universe(universe) spanning_trees = GraphSet.trees(is_spanning=True) return spanning_trees.len() print([A116469(j + 1, i - j + 1) for i in range(9) for j in range(i + 1)]) # Seiichi Manyama, Apr 12 2020
Formula
T(m,n) = Product_{k=1..n-1} Product_{h=1..m-1} (4*sin(h*Pi/(2*m))^2 + 4*sin(k*Pi/(2*n))^2); [Kreweras] - N. J. A. Sloane, May 27 2012
Equivalently, T(n,m) = resultant( U(n-1,x/2), U(m-1,(4-x)/2) ) = Product_{k = 1..n-1} Product_{h = 1..m-1} (4 - 2*cos(h*Pi/m) - 2*cos(k*Pi/n)), where U(n,x) denotes the Chebyshev polynomial of the second kind. The divisibility properties of the array mentioned in the Comments follow from this representation. - Peter Bala, Apr 29 2014
Comments