#Please do not post homework #Ravali Bommanaboina 11/1/20, Assignment 16 #Question 1 p_3:=proc(N) local n,i,seq: n:=N: i:=0: seq:=[]: for i from 0 to n do seq:=[op(seq),(binomial(n,i))^6]: od: return(seq): end: S6seqClever:=proc(ope,n,N,Ini,K) local ope1,gu,L,n1,j1: ope1:=Yafe(ope,N)[2]: L:=degree(ope1,N): return(S6seq(n)): if nops(Ini)<>L then ERROR(`Ini should be of length`, L): fi: ope1:=expand(subs(n=n-L,ope1)/N^L): gu:=Ini: for n1 from nops(Ini)+1 to K do gu:=[op(gu), -add(gu[nops(gu)+1-j1]*subs(n=n1,coeff(ope1,N,-j1)), j1=1..L)]: od: gu: end: #Question 3 S6:=proc(n) local i,sum: i:=0: sum:=0: for i from 0 to n do sum:=(binomial(n,i))^6+sum: od: return(sum): end: S6seq:=proc(N) local n,i,seq: n:=N: i:=0: seq:=[]: for i from 0 to n do seq:=[op(seq),(binomial(n,i))^6]: od: return(seq): end: S6seqClever:=proc(ope,n,N,Ini,K) local ope1,gu,L,n1,j1: ope1:=Yafe(ope,N)[2]: L:=degree(ope1,N): return(S6seq(n)): if nops(Ini)<>L then ERROR(`Ini should be of length`, L): fi: ope1:=expand(subs(n=n-L,ope1)/N^L): gu:=Ini: for n1 from nops(Ini)+1 to K do gu:=[op(gu), -add(gu[nops(gu)+1-j1]*subs(n=n1,coeff(ope1,N,-j1)), j1=1..L)]: od: gu: end: #