I've been trying to use the SumConvergence on the following series:

SumConvergence[1/(n Log[n] Log[n Log[n]]), n]

This returns False on Mathematica 11.3, but I suspect this is incorrect since:

$$\frac{1}{n \log(n) \log(n \log(n))} < \frac{1}{n \log(n) \log(n)} $$

attempting to check the convergence of the RHS

SumConvergence[1/(n Log[n] Log[n]), n]

returns True. So by direct comparison, the initial series should converge. I've also plotted the two functions to further justify the argument.

A comparison between the two series.

What can I do to help SumConvergence recognize that the initial series converges?

  • $\begingroup$ Mathematica seems to like the comparison tests less than calc. students: Reduce[n > 1 && 1/(n Log[n] Log[n Log[n]]) < 1/(n Log[n] Log[Log[n]]), n, Integers] and Limit[(n Log[n]^y)/(n Log[n] Log[n Log[n]]), n -> Infinity, Assumptions -> 1 < y < 1 + 1/10^6] show convergence, but I don't know how to teach SumConvergence the comparison methods. $\endgroup$
    – Michael E2
    Commented Jul 30, 2019 at 14:15
  • $\begingroup$ Still a bug in 13.3. Crazy. $\endgroup$ Commented Jun 28, 2023 at 4:58

4 Answers 4


The culprit is Sum`SumConvergenceDump`UnivariateLogarithm[], which mistakenly decides the sum is not convergent. It should be reported as a bug. (It would be acceptable if it couldn't decide, but to reach the wrong conclusion is wrong.)

Here's a modest implementation of the limit comparison test within the log-testing code. It uses the Villegas-Gayley trick to insert the code ahead of the built-in UnivariateLogarithm[] codes. We need to manually insert it as the first code in the DownValues, so that it is called before other definitions of UnivariateLogarithm[]. Since UnivariateLogarithm[] is buggy, it's a question whether I should call it (or SumConvergence[], which in turn would call it) after the comparison test to check convergence of the transformed series. I probably shouldn't unless I can prove I've avoided the bug, but just how much work should I do rooting around undocumented functions for free? Better to let WRI decide how to fix their software.


 DownValues[Sum`SumConvergenceDump`UnivariateLogarithm] = Prepend[
   (* new def. for UnivariateLogarithm[] *)
     Sum`SumConvergenceDump`UnivariateLogarithm[expr_, k_] /;
       ! TrueQ[$inLimitComparisionTestQ] && ! FreeQ[expr, _Log]
     ] :> Block[{$inLimitComparisionTestQ = True},
     Module[{factors, comparisons, log, nlogs, res},
      factors = Rest@FactorList[expr];
      nlogs = Max[Count[#, _Log, Infinity, Heads -> True] & /@ 
         factors[[All, 1]]];
      factors = Power @@@ factors;
      log = k; (* log is the iterated composition of Log[] 
                  with k up to nlogs number of times *)
      While[Depth[log] <= nlogs + 1 && ! TrueQ@res,
       comparisons = Abs@Limit[log*factors, n -> Infinity];
       res = Sum`SumConvergenceDump`UnivariateLogarithm[
         Times @@ ReplacePart[
           Position[comparisons, L_ /; 0 < L < Infinity] -> 1/log],
       log = Log@log
      res /; TrueQ@res

 SumConvergence[1/(n Log[n] Log[n Log[n]]), n]

(*  True  *)
  • $\begingroup$ It would be useful if Method->"IntegralTest" uses the numeric integration in some cases. $\endgroup$
    – user64494
    Commented Jul 30, 2019 at 16:25
  • 1
    $\begingroup$ @user64494 One can use NSum[1/(n Log[n] Log[n Log[n]]), {n, 2, Infinity}], if one wants an approximate verification of convergence via NIntegrate. One can try to substitute NIntegrate for Integrate for SumConvergence, but I think it will almost always return True since NIntegrate almost always returns a numeric result: Block[{Integrate = NIntegrate}, SumConvergence[1/n, n, Method -> "IntegralTest"]]. $\endgroup$
    – Michael E2
    Commented Jul 30, 2019 at 18:05
  • $\begingroup$ Many thanks from me to you for your comprehensive analysis of my suggestion. There is a room to improve NIntegrate for divergent improper integrals. $\endgroup$
    – user64494
    Commented Jul 30, 2019 at 18:34
  • 1
    $\begingroup$ Compare NIntegrate[1/x, {x, 1, Infinity}] which results 191612. with the command of Maple int(1/x, x = 1 .. infinity, numeric) which performs Float(infinity). $\endgroup$
    – user64494
    Commented Jul 30, 2019 at 18:56

This can be done in two steps.

  1. ForAll[n, n >= 2, D[1/(n Log[n] Log[n Log[n]]), n] <= 0];Resolve[%, Reals] *True*

  2. NIntegrate[1/(n Log[n] Log[n Log[n]]), {n, 2, Infinity}] *1.42474*


This is a simple example where you already need Bertrand test. Indeed, the series is positive, and thus the "Raabe failure means try Bertrand" applies.

Indeed, try Raabe:

b[n_] = 1/(n Log[n] Log[n Log[n]]); 

Limit[n (b[n]/b[n + 1] - 1), n -> Infinity]

it prints 1, that means nothing, you need to increase the complexity of the test (Bertrand):

Limit[Log[n] (n (b[n]/b[n + 1] - 1) - 1), n -> Infinity]  

prints 2, that means converges.


We can also use Ermakoff's test, which in general is much more powerful than the ratio test. I've only seen one example where a (nonincreasing) summand is inconclusive (the answer in the linked question).

eventuallyNonIncreasing[expr_, n_] := FunctionMonotonicity[{expr, n > 10000}, n, Reals] === -1

sumConvergenceErmakoff[expr_, n_] /; eventuallyNonIncreasing[expr, n] :=
    Block[{limmand, lim},
        limmand = Exp[n]*(expr /. n -> Exp[n])/expr;
        lim = Quiet[Limit[limmand, n -> ∞]];
            lim < 1
        ) /; NumericQ[lim] && !PossibleZeroQ[lim - 1]

sumConvergenceErmakoff[1/(n Log[n] Log[n Log[n]]), n]


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.