I have $N$ indistinguishable objects and $K$ distinguishable boxes and I need to calculate ways how i can put this objects to boxes that no box has more than $X$ and not less than $Y$ objects.
I found topic How many ways to distribute $n$ objects into $r$ boxes so that each box have at least $1$ (but no more than $k$) objects? with recurrent formula but it's too slow and takes too much time with not little numbers.
Is there another way to calculate it?