How to find $m$ if $m+7$ & $m-34$ are both perefect squares?

78 Views Asked by At

Today I've got a math contest. And I couldn't solve the following problem :

Let $m$ be a natural number, where : $m+7$ is a perfect square & $m-34$ is also a perfect square .

What's the value of $m$ ?

I have absolutely no idea on how should I proceed with this kind of problems and I'm completly stuck at it. I don't even know how to start .

3

There are 3 best solutions below

0
On BEST ANSWER

Let $p^2=m+7$, $q^2=m-34$.

We have:

$$p^2-q^2=41$$

Try continuing form here.

0
On

(Another approach — Just for fun!)

Observe that the squares are precisely the sums of odds:

$1 = 1^2$ (first $1$ odd)

$1+3 = 4 = 2^2$ (first $2$ odds)

$1+3+5 = 9 = 3^2$ (first $3$ odds)

$1+3+5+7 = 16 = 4^2$ (first $4$ odds), and so forth.

You have two numbers with difference $41$ as squares; note that $41$ is the $21$st odd.

So the smaller is the sum of the first $20$ odds, and the latter is the sum of the first $21$ odds.

The sum of the first $n$ odds is $n^2$, thus, the first $20$ odds sum to $20^2 = 400$.

You are told that $m - 34 = 400$; so $m = 434$.

0
On

Another possibility is to see that the difference between $n^2$ and $(n+1)^2$ is $2n+1$. With a $34+7=41=2n+1$ gap, we have a solution given by $n=20$, giving

$n^2=400 < (n+1)^2=441$ thus $m=400+34=441-7=434$;

but it could happen that such a gap occurs between non-consecutive squares.

If such is the case, as the gaps are larger and larger, this gap should take place before $20^2=400$. But there is no solution because if $a^2-b^2=41 \Leftrightarrow (a-b)(a+b)=41$; as 41 is a prime number, necessarily $a-b=1$ i.e., a and b differ by one unity, and we are back to the previous (and unique) solution.