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

A242093 Number A(n,k) of inequivalent n X k binary matrices, where equivalence means permutations of rows or columns or the symbol set; square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 2, 2, 1, 1, 2, 5, 2, 1, 1, 3, 8, 8, 3, 1, 1, 3, 14, 18, 14, 3, 1, 1, 4, 20, 47, 47, 20, 4, 1, 1, 4, 30, 95, 173, 95, 30, 4, 1, 1, 5, 40, 200, 545, 545, 200, 40, 5, 1, 1, 5, 55, 367, 1682, 2812, 1682, 367, 55, 5, 1, 1, 6, 70, 674, 4745, 14386, 14386, 4745, 674, 70, 6, 1
Offset: 0

Views

Author

Alois P. Heinz, Aug 14 2014

Keywords

Examples

			A(1,4) = 3: [0 0 0 0], [1 0 0 0], [1 1 0 0].
A(1,5) = 3: [0 0 0 0 0], [1 0 0 0 0], [1 1 0 0 0].
A(2,2) = 5:
  [0 0]  [1 0]  [1 1]  [1 0]  [1 0]
  [0 0], [0 0], [0 0], [1 0], [0 1].
A(3,2) = 8:
  [0 0]  [1 0]  [1 1]  [1 0]  [1 0]  [1 0]  [1 0]  [1 1]
  [0 0], [0 0], [0 0], [1 0], [0 1], [1 0], [0 1], [1 0].
  [0 0]  [0 0]  [0 0]  [0 0]  [0 0]  [1 0]  [1 0]  [0 0]
Square array A(n,k) begins:
  1, 1,  1,   1,    1,     1,       1,        1, ...
  1, 1,  2,   2,    3,     3,       4,        4, ...
  1, 2,  5,   8,   14,    20,      30,       40, ...
  1, 2,  8,  18,   47,    95,     200,      367, ...
  1, 3, 14,  47,  173,   545,    1682,     4745, ...
  1, 3, 20,  95,  545,  2812,   14386,    68379, ...
  1, 4, 30, 200, 1682, 14386,  126446,  1072086, ...
  1, 4, 40, 367, 4745, 68379, 1072086, 16821330, ...
		

Crossrefs

Columns (or rows) k=0-10 give: A000012, A008619, A006918(n+1), A246148, A246149, A246150, A246151, A246152, A246153, A246154, A246155.
Main diagonal gives A091059.

Programs

  • Maple
    with(numtheory):
    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(add(mul(mul(add(d*
          coeff(u, x, d), d=divisors(ilcm(i, j)))^(igcd(i, j)*
          coeff(s, x, i)*coeff(t, x, j)), j=1..degree(t)),
          i=1..degree(s))/mul(i^coeff(u, x, i)*coeff(u, x, i)!,
          i=1..degree(u))/mul(i^coeff(t, x, i)*coeff(t, x, i)!,
          i=1..degree(t))/mul(i^coeff(s, x, i)*coeff(s, x, i)!,
          i=1..degree(s)), u=b(2$2)), t=b(n$2)), s=b(k$2))
        end:
    A:= (n, k)-> g(sort([n, k])[]):
    seq(seq(A(n, d-n), n=0..d), d=0..12);
  • Mathematica
    b[n_, i_] := b[n, i] = If[n == 0, {0}, If[i < 1, {}, Flatten[Table[Map[ Function[p, p + j*x^i], b[n - i*j, i - 1]], {j, 0, n/i}]]]];
    g[n_, k_] := g[n, k] = Sum[Sum[Sum[Product[Product[With[{gc = GCD[i, j]* Coefficient[s, x, i]*Coefficient[t, x, j]}, If[gc == 0, 1, Sum[d* Coefficient[u, x, d], {d, Divisors[LCM[i, j]]}]^gc]], {j, 1, Exponent[t, x]}],
    {i, Exponent[s, x]}]/Product[i^Coefficient[u, x, i]*Coefficient[u, x, i]!,
    {i, Exponent[u, x]}]/Product[i^Coefficient[t, x, i]*Coefficient[t, x, i]!,
    {i, Exponent[t, x]}]/Product[i^Coefficient[s, x, i]*Coefficient[s, x, i]!,
    {i, Exponent[s, x]}], {u, b[2, 2]}], {t, b[n, n]}], {s, b[k, k]}];
    A[n_, k_] := g @@ Sort[{n, k}];
    Table[Table[A[n, d - n], {n, 0, d}], {d, 0, 12}] // Flatten (* Jean-François Alcover, Apr 25 2016, adapted from Maple, updated Jan 01 2021 *)

A180985 Array T(n,k) = number of n X k binary matrices with rows and columns in lexicographically nondecreasing order.

Original entry on oeis.org

2, 3, 3, 4, 7, 4, 5, 14, 14, 5, 6, 25, 45, 25, 6, 7, 41, 130, 130, 41, 7, 8, 63, 336, 650, 336, 63, 8, 9, 92, 785, 2942, 2942, 785, 92, 9, 10, 129, 1682, 11819, 24520, 11819, 1682, 129, 10, 11, 175, 3351, 42305, 183010, 183010, 42305, 3351, 175, 11, 12, 231, 6280, 136564
Offset: 1

Views

Author

R. H. Hardin, Sep 30 2010

Keywords

Comments

Differs from "number of inequivalent {0,1}-matrices of size n X k, modulo permutations of rows and columns", A241956, starting at T(2, 3) = 14 while A241956(2, 3) = 13. - M. F. Hasler, Apr 27 2022

Examples

			Table starts:
..2...3.....4.......5.........6...........7.............8................9
..3...7....14......25........41..........63............92..............129
..4..14....45.....130.......336.........785..........1682.............3351
..5..25...130.....650......2942.......11819.........42305...........136564
..6..41...336....2942.....24520......183010.......1202234..........6979061
..7..63...785...11819....183010.....2625117......33345183........371484319
..8..92..1682...42305...1202234....33345183.....836488618......18470742266
..9.129..3351..136564...6979061...371484319...18470742266.....818230288201
.10.175..6280..402910..36211867..3651371519..358194085968...31887670171373
.11.231.11176.1099694.170079565.32017940222.6148026957098.1096628939510047
.
All solutions for 3 X 3:
..0..0..0....0..0..0....0..0..0....0..0..0....0..0..0....0..0..0....0..0..0
..0..0..0....0..0..0....0..0..1....0..0..1....0..0..1....0..1..1....0..0..0
..0..0..1....0..1..1....0..1..0....0..0..1....0..1..1....0..1..1....1..1..1
.
..0..0..0....0..0..0....0..0..0....0..0..0....0..0..0....0..0..1....0..0..1
..0..0..1....0..1..1....0..0..1....0..1..1....0..1..1....0..1..0....0..1..0
..1..1..0....1..0..0....1..1..1....1..0..1....1..1..1....0..1..0....0..1..1
.
..0..0..1....0..0..1....0..0..1....0..0..1....0..0..1....0..0..1....0..0..1
..0..0..1....0..0..1....0..0..1....0..1..1....0..1..0....0..1..0....0..1..0
..0..1..0....0..0..1....0..1..1....0..1..1....1..0..0....1..1..0....1..0..1
.
..0..0..1....0..0..1....0..0..1....0..0..1....0..0..1....0..0..1....0..0..1
..0..1..0....0..0..1....0..1..1....0..1..1....0..0..1....0..1..1....0..1..1
..1..1..1....1..1..0....1..0..0....1..1..0....1..1..1....1..0..1....1..1..1
.
..0..0..0....0..0..1....0..0..1....0..0..1....0..1..1....0..1..1....0..1..1
..1..1..1....1..1..0....1..1..0....1..1..1....0..1..1....0..1..1....0..1..1
..1..1..1....1..1..0....1..1..1....1..1..1....0..1..1....1..0..0....1..0..1
...
..0..1..1....0..1..1....0..1..1....0..1..1....0..1..1....0..1..1....0..1..1
..0..1..1....1..0..0....1..0..0....1..0..0....1..0..1....1..0..1....1..0..1
..1..1..1....1..0..0....1..0..1....1..1..1....1..1..0....1..0..1....1..1..1
.
..0..1..1....1..1..1
..1..1..1....1..1..1
..1..1..1....1..1..1
		

Crossrefs

Cf. A089006 (diagonal).
Cf. A004006 (row & column 2), A184138 (row & column 3).
Cf. A241956 (similar but different).

Programs

  • PARI
    A180985(h,w,cnt=0)={ local(A=matrix(h,w), z(r,c)=!while(r1 && z(r,c), c--); while(c>1, A[r,c--]=0); while(r>1, A[r--,]=A[r+1,]); next(3))); break); cnt} \\ M. F. Hasler, Apr 27 2022

Formula

T(n,k) = T(k,n). T(1,k) = k+1. T(2,k) = A004006(k+1). T(3,k) = A184138(k). - M. F. Hasler, Apr 27 2022

A363349 Array read by antidiagonals: T(n,k) is the number of equivalence classes of n X k binary matrices under permutation of rows and columns and complementation of columns.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 2, 1, 1, 1, 3, 2, 1, 1, 1, 4, 4, 3, 1, 1, 1, 5, 7, 8, 3, 1, 1, 1, 6, 11, 19, 10, 4, 1, 1, 1, 7, 16, 41, 32, 16, 4, 1, 1, 1, 8, 23, 81, 101, 68, 20, 5, 1, 1, 1, 9, 31, 153, 299, 301, 114, 29, 5, 1, 1, 1, 10, 41, 273, 849, 1358, 757, 210, 35, 6, 1
Offset: 0

Views

Author

Andrew Howroyd, May 28 2023

Keywords

Comments

T(n,k) is also the number of equivalence classes of n X k binary matrices with an even number of 1's in each column under permutation of rows and columns.

Examples

			Array begins:
======================================================
n/k| 0 1  2   3    4     5      6       7        8 ...
---+--------------------------------------------------
0  | 1 1  1   1    1     1      1       1        1 ...
1  | 1 1  1   1    1     1      1       1        1 ...
2  | 1 2  3   4    5     6      7       8        9 ...
3  | 1 2  4   7   11    16     23      31       41 ...
4  | 1 3  8  19   41    81    153     273      468 ...
5  | 1 3 10  32  101   299    849    2290     5901 ...
6  | 1 4 16  68  301  1358   6128   27008   114763 ...
7  | 1 4 20 114  757  5567  43534  343656  2645494 ...
8  | 1 5 29 210 1981 23350 319119 4633380 67013431 ...
  ...
		

Crossrefs

A259344 is the same array without the first row and column read by upward antidiagonals.
Columns k=0..6 are A000012, A004526(n+2), A005232, A006381, A006382, A056204, A056205.
Rows n=2..4 are A000027(n+1), A000601, A006380.
Main diagonal is A006383.

Programs

  • PARI
    \\ Compare A028657.
    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]))}
    T(n, k)={if(n==0, 1, my(s=0); forpart(q=n, my(e=1<
    				
Showing 1-3 of 3 results.