login
A284989
Triangle T(n,k) read by rows: the number of n X n {0,1} matrices with trace k where each row sum and each column sum is 2.
5
1, 0, 0, 0, 0, 1, 1, 0, 3, 2, 9, 24, 24, 24, 9, 216, 540, 610, 420, 210, 44, 7570, 18000, 20175, 13720, 6300, 1920, 265, 357435, 829920, 909741, 617610, 284235, 91140, 19005, 1854, 22040361, 50223600, 54295528, 36663312, 17072790, 5679184, 1337280, 203952, 14833
OFFSET
0,9
FORMULA
Let z1..zn be n variables and s1 = Sum_{k=1..n} zk, s2 = Sum_{k=1..n} zk^2, s12 = (s1^2 - s2)/2, fk = t*(s12 - zk*(s1 - zk)) + zk*(s1 - zk) for k=1..n, P_n(t) = [(z1..zn)^2] Product_{k=1..n} fk. Then P_n(t) = Sum_{k=0..n} T(n,k)*t^(n-k), n >= 3. - Gheorghe Coserea, Dec 21 2018
EXAMPLE
0: 1
1: 0 0
2: 0 0 1
3: 1 0 3 2
4: 9 24 24 24 9
5: 216 540 610 420 210 44
6: 7570 18000 20175 13720 6300 1920 265
7: 357435 829920 909741 617610 284235 91140 19005 1854
8: 22040361 50223600 54295528 36663312 17072790 5679184 1337280 203952 14833
PROG
(PARI)
P(n, t='t) = {
my(z=vector(n, k, eval(Str("z", k))),
s1=sum(k=1, #z, z[k]), s2=sum(k=1, #z, z[k]^2), s12=(s1^2 - s2)/2,
f=vector(n, k, t*(s12 - z[k]*(s1 - z[k])) + z[k]*(s1 - z[k])), g=1);
for (i=1, n, g *= f[i]; for(j=1, n, g=substpol(g, z[j]^3, 0)));
for (k=1, n, g=polcoef(g, 2, z[k]));
g;
};
seq(N) = concat([[1], [0, 0], [0, 0, 1]], apply(n->Vec(P(n)), [3..N]));
concat(seq(8)) \\ Gheorghe Coserea, Dec 21 2018
CROSSREFS
Cf. A001499 (row sums), A000166 (diagonal), A007107 (column 0).
Sequence in context: A118791 A234840 A234743 * A049971 A234748 A156528
KEYWORD
nonn,tabl
AUTHOR
R. J. Mathar, Apr 07 2017
STATUS
approved