TITLE: Can an ideal in a commutative integral domain be its own square?
QUESTION [13 upvotes]: If $I$ is a non-zero proper ideal of a commutative integral domain,
is it possible for $I$ to be its own square?

REPLY [8 votes]: Let $D$ be the subalgebra of $k(x, y)$ generated by the sequence of rational functions
$$x_1 = x$$
$$x_2 = y$$
$$x_n = \frac{x_{n-2}}{x_{n-1}}$$
and let $I = (x_1, x_2, x_3, ...)$. By construction, $x_n = x_{n+1} x_{n+2}$, so every element of $I$ is an element of $I^2$, and $D$ is a subring of a field, hence an integral domain. $I$ is proper since $D/I \cong k$ and is nonzero since it consists of nonzero elements of a field.