## Task 12/86

For how many natural numbers $n=\sum_{i=0}^{3} 10^{i} a_{i}$, with $a_{i} \in N ; 1 \leq a_{3} \leq 9 ; 0 \leq a_{0} ; a_{1} ; a_{2} \leq 9$ does $a_{i} \leq a_{j}$ hold for $i<j$?
We first investigate how many such numbers exist for $a_{2}=k$ $(k \in N, 0 \leq k \leq 9)$. Clearly, $a_{1}$ can be assigned $k+1$ values (including zero); for each of these assignments, there are $a_{1}+1$ assignments for $a_{0}$. Therefore, the number of three-digit numbers with $a_{2}=k$ that satisfy the given condition is

$$
\sum_{a_{1}=0}^{k}\left(a_{1}+1\right)=\frac{1}{2}(k+2)(k+1)=\frac{1}{2}\left(k^{2}+3 k+2\right)
$$

Since $a_{3}$ can be chosen in $10-k$ different ways and each of these can be combined with each choice of $k$, the total number is

$$
\sum_{k=0}^{9}(10-k) \cdot \frac{1}{2} \cdot\left(k^{2}+3 k+2\right)=\sum_{k=0}^{9} \frac{1}{2}\left(-k^{3}+7 k^{2}+28 k+20\right)=715
$$

This total includes $n=0000$. If we exclude this number as not being a four-digit number, the total number of possible numbers $n$ is only 714.