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.

A321609 Array read by antidiagonals: T(n,k) is the number of inequivalent binary n X n matrices with k ones, under row and column permutations.

Original entry on oeis.org

1, 0, 1, 0, 1, 1, 0, 0, 1, 1, 0, 0, 3, 1, 1, 0, 0, 1, 3, 1, 1, 0, 0, 1, 6, 3, 1, 1, 0, 0, 0, 7, 6, 3, 1, 1, 0, 0, 0, 7, 16, 6, 3, 1, 1, 0, 0, 0, 6, 21, 16, 6, 3, 1, 1, 0, 0, 0, 3, 39, 34, 16, 6, 3, 1, 1, 0, 0, 0, 1, 44, 69, 34, 16, 6, 3, 1, 1, 0, 0, 0, 1, 55, 130, 90, 34, 16, 6, 3, 1, 1
Offset: 0

Views

Author

Andrew Howroyd, Nov 14 2018

Keywords

Examples

			Array begins:
==========================================================
n\k| 0  1  2  3  4  5  6   7   8    9   10    11    12
---+------------------------------------------------------
0  | 1  0  0  0  0  0  0   0   0    0    0     0     0 ...
1  | 1  1  0  0  0  0  0   0   0    0    0     0     0 ...
2  | 1  1  3  1  1  0  0   0   0    0    0     0     0 ...
3  | 1  1  3  6  7  7  6   3   1    1    0     0     0 ...
4  | 1  1  3  6 16 21 39  44  55   44   39    21    16 ...
5  | 1  1  3  6 16 34 69 130 234  367  527   669   755 ...
6  | 1  1  3  6 16 34 90 182 425  870 1799  3323  5973 ...
7  | 1  1  3  6 16 34 90 211 515 1229 2960  6893 15753 ...
8  | 1  1  3  6 16 34 90 211 558 1371 3601  9209 24110 ...
9  | 1  1  3  6 16 34 90 211 558 1430 3825 10278 28427 ...
...
		

Crossrefs

Rows n=6..8 are A052370, A053304, A053305.
Main diagonal is A049311.
Row sums are A002724.
Cf. A052371 (as triangle), A057150, A246106, A318795.

Programs

  • Mathematica
    permcount[v_List] := Module[{m = 1, s = 0, k = 0, t}, For[i = 1, i <= Length[v], i++, t = v[[i]]; k = If[i > 1 && t == v[[i - 1]], k + 1, 1]; m *= t*k; s += t]; s!/m];
    c[p_List, q_List, k_] := SeriesCoefficient[Product[Product[(1 + O[x]^(k + 1) + x^LCM[p[[i]], q[[j]]])^GCD[p[[i]], q[[j]]], {j, 1, Length[q]}], {i, 1, Length[p]}], {x, 0, k}];
    M[m_, n_, k_] := Module[{s = 0}, Do[Do[s += permcount[p]*permcount[q]*c[p, q, k], {q, IntegerPartitions[n]}], {p, IntegerPartitions[m]}]; s/(m!*n!)]
    Table[M[n - k, n - k, k], {n, 0, 12}, {k, n, 0, -1}] // Flatten (* Jean-François Alcover, Sep 10 2019, after Andrew Howroyd *)
  • 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}
    c(p, q, k)={polcoef(prod(i=1, #p, prod(j=1, #q, (1 + x^lcm(p[i], q[j]) + O(x*x^k))^gcd(p[i], q[j]))), k)}
    M(m, n, k)={my(s=0); forpart(p=m, forpart(q=n, s+=permcount(p) * permcount(q) * c(p, q, k))); s/(m!*n!)}
    for(n=0, 10, for(k=0, 12, print1(M(n, n, k), ", ")); print); \\ Andrew Howroyd, Nov 14 2018

Formula

T(n,k) = T(k,k) for n > k.
T(n,k) = 0 for k > n^2.