<s>[INST] Prove that there is a unique positive integer $n$ such that $2^8 + 2^{11} + 2^n$ is a perfect square. I think I have almost got to the solution:
Let us start by considering two cases: $n\geq8$ and $n<8$.
1: $n\geq8$
$2^8+2^{11}+2^n$=$2^8(1+2^3+2^{n-8})=2^8(9+2^{n-8})$.......Factoring $2^8$ and                               simplifying terms inside the bracket.
Now since $2^8$ is already a perfect square,$(9+2^{n-8})$ has to be a perfect square as well for $2^8+2^{11}+2^n$.Therefore we can write the following equation:
$9+2^{n-8}=x^2$
=>$2^{n-8}=x^2-9$
=>$2^{n-8}=(x-3)(x+3)$
Hence, (x-3) and (x+3) are factors of a power of 2. The only factors of a power of 2,say $2^k$, is 2 and any $2^g$ where $g\leq k$. Therefore,
$x-3=2^y$.......equation 1
$x+3=2^z$.......equation 2  (Product of $2^y$ and $2^z$ is $2^{n-8}$)*
Subtracting equation 1 from 2 gives:
$2^z-2^y=(x+3)-(x-3)$
=>$2^z-2^y=6$
(let us say $y<z$)
$2^y(2^z-1)=6$. The factors of 6 that multiply to 6 are (1,6) and (2,3). So,  $2^y$ and $2^z-1$ have to be equal to 1 and 6 or 2 and 3. Out of these, for $y,z$ to be integers, 2 and 3 can only fit the equation. Hence y=1;z-y=2 or z=3.From *,
$2^{n-8}=2^{y+z}=2^{3+1}=2^4$. Since $2^{n-8}=2^4$,$2^n=2^{12}$
If $z<y$,
$2^z(1-2^y)=6$. Again following the same rules we must have $(2^z,1-2^y)=(1,6)$ or (2,3). None of them satisfy the equation when $x$ and $y$ are integers.
Hence we can conclude that when $n\geq8$ , the only n that can make $2^8+2^{11}+2^n$ a perfect square is $n=12$.
2:$n<8$
Sub case 1: $n$ is odd.
Since $n$ is odd, $n$ could be expressed as $2l+1$, where $l$ is an integer. Therefore,
$2^8+2^{11}+2^n=2^8+2^{11}+2^{2l+1}=2^{2l+1}(2^{8-n}+2^{11-n}+1)=2*2^{2l}((2^{8-n}+2^{11-n}+1)$, Since there is a $2$ outside the bracket,$(2^{8-n}+2^{11-n}+1)$ must contain atleast one power of 2 and it is obvious that $(2^{8-n}+2^{11-n}+1)$ cannot be a power of 2.
In this problem, I was not able to prove that there is no $n\leq 8$ such that n is even which can be a solution to the problem . Can someone help me out with it? I arrived with three different solutions for proving that, only to realize their defects.
 [/INST] For n < 8.
$2^8 + 2^{11}$ is $48^2$. That means $48^2 + 2^n$ is a perfect square. Since $2^n$ is even and $48^2$ is even, and even plus even is even, the square also has to be even. The next greatest even square after $48^2$ is $50^2$ which is $196$ greater than $48^2$. $2^7$ is $128$, which is less than $196$  which proves there is no $n$ in this case that works.
</s>