Example 5 Toss a coin $n$ times, what is the probability of getting two consecutive heads during the tossing process?
Solution: Let $Q_{n}$ denote the probability of getting two consecutive heads in $n$ coin tosses, and $P_{n}$ denote the probability of not getting two consecutive heads. Clearly, $P_{1}=1, P_{2}=\frac{3}{4}$. If $n>2$, there are two scenarios:

I. If the first toss is tails, the probability of not getting two consecutive heads in the remaining $n-1$ tosses is $P_{n-1}$.

II. If the first toss is heads, the second toss must be tails to avoid two consecutive heads, and the probability of not getting two consecutive heads in the subsequent $n-2$ tosses is $P_{n-2}$.
Thus, $P_{n}:=\frac{1}{2} P_{n-1}+\frac{1}{4} P_{n-2} .(n>2)$
Solving, we get $2 P_{n}=2^{n-1} P_{n-1}+2^{n-2} P_{n-2}$.
Let $S_{n}=2^{n} P_{n}$, then $S_{n}=S_{n-1}+S_{n-2}$.
Hence, $\left\{S_{n}\right\}$ is a Fibonacci sequence, and $S_{1}=2 P_{1}=$ $2=F_{3}$, and the required probability is
$Q_{n}=1-P_{n}=1-\frac{F_{n+2}}{2^{n}}$. ( $F_{n}$ is the Fibonacci sequence)