Sequence of polynomials $g_n$ converging pontwise with $g(\mathbb{C})=\mathbb{Z}$. 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!
 A: 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.
A: I can't do this for $\mathbb{C}$, but I can do it for $\mathbb{R}$.
Consider the function $g(x) = floor(x)$. Then take some sequence of continuous functions $\{h_n\}_{n \in \mathbb{N}}$ which converge pointwise to $g$ (for simplicity, one can take some piecewise functions).
Note: the details of $g$ don't matter at all. The only thing we need is for the range of $g$ to be $\mathbb{Z}$ and for a sequence of continuous functions $\{h_n\}_{n \in \mathbb{N}}$ to exist.
Now for each continuous function $h : \mathbb{R} \to \mathbb{R}$, one can construct a sequence of polynomials $\{k_n\}_{n \in \mathbb{N}}$ which converges to $h$ uniformly on any compact set. To do so, for each $j \in \mathbb{N}$, let $q_j$ be a polynomial such that $\sup\limits_{x \in [-j, j]} |q_j(x) - h(x)| < 1/j$ (this is produced using Stone-Weirstrass). Then for any $j \in \mathbb{N}$, we see that the sequence $q_i$ converges uniformly to $h$ on $[-j, j]$.
Now for each $n$, let $\{(q_n)_i\}_{i \in \mathbb{N}}$ be a sequence which uniformly converges to $h_n$ on each compact set. Then for each $n$, pick some $g_n := (q_n)_i$ such that $\sup_{x \in [-n, n]} |g_n(x) - h_n(x)| < 1 / n$.
Now fix some $x$, and take some $\epsilon > 0$. Take $n$ such that $x \in [-2n, 2n]$, $\epsilon > 1/n$, and such that for all $j > 2n$, $|h_j(x) - g(x)| < 1/(2n)$. Then for all $j > 2n$, we have $|g_j(x) - g(x)| \leq |g_j(x) - h_j(x)| + |h_j(x) - g(x)| < 1/j + 1/(2n) < 1/(2n) + 1/(2n) = 1/n < \epsilon$. This shows that $\lim\limits_{n \to \infty} g_n(x) = g(x)$.
That is, this shows that $\lim\limits_{n \to \infty} g_n = g$ pointwise.
What stops us from generalising this proof to $\mathbb{C}$?
The issue is that we cannot apply the Stone-Weirstrass theorem to $\mathbb{C}$. This is because polynomials are not closed under the taking of complex conjugates. This seems like a major issue.
