TITLE: A commutative ring in which every prime ideal is 2-generated
QUESTION [6 upvotes]: Suppose $R$ is a commutative ring with 1. There are some statements that tells us if prime ideals behave in certain way, then all the ideals will behave in that way. For example, 

If every prime ideal in $R$ is finitely generated, then every ideal in
  $R$ is finitely generated.

Similarly, we have

If every prime ideal in $R$ is principal, then every ideal in $R$ is
  principal.

I am interested in understanding what happens when we consider ideals that are 2-generated (i.e. they have two generators). So my question is:

If every prime ideal is 2-generated, then is it true that every ideal
  in $R$ needs less than or equal to 2 generators?

If the answer is affirmative, I guess the natural generalization has also answer "yes".

If every prime ideal is $k$-generated, then is it true that every
  ideal in $R$ needs less than or equal to $k$ generators?

Thanks!

REPLY [7 votes]: This answer is a summary of the above comments and some other threads mentioned there.
The ring $\mathbb{Z}[X]$ provides a counterexample to your question. To be precise, every prime ideal $\mathfrak{p} \subset \mathbb{Z}[X]$ has one of the forms: $(0)$, $(p)$, $(f)$ or $(p,f)$ where $p$ is a prime number and $f$ is an irreducible polynomial (even modulo $p$). A proof has already been given here. Particularly, every prime ideal is 2-generated.
On the other hand, the minimum number of generators of an arbitrary ideal is unbounded. In fact, for every positive integer $n$ there is an ideal $I \subset \mathbb{Z}[X]$ which needs exactly $n$ generators. Consider for example the ideal $I := (p,X)^n = (p^n, p^{n-1}X, \dots, pX^{n-1},X^n)$ which cannot be generated by fewer than $n+1$ elements. A proof has been given here.