General statistics
List of Youtube channels
Youtube commenter search
Distinguished comments
About
zenith parsec
Mathologer
comments
Comments by "zenith parsec" (@zenithparsec) on "Euler’s Pi Prime Product and Riemann’s Zeta Function" video.
tl;dr? All primes up to a million gets within 0.0000001 of pi. So I tried the approximation like you suggested, using bash because I couldn't find my pencil. $ echo {1..100} | xargs -n10000 factor | grep -E '^(.+): \1' | cut -f1 -d: | tr '\n' ' ' > primes # make a file with all the primes up to 100. $ wc -l primes # how many primes in the file? 25 primes $ { echo -ne 'scale=100;\n define n(x) { xx= x * x; rxx = 1/xx; return 1-rxx; }\n sqrt(6 / ('; printf 'n(%s) *' `cat primes ` ; echo ' 1 ))'; } | bc 3.138737195071720955523189928777768051930643408355181706902928964122\ 6073228989631725449338588507152448 Not terrible, I guess. 3.138 is almost 3.14159256... But, using a few (ok, a lot) more primes... $ echo {1..1000000} | xargs -n10000 factor | grep -E '^(.+): \1' | cut -f1 -d: > primes $ wc -l primes # how many primes in the bigger file? 78498 primes $ # this time I also compare against pi calculated by arctan(1) * 4: spoiler: it comes pretty close. $ { echo -ne 'scale=100;\n define n(x) { xx= x * x; rxx = 1/xx; return 1-rxx; }\nans=sqrt(6 / ('; printf 'n(%s) *' `cat primes ` ; echo ' 1 )); pi=a(1)*4; print ans,"\n",pi-ans,"\n"'; } | bc -l 3.141592547127987979164816081001222684451736462979299582954285924973\ 1246992477303058113590016970323364 .0000001064618052592978273022782801997454329363958062380206586673346\ 917070384786928166758236450847312
1