Given an integer $n >0$, how many ways can we express $n$ as the sum of three natural numbers $n_1,n_2,n_3$ ?
|
|
Judging by the comments and other answer I think I might be missing out on something. yet- This might still be right, so I post this answer, please let me know if I'm horribly wrong :-) I think we this question can be reformulated in the following manner: Suppose we have $n+2$ balls, $n$ of which are white, and the other two are black. Now, each different way in which you order the $n+2$ balls gives you a different partition of $n$ in to $3$ natural numbers ($0$ included)- just count how many white balls are between any two black ones. Moreover- any partition of $n$ to naturals $n_1+n_2+n_3=n$, can be visualized as an ordering of the above $n+2$ balls: Just put the first $n_1$ white balls in a row, followed by a black one, then the next $n_2$ white balls, followed by a black one and then the last $n_3$ white ones. So the question reduces to how many ways can you arrage $n$ white balls, and two black ones in a row- This is easily seen to be $\binom{n+2}{2}$. (once the positions for the two black ones has been set, the partition is determined) |
|||||||||
|
|
I mistakenly assumed that you wanted $n_1,n_2,n_3 > 0$, so the following answer is not correct. I won't remove it, since I think it might still be interesting. It's the number of lattice points in the interior of a dilation of the standard 2-simplex. Then, using a change of basis, this can be changed into the question of how many lattice points lie inside 2D triangle, which can be found using pick's theorem. |
||||
|
|
I hope I understood you correctly, here is my try $$f(n) = \begin{cases} (0,0,0), & n=0 \\ (0,0,1), & n=1 \\ (0,0,2), & n=2 \\ \Big(\frac{n-a}{3},\frac{n-a}{3},\frac{n-a}{3}+a\Big), & n>2 \end{cases}$$ Here $n\equiv a\mod 3$. Also, there are $\tbinom{3 + n - 1}{n}$ ways, by http://en.wikipedia.org/wiki/Stars_and_bars_%28probability%29 |
|||
|
|