3. In how many ways can the number $6 k(k \in \mathbb{N})$ be written as the sum of three natural numbers? Records that differ only in the order of the addends are considered the same.
Solution. Let $6 k=x_{1}+x_{2}+x_{3}$, where $x_{1}, x_{2}, x_{3}$ are natural numbers such that $x_{1} \leq x_{2} \leq x_{3}$. If $x_{1}=2 l-1$, where $1 \leq l \leq k$, then $x_{2}$ can be equal to one of the numbers

$$
2 l-1,2 l, 2 l+1, \ldots,\left[\frac{6 k-2 l+1}{2}\right]=3 k-l
$$

and for each of these $3 k-3 l+2$ possibilities, the number $x_{3}$ is equal to $6 k-x_{1}-x_{2}$. If $x_{1}=2 l$, where $1 \leq l \leq k$, then $x_{2}$ is equal to one of the numbers

$$
2 l, 2 l+1, \ldots, 3 k-l
$$

and for each of these possibilities, the number $x_{3}$ is uniquely determined. Therefore, the desired number is equal to

$$
\sum_{l=1}^{k}(3 k-3 l+2)+\sum_{l=1}^{k}(3 k-3 l+1)=\sum_{l=1}^{k}(6 k-6 l+3)=k(6 k+3)-6 \frac{k(k+1)}{2}=3 k^{2}
$$