%I #12 Sep 16 2019 21:15:01
%S 1,1,4,26,204,1992,23336,318080,4948552,86550424,1681106080,
%T 35904872576,836339613984,21100105791936,573194015723840,
%U 16681174764033728,517768654898701120,17074080118403865856,596117945858272441408,21967609729338776864384,852095613819396775627200
%N Number of nonnegative integer matrices with sum of entries equal to n, no zero rows or columns, and distinct rows (or distinct columns).
%H Alois P. Heinz, <a href="/A321586/b321586.txt">Table of n, a(n) for n = 0..200</a>
%e The a(3) = 26 matrices:
%e [3][21][12][111]
%e .
%e [2][20][11][11][110][101][1][10][10][100][02][011][01][01][010][001]
%e [1][01][10][01][001][010][2][11][02][011][10][100][20][11][101][110]
%e .
%e [100][100][010][010][001][001]
%e [010][001][100][001][100][010]
%e [001][010][001][100][010][100]
%p C:= binomial:
%p b:= proc(n, i, k, p) option remember; `if`(n=0, p!, `if`(i<1, 0, add(
%p b(n-i*j, min(n-i*j, i-1), k, p+j)*C(C(k+i-1, i), j), j=0..n/i)))
%p end:
%p a:= n-> add(add(b(n$2, i, 0)*(-1)^(k-i)*C(k, i), i=0..k), k=0..n):
%p seq(a(n), n=0..21); # _Alois P. Heinz_, Sep 16 2019
%t multsubs[set_,k_]:=If[k==0,{{}},Join@@Table[Prepend[#,set[[i]]]&/@multsubs[Drop[set,i-1],k-1],{i,Length[set]}]];
%t prs2mat[prs_]:=Table[Count[prs,{i,j}],{i,Union[First/@prs]},{j,Union[Last/@prs]}];
%t Table[Length[Select[multsubs[Tuples[Range[n],2],n],And[Union[First/@#]==Range[Max@@First/@#],Union[Last/@#]==Range[Max@@Last/@#],UnsameQ@@prs2mat[#]]&]],{n,5}]
%Y Cf. A007716, A049311, A101370, A120733, A283877, A316980, A321446, A321587.
%Y Row sums of A327245.
%K nonn
%O 0,3
%A _Gus Wiseman_, Nov 13 2018
%E a(7)-a(20) from _Alois P. Heinz_, Sep 16 2019
|