Here is the question I am trying to know its correct answer:
Let $I \subset \mathbb Z[x]$ be the set of all polynomials whose coefficient of $x^2$ is a multiple of 3. Is $I$ an ideal of $\mathbb Z[x]$?
My solution:
Yes it is, as it is a subgroup of $\mathbb Z[x]$ and it absorbs the elements of $\mathbb Z.$ but my professor told me that this is wrong.
Could someone clarify to me why this is wrong please?
In order to show that your subset $I\subset \mathbb Z[X]$ is an ideal, it must be checked that $I$ is closed under addition (i.e. that it is a subgroup of $\mathbb Z[X]$, which is true) and that $I$ is closed under multiplication by any element in $\mathbb Z[X]$ (not only by elements in $\mathbb Z$, as you wrote).
For example, $3X^2+X\in I$; but $X\cdot (3X^2+X)=3X^3+X^2\notin I$.