24. Find the number of 7-digit integers formed by some or all of the five digits, namely, $0,1,2,3$, and 4 , such that these integers contain none of the three blocks 22,33 and 44 .
24. Ans: 29776

Let an denote the number of such 1 -digit integers. Among these $a_{n}$ integers, let $b_{n}$ denote the number of those which end with 2 . By symmetry, the number of those which end with 3 (or 4 ) is also equal to $b_{n}$. Hence
$$
\begin{array}{l}
a_{n}=\underbrace{2 a_{n-1}}_{\text {end with } 0 \text { or } 1}+\underbrace{3 b_{n}}_{\text {end with } 2,3} \text { or } 4 \\
b_{n}=\underbrace{2 a_{n-2}}_{\text {end with } 02 \text { or } 12}+\underbrace{2 b_{n-1}}_{\text {end with } 32 \text { or } 42} \\
\end{array}
$$

Thins
$$
\begin{aligned}
a_{n}-2 a_{n-1} & =3 b_{n}=6 a_{n-2}+6 b_{n-1} \\
& =6 a_{n-2}+2\left(a_{n-1}-2 a_{n-2}\right) \\
a_{n} & =4 a_{n-1}+2 a_{n-2}
\end{aligned}
$$

We have $a_{1}=4, a_{2}=4 \times 5-3=17$. By iterating we get $a_{7}=29776$.