OFFSET
0,4
LINKS
Andrew Howroyd, Table of n, a(n) for n = 0..1000
FORMULA
EXAMPLE
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]
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}]
PROG
(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
CROSSREFS
KEYWORD
nonn
AUTHOR
Gus Wiseman, Nov 15 2018
EXTENSIONS
Terms a(11) and beyond from Andrew Howroyd, Nov 16 2018
STATUS
approved