What is the largest possible number of subsets of the set $\{1,2, \ldots, 2 n+1\}$ such that the intersection of any two subsets consists of one or several consecutive integers?
Consider any subsets $A_{1}, \ldots, A_{s}$ satisfying the condition of the problem and let $A_{i}=$ $\left\{a_{i 1}, \ldots, a_{i, k_{i}}\right\}$ where $a_{i 1}<\cdots<a_{i, k_{i}}$. Replacing each $A_{i}$ by $A_{i}^{\prime}=\left\{a_{i 1}, a_{i 1}+1, \ldots, a_{i, k_{i}}-1, a_{i, k_{i}}\right\}$ (i.e., adding to it all "missing" numbers) yields a collection of different subsets $A_{1}^{\prime}, \ldots, A_{s}^{\prime}$ which also satisfies the required condition. Now, let $b_{i}$ and $c_{i}$ be the smallest and largest elements of the subset $A_{i}^{\prime}$, respectively. Then $\min _{1 \leq i \leq s} c_{i} \geq \max _{1 \leq i \leq s} b_{i}$, as otherwise some subsets $A_{k}^{\prime}$ and $A_{l}^{\prime}$ would not intersect. Hence there exists an element $a \in \bigcap_{1<i<s} A_{i}^{\prime}$. As the number of subsets of the set $\{1,2, \ldots, 2 n+1\}$ containing $a$ and consisting of $k$ consecutive integers does not exceed $\min (k, 2 n+2-k)$ we have $s \leq(n+1)+2 \cdot(1+2+\cdots+n)=(n+1)^{2}$. This maximum will be reached if we take $a=n+1$.