## 615

Given that $x$ and $n$ are integers, find all possible solutions, i.e. pairs of $\left (x,n\right )$ such that the sum of the square of x and 615 is equal to two raised to the nth power or $x^2+615=2^n$.
Source: mathcontest.olemiss.edu 10/31/2011

SOLUTION
$x^2+615=2^n$ implies that $x^2$ is odd which in turn implies that $x$ is odd. Let’s take a look at a few values of $x^2$ where $x$ is an odd integer:
$\cdots$
$\left (-9\right )^2=81$
$\left (-7\right )^2=49$
$\left (-5\right )^2=25$
$\left (-3\right )^2=9$
$\left (-1\right )^2=1$
$1^2=1$
$3^2=9$
$5^2=25$
$7^2=49$
$9^2=81$
$\cdots$
The pattern shows that $x^2$ ends in 1, 5, or 9. Hence, it follows that $x^2+615$ ends in 6, 0, or 4 respectively.

Let’s take a look at a few values of $2^n$ where $n$ is an integer:
$\cdots$
$2^{-2}=\frac{1}{2^2}$
$2^{-1}=\frac{1}{2}$
$2^0=1$
$2^1=2$
$2^2=4$
$2^3=8$
$2^4=16$
$2^5=32$
$2^6=64$
$2^7=128$
$2^8=256$
$\cdots$
The non-positive integers $n$ produce too small a value compared to $x^2+615$ so we will ignore them. Instead, we investigate the positive integers $n$ which produce $2^n$ values that end in 2, 4, 8, or 6. For the equation $x^2+615=2^n$ to hold true, $2^n$ must end in either 4 or 6. It follows from the above pattern that $n$ must be even or $n=2k$ for some positive integer $k$.

We write
$x^2+615=2^{2k}$
$615=2^{2k}-x^2$
$=\left (2^k\right )^2-x^2$
$=\left (2^k+x\right )\left (2^k-x\right )$

$615=1\cdot 3\cdot 5\cdot 41$
The possible products that produce 615 are:
$1\cdot 615=615$
$3\cdot 205=615$
$5\cdot 123=615$
$41\cdot 15=615$
Which one is the correct one? Let’s add the factors to figure out:
$\left (2^k+x\right )+\left (2^k-x\right )=2\left (2^k\right )$
We now have a guideline to pick the correct product: the sum of its factors is a power of 2.
The sums of the factors are:
$1+615=616$        Not a power of 2
$3+205=208$        No
$5+123=128$        Yes a power of 2
$41+15=56$           No

We have
$128=2\left (2^k\right )$
$\frac{128}{2}=2^k$
$64=2^k$
$2^6=2^k$
$k=6$

Value of $\mathbf n$
$n=2k=2\cdot 6=12$

Values of $\mathbf x$
$x^2+615=2^{12}$
$x^2+615=4096$
$x^2=4096-615$
$x^2=3481$
$x=\pm \sqrt{3481}$
$x=\pm 59$

Answer: $\left (-59,12\right )$ and $\left (59,12\right )$.