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.

A052371 Triangle T(n,k) of n X n binary matrices with k=0...n^2 ones up to row and column permutations.

This page as a plain text file.
%I A052371 #18 Sep 22 2019 08:02:48
%S A052371 1,1,1,1,1,3,1,1,1,1,3,6,7,7,6,3,1,1,1,1,3,6,16,21,39,44,55,44,39,21,
%T A052371 16,6,3,1,1,1,1,3,6,16,34,69,130,234,367,527,669,755,755,669,527,367,
%U A052371 234,130,69,34,16,6,3,1,1
%N A052371 Triangle T(n,k) of n X n binary matrices with k=0...n^2 ones up to row and column permutations.
%H A052371 Andrew Howroyd, <a href="/A052371/b052371.txt">Table of n, a(n) for n = 0..2890</a> (rows n=0..20)
%e A052371 Triangle begins:
%e A052371   1;
%e A052371   1, 1;
%e A052371   1, 1, 3, 1, 1;
%e A052371   1, 1, 3, 6, 7, 7, 6, 3, 1, 1;
%e A052371   1, 1, 3, 6, 16, 21, 39, 44, 55, 44, 39, 21, 16, 6, 3, 1, 1;
%e A052371   ...
%e A052371 (the last block giving the numbers of 4 X 4 binary matrices with k=0..16 ones up to row and column permutations).
%t A052371 permcount[v_] := Module[{m = 1, s = 0, t, i, k = 0}, 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];
%t A052371 c[p_, q_] := Product[(1 + x^LCM[p[[i]], q[[j]]])^GCD[p[[i]], q[[j]]], {i, 1, Length[p]}, {j, 1, Length[q]}];
%t A052371 row[n_] := Module[{s = 0}, Do[Do[s += permcount[p]*permcount[q]*c[p, q], {q, IntegerPartitions[n]}], {p, IntegerPartitions[n]}]; CoefficientList[ s/(n!^2), x]]
%t A052371 row /@ Range[0, 5] // Flatten (* _Jean-François Alcover_, Sep 22 2019, after _Andrew Howroyd_ *)
%o A052371 (PARI)
%o A052371 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}
%o A052371 c(p, q)={prod(i=1, #p, prod(j=1, #q, (1 + x^lcm(p[i], q[j]))^gcd(p[i], q[j])))}
%o A052371 row(n)={my(s=0); forpart(p=n, forpart(q=n, s+=permcount(p) * permcount(q) * c(p, q))); Vec(s/(n!^2))}
%o A052371 for(n=1, 5, print(row(n))) \\ _Andrew Howroyd_, Nov 14 2018
%Y A052371 Rows 6..8 are A052370, A053304, A053305.
%Y A052371 Row sums are A002724.
%Y A052371 Cf. A049311.
%K A052371 nonn,tabf
%O A052371 0,6
%A A052371 _Vladeta Jovovic_, Mar 08 2000
%E A052371 a(0)=1 prepended by _Andrew Howroyd_, Nov 14 2018