3. Let $v(X)$ be the sum of elements of a nonempty finite set $X$, where $X$ is a set of numbers. Calculate the sum of all numbers $v(X)$ where $X$ ranges over all nonempty subsets of the set $\{1,2,3, \ldots, 16\}$.
3. The answer is $2^{15} \cdot 8 \cdot 17$
We note that each $k \in\{1,2,3, \ldots, 16\}$ belongs to $2^{15}$ subsets of $\{1,2,3, \ldots, 16\}$. We reason as follows: we can assign 0 or 1 to $k$ according to whether it is not or in a subset of $\{1,2,3, \ldots, 16\}$. As there are 2 choices for a fixed $k, k$ belongs to half of the total number of subsets, which is $2^{16}$. Hence the sum is
$$
\sum v(X)=2^{15}(1+2+3+\cdots+16)=2^{15} \cdot 8 \cdot 17=4456448
$$