Simplifying $\frac1{1+x}+\frac2{1+x^2}+\frac4{1+x^4}+\frac8{1+x^8}+\frac{16}{x^{16}-1}$
$$\frac{16}{x^{16}-1}=\frac{8}{x^8-1}+\frac{-8}{x^8+1}$$
So the $4^{th}$ term of the original sum and the $2^{nd}$ part of the decomposition above are canceled. You are left with: $$ \dfrac{1}{1+x}+\dfrac{2}{1+x^2}+\dfrac{4}{1+x^4}+\dfrac{8}{x^{8}-1} $$ Continue similarly. In the end you will get $\frac{1}{x-1}$.
More generally, $$ \sum_{n=0}^N \dfrac{2^n}{1+x^{2^n}} = \dfrac{2^{N+1}}{1-x^{2^{N+1}}} - \dfrac{1}{1-x}$$ as can be proven by induction.