TITLE: Sequence of polynomials $g_n$ converging pontwise with $g(\mathbb{C})=\mathbb{Z}$.
QUESTION [7 upvotes]: Prove that there exists a sequence of polynomials $g_n(z)$ that converges for all $z\in \mathbb{C}$ to a limit function $g(z)$ with $g(\mathbb{C})=\mathbb{Z}$.
This question was on my complex analysis prelim last August. I have given it a go at various points throughout the time since, but I seriously have no idea where I could concretely start. Clearly the limit function can not be analytic, because this violates the open mapping theorem.
Any hints would be excellent!

REPLY [4 votes]: A corollary of Runge's theorem (Rudin RCA) says: Suppose $K\subset \mathbb C$ is compact and $S^2\setminus K$ is connected. Suppose further $\Omega$ is open and contains $K.$ If $f\in H(\Omega),$ then there is a sequence of polynomials that converges uniformly to $f$ on $K.$
To our problem: For each $n$ define $E_n=\{z:|\text{ Im }z|\ge 1/n\}$ and $F_n= \mathbb Z\cup \{z\in \mathbb R:d(z,\mathbb Z)\ge 1/(2n)\}.$ Then both $E_n,F_n$ are closed sets. Now define
$$K_n= [-n,n]^2\cap(E_n\cup F_n).$$
Then $K_n$ is compact, and $S^2\setminus K_n$ is connected. Good to draw a picture here. Note $K_n$ has a bunch of connected components: The big ones in the upper and lower half planes, and on the real axis the $2n+1$ points $-n,\dots,n$ as well as the $2n$ closed intervals between these points.
Set $\Omega_n =\{z:d(z,K_n)<1/(2n)\}.$ Then $\Omega_n$ has as many components as does $K_n.$ The components containing integers are discs $D(k,1/(2n)), k=-n,\dots,n.$ On each $D(k,1/(2n))$ define $f_n=k.$ For all other components, define $f_n=0.$ Then $f_n\in H(\Omega_n).$ By the corollary to Runge, there is a polynomial $P_n$ such that $|P_n-f|<1/n$ on $K_n.$ These are the desired polynomials; they converge pointwise to the identity on $\mathbb Z,$ and $0$ everywhere else.