A135588
Number of symmetric (0,1)-matrices with exactly n entries equal to 1 and no zero rows or columns.
Original entry on oeis.org
1, 1, 2, 6, 20, 74, 302, 1314, 6122, 29982, 154718, 831986, 4667070, 27118610, 163264862, 1013640242, 6488705638, 42687497378, 288492113950, 1998190669298, 14177192483742, 102856494496050, 762657487965086, 5771613810502002, 44555989658479726, 350503696871063138
Offset: 0
From _Gus Wiseman_, Nov 14 2018: (Start)
The a(4) = 20 matrices:
[11]
[11]
.
[110][101][100][100][011][010][010][001][001]
[100][010][011][001][100][110][101][010][001]
[001][100][010][011][100][001][010][101][110]
.
[1000][1000][1000][1000][0100][0100][0010][0010][0001][0001]
[0100][0100][0010][0001][1000][1000][0100][0001][0100][0010]
[0010][0001][0100][0010][0010][0001][1000][1000][0010][0100]
[0001][0010][0001][0100][0001][0010][0001][0100][1000][1000]
(End)
Cf.
A049311,
A054976,
A101370,
A104601,
A104602,
A120733,
A138178,
A283877,
A316983,
A320796,
A321401,
A321405.
-
Table[Sum[SeriesCoefficient[(1+x)^k*(1+x^2)^(k*(k-1)/2)/2^(k+1),{x,0,n}],{k,0,Infinity}],{n,0,20}] (* Vaclav Kotesovec, Jul 02 2014 *)
Join[{1}, Table[Length[Select[Subsets[Tuples[Range[n], 2], {n}], And[Union[First/@#]==Range[Max@@First/@#], Union[Last/@#]==Range[Max@@Last/@#], Sort[Reverse/@#]==#]&]], {n, 5}]] (* Gus Wiseman, Nov 14 2018 *)
A321720
Number of non-normal (0,1) semi-magic squares with sum of entries equal to n.
Original entry on oeis.org
1, 1, 2, 6, 25, 120, 726, 5040, 40410, 362881, 3630840, 39916800, 479069574, 6227020800, 87181402140, 1307674370040, 20922977418841, 355687428096000, 6402388104196400, 121645100408832000, 2432903379962038320, 51090942171778378800, 1124000886592995642000, 25852016738884976640000
Offset: 0
Cf.
A006052,
A007016,
A057151,
A068313,
A008300,
A101370,
A104602,
A120732,
A271103,
A319056,
A319616.
-
prs2mat[prs_]:=Table[Count[prs,{i,j}],{i,Union[First/@prs]},{j,Union[Last/@prs]}];
Table[Length[Select[Subsets[Tuples[Range[n],2],{n}],And[Union[First/@#]==Union[Last/@#]==Range[Max@@First/@#],SameQ@@Total/@prs2mat[#],SameQ@@Total/@Transpose[prs2mat[#]]]&]],{n,5}]
A321723
Number of non-normal magic squares whose entries are all 0 or 1 and sum to n.
Original entry on oeis.org
1, 1, 0, 0, 9, 20, 96, 656, 5584, 48913, 494264, 5383552, 65103875, 840566080, 11834159652, 176621049784, 2838040416201, 48060623405312
Offset: 0
The a(4) = 9 magic squares:
[1 1]
[1 1]
.
[1 0 0 0][1 0 0 0][0 1 0 0][0 1 0 0][0 0 1 0][0 0 1 0][0 0 0 1][0 0 0 1]
[0 0 1 0][0 0 0 1][0 0 1 0][0 0 0 1][1 0 0 0][0 1 0 0][1 0 0 0][0 1 0 0]
[0 0 0 1][0 1 0 0][1 0 0 0][0 0 1 0][0 1 0 0][0 0 0 1][0 0 1 0][1 0 0 0]
[0 1 0 0][0 0 1 0][0 0 0 1][1 0 0 0][0 0 0 1][1 0 0 0][0 1 0 0][0 0 1 0]
-
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[Subsets[Tuples[Range[n],2],{n}],And[Union[First/@#]==Range[Max@@First/@#]==Union[Last/@#],SameQ@@Join[{Tr[prs2mat[#]],Tr[Reverse[prs2mat[#]]]},Total/@prs2mat[#],Total/@Transpose[prs2mat[#]]]]&]],{n,5}]
A321735
Number of (0,1)-matrices with sum of entries equal to n, no zero rows or columns, weakly decreasing row and column sums, and the same row sums as column sums.
Original entry on oeis.org
1, 1, 2, 7, 30, 153, 939, 6653, 53743, 486576
Offset: 0
The a(3) = 7 matrices:
[1 1]
[1 0]
.
[1 0 0] [1 0 0] [0 1 0] [0 1 0] [0 0 1] [0 0 1]
[0 1 0] [0 0 1] [1 0 0] [0 0 1] [1 0 0] [0 1 0]
[0 0 1] [0 1 0] [0 0 1] [1 0 0] [0 1 0] [1 0 0]
Cf.
A000700,
A007016,
A049311,
A054976,
A057151,
A104602,
A320451,
A321719,
A321723,
A321732,
A321733,
A321736,
A321739.
-
prs2mat[prs_]:=Table[Count[prs,{i,j}],{i,Union[First/@prs]},{j,Union[Last/@prs]}];
Table[Length[Select[Subsets[Tuples[Range[n],2],{n}],And[Union[First/@#]==Range[Max@@First/@#]==Union[Last/@#],OrderedQ[Total/@prs2mat[#]],OrderedQ[Total/@Transpose[prs2mat[#]]],Total/@prs2mat[#]==Total/@Transpose[prs2mat[#]]]&]],{n,5}]
A321739
Number of non-isomorphic weight-n set multipartitions (multisets of sets) whose part-sizes are also their vertex-degrees.
Original entry on oeis.org
1, 1, 1, 2, 4, 6, 12, 21, 46, 94, 208
Offset: 0
Non-isomorphic representatives of the a(1) = 1 through a(6) = 12 set multipartitions:
{1} {1}{2} {2}{12} {12}{12} {1}{23}{23} {12}{13}{23}
{1}{2}{3} {1}{1}{23} {2}{13}{23} {3}{23}{123}
{1}{3}{23} {3}{3}{123} {1}{1}{1}{234}
{1}{2}{3}{4} {1}{2}{2}{34} {1}{1}{24}{34}
{1}{2}{4}{34} {1}{2}{34}{34}
{1}{2}{3}{4}{5} {1}{3}{24}{34}
{1}{4}{4}{234}
{2}{4}{12}{34}
{3}{4}{12}{34}
{1}{2}{3}{3}{45}
{1}{2}{3}{5}{45}
{1}{2}{3}{4}{5}{6}
Cf.
A000700,
A049311,
A057151,
A104602,
A319056,
A320451,
A321719,
A321721,
A321723,
A321732,
A321734,
A321735,
A321736,
A321854.
A321733
Number of (0,1)-matrices with n ones, no zero rows or columns, and the same row sums as column sums.
Original entry on oeis.org
1, 1, 2, 8, 40, 246, 1816, 15630, 153592, 1696760, 20816358, 280807868, 4131117440, 65823490088, 1129256780408
Offset: 0
The a(4) = 40 matrices:
[1 1]
[1 1]
.
[1 1 0][1 1 0][1 0 1][1 0 1][1 0 0]
[1 0 0][0 0 1][1 0 0][0 1 0][0 1 1]
[0 0 1][1 0 0][0 1 0][1 0 0][0 1 0]
.
[1 0 0][0 1 1][0 1 0][0 1 0][0 1 0]
[0 0 1][1 0 0][1 1 0][1 0 1][0 1 1]
[0 1 1][1 0 0][0 0 1][0 1 0][1 0 0]
.
[0 1 0][0 0 1][0 0 1][0 0 1][0 0 1]
[0 0 1][1 1 0][1 0 0][0 1 0][0 0 1]
[1 0 1][0 1 0][0 1 1][1 0 1][1 1 0]
.
[1 0 0 0][1 0 0 0][1 0 0 0][1 0 0 0][1 0 0 0][1 0 0 0]
[0 1 0 0][0 1 0 0][0 0 1 0][0 0 1 0][0 0 0 1][0 0 0 1]
[0 0 1 0][0 0 0 1][0 1 0 0][0 0 0 1][0 1 0 0][0 0 1 0]
[0 0 0 1][0 0 1 0][0 0 0 1][0 1 0 0][0 0 1 0][0 1 0 0]
.
[0 1 0 0][0 1 0 0][0 1 0 0][0 1 0 0][0 1 0 0][0 1 0 0]
[1 0 0 0][1 0 0 0][0 0 1 0][0 0 1 0][0 0 0 1][0 0 0 1]
[0 0 1 0][0 0 0 1][1 0 0 0][0 0 0 1][1 0 0 0][0 0 1 0]
[0 0 0 1][0 0 1 0][0 0 0 1][1 0 0 0][0 0 1 0][1 0 0 0]
.
[0 0 1 0][0 0 1 0][0 0 1 0][0 0 1 0][0 0 1 0][0 0 1 0]
[1 0 0 0][1 0 0 0][0 1 0 0][0 1 0 0][0 0 0 1][0 0 0 1]
[0 1 0 0][0 0 0 1][1 0 0 0][0 0 0 1][1 0 0 0][0 1 0 0]
[0 0 0 1][0 1 0 0][0 0 0 1][1 0 0 0][0 1 0 0][1 0 0 0]
.
[0 0 0 1][0 0 0 1][0 0 0 1][0 0 0 1][0 0 0 1][0 0 0 1]
[1 0 0 0][1 0 0 0][0 1 0 0][0 1 0 0][0 0 1 0][0 0 1 0]
[0 1 0 0][0 0 1 0][1 0 0 0][0 0 1 0][1 0 0 0][0 1 0 0]
[0 0 1 0][0 1 0 0][0 0 1 0][1 0 0 0][0 1 0 0][1 0 0 0]
Cf.
A006052,
A007016,
A049311,
A054976,
A057151,
A104602,
A120732,
A319056,
A321717,
A321723,
A321732,
A321735,
A321736,
A321739.
-
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[Subsets[Tuples[Range[n],2],{n}],And[Union[First/@#]==Range[Max@@First/@#]==Union[Last/@#],Total/@prs2mat[#]==Total/@Transpose[prs2mat[#]]]&]],{n,5}]
A230879
Number of 2-packed n X n matrices.
Original entry on oeis.org
1, 2, 56, 16064, 39156608, 813732073472, 147662286695991296, 237776857718965784182784, 3425329990022686416530808209408, 443021337239562368918979788606843912192, 515203019085226443540506018909263027730003787776
Offset: 0
-
p[k_, n_] := Sum[(-1)^(i + j)*Binomial[n, i]*Binomial[n, j]*(k + 1)^(i*j), {i, 0, n}, {j, 0, n}];
a[n_] := p[2, n];
Table[a[n], {n, 0, 10}] (* Jean-François Alcover, Oct 08 2017, translated from PARI *)
-
\\ here p(k,n) is number of k-packed matrices of size n.
p(k,n)={sum(i=0, n, sum(j=0, n, (-1)^(i+j) * binomial(n,i) * binomial(n,j) * (k+1)^(i*j)))}
a(n) = p(2,n); \\ Andrew Howroyd, Sep 20 2017
A230880
Number of 2-packed matrices with exactly n nonzero entries.
Original entry on oeis.org
1, 2, 8, 80, 1120, 20544, 463744, 12422656, 384947200, 13541822464, 533049493504, 23210958688256, 1107652218822656, 57482801016422400, 3223015475535380480, 194157345516262588416, 12505948470244176953344, 857670052436844788318208, 62395270194815987194789888
Offset: 0
-
b[n_] := Sum[StirlingS1[n, k]*Sum[(m!)^2*StirlingS2[k, m]^2, {m, 0, k}], {k, 0, n}]/n!;
a[n_] := 2^n*b[n];
Table[a[n], {n, 0, 18}] (* Jean-François Alcover, Oct 08 2017, translated from PARI *)
-
\\ here b(n) is A104602.
b(n) = {sum(m=0, n, sum(k=0, n, stirling(n,k,1) * m!^2 * stirling(k,m,2)^2)) / n!}
a(n) = 2^n * b(n); \\ Andrew Howroyd, Sep 20 2017
A365961
Number of (0,1)-matrices with sum of entries equal to n and no zero rows or columns, with weakly decreasing row sums.
Original entry on oeis.org
1, 1, 4, 19, 127, 967, 9063, 94595, 1139708, 15118010, 223571836, 3597458356, 63233950081, 1197193320701, 24418765771835, 532015160784016, 12363381055074017, 304754656068754421, 7952728315095555279, 218848562411197549582, 6338152295627215890669, 192627799720153909693048
Offset: 0
The a(3) = 19 matrices:
[1 1 1]
.
[1 1] [1 1] [1 1 0] [1 0 1] [0 1 1]
[1 0] [0 1] [0 0 1] [0 1 0] [1 0 0]
.
[1] [1 0] [0 1] [1 0] [0 1] [1 0 0] [1 0 0] [0 1] [1 0]
[1] [1 0] [0 1] [0 1] [1 0] [0 1 0] [0 0 1] [1 0] [0 1]
[1] [0 1] [1 0] [1 0] [0 1] [0 0 1] [0 1 0] [1 0] [0 1]
.
[0 1 0] [0 1 0] [0 0 1] [0 0 1]
[1 0 0] [0 0 1] [1 0 0] [0 1 0]
[0 0 1] [1 0 0] [0 1 0] [1 0 0]
-
R(n,k)={Vec(-1 + 1/prod(j=1, k, 1 - binomial(k,j)*x^j + O(x*x^n)))}
seq(n) = {concat([1], sum(k=1, n, R(n, k)*sum(r=k, n, binomial(r, k)*(-1)^(r-k)) ))} \\ Andrew Howroyd, Sep 23 2023
A321584
Number of connected (0,1)-matrices with n ones and no zero rows or columns.
Original entry on oeis.org
1, 1, 2, 6, 27, 159, 1154, 9968, 99861, 1138234, 14544650, 205927012, 3199714508, 54131864317, 990455375968, 19488387266842, 410328328297512, 9205128127109576, 219191041679766542, 5521387415218119528, 146689867860276432637, 4099255234885039058842, 120199458455807733040338
Offset: 0
The a(4) = 27 matrices:
[1111]
.
[111][111][111][11][110][110][101][101][100][011][011][010][001]
[100][010][001][11][101][011][110][011][111][110][101][111][111]
.
[11][11][11][11][10][10][10][10][01][01][01][01]
[10][10][01][01][11][11][10][01][11][11][10][01]
[10][01][10][01][10][01][11][11][10][01][11][11]
.
[1]
[1]
[1]
[1]
Cf.
A007716,
A007718,
A049311,
A056156,
A101370,
A104602,
A120733,
A283877,
A319557,
A319647,
A319616-
A319629,
A321585.
-
csm[s_]:=With[{c=Select[Tuples[Range[Length[s]],2],And[OrderedQ[#],UnsameQ@@#,Length[Intersection@@s[[#]]]>0]&]},If[c=={},s,csm[Union[Append[Delete[s,List/@c[[1]]],Union@@s[[c[[1]]]]]]]]];
Table[Length[Select[Subsets[Tuples[Range[n],2],{n}],And[Union[First/@#]==Range[Max@@First/@#],Union[Last/@#]==Range[Max@@Last/@#],Length[csm[Map[Last,GatherBy[#,First],{2}]]]==1]&]],{n,6}] (* Mathematica 7.0+ *)
-
NonZeroCols(M)={my(C=Vec(M)); Mat(vector(#C, n, sum(k=1, n, (-1)^(n-k)*binomial(n,k)*C[k])))}
ConnectedMats(M)={my([m,n]=matsize(M), R=matrix(m,n)); for(m=1, m, for(n=1, n, R[m,n] = M[m,n] - sum(i=1, m-1, sum(j=1, n-1, binomial(m-1,i-1)*binomial(n,j)*R[i,j]*M[m-i,n-j])))); R}
seq(n)={my(M=matrix(n,n,i,j,sum(k=1, n, binomial(i*j,k)*x^k, O(x*x^n) ))); Vec(1 + vecsum(vecsum(Vec( ConnectedMats( NonZeroCols( NonZeroCols(M)~)) ))))} \\ Andrew Howroyd, Jan 17 2024
Comments