Solution. According to the condition of the problem, it is necessary to find the number of all four-digit numbers $\overline{a b c d}$, where $a=1$ or $a=2, a, b, c, d \in\{1,2,3,4,5\}$, i.e., it is sufficient to find the number of all three-digit numbers $\overline{b c d}$, where $b, c, d \in$ $\{1,2,3,4,5\}$ in both cases.

a) The number of all three-digit numbers from the digits $1,2,3,4,5$ where the repetition of digits is allowed, coincides with the number $V_{5}^{3}$ of all variations with repetition of class 3 over a set of 5 elements. This number is $V_{5}^{3}=5^{3}$, so there are exactly $2 \cdot 5^{3}=250$ natural numbers with the required property.

b) If the repetition of digits is not allowed, then the number of all three-digit numbers from the digits $2,3,4,5(1,3,4,5)$ is equal to $\binom{4}{3} 3!=4$!. Therefore, the required number is $2 \cdot 4!=48$.
1. How many natural numbers between 1000 and 3000 can be formed from the digits $1,2,3,4,5$ if:

a) repetition of digits is allowed;

b) repetition of digits is not allowed?