Prove $\sum_{i=1}^{n-1} \left[\frac{n}{i(i+1)} + \frac{n(n-1)}{i(i+1)} (n(H_{n-2} - H_{n-i-1}) - (i-1))) \right] =(n-1)^2$? Apparently the following expression
$$
    \sum_{i=1}^{n-1} \Bigg[\frac{n}{i(i+1)} + \frac{n(n-1)}{i(i+1)} (n(H_{n-2} - H_{n-i-1})  - (i-1)))   \Bigg] \\
$$
simplifies to $(n-1)^2$, where $H_i$ is the i-th harmonic number. 
I tried to simplify but I'm not seeing the simplification
\begin{align}
    \sum_{i=1}^{n-1} \Bigg[\frac{n}{i(i+1)} + \frac{n(n-1)}{i(i+1)} (n(H_{n-2} - H_{n-i-1})  - (i-1)))   \Bigg] \\
    =    n\sum_{i=1}^{n-1} \frac{1}{i(i+1)}\Bigg[1 + (n-1) (n(H_{n-2} - H_{n-i-1})  - (i-1)))   \Bigg]
\end{align}
It's not obvious to me how I can further simplify, especially with the harmonic terms. 
In addition, what kind of series is $\sum_i \frac{1}{i(i+1)}$? 
I have a little Python script below in case anyone wants to see that the 2 expressions are equal:
def solution(n):
  ans = 0
  for i in range(1, n):
    sum1 = 0

    for r in range(n-i, n-1):
      sum1 += 1/r

    sum1 *= n
    sum1 -= i-1
    sum1 *= n*(n-1)/i/(i+1);

    ans += sum1 + n/i/(i+1)

  return ans


for n in range(100,1000):
  print(solution(n) - (n-1)**2)
```

 A: I got $-(n-1)^2$ and by calculating the first few cases, it seems to be the correct answer. I will assume that $n\geq 2$ and $H_0=0$. First note that
$$
\sum\limits_{i = 1}^{n - 1} {\frac{1}{{i(i + 1)}}}  = \sum\limits_{i = 1}^{n - 1} {\left[ {\frac{1}{i} - \frac{1}{{i + 1}}} \right]}  = 1 - \frac{1}{n}.
$$
We can decompose the sum into
\begin{align*}
& n\sum\limits_{i = 1}^{n - 1} {\frac{1}{{i(i + 1)}}}  + n^2 (n - 1)H_{n - 2} \sum\limits_{i = 1}^{n - 1} {\frac{1}{{i(i + 1)}}}  - n^2 (n - 1)\sum\limits_{i = 1}^{n - 1} {\frac{{H_{n - i - 1} }}{{i(i + 1)}}} \\ &\quad - n(n - 1)\sum\limits_{i = 1}^{n - 1} {\frac{1}{i}} 
\\ &
 = n - 1 + n(n - 1)^2 H_{n - 2}  - n^2 (n - 1)\sum\limits_{i = 1}^{n - 1} {\frac{{H_{n - i - 1} }}{{i(i + 1)}}}  - n(n - 1)H_{n - 1} 
\\ &
 = n - 1 + n(n - 1)^2 H_{n - 2}  - n^2 (n - 1)\sum\limits_{i = 1}^{n - 1} {\frac{{H_{n - i - 1} }}{{i(i + 1)}}}  - n(n - 1)\left( {H_{n - 2}  + \frac{1}{{n - 1}}} \right)
\\ &
 =  - 1 + n(n - 1)(n - 2)H_{n - 2}  - n^2 (n - 1)\sum\limits_{i = 1}^{n - 1} {\frac{{H_{n - i - 1} }}{{i(i + 1)}}} .
\end{align*}
Now
\begin{align*}
& \sum\limits_{i = 1}^{n - 1} {\frac{{H_{n - i - 1} }}{{i(i + 1)}}}  = \sum\limits_{i = 1}^{n - 2} {\frac{{H_{n - i - 1} }}{{i(i + 1)}}}  = \sum\limits_{i = 1}^{n - 2} {\left[ {\frac{{H_{n - i - 1} }}{i} - \frac{{H_{n - i - 1} }}{{i + 1}}} \right]} \\ & = \sum\limits_{i = 1}^{n - 2} {\left[ {\frac{{H_{n - i - 1} }}{i} - \frac{{H_{n - i - 2}  + \frac{1}{{n - i - 1}}}}{{i + 1}}} \right]} 
\\ &
 = \sum\limits_{i = 1}^{n - 2} {\left[ {\frac{{H_{n - i - 1} }}{i} - \frac{{H_{n - i - 2} }}{{i + 1}}} \right]}  + \sum\limits_{i = 1}^{n - 2} {\frac{1}{{(n - i - 1)(i + 1)}}} \\ & = H_{n - 2}  + \frac{1}{n}\sum\limits_{i = 1}^{n - 2} {\left[ {\frac{1}{{n - i - 1}} + \frac{1}{{i + 1}}} \right]} 
\\ &
 = H_{n - 2}  + \frac{1}{n}\left( {H_{n - 1}  - 1 + H_{n - 2} } \right).
\end{align*}
Therefore, the original sum is
$$
 - 1 + n(n - 1)(n - 2)H_{n - 2}  - n^2 (n - 1)H_{n - 2}  + n(n - 1)\left( {H_{n - 1}  - 1 + H_{n - 2} } \right) \\ =  - n^2  + 2n - 1 =  - (n - 1)^2 .
$$
A: This is not an answer but an observation which is too long for a comment.
I have tried to simplify the problem checking the steps with Mathematica - and found a strange behaviour.
If we replace the difference of the harmonic numbers for $n\ge 2$ and $1 \le i \le n-1$ by
$$n \left(H_{n-2}-H_{n-i-1}\right) \to \sum _{m=0}^{i-2} \frac{n}{-m+n-2}\tag{1}$$
then the summand of the sum in question becomes
$$B(n,i)=\frac{n}{i (i+1)}+\frac{n (n-1)}{i (i+1)} \left(\sum _{m=0}^{i-2} \frac{n}{-m+n-2}-(i-1)\right)\tag{2}$$
Doing now the sum over $i$ for given $n=5$, for example, gives on the one hand
$$\sum _{i=1}^{n-1} B(n,i)=(n^2-n)|_{n\to 5}=20\tag{3} $$
and on the other hand
$$\sum _{i=1}^{5-1} B(5,i)=16\tag{4} $$
Because we know that the result of the summation is (n-1)^2 the first (symbolic) result is wrong, and the second one is correct. Something with the generic sum runs off road. I just found a similar (maybe the same) problem here https://mathematica.stackexchange.com/questions/221373/possible-bug-in-finite-sum-over-inverse-squares-sum-limits-i-1n-frac1x/221484?noredirect=1#comment563875_221484
