TITLE: Solve $a^3-5a+7=3^b$ over the positive integer
QUESTION [7 upvotes]: Solve $a^3-5a+7=3^b$ over the positive integer

I don't know how to solve such equation, please help me. Thanks

REPLY [2 votes]: One way would be to find all the integral points on the two elliptic curves 
$$
y^2=a^3-5a+7 \; \mbox{ and } 3 y^2 = a^3 - 5a +7,
$$
and to then look for values of $y$ that are powers of $3$. One could do this via, for instance, Magma. Appealing to Magma's IntegralPoints routine tells you that the first curve has only $(a,y)= (-2, \pm 3)$, while the second has $(a,y)=(1,\pm 1)$.