My goal is to find the coefficients of the generating function for the following situation:
The number $f(n)$ is the sum over all compositions of $n$ into $3$ parts of the product of those parts. Fo instance, if $n=5$, it can be written as sums of three integers in six ways: $$1+3+1, 3+1+1, 1+1+3, 2+2+1, 2+1+2, 1+2+2.$$
Taking the sum of the products of these groups, we get a number for $f(5)$: $$3+3+3+4+4+4 = 21.$$
I need to find a formula for these numbers. I've solved a few by brute force and I determined that they are the numbers in the 6th diagonal of Pascal's triangle, but I don't want to put that as an explanation. Is there an easy way to do this with generating functions? I would assume that is what is expected of me.
Any insight would be appreciated.
Thanks very much!
Edit: The number of parts is always three, and yes, these are compositions, not partitions. I apologize for any confusion.