A321732 Number of nonnegative integer square matrices with sum of entries equal to n, no zero rows or columns, and the same row sums as column sums.
1, 1, 3, 11, 53, 317, 2293, 19435, 188851, 2068417, 25203807, 338117445, 4951449055, 78589443061, 1343810727205, 24626270763109, 481489261372381, 10004230113283129, 220125503239710879, 5113204953106107087, 125037079246130168973
Offset: 0
Keywords
Examples
The a(3) = 11 matrices: [3] . [2 0] [1 1] [1 0] [0 1] [0 1] [1 0] [0 2] [1 1] . [1 0 0] [1 0 0] [0 1 0] [0 1 0] [0 0 1] [0 0 1] [0 1 0] [0 0 1] [1 0 0] [0 0 1] [1 0 0] [0 1 0] [0 0 1] [0 1 0] [0 0 1] [1 0 0] [0 1 0] [1 0 0]
Links
- Ludovic Schwob, Table of n, a(n) for n = 0..30
Crossrefs
Programs
-
Mathematica
prs2mat[prs_]:=Table[Count[prs,{i,j}],{i,Union[First/@prs]},{j,Union[Last/@prs]}]; multsubs[set_,k_]:=If[k==0,{{}},Join@@Table[Prepend[#,set[[i]]]&/@multsubs[Drop[set,i-1],k-1],{i,Length[set]}]]; Table[Length[Select[multsubs[Tuples[Range[n],2],n],And[Union[First/@#]==Range[Max@@First/@#]==Union[Last/@#],Total/@prs2mat[#]==Total/@Transpose[prs2mat[#]]]&]],{n,5}]
Extensions
a(7) onwards from Ludovic Schwob, Apr 03 2024