For each positive integer $n$, find the number of $n$-digit positive integers for which no two consecutive digits are equal, and the last digit is a prime.
Almost trivial. Let $a_{n}$ be the desired answer. We have
$$
a_{n}+a_{n-1}=4 \cdot 9^{n-1}
$$
for all $n$, by padding the $(n-1)$ digit numbers with a leading zero.
Since $a_{0}=0, a_{1}=4$, solving the recursion gives
$$
a_{n}=\frac{2}{5}\left(9^{n}-(-1)^{n}\right) \text {. }
$$

The end.
Remark. For concreteness, the first few terms are $0,4,32,292, \ldots$.