# q-Powerseries and binary strings

Consider the infinite product $(1+qz)(1+qz^2)(1+qz^4)(1+qz^8)\cdots$, and write this as $\sum\limits_{\nu \geqslant 0} q^{B_\nu}z^\nu$. Relate $B_\nu$ to the binary expression of $\nu$. The sequence starts off as: $1,1,2,1,2,2,3,1,2,2,3,2,3,3,4,\ldots$.

The sequence $B_n$ is exactly the sum of 1s appearing in the binary expression of $n$ (one needs $q$ not to be a root of unity in order for $B_n$ to be well-defined).