Cycle type in Galois group from ramified primes Let $P \in \mathbb Z[X]$ be monic, separable, of degree $d$, $K$ its splitting field over $\mathbb Q$ and $G$ the Galois group of $K$ over $\mathbb Q$.
Now, let $p$ be a prime number unramified in $K$. If $P \text{ mod } p$ factorizes as a product of $n_1$ linear factors, $n_2$ quadratic irreducible factors, $\dots, n_d$ irreducible factors of degree $d$, then we know that $G$ contains a permutation of cycle type $(n_1, n_2, \dots, n_d)$ by lifting the Frobenius automorphism of the extension $(\mathcal O_K/\mathfrak p)/\mathbb F_p$ to $G$, where $\mathfrak p$ is any prime ideal of $\mathcal O_K$ above $p$.
My question is : what happens at ramified primes $p$ ? What kind of cycle type can we get from factorizations of $P \text{ mod } p$ with multiplicities ?
I know every lift of the Frobenius is of the form $\sigma \tau$ where $\sigma$ is a fixed lift and $\tau \in I_p$, the inertia subgroup at $p$, but that doesn't tell me much about its cycle type. I don't know what to expect from an irreducible factor of degree $k$ with exponent $m$ in $P \text{ mod } p$. Does it imply there is a permutation with a corresponding sequence of $m$ distinct $k$-cycles ?
 A: It does not imply there is such a permutation in the Galois group, and your question has an interesting history.
First of all, I would say the question you ask is arguably the wrong one: the more natural object to focus on is a prime ideal factorization of $p$, not a factorization of a polynomial mod $p$.
Let $F = \mathbf Q(\alpha)$ where $\alpha$ has minimal polynomial $\varphi(x)$ over $\mathbf Q$ of degree $n$ and $L$ is the Galois closure of $F$ over $\mathbf Q$. For a prime number $p$, let the ideal
$p\mathcal O_F$ have $g$ different prime ideal factors with ramification indices and residue field degrees  $e_i$ and $f_i$ for $i = 1, \ldots, g$. Frobenius asked if there is an element of ${\rm Gal}(L/\mathbf Q)$ that permutes the $n$ roots of $\varphi(x)$ with $e_i$ disjoint cycles of length $f_i$ for $i = 1, \ldots, g$. This is a better way to pose the question you're asking. Frobenius (and Dedekind) knew the answer is yes when $p$ is unramified in $F$. What if $p$ is ramified in $F$? Frobenius conjectured in 1882 that the answer is still yes.
However, there are counterexamples when $p$ is ramified. None were known until the 1990s, when Thomas Hawkins asked Jean-Pierre Serre about the conjecture of Frobenius. (The 100+ year wait for counterexamples was simply because the conjecture had been forgotten, not that it really needed 100 years of progress in math.) Serre provided counterexamples, first with $n = 10$ and later with $n = 6$.  This is discussed in Hawkins' book The Mathematics of Frobenius in Context. The conjecture is Conjecture 9.17 on page 323 and the counterexample of degree $6$ is built up in Section 9.3.4. I'll now show you what that counterexample is.
Take $\varphi(x) = x^6 - 3x^5 - 5x^4 + 15x^3 - 12x^2 + 4x-4$, which is irreducible over $\mathbf Q$ with Galois group over $\mathbf Q$ being  isomorphic to $S_4$. (In the book, Hawkins gives some motivation for this: Serre did not just create it out of nothing.) The Galois group acts on the $6$ roots of $\varphi(x)$ as even permutations.  For a root $\alpha$ of $\varphi(x)$, $F := \mathbf Q(\alpha)$ has degree $6$ over $\mathbf Q$ and $3\mathcal O_F = \mathfrak p^2\mathfrak q$, where $\mathfrak p$ and $\mathfrak q$ have residue field degree $2$ ($6 = 2 \cdot 2 + 1 \cdot 2$). But no element of ${\rm Gal}(L/\mathbf Q)$ acts on the $6$ roots as a permutation with cycle type $(2,2,2)$ since such permutations are odd permutations of the roots.
In this example, $\varphi(x) \equiv x^4 (x^2+2x+2) \bmod 3$, so the way $3\mathcal O_F$ factors is not reflected in the way $\varphi(x) \bmod 3$ factors.  That is no surprise: the Dedekind-Kummer theorem relating the factorization of a polynomial mod $p$ and the prime ideal factorization of $p\mathcal O_F$ need not be valid at primes dividing the discriminant of the polynomial.  (Note in the example above that $\mathcal O_F \not= \mathbf Z[\alpha]$.)
In the MAA review of Hawkins' book by David Roberts here, a different counterexample of degree $6$ is given: $\Phi(x) = x^6−6x^4+6x^2−6+2$. Like $\varphi(x)$, $\Phi(x)$ is irreducible over $\mathbf Q$ and its Galois group over $\mathbf Q$ is $S_4$ acting as even permutations of the $6$ roots of $\Phi(x)$.  When $F = \mathbf Q(\alpha)$ for $\alpha$ a root of $\Phi(x)$, $5$ is ramified with decomposition $\mathfrak p^2\mathfrak q$ where the prime ideals have residue field degree $2$. As in the previous example, no element of the Galois group of $\Phi(x)$ can act on the roots of $\Phi(x)$ as a permutation with cycle type $(2,2,2)$ since that would be an odd permutation. This time the gods are shining down on us, since the factorization of $\Phi(x) \bmod 5$ matches the factorization of $5\mathcal O_F$: $\Phi(x) \equiv (x^2+x+2)^2(x^2+3x+3) \bmod 5$. So this is a counterexample to the exact question you asked even though I first said it was not really the right way to ask the question.
Ultimately this false conjecture of Frobenius is not important, since the way we really use results like this (turning the shape of a prime ideal factorization into the shape of a permutation on the roots in a Galois group) is in Chebotarev-type applications, for which a finite set like the set of ramified primes is negligible. Still, it is a question you can ask and it's nice to have it settled.
