Solution (source code)

= Solution

The cubic has no rational integer root among the divisors of four, so is irreducible. Its <polynomial> <discriminant> is $4-27\cdot16=-428=-4\cdot107$. Thus the index $[\mathcal O_K:\mathbb Z[\alpha]]$ is one or two, since its square divides the <discriminant>.

Set $\beta=(\alpha^2+\alpha)/2$. Using $\alpha^3=\alpha+4$ gives
$$
\beta^2=\beta+\alpha+2,\qquad\alpha\beta=\beta+2,
$$
and hence $\beta^3-\beta^2-3\beta-2=0$. Therefore $\beta$ is integral. The lattice spanned by $1,\alpha,\beta$ contains $\mathbb Z[\alpha]$ with index two. Changing basis divides the <discriminant> by four, giving $-107$, which is squarefree. An integral lattice of full rank with squarefree <discriminant> cannot have any further index in the full ring of integers. Hence
$$
\boxed{\mathcal O_K=\mathbb Z\oplus\mathbb Z\alpha\oplus\mathbb Z\frac{\alpha^2+\alpha}{2}}
$$
is the required <integral basis>. The relations also give $\alpha=\beta^2-\beta-2$, so this ring can equally be generated by $\beta$.