i'am struggling to solve this problem can you help me please Let $p$ be a prime number such that there exists two positive integers $m,n$ s.t $$p^2=\frac{(m^2+n^2)}{2}$$
Prove that there exists a positive integer a such that :
$$2p-m-n=a^2 \text{ or } 2p-m-n=2a^2$$