Let $r_2(n)$ denote the number of representations of $n$ as a sum of two squares.

What is known about the sum of squares of this function,

$\sum_{i=1}^n r_2(i)^2$

In particular is anything known about the asymptotics as $n \rightarrow \infty$?

  • $\begingroup$ I believe that $r_k(i)$ is the number of ways to write $i$ as a sum of $k$ squares. (Cf. the SquaresR function in Mathematica.) $\endgroup$ – Aeolian Mar 6 '13 at 3:21
  • $\begingroup$ Yep, I mistakenly put $r_k$ instead of $r_2$, fixed now =) $\endgroup$ – Loadge Mar 6 '13 at 6:43

Asymptotics are known for all integer moments of $r_2$: for any $m \ge 1$, there is an explicit constant $a_m$ such that $\sum_{n \le x} r_2(n)^m \sim a_m\cdot x\,(\log x)^{2^{m-1}-1}$. ($m=0$ also holds if we interpret $0^m$ as $0$.)

This result, including the precise constant (and a uniform generalization to other positive binary quadratic forms), can be found in V. Blomer and A. Granville, “Estimates for representation numbers of quadratic forms”, Duke Math. J. 135 (2006). Here's the PDF.

  • $\begingroup$ Thanks Erick, I will check out the reference $\endgroup$ – Loadge Mar 6 '13 at 6:46

If you want to know exact formulae for these types of sums, I highly recommend "Number Theory in the Spirit of Ramanujan" by Bruce Berndt.

On page 56, a proof is given of $r_2(n) = 4 \sum_{d|n, d\ odd} (-1)^{(d-1)/2}$.

You can do a Dirichlet multiplication to get a double sum for $r_2^2(n)$.

By the way, after reading this book, I am absolutely astounded at how great a mathematician Jacobi was. He developed the $q$-series methods that enabled him to get explicit formulae for the number of representations on any integer as the sum of a number of squares or triangular numbers. Reading a list of his accomplishments is, like wow! He and Ramanujan would have gotten along famously.

  • $\begingroup$ Thanks for the post, will add to my reading list =) $\endgroup$ – Loadge Mar 6 '13 at 6:48

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.