$$ x = {-2b + \bigl({-1+\sqrt{-3}\over2}\bigr)^n\root3\of{4\bigl(-2b^3+9abc-27a^2d+\sqrt{(-2b^3+9abc-27a^2d)^2-4(b^2-3ac)^3}\bigr)}+\bigl({-1-\sqrt{-3}\over2}\bigr)^n\root3\of{4\bigl(-2b^3+9abc-27a^2d-\sqrt{(-2b^3+9abc-27a^2d)^2-4(b^2-3ac)^3}\bigr)} \over 6a} $$
The cubic formula gives the solutions of $ax^3+bx^2+cx+d=0$ for real numbers $a$, $b$, $c$, $d$ with $a\neq0$.
Directions: Take $n=0$, $1$, $2$. Use real cube roots if possible, and principal roots otherwise.