5. How many five-digit natural numbers are there in which all digits are different, and among which the digits 1 and 2 appear in adjacent decimal places?

The use of a pocket calculator or any reference materials is not allowed.

# Ministry of Science and Education of the Republic of Croatia Agency for Education and Education Croatian Mathematical Society 

COUNTY COMPETITION IN MATHEMATICS February 26, 2024. 6th grade - elementary school

Each task is worth 10 points. In addition to the final result, the process is also graded. To earn all points, it is necessary to find all solutions, determine that there are no others, document the process, and justify your conclusions.
5. How many five-digit natural numbers have all different digits, and among them, the digits 1 and 2 appear in adjacent decimal places?

## Solution.

If the digits 1 and 2 are the first two digits, the numbers are of the form $\overline{12 a b c}$ or $\overline{21 a b c}$.

We can choose the digit $a$ from the set $\{0,3,4,5,6,7,8,9\}$ in 8 different ways, the digit $b$ in 7 ways, and the digit $c$ in 6 ways, so we have a total of $2 \cdot 8 \cdot 7 \cdot 6=672$ numbers.

If the digits 1 and 2 are in the second and third positions, the numbers are of the form $\overline{d 12 e f}$ or $\overline{d 21 e f}$.

We can choose the digit $d$ from the set $\{3,4,5,6,7,8,9\}$ in 7 different ways since zero cannot be the first digit, the digit $e$ in 7 ways as it can be zero, and the digit $f$ in 6 ways, so we have a total of $2 \cdot 7 \cdot 7 \cdot 6=588$ numbers.

If the digits 1 and 2 are in the third and fourth positions, or in the fourth and fifth positions, we also have 588 numbers.

1 POINT

$672+3 \cdot 588=2436$

There are a total of 2436 numbers.

## COUNTY COMPETITION IN MATHEMATICS