That's actually the whole question.
Is there a number system base $a$ where $2018$ can be written as $\overline{21312}^{a}$ in it?
I honestly don't know what I do more than this
$2a^4 + a^3 + 3a^2 + a = 2016$
I don't know how to solve an equation like this and how to check if it has solutions.
EDIT: It seems that the book forgot to mention it in the question but $a > 3$
$$2a^4 + a^3 + 3a^2 + a + 2 = 2018$$ Since $a$ is positive: $$2a^4 < 2016$$ $$a^4 < 1008$$ $$a < 5.6$$ Since $a$ is integer: $$a <= 5$$ Now let's take $a = 5$: $$2a^4 + a^3 + 3a^2 + a + 2 = 1452$$ If we take $a < 5$, we will get numbers less than 1452.
Means, there is no solution.