Generators of prime ideals and factorization of polynomials Let $\alpha \in \mathbb{C}$ be a zero of a monic irreducible polynomial $f \in \mathbb{Z}[X]$. Define $K = \mathbb{Q}[\alpha]$ and $A := \mathbb{Z}[\alpha]$, then $A \subseteq O_K$, where the latter denotes the ring of integers of the number field $K$.
Let $p$ be a prime number, and assume that $f$ factors modulo $p$ as 
$$f \equiv g_1^{\alpha_1} \cdots g_k^{\alpha_k},$$
where the $g_i$ are monic and irreducible modulo $p$ (i.e., irreducible as elements in $(\mathbb{Z}/p\mathbb{Z})[X]$). Suppose further that there exist prime ideals $\mathfrak{q}_1,\ldots, \mathfrak{q}_k \subseteq O_K$ such that 
$$p O_K = \mathfrak{q}_1^{\alpha_1} \cdots \mathfrak{q}_k^{\alpha_k}$$
and such that 
$$\text{each } \mathfrak{q}_i \text{ has degree } \deg(g_i), i.e., [O_K/\mathfrak{q}_i:\mathbb{Z}/p\mathbb{Z}] = \deg(g_i).$$
(EDIT: If necessary, one may assume here that the above holds for every prime number $p$.)
Is it then true$^\star$ that
$$\mathfrak{q}_i = \langle p, g_i(\alpha) \rangle_{O_K} := p \cdot O_K + g_i(\alpha) \cdot O_K \text{ ?}$$
$\big($ $^\star$ This is meant up to ''reasonable'' permutation. E.g., if $g_i$ and $g_j$ have the same degree and $\alpha_i = \alpha_j$, then it could of course happen that $\mathfrak{q}_j = \langle p, g_i(\alpha) \rangle_{O_K}$ and $\mathfrak{q}_i = \langle p, g_j(\alpha) \rangle_{O_K}$.$\big)$
Of course, my claim holds for all but finitely many prime numbers $p$, which is precisely the Kummer-Dedekind-Theorem. To be concrete, it holds for all $p$ not dividing the index $[O_K : A]$. Hence I am asking here whether the generators of the prime ideals $\mathfrak{q}_i$ are nevertheless as predicted by Kummer-Dedekind, if we assume that $f$ and $pO_K$ have the same factorization pattern.
A few observations: 


*

*The ideals $\mathfrak{p_i} := \langle p, g_i(\alpha) \rangle_A = p \cdot A + g_i(\alpha) \cdot A$ are precisely the prime ideals in $A$ containing $p$, which is due to the isomorphisms 
$$A/pA \cong \mathbb{Z}[X]/(f,p) \cong (\mathbb{Z}/p \mathbb{Z})[X]/(f).$$

*The ideals $\mathfrak{q}_i$ are precisely the prime ideals in $O_K$ containing $p$.

*Since $O_K \mid A$ is an integral ring extension, for every $\mathfrak{p}_i$ there exists a prime ideal in $O_K$ lying over it which (necessarily) contains $p$. In particular, by 1. and 2., there is a permutation $\sigma \in S_k$ such that $\mathfrak{p}_i = \mathfrak{q}_{\sigma(i)} \cap A$. However, (to my knowledge) this is not strong enough to conclude that $\mathfrak{q}_{\sigma(i)} = \mathfrak{p}_i \cdot O_K = \langle p, g_i(\alpha) \rangle_{O_K}$. At least, we may conclude that $\mathfrak{p}_i \cdot O_K$ is a power of $\mathfrak{q}_{\sigma(i)}$.

*By the isomorphisms from 1., we know that $|A/\mathfrak{p}_i| = |(\mathbb{Z}/p\mathbb{Z})[X]/(g_i)| = p^{\deg(g_i)}$. Further, our assumptions imply that $|O_K/\mathfrak{q}_i| = p^{\deg(g_i)}$. In the notation of 3., we have a canonical injection $A/\mathfrak{p}_i \to O_K/\mathfrak{q}_{\sigma(i)}$, hence $\deg(g_i) \leq \deg(g_{\sigma(i)})$ for every $1 \leq i \leq k$, hence these must be equalities, thus even $A/\mathfrak{p}_i \cong O_K/\mathfrak{q}_{\sigma(i)}$ for every $1 \leq i \leq k$.

*Let's now involve $p$-adic numbers. By Hensel's Lemma, the factorization $f \equiv g_1^{\alpha_1} \cdots g_k^{\alpha_k}$ modulo $p$ can be lifted to a decomposition of $f$ as a product 
$$f = G_1 \cdots G_k \text{ in } \mathbb{Z}_p[X],$$
where each $G_i$ is monic and reduces to $g_i^{\alpha_i}$ modulo $p$, in particular $\deg(G_i) = \alpha_i \cdot \deg(g_i)$.

*Using the isomorphism
$$K \otimes_\mathbb{Q} \mathbb{Q}_p \cong \prod_{\substack{\mathfrak{p} \in \mathrm{Spec}(O_K) \\ \mathfrak{p} \cap \mathbb{Z} = p\mathbb{Z}}} K_\mathfrak{p},$$
where $K_\mathfrak{p}$ denotes the completion of $K$ with respect to the $\mathfrak{p}$-adic topology, the factorization 
$$p O_K = \mathfrak{q}_1^{\alpha_1} \cdots \mathfrak{q}_k^{\alpha_k}$$
(togehter with the nice properties of étale algebras) implies that the factorization of $f$ over $\mathbb{Z}_p$ consists of precisely $k$ (monic) irreducible factors, whose degrees are given by $\deg(g_i) \cdot \alpha_i$, $1 \leq i \leq k$. This proves that $G_1, \ldots, G_k$ are irreducible. 


Note that this is not a homework problem, hence my claim could possibly be wrong. Any help is appreciated!
 A: $\newcommand{\Z}{\mathbb{Z}}$No.
It is easier to construct a counter-example by starting from the local case.
Let $f\in\Z_p[X]$ be monic irreducible of degree $e>1$ such that $F = \mathbb{Q}_p[X]/f$ is totally ramified, let $\alpha = X \bmod f$, and let $v$ be the normalised valuation on $F$.
Assume that $f = X^e \bmod p$, i.e. $\alpha$ is nilpotent mod $p$, i.e. $v(\alpha)\ge 1$. The local question corresponding to yours is: is $(p,\alpha)$ the maximal ideal of $\Z_F$? Equivalently, is $\alpha$ a uniformiser, i.e. $v(\alpha)=1$?
From this local formulation it is easy to find a counter-example, for instance $f(X) = X^3-p^2$, which then also works globally.
A: As pointed out by @KConrad and utilized by @Aurel, my claim can be disproved by considering primes $p$ ramified in $K$ and dividing $[O_K : \mathbb{Z}[\alpha]]$. Finally, let us use this observation (and SageMath) to construct further counterexamples to my claim, with the additional assumption that $K = \mathbb{Q}[X]/(f)$ is a Galois extension of $\mathbb{Q}$. 
To be more concrete, let $f = X^3 + b \cdot X^2 + c \cdot X + d \in \mathbb{Z}[X]$, $K := \mathbb{Q}[X]/(f)$ and $p$ be a prime number such that


*

*$f \in \mathbb{Q}[X]$ is irreducible of degree $3$,

*$\mathrm{disc}(f)$ is a power of $p$ with even exponent,

*$\Delta_K < \mathrm{disc}(f)$,

*$f \equiv g^3$ mod $p$ for some polynomial $g \in \mathbb{Z}[X]$ of degree $1$.


Then 1. and 2. imply that $K$ is a Galois extension of $\mathbb{Q}$ of degree $3$ with Galois group $A_3$. Further, 3. implies that $[O_K : \mathbb{Z}[\alpha]]$ is a non-trivial (i.e., $>1$) power of $p$, in particular $O_K \supsetneq \mathbb{Z}[\alpha]$. Since $\Delta_K > 1$ and $\Delta_K \mid \mathrm{disc}(f)$, this implies that there is precisely one ramified prime dividing $[O_K : \mathbb{Z}[\alpha]]$, namely $p$. Since $[K:\mathbb{Q}] = 3$ is prime and $K$ is Galois, there is only one possible splitting behaviour for $p$ in $O_K$, namely, $pO_K = \mathfrak{p}^3$ for some $\mathfrak{p} \in \mathrm{Spec}(O_K)$ of degree $1$. By 4., we see that $f$ mod $p$ and $p$ in $O_K$ hence have the same splitting behaviour. By a similar argument as in @Aurel's answer (and having in mind that $g = X+n$ for some $0 \leq n < p$), we conclude that $f$ provides a counterexample to my claim.
For instance, let $p=3$, and assume that $0 \leq a,b,c \leq 100$. Using SageMath, we obtain the following $10$ possible choices:
$$f = X^3 + 9X^2 + 18X + 9$$
$$f = X^3 + 12X^2 + 39X + 19$$
$$f = X^3 + 12X^2 + 39X + 37$$
$$f = X^3 + 15X^2 + 48X + 17$$
$$f = X^3 + 15X^2 + 66X + 71$$
$$f = X^3 + 15X^2 + 66X + 89$$
$$f = X^3 + 18X^2 + 81X + 27$$
$$f = X^3 + 18X^2 + 81X + 81$$
$$f = X^3 + 21X^2 + 66X + 19$$
$$f = X^3 + 27X^2 + 54X + 27$$ 
Additional remark: Let $f = X^3 + 18X^2 + 81X + 27$, then (since $f$ appears in the above list) we have $O_K \supsetneq \mathbb{Z}[\alpha]$, where $\alpha$ is (as usually) a zero of $f$. However, according to SageMath, it turns out that $O_K = \mathbb{Z}[\alpha/3]$.
