I want to find the closed form of:

$\displaystyle \tag*{} \sum \limits _{n=1}^{\infty}\frac{(-1)^n (H_{2n}-H_{n})}{n(2)^n \binom{2n}{n}}$

Where $H_{k}$ is $k^{\text{th}}$ harmonic number

Can anyone tell me the value of the sum using Mathematica?

  • $\begingroup$ Welcome to the Mathematica Stack Exchange. I think that your question can be more suitably addressed over at the Math Stack Exchange. This stack site is about the technical software called Mathematica and the associated Wolfram Language. Best of luck. $\endgroup$
    – Syed
    Apr 7 at 13:39
  • $\begingroup$ @Syed Thank you, I am aware of that. I don't have access to Mathematica, so can you input my sum into the software and tell me the value, please? $\endgroup$
    – Dhanvin
    Apr 7 at 13:52
  • $\begingroup$ @MarcoB Thank you. If you have access to Mathematica, can you find the value of my sum, please? $\endgroup$
    – Dhanvin
    Apr 7 at 13:52

3 Answers 3


f[n_] := (-1)^
   n (HarmonicNumber[2 n] - HarmonicNumber[n])/(n*2^n*Binomial[2 n, n])

The terms of the sum converge to zero rapidly

DiscretePlot[Abs[f[n]], {n, 1, 25},
 ScalingFunctions -> "Log"]

enter image description here

The partial sums are

(tab = Join[
    {{nmax, TraditionalForm@Inactive[Sum][f[n], {n, 1, nmax}]}},
    Table[{nmax, Sum[f[n], {n, 1, nmax}]}, {nmax, 1, 28}] /.
     r_Rational :> N[r, 25]]) //
 Grid[#, Frame -> All] &

enter image description here

The partial sum expressed as a DifferenceRoot is

psum[nmax_] = Sum[f[n], {n, 1, nmax}]

enter image description here

Using AskConstants to identify a constant with this approximate numeric value

(sum = (Log[2]^2 - Pi^2/12)/3) // TraditionalForm

enter image description here


Block[{$MaxExtraPrecision = 500},
   {{nmax, TraditionalForm[sum - Inactive[Sum][f[n], {n, 1, nmax}]]}},
   Table[{nmax, N[sum - Sum[f[n], {n, 1, nmax}], nmax + 20] // N},
    {nmax, 20, 200, 20}]] // Grid[#, Frame -> All] &]

enter image description here

EDIT: An alternate approach

(sum2 = FullSimplify@
    Total[Sum[#, {n, 1, Infinity}] & /@ 
  Assuming[n ∈ PositiveIntegers,
       (List @@ (f[n] // FunctionExpand // Simplify // 
           Expand))]]) // TraditionalForm

enter image description here

N[sum2, 20]

(* -0.11400467316863726452 *)

Checking that sum and sum2 are equivalent

Block[{$MaxExtraPrecision = 500},
 N[sum - sum2, 200]]

(* N::meprec: Internal precision limit $MaxExtraPrecision = 500.` reached while evaluating 1/3 (-(π^2/12)+Log[2]^2)+1/72 (7 π^2-3 (9 Log[<<1>>]^2+8 PolyLog[2,Power[<<2>>]]-8 PolyLog[2,Times[<<2>>]])). *)

(* 0.*10^-699 *)
  • $\begingroup$ Wow, I am sorry I couldn't do that green tick as I already did. But your answer almost helped me solve the questions mathematically :). $\endgroup$
    – Dhanvin
    Apr 7 at 15:53
  • $\begingroup$ @4444 to be fair, you can accept Bob's answer and unaccept mine. Just click on the green checkmark. It's more thorough compared to mine. Oh, and Bob, I did not know about the AskConstants so many thanks for demonstrating its use $\endgroup$
    – bmf
    Apr 7 at 15:54
  • $\begingroup$ @bmf thanks for your permission. And I am very grateful for the 'AskConstants' $\endgroup$
    – Dhanvin
    Apr 7 at 15:57
  • 3
    $\begingroup$ @4444 it's not a matter of permission. Bob is an excellent user with high-quality answers and this answer here might also be helpful for future users :) $\endgroup$
    – bmf
    Apr 7 at 15:57
f[n_] := (((-1)^n (HarmonicNumber[2 n] - HarmonicNumber[n]))/(
 n 2^n Binomial[2 n, n])) 

First, we check the sum convergence

SumConvergence[f[n], n]


Doing the sum analytically:

Sum[f[n], {n, 1, Infinity}]

that takes too long for the time I can spare. So, let's do a couple of values and take it from there.

Table[Sum[f[n], {n, 1, xx}], {xx, 1, 21}]


You can try to find an analytic formula for the numerator and denominator of the above data, either by using FindSequenceFunction or OEIS. Neither leads to an answer.

So, finally we resort to numerics

Table[Sum[f[n], {n, 1, xx}], {xx, 1, 21}] // N


and we see that it quickly converges to -0.114005


Let $$a_n=\frac{ H_{2n}-H_{n}}{n\,2^n\, \binom{2n}{n}}\implies \frac{a_{n+1}}{a_n}=\frac{n \left(H_{n+1}-H_{2 n+2}\right)}{4 (2 n+1) \left(H_n-H_{2 n}\right)}$$ Using asymptotics $$\frac{a_{n+1}}{a_n}=\frac{1}{8}-\frac{1}{16 n}+\frac{1+\log (2)}{32 n^2 \log (2)}+O\left(\frac{1}{n^3}\right)$$ So, we can expect a quite fast convergence.

Facing an alternating series,

$$\sum_{n=1}^\infty (-1)^n a_n=\sum_{n=1}^p (-1)^n a_n+\sum_{n=p+1}^\infty (-1)^n a_n$$ consider $a_{p+1}$ $$H_{2(p+1)}-H_{p+1}=\log (2)-\frac{1}{4 n}+\frac{5}{16 n^2}-\frac{3}{8 n^3}+O\left(\frac{1}{n^4}\right)$$

$$\log\big[H_{2(p+1)}-H_{p+1}\big]=\log (\log (2))-\frac{1}{4p \log (2)}+\frac{10 \log (2)-1}{32 p^2 \log ^2(2)}+O\left(\frac{1}{p^3}\right)$$ $$\log\Bigg[2^{p+1} (p+1) \binom{2 p+2}{p+1}\Bigg]=3p \log (2)+\frac{1}{2} \log \left(\frac{64 p}{\pi }\right)+\frac{3}{8 p}-\frac{1}{8 p^2}+O\left(\frac{1}{p^3}\right)$$

$$\log(a_{p+1})=-3p \log (2)+\left(\log (\log (2))-\frac{1}{2} \log \left(\frac{64 p}{\pi }\right)\right)+O\left(\frac{1}{p}\right)$$ So, if we want $$a_{p+1} \leq \epsilon \quad \implies \quad p \geq \frac{W(t)}{6 \log (2)} \qquad \text{where} \qquad t=\frac{3 \pi \log ^3(2)}{32 \epsilon ^2}$$ $W(t)$ being Lambert function.

Suppose $\epsilon=10^{-16}$, this gives as a real $p=16.1471$ (notice that the exact solution is $16.1263$.

Computing for $p=17$ gives for the summation $$-\frac{6773770929644673431621962072907}{59416607594890592064865566720000}$$ which, in decimal, is $-0.11400467316863727867$.

Now,being lazy, I went here; click the last button ("Integer Relation Algorithms") and you will see the result already given

  • $\begingroup$ It's nice to see a mathematical proof as well! $\endgroup$
    – hana
    Apr 8 at 16:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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