# Comparing ideal class numbers of different orders

Let $P$ be a monic irreducible integral polynomial. Let $K=\mathbf Q[X]/(P)$ be the associated number field, $\mathcal O$ be its ring of integers and $R$ be the order $\mathbf Z[X]/(P)$. (In general, $\mathcal O$ and $R$ do not coincide.) Both $R$ and $\mathcal O$ have finite number of ideal classes.

My question is: how do these class numbers compare?

It seems to me that $\cdot \otimes_{R}\mathcal O$ gives a natural map from ideal classes in $R$ to ideal classes in $\mathcal O$ which is surjective if I am not wrong. But, for example, in the case where the class number of $\mathcal O$ is 1, can we control the class number in $R$?

Also: I know how to make pari/gp compute the class number in $\mathcal O$. Is there a way to have it compute the class number in $R$?

-
This is answered in: mathoverflow.net/questions/32050/… – Dror Speiser Nov 15 '12 at 15:35
By the class number in $R$, I really meant the number that appears in the Latimer-MacDuffee-Taussky theorem (en.wikipedia.org/wiki/Latimer-MacDuffee_theorem) and which is also the number of similarity classes of integral matrices with characteristic polynomial $P$. The formula that KConrad gave in the link is for the Picard group (only invertible ideals) isn't it? – Oblomov Nov 15 '12 at 21:42