OFFSET
1,3
COMMENTS
A(n,k) = A(n,n^2-k)
It is conjectured that A(n,k)>A(n,k-1) for k<=floor(n^2/2) (see Mathoverflow link).
LINKS
FORMULA
A(n,k) = SUM rs(M,1)!*...*rs(M,n)*(n-cs(M,1))!*...*(n-cs(M,n))!, where the sum is taken over n X n (0,1)-matrices with exactly k ones, rs(M,i) and cs(M,j) are the i-th row sum and the j-th column sum of M, respectively.
EXAMPLE
The array starts with
n=1: 1, 1
n=2: 4, 8, 10, 8, 4
n=3: 216, 648, 1188, 1668, 1944, 1944, 1668, 1188, 648, 216
...
PROG
(PARI) { A(n, k) = my(r, rw, rs, s, t, p); r=vector(n^2+1); rw=[]; forvec(v=vector(n, i, [0, 1]), rw=concat(rw, [v])); rs=vector(#rw, i, sum(j=1, n, rw[i][j])); forvec(v=vector(n, i, [1, #rw]), s=sum(j=1, #v, rs[v[j]]); t=n!; p=1; for(i=2, #v, if(v[i]==v[i-1], p++, t/=p!; p=1)); t/=p!; r[s+1]+=t*prod(i=1, n, rs[v[i]]!)*prod(j=1, n, (n-sum(i=1, n, rw[v[i]][j]))!); , 1); r[k] }
CROSSREFS
KEYWORD
nonn,tabf,changed
AUTHOR
Max Alekseyev, Aug 25 2015
STATUS
approved