Let $k$ be a field, and $R$ a $k$-algebra. Suppose that $R\_{\mathfrak{p}}$ is a finitely generated $k$-algebra for all prime ideals $\mathfrak{p}$ of $R$. Does this imply that $R$ is also a finitely generated $k$-algebra? (I think this is false, but couldn't find a counterexample.)



If all localizations of an algebra at primes are of finite type over a field
Take any compact Hausdorff space $X$ and let $R$ consist of the locally constant functions $X\to k$. Then, $R$ is a $k$-algebra. Its prime ideals are all of the form $\mathfrak{p}=\left\{f\in R\colon f(x)=0\right\}$ for $x\in R$, so $R\_{\mathfrak{p}}\cong k$ is trivially finitely generated as a $k$-algebra. If $X$ has infinitely many connected components then $R$ is not finitely generated as a $k$-algebra. So, taking $X$ to be the one-point compactification $\mathbb{\bar N}=\mathbb{N}\cup\{\infty\}$ of $\mathbb{N}$ gives the required counterexample. Equivalently,
$$
R=\left\{x\in\prod\\_{n=1}^\infty k\colon x\_n{\rm\ is\ eventually\ constant}\right\}.
$$


