$(n-7)(n+7)=$ some perfect square

179 Views Asked by At

This put in the context of a age problem will be:

the product of my age seven years ago and seven years later is some perfect square

Since this is a age problem that perfect square has to be between 1 and 100. I've try every factor of number between 1 and 100 inclusive, and found none that matches.

Can there be another way besides trial and error?

2

There are 2 best solutions below

5
On BEST ANSWER

This is equivalent to finding a primitive pythagorean triple, since 7 is a prime number. We are trying to solve $n^2=7^2+m^2$.

We know that any primitive pythagorean triple has one odd leg that is the difference of squares i.e. $7=a^2-b^2$ for some $a,b\in\mathbb{Z}$. Such $a$ and $b$ are $a=4$ and $b=3$.

Thus our solution is $n=a^2+b^2=4^2+3^2=25$, and $m=2*a*b=2*4*3=24$, so in turn your age is 25.

2
On

$$n = 25$$

$$n^2-49 = k^2$$

$$n^2 = 49 + k^2$$

An easy pythagorean triple containing $7$ is $(7, 24, 25)$

If $n =25$, $k$ could be $24$.

Or $(25-7)(25+7) = 18*32 = 576 = 24^2$