TITLE: The number of integral solutions to $x^2+y^2-az^2=0$
QUESTION [6 upvotes]: I think this must be well-known (and probably not hard to prove either), but I cannot find a reference: for a (positive) rational number $a$, the number of integral solutions to the equation
$$ x^2+y^2-az^2=0, $$
with $|x|,|y|,|z|<T$ is $C(a) T \log T$, where $C(a)$ is a constant depending only on $a$. I would very much appreciate a reference which also includes a proof.

REPLY [8 votes]: You need some further assumptions on $a$ to guarantee the existence of a solution to this equation, as there might not be solutions modulo some prime, say. The theorem of Hasse and Minkowski tells you exactly when solutions exist.
But anyway, the result you want is Theorem 8 in the paper:
Heath-Brown - A New Form of the Circle Method, and its
Application to Quadratic Form.
You can find this here:
http://eprints.maths.ox.ac.uk/144/1/circle.pdf (Wayback Machine)