Sven Groot said:Sven Groot said:*snip*Some results with various maximum values of k:

Max. value of k Formula value Execution time 100,000,000 5.9999998200000059999997770956 15s

10,000,000,000 5.9999999982000000009369275168 208s 50,000,000,000 5.9999999996400000005856836804 1069s

This is done using decimal. If that's precise enough, and my code has no bugs, we can conclude the product converges quite slowly. Again, this was done on a cluster with 56 nodes (most of which aren't very fast, though). Done locally, it wouldn't taken me about 33 hours. Note that the 100,000,000 job (the first one) takes unnecessarily long because the system I'm using isn't optimized for short jobs.

There, I think I can now safely claim the most elaborate solution to this problem.

Take the log of the big product. Each term looks like [ n log(k+1) + (1 - n) log(k) - log(k + n) ], (n is 3, in our example) and the big product is replaced by a big sum. Now investigate the convergence rate of the big sum, taking a look at http://en.wikipedia.org/wiki/Rate_of_convergence