Gil Kalai wrote a blog post yesterday entitled “Test Your Intuition (or knowledge, or programming skills) 36.
” The challenge is to evaluate the infinite productI imagine there’s an elegant analytical solution, but since the title suggested that programming might suffice, I decided to try a little Python.
I used primerange from SymPy to generate the list of primes up to 200, and cumprod from NumPy to generate the list of partial products.
cumprod( [(p*p+1)/(p*p-1) for p in primerange(1,200)] ) Apparently the product converges to 5/2, and a plot suggests that it converges very quickly.
Here’s another plot to look more closely at the rate of convergence.
Here we look at the difference between 5/2 and the partial products, on a log scale, for primes less than 2000.
.. More details