Generalization of cos: is this function known? Consider a function $f_1$ defined by $f_1(x)=1-x+o(x)$ and $f_1(2x)=f_1(x)^2 + 0$. It's simple to find that $f_1(x)=e^{-x}$ (for example by writing series near $x=0$).
Consider a function $f_2$ defined by $f_2(x)=2-x^2+o(x^2)$ and $f_2(2x)=f_2(x)^2-2$. It can be proven that $f_2(x)=2 \cos(x)$.
Is there any formula (probably with use of special functions) for the generalization of this, i.e. function $f_n$ defined by $f_n(x)=2^{n-1}-x^n+o(x^n)$ and $f_n(2x)=f_n(x)^2-2^{2n-2}+2^{n-1}$?

Assuming Willie Wong's correction, by a method of undetermined coefficients it's not too hard to generate a series for  $f_3$, and it begins
$ 4-x^3+(1/56)x^6-(1/14112)x^9+(13/115379712)x^{12}-(53/629973227520)x^{15}+(17413/495415985907548160)x^{18} + \cdots$
but it's not clear what to do with this. For example, the denominators have large-ish prime factors: $495415985907548160 = 2^{14} 3^4 5^1 7^5 13^1 31^1 73^1 151^1$. This seems to suggest that there's not going to be an easy third-order differential equation, whereas your $f_1$ and $f_2$ satisfy first- and second-order differential equations.
