Suppose we have a formal power series $g(x)$ with integer coefficients such that $g(0)=1$. Suppose also that there exists an invertible formal power series $f(x)=x+(\text{higher order terms})$ such that $g(x)g(-f(x))=1$. Is there a known necessary and sufficient condition on $g(x)$ for $f(x)$ to have integer coefficients as well?
Update: if this is too general, we can assume additionally that $g'(0)\ne 0$ as well.
We are given that the formal power series (FPS) $$ g(x) = 1 + c_1\,x + c_2\,x^2 + c_3\,x^3 + \dots \tag{1} $$ has integer coefficients. We are also given that the FPS $$ f(x) = x + a_2\,x^2 + a_3\,x^3 + \dots \tag{2} $$ satisfies the equations $$ f(f(x)) = x \tag{3} $$ and $$ g(x)\,g(-f(x)) = 1. \tag{4} $$ If we assume $\,c_1\ne 0\,$ then the FPS defined by $$ h(x) := \log(g(x)) \tag{5} $$ also satisfies $$ h(x) = c_1\,x + O(x^2) \tag{6} $$ and thus has a compositional inverse $\,h^{(-1)}(x).\,$
Taking the logarithm of both sides of equation $(4)$ gives $$ h(x) + h(-f(x)) = 0. \tag{7} $$ Solving this equation for $\,f(x)\,$ gives $$ f(x) = -h^{(-1)}(-h(x)) \tag{8} $$ where the first two coefficients are $$ a_2 = (-c_1^2 + 2\,c_2)/c_1,\quad a_3 = (a_2)^2. \tag{9} $$
Remark: In general, $\,a_n\,$ is a rational function of the coefficients of $\,g(x)\,$ with denominator $\,c_1^{n-1}\,$ and numerator a polynomial with integer coefficients.
If we suppose that $\,|c_1|=1,\,$ then by the previous remark all of the coefficients of $\,f(x)\,$ are integers. If we suppose that $\,|c_2|\ge 2,\,$ then determining the integrality of the coefficients of $\,f(x)\,$ becomes a much more difficult question.
Remark: Given a solution $\,g(x)\,$ of equation $(4)$ and an integer $\,n\,$, then $\,g(x)^n\,$ is also a solution with integer coefficients.