# Approximating a weird sum

How can I approximate the sum$$\sum_{k=1}^n \left(\frac{2k}{n} \left\lceil \frac{n}{k} \right\rceil \left\{ \frac{n}{k} \right\}-1\right)$$ where $\{x\}$ is the fractional part function, and $\lceil x\rceil$ is the ceiling function.

I know that if I divide by $n$ and let $n\to\infty$, it's equal to $0$. At first I thought the sum might be of the order $n^a$, but now I think it could be logarithmic. The partial sums are really weird. I would appreciate any help on giving an approximate value to the sum.

-
I was checking numerically the values for $n\leq 1000$. Looking at the number they seem to be rather spread (both positive and negative and of different magnitude). Given that I am not sure the an approximation in terms of a smooth function does in fact exist. – Fabian Dec 26 '12 at 8:23
Damnet, it would be really helpful if I had one lol – Ethan Dec 26 '12 at 8:24
@Ethan So, did you ever figure out a better approximation? – Alexander Gruber Apr 26 '13 at 1:37
@AlexanderGruber No I sort of gave up on this a while ago, it doesn't really matter to me anymore, but just looking at it now, I would say application of the dirichlet hyperbola method, would probably give me an ok estimate. – Ethan Apr 27 '13 at 2:18

An observation: let $\rm f(n)=\sum_{k=1}^n \left(\frac{2k}{n} \left\lceil \frac{n}{k} \right\rceil \left\{ \frac{n}{k} \right\}-1\right)$ and $\rm \mu(n)$ be the mean of $\rm f(1),\ldots,f(n)$. Then $\rm \mu(n)$ is logarithmic:
so you could probably come up with a numerical estimate for a bound as a function of $\rm n$ pretty easily, though it appears that $\rm f$ is unbounded as $\rm n\rightarrow\infty$.