Define $a_n$ for $n\geq 2$ to be $1$ if the second most significant digit of $n$ in binary is $1$ and $-1$ otherwise. For example for $n=23$, in binary $n=10111_2$ and so $a_n=-1$, becuase the second digit of $n$ was $0$.
The limit in question is $\lim_{x\to 1} f(x)=\lim_{x\to 1}\sum_{n=2}^\infty a_nx^n$.
Intuition: The coefficients of this power series are only $-1$ and $+1$. There is (starting from $2$) $a_n=-1,1,-1,-1,1,1,-1,-1,-1,-1,1,1,1,1,\ldots$ followed by 8 times $-1$ and so on with the number of $\pm 1$ being increasing powers of $2$. The negative powers of $x$ therefore come earlier and should be more significant, resulting the limit in being $-\infty$.
Approaches: The limit and the sum sadly cannot be interchanged.
I tried summing the finite geometric series, which occur in the sum. This results in $$\sum_{n=1}^\infty -x^{2^n} \frac {1-x^{2^{n-1}+1}}{1-x} +x^{2^n+2^{n-1}}\frac {1-x^{2^{n-1}+1}}{1-x} $$ and does not look promising for me. Maybe this still works somehow?! (Might have mistakes, I wrote this from memory)
I found the following functional equation for $f$: $$(1+x)f(x^2)-x^2+x^3=f(x)$$ and plugging in $x=1$ yields $2f(1)=f(1)$, which leaves only $f(1)=\pm \infty,0$ . $+\infty$ is easily excluded, because $f$ is negative on $(0,1)$ and this also lacks an argument for the convergence after all.
Another approach with simply the definition of limits failed miserably. But again this might be my fault.
Any hints or maybe even solutions are appreciated.