I'm trying to proof this equality which I found on this website:
Euler-Mascheroni constant expression, further simplification
$$\ln(n)=\lim_{M\rightarrow\infty}\sum\limits _{k=1}^{M}\sum\limits _{a=1}^{n-1}\frac{1}{kn-a}-\sum\limits _{k=1}^{M}\frac{n-1}{kn}.$$
My wolfram Mathematica code:
Limit[sum(k=1)^M sum(a=1)^(n-1) 1/(kn-a) - sum(k=1)^M (n-1)/(kn), M -> infinity]
And it gives me this answer:
(1/kn)infinity (1-n+kn Polygamma[0,1-nk]-kn Polygamma [o,n-nk])
And that is not what I expected, so I tried to write the last sum $$\sum\limits _{k=1}^{M}\frac{n-1}{kn}$$ as the harmonic series: $$\frac{(n-1)*Hm}{n}$$ were $$Hm=\sum\limits _{k=1}^{M}\frac{1}{k}$$
So we got:
$$\ln(n)=\lim_{M\rightarrow\infty}\sum\limits _{k=1}^{M}\sum\limits _{a=1}^{n-1}\frac{1}{kn-a}-\frac{(n-1)*Hm}{n}$$
And now I've no idea to complete the equality that it gives me the answer that I was looking for, so does anyone know how to complete this proof?
Applying the equality $$ \frac{1}{s} = \int_0^1 x^{s-1} \, dx, $$ we can write the inner sum as $$ \sum_{a=1}^{n-1} \int_0^1 (x^{kn-a-1}-x^{kn-1}) \, dx. $$ The sum is finite, so there is no trouble changing the order of summation and integration to find $$ \int_0^1 \left( \frac{x^{(k-1)n}(1-x^n)}{1-x}-nx^{kn-1} \right) \, dx $$ Now we do the same again with the outer sum, which is for the time being also finite: $$ \int_0^1 \left( \frac{1-x^n}{1-x}\sum_{k=1}^M (x^n)^{k-1} - \frac{n}{x}\sum_{k=1}^M (x^n)^k \right) \, dx = \int_0^1 \left( \frac{1-x^n}{1-x} \frac{1-x^{Mn}}{1-x^n} - n\frac{x^{n-1}(1-x^{Mn})}{1-x^n} \right) \, dx $$ At this point, I need to be careful with interchanging the limit and the integral, because the integrands diverge at $x=1$. I shall set the upper limit a bit smaller than $1$, do the easy bit of the integral, and then sort out the rest.
The easy bit is $$ \int_0^y \left( \frac{1}{1-x}-\frac{nx^{n-1}}{1-x^n} \right) \, dx = [ -\log{(1-x)}+\log{(1-x^n)} ]_0^y = \log{\left(\frac{1-y^n}{1-y}\right)}. $$ This clearly tends to $\log{n}$, using L'Hôpital, for example.
It remains to get rid of the nasty term, $$ \lim_{M \to \infty} \lim_{y \uparrow 1} \int_0^y \left( -\frac{x^{Mn}}{1-x} + n\frac{x^{Mn+n-1}}{1-x^n} \right) \, dx. $$ Taking out a factor of $x^{Mn}$, we have $$ x^{Mn} \left( \frac{nx^{n-1}}{1-x^n}-\frac{1}{1-x} \right) = x^{Mn}\frac{1}{1-x}\left(\frac{nx^{n-1}}{(1+x+\dotsb+x^{n-1})}-1\right) $$ Doing a series expansion about $x=1$ shows that in fact this is continuous in a neighbourhood of $x=1$. It is continuous elsewhere in the interval, and hence bounded above by $C$, say. Then the whole term is bounded above by $$ \int_0^1 Cx^{Mn} \, dx = \frac{C}{Mn+1} \to 0 $$ as $M \to \infty$, so the whole limit evaluates to $\log{n}$.