Integer Solutions to $x^2+y^2=5z^2$ I'm looking for a formula to generate all solutions $x$, $y$, $z$ for $x^2 + y^2 = 5z^2$.
Any advice?

Ok, so I am assuming rational solutions. This method can yield a parametrization of all integer solutions without too much work.
Note that $(1,2)$ lie on the circle $x^2 + y^2 = 5$. Let $x_0 = 1, y_0 = 2$. Now suppose $x^2 + y^2 = 5$. Let $m = x - x_0, n = y - y_0$, then we have $$m^2 + 2mx_0 + x_0^2 + n^2 + 2ny_0 + y_0^2 = 5$$
And thus $m^2 + 2mx_0 + n^2 + 2ny_0 = 0$. Let $\lambda = \frac{m}{n}$. Then we have: $$n^2\lambda^2 + 2n\lambda x_0 + n^2 + 2ny_0 = 0$$
$$n\lambda^2 + 2\lambda x_0 + n + 2y_0 = 0$$
$$n = \frac{-2y_0 - 2\lambda x_0}{1 + \lambda^2}$$
Plugging in $x_0 = 1, y_0 = 2$:
$$n = \frac{-4 - 2 \lambda}{1 + \lambda^2}$$
Thus it follows $$(x,y) = \left (1 + \frac{-4\lambda - 2\lambda^2}{1 + \lambda^2}, 2 + \frac{-4 - 2 \lambda}{1 + \lambda^2} \right )$$
where $\lambda$ is an arbitrary number in $\mathbb{Q}$.
Now for $x^2 + y^2 = 5z^2$, we simply need: $$(x,y,z) = \left (z + \frac{-4z\lambda - 2z\lambda^2}{1 + \lambda^2}, 2z + \frac{-4z - 2z \lambda}{1 + \lambda^2},z \right )$$
If you want solutions in $\mathbb{Z}$, it takes only a little more work to finish.
EDIT: So either I made a massive reading failure or the author changed the title. So here's how to finish.
A slightly neater form to work with is $$(x,y,z) = \left (1 + \lambda^2  -4\lambda - 2\lambda^2, 2 + 2\lambda^2 -4 - 2\lambda, 1 + \lambda^2 \right )$$
Letting $\lambda = \frac{m}{n}$, we see that:
$$(x,y,z) = \left (m^2 - n^2  -4mn, 2n^2 -2m^2 - 2mn, m^2 + n^2 \right )$$
