Sven Groot said:W3bbo said:*snip*But how long does mathematica take if the upperbound on k is not infinite, but another arbitrary high number?
WolframAlpha won't give you an answer if you do that.
Here's a CPU% plot of the time taken to compute the number for a k=1 to n for n=99999 and n=999999
(This is on an Athlon64 3200+)
I note that MM uses GMP for computation of actual numbers; if you do it to Infinity it computes the answer symbolically, which is a lot faster.
From the graph below, you can see that this isn't an O(n) operation: the 999999 takes longer than 10 times the 99999 calculation.
FWIW, 99999 computations gives 5.99982 and 999999 gives 5.99998.
