Find all prime numbers such that $\dfrac{p+1}{2}$ and $\dfrac{p^2+1}{2}$ are both squares of an integer.
What makes it slightly annoying is that it is not just prooving that there is none, because 7 is such a prime.
Find all prime numbers such that $\dfrac{p+1}{2}$ and $\dfrac{p^2+1}{2}$ are both squares of an integer.
What makes it slightly annoying is that it is not just prooving that there is none, because 7 is such a prime.
Let $p=2x^2-1$ and $p^2=2y^2-1$. Then $p(p-1)=2(y-x)(y+x)$.
Since $p>p-1$, $p$ must be a factor of $y+x$.
However, $y<\frac{p+1}{\sqrt 2}$ and $x<\frac{\sqrt {p}+1}{\sqrt 2}$ and so $x+y<\frac{p+\sqrt {p}+2}{\sqrt 2}$.
Therefore $p+\sqrt {p}+2>\sqrt 2p$ which means $p\le 13$ and these primes can be quickly checked. The only solution is $p=7$.