2. How many 100-digit natural numbers are there in whose decimal representation only odd digits appear, such that the difference between any two adjacent digits is equal to $2$?
2. Let $x_{k}(n)$ denote the sequence of $n$-digit numbers whose first digit is $k$ and any two adjacent digits differ by 2. Each such number is obtained by adding the digit $k$ to the left of an $(n-1)$-digit number whose first digit is $k-2$ or $k+2$ (if they are valid digits), so we have $x_{k}(n)=x_{k-2}(n-1)+x_{k+2}(n-1)$, with the definitions $x_{-1}(n)=x_{11}(n)=0$ and $x_{1}(1)=x_{3}(1)=x_{5}(1)=x_{7}(1)=$ $x_{9}(1)=1$. By induction, it is easy to show that $x_{1}(n)=x_{9}(n)$ and $x_{3}(n)=x_{7}(n)$ for all $n$. Let $a_{n}=x_{1}(n), b_{n}=x_{3}(n)$, and $c_{n}=x_{5}(n)$. From the above, we have

$$
a_{1}=b_{1}=c_{1}=1 \quad \text{and} \quad a_{n+1}=b_{n}, \quad b_{n+1}=a_{n}+c_{n}, \quad c_{n+1}=2 b_{n}.
$$

From this, we have $a_{n+1}=b_{n}=a_{n-1}+2 b_{n-2}=3 a_{n-1}$ and similarly $b_{n+1}=3 b_{n-1}$ and $c_{n+1}=$ $3 c_{n-1}$. Now, from $a_{2}=1$ and $b_{2}=c_{2}=2$, it follows that $a_{100}=3^{49}$ and $b_{100}=c_{100}=2 \cdot 3^{49}$.

The total number of such numbers is $2 a_{100}+2 b_{100}+c_{100}=8 \cdot 3^{49}$.