When is $2(m)(m+1)+1$ is a perfect square?

92 Views Asked by At

When solving a certain problem I had the equation that $x^{2}=2m^2+2m+1$ for some non-negative $m$ and I have to find such $m$. It is given that $x$ is a prime.

I started by simply considering first what would be the values of $m$ for which $2m^2+2m+1$ is a perfect square. First thing, I could check is that $2m^2+2m+1=2(m)(m+1)+1=4k+1$ for some $k$. So, at least we don't have to worry about even perfect square, as $4k+1$ is of the form of an odd perfect square.

But, I am getting nowhere on how to proceed further, what should I consider now?

2

There are 2 best solutions below

0
On BEST ANSWER

If $m$ and $x$ are integers such that $$x^2=2m^2+2m+1,$$ then also $$(2m+1)^2-2x^2=-1.$$ This is known as a Pell equation, and many question have been asked about this particular one, although (the structure of) the solutions is readily found on the linked Wikipedia page.

The requirement that one of the two numbers is prime seems to make the question very difficult, as this related question asked an hour ago suggests.

0
On

$2m^2+2m+1=m^2+(m+1)^2$ so the trick is to find two consecutive integers whose squares sum to a square, such as $3^2+4^2=5^2$. This particular example satisfies the requirement that $x=5$ is prime.