number of generators of maximal ideals in an order of a number field

let $K$ be a number field of degree $d$ over $\mathbb{Q}$), Let $\mathcal{O}\subset K$ be an order (i.e. a $\mathbb{Z}$-lattice of $K$ contained in the integer ring $\mathcal{O}_K$ of $K$). If $\mathcal{O}= \mathcal{O}_K$, we know that any maximal ideal in $\mathcal{O}_K$ can generated by 2 element. So what's the case in general?

Maybe I should ask a more general question, let $A$ be $\mathbb{Z}$-algebra, and finite free of rank$=d$ as a $\mathbb{Z}$-module, what can we say about the number of generators of maximal ideals of $A$ (in terms of $d$), for example, we have a trivial upper bound $d.$

PS: I asked this question on MSE,https://math.stackexchange.com/questions/1486422/number-of-generators-of-maximal-ideals-in-an-order-of-a-number-field but got no answer.

A special case of the general question, say $A$ is an order in a finite product of field $\prod_{i=1}^n K_i$, i.e. $A\subset \prod \mathcal{O}_{K_i}$ with rank $d=\Sigma [K_i:\mathbb{Q}]$, what's the upper bound of number of generators of maximal ideals of $A$ (in terms of $d$ and $n$). If $A$ is the product of orders in all fields, then we can say something easily (see the answer by @Matthias Wendt). So maybe the question is the structure of $A$?

• What do you mean by a $\mathbb Z$-algebra? Usually algebras are defined over fields. Oct 21 '15 at 16:08
• @Kimball: The definition I'm familar with is: An extension $S$ of $R$ of rings $R,S$ is a ring homomorphism $R \to S$. If $R$ is in addition commutative, $S$ is called an $R$-algebra. Oct 21 '15 at 20:29
• In the $R$-algebra $A=R[x_1,x_2,...,x_n]/J^2$ where $J=(x_1,x_2,..,x_n)$ the image of $J$ in $A$ needs $n$ generators, and $A$ is free over $R$ of rank $n+1$, so basically the trivial upper bound is essentially the best you can do in the generality you've written your question.
– eric
Oct 21 '15 at 20:41
• Please edit in a link to the m.se post, and also put a link to this post there. Oct 21 '15 at 22:27

Theorem 3.6 in there states that an order $R$ in a number field $K$ has the property that every ideal is generated by $2$ elements if the discriminant does not contain a fourth power. Example 3.8 gives $\mathbb{Z}[2\cdot\sqrt[3]{5}]$ as an example that does not have this property. The paper also contains statements on group rings, and of course links to further literature; apparently, the question of 2-generator rings was well-studied at some point.