Ways to sum to $n$ with $m$ integers that are $\le k$ Given three natural numbers $n$, $m$ and $k$, how many ways are there to write $n$ as the sum of $m$ natural numbers in the set $\{0, 1, \ldots, k\}$, where order does matter?
I've seen the "Ways to sum $n$ with $k$ numbers", but never where the different numbers are restricted by an upper bound.
I'm not even sure how to proceed with this question. I have a python script to calculate this (in essence, it tries the $(k+1)^m$ possible sums, computes them, and returns the number of sums whose result is $n$). I do have some recurrence equations, but I'm almost 100% sure they don't help that much. By fixing the first number of the sum to be $0, 1, \ldots, k$, and writing $P(n, m, k)$ as the solution of the problem:
P(n, m, k) = P(n,     m - 1, k) + # If the first number is 0
             P(n - 1, m - 1, k) + # If the first number is 1
             ...
             P(n - k, m - 1, k) + # If the first number is k

and
P(n, 1, k) = 0 if n > k
             1 if n <= k

Can this be solved in a more elegant way than brute force?

It is not exactly what you want, but it is at least related:
OEIS A048887: Array T read by antidiagonals, where T(m,n) = number of compositions of n into parts <= m
What is missing is the condition that only those compositions are counted, which consist of exactly $m$ numbers, the above counts all.
So it could at least serve as an upper boundary. 
BTW I wondered how the Online Encyclopedia of Integer Series handles multidimensional series, that is an answer: a series in two dimensions is given in (anti-) diagonal enumeration.
