I want to find the sum of this series in terms of $x$ and $n$. $$\sum_{r=0}^{n-1}{x^{4^r}} = x + x^4 + x^{16} + ... + x^{4^{(n-1)}}$$
I can't really think of a way to approach this. I think this could be some form of hypergeometric series? Does this even have a closed form? I tried using approach0 (search query) but couldn't find anything substantially helpful (or which I could understand).
I tried to think of some function for which the sum was said function's Taylor expansion (couldn't proceed much).
I thought there could be some relation to the result we get from $\sum_{r=1}^n{\frac{1}{\sin{2^r x}}} = \cot{x} - \cot{2^n x}$ and attempted some complex exponentials but I couldn't get much further from there.
Any help would be appreciated (I'm still in high school and the limits of my analytical knowledge extend to moderate calculus).
(This question sprang to mind from an exercise to find the fundamental period of $f(x) = \sum_1^n {\cos{\frac{x}{2^{2n-1}}}}$ which I modified to the equation above.)
Help with tags appreciated :)