I want to verify the following result: $\sum _{y=2}^{n+1} \left(\sum _{x=y-1}^n \frac{1}{x-y}\right)=n \left(H_n^{(1)}-1\right)$

In Mathematica i try with:

Sum[Sum[1/(x - y), {x, y - 1, n}], {y, 2, n + 1}] == n*(HarmonicNumber[n, 1] - 1)

But I don't understand Mathematica output, is a large formula. And WolframAlpha doesn't say anything for it.

  • $\begingroup$ What happens at x=y in the inner sum ? $\endgroup$ Jan 21, 2014 at 21:19
  • $\begingroup$ @b.gatessucks What happens?, sorry, i don't understand what you ask. $\endgroup$
    – Wyvern666
    Jan 21, 2014 at 21:21
  • 1
    $\begingroup$ If x can equal y in the inner sum I think you have an infinity. $\endgroup$ Jan 21, 2014 at 21:24

1 Answer 1


I think you might have a few transcription errors in the result you are attempting to demonstrate -- as b.gatessucks has pointed out, as written, $x$ can equal $y$ in the denominator in the inner sum. However, if I make the following minor amendments to your statement: $\sum_{y=1}^{n}\left(\sum_{x=y+1}^{n}\frac{1}{x-y}\right) = n \left(H_{n}^{(1)} - 1\right)$, then Mathematica is able to verify the result:

FullSimplify[Sum[Sum[1/(x - y), {x, y + 1, n}], {y, 1, n}] == n (HarmonicNumber[n] - 1)]

returns True.

  • $\begingroup$ Im confused here. Look, the original sum to do (in mi homework) is: $\left.\sum _{x=1}^n \left(\sum _{y=2}^{x+1} \frac{1}{x-y}\right)\right]$. There is a sugerence, it says that could be of help to interchange the order of the sum, so i did that and i have then: $\sum _{y=2}^{n+1} \left(\sum _{x=y-1}^n \frac{1}{x-y}\right)$. Your solution doesnt give the same result than the original sum that is proposed in mi homework. The result for the original is (with FullSimplify): $\sum _{x=1}^n (\psi ^{(0)}(2-x)+\gamma -1)$. $\endgroup$
    – Wyvern666
    Jan 22, 2014 at 0:56
  • $\begingroup$ Im saying that $\left.\sum _{x=1}^n \left(\sum _{y=2}^{x+1} \frac{1}{x-y}\right)\right]$ must be equal to $\sum _{y=2}^{n+1} \left(\sum _{x=y-1}^n \frac{1}{x-y}\right)$. $\endgroup$
    – Wyvern666
    Jan 22, 2014 at 1:07
  • $\begingroup$ Wyvern666: Are you sure about the starting form for your homework problem? Consider the case where $x=2$ in the outer sum and $y=2$ in the inner sum -- you get 1/0, which is nonsensical. The same thing happens for $x=y=3$ and so on. If it truly is $x-y$ in the denominator, then the indices on the inner sum should be set up to ensure $y < x \forall x,y$. That motivated my "guess" as to how to "correct" the statement to yield the desired identity. $\endgroup$ Jan 22, 2014 at 1:19
  • $\begingroup$ Well, you are right, the damm homework is wrong, i waste a lot of time with it. $\endgroup$
    – Wyvern666
    Jan 22, 2014 at 1:29

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.