Ok to post Question 1: By iterating procedure CP(L1,L2), in M12.txt write a procedure CPg(L) that inputs a list of lists L=[L1,L2, ...,Lk] of "databases" (represented as lists L1, L2, ..., Lk) and outputs CP(L1,L2, ..., Lk) In particular, CPg([L1,L2]) should output the same as CP(L1,L2) for any two lists of integers L1 and L2 CPg:=proc(L) local l1, i: option remember: if nops(L) = 0 then: return('FAIL'): fi: l1:=[0]: for i in L do: l1:=CP(l1,i): end: l1 end proc: Question 2: Procedures AveClever(L) and kthMomentClever(L,k) inputs a database L, and first finds its weight-enumerator. Suppose that you already know the weight-enumerator, call it f, in the variable x. Modify these procedures to write procedures AveGF(f,x) and kthMomentGF(f,x,k) that do the same things if you already have the weight-enumerator f (in terms of x). In particular, for any "data-base" L, check that AveGF(WtEn(L,x),x)= AveClever(L) and kthMomentGF(WtEn(L,x),x,k)= kthMomentClever(L,k) Answer 2: AveGF:=proc(f, x): subs(x=1,diff(f,x))/subs(x=1,f): end proc: kthMomentGF:=proc(f,x,k) local mu,f1,i: mu:=AveGF(f,x): f1:=f/x^mu/subs(x=1,f): for i from 1 to k do f1:=expand(x*diff(f1,x)): od: subs(x=1,f1): end: Question 3: ScaledMomentGF:=proc(f, x, k) local l1, l2, ans: l1:=kthMomentGF(f, x, k): ans:=k/2: l2:=kthMomentGF(f, x, 2)^ans: l1/l2 end proc: Question 4: seq(limit(ScaledMomentGF(((1+x)/2)^n,x,k), n=infinity), k=2..20) 1, 0, 3, 0, 15, 0, 105, 0, 945, 0, 10395, 0, 135135, 0, 2027025, 0, 34459425, 0, 654729075 #A123023 is the OEIS number for the above sequence