# regularization of sum $n \ln(n)$

I was testing out a few summation using my previous descriped methodes when i found an error in my reasoning. I'm really hoping someone could help me out.

The function which i was evaluating was $\sum_{n=1}^{\infty} n\ln(n)$ which turns out to be $-\zeta'(-1)$. This made me hope i could confirm my previous summation methode for divergent sums.

My divergent summtion methode (see previous questions) gives for every $d\geqslant2$: $$\sum_{n=1}^{\infty}f(dn)-f(n)=\sum_{n=1}^{\infty}\sum_{p=1}^{d-1} f(n)e^{ip\pi2n/d}$$ $$\sum_{k=0}^{\infty} \sum_{n=1}^{\infty}\sum_{p=1}^{d-1} -(d)^{2k} n\ln(d^kn)e^{2i\pi*pn/d}=\sum_{n=1}^{\infty} n \ln(n) \tag 1$$

Fill in $d=2$ cause that's the most easy, gives: $$\sum_{k=0}^{\infty} \sum_{n=1}^{\infty} -(2)^{2k}k n\ln(2)(-1)^n-(2)^{2k} n\ln(n)(-1)^n$$ $$\sum_{k=0}^{\infty} \sum_{n=1}^{\infty} -(4)^{k} n\ln(n)(-1)^n=\sum_{n=1}^{\infty} n\ln(n)/3(-1)^n \tag 2$$ $$\sum_{k=0}^{\infty} \sum_{n=1}^{\infty} -(2)^{2k}k n\ln(2)(-1)^n=\sum_{n=1}^{\infty} -\frac{4}{9}n\ln(2)(-1)^n= \frac{1}{9}\ln(2) \tag 3$$

equation (1)=(2)+(3) $$(\sum_{n=1}^{\infty} (-1)^n*n \ln(n)/3)+\ln(2)/9\approx 0.165421153 \tag 4$$

Now i work out $\lim_{m\to\infty} \sum_{n=1}^{m} n \ln(n)$ $$\sum_{n=1}^{m} n \ln(n)=m(m+1)\ln(m+1)/2-(m)(m+2)/4+\ln(m+1)/12+error \tag 5$$ It turns out the error is most likely $-1/6+~0.165421153$ so the value above. The fact i get an expression with the value found above is cool. Actualy i'm close but

$\textbf{[Question]}$ why the $-1/6$. Did i failed isolating a constant part in my approximation? And if so were did i fail to get it out.

Ps: since i guessed the formula, it would be nice if someone could confirm the fomula if correct (or false).

• Well orginaly i was intrested why there was another constant part -1/6. At first i beliefed ( incorrectly) that the above found estimation would be the constant part. Than i found out you can ofcours shift the general formula ( see the post of Claude Leibovici) shift the constant part. So now i need to reconsider what this constant part means and if there's a more beautiful formula were the constant part shines. And i've some ideas, because i can create a formula which includes the decreasing parts ( which goes to 0). But those are still ideas. Commented Sep 5, 2015 at 11:02
• Ps: ofcours your right about the n and m. Commented Sep 5, 2015 at 11:05
• Obviously what i did "wrong" was that i let my own found formula for the sum be "shifted" And the formula above should turn into the correct one. Commented Dec 1, 2016 at 2:32

Using the Euler-Maclaurin Sum Formula, the asymptotic expansion of $\sum\limits_{k=1}^n\log(k)k^{-s}$ is $$-\zeta'(s)+\frac{n^{1-s}\log(n)}{1-s}-\frac{n^{1-s}}{(1-s)^2}+\frac{\log(n)}{2n^s}-\frac{s\log(n)}{12n^{1+s}}+\frac{n^{-1-s}}{12}+O\!\left(\frac{\log(n)}{n^{3+s}}\right)\tag{1}$$ Setting $s=-1$ gives $$\sum_{k=1}^n\log(k)k=-\zeta'(-1)+\frac{n^2\log(n)}{2}-\frac{n^2}4+\frac{n\log(n)}2+\frac{\log(n)}{12}+\frac1{12}+O\!\left(\frac1{n^2}\right)\tag{2}$$ According to $(1)$, the error term should be $O\!\left(\frac{\log(n)}{n^2}\right)$. However, if we compute two more terms at $s=-1$, we get that the error in $(2)$ is $\sim\frac1{720n^2}$.

In any case, the formula in equation $(5)$ from the question is $$\frac{n^2\log(n)}2-\frac{n^2}4+\frac{n\log(n)}2+\frac{\log(n)}{12}+\frac14+O\!\left(\frac1{n^3}\right)\tag{3}$$ However, the correct constant term is $$-\zeta'(-1)+\frac1{12}=0.248754477\tag{4}$$ which is close to $\frac14$, but not exact.

• When i asked this question i just had some represetation of the summation. Your answer is basicaly what i found later on, thanks for it btw! But what i didn't distinguish clearly enough before was the difference between the regulized value; the constant to make the series "fit", and the constant factor $n^0$ which is part of the series itself. Commented Apr 14, 2016 at 16:11
• This is why I included formula $(1)$ for $\sum\limits_{k=1}^n\log(k)k^{-s}$. If you notice, the part that is constant with respect to $n$ is $-\zeta'(s)$. However, when $s=-1$, the $\frac{n^{-1-s}}{12}$ part also becomes constant with respect to $n$. For $s\lt-1$, that term grows with $n$, and needs to be accounted for the same as do the higher order terms. For $s\gt-1$, that term vanishes as $n\to\infty$. However, at $s=-1$, it neither gets bigger nor vanishes, it becomes an additional constant $\frac1{12}$.
– robjohn
Commented Apr 15, 2016 at 7:42
• Thanks for the additional context. I haven't used Euler-Maclaurin Sum Formula before, so i'm going to give it a shot finding it myself, that's after all how i ended up with those questions. I've however before written a sum as integral, i ended up maybe with sums of sin's. I got a gutfeeling it's in there. Commented Apr 15, 2016 at 14:05
• I apologize for not adding the link to Wikipedia. I usually include the link when citing the Sum Formula. I have added it now.
– robjohn
Commented Apr 15, 2016 at 14:24
• The $O\!\left(\frac{\log(n)}{n^{3+s}}\right)$ error term in $(1)$ is actually $\frac{s(s+1)(s+2)\log(n)-3s^2-6s-2}{720n^{3+s}}$, which for $s=-1$, turns into $\frac1{720n^2}$.
– robjohn
Commented Nov 23, 2016 at 3:37

[update 2] : the answer is based on a wrong formula; the OP has corrected his formula (1) and thus all the reasoning down to eq (4) are historical now. Possibly I should delete that answer for simply cleaning up things...

Possibly obsolete now:

I begin with that in your post

$d\geqslant2$: $$\sum_{k=0}^{\infty} \sum_{n=1}^{\infty}\sum_{p=1}^{d-1} (d^2)^{k} \ln(d^kn)e^{2i\pi*pn/d}=\sum_{n=1}^{\infty} n \ln(n)$$ Fill in $d=2$ cause that's the most easy, gives:

For $d=2$ the innermost loop resolves into one single pass, making the $e^{...}$ the factor $(-1)^n$. Shifting the $(2^2)^k$ out of the then inner loop (where it is a constant) and also separating $\ln(2^k n)$ into $(k \ln2 + \ln n)$ I get the more explicite version: $$\sum_{k=0}^{\infty}4^{k} \sum_{n=1}^{\infty} (-1)^n (\ln(n) + k\ln2) \overset{??}=\sum_{n=1}^{\infty} n \ln(n) \tag 1$$ The lhs can possibly -with arguments from the concept of divergent summation of alternating series (here Cesaro-summation would suffice)- be separated into $$\sum_{k=0}^{\infty}4^{k} \sum_{n=1}^{\infty} (-1)^n \ln(n) + \ln2\sum_{k=0}^{\infty}4^{k} k \sum_{n=1}^{\infty} (-1)^n \tag 2$$

But we have $\sum_{n=1}^{\infty} (-1)^n \ln(n) = \eta'(0) \approx 0.225791352645$, a constant. And also, $\sum_{n=1}^{\infty} (-1)^n = - \eta(0)=- \frac 12$.
So we can furtherly reduce: $$\eta'(0) \sum_{k=0}^{\infty}4^{k} - \frac 12 \ln2\sum_{k=0}^{\infty}4^{k} k \tag 3$$ and after that, using the rational expression of the geometric series I arrive at : $${ 0.225791352645 \over -3} - {\frac 12 \ln2 \cdot 4\over 9} \approx -0.229296491006 \tag 4$$

[update] On the other hand, $$\sum_{n=1}^{\infty} n \ln(n) = -\zeta'(-1) \approx 0.165421143700$$ $\qquad \qquad \qquad$ (the numerical value obtained by Pari/GP's -zeta'(-1))

so it seems, that the identity in (1) does not hold.

So possibly you (and not me...) made some algebraic error because you arrive at

Fill in $d=2$ cause that's the most easy, gives: $(\sum_{n=1}^{\infty} (-1)^n*n \ln(n)/3)+\ln(2)/9\approx 0.165421153$

where you have the cofactor $n$ in the first part and miss the $- 4\cdot \frac 12$ in the second part. (I hope I've got things correct so far...)

• Maple confirms that, outputting $-\zeta \left( 1,-1 \right) =0.1654211437$. Commented Sep 5, 2015 at 8:41
• Note that $\;\eta'(0)=\frac 12\ln\frac {\pi}2\;$ but I think there is a problem with $(4)$ since $\;\sum_{k=0}^{\infty}x^{k} k =\frac x{(x-1)^2}$ (making $\frac 19\mapsto \frac 49\cdots$ still not fitting). Commented Sep 5, 2015 at 9:01
• @Raymond: upps... I'l correct it Commented Sep 5, 2015 at 9:12
• The moment i read your post I saw I made a notation error i'll edit is asap. I forgot to write a n down in the "extention". I feel really sorry you put so much time in a mistake of mine. Commented Sep 5, 2015 at 9:28
• I missed a n $\sum_{k=0}^{\infty} \sum_{n=1}^{\infty}\sum_{p=1}^{d-1} (d^2)^{k} >n< \ln(d^kn)e^{2i\pi*pn/d}=\sum_{n=1}^{\infty} n \ln(n)$ this one i missed to type down. Again my sincere apology you put so much efford in such a simple mistake. My estimation is not too deep, so i might be off a bit. Your last calculation was perfect btw :D Commented Sep 5, 2015 at 9:31

I do not know how much this could help you; so, forgive me if I am off-topic. Considering $$S_m=\sum_{n=1}^{m} n\log(n)=\log (H(m))$$ where $$H(m)=\prod_{k=1}^m k^k$$ denotes the hyperfactorial function (defined for positive integers).

For large values of $m$, we can build asymptotics which, limited to second order, give $$S_m=m^2 \left(\frac{1}{2} \log(m)-\frac{1}{4}\right)+\frac{1}{2} m \log (m)+\left(\log (A)+\frac{1}{12} \log (m)\right)+\frac{1}{720 m^2}+O\left(\left(\frac{1}{m}\right)^3\right)$$ in which $A$ is Glaisher's constant $(\approx 1.28243)$.

As you can see, if $m$ is large, you can just forget the last term and have a very good approximation.

To give an idea, $S_{10}\approx 102.082830552$ while the above formula leads to $\approx 102.082830572$.

Edit

If I use the formula, the maximum error is obtained for $m=1$ and the error is $\approx -1.437 \times 10^{-4}$. For $m=2$, the error becomes $\approx -1.114\times 10^{-5}$; for $m=3$, the error becomes $\approx -2.327\times 10^{-6}$.

Update

After robjohn's comment, I extended the asymptotics to get $$S_m=m^2 \left(\frac{1}{2} \log(m)-\frac{1}{4}\right)+\frac{1}{2} m \log (m)+\left(\log (A)+\frac{1}{12} \log (m)\right)+\frac{1}{720 m^2}-\frac{1}{5040 m^4}+\frac{1}{10080 m^6}-\frac{1}{9504 m^8}+O\left(\frac{1}{m^{10}}\right)$$

• Your certainly on topic and my formula is nearly the same. It gives me something to google on atleast. But my constant part is different. My s10 gives a close value aswell and it might be a bit off because i just approximate them. And than i still wonder why the -1/6 shows up. Why isn't the constant equal to the regulated value. Which turns out to be Ln(A)-1/12 Commented Aug 21, 2015 at 9:41
• This is interesting ! Effectively, $\log(A)-\frac 1{12}\approx 0.1654211437$. I shall continue looking at this problem. Cheers :-) Commented Aug 21, 2015 at 10:00
• I think that nearly the same has to be explored. Commented Aug 21, 2015 at 10:12
• It's trivial that both formulas are "nearly the same" because the difference is: $\frac{6m^2+6m+1)ln(1+1/m)}{12}-m/2-3/12$ Well this goes to 0 really quick ofcours. Commented Aug 22, 2015 at 0:23
• @Gerben: note that the $-3/12 = -1/4$ is accidentally(?) equal to $\int_0^1 t \ln t dt$ which is a term which usually occurs in the Ramanujan-summation in divergent series like this as an additional leading term. And $-1/6 = -1/4 + 1/12$ ... Perhaps this has some significance to look at the MacLaurin-formula. Commented Sep 5, 2015 at 12:53

@Claude Leibovici I just found your solution, with a little bit different methode, but in the end it's the same and explains the difference in constant part to be found for a general solution.

When h goes to 0. $$\sum_{n=1}^m n^{s+h}= \sum_{n=1}^m (n^s ( 1+h\ln(n))$$ $$\sum_{n=1}^m n^{s+h}=\sum_{i=0}^{\infty} a_{s,i} m^{s+1+h-i}$$ At s=1 $$\sum_{n=1}^m n^{1}= m^2/2+m/2+m^0/12+...-1/12$$

The whole point i missed at first was the $$m^0$$.

$$\sum_{n=1}^m n^{1+h}= m^{2+h}/(2+h)+m^{1+h}/2+m^h*(h+1)/(12)+...+\zeta(-1-h)$$ $$\sum_{n=1}^m n\ln(n)= m^2/2\ln(m)-m^2/4 ＋m/2\ln(m)+1/12ln(n) +(m^0)/12+ ... -\zeta' (-1)$$ This $$\zeta'(-1)$$ is like said before $$1/12-ln(A)$$.

so we get $$-1/12+ln(A)$$ as the new constant ( and the answer of the regularization of the summation) and the $$m^0/12$$ is part of the function itself. This is were i got confused in the start. Thanks for all the help, this example helped me a lot.