#OK to post #Yuxuan Yang, March 28th, Assignment 16 with(combinat): #1 ComputCons:=proc(F, P, n, d) local total,p,f,k,fq: Digits:=d+3: fq:=F/subs(n=n-1,F): total := 0: f := evalf(subs(n=0,F)): p:=1/f: for k from 1 while evalf(abs(f*p))>evalf(10^(-d)) do f := evalf(-1 * f * subs(n=k,fq)): p := evalf(subs(n=k,P)): total := total + f*p: od: Digits:=d: evalf(total): end: #ComputCons(n^3 + 1, 3^n/binomial(2*n, n)^10, n, 10000) #Digits:=10000:evalf(add((-1)^n*(n^3 + 1)*3^n/binomial(2*n, n)^10, n = 1 .. 1900)) #they give the same results #2 #seq(nops(LT(i, i)), i = 1 .. 6) gives 1, 0, 1, 0, 4, 236 #Not found in OEIS #3#4 were sent in another pdf file.