Irreducible polynomials with prescribed sums of coefficients
Let $q$ be a power of a prime, let $\mathbb{F}_q$ be the finite field with $q$ elements and let $n \geq 2$. For a polynomial $h(x) \in \mathbb{F}_q[x]$ of degree $n \in \mathbb{N}$ and a subset $W \subseteq [0,n] := \{0, 1, \ldots, n\}$, we define the sum-of-digits function $$S_W(h) = \sum_{w \in W}[x^{w}] h(x)$$ to be the sum of all the coefficients of $x^w$ in $h(x)$ with $w \in W$. In the case when $q = 2$, we prove, except for a few genuine exceptions, that for any $c \in \mathbb{F}_2$ and any $W \subseteq [0,n]$ there exists an irreducible polynomial $P(x)$ of degree $n$ over $\mathbb{F}_2$ such that $S_{W}(P) = c$. In particular, restricting ourselves to the case when $\# W = 1$, we obtain a new proof of the Hansen-Mullen irreducibility conjecture (now a theorem) in the case when $q = 2$. In the case of $q> 2$, we prove that, for any $c \in \mathbb{F}_q$, any $n\geq 2$ and any $W \subseteq [0,n]$, there exists an irreducible polynomial $P(x)$ of degree $n$ such that $S_{W}(P) \neq c$.