It is clear that for any $n$ there is a ring $R$ with exactly $n$ prime ideals (e.g., consider a product of $n$ fields). Can one construct such a ring whose prime ideals form a chain? 


I can show that such rings do exist: Let $X$ be the set with $n$ points $x\_1$, ..., $x\_n$ and define a topology on $X$ with open sets $\emptyset$, $X$, $\{x\_1\}$, $\{x\_1,x\_2\}$, ..., $\{x\_1,...,x\_n\}$. Then $X$ with this topology is a spectral space, which means that there exists a ring $R$ such that $Spec(R)$ is homeomorphic to $X$. Then clearly this $R$ has exactly $n$ prime ideals and they form a chain.



Lattice of prime ideals
First, construct a totally ordered group $G$ of height $n$ by iterating the construction in Bourbaki's *Algèbre commutative,* VI.4.2 Exemple 1. Second, construct a valuation ring $A$ with group of values $G$ following the recipe in *loc.cit.,* VI.3.4 Exemple 6. Then, the spectrum of $A$ has cardinality $n$ and is totally ordered by inclusion.


