Help:=proc(): print(`Children(a), G(a), MN(a)`):end: #Children(a): the children of a Children:=proc(a) local b,n,a1,i,S1,s: option remember: if nops(a)=2 then RETURN({seq([i],i=a[1]..a[2])}): fi: n:=nops(a): a1:=[op(1..n-1,a)]: S1:=Children(a1): {seq(seq([op(s),i],i=a[n-1]..a[n]),s in S1)}: end: #G(a): numbre of Gelfand patterns whose bottom row #is the non-decreasing list of pos. integers a G:=proc(a) local C: option remember: if nops(a)=1 then 1: else C:=Children(a): add(G(c), c in C): fi: end: MN:=proc(a) local i,j: mul(mul(a[j]-a[i]+j-i,i=1..j-1),j=1..nops(a))/ mul(i!,i=1..nops(a)-1): end: MN1:=proc(n) local i,j: product(product(2*j-2*i,i=1..j-1),j=1..n)/ product(i!,i=1..n -1): end: