Let $R$ be a commutative ring with identity and let $p\in R$ be a prime element (i. e. $(p)$ is a prime ideal). If $R$ is an integral domain, it can be shown that $(p^k)$ is a primary ideal for every $k\in\mathbb N$ (this reduces to $$ p^k\mid ab\quad\wedge\quad p\nmid a\quad\implies\quad p^k\mid b $$ for all $a,b\in R$). I wonder if this remains true if $R$ is not an integral domain, as I cannot find any counterexample.

3$\begingroup$ $R=\mathbf{Z}[t]/(t^2,2t)$; $k=2$, $a=2$, $b=p=t$. $\endgroup$ – YCor Jun 10 '16 at 15:49

$\begingroup$ @YCor Thanks! So even in Noetherian rings this is false (while I've found books that state the opposite...) $\endgroup$ – matthias.p Jun 10 '16 at 16:15

3$\begingroup$ And it's false also in artinian rings (replace $\mathbf{Z}$ with $\mathbf{Z}/4\mathbf{Z}$), and in reduced noetherian rings (replace $\mathbf{Z}[t]/(t^2,2t)$ with $\mathbf{Z}[t]/(t^22t)$. $\endgroup$ – YCor Jun 10 '16 at 16:16

1$\begingroup$ @YCor But in $(\mathbf Z/4\mathbf Z)[t]/(t^2,2t)$, $t$ is not a prime element, because $2\cdot2\in(t)$, but $2\notin(t)$. $\endgroup$ – matthias.p Jun 11 '16 at 10:46
This is not true for arbitrary $R$.
For example, if $R=\mathbf Z[x]/(x^22x)$, then $x\in R$ is prime and $x^2$ divides $0=x(x2)$, but $x^2=2x$ does not divide $x$ and $x$ does not divide $x2$.
Note that it is (easily) true if the ideal $(p)$ is maximal (because in this case, if $p^2$ divides $ab$ with $b\notin (p)$, then $b$ is a unit).