I am trying to prove that if $I$ is an ideal of $\mathbb{Z}[x]$ then $I$ is generated by $x$ and the least positive integer in $I$. But I need help in finishing the proof.
If there are no positive integers, i.e., constant polynomials (other than $0$, of course) in $I$ then $I=(x)$. Otherwise, let $a$ be the least positive integer present in $I$.
Let $p(x)=a_n x^n + a_{n-1} x^{n-1} + \ldots + a_1 x + a_0$ be a polynomial in $I$. It is enough to show that $a$ divides $a_0$ to prove my claim. By the division algorithm, there are integers $q,r$ with $0\le r< a$ such that $a_0 = qa + r$. Thus, $p(x)=a_n x^n + a_{n-1} x^{n-1} + \ldots + a_1 x + qa + r$. Then $r= p(x)-a_n x^n - a_{n-1} x^{n-1} - \ldots - a_1 x - qa$.
Now, if $r$ was in $I$ then we would be done because then $r=0$. But how do I show that $r \in I$?