What is the positive integral solution of $x^2+y^2= qz^2$?

106 Views Asked by At

Is there a standard method to find positive integral solutions of the equation $x^2+y^2= qz^2$, where $q$ is a positive integral constant? If yes, then would someone please show it to me? Actually I had come across a problem in which we had to find integral solutions of $a^2+b^2=2c^2$ which was done by changing it to $(a-2/2)^2+(b-2/2)^2= c^2$ and using the parametric form of Pythogorean triplets but what if we had other numbers such as 4 or 5 in place of q?