TITLE: Local complete intersections which are not complete intersections
QUESTION [29 upvotes]: The following definitions are standard:
An affine variety $V$ in $A^n$ is a complete intersection (c.i.) if its vanishing ideal can be generated by ($n - \dim V$) polynomials in $k[X_1,\ldots, X_n]$. The definition can also be made for projective varieties.
$V$ is locally a complete intersection (l.c.i.) if the local ring of each point on $V$ is a c.i. (that is, quotient of a regular local ring by an ideal generated by a regular sequence).
What are examples (preferably affine) of l.c.i.  which are not c.i. ? I have never seen such one.

REPLY [2 votes]: Varieties in an affine space.

in characteristic zero any lci $X\subseteq\mathbb{A}^n$ is a set-theoretic complete intersection.
In characteristic $p$ any lci curve $C\subseteq\mathbb{A}^n$ is a set-theoretic complete intersection.

Projective varieties 
Let $X\subseteq\mathbb{P}^n$ be a smooth non-degenerate degree $p$ (a prime number) variety of codimension $c$. Then $X$ is not a scheme-theoretic complete intersection. Indeed, if $X = H_1\cap H_2\cap...\cap H_c$, then $deg(H_2)=...=deg(H_c) = 1$ and $deg(H_1) = p$ by Bezout's theorem because $p$ is prime. Therefore $X$ would be degenerate. An example is again the twisted cubic $C\subset\mathbb{P}^3$. However $C$ is a set-theoretic complete intersection. There exist a quadric surface $Q$ and a cubic surface $S$ such that $Q\cap S = 2C$ (i.e. $Q$ and $S$ are tangent along $C$). 
Hartshorne Conjecture: If $X\subseteq\mathbb{P}^N$ is a smooth variety of dimension $n$, codimesnion $c$ and $c\geq 2n+1$ then $X$ is a scheme-theoretic complete intersection. 
Hartshorne Conjecture has been proven for Fano varieties of codimension two and quadratic varieties (i.e. varieties that can be defined just by quadratic polynomials).
Thanks to Barth’s result: Barth, W.: ”Transplanting cohomology classes in complex-projective
space”, Amer. J. Math., 92, 951-967 (1970),  and since no indecomposable rank
two vector bundle on $\mathbb{P}^N$, $N\geq 5$, is known, it is generally believed that any
smooth, codimension two subvariety of $\mathbb{P}^N$, $N \geq 6$, is a complete intersection. The main results for codimension two subvarieties can be summarized as follows: let $\omega_X\cong \mathcal{O}_X(e)$, $d$ the degree of $X$ and $s$ the minimal
degree of an hypersurface containing $X$. if $e \leq N + 1$ or if $d < (N − 1)(N + 5)$ or if $s \leq N − 2$, then $X$ is a complet intersection. For $N = 5,6$ we can something more: let $X \subset \mathbb{P}^6$ be a smooth, codimension two subvariety, if $s\leq 5$ or if $d \leq 73$, then $X$ is a complete intersection. Let $X \subset \mathbb{P}^5$ be a smooth, subcanonical threefold. If $s \leq 4$, then $X$ is a complete intersection. This is Theorem 1.1 of http://arxiv.org/abs/math/9909137.