# All ideals of $\mathbb Z[x]$ are of the form $\langle n\rangle\langle f(x)\rangle, \langle n,f(x)\rangle$, attempt inside but not complete

How can we show this is true? Here $f(x)$ is any degree $1$ and higher polynomial in $\mathbb Z[x].$ I've tried saying suppose I is not equal to $\langle n\rangle$ or $\langle f(x)\rangle$, and then through a series of arguments show that it must be $\langle f(x),n\rangle$ for some f and n.I have chosen f to be the smallest positive degree polynomial in my ideal. Then choose an element in the ideal that is not a multiple of $f(x).$ Then $f$ doesn't divide $g,$ and hence $g= fq + r$, where $r$ must be of degree 0 by minimality of the degree of $f.$ So then we have a constant $r$ (not equal to $0$ or $1$) that's in the ideal. Now any other poly $h$ in I that isn't a multiple of $f$ must have remainder a constant by the same reasoning. Now if this constant remainder is coprime with $r,$ then $1$ is in the ideal and we get a contradiction. So only elements whose constant remainder with $f$ has a factor in common with $r$ are in $I$. If $r$ is prime, we would be done as then all remainders would be a multiple of $r$, hence we would have $I= \langle f(x), r\rangle$. But if $r$ is not prime, I don't know how to proceed. Could someone help or give an easier proof? Thanks! Edit: Sorry there was formatting issues, I've fixed it.

Hmm, you have a problem with your use of division. For the division-with-remainder to work in $\Bbb{Z}[x]$ you need the denominator $f$ to be monic (leading coefficient 1, or at least leading coefficient a unit), but it might not be. Can you write $(4,2x,x^2)$ in your desired format? So I think you are trying to prove something that isn't true.
To complete your proof, think about the collection of all the remainders you get from all polynomials which are not multiples of $f$; they form an ideal in $\mathbb{Z}$, and all ideals in $\mathbb{Z}$ are generated by one integer (the greatest common divisor). So you can still get an integer $n$.
You should be a bit more careful with your statement $g = fq+r$ though; consider the case $f = 2x$ and $g = 3x^2 + 1$. How can you express $g = fq+r$?
If you know about Gauss's Lemma, you can modify your proof to consider polynomials in $\mathbb{Q}[x]$, where you can divide polynomials like this, and then argue from them to polynomials in $\mathbb{Z}[x]$.
• @PaulDavis C Monsour is correct. Indeed more is true. She/he points out that there are ideals in $\Bbb Z[x]$ that require three generators. In fact for any $n\in\Bbb N$, there are ideals which require $n$ generators. – Angina Seng Apr 30 '18 at 1:28