Summation of fractional parts $\frac{m}{n}$, where $2 \leq n < m$ (amateur)

194 Views Asked by At

I am looking for the result of the sum of the fractional part of the following number:

$$f(m):=\sum_{n=2}^{m-1}Frac\left(\frac{m}{n}\right)$$

After some research I have found $2$ possible solutions:

  1. A series representations seen here http://functions.wolfram.com/04.05.06.0002.01

and

  1. Another form seen here Attachment 1

What would $\displaystyle\frac{f(m)}{f(m-1)}$ equal to as a function of $m$?

Edit:

Maybe also interesting is that the graph of the function spikes up when m is prime.

My conclusion is that f(m) is larger for primes as the sum contains no 0's. A 0 would appear only in a compound number thus making the sum relatively smaller.

Graph attached. f(m)/f(m-1)

1

There are 1 best solutions below

2
On

We have, with some manipolations, $$ \sum_{n=2}^{m-1}\left\{ \frac{m}{n}\right\} =m\sum_{n=2}^{m-1}\frac{1}{n}-\sum_{n=2}^{m-1}\left\lfloor \frac{m}{n}\right\rfloor =m\left(H_{m-1}-1\right)-\sum_{n=1}^{m}\left\lfloor \frac{m}{n}\right\rfloor +m+1=$$ $$=mH_{m-1}-D\left(m\right)+1$$ where $H_{m-1}$ is the $m-1 $-th harmonic number and $D\left(m\right)$ is the divisor summatory function, and we can evaluate it (using, for example, the Dirichlet hyperbola method) $$D\left(m\right)=m\log\left(m\right)+m\left(2\gamma-1\right)+O\left(\sqrt{m}\right)$$ and so, using the well known estimation for the harmonic numbers $$H_{n}=\log\left(n\right)+\gamma+O\left(\frac{1}{n}\right)$$ we have $$\sum_{n=2}^{m-1}\left\{ \frac{m}{n}\right\} =m\left(\log\left(1-\frac{1}{m}\right)+1-\gamma\right)+O\left(\sqrt{m}\right).$$