login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

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.
6
1, 1, 3, 11, 53, 317, 2293, 19435, 188851, 2068417, 25203807, 338117445, 4951449055, 78589443061, 1343810727205, 24626270763109, 481489261372381, 10004230113283129, 220125503239710879, 5113204953106107087, 125037079246130168973
OFFSET
0,3
LINKS
EXAMPLE
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]
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}]
KEYWORD
nonn
AUTHOR
Gus Wiseman, Nov 18 2018
EXTENSIONS
a(7) onwards from Ludovic Schwob, Apr 03 2024
STATUS
approved