How to derive this infinite product formula? Show:
$$\prod_{n=0}^{\infty}\left(1 + x^{2^n}\right) = \frac{1}{1-x}$$
I tried numerous things, multiplying by $x$, dividing, but none of that worked. Also, I realized that: 
$$\prod_{n=0}^{\infty} \left(1 + x^{2^n}\right) = \sum_{n=0}^{\infty} x^n$$
But I cannot prove the relation. I get:
$$(1 + x)(1+x^2)(1+x^4)(1+x^8)...$$
But for  a general $n$ it is more difficult. 

The partial products are
$$1+x,$$
$$(1+x)+x^2(1+x)=1+x+x^2+x^3,$$
$$(1+x+x^2+x^3)+x^4(1+x+x^2+x^3)=1+x+x^2+x^3+x^4+x^4+x^5+x^6+x^7$$
$$\cdots$$
Every time the number of terms doubles.
Doesn't that ring a bell ?
