## Is there an example of a scheme X whose reduction X_red is affine but X is not affine?

For Noetherian schemes this follows from Serre's criterion for affineness by a filtration argument.

-

No, if X is any algebraic space such that X_red is an affine scheme, then X is an affine scheme. This follows from Chevalley's theorem. For X noetherian scheme/alg. space this theorem is in EGA/Knutson. As you noted, this can also be showed using Serre's criterion for affineness or by an even simpler argument (see EGA I 5.1.9, first edition).

For X non-noetherian, the following general version of Chevalley's theorem is proved in my paper "Noetherian approximation of algebraic spaces and stacks" (arXiv:0904.0227):

Theorem: Let W->X be an integral and surjective morphism of algebraic spaces. If W is an affine scheme, then so is X.

Recall that any finite morphism is integral, in particular X_red -> X. As a corollary, it follows that under the same assumptions, if W is a scheme then so is X.

-

I'm not sure this is a correct answer, but I can't post comments yet -- consider this a comment.

How about you take a limit over lots of nilpotent schemes with the same X_red?

-