Call a set $A$ of integers non-isolated, if for every $a\in A$ at least one of the numbers $a-1$ and $a+1$ also belongs to $A$. Prove that the number of five-element non-isolated subsets of $\{1, 2,\ldots ,n\}$ is $(n-4)^2$.
Source: Baltic Way 2007
Tags: combinatorics proposed, combinatorics
Call a set $A$ of integers non-isolated, if for every $a\in A$ at least one of the numbers $a-1$ and $a+1$ also belongs to $A$. Prove that the number of five-element non-isolated subsets of $\{1, 2,\ldots ,n\}$ is $(n-4)^2$.