A318805 Array read by antidiagonals: T(n,k) is the number of inequivalent symmetric nonnegative integer n X n matrices with sum of elements equal to k, under row and column permutations.
1, 1, 1, 1, 2, 1, 1, 3, 2, 1, 1, 5, 4, 2, 1, 1, 6, 8, 4, 2, 1, 1, 8, 13, 9, 4, 2, 1, 1, 10, 22, 16, 9, 4, 2, 1, 1, 13, 33, 32, 17, 9, 4, 2, 1, 1, 15, 52, 57, 35, 17, 9, 4, 2, 1, 1, 18, 76, 105, 68, 36, 17, 9, 4, 2, 1, 1, 21, 108, 178, 139, 71, 36, 17, 9, 4, 2, 1
Offset: 1
Examples
Array begins: =============================================== n\k| 1 2 3 4 5 6 7 8 9 10 11 12 ---+------------------------------------------- 1 | 1 1 1 1 1 1 1 1 1 1 1 1 ... 2 | 1 2 3 5 6 8 10 13 15 18 21 25 ... 3 | 1 2 4 8 13 22 33 52 76 108 150 209 ... 4 | 1 2 4 9 16 32 57 105 178 301 490 793 ... 5 | 1 2 4 9 17 35 68 139 264 502 924 1695 ... 6 | 1 2 4 9 17 36 71 151 303 619 1234 2473 ... 7 | 1 2 4 9 17 36 72 154 315 661 1370 2885 ... 8 | 1 2 4 9 17 36 72 155 318 673 1413 3034 ... 9 | 1 2 4 9 17 36 72 155 319 676 1425 3078 ... ...
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, k_] := SeriesCoefficient[1/(Product[Product[(1 - x^(2*LCM[p[[i]], p[[j]] ]))^GCD[p[[i]], p[[j]]], {j, 1, i - 1}], {i, 2, Length[p]}]* Product[t = p[[i]]; (1 - x^t)^Mod[t, 2]*(1 - x^(2*t))^Quotient[t, 2], {i, 1, Length[p]}]), {x, 0, k}]; T[, 1] = T[1, ] = 1; T[n_, k_] := (s = 0; Do[s += permcount[p]*c[p, k], {p, IntegerPartitions[n]}]; s/n!); Table[T[n-k+1, k], {n, 1, 12}, {k, n, 1, -1}] // Flatten (* Jean-François Alcover, Sep 13 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} c(p,k)={polcoef(1/(prod(i=2, #p, prod(j=1, i-1, (1 - x^(2*lcm(p[i],p[j])) + O(x*x^k))^gcd(p[i], p[j]))) * prod(i=1, #p, my(t=p[i]); (1 - x^t + O(x*x^k))^(t%2)*(1 - x^(2*t) + O(x*x^k))^(t\2) )), k)} T(n,k)={if(n==0, k==0, my(s=0); forpart(p=n, s+=permcount(p)*c(p,k)); s/n!)}
Formula
T(n,k) = T(k,k) for n > k.