Number of ways to put N indistinct objects into M indistinct boxes

Could anyone please tell me if there is a way to know the number of ways to put N indistinct objects into M indistinct boxes?

I already know how to calculate the number of ways if any or both objects and boxes are distinct.

I've been trying to solve this for a while. My first idea was to consider the number of ways to put N indistinct objects in M distinct boxes, which is ${{m+n-1}\choose{n}}$. And then divide it by the number of permutations of every possible distribution, which I thought was $n!$. But it seems not every possible distribution has exactly $n!$ permutations, so this train of thought doesn't seem to work.

Any ideas? Thanks!

-

You’re looking for $P(n,k)$, the number of partitions of $n$ into $m$ parts; there is no nice closed expression for this number. Formula $(59)$ here gives the recurrence
$$P(n,m)=P(n-1,m-1)+P(n-m,m)\;.$$
This isn’t hard to derive. If a partition of $n$ into $m$ parts has a part of size $1$, it comes from a partition of $n-1$ into $m-1$ parts by adding a part of size $1$. Otherwise, it comes from a partition of $n-m$ into $m$ parts by adding $1$ to each part. The initial conditions are $P(n,m)=0$ for $m>n$, $P(n,n)=1$, and $P(n,0)=0$ for $n>0$.