Solution (source code)

= Solution

Let $x_i$ be the number of objects in box $i$. The arrangements correspond exactly to nonnegative <integer> solutions of $x_1+\cdots+x_k=n$. By <stars and bars>, place $n$ stars and $k-1$ separating bars in a row. The number of stars between consecutive bars records the occupancy of each distinguishable box, with adjacent bars allowing an empty box. Choosing the bar positions gives
$$
\boxed{\binom{n+k-1}{k-1}}\qquad(k\geq1).
$$