Existence of algebraic integers with certain properties

You can even construct such a polynomial for any totally real field $K$ of degree $n$. By Dirichlet's theorem, the unit group $U$ of $K$ maps to

$$U \rightarrow (K^* \otimes \mathbf{R}) \stackrel{\log| \cdot |}{\longrightarrow} \mathbf{R}^{n},$$

and the image is a lattice $L$ (of rank $n-1$) in the co-dimension one subspace of elements which sum to zero. In particular, such a lattice always contains elements in any orthant corresponding to the first $k$ entries being negative and the next $n-k$ being positive for $k \ne 0,n$. If $\lambda \in L$ is any such element then the corresponding $u \in U$ will have a minimal polynomial of the required form, up to the irreducibility condition.

It remains to show that one can also choose such units which generate the field $K$. But this is easy, because the units which lie in the (finitely many) proper subfields of $K$ give rise to subgroups of the unit group of smaller rank. (This only uses that $K$ is not a totally imaginary CM extension). And certainly $L$ minus the corresponding subgroups will still have many elements in the appropriate orthant. Replacing the orthants by cones one can extend this argument to find units with even more restrictive conditions.


@orthodontist has already given a clean and educated answer to my question. Nevertheless let me include an elementary answer, tweaking Vijayaraghavan's construction. The calculations are not terribly ugly after all.

Fix integers $$ \ell_1>\cdots>\ell_{n-k}>0>\ell_{n-k+1}>\cdots>\ell_n $$ whose sum is $0$ and such that $\ell_i-\ell_{i+1}\ge 2$ for each $i\in\{1,\dots,n-1\}$. Let $e_0:=0$ and $e_i:=\ell_1+\cdots+\ell_i$ for $i\in\{1,\dots,n\}$. Let $b \ge 3$ be another integer. I claim that the polynomial $$ P(x) := \sum_{i=0}^n (-1)^i b^{e_i} x^{n-i} $$ has the required properties $(\star)$ (except perhaps for irreducibility). To begin, note that $e_i \ge 0$ for each $i$ and so $P$ has integer coefficients. Furthermore, it is monic, has constant term $(-1)^n$.

In order to locate the roots of $P$, fix integers $c_1, \dots, c_{n-1}$ such that $$ \ell_1>c_1>\ell_2>c_2>\cdots>c_{n-1}>\ell_n \quad \text{and} \quad c_{n-k}=0. $$ Fix $j\in\{1,\dots,n-1\}$. I claim that in the expression $$ P(b^{c_j}) = \sum_{i=0}^n (-1)^i b^{e_i + (n-i)c_j} , $$ the dominant term corresponds to $i=j$. Indeed, the sequence of integers $$i \in \{0,\dots,n\} \mapsto e_i + (n-i)c_j$$ is increasing for $i$ in the interval $\{0,\dots,j\}$, and decreasing afterwards. Using the fact that $2\sum_{r=1}^\infty b^{-r} \le 1$ (i.e. $b \ge 3$) we conclude that the sign of $P(b^{c_j})$ is $(-1)^j$. By the intermediate value theorem, $P$ contains a root in each of the intervals $$ (0, b^{c_{n-1}}), \ (b^{c_{n-1}},b^{c_{n-2}}), \ \dots, \ (b^{c_2},b^{c_1}), \ (b^{c_1},+\infty) \, . $$ Since $b^{c_{n-k}}=1$, we conclude that $P$ has $k$ simple roots on the interval $(0,1)$ and $n-k$ simple roots on the interval $(1,+\infty)$.


EDIT: Getting irreducibility (Thanks @GabeConant for pointing the error of the previous "argument".)

Let $z_1>\dots>z_n$ be the roots of $P$. The construction actually ensures that: $$ b^{\ell_i - 1} < z_i < b^{\ell_i + 1} \quad \text{for each } i. $$ Obviously, $\prod_{i=1}^n z_i = 1$.

Assume that $P$ is reducible. Then there exists a nonempty proper subset $I \subset \{1,\dots,n\}$ such that: $$ \prod_{i \in I} z_i = 1. $$ (Indeed, if $P=QR$ is a non-trivial factorization of $P$ then $\prod_{Q(z)=0} z$ and $\prod_{R(z)=0} z$ must be positive integers and so must equal $1$.) Therefore: $$ \left| \sum_{i \in I} \ell_i \right| < n \, . $$

Now, we have lots of freedom in the choice of the numbers $\ell_i$, and it is certainly possible (though no clean argument occurs to me right now) to choose them so that $\left| \sum_{i \in I} \ell_i \right| \ge n$ for each nonempty proper subset $I \subset \{1,\dots,n\}$. In this way we can guarantee that $P$ is irreducible.