Solve the Diophantine Equation: $px^2+2=y^2$, where $p$ is a prime number and $x,y$ integers.
I tried this for ages but didn't get anywhere, but I don't know any advanced machinery since I am only in high school. I would prefer a characterization of solutions or a proof that there exist infinitely many.
Thanks for your help!
In the Wikipedia article related to Pell'equations, you can see (in the paragraph "Transformations") that Legendre proved that the Pell's equation $$ x^2 - py^2 = 2$$ has an integer solution (hence an infinite number of integer solutions) for any prime $p\equiv -1\pmod{8}$. As shown in the comments, this is a necessary condition.