Show that for $|z|<1$, one has $\frac{z}{1-z^2}+\frac{z^2}{1-z^4}+...+\frac{z^{2^n}}{1-z^{2^{n+1}}}+...=\frac{z}{1-z}, \frac{z}{1+z}+\frac{2z^2}{1+z^2}+...+\frac{2^kz^{2^k}}{1+z^{2^k}}+...=\frac{z}{1-z}.$
Justify any change in the order of summation. [Hint: Use the dyadic expansion of an integer and the fact that $2^{k+1}-1=1+2+2^2+...+2^k$]
I can get some feelings of the equalities, but I do not know how to prove it using the hint. For example, the first equality: $z+z^2+z^3+z^4+z^5+z^6+z^7+...=(z+z^3+z^5+z^7+...)+(z^2+z^6+z^{10}+...)+(z^4+z^{12}+...)+...+(z^{2^n}+z^{2^n+2^{n+1}}+z^{2^n+2^{n+2}}+...)+...=z(1+z^2+z^4+z^6+...)+z^2(1+z^4+z^8+...)+...$
so,
$\frac{z}{1-z^2}+\frac{z^2}{1-z^4}+...+\frac{z^{2^n}}{1-z^{2^{n+1}}}+...=\frac{z}{1-z}$. How can I get a strict proof of the above equalities?