# Prove the following set is an ideal of the ring $Z[x]$

Show that the set of all polynomials whose constant term is a multiple of 3 is an ideal of the ring $Z[x]$.

Attempt: Suppose then we need to show

if $p(x), q(x) \in I$ then $p(x) + q(x) \in I$ and if $r(x) \in Z[x]$ , then $p(x)r(x) \in I$ and $r(x)p(x) \in I$.

And $0 \in Z$, then $0 \in I$.

Then let

$I =$ {$a_nx^n + a_{n-1}x^{n-1} + ...+a_1x + a_0$ | $a_i \in Z$, $a_0\in 3Z$}

$p(x) = a_nx^n + a_{n-1}x^{n-1} + ...+a_1x + 3a$

and $q(x) = b_mx^n + b_{m-1}x^{n-1} + ...+b_1x + 3b$

Here we do not assume that $p(x)$ and $q(x)$ have the same degree. Then $p(x) + q(x) = [a_nx^n + a_{n-1}x^{n-1} + ...+a_1x + 3a] + [b_mx^n + b_{m-1}x^{n-1} + ...+b_1x + 3b] = 3(a + b) + (a_1 + b_1)x + ....+ (a_n + b_m)x^n$.

so $p(x) + q(x) \in I$

And $0 \in Z$ is also in $I$, since for $p(x) = 0x^n + ....+ 3(0) = 0$.

And let $r(x)= c_nx^n + ...+3c \in Z[x]$.

Then $r(x)p(x) = 3(3ac) + (3b_1 + 3a_1) + ....+ a_nb_mx^{2n}$

So $r(x)p(x) \in I$.

Can someone please help? I am not really sure how to prove this. I am getting confused with the underscrips Any help or better approach would really help. Thanks in advance!

Another way is to take the ring homomorphism $\Bbb Z[x]\to\Bbb F_3$ by $f\mapsto f(0)\pmod3$. Its kernel is clearly the set in question.
A better approach would be to prove that the set of polynomials with constant term a multiple of 3 is the ideal generated by $X$ and $3$. Namely it is $\{Xf(X)+3g(X) \ \vert \ f,g \in \mathbb{Z}[X]\}$, which is more easily proven to be an ideal.
If you believe that $(x)=x\Bbb Z[x]$ and $(3)=3\Bbb Z[x]$ and that the sum of two ideals is an ideal, you could show your set is equal to the sum of the two ideals I just mentioned.
Much like Lubin's solution, you can again use the evaluation homomorphism where you evaluate at $0$. This sends a $f(x)\in \mathbb{Z}[x]$ to $f(0)$. This will just give the constant term. Then the set you are interested in is the preimage of the ideal $(3)$ in $\mathbb{Z}$ and the preimage of an ideal is an ideal.