Saturday 14 September 2013

convergence divergence - Why does this sum converge: $sum_{k=2}^{n-1} frac{1}{k} frac{n mod k}{n}$



I was playing around with numbers and wanted to create a function that somehow indicates if a number could be a prime. So I came up with this, with the intention that it should make small jumps if $x$ is a prime number:




$$f(n) = \sum_{k=2}^{n-1}\frac{1}{k}\frac{n\mod k}{n}$$



It inneed does small jumps at small primes, but in general the term seems to converge to something close around $0.422780$.



Why is this? I would expect this sum to grow without bounds, as for a large number $N$, there should be a lot of numbers which do not divide $N$ without remainder.



f(n) in the range 0 to 1000


Answer



We have $n\pmod{k}= k\{n/k\}$ where $\{x\}$ is the fractional part of $x$.
Hence we are interested in the behaviour of the sort-of-average-value
$$ f(n)=\frac{1}{n}\sum_{k=2}^{n-1}\{n/k\} $$

which as $n\to \infty$, by Riemann sums, converges to
$$ I = \int_{0}^{1}\left\{\frac{1}{x}\right\}\,dx \stackrel{x\mapsto 1/x}{=} \int_{1}^{+\infty}\frac{\{x\}}{x^2}\,dx = \sum_{m\geq 1}\int_{0}^{1}\frac{x}{(x+m)^2}\,dx $$
which equals
$$\begin{eqnarray*} &&\sum_{m\geq 1}\left(\log(m+1)-\log(m)-\frac{1}{m+1}\right)\\ &=& \underbrace{\sum_{m\geq 1}\left(\frac{1}{m}-\frac{1}{m+1}\right)}_{1}-\underbrace{\sum_{m\geq 1}\left(\frac{1}{m}-\log\left(1+\frac{1}{m}\right)\right)}_{\gamma}\end{eqnarray*}$$
i.e. $\color{red}{1-\gamma}\approx 0.422784335$ as claimed by Daniel Fischer.


No comments:

Post a Comment

real analysis - How to find $lim_{hrightarrow 0}frac{sin(ha)}{h}$

How to find $\lim_{h\rightarrow 0}\frac{\sin(ha)}{h}$ without lhopital rule? I know when I use lhopital I easy get $$ \lim_{h\rightarrow 0}...