Find the number of non-empty subsets of $\{1,2,3,\dots,8\}$ which do not contain two consecutive numbers.

combinationscombinatorics

I obtained that for the set $A:=\{1,2\ldots,n\}$, the number of subsets $S$ of size $k$ such that no two elements of $S$ are consecutive numbers is $\binom{n-k+1}{k}$. Applying
$$\sum_{k=1}^{4} \binom{9-k}{k}$$ gives me $54$, however, the answer given is $34$. Is there any mistake I have made?


Derivation of $\binom{n-k+1}{k}$:
Define $X:=\{-1,0,1,\dots,n\}$. Note that no. of $k+1$ length subsets $S$ of $X$ with no two consecutive integers such that $-1 \in S$ forms a bijection with the number of $k$ length subsets of $A$ with no 2 consecutive numbers.

Write the elements of $X$ in a row and colour $-1$.
$$\color{red}{-1} \ \ 0 \ \ 1 \ \ \ldots\ \ n$$
We want to colour $k$ more numbers such that no two coloured numbers are consecutive. Define $g_i$ as the gap between the $i$th coloured number and the $i+1$th coloured number. For example, if we only colour $-1$ and $n$, $g_1 = n$. Thus, if we colour $k$ numbers other than $-1$, we observe that
$$\sum_{i=1}^k g_i \le n-k+1 \implies \left(\sum_{i=1}^k g_i\right) + t = n-k+1$$where $t$ is a non-negative integer. We note that each $g_i$ is greater than 0 (since we cannot colour consecutive integers), so we define $a_i = g_i-1$, so that $a_i$ are non-negative.
$$\left(\sum_{i=1}^k a_i+1\right) + t = n-k+1 \implies \left(\sum_{i=1}^k a_i\right) + t = n-2k+1$$By stars and bars, the no. of solutions for this is
$$\binom{(n-2k+1)+(k+1)-1}{(k+1)-1} = \color{green}{\binom{n-k+1}{k}}$$

Best Answer

Your answer is completely correct. There are 54 non consecutive subsets of the the first 8 natural numbers.

I can guess what mistake the book made. One can prove that the total number of nonconsecutive subsets, including the empty subset, of the first $n$ natural numbers is always a Fibonacci number, $F_{n+1}$. Note that 34 and 55 are both Fibonacci numbers; perhaps the book used $F_8$ instead of $F_{8+1}$, and also forgot to subtract one for the lack of empty set.