I'm currently trying to figure out primary ideals and I think I proved the following geometric statement, but I'm not sure if I did it right and would like to have some feedback.
Lemma: An ideal $\mathfrak{a}$ of a commutative ring $A$ is primary if and only if $\text{Spec}(A/\mathfrak{a})$ is irreducible.
Proof: First note that $\text{Spec}(A/\mathfrak{a})$ is irreducible if and only if $\sqrt{(0)} \subset A / \mathfrak{a}$ is a prime ideal. Now suppose $\mathfrak{a}$ is primary, and $\bar x \cdot \bar y \in\sqrt{0} \subset A / \mathfrak{a}$. Then $x^n\cdot y^n = (xy)^n \in \mathfrak{a}$ for some $n \in \mathbb{N}$, so either $x^n \in \mathfrak{a}$ or $(y^n)^m \in \mathfrak{a}$ for some $m \in \mathbb{N}$. I.e. either $x \in \sqrt{(0)}$ or $y \in \sqrt{(0)}$.
Conversely, suppose $x \cdot y \in \mathfrak{a}$. Then either $x$ or $y$ is nilpotent modulo $\mathfrak{a}$, i.e. $x^n \in \mathfrak{a}$ or $y^n \in \mathfrak{a}$.
I'm still not 100% sure that I'm done here, because I only have $x^n \in \mathfrak{a}$, not $x\in \mathfrak{a}$. Am I missing something, or is the claim wrong? If so, I would like to see a counterexample.
The lemma I wrote above is wrong. The proof actually shows
Clearly, any primary ideal satisfies this, so quotients of primary ideals have irreducible prime spectrum, but this condition is strictly weaker. Here is a counterexample.
A similar characterisation of primary ideals which can be found here would be: