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.

A321660 Number of nonnegative integer matrices with sum of entries equal to n and no zero rows or columns, whose entries are all distinct.

Original entry on oeis.org

1, 1, 1, 5, 5, 9, 45, 49, 85, 125, 233, 273, 417, 529, 745, 2573, 2861, 4761, 6837, 10489, 14317, 22637, 28289, 40041, 52041, 70177, 88561, 117605, 234773, 274761, 407469, 553681, 792613, 1052525, 1493033, 1959009, 3135537, 3904129, 5475673, 7173725, 9853325
Offset: 0

Views

Author

Gus Wiseman, Nov 15 2018

Keywords

Examples

			The a(5) = 9 matrices:
  [5] [4 1] [3 2] [2 3] [1 4]
.
  [4] [3] [2] [1]
  [1] [2] [3] [4]
		

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@@Join@@prs2mat[#]]&]],{n,5}]
  • PARI
    seq(n)={my(B=vector((sqrtint(8*(n+1))+1)\2, n, if(n==1, 1, (n-1)!*numdiv(n-1) + n!*(numdiv(n) - 2)))); apply(p->sum(i=0, poldegree(p), B[i+1]*polcoef(p, i)), Vec(prod(k=1, n, 1 + x^k*y + O(x*x^n))))} \\ Andrew Howroyd, Nov 16 2018

Formula

a(n) = Sum_{k>=1} (k!*A000005(k) + (k+1)!*(A000005(k+1) - 2))*A008289(n,k) for n > 0. - Andrew Howroyd, Nov 17 2018

Extensions

Terms a(11) and beyond from Andrew Howroyd, Nov 16 2018