Problem 4. A 10-digit natural number is called dichisit if its digits belong to the set $\{1,2,3\}$ and any two consecutive digits differ by 1.

a) Show that a dichisit number contains exactly five 2s in its representation.

b) Determine how many dichisit numbers exist.

c) Prove that the sum of all dichisit numbers is divisible by 1408.
## Solution.

a) In writing a split number, even digits alternate with odd ones. Since the numbers have 10 digits, they will contain exactly five even digits, thus exactly five of $2 . \ldots \ldots \ldots \ldots \ldots$.

b) There are $2 \cdot 2 \cdot 2 \cdot 2 \cdot 2=32$ split numbers of the form $\overline{2 a 2 b 2 c 2 d 2 e}$ and $2 \cdot 2 \cdot 2 \cdot 2 \cdot 2=32$ numbers of the form $\overline{a 2 b 2 c 2 d 2 e 2}$. In total, there are 64 split numbers.

c) If the number $\overline{a_{1} a_{2} \ldots a_{10}}$ is split, then the number $\overline{\left(4-a_{1}\right)\left(4-a_{2}\right) \ldots\left(4-a_{10}\right)}$ is also split and distinct from the first. The sum of these two numbers is 4444444444 . . . . 2 p Group the split numbers into 32 such pairs. Therefore, the sum of all the numbers is $32 \cdot 4444444444=2^{7} \cdot 11 \cdot 101010101=1408 \cdot 101010101 \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots \ldots 2$ p