9

It is known that

lim

where \left\{ x\right\} is the fractional part of x and \gamma is the Euler constant. Let f(x)=\min\left(\left\{ x\right\} ,1-\left\{ x\right\} \right). Do we have

\lim_{n\rightarrow\infty}\frac{1}{n}\sum_{k=1}^{n}f\left(\frac{n}{k}\right)=\log\left(\frac{4}{\pi}\right)=0.2415644752...?

the “alternating Euler constant” (cf. https://oeis.org/A094640)? For instance I get for n=10^{8}

\frac{1}{n}\sum_{k=1}^{n}f\left(\frac{n}{k}\right)=0.2415641681...

And if this is the case can we hope that

\sum_{k=1}^{n}f\left(\frac{n}{k}\right)=\log\left(\frac{4}{\pi}\right)n+O\left( n^{1/2}\right)? which seems reasonable when carrying out numerical tests.

\endgroup
2
  • \begingroup Have you followed the links and references at that OEIS page? \endgroup Commented Apr 4 at 22:07
  • \begingroup Yes but unless I missed something, I didn't see this limit appear. \endgroup
    –  Babar
    Commented Apr 5 at 5:21

2 Answers 2

16
\begingroup

The conjecture is true. For t\in[0,1], let N(t) be the number of k\in\{1,2,\dotsc,n\} satisfying \{n/k\}<t. On the one hand, \sum_{k=1}^n f\left(\frac{n}{k}\right)=\int_0^{1/2}\bigl(N(t+1/2)-N(t)\bigr)\,dt. On the other hand, for any positive integer M, N(t)=\sum_{m=1}^\infty\left(\biggl\lfloor\frac{n}{m}\biggr\rfloor-\biggl\lfloor\frac{n}{m+t}\biggr\rfloor\right)=\sum_{m=1}^M\left(\frac{n}{m}-\frac{n}{m+t}\right)+O\left(M+\frac{n}{M}\right). It follows that \begin{align*} \sum_{k=1}^n f\left(\frac{n}{k}\right) &=\sum_{m=1}^M\int_0^{1/2}\left(\frac{n}{m+t}-\frac{n}{m+t+1/2}\right)\,dt+O\left(M+\frac{n}{M}\right)\\ &=\sum_{m=1}^M n\log\left(\frac{(2m+1)^2}{(2m)(2m+2)}\right)+O\left(M+\frac{n}{M}\right)\\ &=n\log\left(\prod_{m=1}^M\frac{(2m+1)^2}{(2m)(2m+2)}\right)+O\left(M+\frac{n}{M}\right). \end{align*} By Wallis's product, \prod_{m=1}^\infty\frac{(2m+1)^2}{(2m)(2m+2)}=\frac{4}{\pi}, hence also \prod_{m=1}^M\frac{(2m+1)^2}{(2m)(2m+2)}=\frac{4}{\pi}\prod_{m=M+1}^\infty\frac{(2m)(2m+2)}{(2m+1)^2}=\frac{4}{\pi}\left(1+O\left(\frac{1}{M}\right)\right). Taking the logarithm of both sides, and going back to the k-sum, \sum_{k=1}^n f\left(\frac{n}{k}\right)=n\log\left(\frac{4}{\pi}\right)+O\left(M+\frac{n}{M}\right). Finally, we choose M=\lfloor\sqrt{n}\rfloor to conclude that \sum_{k=1}^n f\left(\frac{n}{k}\right)=n\log\left(\frac{4}{\pi}\right)+O\left(\sqrt{n}\right).

\endgroup
1
  • 1
    \begingroup Thanks again! Great answer. In the meantime, I think I managed to find the limit by writing f(x)=\frac{1-\left|2\left\{ {x}\right\} -1\right|}{2} and using after justification (to be rigorously demonstrated) \lim_{n\rightarrow\infty}\frac{1}{n}\sum_{k=1}^{n}f\left(\frac{n}{k }\right)=\int_{0} ^{1}f(1/t)dt with change of variable u=1/t and splitting the integral over the intervals ]k,k+1] . But that doesn't give the error term.... \endgroup
    –  Babar
    Commented Apr 5 at 5:43
2
\begingroup

Here are more details on my comment. Let's admit that we have (1)\,\,\,\, \lim_{n\rightarrow\infty}\frac{1}{n}\sum_{k=1}^{n}f\left(\frac{n}{k}\right)=\int_{0}^ {1}f\left(\frac{1}{t}\right)dt

Since f(x)=\frac{1}{2}\left(1-\left|2\left\{ x\right\} -1\right|\right) we have

\int_{0}^{1}f\left(\frac{1}{t}\right)dt=\int_{1}^{\infty}f(u)\frac{du}{u^{2 }}=\frac{1}{2}\sum_{k=1}^{\infty}\int_{k}^{k+1}\left(1-\left|2(u-k)-1\right |\right)\frac{du}{u^{2}}

=\frac{1}{2}\sum_{k=1}^{\infty}\left(\frac{1}{k}-\frac{1}{k+1}+\int_{k}^ {k+1/2}\left(2u-2k-1\right)\frac{du}{u^{2}}-\int_{k+1/2}^{k+1}\left(2u -2k-1\right)\frac{du}{u^{2}}\right)

=\frac{1}{2}\sum_{k=1}^{\infty}\left(\frac{1}{k}-\frac{1}{k+1}-\frac{1}{ k}-2\log\left(\frac{k}{k+1/2}\right)+\frac{1}{k+1}-2\log\left(\frac{k+1}{ k+1/2}\right)\right)

=\log\left(\prod_{k=1}^{\infty}\frac{(k+1/2)^{2}}{k(k+1)}\right)=\log\left( \frac{4}{\pi}\right)

\endgroup

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .