Let $I = \{f(x) \in \mathbb{Z}[x] : \text{$f(n) \equiv 0 \pmod2$ for all $n \in \mathbb{Z}$}\}$. Prove that $I$ is a finitely-generated ideal of $\mathbb{Z}[x]$ by finding a finite set of generators for $I$.
I have no idea how to proceed with this problem!
Note that for a polynomial $f=a_m x^m+\cdots +a_0$ being in $I$ is equivalent to say that the constant term is even and all coefficients add up to an even number. Now I claim that with $J:=(x^2+x,x^2-x,2)$ we have $J=I$: let $g$ be the polynomial with those coefficients $b_i=a_i$ if $a_i$ is even and $b_i=a_i-1$ if $a_i$ is odd. Then $g\in J$ and if we can show $f-g\in J$, then so is $f$. But this is clear since $x^l+x^k \in J$ for all $l,k \in \mathbb{N}$ and $f-g$ is a sum of these. This shows $I\subseteq J$ and the other inclusion holds also.