Relationship between logarithms and harmonic series

$$\sum_{n=1}^k\,\frac{1}{n} \;=\; \ln k + \gamma + \varepsilon_k$$

where $$\varepsilon_k\sim\frac{1}{2k}$$

and this seems to generalise to $$\sum_{n=1}^k\,\frac{1}{\ln(x)n} \;=\; \log_x k + \frac{\gamma}{\ln(x)} + \varepsilon_k$$

Why is this the case?

• What is log(x)n? Is it log of n with base x? Or logx (and in what base?) multiplied by n? – ypercubeᵀᴹ Mar 23 '14 at 19:28
• Updated - hopefully a bit clearer. $\log_x$ is $\log$ base $x$. – martin Mar 23 '14 at 19:31
• It seems that all you've done is divide the first formula by $\ln (x)$ – Antonio Vargas Mar 23 '14 at 19:35
• Ah ha! .... Cogs slowly turning ... :/ – martin Mar 23 '14 at 19:37
• ;)${}{}{}{}{}{}$ – Antonio Vargas Mar 23 '14 at 19:42

Consider the area below $1/x$ between 1 and $n$, and compare the curve to the "staircase" $1/k$. The area under the staircase is your sum, the area under the curve is just $\ln n$. If you look at the curve $1/(x - 1)$, it is above the staircase, an approximation from above to the staircase area is $1+\int_2^n \frac{d x}{1-x} = 1 + \ln (n - 1)$. Averaging both areas gives a rough estimate of $\ln n + 1/2 + \ln \frac{n - 1}{n} \approx \ln n + 1/2 - 1/n$ for the sum. • Why does this generalise to the $\log$ to any base? – martin Mar 23 '14 at 19:35