Sum of Floor Series

32 Views Asked by At

I've been messing around with the floor function, and I am seeking to find a closed form of: $$ \sum^n_{i=1}\left\lfloor\frac{n}{i}\right\rfloor $$ , or is there even one? For reference, $n$ is an integer. I remember reading something about how this relates to the factors of $n$. I also reckon I'd need the gcd, but by just looking at the question I'm unsure how it could be related to. Any help or hints would be extremely useful.