OK to post 1. a. (30+25+20)!/(30!25!20!)=2478456799816702091914145225486880 b. NuGW([30,25,20],{[1,0,0],[0,1,0],[0,0,1]}) 41512613892711511465063226481480 c. 31831650298097356165593942880232160 d. 3818966446210163616599115660989544 2. a.4^30 b.18012939919656512113252584133785878056327163962817704791464695718041992634738504938769 c. (x-1)/x d. (x-1)*(x^2+x+1)/(x^3+x-1) e. 1.465571232 3. a. f:=e^(e^x-1) SeqBell3(51)[51] 3263983870004111524856951830191582524419255819477 b. f:=add((exp(x)-1)^(3*i+1)/(3*i+1)!,i=0..51) coeff(taylor(f,x=0,52),x,51)*51!; 1089030250824782148720306369738651363734233026160 c. f:=exp(x)-1-add(x^(2*i)/(2*i)!,i=1..25): f1:=add(f^i/i!,i=0..51): coeff(taylor(f1,x=0,52),x,51)*51!; 101595492022700597152023270326642584710021120 d. f:=exp(x)-1-add(x^(2*i)/(2*i)!,i=1..25): f1:=add(f^(3*i+1)/(3*i+1)!,i=0..51): coeff(taylor(f1,x=0,52),x,51)*51!; 30143119660583350838086153637731292910753195 4. a. k=3 {{{1}},{{2}},{{3}}} k=2 {{{1},{2}},{{3}}} {{{1},{3}},{{2}}} {{{3},{2}},{{1}}} k=1 {{{1,2,3}}} {{{3,2},{1}}} {{{1,2},{3}}} {{{1,3},{2}}} b. egf=exp(exp(x)-1) coeff(taylor(egf^2/n!,x=0,n+1),x,n)*n! A001861 c. coeff(taylor(egf^m/n!,x=0,n+1),x,n)*n! 5. a. pn(1000) 24061467864032622473692149727991 b. The same as distinct partition 8635565795744155161506 c. pnD(1000,1) 8635565795744155161506 d. pnDC(1000,1,{1},2) 517035762467311 6. a. TreeSeq(31)[31]*31 550618520345910837374536871905139185678862401 b. SeqRTchild({2},31)[31]/31 78478557180356488765408999200000000 c. SeqRTchild({1,3,4},31)[31] 388391178300656853181332829972846230000000 d. SeqRTchildNone({1,3,4},31)[31] 2863465748628395267057869436794752181 7. a. [[[],[]],[[],[]]] [[],[[],[[],[]]]] [[],[[[],[]],[]]] [[[[],[]],[]],[]] [[[],[[],[]]],[]] b. There are two cases for complete binary tree since a node can only have two children or none. Remove the node Case 1: It is a single vertex so egf is x^0/0!=1 Case 2: It becomes two smaller trees. The order of where two smaller trees are do matter because it can be either left or right child, so egf is B(x)^2 B={} union BxB Therefore, B(x)=x+B(x) Modified procedure used: NuWalks:=proc(m,n,k) local W1,W2,w1,w2,W3,W4,W5: option remember: if m<0 or n<0 or k<0 then RETURN(0): fi: if m=0 and n=0 and k=0 then RETURN(1): fi: W1:=NuWalks(m-1,n,k): W2:=NuWalks(m,n-1,k): W3:=NuWalks(m,n,k-1): W4:=NuWalks(m-1,n-1,k-1): W5:=NuWalks(m-2,n-2,k-2): W1+W2+W3+W4+W5: end: RestrictedNuWalks:=proc(m,n,k,S) local W1,W2,W3: option remember: if member([m,n,k],S) then RETURN(0): fi: if m<0 or n<0 or k<0 then RETURN(0): fi: if m=0 and n=0 and k=0 then RETURN(1): fi: W1:=RestrictedNuWalks(m-1,n,k,S): W2:=RestrictedNuWalks(m,n-1,k,S): W3:=RestrictedNuWalks(m,n,k-1,S): W1+W2+W3: end: NuGW:=proc(Pt,A) local a: option remember: if (Pt[1]<0 or Pt[2]<0 or Pt[3]<0 or Pt[1]