Recall that an ideal of a commutative ring is said to be a nil ideal if each of its elements is nilpotent. I am looking for a non-zero nil ideal of a commutative ring that is idempotent.
2 Answers
Consider the ring $A:=k[X^{\mathbb{Q}_{\geq 0}}] / X$ of polynomials with non-negative rational exponents with the relation $X^1=0$. Then the ideal $I:=\operatorname{span}_k\{X^a \mid 0<a<1\}$ is nil, because every $X^a$ is nil. But it is also idempotent because $X^a=(X^{a/2})^2$.
Let $R$ be the free abelian group generated by elements $t^a$ for $a\in\mathbb{Q}$ with $0\leq a<1$. This has an evident ring structure given by $t^at^b=t^{a+b}$ if $a+b<1$, and $t^at^b=0$ if $a+b\geq 1$. Let $I$ be the span of the terms $t^a$ with $a>0$. Then $I$ is a nil ideal that is also idempotent.