sum of harmonic progression?

The partial sums of the harmonic series are called "harmonic numbers." The difference between the nth harmonic number and ln(n) tends to a limit as n increases, and that limit is called Euler's constant or gamma.

There's a great book about all this called Gamma: Exploring Euler's Constant.


A good quick approximation: $\log(n + 0.5) + \gamma$.

A yet more accurate approximation: $\log(n)+\gamma+1/2n + 1/12n^2-1/120n^4+1/252n^6-1/240n^8+1/132n^{10}-691/32760n^{12}+\cdots$, taking as many terms as is convenient.


Error analysis:

The first formula above has maximum error of $1/24n^2$. uday's first answer has error of about 0.0024 ln n. Mine is a better approximation for all $n\neq6$.

The first formula is also better than uday's revised formula for all $n\ge46$. The expected error in uday's answer is about 0.000016.