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.

A318951 Array read by rows: T(n,k) is the number of nonisomorphic n X n matrices with nonnegative integer entries and row sums k under row and column permutations, (n >= 1, k >= 0).

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 4, 3, 1, 1, 6, 14, 5, 1, 1, 9, 44, 53, 7, 1, 1, 12, 129, 458, 198, 11, 1, 1, 16, 316, 3411, 5929, 782, 15, 1, 1, 20, 714, 19865, 145168, 96073, 3111, 22, 1, 1, 25, 1452, 95214, 2459994, 9283247, 1863594, 12789, 30, 1, 1, 30, 2775, 383714, 30170387, 537001197, 833593500, 42430061, 53836, 42, 1
Offset: 1

Views

Author

Andrew Howroyd, Sep 05 2018

Keywords

Examples

			Array begins:
================================================================
n\k| 0  1    2       3         4            5              6
---|------------------------------------------------------------
1  | 1  1    1       1         1            1              1 ...
2  | 1  2    4       6         9           12             16 ...
3  | 1  3   14      44       129          316            714 ...
4  | 1  5   53     458      3411        19865          95214 ...
5  | 1  7  198    5929    145168      2459994       30170387 ...
6  | 1 11  782   96073   9283247    537001197    19578605324 ...
7  | 1 15 3111 1863594 833593500 189076534322 23361610029905 ...
...
		

Crossrefs

Rows 2..6 are A002620(n+2), A058389, A058390, A058391, A058392.

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];
    K[q_List, t_, k_] := SeriesCoefficient[1/Product[g = GCD[t, q[[j]]]; (1 - x^(q[[j]]/g))^g, {j, 1, Length[q]}], {x, 0, k}];
    RowSumMats[n_, m_, k_] := Module[{s = 0}, Do[s += permcount[q]* SeriesCoefficient[Exp[Sum[K[q, t, k]/t*x^t, {t, 1, n}]], {x, 0, n}], {q, IntegerPartitions[m]}]; s/m!];
    Table[RowSumMats[n-k, n-k, k], {n, 1, 11}, {k, n-1, 0, -1}] // Flatten (* Jean-François Alcover, Sep 12 2018, 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}
    K(q, t, k)={polcoeff(1/prod(j=1, #q, my(g=gcd(t, q[j])); (1 - x^(q[j]/g) + O(x*x^k))^g), k)}
    RowSumMats(n, m, k)={my(s=0); forpart(q=m, s+=permcount(q)*polcoeff(exp(sum(t=1, n, K(q, t, k)/t*x^t) + O(x*x^n)), n)); s/m!}
    for(n=1, 8, for(k=0, 6, print1(RowSumMats(n, n, k), ", ")); print)