HMMT-Nov 2016 guts, Problem 12

A positive integer $\overline{A B C}$, where $A, B, C$ are digits, satisfies \[ \overline{A B C}=B^{C}-A \] Find $\overline{A B C}$.

Solution: The equation is equivalent to $100 A+10 B+C=B^{C}-A$. Suppose $A=0$, so that we get $10 B+C=B^{C}$. Reducing $\bmod B$, we find that $C$ must be divisible by $B$. $C \neq 0$, since otherwise $10 B=1$, contradiction, so $C \geq B$. Thus $10 B+C \geq B^{B}$ for digits $B, C$. For $B \geq 4$, we have $100>10 B+C \geq B^{B}>100$, a contradiction, so $B=1,2,3$. We can easily test that these do not yield solutions, so there are no solutions when $A=0$. Thus $A \geq 1$, and so $100 \leq 100 A+10 B+C \leq 1000$, and thus $100 \leq B^{C}-A \leq 1000.1 \leq A \leq 10$, so we have $101 \leq B^{C} \leq 1010$. We can test that the only pairs $(B, C)$ that satisfy this condition are $(2,7),(2,8),(2,9),(3,5),(3,6),(4,4),(5,3),(6,3),(7,3),(8,3),(9,3)$. Of these pairs, only $(2,7)$ yields a solution to the original equation, namely $A=1, B=2, C=7$. Thus $\overline{A B C}=127$. $\fbox{127}$.

Answer: 127