# Thread: Closed form for Partial Sum of a Floor Function

1. ## Closed form for Partial Sum of a Floor Function

Hello, I was wondering if there is a way to calculate a closed form for the partial sum of a floor function. By closed form, I mean something analog to $\sum\limits_{k=1}^{n} k = \frac{n(n+1)}{2}$
ex.

$\sum\limits_{k=1}^{n} \lfloor\frac{60}{k}\rfloor = ?$

Motivation
Started with the simple problem that if I have an alarm clock that displays hours and minutes, how many combinations are possible such that the number of minutes is a non-zero multiple of the hour value. ex. 12:48 is one such time as 48 is a non-zero multiple of 12.

Found that my sum would be:
$\sum\limits_{k=1}^{12} \lfloor\frac{60}{k}\rfloor$ minus the cases where k evenly divides 60 per term. (as to exclude the invalid case of 12:60, etc.)

Wanted to know if there was a way to calculate, without loss of generality, given integers $k \leq K, l, M$ how many coordinate pairs $(k,lk)$ there are such that $lk < M, lk \neq 0$
or would you say this would simply be done by brute force using a computer algorithm?

Also, if there are general theorems or resources to look at for summation for floor/ceiling functions, this will also be acceptable as a response.