Problem: Determine with proof whether there is a subset $X \subseteq \ZZ$
with the following property: for any $n \in \ZZ$,
there is exactly one solution to $a+2b = n$, with $a,b \in X$.

\end{enumerate}

Solution: The idea is generating functions, but extra care is required
since exponents will be in $\ZZ$ rather than in $\ZZ_{\ge 0}$.

However, consider formally the limit
\[ f(x) = \prod_{k \ge 0} \left( 1 + x^{(-4)^k} \right). \]
For size reasons, this indeed converges formally to a power series,
in the sense that the coefficient of any $x^k$
is eventually zero or one for all partial sums.

We claim $X = \{ n : [x^n] f(x) = 1 \}$ works.

For a given $n$, we can truncate the sum at some large $N$ again for size reasons.
For convenience assume $N$ is even.
Now set
\[ f_N(x) = \prod_{k = 0}^N \left( 1 + x^{(-4)^k}  \right). \]
Next, we compute
\[
  f_N(x) f_N(x^2)
  = \frac{(1+x)(1+x^2) \dots ( 1+x^{2^{2N+1}} )}%
  {x^{2+8+\dots+2^{2N-1}}}
  = \dots + x^{-2} + x^{-1} + 1 + x + x^2 + \dots
\]
as desired.

\begin{remark*}
  The analogous problem with $\ZZ$ replaced by $\ZZ_{\ge 0}$ is easier to think about;
  this has the same generating function but it's easier to think about.
  In that case, the desired $X'$ is also equivalently be described as the set of numbers
  whose base-$4$ representation has only $0$ and $1$.
  Then every base $4$-number can be written uniquely as $a+2b$ for $a,b \in X'$,
  by looking digit-by-digit.
\end{remark*}