Solution (source code)

= Solution

If <polynomials> with <integer> monomial <coefficients> converge uniformly to $f$, their values at zero and one are <integers> converging to $f(0)$ and $f(1)$. A convergent <integer> sequence is eventually constant: once all its terms lie in an interval of length less than one they must agree. Hence both endpoint values are <integers>.

Conversely assume those values are <integers>. The <rounded Bernstein polynomial> is an <integer>-<coefficient> <polynomial>, because its displayed scalar <coefficients> are <integers> and each $x^k(1-x)^{n-k}$ expands with <integer> <coefficients>. Part b gives its vanishing distance from $B_nf$. For completeness, the remaining <uniform convergence> $B_nf\to f$ follows directly from <uniform continuity>. Let $X$ have the <binomial distribution> with parameters $n,x$; then $B_n(f,x)=\mathbb E f(X/n)$, $\mathbb E(X/n)=x$, and $\operatorname{Var}(X/n)=x(1-x)/n\le1/(4n)$. Splitting into $|X/n-x|\le\delta$ and its complement, and applying <Chebyshev's inequality>, gives
$$
|B_n(f,x)-f(x)|\le\omega(f,\delta)+2\|f\|_\infty\frac1{4n\delta^2},
$$
where $\omega$ is the <modulus of continuity>. First choose $\delta$ to make the first term small uniformly, then take $n$ large. The <triangle inequality> now gives $\|B_n^*f-f\|_\infty\to0$. We have proved the <integer-coefficient polynomial approximation> characterization
$$
\boxed{f\in\overline{\mathbb Z[x]}^{\|\cdot\|_\infty}
\quad\Longleftrightarrow\quad f(0),f(1)\in\mathbb Z.}
$$