First of all, my question is very similiar to this one: How many numbers between $100$ and $900$ have sum of their digits equal to $15$? but i didn't quite understand how to adapt it to my problem, so heres my problem:
Let's say i have a digit system with the basis 15 and 4 available digits. How many numbers are there between 0000 and FFFF where the sum of the digits equals 15. I'm not only interested in the answer, but also how to get there.
If the sum of the digits adds up to 15 and each digit can go up to 15 (so we don't have to worry about any upper limits) and we have 4 digits to work with, the problem can be solved with a stars and bars approach I believe.
Imagine, say, 15 stones laid in a row and three dividers. Wherever the dividers are will separate the stones into numbers for each digits and the sum of the digits will always be 15. And we are arranging 18 objects (15 stones plus 3 dividers). So the solution is $${18\choose15}=816$$
ETA: For example:$$***************|||=F000\\***|***|***|******=3336$$