I found this questions from past year maths competition in my country, I've tried any possible way to find it, but it is just way too hard.
How many integer solutions ($x$, $y$) are there of the equation $(x-2)(x-10)=3^y$?
(A)1 (B)2 (C)3 (D)4 (E)5
If let $y=0$, we had $$x^2 - 12x + 20 = 1$$ $$x^2 - 12x + 19 = 0$$
no integer solution for x
let $y=1$, we had $x^2 - 12x + 17 = 0$, no integer solution too.
let $y=2$, we had $x^2 - 12x + 11 = 0$, we had $x = 1, 11$.
let $y=3$, we had $x^2 - 12x - 7 = 0$, no integer solution.
let $y=4$, we had $x^2 - 12x - 61 = 0$, no integer solution.
and going on....
is there any other efficient way to find it? "brute-forcing" it will wasting a lot of time.
Since their product is a power of $3$, both $x-2$ and $x-10$ must be powers of $3$, perhaps with minus signs (as Andre Nicolas pointed out). Note, however, that $x-2$ and $x-10$ cannot simultaneously be divisible by $3$. The only power of $3$ which is not divisible by $3$ is $1$, hence we must have that $x-2 = \pm 1$ or $x-10 = \pm 1$.
With this in mind, there are four values of $x$ to try: $1, 3, 9,$ and $11$. Two of these give you integer solutions to the equation.