Maths WorkshopMaths problems with full solutions
Exercise 1243Combinatorics › Counting principlesOlympiadAdded 4 Nov 2026

Subsets without two consecutive integers

#counting#recurrences#Fibonacci#bijection

Statement

  1. Let ana_n be the number of subsets of {1,2,…,n}\{1,2,\dots,n\} (including the empty set) that contain no two consecutive integers. Prove that an=Fn+2a_n=F_{n+2}, where F1=F2=1F_1=F_2=1 and Fk+2=Fk+1+FkF_{k+2}=F_{k+1}+F_k.
  2. Prove that the number of kk-element subsets of {1,…,n}\{1,\dots,n\} without two consecutive integers is (n−k+1k)\dbinom{n-k+1}k.
Hint

For part 1, split according to whether nn belongs to the subset. For part 2, subtract i−1i-1 from the ii-th smallest element.

Show solutionHide solution

Solution

1. Recurrence. Take n≥2n\ge2 and split the admissible subsets of {1,…,n}\{1,\dots,n\} into two classes.
- Those not containing nn: they are exactly the admissible subsets of {1,…,n−1}\{1,\dots,n-1\}, so there are an−1a_{n-1}.
- Those containing nn: they do not contain n−1n-1, and removing nn leaves an admissible subset of {1,…,n−2}\{1,\dots,n-2\}; conversely adding nn to such a subset is admissible. So there are an−2a_{n-2}.

Hence an=an−1+an−2a_n=a_{n-1}+a_{n-2}. The initial values are a0=1a_0=1 and a1=2a_1=2, which are F2F_2 and F3F_3. By induction an=Fn+2a_n=F_{n+2}.

2. Bijection. Let x1<x2<⋯<xkx_1<x_2<\dots<x_k be an admissible subset, so xi+1≥xi+2x_{i+1}\ge x_i+2. Define yi=xi−(i−1)y_i=x_i-(i-1). Then yi+1−yi≥1y_{i+1}-y_i\ge1, so y1<⋯<yky_1<\dots<y_k, and 1≤y11\le y_1, yk≤n−k+1y_k\le n-k+1. Conversely, from any kk-subset y1<⋯<yky_1<\dots<y_k of {1,…,n−k+1}\{1,\dots,n-k+1\}, setting xi=yi+(i−1)x_i=y_i+(i-1) gives an admissible subset. These maps are inverse, so the count is (n−k+1k)\binom{n-k+1}k.

Check. Summing over kk gives ∑k(n−k+1k)=Fn+2\sum_k\binom{n-k+1}k=F_{n+2}.

Lesson. Recurrence by conditioning on the last element, and bijections that "squeeze out" a constraint.