login
Number of perfect matchings in triangle graph with n nodes per side.
4

%I #34 Mar 07 2016 04:41:10

%S 1,0,0,2,6,0,0,2196,37004,0,0,2317631400,216893681800,0,0,

%T 2326335506123418128,1208982377794384163088,0,0,

%U 2220650888749669503773432361504,6408743336016148761893699822360672,0,0,2015895925780490675949731718780144934779733312

%N Number of perfect matchings in triangle graph with n nodes per side.

%D J. Propp, Enumeration of matchings: problems and progress, pp. 255-291 in L. J. Billera et al., eds, New Perspectives in Algebraic Combinatorics, Cambridge, 1999 (see Problem 17).

%H Alois P. Heinz, <a href="/A039907/b039907.txt">Table of n, a(n) for n = 0..60</a>

%H J. Propp, <a href="http://arxiv.org/abs/math.CO/9801061">Twenty open problems in enumeration of matchings</a>, arXiv:math/9801061 [math.CO], 1998-1999.

%H J. Propp, <a href="http://faculty.uml.edu/jpropp/update.pdf">Updated article</a>

%H J. Propp, Enumeration of matchings: problems and progress, in L. J. Billera et al. (eds.), <a href="http://www.msri.org/publications/books/Book38/contents.html">New Perspectives in Algebraic Combinatorics</a>

%F a(n) = A178446(n) if A000217(n) is even, a(n) = 0 otherwise. - _Andrew Howroyd_, Mar 06 2016

%p with(LinearAlgebra): a:= proc(n) option remember; local l, ll, i, j, h0, h1, M; if n=0 then return 1 fi; if n<0 or member(irem(n, 4), [1, 2]) then return 0 fi; l:= []; for j from 1 to n-1 do h0:= j*(j-1)/2+1; h1:= j*(j+1)/2+1; for i from 1 to j do l:= [l[], [h1, h1+1]]; if irem(i, 2)=1 then l:= [l[], [h1, h0]]; h1:= h1+1; l:=[l[], [h1, h0]]; h0:=h0+1 else l:= [l[], [h0, h1]]; h1:= h1+1; l:=[l[], [h0, h1]]; h0:=h0+1 fi od od; M:= Matrix((n+1)*n/2); for ll in l do M[ll[1], ll[2]]:= 1; M[ll[2], ll[1]]:= -1 od: isqrt(Determinant(M)) end: seq(a(n), n=0..20); # _Alois P. Heinz_, May 08 2010

%t a[n_] := a[n] = Module[{l, ll, i, j, h0, h1, M}, If[n == 0 , Return[1]]; If[n < 0 || MemberQ[{1, 2}, Mod[n, 4]], Return[0]]; l = {}; For[j = 1, j <= n-1, j++, h0 = j*(j-1)/2+1; h1 = j*(j+1)/2+1; For[i = 1, i <= j, i++, l = Join[l, {h1, h1+1}]; If[Mod [i, 2] == 1, l = Join[l, {h1, h0}]; h1 = h1+1; l = Join[l, {h1, h0}]; h0 = h0+1, l = Join[l, {h0, h1}]; h1 = h1+1; l = Join[l, {h0, h1}]; h0 = h0+1]]]; M[_, _] = 0; Do[M[ll[[1]], ll[[2]]] = 1; M[ll[[2]], ll[[1]]] = -1, {ll, Partition[l, 2]}]; Sqrt[Det[Array[M, {n*(n+1)/2, n*(n+1)/2}]]]]; Table[a[n], {n, 0, 23}] (* _Jean-François Alcover_, Apr 17 2014, after _Alois P. Heinz_ *)

%Y Cf. A071093, A269869, A178446.

%K nonn

%O 0,4

%A _N. J. A. Sloane_.

%E a(17)-a(20) from _Alois P. Heinz_, May 08 2010

%E a(21)-a(23) from _Alois P. Heinz_, Jan 12 2014