login
T(n,k) is the number of lower triangles of an n X n 0..k array with all row sums equal to the length of the row and all column sums equal to the length of the column.
6

%I #12 May 17 2020 03:55:27

%S 1,1,1,1,1,1,1,1,3,1,1,1,3,15,1,1,1,3,19,199,1,1,1,3,19,379,6247,1,1,

%T 1,3,19,391,22506,505623,1,1,1,3,19,391,25428,4063437,105997283,1,1,1,

%U 3,19,391,25532,5422820,2303397986,58923059879,1,1,1,3,19,391,25532,5536654

%N T(n,k) is the number of lower triangles of an n X n 0..k array with all row sums equal to the length of the row and all column sums equal to the length of the column.

%H R. H. Hardin, <a href="/A195644/b195644.txt">Table of n, a(n) for n = 1..102</a>

%F T(n,k) = T(n,k-1) for k >= n, n >= 2. - _Andrew Howroyd_, May 16 2020

%e Table starts:

%e 1 1 1 1 1 1 ...

%e 1 1 1 1 1 1 ...

%e 1 3 3 3 3 3 ...

%e 1 15 19 19 19 19 ...

%e 1 199 379 391 391 391 ...

%e 1 6247 22506 25428 25532 25532 ...

%e 1 505623 4063437 5422820 5536654 5539434 ...

%e 1 105997283 2303397986 3868544673 4102276124 4116036800 ...

%e ...

%e Some solutions for n=5, k=4:

%e ..1..........1..........1..........1..........1..........1..........1

%e ..1.1........1.1........2.0........2.0........2.0........2.0........2.0

%e ..3.0.0......3.0.0......0.1.2......2.1.0......0.1.2......2.0.1......1.2.0

%e ..0.1.1.2....0.1.1.2....1.1.0.2....0.1.1.2....1.1.0.2....0.0.2.2....1.2.1.0

%e ..0.2.2.0.1..0.2.2.0.1..1.2.1.0.1..0.2.2.0.1..1.2.1.0.1..0.4.0.0.1..0.0.2.2.1

%o (PARI) \\ adapted from program for A257493.

%o T(n, k)={

%o local(M=Map(Mat([0, 1])));

%o my(acc(p, v)=my(z); mapput(M, p, if(mapisdefined(M, p, &z), z+v, v)));

%o my(recurse(h, p, q, v, e) = if(!p, if(!e, acc(q, v)), my(i=poldegree(p), t=pollead(p)); self()(n, p-t*x^i, q+t*x^i, v, e); for(m=1, min(k, h-i), for(j=1, min(t, e\m), self()(if(j==t, n, i+m-1), p-j*x^i, q+j*x^(i+m), binomial(t, j)*v, e-j*m)))));

%o for(r=1, n, my(src=Mat(M)); M=Map(); for(i=1, matsize(src)[1], recurse(n, src[i, 1] + x^(r-1), 0, src[i, 2], r))); vecsum(Mat(M)[, 2])

%o } \\ _Andrew Howroyd_, May 16 2020

%Y Columns 1..7 are A000012, A195515, A195639, A195640, A195641, A195642, A195643.

%Y Main diagonal is A195638.

%Y Cf. A195522, A257493.

%K nonn,tabl

%O 1,9

%A _R. H. Hardin_, Sep 21 2011