TITLE: What is the expression for putting $n$ indistinguishable balls into $k$ indistinguishable cells?
QUESTION [6 upvotes]: I'm looking for the expressions for the number of ways in which $n$ indistinguishable balls can be placed into $k$ indistinguishable cells, with

No cell being empty
Some cells being empty

I knew I've read it (in Applied Combinatorics by Fred Roberts), but unfortunately, I don't happen to have access to it anymore. I would be grateful if someone could help me remember it!

REPLY [2 votes]: According to the comments, it appears that what you're discussing are partitions of an integer.  
There isn't a really "nice" way of explicitly computing these, but we have published a blog post that presents a somewhat simple technique using memoization; specifically, Euler's Pentagonal Formula.  This was written by Paramanand Singh and may be found here.
If you want an asymptotic approximation, there is the Hardy-Ramanujan formula:
$$p(n) \sim \frac{1}{4n\sqrt 3}\exp\left(2\pi\sqrt{n/6}\right)$$