\\ PARI Program to compute A269742. \\ Variables are: \\ p1, p2: the number of columns that have not crossed diagonal that still require 1 or 2 respectively. \\ q1, q2: the number of columns that have crossed diagonal that still require 1 or 2 respectively. \\ w: weight associated with p1,p2,q1,q2. This is a polynomial with indeterminate x where the coefficient \\ of x^k is the number of solutions with total sum above the diagonal equal to k. \\ Initially p2 = n and p1, q1, q2 are zero. \\ The program proceeds row by row, moving one column across the diagonal and subtracting a total of 2 from p1 + 2*p2 + q1 + 2*q2. \\ After the final row, p1, p2, q1, q2 are all reduced to zero. acc(p1,p2,q1,q2,w,r)={if(r==0, my(key=[p1,p2,q1,q2],z); mapput(M, key, if(mapisdefined(M, key, &z), z+w, w)))} p22(p1,p2,q1,q2,w,r)={for(i=0, min(r\2, p2), acc(p1, p2-i, q1, q2, binomial(p2,i)*x^(2*i)*w, r-2*i))} p21(p1,p2,q1,q2,w,r)={for(i=0, min(r, p2), p22(p1+i, p2-i, q1, q2, binomial(p2,i)*x^i*w, r-i))} p11(p1,p2,q1,q2,w,r)={for(i=0, min(r, p1), p21(p1-i, p2, q1, q2, binomial(p1,i)*x^i*w, r-i))} q22(p1,p2,q1,q2,w,r)={for(i=0, min(r\2, q2), p11(p1, p2, q1, q2-i, binomial(q2,i)*w, r-2*i))} q21(p1,p2,q1,q2,w,r)={for(i=0, min(r, q2), q22(p1, p2, q1+i, q2-i, binomial(q2,i)*w, r-i))} q11(p1,p2,q1,q2,w,r)={for(i=0, min(r, q1), q21(p1, p2, q1-i, q2, binomial(q1,i)*w, r-i))} s(p0,p1,p2,q1,q2,w,r)={ if(p0, q11(p1, p2, q1, q2, p0*w, r)); if(p1, q11(p1-1, p2, q1+1, q2, p1*w, r)); if(p2, q11(p1, p2-1, q1, q2+1, p2*w, r)); } \\ returns n-th row Row(n)={ local(M=Map(Mat([[0, n, 0, 0], 1]))); for(k=1, n, my(L=Mat(M)); M=Map(); for(i=1, matsize(L)[1], my([p1,p2,q1,q2]=L[i,1]); s(n+1-k-p1-p2, p1, p2, q1, q2, L[i,2], 2))); Vec(vecsum(Mat(M)[,2])/n!); }