%I #28 Mar 14 2015 22:58:53
%S 1,1,0,1,1,2,1,0,3,0,1,1,5,11,36,1,0,8,0,95,0,1,1,13,41,281,1183,6728,
%T 1,0,21,0,781,0,31529,0,1,1,34,153,2245,14824,167089,1292697,12988816,
%U 1,0,55,0,6336,0,817991,0,108435745,0,1,1,89,571,18061,185921,4213133,53175517,1031151241,14479521761,258584046368
%N Triangle T(m,n) read by rows: number of domino tilings of the m X n grid (0 <= m <= n).
%C A099390 is the main entry for this problem.
%C Triangle read by rows: the square array in A187596 with entries above main diagonal deleted.
%H Alois P. Heinz, <a href="/A187616/b187616.txt">Rows n = 1..32, flattened</a>
%H <a href="/index/Do#domino">Index entries for sequences related to dominoes</a>
%e Triangle begins:
%e 1
%e 1 0
%e 1 1 2
%e 1 0 3 0
%e 1 1 5 11 36
%e 1 0 8 0 95 0
%e 1 1 13 41 281 1183 6728
%e 1 0 21 0 781 0 31529 0
%e 1 1 34 153 2245 14824 167089 1292697 12988816
%e ...
%p with(LinearAlgebra):
%p T:= proc(m,n) option remember; local i, j, t, M;
%p if m<=1 or n<=1 then 1 -irem(n*m, 2)
%p elif irem(n*m, 2)=1 then 0
%p else M:= Matrix(n*m, shape =skewsymmetric);
%p for i to n do
%p for j to m do
%p t:= (i-1)*m+j;
%p if j<m then M[t, t+1]:= 1 fi;
%p if i<n then M[t, t+m]:= 1-2*irem(j, 2) fi
%p od
%p od;
%p sqrt(Determinant(M))
%p fi
%p end:
%p seq(seq(T(m, n), n=0..m), m=0..10); # _Alois P. Heinz_, Apr 11 2011
%t T[m_, n_] := T[m, n] = Module[{i, j, t, M}, Which[m <= 1 || n <= 1, 1 - Mod[n*m, 2], Mod[n*m, 2] == 1, 0, True, M[i_, j_] /; j < i := -M[j, i]; M[_, _] = 0; For[i = 1, i <= n, i++, For[j = 1, j <= m, j++, t = (i-1)*m+j; If[j < m, M[t, t+1] = 1]; If[i < n, M[t, t+m] = 1 - 2*Mod[j, 2]]]]; Sqrt[Det[Table[M[i, j], {i, 1, n*m}, {j, 1, n*m}]]]]]; Table[Table[T[m, n], {n, 0, m}], {m, 0, 10}] // Flatten (* _Jean-François Alcover_, Jan 07 2014, translated from Maple *)
%Y Cf. A099390, A187596. See A099390 for sequences appearing in the rows and columns. See also A187617, A187618.
%K nonn,tabl
%O 0,6
%A _N. J. A. Sloane_, Mar 11 2011