Number of integer $k$-tuples with sum $n$?

219 Views Asked by At

I wish to know how many elements are there in the set $$ S_{n,k} = \left\{(n_1,\ldots, n_k): \forall i,n_i \in \mathbb Z, n_i \geq 0, \sum_i n_i = n\right\}. $$

It appears to me that we have a simple formula for $|S_{n,k}|$ presumably in terms of binomial coefficients, but I find it hard to come up with that.

At least for $k=3,$ we have the simple expression $|S_{n,k}| = \frac12 (n+1)(n+2)$, and this is very easy to derive. But after this point, the sums gets very complicated.

1

There are 1 best solutions below

0
On

We wish to put $k-1$ bars among $n$ stars. The number of ways to do this is simply $$ {n+k-1 \choose k-1}. $$