# The number of representations of the positive integer $n$ as $a^{2}+b^{2}+p^{2}c^{2}$

Let $n$ be a positive integer and $p$ a prime number. I know that there are formulas by which one can compute the number of representations of $n$ as the sum of two or three squares etc.

I would to know if there is a formula describing the number of representations of $n$ as the following form $a^{2}+b^{2}+p^{2}c^{2}$, $a,b, c\in\mathbb{N}$.

Thank you.

• What makes you think there is a formula for the number of representations as the sum of three squares? mathoverflow.net/questions/3596/… – Will Jagy Sep 10 '14 at 17:28
• Will Jagy, Bateman's formula gives the number of representations of any integer as the sum of three squares. It is not so easy to compute $K(-4n)$ in this formula, but one can use it to make some efficient computations. I ask if there is a similar formula giving the number of representations of an integer as follows $a^{2}+b^{2}+p^{2}c^{2}$? – user50965 Sep 10 '14 at 19:16
• I see. I've seen Bateman, never used it for anything. For the kind of thing I use, the restriction amounts to class number one, meaning $p=3$ only. I have no idea what happens if you completely re-do Bateman's proof for your cases of interest. – Will Jagy Sep 10 '14 at 19:22