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

A028657 Triangle read by rows: T(n,k) = number of n-node graphs with k nodes in distinguished bipartite block, k = 0..n.

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 3, 3, 1, 1, 4, 7, 4, 1, 1, 5, 13, 13, 5, 1, 1, 6, 22, 36, 22, 6, 1, 1, 7, 34, 87, 87, 34, 7, 1, 1, 8, 50, 190, 317, 190, 50, 8, 1, 1, 9, 70, 386, 1053, 1053, 386, 70, 9, 1, 1, 10, 95, 734, 3250, 5624, 3250, 734, 95, 10, 1, 1, 11, 125, 1324, 9343, 28576, 28576, 9343, 1324, 125, 11, 1
Offset: 0

Views

Author

Vladeta Jovovic, Jun 16 2000

Keywords

Comments

Also, row n gives the number of unlabeled bicolored graphs having k nodes of one color and n-k nodes of the other color; the color classes are not interchangeable.
Also the number of principal transversal matroids (also known as fundamental transversal matroids) of size n and rank k (originally enumerated by Brylawski). - Gordon F. Royle, Oct 30 2007
This sequence is also obtained if we read the array A(m,n) = number of inequivalent m X n binary matrices by antidiagonals, where equivalence means permutations of rows or columns (m>=0, n>=0) [Kerber]. - N. J. A. Sloane, Sep 01 2013

Examples

			The triangle T(n,k) begins:
  1;
  1,  1;
  1,  2,  1;
  1,  3,  3,  1;
  1,  4,  7,  4,  1;
  1,  5, 13, 13,  5,  1;
  1,  6, 22, 36, 22,  6,  1;
  ...
For example, there are 36 graphs on 6 nodes with a distinguished bipartite block with 3 nodes.
The array A(m,n) (m>=0, n>=0) (see Comments) begins:
  1 1  1    1     1      1        1         1           1 ...
  1 2  3    4     5      6        7         8           9 ...
  1 3  7   13    22     34       50        70          95 ...
  1 4 13   36    87    190      386       734        1324 ...
  1 5 22   87   317   1053     3250      9343       25207 ...
  1 6 34  190  1053   5624    28576    136758      613894 ...
  1 7 50  386  3250  28576   251610   2141733    17256831 ...
  1 8 70  734  9343 136758  2141733  33642660   508147108 ...
  1 9 95 1324 25207 613894 17256831 508147108 14685630688 ...
... - _N. J. A. Sloane_, Sep 01 2013
		

References

  • R. W. Robinson, Numerical implementation of graph counting algorithms, AGRC Grant, Math. Dept., Univ. Newcastle, Australia, 1976.

Crossrefs

Row sums give A049312.
A246106 is a very similar array.
Diagonals of the array A(m,n) give A002724, A002725, A002728.
Rows (or columns) give A002623, A002727, A006148, A052264.
A(n,k) = A353585(2, n, k).

Programs

  • Maple
    b:= proc(n, i) option remember; `if`(n=0, {0}, `if`(i<1, {},
          {seq(map(p-> p+j*x^i, b(n-i*j, i-1) )[], j=0..n/i)}))
        end:
    g:= proc(n, k) option remember; add(add(2^add(add(igcd(i, j)*
          coeff(s, x, i)* coeff(t, x, j), j=1..degree(t)),
          i=1..degree(s))/mul(i^coeff(s, x, i)*coeff(s, x, i)!,
          i=1..degree(s))/mul(i^coeff(t, x, i)*coeff(t, x, i)!,
          i=1..degree(t)), t=b(n+k$2)), s=b(n$2))
        end:
    A:= (n, k)-> g(min(n, k), abs(n-k)):
    seq(seq(A(n, d-n), n=0..d), d=0..14); # Alois P. Heinz, Aug 01 2014
  • Mathematica
    b[n_, i_] := b[n, i] = If[n == 0, {0}, If[i<1, {}, Union[ Flatten[ Table[ Function[ {p}, p + j*x^i] /@ b[n - i*j, i-1], {j, 0, n/i}]]]]];
    g[n_, k_] := g[n, k] = Sum[ Sum[ 2^Sum[ Sum[GCD[i, j] * Coefficient[s, x, i] * Coefficient[t, x, j], {j, 1, Exponent[t, x]}], {i, 1, Exponent[s, x]}] / Product[i^Coefficient[s, x, i] * Coefficient[s, x, i]!, {i, 1, Exponent[s, x]}] / Product[i^Coefficient[t, x, i] * Coefficient[t, x, i]!, {i, 1, Exponent[t, x]}], {t, b[n+k, n+k]}], {s, b[n, n]}];
    A[n_, k_] := g[Min[n, k], Abs[n-k]];
    Table[Table[A[n, d-n], {n, 0, d}], {d, 0, 14}] // Flatten (* Jean-François Alcover, Jan 28 2015, after Alois P. Heinz *)
  • 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)={sum(j=1, #q, gcd(t, q[j]))}
    A(n, m)={my(s=0); forpart(q=m, s+=permcount(q)*polcoef(exp(sum(t=1, n, 2^K(q, t)/t*x^t) + O(x*x^n)), n)); s/m!}
    { for(r=0, 10, for(k=0, r, print1(A(r-k,k), ", ")); print) } \\ Andrew Howroyd, Mar 25 2020
    
  • PARI
    \\ G(k,x) gives k-th column as rational function (see Jovovic link).
    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}
    Fix(q,x)={my(v=divisors(lcm(Vec(q))), u=apply(t->2^sum(j=1, #q, gcd(t, q[j])), v)); 1/prod(i=1, #v, my(t=v[i]); (1-x^t)^(sum(j=1, i, my(d=t/v[j]); if(!frac(d), moebius(d)*u[j]))/t))}
    G(m,x)={my(s=0); forpart(q=m, s+=permcount(q)*Fix(q,x)); s/m!}
    T(n,k)={my(m=max(k, n-k)); polcoef(G(n-m, x + O(x*x^m)), m)} \\ Andrew Howroyd, Mar 26 2020
    
  • PARI
    A028657(n,k)=A353585(2, n, k) \\ M. F. Hasler, May 01 2022

Formula

A(m,n) = Sum_{p in P(m), q in P(n)} 2^Sum_{i in p, j in q} gcd(i,j) / (N(p) N(q)) where P(m) are the partition of m (see e.g., A036036), N(p) = Product_{distinct parts x in p} x^m(x)*m(x)!, m(x) = multiplicity of x in p. [corrected by Anders Kaseorg, Oct 04 2024]

A005785 Number of 5-covers of an unlabeled n-set.

Original entry on oeis.org

1, 5, 28, 156, 863, 4571, 22952, 108182, 477136, 1969270, 7625579, 27804973, 95858868, 313747418, 978734539, 2920530663, 8363945469, 23057872913, 61357278239, 157985305473, 394486861086, 957156158394, 2260761331227
Offset: 0

Views

Author

Keywords

Comments

Number of 5 X n binary matrices with at least one 1 in every column up to row and column permutations. - Andrew Howroyd, Feb 28 2023

References

  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Column 5 of A055080.
First differences of A052264.

Programs

Formula

G.f.: - (x^68 - 2*x^67 + 10*x^66 + 32*x^65 + 175*x^64 + 794*x^63 + 3441*x^62 + 13186*x^61 + 46027*x^60 + 146118*x^59 + 427347*x^58 + 1155432*x^57 + 2912873*x^56 + 6875608*x^55 + 15281029*x^54 + 32094658*x^53 + 63945531*x^52 + 121210914*x^51 + 219194198*x^50 + 378998758*x^49 + 627863648*x^48 + 998282344*x^47 + 1525746624*x^46 + 2244502676*x^45 + 3181886869*x^44 + 4351201210*x^43 + 5744918381*x^42 + 7328807372*x^41 + 9039504349*x^40 + 10785767638*x^39 + 12455264802*x^38 + 13925287384*x^37 + 15077477135*x^36 + 15812782150*x^35 + 16065602576*x^34 + 15812782150*x^33 + 15077477135*x^32 + 13925287384*x^31 + 12455264802*x^30 + 10785767638*x^29 + 9039504349*x^28 + 7328807372*x^27 + 5744918381*x^26 + 4351201210*x^25 + 3181886869*x^24 + 2244502676*x^23 + 1525746624*x^22 + 998282344*x^21 + 627863648*x^20 + 378998758*x^19 + 219194198*x^18 + 121210914*x^17 + 63945531*x^16 + 32094658*x^15 + 15281029*x^14 + 6875608*x^13 + 2912873*x^12 + 1155432*x^11 + 427347*x^10 + 146118*x^9 + 46027*x^8 + 13186*x^7 + 3441*x^6 + 794*x^5 + 175*x^4 + 32*x^3 + 10*x^2 - 2*x + 1)/((x^6 - 1)^2*(x^4 + x^3 + x^2 + x + 1)^6*(x^3 - x^2 + x - 1)^6*(x^2 + x + 1)^6*(x + 1)^10*(x - 1)^23).
a(n) = n^30/(30!*5!) + O(n^29). - Vaclav Kotesovec, Aug 09 2022

Extensions

More terms from Vladeta Jovovic, Jun 03 2000
a(0) = 1 prepended by Stefano Spezia, Aug 09 2022

A121231 Number of n X n binary matrices M (that is, real matrices with entries 0 and 1) such that M^2 is also a binary matrix.

Original entry on oeis.org

1, 2, 11, 172, 6327, 474286, 67147431, 17080038508
Offset: 0

Views

Author

Dan Dima, Aug 21 2006

Keywords

Comments

Comments from Brendan McKay, Aug 21 2006: Equivalently, directed graphs (simple but loops allowed) without a few small forbidden subgraphs (those allowing 2 distinct paths of length 2 from vertex x to vertex y for some x,y; I think there are 6 possibilities). One can also consider isomorphism classes of those digraphs.
Comment from Rob Pratt, Aug 03 2008: A121294 provides a lower bound on the maximum number of 1's in such a matrix M. There are cases where a higher number is reached; the following 5 X 5 matrix has 11 ones and its square is binary:
0 0 1 0 0
0 0 0 0 1
1 1 0 0 1
1 1 0 1 0
1 1 0 1 0.
The optimal values seem to match A070214, verified for n <= 7.
Term (5,1) of the n-th power of the 5 X 5 matrix shown is A001045(n), the Jacobsthal sequence. - Gary W. Adamson, Oct 03 2008
a(n) >= A226321(n).

Crossrefs

Extensions

Edited by R. J. Mathar, Oct 01 2008
a(7) from R. H. Hardin, Jun 19 2012. This makes it clear that the old A122527 was really a badly-described version of this sequence, and that a(7) was earlier found by Balakrishnan (bvarada2(AT)jhu.edu), Sep 17 2006. - N. J. A. Sloane, Jun 19 2012
Entry revised by N. J. A. Sloane, Jun 19 2012

A005771 Number of n-covers of an unlabeled 5-set.

Original entry on oeis.org

1, 12, 103, 736, 4571, 25326, 127415, 588687, 2518997, 10053739, 37656707, 133084998, 445949359, 1422934989, 4340110439, 12697803333, 35744330644, 97081519369, 255032046536, 649459943602, 1606518048420, 3867119228081, 9073566868140, 20783186834063
Offset: 1

Views

Author

Keywords

Comments

Number of n X 5 binary matrices with at least one 1 in every column up to row and column permutations. - Andrew Howroyd, Feb 28 2023

References

  • R. J. Clarke, Covering a set by subsets, Discrete Math., 81 (1990), 147-152.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

A diagonal of A055080.
First differences give A055083.

Programs

Formula

a(n) = A052264(n) - A006148(n). - Andrew Howroyd, Feb 28 2023

Extensions

More terms from Vladeta Jovovic, Jun 13 2000
Terms a(21) and beyond from Andrew Howroyd, Feb 28 2023

A353585 Square array T(n,k): row n lists the number of inequivalent matrices over Z/nZ, modulo permutations of rows and columns, of size r X c, 1 <= r <= c, c >= 1.

Original entry on oeis.org

1, 1, 2, 1, 3, 3, 1, 7, 6, 4, 1, 4, 27, 10, 5, 1, 13, 10, 76, 15, 6, 1, 36, 92, 20, 175, 21, 7, 1, 5, 738, 430, 35, 351, 28, 8, 1, 22, 15, 8240, 1505, 56, 637, 36, 9, 1, 87, 267, 35, 57675, 4291, 84, 1072, 45, 10, 1, 317, 5053, 1996, 70, 289716, 10528, 120, 1701, 55, 11
Offset: 1

Views

Author

M. F. Hasler, Apr 28 2022

Keywords

Comments

The array is read by falling antidiagonals.
Each row lists the number of inequivalent matrices of size 1 X 1, then 2 X 1, 2 X 2, then 3 X 1, 3 X 2, 3 X 3, etc., with coefficients in Z/nZ (or equivalently, in {1, ..., n}). See Examples for more.
Row 1 counts the zero matrices, there is only one of any size. Row 2 counts binary matrices, this is the lower triangular part of A028657, without the trivial row & column 0. (This table might have been extended with a trivial column 0 = A000012 (counting the 1 matrix of size 0) and row 0 = A000007 counting the number of r X c matrices with no entry, as done in A246106.)
The square matrices (size 1 X 1, 2 X 2, 3 X 3, ...) are counted in columns with triangular numbers, k = T(r) = r(r+1)/2 = (1, 3, 6, 10, 15, ...) = A000217.

Examples

			The table starts
   n \ k=1,  2,   3,   4,   5,   6, ...: T(n,k)
  ----+--------------------------------------
   1  |  1   1    1    1    1     1 ...
   2  |  2   3    7    4   13    36 ...
   3  |  3   6   27   10   92   738 ...
   4  |  4  10   76   20  430  8240 ...
   5  |  5  15  175   35 1505 57675 ...
  ...
Columns 2, 3 and 4, 5, 6 correspond to matrices of size 1 X 2, 2 X 2 and 1 X 3, 2 X 3, 3 X 3, respectively.
Column 4 says that there are (1, 4, 10, 20, 35, ...) inequivalent matrices of size 1 X 3 with entries in Z/nZ (n = 1, 2, 3, 4, ...); these numbers are given by (n+2 choose 3) = binomial(n+2, 3) = n(n+1)(n+2)/6 = A000292(n).
		

Crossrefs

All of the following related sequences can be expressed in terms of T(n, k, r) := T(n, k(k-1)/2 + r), WLOG r <= k:
A028657(n,k) = A353585(2,n,k): inequivalent m X n binary matrices,
A002723(n) = T(2,n,2): size n X 2, A002724(n) = T(2,n,n): size n X n,
A002727(n) = T(2,n,3): size n X 3, A002725(n) = T(2,n,n+1): size n X (n+1),
A006148(n) = T(2,n,4): size n X 4, A002728(n) = T(2,n,n+2): size n X (n+2),
A052264(n) = T(2,n,5): size n X 5,
A052269(n) = T(3,n,n): number of inequivalent ternary matrices of size n X n,
A052271(n) = T(4,n,n): number of inequivalent matrices over Z/4Z of size n X n,
A052272(n) = T(5,n,n): number of inequivalent matrices over Z/5Z of size n X n,
A246106(n,k) = A353585(k,n,n): number of inequivalent n X n matrices over Z/kZ, and its diagonal A091058 and columns 1, 2, ..., 10: A000012, A091059, A091060, A091061, A091062, A246122, A246123, A246124, A246125, A246126.

Programs

  • PARI
    A353585(n,k,r)={if(!r,r=sqrtint(8*k)\/2; k-=r*(r-1)\2); my(m(c, p=1, L=0)=for(i=1,#c, if(i==#c || c[i+1]!=c[i], p *= c[i]^(i-L)*(i-L)!; L=i )); p, S=0); forpart(P=k, my(T=0); forpart(Q=r, T += n^sum(i=1,#P, sum(j=1,#Q, gcd(P[i],Q[j]) ))/m(Q)); S += T/m(P)); S}

Formula

Let k = c(c-1)/2 + r, 1 <= r <= c, then
T(n, c, r) := T(n, k) = Sum_{p in P(c), q in P(r)} n^S(p, q)/(N(p)*N(q)), where P(r) are the partitions of r, S(p, q) = Sum_{i in p, j in q} gcd(i, j), N(p) = Product_{distinct parts x in p} x^m(x)*m(x)!, m(x) = multiplicity of x in p.
(See, e.g., A080577 for a list of partitions of positive integers.)
In particular:
T(n, 1) = n, T(n, 2) = n(n+1)/2 = A000217(n), T(n, 4) = C(n+2, 3) = A000292(n), T(n, 7) = C(n+3, 4) = A000332(n+3), etc.: T(n, k(k+1)/2 + 1) = C(n+k, k+1),
T(n, k(k+1)/2) = A246106(k, n).

A056204 Number of n X 5 binary matrices under row and column permutations and column complementations.

Original entry on oeis.org

1, 1, 6, 16, 81, 299, 1358, 5567, 23350, 91998, 351058, 1269907, 4394634, 14495236, 45779246, 138567568, 403282017, 1130773069, 3062535192, 8028046724, 20411824364, 50429813556, 121280243676, 284360432241, 650972702410
Offset: 0

Views

Author

Vladeta Jovovic, Aug 05 2000

Keywords

References

  • M. A. Harrison, On the number of classes of binary matrices, IEEE Trans. Computers, 22 (1973), 1048-1051.

Crossrefs

Formula

G.f.: 1/3840*(1/(1 - x^1)^32 + 231/(1 - x^2)^16 + 20/(1 - x^1)^16/(1 - x^2)^8 + 520/(1 - x^4)^8 + 60/(1 - x^1)^8/(1 - x^2)^12 + 80/(1 - x^1)^8/(1 - x^3)^8 + 720/(1 - x^2)^4/(1 - x^6)^4 + 160/(1 - x^1)^4/(1 - x^2)^2/(1 - x^3)^4/(1 - x^6)^2 + 320/(1 - x^4)^2/(1 - x^12)^2 + 240/(1 - x^1)^4/(1 - x^2)^2/(1 - x^4)^6 + 480/(1 - x^8)^4 + 240/(1 - x^2)^4/(1 - x^4)^6 + 384/(1 - x^1)^2/(1 - x^5)^6 + 384/(1 - x^2)^1/(1 - x^10)^3).

A056205 Number of n X 6 binary matrices under row and column permutations and column complementations.

Original entry on oeis.org

1, 1, 7, 23, 153, 849, 6128, 43534, 319119, 2255466, 15307395, 98349144, 597543497, 3430839916, 18653684881, 96273409815, 473010823993, 2218614773950, 9961651259869, 42927432229913, 177963663264430
Offset: 0

Views

Author

Vladeta Jovovic, Aug 05 2000

Keywords

References

  • M. A. Harrison, On the number of classes of binary matrices, IEEE Trans.Computers, 22 (1973), 1048-1051.

Crossrefs

Formula

G.f.: 1/46080*(1/(1 - x^1)^64 + 1053/(1 - x^2)^32 + 30/(1 - x^1)^32/(1 - x^2)^16 + 4920/(1 - x^4)^16 + 180/(1 - x^1)^16/(1 - x^2)^24 + 120/(1 - x^1)^8/(1 - x^2)^28 + 160/(1 - x^1)^16/(1 - x^3)^16 + 5280/(1 - x^2)^8/(1 - x^6)^8 + 960/(1 - x^1)^8/(1 - x^2)^4/(1 - x^3)^8/(1 - x^6)^4 + 3840/(1 - x^4)^4/(1 - x^12)^4 + 640/(1 - x^1)^4/(1 - x^3)^20 + 1920/(1 - x^2)^2/(1 - x^6)^10 + 720/(1 - x^1)^8/(1 - x^2)^4/(1 - x^4)^12 + 5760/(1 - x^8)^8 + 2160/(1 - x^2)^8/(1 - x^4)^12 + 1440/(1 - x^1)^4/(1 - x^2)^6/(1 - x^4)^12 + 2304/(1 - x^1)^4/(1 - x^5)^12 + 6912/(1 - x^2)^2/(1 - x^10)^6 + 3840/(1 - x^1)^2/(1 - x^2)^1/(1 - x^3)^2/(1 - x^6)^9 + 3840/(1 - x^4)^1/(1 - x^12)^5).
Showing 1-7 of 7 results.