Let H_1, H_2, H_3, ... be harmonic numbers defined by H_n = sum_{j=1}^{n} 1/j.
Then, for n >= 1, sum_{i=1}^{n} H_i can be expressed as:
A. (n+1)*H_n - n
B. n*H_n
C. (n+1)*H_{n+1} - n
D. n*H_{n+1} - n
GATE 2004 · Discrete Mathematics · Recurrence Relation · medium
Answer: sum_{i=1}^{n} H_i = (n+1)*H_n - n. The answer is option A.
Write as a double sum and swap summation order: sum_{i=1}^{n} H_i = sum_{i=1}^{n} sum_{j=1}^{i} 1/j. Reversing: for each fixed j from 1 to n, the term 1/j appears in H_j, H_{j+1}, ..., H_n, which is (n - j + 1) times. So sum = sum_{j=1}^{n} (n - j + 1) / j.
Simplify the reversed sum: sum_{j=1}^{n} (n-j+1)/j = sum_{j=1}^{n} [(n+1)/j - 1] = (n+1)*sum_{j=1}^{n}(1/j) - n = (n+1)*H_n - n.