# OK to post homework # Lucy Martinez, 02-14-2026, Assignment 7 with(combinat): # Question 1: # Read, understand, and experiment with the procedures done after class in C7.txt, # 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? # # Answer: the terms to comput Pi to 100 decimal digits is N=33. # HowManyDigits(JG1,33); returns 102 and this means that we are using 33 terms in the series (you stop at n=32) # Question 2: # Browse Jesus Guillera's thesis, his papers, and the formulas in Professor Zudilin's talk, # pick five series that look promising, hard-code them (similar to JG2, using RF), # call them JGyourInitialsX (X=1,2,3,4,5), (e.g. for Lucy Martinez, JGlm1(N), JGlm2(N), etc.,) # and find the number of digits that agree with Pi if you use 101 terms in the series (i.e. you stop at n=100) #The following comes from his website: ##The following procedure agrees to 576 digits if you stop after n=100 JGlm1:=proc(N) local a,n: a:=add((-1)^n*(6*n)!/(n!)^6*(5418*n^2+693*n+29)/(2880^(3*n)),n=0..N): sqrt((128*sqrt(5))/a): end: #The following sum comes from page 4 of https://arxiv.org/pdf/2503.00570 ##The following procedure agrees to 365 digits if you stop after n=100 JGlm2:=proc(N) local a,n: a:=add((43680*n^4+20632*n^3+4340*n^2+466*n+21)*(1/2^(12*n))*(1/(n!)^9)*RF(1/2,n)^7*RF(1/4,n)*RF(3/4,n),n=0..N): (2048/a)^(1/4): end: #The following 3 sums come from the paper: # https://arxiv.org/pdf/1104.0392 ##The following procedure agrees to 170 digits if you stop after n=100 JGlm3:=proc(N) local a,n: a:=add((-1)^n*binomial(4*n,2*n)*binomial(2*n,n)^2*(28*n+3)/(3^n*2^(12*n)),n=0..N): 16*sqrt(3)/(3*a): end: ##The following procedure agrees to 96 digits if you stop after n=100 JGlm4:=proc(N) local a,n: a:=add(binomial(4*n,2*n)*binomial(2*n,n)^2*(8*n+1)/(2^(8*n)*3^(2*n)),n=0..N): 2*sqrt(3)/a: end: ##The following procedure agrees to 61 digits if you stop after n=100 JGlm5:=proc(N) local a,n: a:=add(binomial(2*n,n)^3*(6*n+1)/2^(8*n),n=0..N): 4/a: end: # Question 3: # #3.14159265358979323846264338327950288419716939937510 # 5820974944592307816406286208998628034825342117069 (99 digits) #######From before: #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: