# Which $A\subseteq\mathbb{N}\cup\{0\}$ satisfy $\bigg(\sum\limits_{a\in A}x^a\bigg)\prod\limits_{a\in A} (1+x^{2^a})=\dfrac{1}{1-x}$ for all $|x|<1$?

Determine the subsets $A \subseteq \mathbb{N} \cup\{ 0 \}$ that satisfy :

$$\left (\sum_{a \in A}^{ } x^a \right )\left ( \prod_{a \in A}^{ } (1+x^{2^a}) \right ) = \frac{1}{1-x}$$

for all $|x|<1$.

Using the identity $$\frac 1 {1-x}=\prod_{i\ge 0} (1+x^{2^i}),$$ this equation can be rewritten as $$\sum_{a\in A} x^a = \prod_{b\ge 0, \ b\notin A} (1+x^{2^b}).$$ Each side then defines a function which is analytic in $\{x\in {\Bbb C}\mid |x|<1\}$, so the values will match for all $x$ with $|x|<1$ iff the coefficients of $x^n$ on each side are the same for all $n\ge 0$. So, the equation is equivalent to the set equation $$A=\Sigma({\Bbb Z}_{\ge 0}\setminus A),\qquad \qquad (+)$$ where, for a subset $B$ of ${\Bbb Z}_{\ge 0}$, $$\Sigma(B)=\{2^{b_1}+2^{b_2}+\cdots+2^{b_r}\mid r\ge 0, b_1<b_2<\cdots<b_r\in B\}.$$ Intersecting both sides of $(+)$ with $\{0,\ldots,2^n-1\}$ gives $$A\cap\{0,\ldots,2^n-1\}=\Sigma(\{0,1,\ldots,n-1\}\setminus A). \qquad (*)$$ Setting $n:=0$ in $(*)$ then immediately gives $$A\cap\{0\}=\Sigma(\emptyset)=\{0\}.$$ Then we know that $\{0\}\setminus A=\emptyset$, so we can plug $n:=1$ into $(*)$ to give $$A\cap\{0,1\}=\Sigma(\{0\}\setminus A)=\Sigma(\emptyset)=\{0\}.$$ Now that we know that $\{0,1\}\setminus A=\{1\}$, we can plug $n:=2$ into $(*)$ to get $$A\cap\{0,1,2,3\}=\Sigma(\{0,1\}\setminus A)=\Sigma(\{1\})=\{0,2\}.$$ Continue in this way for $n=3$, $n=4$, $\dots$ Solving $(*)$ for $n=m$ determines $A\cap \{0,\ldots,2^m-1\}$, and then, since $2^m-1\ge m$ for all $m\ge 0$, the right-hand side of $(*)$ for the next value of $n$, $n=m+1$, is determined. This then gives a unique $A$ which satisfies $(*)$ for each $n$, and hence also satisfies $(+)$. Therefore, the equation has a unique solution $$A=\{0, 2, 8, 10, 16, 18, 24, 26, 32, 34, 40, 42, 48, 50, 56, 58, 64, 66, 72, 74, 80, 82, 88, 90, 96, 98, 104, 106, 112, 114, 120, 122, 128, 130, 136, 138, 144, 146, 152, 154, 160, 162, 168, 170, 176, 178, 184, 186, 192, 194, 200, 202, 208, 210, 216, 218, 224, 226, 232,\ldots\}$$ This sequence is OEIS A079599.