I would like to find all integer solutions to the Diophantine equation $$ x^2+p y^2=z^2 $$ where $p\ge2$ is a given prime number. Also prove that my (probably parametric similar to Pythagorean triples $x=a^2-b^2,\ y=2ab,\ z=a^2+b^2$) solution gives all of the.
I tried to move $x^2$ to the right hand side and write $py^2=(z-x)(z+x)$. then assume two cases: (1) $\ \ p|z-x$ , (2) $ \ p|z+x$. then I wrote some conditional relation depending on $y$. but I am not satisfied with that. Any help would be appreciated?