TITLE: System of Diophantine Equations
QUESTION [9 upvotes]: I'm working on this problem I came across on the internet but I have no solution yet. 
The problem states: Find all prime numbers p that are such that  $p+1=2x^2$ and $p^2+1=2y^2$ where x and y are integers.
Edit: to which point I have reached.
 I wrote $p=2p_1+1$. After this the second equation becomes $2p_1^2+2p_1+1=y^2$ which is rewritten as $p_1^2+x^4=y^2$ in which we only have to find Pythagorean triples.

REPLY [13 votes]: Suppose wlog $x,y >0$
Substract initially the two equations to get $p(p-1)=2(y-x)(y+x)$
If $p \mid (y-x) \Rightarrow p \leq y-x \Rightarrow p-1 \geq 2(y+x)$ so we can see that $y-x > 2(y+x) \Rightarrow y+3x<0$ contradiction.  
Therefore $p \mid (x+y) \Rightarrow p\leq x+y \Rightarrow p-1\geq 2(y-x)$ so $x+y \geq 2(y-x) \Rightarrow y<3x \Rightarrow y^2<9x^2 \Rightarrow p^2+1<9(p+1)$   
We now just have to solve $p^2-9p-8<0 $ from which we deduce that $p<10$ and by checking possible values we get $p=7$.