Find number of solutions for equation: $~x+y+z=n~$ where $~x,~y,~z~$ are non-negative whole numbers and $~x\le y\le z~$.
First I used substitution $~y=x+k,~ z=y+k~$ where $~k\ge 0~$(that is $y=x+k, z=x+2k$). Then after I plug that into equation I got, $~3x+3k=n~$. Then after using generating functions I get $~(1-t^3)^{-2}~$ or $~\sum\limits_{n\ge 0}{n+1\choose n} t^{3n}~$. Is this correct?