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?
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.