Proving that an ideal is not a principal ideal At the moment I am working on a problem that asks me to prove that the set $(2,x):= 2\mathbb Z[X]+X \mathbb Z[X]$ is an ideal, but not a principal ideal.
Proving that it is an ideal is pretty easy, but I am not sure whether my way of showing it is not principal is completely correct. 
What I did was assume $(2,x)$ is principal, then there is $A:=\sum_{i=0}^na_iX^i\in\mathbb Z[X]$ such that $A\mathbb Z[X]=(2,x)$ then I chose the polynomials $2,x\in(2,x)$, then $A$ must be a common factor of both. The only common factor is obviously $1$ so $(2,x)=1\mathbb Z[X]$ which is obviously false, therefore $(2,x)$ cannot be principal.
Would this approach be correct or did miss something? Help would be greatly appreciated!
 A: You correctly state that $A(X)$ should be a common factor of $2$ and $X$. However the two facts you deem “obvious” aren't. Not difficult, but not obvious either.
Since $1\notin(2,X)$, $A(X)$ is not an invertible constant. Indeed, suppose $1=2P(X)+XQ(X)$; then evaluating at $0$ gives $1=2P(0)$, a contradiction. This is a special case of the statement that the polynomials in $(2,X)$ have even constant term, which is again proved by evaluating at $0$.
Thus $2=A(X)B(X)$, for some $B(X)\in\mathbb{Z}[X]$. Hence $A$ and $B$ have degree $0$. Since $\mathbb{Z}$ is a unique factorization domain, we conclude that $B(X)=1$ or $B(X)=-1$. Thus it's not restrictive to assume $A(X)=2$, because $-A(X)$ generates the same principal ideal as $A(X)$.
Then $X=2C(X)$, for some $C(X)\in\mathbb{Z}[X]$ and the degree of $C$ is $1$; thus $C(X)=pX+q$ and so $X=2pX+2q$ forcing $2p=1$, a contradiction.

If you replace $\mathbb{Z}$ with the ring $R=\mathbb{Z}[\frac{1}{2}]$, the ideal $(2,X)$ in $R[X]$ is instead principal (and “obviously” applies here).
