cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A321654 Number of nonnegative integer matrices with sum of entries equal to n and no zero rows or columns, with distinct row sums and distinct column sums.

Original entry on oeis.org

1, 1, 1, 13, 13, 45, 681, 885, 2805, 8301, 237213
Offset: 0

Views

Author

Gus Wiseman, Nov 15 2018

Keywords

Examples

			The a(3) = 13 matrices:
  [3] [2 1] [1 2]
.
  [2] [2 0] [1 1] [1 1] [1] [1 0] [1 0] [0 2] [0 1] [0 1]
  [1] [0 1] [1 0] [0 1] [2] [1 1] [0 2] [1 0] [2 0] [1 1]
		

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/@#]==Range[Max@@Last/@#],UnsameQ@@Total/@prs2mat[#],UnsameQ@@Total/@Transpose[prs2mat[#]]]&]],{n,5}]