Ask Uncle Colin: A problem of squares and powers

Dear Uncle Colin,

I have to solve $615 + x^2 = 2^y$ for integers $x$ and $y$. I’ve solved it by inspection using Desmos ($x=59$ and $y=12$ is the only solution), but I’d prefer a more analytical solution!

Getting Exponent Right Makes An Interesting Noise

Hi, GERMAIN, and thanks for your message!

My approach here would be to split it up into two parts: one when $y$ is even, and one when $y$ is odd - noting that, in either case, $y > 8$.

Even $y$

If $y$ is even (call it $2n$), we can rewrite the equation as $615 = 2^{2n} - x^2$, which is the difference of two squares: $615 = \left(2^n - x\right)\left(2^n + x\right)$.

As it turns out, 615 doesn’t have all that many factors - it could be $1 \times 615$, $3 \times 205$, $5 \times 123$ or $15 \times 41$. We would need two factors equally spaced either side of a power of 2, and $5 \times 123$ is the only one that fits the bill - it’s $(64 - 59)(64 + 59)$. This gives $n=6$, so $y=12$ and $x=59$ as the only integer solution.

Odd $y$

If $y$ is odd, $2^y$ is congruent to 2 (modulo 3). However, since 615 is a multiple of three, $x^2$ would need to be congruent to 2 (modulo 3), which is not possible - all square numbers are of the form $3n$ or $3n+1$.

So there you go! Your solution is correct, and the only possible one – analytically! I hope that helps.

- Uncle Colin

* Edited 2019-07-25 to fix erroneous squares in the brackets. Thanks to @zbvif for letting me know!


Colin is a Weymouth maths tutor, author of several Maths For Dummies books and A-level maths guides. He started Flying Colours Maths in 2008. He lives with an espresso pot and nothing to prove.


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Sign up for the Sum Comfort newsletter and get a free e-book of mathematical quotations.

No spam ever, obviously.

Where do you teach?

I teach in my home in Abbotsbury Road, Weymouth.

It's a 15-minute walk from Weymouth station, and it's on bus routes 3, 8 and X53. On-road parking is available nearby.

On twitter