I always thought an ideal generated by a subset $S=\{a_1,a_2,\dots,a_n\}$ of a ring $R$ would be defined as $(S)=\{a_1r_1 + a_2r_2 +\cdots+ a_nr_n\}$ where the $a_i$'s come from the set $S$ and the $r_i$'s are elements of the Ring $R$.
If I go by this, then an ideal generated by $S=\{2,x\}$ in $\mathbb Z[x]$ will look like $$ (S)=(2,x)=\{f(x)\cdot 2 + g(x)\cdot x\} $$ such that $f(x)$ and $g(x)$ are polynomials from $\mathbb Z[x]$.
For a generator $d$ of such an ideal to exist such that $(2,x)=(d)$, then $d$ must be a polynomial of zero degree so that it divides $2$. I am not able to proceed further. And so also $x$ must divide $d$. This means d must be a polynomial of degree $> 0$. This is a contradiction I believe.
I dont know if my arguments are right.
Can someone kindly assist me?