The question is to find out the number of values of $x \in \mathbb Z $ and $n \in \mathbb N$ satisfying the equation $$x^2+615=2^n$$
I know that the number of values of $x$ will be twice the number of values of $n$. I tried to plot a curve but could not proceed. Any help would be highly appreciated. Thanks.
Ok, so start by assuming $x\geq 0$ (since if $x$ satisfies the equation, so does $-x$ and vice versa, hence we can assume this without any loss of generality) observing that $615=3\times5\times 41$. Now, explore the equation $$ x^2 + 3\times5\times41 = 2^n $$ in modulo 3. We have, $$ x^2 \equiv 2^n \pmod{3}, $$ and since $x^2$ can only take $0$ or $1$ modulo 3, we must have that $n$ is even. Writing $n =2k$ and expanding, we arrive at $$ (2^k-x)(2^k+x) = 615. $$ The only possibility here is $2^k-x=5$ and $2^k+x = 123$ (you just need to try the cases $2^k-x = 1,3,5,15$ as $2^k-x < 2^k+x$), which gives us $k=6$ and $x=59$. Hence, $(59,12)$ and $(-59,12)$ are the only solutions to the given equation.