TITLE: Example of height $n$ ideal with $I/I^2$ (locally) $n$-generated, but $I$ is not.
QUESTION [6 upvotes]: For $R$, a commutative noetherian ring of dimension $d$, I'm looking for an example where $I \subset R$ is an ideal of height $n \lt d$ such that $I/I^2$ is generated by $n$ elements (locally $n$-generated is also fine), however, $I$ itself is not. Moreover, it would be greatly helpful if your response could address the geometric intuition of the example as well.

REPLY [4 votes]: Take a Dedekind domain with a non principal prime ideal $P$. Then $P/P^2$ is generated by one element but not $P$. 
Your question has negative answer because you ask too much. However, under your hypothesis $I$ is locally (on $\mathrm{Spec}(R)$) generated by $n$ elements (use Nakayama). 
EDIT I said "you ask too much" because the geometric interpretation of your hypothesis on $I/I^2$ is that there exists a homomorphism $O_X^n \to I^{\sim}$ 
of $O_X$-modules (where $X=\mathrm{Spec}(R)$, $O_X$ is the structural sheaf and $I^{\sim}$ is the coherent sheaf associated to $I$) which is surjective at points of $V(I)$ (so surjective in some open neighborhood of $V(I)$). But there is no reason that the surjectivity extends to the whole $X$.