Prove the identity $\frac{1}{1+x^{1}}+\cdots+\frac{2^{n}}{1+x^{2^{n}}}=\frac{1}{x-1}+\frac{2^{n+1}}{1+x^{2^{n+1}}}$ Show that for all non-negatives integers $n$, it is true that
$$\frac{1}{1+x^{1}}+\frac{2}{1+x^{2}}+\frac{4}{1+x^{4}}+\frac{8}{1+x^{8}}+\cdots+\frac{2^{n}}{1+x^{2^{n}}}=\frac{1}{x-1}+\frac{2^{n+1}}{1+x^{2^{n+1}}}$$
For $x \ne 1$, $x \ne -1$
I tried to solved it by appliying geometric series but I got the following
after doing the $2f\left(x\right)-f\left(x\right)$ step, where $f\left(x\right)=\frac{1}{1+x^{1}}+\frac{2}{1+x^{2}}+\frac{4}{1+x^{4}}+\frac{8}{1+x^{8}}+\cdots+\frac{2^{n}}{1+x^{2^{n}}}$
$$f\left(x\right)=\frac{1}{x-1}+\frac{2^{n+1}}{1+x^{2^{n}}}$$
Not sure if Fermat's theorem is needed in order to solve it

A proof by induction is elementary and not difficult.  Let $$S_n(x) = \sum_{k=0}^n \frac{2^k}{1 + x^{2^k}}, \quad P_n(x) = \frac{1}{x-1} + \frac{2^{n+1}}{\color{red}{1 - x^{2^{n+1}}}}.$$  Note that you have a typographical error for $P_n(x)$; the correct expression is shown in red text.  The claim is that for all nonnegative integers $n$, we have $S_n = P_n$.  The proof of the inductive step is simply
$$\begin{align}
S_{n+1}(x) &= S_n(x) + \frac{2^{n+1}}{1 + x^{2^{n+1}}} \\
&= P_n(x) + \frac{2^{n+1}}{1 + x^{2^{n+1}}} \\
&= \frac{1}{x-1} + \frac{2^{n+1}}{1 - x^{2^{n+1}}} + \frac{2^{n+1}}{1 + x^{2^{n+1}}} \\
&= \frac{1}{x-1} + 2^{n+1} \left( \frac{(1 + x^{2^{n+1}}) + (1 - x^{2^{n+1}})}{(1 - x^{2^{n+1}})(1 + x^{2^{n+1}})} \right) \\
&= \frac{1}{x-1} + 2^{n+1} \left( \frac{2}{1 - x^{2^{n+2}}} \right) \\
&= P_{n+1}(x).
\end{align}$$
The way that this simplifies also suggests that a direct proof is possible via algebraic simplification of a telescoping sum, e.g., $$\frac{2^{k+1}}{1 - x^{2^{k+1}}} = \frac{2^k}{1 - x^{2^k}} + \frac{2^k}{1 + x^{2^k}}$$ suggests defining $$a_k (x) = \frac{2^k}{1 + x^{2^k}}, \quad b_k(x) = \frac{2^k}{1 - x^{2^k}} $$ hence $$a_k(x) = b_{k+1}(x) - b_k(x)$$ and $$S_n(x) = \sum_{k=0}^n a_k(x) = \sum_{k=0}^n b_{k+1}(x) - b_k(x) = b_{n+1}(x) - b_0(x) = P_n(x).$$
