Example 7 gives the definition:
(1) A subset $A \subseteq M=\{1,2,3, \cdots, 2 m\},(m$ $\left.\in \mathbf{Z}_{+}\right)$ is called good if it has the following property:
(1) If $2 k \in A(1 \leqslant k<m)$, then $2 k-1 \in A$ and $2 k+1 \in A$;
(2) If $2 m \in A, 2 m-1 \in A(\varnothing$ and $M$ are both good).
(2) A subset $A \subseteq M=\{1,2,3, \cdots, 2 m+1\}$ $\left(m \in \mathbf{Z}_{+}\right)$ is called good if it has the following property:

If $2 k \in A$, then $2 k-1 \in A$ and $2 k+1 \in A(\varnothing$ and $M$ are both good).

Find the number of good subsets $a_{n}$ of the set $M=\{1,2,3, \cdots, n\}\left(n \in \mathbf{Z}_{+}\right)$.

Hint: (This problem is a generalization of a problem from the 31st Spanish Mathematical Olympiad.)
\begin{array}{l}a_{n}=a_{n-1}+a_{n-2}(n \geqslant 3) \\ \Rightarrow a_{n}=\frac{1}{\sqrt{5}}\left[\left(\frac{1+\sqrt{5}}{2}\right)^{n+2}-\left(\frac{1-\sqrt{5}}{2}\right)^{n+2}\right] .\end{array}