Irreducible factors for $x^q-x-a$ in $\mathbb{F}_p$.

Let $\alpha\in\overline{\Bbb{F}}_p$ be a root of $f_a$. We want to find the minimal polynomial of $\alpha$. To that end we need to figure out how many conjugates $\alpha$ has in $\overline{\Bbb{F}}_p$. As $\alpha$ is a zero of $f_a$ $$ \alpha^q=\alpha+a,\quad \alpha^{q^2}=\alpha^q+a^q=\alpha+2a,\quad \alpha^{q^3}=\alpha+3a $$ et cetera. Therefore $\alpha^{q^p}=\alpha+pa=\alpha$. This already tells us that $\alpha$ has exactly $p$ conjugates over $\Bbb{F}_q$, and that its minimal polynomial over $\Bbb{F}_q$ is $$ m_{\alpha, q}=\prod_{j=0}^{p-1}(x-\alpha-ja). $$ It is known that $P(x):=x^p-x=\prod_{j=0}^{p-1}(x-j)$, so $$ x^p-a^{p-1}x=a^pP(\frac xa)=\prod_{j=0}^{p-1}(x-ja). $$ Therefore $$ m_{\alpha, q}(x)=(x-\alpha)^p-a^{p-1}(x-\alpha)=x^p-a^{p-1}x-(\alpha^p-a^{p-1}\alpha)=x^p-x-P(\alpha), $$ because $a^{p-1}=1$ by Little Fermat. So over $\Bbb{F}_q$ the polynomial $f_a(x)$ splits into a product of $p^{m-1}$ factors of degree $p$. As the derivative $f'_a(x)=1$ is coprime to $f_a$, the factors are distinct, so the constant term $P(\alpha)$ takes $p^{m-1}$ distinct values in $\Bbb{F}_q$. Next we identify the set of those constant terms. To that end we recall the definition of the trace function from $\Bbb{F}_q$ to $\Bbb{F}_p$: $$ tr(z)=z+z^p+z^{p^2}+\cdots+z^{p^{m-1}}=\sum_{j=0}^{m-1}z^{p^j}. $$ Trace a surjective function and linear over $\Bbb{F}_p$. Therefore it takes all the values in the prime field exactly $p^{m-1}$ times. But $$ tr(P(\alpha))=\sum_{j=0}^{m-1}P(\alpha)^{p^j}=\sum_{j=0}^{m-1}(\alpha^{p^{j+1}}-\alpha^{p^j})=\alpha^{p^m}-\alpha=a, $$ because the sum telescopes. Therefore we get the factorization $$ f_a(x)=\prod_{z\in\Bbb{F}_q, tr(z)=a}(x^p-x-z) $$ in the ring $\Bbb{F}_q[x]$.

Over $\Bbb{F}_p$ the picture is more complicated. The question is how those factors combine to form irreducible polynomials in $\Bbb{F}_p[x]$.


Quick Edit explaining what I think happens over the smaller field. I'm fairly sure that this is correct, but I don't have the time to fill in everything right now.

Above we saw that over $\Bbb{F}_q$ the factors are of the form $x^p-x-z$ such that $z\in\Bbb{F}_q$ satisfies the trace condition $tr(z)=a$. To get the irreducible factors in $\Bbb{F}_p[x]$ we simply need to multiply together conjugates factors of this type. So if the conjugates of $z$ are $z$, $z^p$, $z^{p^2}$, $\ldots$, $z^{p^{k-1}}$ (,$z^{p^k}=z$), then $k\mid m$, and the minimal polynomial of $z$ is $$ m_z(x)=(x-z)(x-z^p)\cdots(x-z^{p^{k-1}})\in\Bbb{F}_p[x]. $$ Now the corresponding factor of $f_a(x)$ is a similar product of the factors $(x^p-x-z^{p^i})$, $i=0,1,\ldots,k-1.$ This product clearly equals $m_z(x^p-x)$. Thus the factorization of $f_a(x)$ in the ring $\Bbb{F}_p[x]$ is $$ f_a(x)=\prod_{z\in D}m_z(x^p-x), $$ where $D$ is a set of representatives of Galois conjugacy classes of elements of $\Bbb{F}_q$ with the property $tr(z)=a$.

Example: Let $p=2$, $m=3$, $a=1$, so $f_a(x)=f_1(x)=x^8-x-1$. In the field $\Bbb{F}_8$ there are four elements with trace $=1$. Namely $z_1=1$ and the three roots ($z_2,z_3,z_4$)of the irreducible polynomial $x^3+x^2+1\in\Bbb{F}_2[x]$. The respective minimal polynomials are thus $m_1(x)=x+1$ and $m_2(x)=x^3+x^2+1$. Therefore the above theory gives the factorization $$ f_1(x)=x^8+x+1=m_1(x^2+x)m_2(x^2+x)=(x^2+x+1)(x^6+x^5+x^3+x^2+1), $$ which checks out.