Is each power of a prime ideal a primary ideal?

I want to show that each power of a prime ideal is a primary ideal or I have to think about a counterexample?


Just to clear this from the list of unanswered questions, here's a fleshed-out version of the counterexample on Wikipedia:

Consider the ideal $P=(x,z)$ in $k[x,y,z]/(xy-z^2)$. I will denote equivalence of elements in this ring by $\equiv$ and equivalence in the ring $k[x,y,z]$ by $=$. $P$ is prime, since $$\frac{k[x,y,z]/(xy-z^2)}{(x,z)}\cong \frac{k[x,y,z]}{(x,z,xy-z^2)}\cong k[y]$$ is an integral domain. However, $P^2=(x^2,xz,z^2)$ contains $xy\equiv z^2$ but does not contain $x$, as if $$x=fx^2+gxz+hz^2+p(xy-z^2)$$ then setting $x=0$ shows that $h-p=qx$ so $$x=fx^2+gxz+pxy+qxz^2=(fx+gz+py+qxz)x\implies fx+gz+py+qxz=1$$ which can be see to be impossible by evaluating at $x=y=z=0$. It also does not contain $y^n$ for any $n$, as if $$y^n=fx^2+gxz+hz^2+p(xy-z^2)$$ then setting $x=z=0$ gives a contradiction. Thus $P^2$ is a power of a prime which is not primary.


One may even find such an example in the polynomial ring $k[x,y,z]$: the ideal $I=\langle x^3-yz, y^2-xz, z^2-x^2y\rangle$ is prime but $I^2$ is not primary as explained in Northcott, Ideal Theory, Example 3, p. 29.


Alex Becker answered this question completely, but I would like to give another example, which shows the failure can be even more acute: there in fact exist principal prime ideals with powers that are not primary. Indeed, consider the ideal $P=(\overline{x})$ in the ring $R:=F[x,y]\big/(x^2y)$, where $F$ is your favorite field. $P$ is prime, since $(x)$ is a prime ideal of $F[x,y]$ containing $(x^2y)$. However, we claim the ideal $I=P^3=(\overline{x^3})$ is not primary. To see this, let $a=\overline{x^2}$ and $b=\overline{y}$. Then $ab=\overline{0}$ and thus lies in $I$. Note that $a\notin I$, since $x^2$ does not lie in the ideal $(x^3,x^2y)<F[x,y]$, which is the preimage of $I$ under the projection map $F[x,y]\to R$. (Every non-zero element of that ideal has degree at least $3$.) However, we also have $b\notin\sqrt{I}=P$, since $y\notin (x)$ in $F[x,y]$. Thus $I$ is a power of a principal prime ideal, but not primary, and so gives the desired counterexample. I find this behavior somewhat surprising (for instance, it cannot occur in integral domains), which I've why I've included this example.

Exercise: Show that, if $R$ is an integral domain, then every power of a principal prime ideal of $R$ is primary.