MathOverflow is a question and answer site for professional mathematicians. 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

Hi. I have a feeling this is kinda a known thing, but I don't know it, so hopefully you can help me out. I'm a lowly software developer.

For a given n and k, is there a short-cut way of calculating (or approximating) the value of this expression?


It's a matter of computational efficiency: I have a lot of these expressions i want to calculate.

share|cite|improve this question
There are better places for getting an answer to questions such as yours; please see the faq. BTW you get crude estimates by replacing the sum with an integral. For better results, google for Euler and MacLaurin summation. – Franz Lemmermeyer May 17 '11 at 10:49
math.stackexchange is likely the right forum for your question. As is it's a little vague and perhaps pretty basic -- how good an approximation do you want? $\sum_{n=1}^k \frac{1}{n}$ is between $\ln(k+1)$ and $\ln(k)+1$. – Ryan Budney May 17 '11 at 10:54
If one really needs to compute them 'well' I am not sure this is so simple a question. – user9072 May 17 '11 at 10:58
up vote 3 down vote accepted

If you mean that the sum starts at 1 these are exactly the Harmonic numbers, see

There are well-known asymptotic expansions (see the above mentioned page for a start, and below).

For actual computation, there is a nice blogpost on computing them by Fredrik Johansson:

share|cite|improve this answer
Thanks everyone: I appreciate it. Investigating harmonic series/Euler summation I found a good article on exactly what I needed (I should have said the sum for n=1 to k). For future google travellers, turns out the approximation I need is ln(n)+.5772156649... (Euler's constant) via: – john conroy May 17 '11 at 11:31

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.