Every now and then I get interested in trying to find a discussion on the combinatorial problem of how many numbers of n digits or less has a digit sum less than m

namely $\left|\left\{k\in\mathbb{Z}| 0\le k < 10^n\, and\,\, f(n)\le m \right\} \right|$ where $f(k) = \sum_{i=0}^\infty k_j$ given that $k_j\in\mathbb{Z}$ satisfy $k = \sum_{i=0}^\infty k_j10^j$ and $0 \le k_j \le 9$.

It's easy to see this is just the number or integral co-ordinates contained with in a particular *corner* of an n-dimensional hybercube so it will involve the mixture of sums of consecutives to some power. But I believe this simplifies in some way.

I seem to recall that there's a solution of to this problem in the form of $\sum_{j=0}^n g(j)$ where g is some closed form expression and n is the number of dimensions/digits. But what I'm hoping to find is a discussion of this problem and approaches to solving it.

Any direction you can recommend is most appreciated. Preferably an online discussion.

Many thanks