Suppose I have an integer, $m$, and another integer, $n$, then is there a way of working out how many numbers of length $n$ exist such that the sum of their individual digits is $m$?
Another way of thinking of this is how many ways are there of placing $m$ balls in a row of n buckets such that the first bucket is not empty and no bucket has more than $9$ balls.
Is there an explicit function that takes in the arguements $m$ and $n$ and outputs the answer or will an algorithm have to be implemented?
Thanks in advance