Problem

Source: 2022 Bulgarian Spring Math Competition, Problem 9.3

Tags: algebra, system of equations, prime



Find all primes $p$, such that there exist positive integers $x$, $y$ which satisfy $$\begin{cases} p + 49 = 2x^2\\ p^2 + 49 = 2y^2\\ \end{cases}$$