Prove or counterexample: If A is a commutative ring and $A_p$ is a finitely generated algebra over A for all prime ideal p of A, then A is a product of local rings.
Here is a counterexample. Let p and q be distinct prime numbers, let S denote the complement of {p,q} in the set of all primes, and let A denote Z[1/S]. Then the prime ideals of A are pA, qA, and {0}, the first two of which are maximal. Also, since A is domain (being a subring of Q) with two maximal ideals, it's not a product of local rings. On the other hand, the local rings at the various prime ideals are A[1/q], A[1/p], and A[1/p,1/q], which are clearly finitely generated as Aalgebras. 


In the case that $A$ is noetherian and we replace finitely generated as an algebra with finitely generated as a module we can argue as follows. We have for any choice of minimal prime ideal $P$ of $\mathrm{Spec} A$ that $A_P$ is flat and finitely presented hence projective. It is also an artinian local ring. As it is projective the corresponding sheaf is locally free on $\mathrm{Spec} A$. But $$\mathrm{Supp} A_P = \mathrm{Spec} A_P$$ so that if $\mathrm{Spec} A$ were connected it would have to agree with the spectrum of $A_P$ since a locally free sheaf has constant rank on connected components. Thus $A$ is in fact artinian and local. $$ $$ If $A$ does not have connected spectrum then we can rewrite $A$ as $A_P \times A_1$. Where $A_P$ doesn't split up at all. We then just keep playing the same game (next with $A_1$) which terminates since $A$ is noetherian so has finitely many connected components and we in fact see that $A$ is a product of artinian local rings. The stronger hypotheses I have are probably only somewhat necessary. I don't see a problem (except one needs to remove the word artinian) if one just assumes that the localizations are finitely presented as modules  there is the issue of whether or not this terminates but if you have an infinite product you also pick up extra prime ideals via choice and I have no idea what localizing at one of those would look like so I am not quite sure if this causes problems. 


I think it's correct. Since the localization A_p is finitely generated over A for any prime ideal p, A has only finite maximal ideals. Now A is a semilocal ring, which is also a a product of local rings. The following link maybe helpful http://www.mathreference.com/ringjr,sloc.html 

