Number of solutions for $x[1] + x[2] + \ldots + x[n] =k$ Omg this is driving me crazy seriously, it's a subproblem for a bigger problem, and i'm stuck on it.
Anyways i need the number of ways to pick $x[1]$ ammount of objects type $1$, $x[2]$ ammount of objects type $2$, $x[3]$ ammounts of objects type $3$ etc etc such that $$x[1] + x[2] + \ldots x[n] = k\;.$$ Order of the objects of course doesn't matter.
I know there is a simple formula for this something like $\binom{k + n}n$ or something like that i just can't find it anywhere on google.

This is a so-called stars-and-bars problem; the number that you want is
$$\binom{n+k-1}{n-1}=\binom{n+k-1}k\;.$$
The linked article has a reasonably good explanation of the reasoning behind the formula.
