TITLE: How many subsets of $\{1,2,...,n\}$ do not contain three consecutive integers?
QUESTION [17 upvotes]: My attempt. Let us assume $n$ is a large positive integer. ${n \choose 0},{n \choose 1},{n \choose 2}$ are the numbers of such subsets having $0,1,2$ elements respectively, which is trivial. For $3$ elements, the number of such subsets is ${n \choose 3}-(n-2)$. Starting from $4$ elements, my brain begins muddling up; I have no idea how to proceed further systematically. Any hint or idea would be appreciated.

Remark. Thanks to the partial solutions by VIVID and Masacroso, I have completely solved this problem. Following VIVID's answer, I have posted an answer which completes the solution primarily for future reference.
I am going to give the accepted answer to VIVID who has been very dedicated to this problem seen from his number of edits. Also, most importantly, VIVID was the first person who posted the core part of the solution. Masacroso, hope you would not mind.
Last, though this problem has been completely resolved, any new approach is always welcome.

REPLY [3 votes]: Here's perhaps another approach. (Well it's basically equivalent to the answers already given, but maybe the binary string representation makes the problem easier to think about. At least it does for me, but that might be because I happened to already be familiar with these "run length problems".)
You can think a subset $S$ of $\{1,\dots, n\}$ as a binary string of length $n$, where $1$ at position $j$ means $j\in S$ and $0$ means $j\notin S$. Now, the subsets we want to count correspond to binary strings without a $3$-run of $1$'s.
To solve this new problem, lets denote
$$A_n = \{\text{length } n \text{ binary strings without a run of three 1's} \}$$
Now think of a $w\in A_n$ and the number of $1$'s it has in the beginning. That can be either $0$, $1$ or $2$. Then there is a zero and the rest is a word in $A_{n-1}$, $A_{n-2}$ or $A_{n-3}$, respectively. We're assuming $n>3$; the first ones are base cases. You can see the tribonacci-recursion for the size $|A_n|$.