4. For any $x, y \in \mathbf{R}$, the function $f(x, y)$ satisfies
(1) $f(0, y)=y+1$;
(2) $f(x+1,0)=f(x, 1)$;
(3) $f(x+1, y+1)=f(x, f(x+1, y))$.

Then $f(3,2016)=$ . $\qquad$
4. $2^{2019}-3$.

From conditions (1) and (3), we can deduce
$$
\begin{array}{l}
f(1, n)=n+2, f(2, n)=2 n+3, \\
f(3, n)=2^{n+3}-3 . \\
\text { Therefore, } f(3,2016)=2^{2019}-3 .
\end{array}
$$