Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to solve the following recurrence relations using telescoping. How would I go about doing it?

  1. $T(n) = T(n-1) + 1/n$

  2. $T(n) = T(n-1) + \log n$


share|cite|improve this question
up vote 3 down vote accepted

In the first case you have $T(n) - T(n-1) = \frac{1}{n}$. If you sum with $n$ going from $2$ to $k$ you get:

$\begin{align*} \big(T(k) - T(k-1)\big) &+ \big(T(k-1) + T((k-2)\big) + \big(T(k-2) + T((k-3)\big) + \cdots + \\ &+ \big(T(4) - T(3)\big) +\big(T(3) - T(2)\big) + \big(T(2) - T(1)\big) = T(k) - T(1) = \sum_{m=2}^k \frac{1}{m}\end{align*}$

Notice how every term except $T(k)$ and $T(1)$ cancels out (I added "backwards" to make this more evident). This is the telescoping part. Then we get $T(n) = T(1) - 1 + H_n $, where $H_n$ is the $n$-th harmonic number $\displaystyle \sum_{m=1}^n \frac{1}{m}$ (I substracted $1$ because the first term $\displaystyle \frac{1}{1}$ doesn't appear in $\displaystyle \sum_{m=2}^n \frac{1}{m}$).

Likewise, in the second case you get: $\displaystyle T(n) = T(1) + \sum_{m=2}^n \log m = T(1) + \sum_{m=1}^n \log m$ (this last equality is given by $\log 1 = 0$; it doesn't make any difference but to me it looks nicer). Or you can use Cameron's hint: $T(n) = T(1) + \log n!$, by applying the product rule for logarithms.

The exact solution depends on the value of $T(1)$ in both cases.

share|cite|improve this answer

Hint: a recurrence of the form $T(n) = T(n-1) + f(n)$ will have solutions $T(n) = C + \sum_{k=1}^n f(k)$.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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