It can easily be shown that if a complex polynomial $P$ leaves invariant $\mathbb{Z}$ ($P(\mathbb{Z}) \subseteq \mathbb{Z}$) then it must be a linear combination (with integer coefficients) of Hilbert polynomials $H\_k$, i.e. polynomials of the form : $$ H\_k(X) : = \frac{X(X-1)\cdots (X-k+1)}{k!} $$


Now, what happens when $P$ stabilizes an entire lattice, say the Gaussian integers $\mathbb{Z}[i] $, i.e $P(\mathbb{Z}[i] ) \subseteq \mathbb{Z}[i] $ ?


Pretty clearly, the set $\mathcal{A}$ of all such polynomials is an additive sub-group of $\mathbb{Q}[i][X]$ (and even a $\mathbb{Z}[i]$ module). Such polynomials can be expressed as linear combinations (with coefficients in $\mathbb{Z}[i]$) of the polynomials $H\_k$ (same proof as in the case of $\mathbb{Z}$). It is also straightforward to see that $\mathbb{Z}[i] [X]$ is contained in $\mathcal{A}$. However equality does not arise, since the polynomial $ \widetilde{H}\_2(X): = (1+i)\frac{X(X-1)}{2} = (1+i)H\_2(X)$ does not lie in $\mathbb{Z}[i] [X]$ and yet verifies the property of leaving invariant the Gaussian integers.


**Question :** Can we give a precise description of such polynomials, say an explicit basis of $\mathcal{A}$ (seen as a module) ? 



Polynomials leaving invariant the Gaussian integers
Your question is related to the study of *(generalized) numerical polynomials*: If $R$ is an integral domain and $K$ the field of fractions of $R$, then the set ${\rm Int}(R) := \{f \in K[x]: f(R) \subseteq R\}$ is a subdomain of $K[x]$, whose elements are called the *numerical polynomials over $R$* (in one variable $x$). 


The domain ${\rm Int}(R)$ has been the subject of a great deal of research: Original work in the area was entirely centered on the case where $R$ is the ring of integers, and was motivated by interpolation problems in the early days of calculus. It was only in 1919 that A. Ostrowski and G. Pólya first considered numerical polynomials in their own right, though focused on the case where $R$ is the ring of integers of a number field. In particular, they could show, in this context, that ${\rm Int}(R)$ has a *regular* basis $(f\_k)\_{k \ge 0}$ as an $R$-module if and only if the products of prime ideals of $R$ of every given norm are principal, which is certainly true if $R$ is a PID ("regular" means that $\deg f\_k = k$ for all $k$): Their proof is constructive, so the answer to your question ("Can we give a precise description of such polynomials etc.?") is yes. 


For further details and results, you may want to have a look to P.-J. Cahen and J.-L. Chabert's monograph, *Integer-valued polynomials*, Math. Surveys Monogr. **48**, Amer. Math. Soc., 1997. More specifically, see Remark II.1.5(ii) for an "explicit basis".


