[ Combinations and Permutations ]  [ Arithmetic progression $]

How many different ways can a natural number $n$ be decomposed into the sum of three natural addends? Two decompositions that differ only in the order of the addends are considered different.

#
The first method. Let $n=x+y+z$. The number $x$ can be $1,2,3, \ldots, n-2$. For a fixed $x$, the number $y$ can take one of

$n-x-1$ values. In total, we get $(n-2)+(n-3)+\ldots+1=1 / 2(n-1)(n-2)$ variants.

The second method. Write $n$ as a sum of ones: $n=1+1+\ldots+1$. Among the $n-1$ plus signs, we need to choose two: the ones that stand before the first chosen plus sign, in sum, give the number $x$, and those that stand after the second plus sign, give the number $z$. In total, we get $C_{n-1}^{2}$ variants.

## Answer

$1 / 2(n-1)(n-2)$ ways.