Determine all positive integers $k$ for which there exist a positive integer $m$ and a set $S$ of positive integers such that any integer $n>m$ can be written as a sum of distinct elements of $S$ in exactly $k$ ways.
We claim that $k=2^{a}$ for all $a \geq 0$.
Let $A=\{1,2,4,8, \ldots\}$ and $B=\mathbb{N} \backslash A$. For any set $T$, let $s(T)$ denote the sum of the elements of $T$. (If $T$ is empty, we let $s(T)=0$.)
We first show that any positive integer $k=2^{a}$ satisfies the desired property. Let $B^{\prime}$ be a subset of $B$ with $a$ elements, and let $S=A \cup B^{\prime}$. Recall that any nonnegative integer has a unique binary representation. Hence, for any integer $t>s\left(B^{\prime}\right)$ and any subset $B^{\prime \prime} \subseteq B^{\prime}$, the number $t-s\left(B^{\prime \prime}\right)$ can be written as a sum of distinct elements of $A$ in a unique way. This means that $t$ can be written as a sum of distinct elements of $B^{\prime}$ in exactly $2^{a}$ ways.
Next, assume that some positive integer $k$ satisfies the desired property for a positive integer $m \geq 2$ and a set $S$. Clearly, $S$ is infinite.
Lemma: For all sufficiently large $x \in S$, the smallest element of $S$ larger than $x$ is $2 x$.
Proof of Lemma: Let $x \in S$ with $x>3 m$, and let $y$ be the smallest element of $S$ larger than $x$. If $y > 2x$, then $y-x$ can be written as a sum of distinct elements of $S$ not including $x$ in $k$ ways. If $y \in S$, then $y$ can be written as a sum of distinct elements of $S$ in at least $k+1$ ways, a contradiction. Suppose now that $y \leq x+m$. We consider $z \in (2x-m, 2x)$. Similarly as before, $z-x$ can be written as a sum of distinct elements of $S$ not including $x$ or $y$ in $k$ ways. If $y \in S$, then since $m < 2x - y$, $z$ can be written as a sum of distinct elements of $S$ in at least $k+1$ ways, a contradiction.
From the Lemma, we have that $S=T \cup U$, where $T$ is finite and $U=\{x, 2x, 4x, 8x, \ldots\}$ for some positive integer $x$. Let $y$ be any positive integer greater than $s(T)$. For any subset $T^{\prime} \subseteq T$, if $y-s\left(T^{\prime}\right) \equiv 0 \pmod{x}$, then $y-s\left(T^{\prime}\right)$ can be written as a sum of distinct elements of $U$ in a unique way; otherwise $y-s\left(T^{\prime}\right)$ cannot be written as a sum of distinct elements of $U$. Hence the number of ways to write $y$ as a sum of distinct elements of $S$ is equal to the number of subsets $T^{\prime} \subseteq T$ such that $s\left(T^{\prime}\right) \equiv y \pmod{x}$. Since this holds for all $y$, for any $0 \leq a \leq x-1$ there are exactly $k$ subsets $T^{\prime} \subseteq T$ such that $s\left(T^{\prime}\right) \equiv a \pmod{x}$. This means that there are $kx$ subsets of $T$ in total. But the number of subsets of $T$ is a power of 2, and therefore $k$ is a power of 2, as claimed.