Partitions of integers with finite uses in combinatorics

42 Views Asked by At

I've done some research into partitions and am yet to find any resources to understand the following:

Given a number $n$ and the restrictions that:

  • Using only the numbers $1, 2, ..., m$;
  • A maximum of $p$ times per number.

How many ways are there to add together these numbers to be less than or equal to $n$.

As an example using $n = 5, m = 3,$ and $p = 2$.

You can find:

  • $1$
  • $1 + 1, 2$
  • $2 + 1, 3$ (not $1 + 1 + 1$)
  • $2 + 1 + 1, 2 + 2, 3 + 1$
  • $3 + 1 + 1, 2 + 2 + 1, 3 + 2$

so the answer here would be $1 + 2 + 2 + 3 + 3 = 11$

If someone could point me in the right direction, that would be very helpful.

Thanks.