Recently I stumbled on the problem Wolfram says sum diverges, but Mathematica gives a numerical value. It says that 1/(n * log(n) - n) is not summable (or does not converge mathematically to be correct). The interesting point is that we can still try to calculate the sum numerically, despite the fact that it is 'not summable'. Mathematica gives ~ 6.1 as the numerical answer.
OK. I think, let's try to reproduce that number (or something similar) in a PHP script of that series summation. My code was:
$formula = function ($n) {return 1/($n * log($n) - $n);};
$n=2;
$sum=0;
while(true) {
$term_n = $formula($n);
$sum += $term_n;
if ($n++ % 100000 == 0) {
if ($sum > 5.8)
usleep(1000);
echo "n=".number_format($n-1)."; sum={$sum}; error={$term_n}\n";
}
}
My algorithm computed the answer till 5.866 and then one of two things was happening:
- either Ubuntu was crashing / freezing
- Or Linux killed my computation script process
This happened after approximately 34 million iterations.
Later I inspected how the CPU load was changing in relation to calculating more series terms.
Now, the interesting part:
at approximately 22 million iterations the cores showed difficulty switching tasks between themselves:

Later on, at approximately 33 million iterations, the cores reached a point of no return - they refused to work at all:

The question is - What's so special about sum 5.866 that it crashes a computer? - given the fact that neither is the iteration number N very huge (just 34 million), nor the N-th term very small (just 1.7E-9) - so no reasons for a singularity.
