Let $f(n)$ be the number of subsets of $[n]$ that do not contain two consecutive integers. For example, for $n = 4$ we have the subsets $\emptyset$, $\{1\}$, $\{2\}$, $\{3\}$, $\{4\}$, $\{1, 3\}$, $\{1, 4\}$, $\{2, 4\}$, so $f(4) = 8$.
The solution: $f(n) = f(n − 1) + f(n − 2)$ for $n \geq 2$.
My question is: How do I approach this kind of problems to reach the recurrence solution?