# OK to post homework # Aurora Hiveley, 2/14/25, Assignment 7 Help:=proc(): print(`JGah1(N), JGah2(N), JGah3(N), JGah4(N), JGah5(N)`): end: with(combinat): ## Problem 1 # if you use the formula in Guillera's homepage, coded in JG1, how many terms (i.e. in what place do you need to truncate the series) # to compute Pi to 100 decimal digits after the decimal point? # HowManyDigits(JG1,40); --> returns 123 # HowManyDigits(JG1,30); --> returns 93 # seq(HowManyDigits(JG1,n), n=31..40); # 96, 99, 102, 105, 108, 111, 114, 117, 120, 123 # then we obtain 100 digits with 33 terms ## Problem 2 #JGah1(N): The first N terms in equation from page 5 of Guillera's thesis, slide 8 of Zudilin presentation JGah1:=proc(N) local i,n,a: a:= add( (RF(1/2,n)^3*(42*n+5))/(n!^3*2^(6*n)), n=0..N ): evalf(16/a): end: # HowManyDigits(JGah1,100); --> returns 182 #JGah2(N): The first N terms in equation from slide 10 of Zudilin presentation JGah2:=proc(N) local i,n,a: a:= add( (RF(1/4,n)*RF(1/2,n)*RF(3/4,n)*(40*n+3))/(n!^3*7^(4*n)), n=0..N ): evalf(49*sqrt(3)/(9*a)): end: # HowManyDigits(JGah2,100); --> returns 341 #JGah3(N): The first N terms in equation 1 from slide 15 of Zudilin presentation JGah3:=proc(N) local i,n,a,phi: phi := (1 + sqrt(5))/2: a:= add( binomial(2*n,n)^3 * ( (30+45*sqrt(5))*n + (-1+5*sqrt(5)) ) * ((-1/phi)^(8*n))/2^(12*n) , n=0..N ): evalf(32/a): end: # HowManyDigits(JGah3,100); --> returns 4 #JGah4(N): The first N terms in the last equation from slide 8 of Zudilin's presentation JGah4:=proc(N) local i,n,a: a:= add( (1/(n!)^3)* RF(1/2,n)*RF(1/6,n)*RF(5/6,n) * (133*n+8) * (4/85)^(3*n), n=0..N ): evalf((85*sqrt(255))/(54*a)): end: # HowManyDigits(JGah4,100); --> returns 402 #JGah5(N): The first N terms in an equation from page 6 of Guillera's thesis JGah5:=proc(N) local i,n,a: a:= add( ( RF(1/2,n)*RF(1/6,n)*RF(5/6,n)*(-1)^n*(545140134*n + 13591409) ) / ( n!^3*53360^(3*n) ), n=0..N ): evalf( sqrt(640320^3)/(12*a) ): end: # HowManyDigits(JGah5,100); --> returns 1432 ### copied from C7.txt #C7.txt Maple code for Dr. Z.'s Math 640 class, Feb. 12, 2026, in memory of Dr. Jesus Guillera, with guest-lecturer Professor Wadim Zudilin #Code created after class Help7:=proc(): print(`JG1(N), JG2(N), RF(a,n), HowManyDigits(f,N) `):end: #RF(a,n): The rising factorial (aka Pochammer symbol) a(a+1)...(a+n-1). Note that RF(1,n)=n! RF:=proc(a,n) local i: mul(a+i,i=0..n-1):end: #Inputs a pre-coded procedure for computing Pi via an infinite series, the number of digits that #agree with Pi if you truncate it after the term n=N. For example #HowManyDigits(JG1,40); should return 123, meaning that if you truncate the series after 40 terms #it would agree with Pi to 123 digits HowManyDigits:=proc(f,N) : Digits:=10000: -trunc(log[10](abs(evalf(f(N)-Pi)))): end: #JG1(N): The first N terms in the Guillera formula in his homepage using Ramanujan-style ... notation JG1:=proc(N) local i,n,a: a:= add((mul(2*i-1,i=1..n)/mul(2*i,i=1..n))^5*(13+20*n*(50+41*(n-1)))*(-1/2^10)^n,n=0..N): sqrt(128/a): end: #The first formula in page 6 of Jesus Guillera's thesis #http://anamat.unizar.es/jguillera/pdf-files/Guillera-thesis2007.pdf JG2:=proc(N) local n,a: a:=add(RF(1/2,n)*RF(1/3,n)*RF(2/3,n)/n!^3*(2/27)^n*(15*n+2),n=0..N): (27/(4*a)):end: