2. Determine for which $m$ there exist exactly $2^{15}$ subsets $\mathrm{X}$ of the set $\{1,2,3, \ldots, 47\}$ with the property: the number $m$ is the smallest element of the set $\mathbf{X}$ and for every $x \in \mathbf{X}$, either $x+m \in \mathbf{X}$ or $x+m>47$.

(R. Kučera)
Solution. First, depending on the given number $m(1 \leqq m \leqq 47)$, we express how many sets $X$ have the smallest element equal to the chosen number $m$. To do this, we divide the number 47 by $m$ with a remainder,

$$
47=q m+r \quad(q \geqq 1,0 \leqq r0) additional $r$ groups of $q$ elements

$$
\mathrm{P}_{i}=\{m+i, 2 m+i, \ldots, q m+i\} \quad(1 \leqq i \leqq r)
$$

in the case $r1$ then there are still $m-r-1$ groups of $q-1$ elements

$$
\mathrm{P}_{i}=\{m+i, 2 m+i, \ldots,(q-1) m+i\} \quad(r+1 \leqq i \leqq m-1)
$$

Generally, each group $P_{i}$ consists of exactly those numbers $z T_{m}$ that give a remainder of $i$ when divided by $m$; as we have mentioned, some of these $m$ groups $\mathrm{P}_{0}, \ldots, \mathrm{P}_{m-1}$ may be empty.

A set $X \subseteq T_{m}=P_{0} \cup P_{1} \cup \ldots \cup P_{m-1}$ with the smallest element $m$ clearly has the required property if and only if it contains the entire group $P_{0}$ and, for each $i \in$ $\in\{1,2, \ldots, m-1\}$, either does not contain any element from $\mathrm{P}_{i}$ or contains all elements from $\mathrm{P}_{i}$ starting from a certain element. Thus, for each of the $r$ groups $\mathrm{P}_{1}, \ldots, \mathrm{P}_{r}$, we have $q+1$ options, while for each of the $m-r-1$ groups $\mathrm{P}_{r+1}, \ldots, \mathrm{P}_{m-1}$, we have $q$ options for selecting elements for $X$. Since these selections can be combined independently, the number of sets $X$ is indeed equal to the number $(q+1)^{r} q^{m-1-r}$. (This is true even for the cases $r=0, r=m-1$ or $q=1$, when some of the groups $\mathrm{P}_{i}$ are empty.)

Now we determine when, for the incomplete quotient $q$ and remainder $r$ from the equality $47=q m+r$, the following holds:

$$
(q+1)^{r} q^{m-1-r}=2^{15} .
$$

In the case $q=1$, we get from $(*)$ the equation $2^{r}=2^{15}$, from which $r=15$, and from the equality $47=m+r$ we then get $m=32$.

In the case $q>1$, one of the powers $(q+1)^{r}, q^{m-1-r}$ in equation $(*)$ must be equal to $2^{15}$ and the other must be equal to one, i.e., must have a zero exponent. Let's now consider the possible values of $q>1$ in ascending order and for each of them test whether the corresponding solution to equation $(*)$ satisfies the condition $47=q m+r$:
a) $q=2^{1}, m-1-r=15$ and $r=0$. Then $m=16$ and $q m+r=32-$ does not satisfy.
b) $q=2^{3}-1, r=5$ and $m-1-r=0$. Then $m=6$ and $q m+r=47-$ satisfies.
c) $q=2^{3}, m-1-r=5$ and $r=0$. Then $m=6$ and $q m+r=48-$ does not satisfy.

From the condition $47=q m+r$, it follows that the largest possible values of $q$ are 47 (for $m=1$) and 23 (for $m=2$). The remaining possibilities ($q=2^{5}-1, q=2^{5}, q=2^{15}-1, q=2^{15}$) do not need to be analyzed in detail for this reason.

Answer. The sought values of $m$ are two: $m=6$ and $m=32$.