Do you know the 'little book'MATHEMATICS OF CHOICEby Ivan Niven?

There is a very nice discussion of this topic in that book.

I have programmed MathCad to produce a table of partitioning an integer N into k or fewer summands. The recursion used is similar to the one you posted.