Is there something between summation and integration?

Let’s take a general function $f(x)$, we can do a summation like:

And we can do an integration like:

The basic difference between the two operation is that the first concerns only integer values of $k$ while the second is about real values of the function in an interval. So my question is: is there a similar operation that concerns rational values ? Something “between” summation and integration.

The short answer is yes, but it is not a very easy concept. The answer lies with the definition of the integral and measures. The idea of a measure is to assign a size to subsets of the reals, and use this idea of size to perform integration (among other things). The first thing to note is that there are different ways to assign a measure to subsets of the reals. Some measures behave the way that you would expect them to in that the size of the interval $(a,b)$ is $b-a$, regardless of what $a$ and $b$ are. Other measures behave differently. For example, you could say that the measure of a set is the number of integers contained therein. Under this definition of a measure, summation and integration become the same thing. We could also define a measure which heeds only rational numbers and perform integration with respect to that measure.