23. (IND 2) Let $f$ and $g$ be two integer-valued functions defined on the set of all integers such that (a) $f(m+f(f(n)))=-f(f(m+1)-n)$ for all integers $m$ and $n$; (b) $g$ is a polynomial function with integer coefficients and $g(n)=g(f(n))$ for all integers $n$. Determine $f(1991)$ and the most general form of $g$.
23. From (i), replacing $m$ by $f(f(m))$, we get 
$$ f(f(f(m))+f(f(n)))=-f(f(f(f(m))+1))-n $$ 
analogously $\quad f(f(f(n))+f(f(m)))=-f(f(f(f(n))+1))-m$. From these relations we get $f(f(f(f(m))+1))-f(f(f(f(n))+1))=m-n$. Again from (i), 
$$ \begin{aligned} 
& f(f(f(f(m))+1))=f(-m-f(f(2))) \\ 
& \text{and} \quad f(f(f(f(n))+1))=f(-n-f(f(2))) . 
\end{aligned} $$
Setting $f(f(2))=k$ we obtain $f(-m-k)-f(-n-k)=m-n$ for all integers $m, n$. This implies $f(m)=f(0)-m$. Then also $f(f(m))=m$, and using this in (i) we finally get 
$$ f(n)=-n-1 \quad \text{for all integers } n $$
Particularly $f(1991)=-1992$. From (ii) we obtain $g(n)=g(-n-1)$ for all integers $n$. Since $g$ is a polynomial, it must also satisfy $g(x)=g(-x-1)$ for all real $x$. Let us now express $g$ as a polynomial on $x+1/2: g(x)=h(x+1/2)$. Then $h$ satisfies $h(x+1/2)=h(-x-1/2)$, i.e. $h(y)=h(-y)$, hence it is a polynomial in $y^2$; thus $g$ is a polynomial in $(x+1/2)^2=x^2+x+1/4$. Hence $g(n)=p(n^2+n)$ (for some polynomial $p$) is the most general form of $g$.