A321659 Number of nonnegative integer matrices with sum of entries equal to n and no zero rows or columns, whose nonzero entries are all distinct.
1, 1, 1, 9, 9, 17, 161, 169, 313, 465, 5313, 5465, 10457, 15313, 25009, 271929, 286329, 537953, 799121, 1297369, 1805161, 20532897, 21292017, 40508297, 59738825, 97431073, 135137569, 209525865, 2089381929, 2200470833, 4135252289, 6124698121, 9937836505
Offset: 0
Keywords
Examples
The a(5) = 17 matrices: [5] [4 1] [3 2] [2 3] [1 4] . [4] [4 0] [3] [3 0] [2] [2 0] [1] [1 0] [0 4] [0 3] [0 2] [0 1] [1] [0 1] [2] [0 2] [3] [0 3] [4] [0 4] [1 0] [2 0] [3 0] [4 0]
Links
- Andrew Howroyd, Table of n, a(n) for n = 0..1000
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@@DeleteCases[Join@@prs2mat[#],0]]&]],{n,5}]
-
PARI
\\ here b(n) is A101370(n). b(n)={sum(m=0, n, sum(k=0, m, stirling(m,k,2)*k!)^2*polcoef(log(1+x+O(x*x^n))^m, n)/m!)} seq(n)={my(B=vector((sqrtint(8*(n+1))+1)\2, n, b(n-1))); apply(p->sum(i=0, poldegree(p), B[i+1]*i!*polcoef(p, i)), Vec(prod(k=1, n, 1 + x^k*y + O(x*x^n))))} \\ Andrew Howroyd, Nov 16 2018
Formula
Extensions
Terms a(11) and beyond from Andrew Howroyd, Nov 16 2018