A321586 Number of nonnegative integer matrices with sum of entries equal to n, no zero rows or columns, and distinct rows (or distinct columns).
1, 1, 4, 26, 204, 1992, 23336, 318080, 4948552, 86550424, 1681106080, 35904872576, 836339613984, 21100105791936, 573194015723840, 16681174764033728, 517768654898701120, 17074080118403865856, 596117945858272441408, 21967609729338776864384, 852095613819396775627200
Offset: 0
Keywords
Examples
The a(3) = 26 matrices: [3][21][12][111] . [2][20][11][11][110][101][1][10][10][100][02][011][01][01][010][001] [1][01][10][01][001][010][2][11][02][011][10][100][20][11][101][110] . [100][100][010][010][001][001] [010][001][100][001][100][010] [001][010][001][100][010][100]
Links
- Alois P. Heinz, Table of n, a(n) for n = 0..200
Crossrefs
Programs
-
Maple
C:= binomial: b:= proc(n, i, k, p) option remember; `if`(n=0, p!, `if`(i<1, 0, add( b(n-i*j, min(n-i*j, i-1), k, p+j)*C(C(k+i-1, i), j), j=0..n/i))) end: a:= n-> add(add(b(n$2, i, 0)*(-1)^(k-i)*C(k, i), i=0..k), k=0..n): seq(a(n), n=0..21); # Alois P. Heinz, Sep 16 2019
-
Mathematica
multsubs[set_,k_]:=If[k==0,{{}},Join@@Table[Prepend[#,set[[i]]]&/@multsubs[Drop[set,i-1],k-1],{i,Length[set]}]]; prs2mat[prs_]:=Table[Count[prs,{i,j}],{i,Union[First/@prs]},{j,Union[Last/@prs]}]; Table[Length[Select[multsubs[Tuples[Range[n],2],n],And[Union[First/@#]==Range[Max@@First/@#],Union[Last/@#]==Range[Max@@Last/@#],UnsameQ@@prs2mat[#]]&]],{n,5}]
Extensions
a(7)-a(20) from Alois P. Heinz, Sep 16 2019