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-6 of 6 results.

A049311 Number of (0,1) matrices with n ones and no zero rows or columns, up to row and column permutations.

Original entry on oeis.org

1, 3, 6, 16, 34, 90, 211, 558, 1430, 3908, 10725, 30825, 90156, 273234, 848355, 2714399, 8909057, 30042866, 103859678, 368075596, 1335537312, 4958599228, 18820993913, 72980867400, 288885080660, 1166541823566, 4802259167367, 20141650236664
Offset: 1

Views

Author

Keywords

Comments

Also the number of bipartite graphs with n edges, no isolated vertices and a distinguished bipartite block, up to isomorphism.
The EULERi transform (A056156) is also interesting.
a(n) is also the number of non-isomorphic set multipartitions (multisets of sets) of weight n. - Gus Wiseman, Mar 17 2017

Examples

			E.g. a(2) = 3: two ones in same row, two ones in same column, or neither.
a(3) = 6 is coefficient of x^3 in (1/36)*((1 + x)^9 + 6*(1 + x)^3*(1 + x^2)^3 + 8*(1 + x^3)^3 + 9*(1 + x)*(1 + x^2)^4 + 12*(1 + x^3)*(1 + x^6))=1 + x + 3*x^2 + 6*x^3 + 7*x^4 + 7*x^5 + 6*x^6 + 3*x^7 + x^8 + x^9.
There are a(3) = 6 binary matrices with 3 ones, with no zero rows or columns, up to row and column permutation:
  [1 0 0] [1 1 0] [1 0] [1 1] [1 1 1] [1]
  [0 1 0] [0 0 1] [1 0] [1 0] ....... [1].
  [0 0 1] ....... [0 1] ............. [1]
Non-isomorphic representatives of the a(3)=6 set multipartitions are: ((123)), ((1)(23)), ((2)(12)), ((1)(1)(1)), ((1)(2)(2)), ((1)(2)(3)). - _Gus Wiseman_, Mar 17 2017
		

Crossrefs

Programs

  • PARI
    WeighT(v)={Vec(exp(x*Ser(dirmul(v, vector(#v,n,(-1)^(n-1)/n))))-1,-#v)}
    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, k)={WeighT(Vec(sum(j=1, #q, gcd(t, q[j])*x^lcm(t, q[j])) + O(x*x^k), -k))}
    a(n)={my(s=0); forpart(q=n, s+=permcount(q)*polcoef(exp(x*Ser(sum(t=1, n, K(q, t, n)/t))), n)); s/n!} \\ Andrew Howroyd, Jan 16 2023

Formula

Calculate number of connected bipartite graphs + number of connected bipartite graphs with no duality automorphism, then apply EULER transform.
a(n) is the coefficient of x^n in the cycle index Z(S_n X S_n; 1+x, 1+x^2, ...), where S_n X S_n is Cartesian product of symmetric groups S_n of degree n.

Extensions

More terms and formula from Vladeta Jovovic, Jul 29 2000
a(19)-a(28) from Max Alekseyev, Jul 22 2009
a(29)-a(102) from Aliaksandr Siarhei, Dec 13 2013
Name edited by Gus Wiseman, Dec 18 2018

A048291 Number of {0,1} n X n matrices with no zero rows or columns.

Original entry on oeis.org

1, 1, 7, 265, 41503, 24997921, 57366997447, 505874809287625, 17343602252913832063, 2334958727565749108488321, 1243237913592275536716800402887, 2630119877024657776969635243647463625, 22170632855360952977731028744522744983195423
Offset: 0

Views

Author

Joe Keane (jgk(AT)jgk.org)

Keywords

Comments

Number of relations on n labeled points such that for every point x there exists y and z such that xRy and zRx.
Also the number of edge covers in the complete bipartite graph K_{n,n}. - Eric W. Weisstein, Apr 24 2017
Counts labeled digraphs (loops allowed, no multiarcs) on n nodes where each indegree and each outdegree is >= 1. The corresponding sequence for unlabeled digraphs (1, 5, 55, 1918,... for n >= 1) seems not to be in the OEIS. - R. J. Mathar, Nov 21 2023
These relations form a subsemigroup of the semigroup of all binary relations on [n]. The zero element is the universal relation (all 1's matrix). See Schwarz link. - Geoffrey Critzer, Jan 15 2024

Examples

			a(2) = 7:  |01|  |01|  |10|  |10|  |11|  |11|  |11|
           |10|  |11|  |01|  |11|  |01|  |10|  |11|.
		

References

  • Brendan McKay, Posting to sci.math.research, Jun 14 1999.

Crossrefs

Cf. A055601, A055599, A104601, A086193 (traceless, no loops), A086206, A322661 (adj. matr. undirected edges).
Diagonal of A183109.

Programs

  • Maple
    seq(add((-1)^(n+k)*binomial(n, k)*(2^k-1)^n, k=0..n), n=0..15); # Robert FERREOL, Mar 10 2017
  • Mathematica
    Flatten[{1,Table[Sum[Binomial[n,k]*(-1)^k*(2^(n-k)-1)^n,{k,0,n}],{n,1,15}]}] (* Vaclav Kotesovec, Jul 02 2014 *)
  • PARI
    a(n)=sum(k=0,n,binomial(n,k)*(-1)^k*(2^(n-k)-1)^n)
    
  • Python
    import math
    f = math.factorial
    def A048291(n): return sum([(f(n)/f(s)/f(n - s))*(-1)**s*(2**(n - s) - 1)**n for s in range(0, n+1)]) # Indranil Ghosh, Mar 14 2017

Formula

a(n) = Sum_{s=0..n} binomial(n, s)*(-1)^s*2^((n-s)*n)*(1-2^(-n+s))^n.
From Vladeta Jovovic, Feb 23 2008: (Start)
E.g.f.: Sum_{n>=0} (2^n-1)^n*exp((1-2^n)*x)*x^n/n!.
a(n) = Sum_{i=0..n} Sum_{j=0..n} (-1)^(i+j)*binomial(n,i)*binomial(n,j)*2^(i*j). (End)
a(n) ~ 2^(n^2). - Vaclav Kotesovec, Jul 02 2014
a(n) = Sum_{s=0..n-1} binomial(n,s)*(-1)^s*A092477(n,n-s), n > 0. - R. J. Mathar, Nov 18 2023

A104601 Triangle T(r,n) read by rows: number of n X n (0,1)-matrices with exactly r entries equal to 1 and no zero row or columns.

Original entry on oeis.org

1, 0, 2, 0, 4, 6, 0, 1, 45, 24, 0, 0, 90, 432, 120, 0, 0, 78, 2248, 4200, 720, 0, 0, 36, 5776, 43000, 43200, 5040, 0, 0, 9, 9066, 222925, 755100, 476280, 40320, 0, 0, 1, 9696, 727375, 6700500, 13003620, 5644800, 362880, 0, 0, 0, 7480, 1674840
Offset: 1

Views

Author

Ralf Stephan, Mar 27 2005

Keywords

Examples

			1
0,2
0,4,6
0,1,45,24
0,0,90,432,120
0,0,78,2248,4200,720
0,0,36,5776,43000,43200,5040
0,0,9,9066,222925,755100,476280,40320
0,0,1,9696,727375,6700500,13003620,5644800,362880
0,0,0,7480,1674840,37638036,179494350,226262400,71850240,3628800
		

Crossrefs

Right-edge diagonals include A000142, A055602, A055603. Row sums are in A104602.
Column sums are in A048291. The triangle read by columns = A055599.

Programs

  • Mathematica
    t[r_, n_] := Sum[ Sum[ (-1)^(2n - d - k/d)*Binomial[n, d]*Binomial[n, k/d]*Binomial[k, r], {d, Divisors[k]}], {k, r, n^2}]; Flatten[ Table[t[r, n], {r, 1, 10}, {n, 1, r}]] (* Jean-François Alcover, Jun 27 2012, from formula *)
    Table[Length[Select[Subsets[Tuples[Range[n],2],{n}],Union[First/@#]==Union[Last/@#]==Range[k]&]],{n,6},{k,n}] (* Gus Wiseman, Nov 14 2018 *)

Formula

T(r, n) = Sum{l>=r, Sum{d|l, (-1)^(2n-d-l/d)*C(n, d)*C(n, l/d)*C(l, r) }}.
E.g.f.: Sum(((1+x)^n-1)^n*exp((1-(1+x)^n)*y)*y^n/n!,n=0..infinity). - Vladeta Jovovic, Feb 24 2008

A230878 Irregular triangle read by rows: T(n,k) = number of 2-packed n X n matrices with exactly k nonzero entries (0 <= k <= n^2).

Original entry on oeis.org

1, 0, 2, 0, 0, 8, 32, 16, 0, 0, 0, 48, 720, 2880, 4992, 4608, 2304, 512, 0, 0, 0, 0, 384, 13824, 143872, 739328, 2320896, 4964352, 7659520, 8749056, 7421952, 4587520, 1966080, 524288, 65536, 0, 0, 0, 0, 0, 3840, 268800, 5504000, 57068800, 372416000
Offset: 0

Views

Author

N. J. A. Sloane, Nov 09 2013

Keywords

Comments

A k-packed matrix of size n X n is a matrix with entries in the alphabet A_k = {0,1, ..., k} such that each row and each column contains at least one nonzero entry.

Examples

			Triangle begins:
1
0 2
0 0 8 32 16
0 0 0 48 720 2880 4992 4608 2304 512
...
		

Crossrefs

Row sums are A230879.
Column sums are A230880.

Programs

  • Mathematica
    p[k_, n_, l_] := Sum[(-1)^(i+j)*Binomial[n, i]*Binomial[n,j]*Binomial[i*j, l]*k^l, {i, 0, n}, {j, 0, n}];
    T[n_, k_] := p[2, n, k];
    Table[T[n, k], {n, 0, 5}, {k, 0, n^2}] // Flatten (* Jean-François Alcover, Oct 08 2017, translated from PARI *)
  • PARI
    \\ T(n,k) = p(2,n,k) (see Cheballah et al. ref).
    p(k,n,l) = {sum(i=0, n, sum(j=0, n, (-1)^(i+j) * binomial(n,i) * binomial(n,j) * binomial(i*j,l) * k^l))}
    for (n=0,5, for(k=0,n^2, print1(p(2,n,k), ", ")); print); \\ Andrew Howroyd, Sep 20 2017

Formula

From Andrew Howroyd, Sep 20 2017: (Start)
T(n, k) = Sum_{i=0..n} Sum_{j=0..n} (-1)^(i+j) * binomial(n,i) * binomial(n,j) * binomial(i*j,k) * 2^k.
T(n, k) = 0 for n > k.
T(n, n) = A000165(n).
(End)

Extensions

Terms a(18) and beyond from Andrew Howroyd, Sep 20 2017

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

Views

Author

N. J. A. Sloane, Nov 09 2013

Keywords

Comments

A k-packed matrix of size n X n is a matrix with entries in the alphabet A_k = {0,1, ..., k} such that each row and each column contains at least one nonzero entry.

Crossrefs

Row sums of A230878.

Programs

  • Mathematica
    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 *)
  • 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

Formula

Cheballah et al. give an explicit formula.
a(n) = Sum_{i=0..n} Sum_{j=0..n} (-1)^(i+j) * binomial(n,i) * binomial(n,j) * 3^(i*j). - Andrew Howroyd, Sep 20 2017

Extensions

Terms a(7) and beyond from 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

Views

Author

N. J. A. Sloane, Nov 09 2013

Keywords

Comments

A k-packed matrix of size n X n is a matrix with entries in the alphabet A_k = {0,1, ..., k} such that each row and each column contains at least one nonzero entry.

Crossrefs

Programs

  • Mathematica
    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 *)
  • 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

Formula

Cheballah et al. give an explicit formula.
From Andrew Howroyd, Sep 20 2017: (Start)
a(n) = Sum_{r=1..n} Sum_{i=0..r} Sum_{j=0..r} (-1)^(i+j) * binomial(r,i) * binomial(r,j) * binomial(i*j,n) * 2^n.
a(n) = 2^n * A104602(n).
(End)

Extensions

Terms a(9) and beyond from Andrew Howroyd, Sep 20 2017
Showing 1-6 of 6 results.