#C13.txt; March 6, 2014; #Implementing Jesus' Guillera PROVED formula for Pi Help:=proc(): print(` JesusPi(n), JesusPi1(n), JesusPi1e(n) `): end: #JesusPi1(n): computes the n-th partial sum of #https://sites.google.com/site/guilleramath/ #due to Jesus Guillera. It is PROVED, and #much more importantly using the so-called WZ #method (that stands for Wilf and Zeilberger) JesusPi1:=proc(n) local c,s,i,c1: c:=1: s:=13: for i from 1 to n do c:=c*(-1)/2^10*((2*i-1)/(2*i))^5: c1:=c*((20*i)*(41*i+9)+13): s:=s+c1: od: s: end: #JesusPi(n): computes Pi from 128/Pi^2 JesusPi:=proc(n): evalf(sqrt(128/JesusPi1(n))):end: #floating point version JesusPi1e:=proc(n) local c,s,i,c1: c:=1: s:=13: for i from 1 to n do c:=evalf(c*(-1)/2^10*((2*i-1)/(2*i))^5): c1:=evalf(c*((20*i)*(41*i+9)+13)): s:=evalf(s+c1): od: s: end: