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.

Showing 1-5 of 5 results.

A120733 Number of matrices with nonnegative integer entries and without zero rows or columns such that sum of all entries is equal to n.

Original entry on oeis.org

1, 1, 5, 33, 281, 2961, 37277, 546193, 9132865, 171634161, 3581539973, 82171451025, 2055919433081, 55710251353953, 1625385528173693, 50800411296363617, 1693351638586070209, 59966271207156833313, 2248276994650395873861, 88969158875611127548481
Offset: 0

Views

Author

Vladeta Jovovic, Aug 18 2006, Aug 21 2006

Keywords

Comments

The number of such matrices up to rows/columns permutations are given in A007716.
Dimensions of the graded components of the Hopf algebra MQSym (Matrix quasi-symmetric functions). - Jean-Yves Thibon (jyt(AT)univ-mlv.fr), Oct 23 2006
From Kyle Petersen, Aug 10 2016: (Start)
Number of cells in the two-sided Coxeter complex of the symmetric group. Inclusion of faces corresponds to refinement of matrices, see Section 6 of Petersen paper. The number of cells in the type B analog is given by A275787.
Also known as "two-way contingency tables" in the Diaconis-Gangolli reference. (End)

Examples

			a(2) = 5:
[1 0]   [0 1]   [1]   [1 1]   [2]
[0 1]   [1 0]   [1]
From _Gus Wiseman_, Nov 14 2018: (Start)
The a(3) = 33 matrices:
  [3][21][12][111]
.
  [2][20][11][11][110][101][1][10][10][100][02][011][01][01][010][001]
  [1][01][10][01][001][010][2][11][02][011][10][100][20][11][101][110]
.
  [1][10][10][10][100][100][01][01][010][01][010][001][001]
  [1][10][01][01][010][001][10][10][100][01][001][100][010]
  [1][01][10][01][001][010][10][01][001][10][100][010][100]
(End)
		

Crossrefs

Row sums of A261781.

Programs

  • Maple
    t1 := M -> add( add( add( (-1)^(n-j)*binomial(n, j)*((1-x)^(-j)-1)^m, j=0..n), n=0..M), m=0..M); s := series(t1(20),x,20); gfun[seriestolist](%); # N. J. A. Sloane, Jan 14 2009
  • Mathematica
    a[n_] := Sum[2^(-2-r-s)*Binomial[n+r*s-1, n], {r, 0, Infinity}, {s, 0, Infinity}]; Table[Print[an = a[n]]; an, {n, 0, 19}] (* Jean-François Alcover, May 15 2012, after Vladeta Jovovic *)
    Flatten[{1,Table[1/n!*Sum[(-1)^(n-k)*StirlingS1[n,k]*Sum[m!*StirlingS2[k, m],{m,k}]^2,{k,n}],{n,20}]}] (* Vaclav Kotesovec, May 07 2014 *)
    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/@#]]&]],{n,5}] (* Gus Wiseman, Nov 14 2018 *)

Formula

a(n) = (1/n!)*Sum_{k=0..n} (-1)^(n-k)*Stirling1(n,k)*A000670(k)^2.
G.f.: Sum_{m>=0,n>=0} Sum_{j=0..n} (-1)^(n-j)*C(n,j)*((1-x)^(-j)-1)^m.
a(n) = Sum_{r>=0,s>=0} binomial(r*s+n-1,n)/2^(r+s+2).
G.f.: Sum_{n>=0} 1/(2-(1-x)^(-n))/2^(n+1). - Vladeta Jovovic, Oct 30 2006
a(n) ~ 2^(log(2)/2-2) * n! / (log(2))^(2*n+2). - Vaclav Kotesovec, May 07 2014

Extensions

More terms from N. J. A. Sloane, Jan 14 2009

A321446 Number of (0,1)-matrices with n ones, no zero rows or columns, and distinct rows and columns.

Original entry on oeis.org

1, 1, 2, 10, 72, 624, 6522, 80178, 1129368, 17917032, 316108752, 6138887616, 130120838400, 2989026225696, 73964789192400, 1961487062520720, 55495429438186920, 1668498596700706440, 53122020640948010640, 1785467619718933936560, 63175132023953553400440
Offset: 0

Views

Author

Gus Wiseman, Nov 13 2018

Keywords

Examples

			The a(3) = 10 matrices:
  [1 1] [1 1] [1 0] [0 1]
  [1 0] [0 1] [1 1] [1 1]
.
  [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]
		

Crossrefs

Programs

  • Mathematica
    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/@#]==Range[Max@@Last/@#],UnsameQ@@prs2mat[#],UnsameQ@@Transpose[prs2mat[#]]]&]],{n,6}]
  • PARI
    \\ Q(m, n, wf) defined in A321588.
    seq(n)={my(R=vectorv(n,m,Q(m,n,w->1 + y^w + O(y*y^n)))); for(i=2, #R, R[i] -= i*R[i-1]); Vec(1 + vecsum(vecsum(R)))} \\ Andrew Howroyd, Jan 24 2024

Extensions

a(7) onwards from Andrew Howroyd, Jan 20 2024

A321587 Number of (0,1)-matrices with n ones, no zero rows or columns, and distinct rows.

Original entry on oeis.org

1, 1, 3, 17, 129, 1227, 14123, 190265, 2934359, 50975647, 984801759, 20941104299, 486007744671, 12223797601887, 331190083773701, 9616356919931711, 297887922137531747, 9805965265937326129, 341827167387114704421, 12579123760272833723975, 487315396984696657840761
Offset: 0

Views

Author

Gus Wiseman, Nov 13 2018

Keywords

Comments

Also number of colored compositions of n using all colors of an initial interval of the color palette such that all parts have different color patterns and the patterns for parts i have i distinct colors in increasing order. a(3) = 17: 2ab1a, 2ab1b, 1a2ab, 1b2ab, 3abc, 2ab1c, 2ac1b, 2bc1a, 1a2bc, 1b2ac, 1c2ab, 1a1b1c, 1a1c1b, 1b1a1c, 1b1c1a, 1c1a1b, 1c1b1a. - Alois P. Heinz, Sep 17 2019

Examples

			The a(3) = 17 matrices:
  [1 1 1]
.
  [1 1] [1 1] [1 1 0] [1 0 1] [1 0] [1 0 0] [0 1 1] [0 1] [0 1 0] [0 0 1]
  [1 0] [0 1] [0 0 1] [0 1 0] [1 1] [0 1 1] [1 0 0] [1 1] [1 0 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]
		

Crossrefs

Programs

  • Maple
    C:= binomial:
    b:= proc(n, i, k, p) option remember; `if`(n=0, p!, `if`(i<1, 0, add(
          b(n-i*j, min(n-i*j, i-1), k, p+j)*C(C(k, i), j), j=0..n/i)))
        end:
    a:= n-> add(add(b(n$2, i, 0)*(-1)^(k-i)*C(k, i), i=0..k), k=0..n):
    seq(a(n), n=0..21);  # Alois P. Heinz, Sep 16 2019
  • Mathematica
    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/@#]==Range[Max@@Last/@#],UnsameQ@@prs2mat[#]]&]],{n,5}]

Formula

a(n) ~ c * d^n * n!, where d = 1.938593839617140963759657977... and c = 0.350862127201784401195038... - Vaclav Kotesovec, Feb 05 2022

Extensions

a(7)-a(20) from Alois P. Heinz, Sep 16 2019

A321588 Number of connected nonnegative integer matrices with sum of entries equal to n, no zero rows or columns, and distinct rows and columns.

Original entry on oeis.org

1, 1, 1, 9, 29, 181, 1285, 10635, 102355, 1118021, 13637175, 184238115, 2727293893, 43920009785, 764389610843, 14297306352937, 286014489487815, 6093615729757841, 137750602009548533, 3293082026520294529, 83006675263513350581, 2200216851785981586729, 61180266502369886181253
Offset: 0

Views

Author

Gus Wiseman, Nov 13 2018

Keywords

Comments

A matrix is connected if the positions in each row (or each column) of the nonzero entries form a connected hypergraph.

Examples

			The a(4) = 29 matrices:
4 31 13
.
3 21 21 20 12 12 11 110 11 110 101 101 1 10 10 02 011 011 01 01
1 10 01 11 10 01 20 101 02 011 110 011 3 21 12 11 110 101 21 12
.
11 11 10 10 01 01
10 01 11 01 11 10
01 10 01 11 10 11
		

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]}]];
    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[multsubs[Tuples[Range[n],2],n],And[Union[First/@#]==Range[Max@@First/@#],Union[Last/@#]==Range[Max@@Last/@#],UnsameQ@@prs2mat[#],UnsameQ@@Transpose[prs2mat[#]],Length[csm[Map[Last,GatherBy[#,First],{2}]]]==1]&]],{n,6}]
  • PARI
    permcount(v) = {my(m=1, s=0, k=0, t); for(i=1, #v, t=v[i]; k=if(i>1&&t==v[i-1], k+1, 1); m*=t*k; s+=t); s!/m}
    K(q,t,wf)={prod(j=1, #q, wf(t*q[j]))-1}
    Q(m,n,wf=w->2)={my(s=0); forpart(p=m, s+=(-1)^#p*permcount(p)*exp(-sum(t=1, n, (-1)^t*x^t*K(p,t,wf)/t, O(x*x^n))) ); Vec((-1)^m*serchop(serlaplace(s),1), -n)}
    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(R=vectorv(n,m,Q(m,n,w->1/(1 - y^w) + O(y*y^n)))); for(i=2, #R, R[i] -= i*R[i-1]); Vec(1 + vecsum( vecsum( Vec( ConnectedMats( Mat(R))))))} \\ Andrew Howroyd, Jan 24 2024

Extensions

a(7) onwards from Andrew Howroyd, Jan 24 2024

A369285 Number of connected binary matrices with n ones, no zero rows or columns, and distinct rows and columns.

Original entry on oeis.org

1, 1, 0, 4, 12, 72, 522, 4386, 42360, 465792, 5697552, 77229216, 1145762400, 18485254536, 322206163200, 6033964218720, 120830927523240, 2576515514434920, 58285369894027440, 1394212928447354640, 35160926971256369400, 932396530226753051160, 25936228654879236020640
Offset: 0

Views

Author

Andrew Howroyd, Jan 24 2024

Keywords

Examples

			The a(3) = 4 matrices:
  [1 1] [1 1] [1 0] [0 1]
  [1 0] [0 1] [1 1] [1 1]
		

Crossrefs

Programs

  • PARI
    \\ Q, ConnectedMats defined in A321588.
    seq(n)={my(R=vectorv(n,m,Q(m,n,w->1 + y^w + O(y*y^n)))); for(i=2, #R, R[i] -= i*R[i-1]); Vec(1 + vecsum(vecsum(Vec(ConnectedMats(Mat(R))))))}
Showing 1-5 of 5 results.