login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A321660 Number of nonnegative integer matrices with sum of entries equal to n and no zero rows or columns, whose entries are all distinct. 5
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 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,4
LINKS
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
EXAMPLE
The a(5) = 9 matrices:
[5] [4 1] [3 2] [2 3] [1 4]
.
[4] [3] [2] [1]
[1] [2] [3] [4]
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}]
PROG
(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
CROSSREFS
Sequence in context: A336128 A049122 A336140 * A351292 A290240 A245088
KEYWORD
nonn
AUTHOR
Gus Wiseman, Nov 15 2018
EXTENSIONS
Terms a(11) and beyond from Andrew Howroyd, Nov 16 2018
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 25 16:45 EDT 2024. Contains 371989 sequences. (Running on oeis4.)