# Perfect square. Factorising problem

What is the sum of all positive integers $n$ for which $2^n + 65$ is a perfect square?

-
Sum of all values of n that satisfy that condition – tom Mar 13 '11 at 19:32
Thanks, I realized what you meant and deleted my comment. – Jonas Meyer Mar 13 '11 at 19:34
Aargh, just realized tom hasn't been here in about 10 months. I have to remember to check these things before I post.... – Gerry Myerson Jan 22 '12 at 11:08

First show that $n$ cannot be odd. This can be done by looking at $2^n + 65$ modulo 4.

So $n$ must be even, say $n=2m$. If $2^{2m} +65=x^2$, then $65=(x-2^m)(x+2^m)$. Now look at all the factorizations of 65.

-
Do you mean "modulo 3"? – Dave Radcliffe Mar 13 '11 at 20:39
@BillDubuque: Done. And I am open to any other suggestions. – André Nicolas Sep 13 '14 at 1:39
Every so often I bump into a proposed deletion of a quite old question, and therefore of good answers by the founding people of MSE. Shades of Robespierre! – André Nicolas Sep 13 '14 at 2:03

HINT

First note that for $2^n + 65$ to be square, $n$ must be even. You can check this since a square $\pmod{10}$ can be $0,1,4,5,6,9$. Hence, $n=2k$. Hence the problem now boils down to finding $k$ such that $4^k + 65$ is a square.

$4^k + 65 = x^2$ i.e. $x^2- (2^k)^2 = 65$ i.e. $(x+2^k)(x-2^k) = 65$.

Now look at the different possible cases of factorizing $65$ over $\mathbb{Z}$.

Analyze the different cases and get the different values of $k$ and add them up. I am unable to think of direct way to evaluate the sum instead of computing the individual $k$'s.

-